diff options
author | 2009-06-01 21:19:15 +0000 | |
---|---|---|
committer | 2009-06-01 21:19:15 +0000 | |
commit | fc6ea6a1fec11e558d307e6407c05e4e3a9d424c (patch) | |
tree | e52a4f57ed1ffe36aac38f8e0c36f9788d21283c | |
parent | Welcome ldpd, the Label Distribution Protocol daemon. (diff) | |
download | wireguard-openbsd-fc6ea6a1fec11e558d307e6407c05e4e3a9d424c.tar.xz wireguard-openbsd-fc6ea6a1fec11e558d307e6407c05e4e3a9d424c.zip |
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@
-rw-r--r-- | usr.sbin/smtpd/lka.c | 6 |
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); |