diff options
-rw-r--r-- | usr.sbin/smtpd/parse.y | 22 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpd.conf.5 | 8 |
2 files changed, 20 insertions, 10 deletions
diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y index 9313ac9e796..3e067ab715a 100644 --- a/usr.sbin/smtpd/parse.y +++ b/usr.sbin/smtpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.104 2012/09/30 17:25:09 chl Exp $ */ +/* $OpenBSD: parse.y,v 1.105 2012/10/04 19:49:53 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -440,29 +440,35 @@ main : QUEUE INTERVAL interval { */ ; -mapsource : PLAIN STRING { +mapsource : SOURCE PLAIN STRING { map->m_src = S_PLAIN; - if (strlcpy(map->m_config, $2, sizeof(map->m_config)) + if (strlcpy(map->m_config, $3, sizeof(map->m_config)) >= sizeof(map->m_config)) err(1, "pathname too long"); } - | DB STRING { + | STRING { + map->m_src = S_PLAIN; + if (strlcpy(map->m_config, $1, sizeof(map->m_config)) + >= sizeof(map->m_config)) + err(1, "pathname too long"); + } + | SOURCE DB STRING { map->m_src = S_DB; - if (strlcpy(map->m_config, $2, sizeof(map->m_config)) + if (strlcpy(map->m_config, $3, sizeof(map->m_config)) >= sizeof(map->m_config)) err(1, "pathname too long"); } /* - | LDAP STRING { + | SOURCE LDAP STRING { map->m_src = S_LDAP; - if (strlcpy(map->m_config, $2, sizeof(map->m_config)) + if (strlcpy(map->m_config, $3, sizeof(map->m_config)) >= sizeof(map->m_config)) err(1, "pathname too long"); } */ ; -mapopt : SOURCE mapsource { } +mapopt : mapsource { } map : MAP STRING { map = map_create(S_NONE, $2); diff --git a/usr.sbin/smtpd/smtpd.conf.5 b/usr.sbin/smtpd/smtpd.conf.5 index 65ee3057e43..0a89acd3a3a 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.66 2012/09/17 18:44:57 gilles Exp $ +.\" $OpenBSD: smtpd.conf.5,v 1.67 2012/10/04 19:49:53 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 17 2012 $ +.Dd $Mdocdate: October 4 2012 $ .Dt SMTPD.CONF 5 .Os .Sh NAME @@ -178,6 +178,10 @@ Mappings are stored in a plain text file using the same format as used to generate .Xr makemap 8 mappings. +If not specified, +.Ar type +defaults to +.It plain . .El .Pp .Ar source |