diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-11-08 19:38:27 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-11-08 19:38:27 +0000 |
commit | 7fed0767a3cf7980eb02971f656873d30bc7d35d (patch) | |
tree | ebda0c5c2e2b90c9531cd180f7940fe585e0520f /usr.sbin/smtpd/smtpd.h | |
parent | edd7b212bbd6639ef681e0b2a4a145d5f6e200cb (diff) |
first commit of a serie to cleanup, simplify and improve aliases resolution
which is probably the most complex code in smtpd right now. no longer use a
single list to hold aliases to be resolved and resolved aliases, and do not
use struct alias to hold resolved aliases. instead use a delivery list that
is a list of struct path, and populate it with resolved aliases.
idea discussed with jacekm@, this needs some testing to make sure it does
not introduce a regression with aliases. flush your queue and make clean.
Diffstat (limited to 'usr.sbin/smtpd/smtpd.h')
-rw-r--r-- | usr.sbin/smtpd/smtpd.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/smtpd.h b/usr.sbin/smtpd/smtpd.h index 6a220a84ad4..6d6d5080aaf 100644 --- a/usr.sbin/smtpd/smtpd.h +++ b/usr.sbin/smtpd/smtpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpd.h,v 1.153 2009/11/05 10:27:24 gilles Exp $ */ +/* $OpenBSD: smtpd.h,v 1.154 2009/11/08 19:38:26 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -346,6 +346,7 @@ enum path_flags { F_PATH_FORWARDED = 0x10, F_PATH_ACCOUNT = 0x20, F_PATH_AUTHENTICATED = 0x40, + F_PATH_RELAY = 0x80, }; struct path { @@ -362,6 +363,7 @@ struct path { char filter[MAXPATHLEN]; } u; }; +TAILQ_HEAD(deliverylist, path); enum alias_type { ALIAS_USERNAME, @@ -725,6 +727,7 @@ struct lkasession { struct path path; struct aliaseslist aliaseslist; + struct deliverylist deliverylist; u_int8_t iterations; u_int32_t pending; enum lkasession_flags flags; @@ -980,3 +983,4 @@ void lowercase(char *, char *, size_t); void message_set_errormsg(struct message *, char *, ...); char *message_get_errormsg(struct message *); void sa_set_port(struct sockaddr *, int); +struct path *path_dup(struct path *); |