From d75122e3703d72e0f8b995ed33e453cd1af73444 Mon Sep 17 00:00:00 2001 From: Eric Faurot Date: Tue, 9 Oct 2012 21:33:39 +0000 Subject: make "relay ... as ..." work again. It's been zapped by mistake. spotted by todd@ ok gilles@ --- usr.sbin/smtpd/lka_session.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'usr.sbin/smtpd/lka_session.c') 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 @@ -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: -- cgit v1.2.3