summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/sendmail')
-rw-r--r--contrib/sendmail/FREEBSD-upgrade100
-rw-r--r--contrib/sendmail/cf/m4/cfhead.m44
-rw-r--r--contrib/sendmail/cf/sh/makeinfo.sh4
-rw-r--r--contrib/sendmail/mail.local/mail.local.818
-rw-r--r--contrib/sendmail/mail.local/mail.local.c32
-rw-r--r--contrib/sendmail/rmail/rmail.c6
-rw-r--r--contrib/sendmail/smrsh/smrsh.812
-rw-r--r--contrib/sendmail/smrsh/smrsh.c1
-rw-r--r--contrib/sendmail/src/conf.c5
-rw-r--r--contrib/sendmail/src/conf.h3
-rw-r--r--contrib/sendmail/src/headers.c9
-rw-r--r--contrib/sendmail/src/mci.c11
-rw-r--r--contrib/sendmail/src/savemail.c12
-rw-r--r--contrib/sendmail/src/sendmail.87
14 files changed, 182 insertions, 42 deletions
diff --git a/contrib/sendmail/FREEBSD-upgrade b/contrib/sendmail/FREEBSD-upgrade
new file mode 100644
index 0000000..9674904
--- /dev/null
+++ b/contrib/sendmail/FREEBSD-upgrade
@@ -0,0 +1,100 @@
+$FreeBSD$
+
+sendmail 8.13.6
+ originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/
+
+For the import of sendmail, the following files were removed:
+
+ Build
+ cf/cf/Build
+ cf/cf/generic-*.cf
+ devtools/*
+ doc/op/op.ps
+ */Build
+ [e-v]*/*.0
+ sendmail/makesendmail
+ sendmail/sysexits.h
+
+The following directories were renamed:
+
+ sendmail -> src
+
+Imported using:
+
+ cvs import -m 'Import sendmail 8.13.6' \
+ src/contrib/sendmail SENDMAIL v8_13_6
+
+After importing, bump the version of src/etc/sendmail/freebsd*mc
+so mergemaster will merge /etc/mail/freebsd*cf:
+
+ cvs commit -f src/etc/sendmail/freebsd*mc
+
+To make local changes to sendmail, simply patch and commit to the main
+branch (aka HEAD). Never make local changes on the vendor (SENDMAIL)
+branch.
+
+All local changes should be submitted to the Sendmail Consortium
+<sendmail@sendmail.org> for inclusion in the next vendor release.
+
+The following files make up the sendmail build/install/runtime
+infrastructure in FreeBSD:
+
+ Makefile.inc1
+ bin/Makefile
+ bin/rmail/Makefile
+ contrib/sendmail/
+ etc/Makefile
+ etc/defaults/make.conf (RELENG_4)
+ etc/defaults/periodic.conf
+ etc/defaults/rc.conf
+ etc/mail/Makefile
+ etc/mail/README
+ etc/mail/access.sample
+ etc/mail/aliases
+ etc/mail/mailer.conf
+ etc/mail/mailertable.sample
+ etc/mail/virtusertable.sample
+ etc/mtree/BSD.include.dist
+ etc/mtree/BSD.sendmail.dist
+ etc/mtree/BSD.usr.dist
+ etc/mtree/BSD.var.dist
+ etc/periodic/daily/440.status-mailq
+ etc/periodic/daily/500.queuerun
+ etc/rc
+ etc/rc.sendmail
+ etc/sendmail/Makefile
+ etc/sendmail/freebsd.mc
+ etc/sendmail/freebsd.submit.mc
+ etc/sendmail/freefall.mc
+ lib/Makefile
+ lib/libmilter/Makefile
+ lib/libsm/Makefile
+ lib/libsmdb/Makefile
+ lib/libsmutil/Makefile
+ libexec/Makefile
+ libexec/mail.local/Makefile
+ libexec/smrsh/Makefile
+ share/Makefile
+ share/doc/smm/Makefile
+ share/doc/smm/08.sendmailop/Makefile
+ share/examples/etc/make.conf (HEAD)
+ share/man/man5/make.conf.5
+ share/man/man5/periodic.conf.5
+ share/man/man5/rc.conf.5
+ share/man/man7/hier.7
+ share/man/man8/Makefile
+ share/man/man8/rc.sendmail.8
+ share/mk/bsd.libnames.mk
+ share/sendmail/Makefile
+ usr.bin/Makefile
+ usr.bin/vacation/Makefile
+ usr.sbin/Makefile
+ usr.sbin/editmap/Makefile
+ usr.sbin/mailstats/Makefile
+ usr.sbin/makemap/Makefile
+ usr.sbin/praliases/Makefile
+ usr.sbin/sendmail/Makefile
+ usr.sbin/mailwrapper/Makefile
+
+gshapiro@FreeBSD.org
+12-April-2006
diff --git a/contrib/sendmail/cf/m4/cfhead.m4 b/contrib/sendmail/cf/m4/cfhead.m4
index 9ccaa24..dc1d8ba 100644
--- a/contrib/sendmail/cf/m4/cfhead.m4
+++ b/contrib/sendmail/cf/m4/cfhead.m4
@@ -9,6 +9,7 @@
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
+# $FreeBSD$
#
######################################################################
@@ -268,7 +269,8 @@ define(`_REC_AUTH_', `$.$?{auth_type}(authenticated')
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_
diff --git a/contrib/sendmail/cf/sh/makeinfo.sh b/contrib/sendmail/cf/sh/makeinfo.sh
index d38fd52..e7b0cd1 100644
--- a/contrib/sendmail/cf/sh/makeinfo.sh
+++ b/contrib/sendmail/cf/sh/makeinfo.sh
@@ -13,6 +13,8 @@
#
# $Id: makeinfo.sh,v 8.14 1999/02/07 07:26:25 gshapiro Exp $
#
+# $FreeBSD$
+#
usewhoami=0
usehostname=0
@@ -52,7 +54,7 @@ then
else
host=`uname -n`
fi
-echo '#####' built by $user@$host on `date`
+echo '#####' built by $user@$host on `LC_ALL=C LC_TIME=C date`
echo '#####' in `pwd` | sed 's/\/tmp_mnt//'
echo '#####' using $1 as configuration include directory | sed 's/\/tmp_mnt//'
echo "define(\`__HOST__', $host)dnl"
diff --git a/contrib/sendmail/mail.local/mail.local.8 b/contrib/sendmail/mail.local/mail.local.8
index 0181f16..7811451 100644
--- a/contrib/sendmail/mail.local/mail.local.8
+++ b/contrib/sendmail/mail.local/mail.local.8
@@ -16,9 +16,9 @@ mail.local
\- 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,11 @@ The options are as follows:
.B \-7
Do not advertise 8BITMIME support in LMTP mode.
.TP
+.B \-B
+Turn off the attempts to notify the
+.Dq biff
+service.
+.TP
.B \-b
Return a permanent error instead of a temporary error
if a mailbox exceeds quota.
@@ -56,6 +61,13 @@ Specify the sender's name.
.TP
.B \-l
Turn on LMTP mode.
+.TP
+.B \-s
+Turn off the
+.Xr fsync 2
+call that forces the mailbox to be committed to disk before returning a
+.Dq success
+status.
.TP
.BI \-r " from"
Specify the sender's name (for backward compatibility).
@@ -131,7 +143,6 @@ lock file for a user's default mailbox
.PD
.SH SEE ALSO
mail(1),
-xsend(1),
flock(2),
getservbyname(3),
comsat(8),
@@ -150,3 +161,4 @@ appeared in
Version 7 AT&T UNIX
as the program
.BR mail .
+.\" $FreeBSD$
diff --git a/contrib/sendmail/mail.local/mail.local.c b/contrib/sendmail/mail.local/mail.local.c
index 0da5e7d..b5ccd5b 100644
--- a/contrib/sendmail/mail.local/mail.local.c
+++ b/contrib/sendmail/mail.local/mail.local.c
@@ -8,6 +8,8 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
+ * $FreeBSD$
+ *
*/
#include <sm/gen.h>
@@ -141,6 +143,8 @@ off_t BodyLength;
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 */
@@ -223,9 +227,9 @@ main(argc, argv)
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 */
- while ((ch = getopt(argc, argv, "7bdD:f:h:r:l")) != -1)
+ while ((ch = getopt(argc, argv, "7BbdD:f:h:r:ls")) != -1)
#endif /* HASHSPOOL */
{
switch(ch)
@@ -234,6 +238,10 @@ main(argc, argv)
EightBitMime = false;
break;
+ case 'B':
+ nobiff = true;
+ break;
+
case 'b': /* bounce mail when over quota. */
BounceQuota = true;
break;
@@ -269,6 +277,9 @@ main(argc, argv)
LMTPMode = true;
break;
+ case 's':
+ nofsync++;
+ break;
#if HASHSPOOL
case 'H':
@@ -334,7 +345,8 @@ main(argc, argv)
argv += optind;
/* initialize biff structures */
- notifybiff(NULL);
+ if (!nobiff)
+ notifybiff(NULL);
err = sm_mbdb_initialize(mbdbname);
if (err != EX_OK)
@@ -1256,8 +1268,12 @@ tryagain:
/* 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)
@@ -1318,7 +1334,7 @@ tryagain:
}
/* 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:
@@ -1385,7 +1401,7 @@ err0: (void) setreuid(0, 0);
/* Attempt to truncate back to pre-write size */
goto err3;
}
- else
+ else if (!nobiff)
notifybiff(biffmsg);
if (setreuid(0, 0) < 0)
@@ -1564,7 +1580,7 @@ void
usage()
{
ExitVal = EX_USAGE;
- 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 ...");
sm_exit(ExitVal);
}
diff --git a/contrib/sendmail/rmail/rmail.c b/contrib/sendmail/rmail/rmail.c
index cea291f..5cdc9bb 100644
--- a/contrib/sendmail/rmail/rmail.c
+++ b/contrib/sendmail/rmail/rmail.c
@@ -8,6 +8,8 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
+ * $FreeBSD$
+ *
*/
#include <sm/gen.h>
@@ -276,7 +278,11 @@ main(argc, argv)
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 */
diff --git a/contrib/sendmail/smrsh/smrsh.8 b/contrib/sendmail/smrsh/smrsh.8
index b84c9e2..f0ed01c 100644
--- a/contrib/sendmail/smrsh/smrsh.8
+++ b/contrib/sendmail/smrsh/smrsh.8
@@ -39,7 +39,7 @@ Briefly,
.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 @@ It allows ``||'' and ``&&'' to enable commands like:
``"|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 @@ allows users to run arbitrary programs in their
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 @@ to change the default program directory
.SH SEE ALSO
sendmail(8)
+.\" $FreeBSD$
diff --git a/contrib/sendmail/smrsh/smrsh.c b/contrib/sendmail/smrsh/smrsh.c
index 284ffef..69234b7 100644
--- a/contrib/sendmail/smrsh/smrsh.c
+++ b/contrib/sendmail/smrsh/smrsh.c
@@ -9,6 +9,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
+ * $FreeBSD$
*/
#include <sm/gen.h>
diff --git a/contrib/sendmail/src/conf.c b/contrib/sendmail/src/conf.c
index 1cf447d..573cd1d 100644
--- a/contrib/sendmail/src/conf.c
+++ b/contrib/sendmail/src/conf.c
@@ -9,11 +9,12 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
+ * $FreeBSD$
*/
#include <sendmail.h>
-SM_RCSID("@(#)$Id: conf.c,v 8.1082 2006/03/22 22:49:33 ca Exp $")
+SM_RCSID("@(#)$Id: conf.c,v 8.1081 2006/02/24 02:21:53 ca Exp $")
#include <sendmail/pathnames.h>
#if NEWDB
@@ -2197,7 +2198,7 @@ shouldqueue(pri, ct)
memfree < QueueLowMem)
{
if (tTd(3, 30))
- sm_dprintf("true (memfree=%ld < QueueLowMem=%ld)\n",
+ sm_dprintf("true (memfree=%ld < QueueLowMem)\n",
memfree, QueueLowMem);
return true;
}
diff --git a/contrib/sendmail/src/conf.h b/contrib/sendmail/src/conf.h
index 5e85015..ab23bca 100644
--- a/contrib/sendmail/src/conf.h
+++ b/contrib/sendmail/src/conf.h
@@ -11,6 +11,9 @@
*
*
* $Id: conf.h,v 8.570 2005/12/09 18:37:27 ca Exp $
+ *
+ * $FreeBSD$
+ *
*/
/*
diff --git a/contrib/sendmail/src/headers.c b/contrib/sendmail/src/headers.c
index 8a142d2..0bd0c49 100644
--- a/contrib/sendmail/src/headers.c
+++ b/contrib/sendmail/src/headers.c
@@ -9,11 +9,12 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
+ * $FreeBSD$
*/
#include <sendmail.h>
-SM_RCSID("@(#)$Id: headers.c,v 8.291 2006/03/24 01:01:56 ca Exp $")
+SM_RCSID("@(#)$Id: headers.c,v 8.290 2006/02/25 02:16:52 ca Exp $")
static HDR *allocheader __P((char *, char *, int, SM_RPOOL_T *));
static size_t fix_mime_header __P((HDR *, ENVELOPE *));
@@ -1542,7 +1543,7 @@ crackaddr(addr, e)
** flags -- MIME conversion flags.
**
** Returns:
-** true iff header part was written successfully
+** success
**
** Side Effects:
** none.
@@ -1810,7 +1811,7 @@ putheader(mci, hdr, e, flags)
** mci -- the connection info for output
**
** Returns:
-** true iff header was written successfully
+** success
*/
static bool
@@ -1871,7 +1872,7 @@ put_vanilla_header(h, v, mci)
** e -- the envelope containing the message.
**
** Returns:
-** true iff header field was written successfully
+** success
**
** Side Effects:
** outputs "p" to file "fp".
diff --git a/contrib/sendmail/src/mci.c b/contrib/sendmail/src/mci.c
index 802ab00..dd07449 100644
--- a/contrib/sendmail/src/mci.c
+++ b/contrib/sendmail/src/mci.c
@@ -9,11 +9,12 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
+ * $FreeBSD$
*/
#include <sendmail.h>
-SM_RCSID("@(#)$Id: mci.c,v 8.217 2006/04/18 01:27:36 ca Exp $")
+SM_RCSID("@(#)$Id: mci.c,v 8.216 2005/07/12 22:27:44 ca Exp $")
#if NETINET || NETINET6
# include <arpa/inet.h>
@@ -922,17 +923,9 @@ mci_read_persistent(fp, mci)
char buf[MAXLINE];
if (fp == NULL)
- {
syserr("mci_read_persistent: NULL fp");
- /* NOTREACHED */
- return -1;
- }
if (mci == NULL)
- {
syserr("mci_read_persistent: NULL mci");
- /* NOTREACHED */
- return -1;
- }
if (tTd(56, 93))
{
sm_dprintf("mci_read_persistent: fp=%lx, mci=",
diff --git a/contrib/sendmail/src/savemail.c b/contrib/sendmail/src/savemail.c
index e44f4c1..66141df 100644
--- a/contrib/sendmail/src/savemail.c
+++ b/contrib/sendmail/src/savemail.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2003, 2006 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -9,11 +9,13 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
+ * $FreeBSD$
+ *
*/
#include <sendmail.h>
-SM_RCSID("@(#)$Id: savemail.c,v 8.308 2006/04/18 01:31:33 ca Exp $")
+SM_RCSID("@(#)$Id: savemail.c,v 8.306 2006/02/25 02:16:53 ca Exp $")
static bool errbody __P((MCI *, ENVELOPE *, char *));
static bool pruneroute __P((char *));
@@ -733,7 +735,7 @@ returntosender(msg, returnq, flags, e)
** separator -- any possible MIME separator (unused).
**
** Returns:
-** true iff body was written successfully
+** success
**
** Side Effects:
** Outputs the body of an error message.
@@ -1264,8 +1266,8 @@ errbody(mci, e, separator)
/* Diagnostic-Code: -- actual result from other end */
if (q->q_rstatus != NULL)
{
- if (q->q_mailer == NULL ||
- (p = q->q_mailer->m_diagtype) == NULL)
+ p = q->q_mailer->m_diagtype;
+ if (p == NULL)
p = "smtp";
(void) sm_snprintf(buf, sizeof buf,
"Diagnostic-Code: %s; %.800s",
diff --git a/contrib/sendmail/src/sendmail.8 b/contrib/sendmail/src/sendmail.8
index 2d0284a..65d37b0 100644
--- a/contrib/sendmail/src/sendmail.8
+++ b/contrib/sendmail/src/sendmail.8
@@ -724,13 +724,13 @@ collected statistics
/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
@@ -746,3 +746,4 @@ The
.B sendmail
command appeared in
4.2BSD.
+.\" $FreeBSD$
OpenPOWER on IntegriCloud