bin/114195: [patch] make default mail directory for mail.local(8)
configurable
Eugene Grosbein
eugen at grosbein.pp.ru
Sun Jul 1 18:50:02 UTC 2007
>Number: 114195
>Category: bin
>Synopsis: [patch] make default mail directory for mail.local(8) configurable
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Jul 01 18:50:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Eugene Grosbein
>Release: FreeBSD 6.2-STABLE i386
>Organization:
Svyaz Service JSC
>Environment:
System: FreeBSD grosbein.pp.ru 6.2-STABLE FreeBSD 6.2-STABLE #0: Sat Jun 9 01:20:24 KRAST 2007 eu at grosbein.pp.ru:/usr/obj/usr/src/sys/DADV i386
>Description:
mail.local(8) is built without '-p' option (that allows to change
"/var/mail" to another path) for tradidional mailbox layout.
It is built with '-p' only for HASHSPOOL layout type
(see mail.local(8) man page). This restriction is causeless.
>How-To-Repeat:
Try to use stock mail.local with option '-p' to store
mail for distinct e-mail domain to distinct directory,
it won't
>Fix:
This trivial patch compiles support for '-p'
independently of compile time option HASHSPOOL
and corrects manual page.
--- contrib/sendmail/mail.local/mail.local.c.orig Thu Apr 12 11:11:39 2007
+++ contrib/sendmail/mail.local/mail.local.c Mon Jul 2 02:27:17 2007
@@ -231,7 +231,7 @@
#if HASHSPOOL
while ((ch = getopt(argc, argv, "7BbdD:f:h:r:lH:p:ns")) != -1)
#else /* HASHSPOOL */
- while ((ch = getopt(argc, argv, "7BbdD:f:h:r:ls")) != -1)
+ while ((ch = getopt(argc, argv, "7BbdD:f:h:r:p:ls")) != -1)
#endif /* HASHSPOOL */
{
switch(ch)
@@ -283,6 +283,20 @@
nofsync++;
break;
+ case 'p':
+ if (optarg == NULL || *optarg == '\0')
+ {
+ mailerr(NULL, "-p: missing spool path");
+ usage();
+ }
+ if (sm_strlcpy(SpoolPath, optarg, sizeof(SpoolPath)) >=
+ sizeof(SpoolPath))
+ {
+ mailerr(NULL, "-p: invalid spool path");
+ usage();
+ }
+ break;
+
#if HASHSPOOL
case 'H':
if (optarg == NULL || *optarg == '\0')
@@ -315,20 +329,6 @@
if ((HashDepth <= 0) || ((HashDepth * 2) >= MAXPATHLEN))
{
mailerr(NULL, "-H: invalid hash depth");
- usage();
- }
- break;
-
- case 'p':
- if (optarg == NULL || *optarg == '\0')
- {
- mailerr(NULL, "-p: missing spool path");
- usage();
- }
- if (sm_strlcpy(SpoolPath, optarg, sizeof(SpoolPath)) >=
- sizeof(SpoolPath))
- {
- mailerr(NULL, "-p: invalid spool path");
usage();
}
break;
--- contrib/sendmail/mail.local/mail.local.8.orig Mon Jul 2 02:29:31 2007
+++ contrib/sendmail/mail.local/mail.local.8 Mon Jul 2 02:30:36 2007
@@ -76,6 +76,9 @@
.BI \-h " filename"
Store incoming mail in \fIfilename\fR in the user's home directory instead
of a system mail spool directory.
+.TP
+.BI \-p " path"
+Specify an alternate mail spool path.
.PP
The next options are only available if
.B mail.local
@@ -92,9 +95,6 @@
.BI \-H " u2"
selects user name hashing with a hash depth of 2.
Note: there must be no space between the hash type and the depth.
-.TP
-.BI \-p " path"
-Specify an alternate mail spool path.
.TP
.BI \-n
Specify that the domain part of recipient addresses in LMTP mode
Eugene Grosbein
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list