diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-01-06 23:12:29 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-01-06 23:12:29 +0000 |
commit | 1bdb295fcd579a294accd1e9cd5a343c2f4e1d92 (patch) | |
tree | 4bdc2b4e6070599645993bad3cc5bb2173256e3e /usr.sbin | |
parent | 0c33a452618e31788270136f09e31e02cb6de8d5 (diff) |
- do not perform a local user lookup, that includes alias expansion, when a
recipient is ... not a local recipient (bug introduced very recently).
Fix by Nicholas Marriott <nicholas.marriott@gmail.com>
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/lka.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c index ee636ff6910..ae51bca8eba 100644 --- a/usr.sbin/smtpd/lka.c +++ b/usr.sbin/smtpd/lka.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka.c,v 1.15 2009/01/04 17:45:58 gilles Exp $ */ +/* $OpenBSD: lka.c,v 1.16 2009/01/06 23:12:28 gilles Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -185,8 +185,19 @@ lka_dispatch_mfa(int sig, short event, void *p) ss = imsg.data; ss->code = 530; - - if (! lka_resolve_path(env, &ss->u.path)) { + + if (IS_RELAY(ss->u.path.rule.r_action)) { + ss->code = 250; + message = ss->msg; + message.recipient = ss->u.path; + imsg_compose(env->sc_ibufs[PROC_QUEUE], + IMSG_QUEUE_SUBMIT_ENVELOPE, 0, 0, -1, &message, + sizeof (struct message)); + imsg_compose(env->sc_ibufs[PROC_QUEUE], + IMSG_QUEUE_COMMIT_ENVELOPES, 0, 0, -1, &message, + sizeof (struct message)); + } + else if (! lka_resolve_path(env, &ss->u.path)) { imsg_compose(ibuf, IMSG_LKA_RCPT, 0, 0, -1, ss, sizeof(*ss)); } |