From 1bdb295fcd579a294accd1e9cd5a343c2f4e1d92 Mon Sep 17 00:00:00 2001 From: Gilles Chehade Date: Tue, 6 Jan 2009 23:12:29 +0000 Subject: - 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 --- usr.sbin/smtpd/lka.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'usr.sbin') 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 @@ -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)); } -- cgit v1.2.3