summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/parse.y
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2018-06-15 08:57:18 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2018-06-15 08:57:18 +0000
commit514828e56d82e4ac3d870c539abe3f55686b4b28 (patch)
treeef0726fc03b924a4bb83e1f6d0f64fb37e1d491c /usr.sbin/smtpd/parse.y
parentbb636f48460a2fe1bae1d7fc1a4dfdf332521eb4 (diff)
the %{sender} variable should expand to the MAIL FROM address, so in the
case of a mailer daemon, this is an empty string, not '@' introduce %{mbox.from} which is the From separator line representation of a sender, usually an email address or MAILER-DAEMON if sender is empty ok eric@
Diffstat (limited to 'usr.sbin/smtpd/parse.y')
-rw-r--r--usr.sbin/smtpd/parse.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y
index 4e98a6343da..29eea52189b 100644
--- a/usr.sbin/smtpd/parse.y
+++ b/usr.sbin/smtpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.211 2018/06/04 15:57:46 gilles Exp $ */
+/* $OpenBSD: parse.y,v 1.212 2018/06/15 08:57:17 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -589,7 +589,7 @@ dispatcher_local:
MBOX {
dispatcher->u.local.requires_root = 1;
dispatcher->u.local.user = xstrdup("root");
- asprintf(&dispatcher->u.local.command, "/usr/libexec/mail.local -f %%{sender} %%{user.username}");
+ asprintf(&dispatcher->u.local.command, "/usr/libexec/mail.local -f %%{mbox.from} %%{user.username}");
} dispatcher_local_options
| MAILDIR {
asprintf(&dispatcher->u.local.command, "/usr/libexec/mail.maildir");
@@ -615,11 +615,11 @@ MBOX {
} dispatcher_local_options
| LMTP STRING {
asprintf(&dispatcher->u.local.command,
- "/usr/libexec/mail.lmtp -f %%{sender} -d %s %%{user.username}", $2);
+ "/usr/libexec/mail.lmtp -f \"%%{sender}\" -d %s %%{user.username}", $2);
} dispatcher_local_options
| LMTP STRING RCPT_TO {
asprintf(&dispatcher->u.local.command,
- "/usr/libexec/mail.lmtp -f %%{sender} -d %s %%{dest}", $2);
+ "/usr/libexec/mail.lmtp -f \"%%{sender}\" -d %s %%{dest}", $2);
} dispatcher_local_options
| MDA STRING {
asprintf(&dispatcher->u.local.command,