summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2009-06-01 21:19:16 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2009-06-01 21:19:16 +0000
commitfe82eb306641b97ed1723d9c849bb57c37701252 (patch)
tree61ab9caa3cbc7cf164d53c4e2db3e8e2cd546865 /usr.sbin
parent5de1d23aeb3294b99aea577259871a4a7686e9b4 (diff)
propagate the recipient domain through aliases expansion, this fixes a bug
that would trigger when smtpd.conf does not have an "accept for local" rule and we attempt to deliver to a domain for which we are a destination. spotted by jacekm@, fix by me and ok jacekm@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/lka.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c
index 59c05af088f..542b6ccb972 100644
--- a/usr.sbin/smtpd/lka.c
+++ b/usr.sbin/smtpd/lka.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lka.c,v 1.53 2009/06/01 18:24:01 deraadt Exp $ */
+/* $OpenBSD: lka.c,v 1.54 2009/06/01 21:19:15 gilles Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -278,7 +278,9 @@ lka_dispatch_parent(int sig, short event, void *p)
alias_parse(alias, fwreq->pw_name);
message = lkasession->message;
- bzero(&message.recipient, sizeof(struct path));
+ bzero(&message.recipient, sizeof(struct path));
+ strlcpy(message.recipient.domain, lkasession->path.domain,
+ sizeof(message.recipient.domain));
lka_resolve_alias(env, &message.recipient, alias);
lka_rcpt_action(env, &message.recipient);