From 0302a3708d33bd3616301dc9572acecee688e8fa Mon Sep 17 00:00:00 2001 From: Jacek Masiulaniec Date: Fri, 5 Jun 2009 23:04:52 +0000 Subject: if path in "deliver to maildir path" is omitted, use ~/Maildir by default; from gilles@ --- usr.sbin/smtpd/parse.y | 11 +++++++++-- usr.sbin/smtpd/smtpd.conf.5 | 9 +++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'usr.sbin') 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 @@ -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 .\" Copyright (c) 2009 Jacek Masiulaniec @@ -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 , -- cgit v1.2.3