summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2009-03-08 21:50:34 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2009-03-08 21:50:34 +0000
commit46035cf4a94b5f749bcaa06788de917846b5b927 (patch)
tree25f2ba05ff745fb942146c0aec9bd89aec7ee09f /usr.sbin/smtpd
parent2c1d161f5e1a5663bf24c2b92b93078be1c965ee (diff)
supporting delivery to a mbox that's not in _PATH_MAILDIR is not supported,
if someone comes with good rationale why this is needed, we'll consider it, meanwhile it's more work than it looks like and it brings a lot of pain. discussed with jacekm@ and deraadt@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/parse.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y
index e738e7cc95a..6bffefca9cd 100644
--- a/usr.sbin/smtpd/parse.y
+++ b/usr.sbin/smtpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.25 2009/02/22 11:44:29 form Exp $ */
+/* $OpenBSD: parse.y,v 1.26 2009/03/08 21:50:33 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -39,6 +39,7 @@
#include <event.h>
#include <ifaddrs.h>
#include <limits.h>
+#include <paths.h>
#include <pwd.h>
#include <netdb.h>
#include <stdarg.h>
@@ -664,13 +665,12 @@ action : DELIVER TO MAILDIR STRING {
fatal("pathname too long");
free($4);
}
- | DELIVER TO MBOX STRING {
+ | DELIVER TO MBOX {
rule->r_action = A_MBOX;
- if (strlcpy(rule->r_value.path, $4,
+ if (strlcpy(rule->r_value.path, _PATH_MAILDIR "/%u",
sizeof(rule->r_value.path))
>= sizeof(rule->r_value.path))
fatal("pathname too long");
- free($4);
}
| DELIVER TO MDA STRING {
rule->r_action = A_EXT;