From 18a24d76f35229ff7a09e0491dc6872f4bf69011 Mon Sep 17 00:00:00 2001 From: Gilles Chehade Date: Mon, 17 Sep 2012 18:44:58 +0000 Subject: 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@ --- usr.sbin/smtpd/lka_session.c | 8 ++++---- usr.sbin/smtpd/smtpd.conf.5 | 6 +++--- 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 @@ -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 .\" Copyright (c) 2009 Jacek Masiulaniec @@ -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 -- cgit v1.2.3