summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/lka_session.c
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2011-10-22 18:03:28 +0000
committerEric Faurot <eric@cvs.openbsd.org>2011-10-22 18:03:28 +0000
commitaf9f53e5db32553e0546774ccc8e1fcd25aaf146 (patch)
tree1c4faf80c548748637b24bb96285df1558ecc84c /usr.sbin/smtpd/lka_session.c
parent94116cb6a26c054219588085ccb1fba1f4452c82 (diff)
correctly set relay when expanding envelopes
ok gilles@
Diffstat (limited to 'usr.sbin/smtpd/lka_session.c')
-rw-r--r--usr.sbin/smtpd/lka_session.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/lka_session.c b/usr.sbin/smtpd/lka_session.c
index a3cd1a0ccd2..df60ebf1dd3 100644
--- a/usr.sbin/smtpd/lka_session.c
+++ b/usr.sbin/smtpd/lka_session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka_session.c,v 1.9 2011/08/27 22:32:41 gilles Exp $ */
+/* $OpenBSD: lka_session.c,v 1.10 2011/10/22 18:03:27 eric Exp $ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@openbsd.org>
@@ -391,8 +391,9 @@ lka_session_deliver(struct lka_session *lks, struct envelope *ep)
default:
break;
}
- }
- else if (new_ep->delivery.type == D_MTA) {
+ } else if (new_ep->delivery.type == D_MTA) {
+ if (ep->rule.r_action == A_RELAYVIA)
+ new_ep->delivery.agent.mta.relay = ep->rule.r_value.relayhost;
if (ep->rule.r_as)
new_ep->delivery.from = *ep->rule.r_as;
}