diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2012-10-09 21:33:39 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2012-10-09 21:33:39 +0000 |
commit | d75122e3703d72e0f8b995ed33e453cd1af73444 (patch) | |
tree | 2a705c5d8a9bc69989644ab7b07f8f873c70fd3e /usr.sbin/smtpd/lka_session.c | |
parent | 187c34d747294e65971eaba11064a864a69772de (diff) |
make "relay ... as ..." work again. It's been zapped by mistake.
spotted by todd@
ok gilles@
Diffstat (limited to 'usr.sbin/smtpd/lka_session.c')
-rw-r--r-- | usr.sbin/smtpd/lka_session.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/lka_session.c b/usr.sbin/smtpd/lka_session.c index 2494a56b5c1..1c00b983162 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.40 2012/10/03 19:42:16 gilles Exp $ */ +/* $OpenBSD: lka_session.c,v 1.41 2012/10/09 21:33:38 eric Exp $ */ /* * Copyright (c) 2011 Gilles Chehade <gilles@openbsd.org> @@ -312,6 +312,12 @@ lka_submit(struct lka_session *lks, struct rule *rule, struct expandnode *xn) if (xn->type != EXPAND_ADDRESS) fatalx("lka_deliver: expect address"); ep->dest = xn->u.mailaddr; + if (rule->r_as && rule->r_as->user[0]) + strlcpy(ep->sender.user, rule->r_as->user, + sizeof ep->sender.user); + if (rule->r_as && rule->r_as->domain[0]) + strlcpy(ep->sender.domain, rule->r_as->domain, + sizeof ep->sender.domain); break; case A_MBOX: case A_MAILDIR: |