summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-06-05 23:04:52 +0000
committerJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-06-05 23:04:52 +0000
commit0302a3708d33bd3616301dc9572acecee688e8fa (patch)
tree73115fa7d193a337df968c19ee0a4798e42e4d2b /usr.sbin
parent866cfb4a6a9dc5e8b4268bde45380ccffa85a857 (diff)
if path in "deliver to maildir path" is omitted, use ~/Maildir by
default; from gilles@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/parse.y11
-rw-r--r--usr.sbin/smtpd/smtpd.conf.59
2 files changed, 16 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y
index 02930931d19..c7b8313a27e 100644
--- a/usr.sbin/smtpd/parse.y
+++ b/usr.sbin/smtpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.37 2009/06/02 22:23:35 gilles Exp $ */
+/* $OpenBSD: parse.y,v 1.38 2009/06/05 23:04:51 jacekm Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -719,7 +719,14 @@ conditions : condition {
| '{' condition_list '}'
;
-action : DELIVER TO MAILDIR STRING {
+action : DELIVER TO MAILDIR {
+ rule->r_action = A_MAILDIR;
+ if (strlcpy(rule->r_value.path, "~/Maildir",
+ sizeof(rule->r_value.path)) >=
+ sizeof(rule->r_value.path))
+ fatal("pathname too long");
+ }
+ | DELIVER TO MAILDIR STRING {
rule->r_action = A_MAILDIR;
if (strlcpy(rule->r_value.path, $4,
sizeof(rule->r_value.path)) >=
diff --git a/usr.sbin/smtpd/smtpd.conf.5 b/usr.sbin/smtpd/smtpd.conf.5
index 9d987d418e0..86a6258a250 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.12 2009/05/30 23:53:41 gilles Exp $
+.\" $OpenBSD: smtpd.conf.5,v 1.13 2009/06/05 23:04:51 jacekm 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: May 30 2009 $
+.Dd $Mdocdate: June 5 2009 $
.Dt SMTPD.CONF 5
.Os
.Sh NAME
@@ -229,6 +229,11 @@ may contain format specifiers that are expanded before use,
see the
.Sx EXPANSION
section below.
+If
+.Ar path
+is not provided, then
+.Pa ~/Maildir
+is assumed.
.It Ic deliver to mda Ar program
Message is piped to the specified
.Ar program ,