[Midnightbsd-cvs] src [11156] trunk/contrib/sendmail: fix up some man page entries and default paths
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Wed Jun 27 08:52:35 EDT 2018
Revision: 11156
http://svnweb.midnightbsd.org/src/?rev=11156
Author: laffer1
Date: 2018-06-27 08:52:34 -0400 (Wed, 27 Jun 2018)
Log Message:
-----------
fix up some man page entries and default paths
Modified Paths:
--------------
trunk/contrib/sendmail/cf/m4/cfhead.m4
trunk/contrib/sendmail/cf/sh/makeinfo.sh
trunk/contrib/sendmail/include/sm/os/sm_os_freebsd.h
trunk/contrib/sendmail/mail.local/mail.local.8
trunk/contrib/sendmail/mail.local/mail.local.c
trunk/contrib/sendmail/rmail/rmail.c
trunk/contrib/sendmail/smrsh/smrsh.8
trunk/contrib/sendmail/src/sendmail.8
Modified: trunk/contrib/sendmail/cf/m4/cfhead.m4
===================================================================
--- trunk/contrib/sendmail/cf/m4/cfhead.m4 2018-06-27 12:50:57 UTC (rev 11155)
+++ trunk/contrib/sendmail/cf/m4/cfhead.m4 2018-06-27 12:52:34 UTC (rev 11156)
@@ -9,6 +9,7 @@
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
+# $FreeBSD: stable/10/contrib/sendmail/cf/m4/cfhead.m4 285303 2015-07-09 05:23:17Z gshapiro $
#
######################################################################
@@ -269,7 +270,8 @@
define(`_REC_FULL_AUTH_', `$.$?{auth_type}(user=${auth_authen} $?{auth_author}author=${auth_author} $.mech=${auth_type}')
define(`_REC_HDR_', `$?sfrom $s $.$?_($?s$|from $.$_)')
define(`_REC_END_', `for $u; $|;
- $.$b')
+ $.$b$?g
+ (envelope-from $g)$.')
define(`_REC_TLS_', `(version=${tls_version} cipher=${cipher} bits=${cipher_bits} verify=${verify})$.$?u')
define(`_REC_BY_', `$.by $j ($v/$Z)$?r with $r$. id $i$?{tls_version}')
define(`confRECEIVED_HEADER', `_REC_HDR_
Modified: trunk/contrib/sendmail/cf/sh/makeinfo.sh
===================================================================
--- trunk/contrib/sendmail/cf/sh/makeinfo.sh 2018-06-27 12:50:57 UTC (rev 11155)
+++ trunk/contrib/sendmail/cf/sh/makeinfo.sh 2018-06-27 12:52:34 UTC (rev 11156)
@@ -13,6 +13,8 @@
#
# $Id: makeinfo.sh,v 8.15 2013-11-22 20:51:17 ca Exp $
#
+# $FreeBSD: stable/10/contrib/sendmail/cf/sh/makeinfo.sh 266692 2014-05-26 15:28:28Z gshapiro $
+#
usewhoami=0
usehostname=0
@@ -52,7 +54,7 @@
else
host=`uname -n`
fi
-echo '#####' built by $user@$host on `date`
+echo '#####' built by $user@$host
echo '#####' in `pwd` | sed 's/\/tmp_mnt//'
echo '#####' using $1 as configuration include directory | sed 's/\/tmp_mnt//'
echo "define(\`__HOST__', $host)dnl"
Modified: trunk/contrib/sendmail/include/sm/os/sm_os_freebsd.h
===================================================================
--- trunk/contrib/sendmail/include/sm/os/sm_os_freebsd.h 2018-06-27 12:50:57 UTC (rev 11155)
+++ trunk/contrib/sendmail/include/sm/os/sm_os_freebsd.h 2018-06-27 12:52:34 UTC (rev 11156)
@@ -39,7 +39,3 @@
#ifndef SM_CONF_MSG
# define SM_CONF_MSG 1
#endif /* SM_CONF_MSG */
-
-#ifndef SM_IPNODEBYNAME_FLAGS
-# define SM_IPNODEBYNAME_FLAGS AI_DEFAULT|AI_ALL
-#endif /* SM_IPNODEBYNAME_FLAGS */
Modified: trunk/contrib/sendmail/mail.local/mail.local.8
===================================================================
--- trunk/contrib/sendmail/mail.local/mail.local.8 2018-06-27 12:50:57 UTC (rev 11155)
+++ trunk/contrib/sendmail/mail.local/mail.local.8 2018-06-27 12:52:34 UTC (rev 11156)
@@ -16,9 +16,9 @@
\- store mail in a mailbox
.SH SYNOPSIS
.B mail.local
-.RB [ \-7 "] [" \-b "] [" \-d "] [" \-D
+.RB [ \-7 "] [" \-B "] [" \-b "] [" \-d "] [" \-D
.IR mbdb ]
-.RB [ \-l "] [" \-f
+.RB [ \-l "] [" \-s "] [" \-f
\fIfrom\fR|\fB\-r\fR
.IR from ]
.RB [ \-h
@@ -38,6 +38,9 @@
.B \-7
Do not advertise 8BITMIME support in LMTP mode.
.TP
+.B \-B
+Turn off the attempts to notify the ``biff'' service.
+.TP
.B \-b
Return a permanent error instead of a temporary error
if a mailbox exceeds quota.
@@ -56,6 +59,10 @@
.TP
.B \-l
Turn on LMTP mode.
+.TP
+.B \-s
+Turn off the fsync(2) call that forces the mailbox to be committed
+to disk before returning a "success" status.
.TP
.BI \-r " from"
Specify the sender's name (for backward compatibility).
@@ -131,7 +138,6 @@
.PD
.SH SEE ALSO
mail(1),
-xsend(1),
flock(2),
getservbyname(3),
comsat(8),
@@ -150,3 +156,4 @@
Version 7 AT&T UNIX
as the program
.BR mail .
+.\" $FreeBSD: stable/10/contrib/sendmail/mail.local/mail.local.8 266692 2014-05-26 15:28:28Z gshapiro $
Modified: trunk/contrib/sendmail/mail.local/mail.local.c
===================================================================
--- trunk/contrib/sendmail/mail.local/mail.local.c 2018-06-27 12:50:57 UTC (rev 11155)
+++ trunk/contrib/sendmail/mail.local/mail.local.c 2018-06-27 12:52:34 UTC (rev 11156)
@@ -8,6 +8,8 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
+ * $FreeBSD: stable/10/contrib/sendmail/mail.local/mail.local.c 266692 2014-05-26 15:28:28Z gshapiro $
+ *
*/
#include <sm/gen.h>
@@ -150,6 +152,8 @@
bool EightBitMime = true; /* advertise 8BITMIME in LMTP */
char ErrBuf[10240]; /* error buffer */
int ExitVal = EX_OK; /* sysexits.h error value. */
+bool nobiff = false;
+bool nofsync = false;
bool HoldErrs = false; /* Hold errors in ErrBuf */
bool LMTPMode = false;
bool BounceQuota = false; /* permanent error when over quota */
@@ -234,12 +238,12 @@
sm_exit(EX_CONFIG);
}
#if HASHSPOOL
- while ((ch = getopt(argc, argv, "7bdD:f:h:r:lH:p:n")) != -1)
+ while ((ch = getopt(argc, argv, "7BbdD:f:h:r:lH:p:ns")) != -1)
#else /* HASHSPOOL */
# if _FFR_SPOOL_PATH
- while ((ch = getopt(argc, argv, "7bdD:f:h:r:lp:")) != -1)
+ while ((ch = getopt(argc, argv, "7BbdD:f:h:r:lp:s")) != -1)
# else /* _FFR_SPOOL_PATH */
- while ((ch = getopt(argc, argv, "7bdD:f:h:r:l")) != -1)
+ while ((ch = getopt(argc, argv, "7BbdD:f:h:r:ls")) != -1)
# endif /* _FFR_SPOOL_PATH */
#endif /* HASHSPOOL */
{
@@ -249,6 +253,10 @@
EightBitMime = false;
break;
+ case 'B':
+ nobiff = true;
+ break;
+
case 'b': /* bounce mail when over quota. */
BounceQuota = true;
break;
@@ -284,6 +292,9 @@
LMTPMode = true;
break;
+ case 's':
+ nofsync++;
+ break;
#if HASHSPOOL
case 'H':
@@ -351,7 +362,8 @@
argv += optind;
/* initialize biff structures */
- notifybiff(NULL);
+ if (!nobiff)
+ notifybiff(NULL);
err = sm_mbdb_initialize(mbdbname);
if (err != EX_OK)
@@ -1273,9 +1285,13 @@
/* Get the starting offset of the new message */
curoff = lseek(mbfd, (off_t) 0, SEEK_END);
- (void) sm_snprintf(biffmsg, sizeof(biffmsg), "%s@%lld\n",
- name, (LONGLONG_T) curoff);
+ if (!nobiff)
+ {
+ (void) sm_snprintf(biffmsg, sizeof(biffmsg), "%s@%lld\n",
+ name, (LONGLONG_T) curoff);
+ }
+
/* Copy the message into the file. */
if (lseek(fd, (off_t) 0, SEEK_SET) == (off_t) -1)
{
@@ -1335,7 +1351,7 @@
}
/* Flush to disk, don't wait for update. */
- if (fsync(mbfd) < 0)
+ if (!nofsync && fsync(mbfd) < 0)
{
mailerr("450 4.2.0", "%s: %s", path, sm_errstring(errno));
err3:
@@ -1402,7 +1418,7 @@
/* Attempt to truncate back to pre-write size */
goto err3;
}
- else
+ else if (!nobiff)
notifybiff(biffmsg);
if (setreuid(0, 0) < 0)
@@ -1582,9 +1598,9 @@
{
ExitVal = EX_USAGE;
# if _FFR_SPOOL_PATH
- mailerr(NULL, "usage: mail.local [-7] [-b] [-d] [-l] [-f from|-r from] [-h filename] [-p path] user ...");
+ mailerr(NULL, "usage: mail.local [-7] [-B] [-b] [-d] [-l] [-s] [-f from|-r from] [-h filename] [-p path] user ...");
# else /* _FFR_SPOOL_PATH */
- mailerr(NULL, "usage: mail.local [-7] [-b] [-d] [-l] [-f from|-r from] [-h filename] user ...");
+ mailerr(NULL, "usage: mail.local [-7] [-B] [-b] [-d] [-l] [-s] [-f from|-r from] [-h filename] user ...");
# endif /* _FFR_SPOOL_PATH */
sm_exit(ExitVal);
}
Modified: trunk/contrib/sendmail/rmail/rmail.c
===================================================================
--- trunk/contrib/sendmail/rmail/rmail.c 2018-06-27 12:50:57 UTC (rev 11155)
+++ trunk/contrib/sendmail/rmail/rmail.c 2018-06-27 12:52:34 UTC (rev 11156)
@@ -8,6 +8,8 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
+ * $FreeBSD: stable/10/contrib/sendmail/rmail/rmail.c 266692 2014-05-26 15:28:28Z gshapiro $
+ *
*/
#include <sm/gen.h>
@@ -276,7 +278,11 @@
args[i++] = _PATH_SENDMAIL; /* Build sendmail's argument list. */
args[i++] = "-G"; /* relay submission */
args[i++] = "-oee"; /* No errors, just status. */
+#ifdef QUEUE_ONLY
args[i++] = "-odq"; /* Queue it, don't try to deliver. */
+#else
+ args[i++] = "-odi"; /* Deliver in foreground. */
+#endif
args[i++] = "-oi"; /* Ignore '.' on a line by itself. */
/* set from system and protocol used */
Modified: trunk/contrib/sendmail/smrsh/smrsh.8
===================================================================
--- trunk/contrib/sendmail/smrsh/smrsh.8 2018-06-27 12:50:57 UTC (rev 11155)
+++ trunk/contrib/sendmail/smrsh/smrsh.8 2018-06-27 12:52:34 UTC (rev 11156)
@@ -39,7 +39,7 @@
.I smrsh
limits programs to be in a single directory,
by default
-/usr/adm/sm.bin,
+/usr/libexec/sm.bin,
allowing the system administrator to choose the set of acceptable commands,
and to the shell builtin commands ``exec'', ``exit'', and ``echo''.
It also rejects any commands with the characters
@@ -50,13 +50,12 @@
``"|exec /usr/local/bin/filter || exit 75"''
.PP
Initial pathnames on programs are stripped,
-so forwarding to ``/usr/ucb/vacation'',
-``/usr/bin/vacation'',
+so forwarding to ``/usr/bin/vacation'',
``/home/server/mydir/bin/vacation'',
and
``vacation''
all actually forward to
-``/usr/adm/sm.bin/vacation''.
+``/usr/libexec/sm.bin/vacation''.
.PP
System administrators should be conservative about populating
the sm.bin directory.
@@ -83,10 +82,10 @@
Compilation should be trivial on most systems.
You may need to use \-DSMRSH_PATH=\e"\fIpath\fP\e"
to adjust the default search path
-(defaults to ``/bin:/usr/bin:/usr/ucb'')
+(defaults to ``/bin:/usr/bin'')
and/or \-DSMRSH_CMDDIR=\e"\fIdir\fP\e"
to change the default program directory
-(defaults to ``/usr/adm/sm.bin'').
+(defaults to ``/usr/libexec/sm.bin'').
.SH FILES
/usr/adm/sm.bin \- default directory for restricted programs on most OSs
.PP
@@ -96,3 +95,4 @@
.SH SEE ALSO
sendmail(8)
+.\" $FreeBSD: stable/10/contrib/sendmail/smrsh/smrsh.8 266692 2014-05-26 15:28:28Z gshapiro $
Modified: trunk/contrib/sendmail/src/sendmail.8
===================================================================
--- trunk/contrib/sendmail/src/sendmail.8 2018-06-27 12:50:57 UTC (rev 11155)
+++ trunk/contrib/sendmail/src/sendmail.8 2018-06-27 12:52:34 UTC (rev 11156)
@@ -729,13 +729,13 @@
/var/spool/mqueue/*
temp files
.SH SEE ALSO
-binmail(1),
mail(1),
-rmail(1),
syslog(3),
aliases(5),
mailaddr(7),
-rc(8)
+mail.local(8),
+rc(8),
+rmail(8)
.PP
DARPA
Internet Request For Comments
@@ -753,3 +753,4 @@
.B sendmail
command appeared in
4.2BSD.
+.\" $FreeBSD: stable/10/contrib/sendmail/src/sendmail.8 285303 2015-07-09 05:23:17Z gshapiro $
More information about the Midnightbsd-cvs
mailing list