summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2012-09-17 18:44:58 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2012-09-17 18:44:58 +0000
commit18a24d76f35229ff7a09e0491dc6872f4bf69011 (patch)
tree5c900d04d7e3d92c7d343bc65ebe90f7a7b88333
parentd15458f6cb28ed49edb6d9bfc302676ae325338e (diff)
Fix format expansion in smtpd.conf, it has confused a lot of people and it
turns out documentation got it wrong. This commit changes formats and doc, it makes situation saner: %A = user part of sender address %D = domain part of sender address %a = user part of recipient address %d = domain part of recipient address %u = unix account of recipient ok eric@
-rw-r--r--usr.sbin/smtpd/lka_session.c8
-rw-r--r--usr.sbin/smtpd/smtpd.conf.56
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/smtpd/lka_session.c b/usr.sbin/smtpd/lka_session.c
index 6b75d5bbe16..612f1444a6f 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.22 2012/08/21 20:19:46 eric Exp $ */
+/* $OpenBSD: lka_session.c,v 1.23 2012/09/17 18:44:57 gilles Exp $ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@openbsd.org>
@@ -564,16 +564,16 @@ lka_session_expand_format(char *buf, size_t len, struct envelope *ep)
tmp++;
}
switch (*tmp) {
- case 'U':
+ case 'A':
string = ep->sender.user;
break;
case 'D':
string = ep->sender.domain;
break;
- case 'a':
+ case 'u':
string = ep->agent.mda.as_user;
break;
- case 'u':
+ case 'a':
string = ep->dest.user;
break;
case 'd':
diff --git a/usr.sbin/smtpd/smtpd.conf.5 b/usr.sbin/smtpd/smtpd.conf.5
index a55303e776e..65ee3057e43 100644
--- a/usr.sbin/smtpd/smtpd.conf.5
+++ b/usr.sbin/smtpd/smtpd.conf.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: smtpd.conf.5,v 1.65 2012/09/01 16:09:14 gilles Exp $
+.\" $OpenBSD: smtpd.conf.5,v 1.66 2012/09/17 18:44:57 gilles Exp $
.\"
.\" Copyright (c) 2008 Janne Johansson <jj@openbsd.org>
.\" Copyright (c) 2009 Jacek Masiulaniec <jacekm@dobremiasto.net>
@@ -16,7 +16,7 @@
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\"
-.Dd $Mdocdate: September 1 2012 $
+.Dd $Mdocdate: September 17 2012 $
.Dt SMTPD.CONF 5
.Os
.Sh NAME
@@ -69,7 +69,7 @@ resolution of aliases;
%u expands to the user part after aliases
resolution and will typically be the system account;
%d expands to the domain part of the email address;
-%U expands to the user part of the sender email address;
+%A expands to the user part of the sender email address;
%D expands to the domain part of the sender email address.
.Pp
Additional configuration files can be included with the