git: 2fb4f839f3fc - main - Merge commit '28fbd2825d216dafca4d991ad96d05b312f4f9a3'
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 15 Jan 2023 21:27:34 UTC
The branch main has been updated by gshapiro:
URL: https://cgit.FreeBSD.org/src/commit/?id=2fb4f839f3fc72ce2bab12f9ba4760f97f73e97f
commit 2fb4f839f3fc72ce2bab12f9ba4760f97f73e97f
Merge: 906c312bbf74 28fbd2825d21
Author: Gregory Neil Shapiro <gshapiro@FreeBSD.org>
AuthorDate: 2023-01-15 21:20:22 +0000
Commit: Gregory Neil Shapiro <gshapiro@FreeBSD.org>
CommitDate: 2023-01-15 21:20:22 +0000
Merge commit '28fbd2825d216dafca4d991ad96d05b312f4f9a3'
Merge vendor sendmail 8.17.1 into HEAD
contrib/sendmail/CACerts | 148 ++---
contrib/sendmail/KNOWNBUGS | 8 +
contrib/sendmail/Makefile | 16 +-
contrib/sendmail/PGPKEYS | 177 +++++-
contrib/sendmail/README | 5 -
contrib/sendmail/RELEASE_NOTES | 139 ++++-
contrib/sendmail/cf/README | 79 ++-
contrib/sendmail/cf/cf/Makefile | 29 +-
contrib/sendmail/cf/cf/submit.cf | 39 +-
contrib/sendmail/cf/cf/submit.mc | 3 +
contrib/sendmail/cf/feature/check_cert_altnames.m4 | 2 +-
contrib/sendmail/cf/feature/check_other.m4 | 46 ++
contrib/sendmail/cf/feature/delay_checks.m4 | 2 +-
contrib/sendmail/cf/feature/dnsbl.m4 | 2 +-
contrib/sendmail/cf/feature/enhdnsbl.m4 | 2 +-
contrib/sendmail/cf/feature/nopercenthack.m4 | 2 +-
contrib/sendmail/cf/feature/nouucp.m4 | 2 +-
contrib/sendmail/cf/feature/sts.m4 | 19 +
contrib/sendmail/cf/m4/cfhead.m4 | 8 +-
contrib/sendmail/cf/m4/proto.m4 | 338 +++++++++--
contrib/sendmail/cf/m4/version.m4 | 2 +-
contrib/sendmail/cf/mailer/local.m4 | 2 +-
contrib/sendmail/contrib/AuthRealm.p0 | 17 +-
contrib/sendmail/contrib/cidrexpand | 77 ++-
contrib/sendmail/contrib/doublebounce.pl | 0
contrib/sendmail/contrib/link_hash.sh | 0
contrib/sendmail/contrib/re-mqueue.pl | 0
contrib/sendmail/doc/op/op.me | 216 ++++++-
contrib/sendmail/editmap/editmap.8 | 22 +-
contrib/sendmail/editmap/editmap.c | 13 +-
contrib/sendmail/include/libmilter/mfapi.h | 2 +-
contrib/sendmail/include/libsmdb/smdb.h | 6 +-
contrib/sendmail/include/sendmail/pathnames.h | 2 +-
contrib/sendmail/include/sm/bdb.h | 4 +-
contrib/sendmail/include/sm/conf.h | 1 +
contrib/sendmail/include/sm/gen.h | 12 +
contrib/sendmail/include/sm/ixlen.h | 43 ++
contrib/sendmail/include/sm/notify.h | 5 +-
contrib/sendmail/include/sm/os/sm_os_freebsd.h | 5 +
contrib/sendmail/include/sm/os/sm_os_openbsd.h | 20 +-
contrib/sendmail/include/sm/rpool.h | 10 +-
contrib/sendmail/include/sm/sem.h | 2 +-
contrib/sendmail/include/sm/sendmail.h | 24 +-
contrib/sendmail/include/sm/shm.h | 2 +-
contrib/sendmail/include/sm/sysexits.h | 4 +
contrib/sendmail/include/sm/time.h | 2 -
contrib/sendmail/libmilter/docs/overview.html | 3 +-
.../sendmail/libmilter/docs/smfi_setmlreply.html | 24 +-
contrib/sendmail/libmilter/engine.c | 48 +-
contrib/sendmail/libmilter/listener.c | 26 +-
contrib/sendmail/libmilter/sm_gethost.c | 4 +-
contrib/sendmail/libsm/Makefile.m4 | 12 +-
contrib/sendmail/libsm/cf.c | 3 +-
contrib/sendmail/libsm/clock.c | 79 +--
contrib/sendmail/libsm/config.c | 4 +-
contrib/sendmail/libsm/heap.c | 27 +-
contrib/sendmail/libsm/ilenx.c | 40 ++
contrib/sendmail/libsm/ldap.c | 66 +--
contrib/sendmail/libsm/lowercase.c | 162 ++++++
contrib/sendmail/libsm/makebuf.c | 2 +-
contrib/sendmail/libsm/mbdb.c | 54 +-
contrib/sendmail/libsm/memstat.c | 4 +-
contrib/sendmail/libsm/niprop.c | 20 +-
contrib/sendmail/libsm/notify.c | 65 ++-
contrib/sendmail/libsm/refill.c | 2 +-
contrib/sendmail/libsm/rpool.c | 29 +-
contrib/sendmail/libsm/sem.c | 16 +-
contrib/sendmail/libsm/shm.c | 8 +-
contrib/sendmail/libsm/signal.c | 76 +--
contrib/sendmail/libsm/strcaseeq.c | 114 ++++
contrib/sendmail/libsm/string.c | 3 -
contrib/sendmail/libsm/stringf.c | 2 +-
contrib/sendmail/libsm/t-ixlen.c | 105 ++++
contrib/sendmail/libsm/t-ixlen.sh | 41 ++
contrib/sendmail/libsm/t-notify.c | 128 ++--
contrib/sendmail/libsm/t-qic.c | 31 +-
contrib/sendmail/libsm/t-sem.c | 9 +-
contrib/sendmail/libsm/t-shm.c | 1 +
contrib/sendmail/libsm/t-str2prt.c | 64 ++
contrib/sendmail/libsm/t-streq.c | 77 +++
contrib/sendmail/libsm/t-streq.sh | 29 +
contrib/sendmail/libsm/utf8_valid.c | 104 ++++
contrib/sendmail/libsm/util.c | 60 +-
contrib/sendmail/libsm/uxtext_unquote.c | 204 +++++++
contrib/sendmail/libsm/vasprintf.c | 2 +-
contrib/sendmail/libsm/vfprintf.c | 7 +-
contrib/sendmail/libsm/vprintf.c | 2 +-
contrib/sendmail/libsm/vsnprintf.c | 2 +-
contrib/sendmail/libsm/xleni.c | 43 ++
contrib/sendmail/libsmdb/smcdb.c | 21 +-
contrib/sendmail/libsmdb/smdb2.c | 10 +-
contrib/sendmail/libsmutil/Makefile.m4 | 6 +
contrib/sendmail/libsmutil/cf.c | 3 +
contrib/sendmail/libsmutil/safefile.c | 60 +-
contrib/sendmail/libsmutil/t-lockfile-0.sh | 70 +++
contrib/sendmail/libsmutil/t-lockfile.c | 351 +++++++++++
contrib/sendmail/libsmutil/t-maplock-0.sh | 111 ++++
contrib/sendmail/mail.local/mail.local.c | 114 ++--
contrib/sendmail/mailstats/mailstats.8 | 26 +-
contrib/sendmail/makemap/makemap.c | 69 ++-
contrib/sendmail/praliases/praliases.8 | 6 +-
contrib/sendmail/praliases/praliases.c | 7 +-
contrib/sendmail/rmail/rmail.8 | 30 +-
contrib/sendmail/smrsh/smrsh.c | 4 +-
contrib/sendmail/src/README | 68 ++-
contrib/sendmail/src/TRACEFLAGS | 8 +
contrib/sendmail/src/alias.c | 76 ++-
contrib/sendmail/src/aliases.5 | 66 +--
contrib/sendmail/src/collect.c | 9 +-
contrib/sendmail/src/conf.c | 596 ++++++++++---------
contrib/sendmail/src/conf.h | 4 +-
contrib/sendmail/src/control.c | 23 +-
contrib/sendmail/src/convtime.c | 3 +-
contrib/sendmail/src/daemon.c | 131 ++++-
contrib/sendmail/src/deliver.c | 529 +++++++++++++----
contrib/sendmail/src/domain.c | 106 +++-
contrib/sendmail/src/envelope.c | 57 +-
contrib/sendmail/src/err.c | 77 ++-
contrib/sendmail/src/headers.c | 183 ++++--
contrib/sendmail/src/helpfile | 8 +-
contrib/sendmail/src/macro.c | 22 +-
contrib/sendmail/src/mailq.1 | 36 +-
contrib/sendmail/src/main.c | 278 ++++++---
contrib/sendmail/src/map.c | 643 ++++++++++++---------
contrib/sendmail/src/mci.c | 14 +-
contrib/sendmail/src/milter.c | 96 +--
contrib/sendmail/src/mime.c | 27 +-
contrib/sendmail/src/parseaddr.c | 111 ++--
contrib/sendmail/src/queue.c | 562 +++++++++++-------
contrib/sendmail/src/ratectrl.c | 18 +-
contrib/sendmail/src/readcf.c | 502 ++++++++++------
contrib/sendmail/src/recipient.c | 67 ++-
contrib/sendmail/src/savemail.c | 48 +-
contrib/sendmail/src/sendmail.8 | 359 ++++++------
contrib/sendmail/src/sendmail.h | 188 ++++--
contrib/sendmail/src/sfsasl.c | 34 +-
contrib/sendmail/src/sm_resolve.c | 148 +++--
contrib/sendmail/src/sm_resolve.h | 1 -
contrib/sendmail/src/srvrsmtp.c | 408 +++++++++----
contrib/sendmail/src/stab.c | 25 +-
contrib/sendmail/src/stats.c | 2 +-
contrib/sendmail/src/tls.c | 54 +-
contrib/sendmail/src/tls.h | 29 +-
contrib/sendmail/src/tlsh.c | 11 +-
contrib/sendmail/src/trace.c | 2 +-
contrib/sendmail/src/udb.c | 32 +-
contrib/sendmail/src/usersmtp.c | 347 +++++++----
contrib/sendmail/src/util.c | 232 ++++++--
contrib/sendmail/src/version.c | 2 +-
contrib/sendmail/test/t_dropgid.c | 17 +-
contrib/sendmail/test/t_exclopen.c | 5 +-
contrib/sendmail/test/t_pathconf.c | 6 +-
contrib/sendmail/test/t_seteuid.c | 5 +-
contrib/sendmail/test/t_setgid.c | 15 +-
contrib/sendmail/test/t_setreuid.c | 5 +-
contrib/sendmail/test/t_setuid.c | 3 +-
contrib/sendmail/test/t_snprintf.c | 2 +-
contrib/sendmail/vacation/vacation.1 | 10 +-
contrib/sendmail/vacation/vacation.c | 17 +-
159 files changed, 7657 insertions(+), 2919 deletions(-)
diff --cc contrib/sendmail/Makefile
index daf20f288f8b,000000000000..1cb6b56d6a3b
mode 100644,000000..100644
--- a/contrib/sendmail/Makefile
+++ b/contrib/sendmail/Makefile
@@@ -1,49 -1,0 +1,49 @@@
+# $Id: Makefile.dist,v 8.15 2001-08-23 20:44:39 ca Exp $
+
+SHELL= /bin/sh
+SUBDIRS= libsm libsmutil libsmdb sendmail editmap mail.local \
+ mailstats makemap praliases rmail smrsh vacation
+# libmilter: requires pthread
+BUILD= ./Build
+OPTIONS= $(CONFIG) $(FLAGS)
+
+all: FRC
+ @for x in $(SUBDIRS); \
+ do \
- (cd $$x; echo Making $@ in:; pwd; \
- $(SHELL) $(BUILD) $(OPTIONS)); \
++ (cd $$x && echo Making $@ in: && pwd && \
++ $(SHELL) $(BUILD) $(OPTIONS)) || exit; \
+ done
+
+clean: FRC
+ @for x in $(SUBDIRS); \
+ do \
+ (cd $$x; echo Making $@ in:; pwd; \
+ $(SHELL) $(BUILD) $(OPTIONS) $@); \
+ done
+
+install: FRC
+ @for x in $(SUBDIRS); \
+ do \
- (cd $$x; echo Making $@ in:; pwd; \
- $(SHELL) $(BUILD) $(OPTIONS) $@); \
++ (cd $$x && echo Making $@ in: && pwd && \
++ $(SHELL) $(BUILD) $(OPTIONS) $@) || exit; \
+ done
+
+install-docs: FRC
+ @for x in $(SUBDIRS); \
+ do \
- (cd $$x; echo Making $@ in:; pwd; \
- $(SHELL) $(BUILD) $(OPTIONS) $@); \
++ (cd $$x && echo Making $@ in: && pwd && \
++ $(SHELL) $(BUILD) $(OPTIONS) $@) || exit; \
+ done
+
+fresh: FRC
+ @for x in $(SUBDIRS); \
+ do \
- (cd $$x; echo Making $@ in:; pwd; \
- $(SHELL) $(BUILD) $(OPTIONS) -c); \
++ (cd $$x && echo Making $@ in: && pwd && \
++ $(SHELL) $(BUILD) $(OPTIONS) -c) || exit; \
+ done
+
+$(SUBDIRS): FRC
+ @cd $@; pwd; \
+ $(SHELL) $(BUILD) $(OPTIONS)
+
+FRC:
diff --cc contrib/sendmail/cf/feature/check_other.m4
index 000000000000,fa792243e137..fa792243e137
mode 000000,100644..100644
--- a/contrib/sendmail/cf/feature/check_other.m4
+++ b/contrib/sendmail/cf/feature/check_other.m4
diff --cc contrib/sendmail/cf/feature/sts.m4
index 000000000000,54ffb96a9b9c..54ffb96a9b9c
mode 000000,100644..100644
--- a/contrib/sendmail/cf/feature/sts.m4
+++ b/contrib/sendmail/cf/feature/sts.m4
diff --cc contrib/sendmail/contrib/doublebounce.pl
index dc26ab84f1a7,dc26ab84f1a7..dc26ab84f1a7
mode 100644,100755..100755
--- a/contrib/sendmail/contrib/doublebounce.pl
+++ b/contrib/sendmail/contrib/doublebounce.pl
diff --cc contrib/sendmail/contrib/link_hash.sh
index 7948f69d3a36,7948f69d3a36..7948f69d3a36
mode 100644,100755..100755
--- a/contrib/sendmail/contrib/link_hash.sh
+++ b/contrib/sendmail/contrib/link_hash.sh
diff --cc contrib/sendmail/contrib/re-mqueue.pl
index 9f8d819eb18c,9f8d819eb18c..9f8d819eb18c
mode 100644,100755..100755
--- a/contrib/sendmail/contrib/re-mqueue.pl
+++ b/contrib/sendmail/contrib/re-mqueue.pl
diff --cc contrib/sendmail/include/sm/ixlen.h
index 000000000000,c3090ee07bbe..c3090ee07bbe
mode 000000,100644..100644
--- a/contrib/sendmail/include/sm/ixlen.h
+++ b/contrib/sendmail/include/sm/ixlen.h
diff --cc contrib/sendmail/libsm/ilenx.c
index 000000000000,ef7e7427929a..ef7e7427929a
mode 000000,100644..100644
--- a/contrib/sendmail/libsm/ilenx.c
+++ b/contrib/sendmail/libsm/ilenx.c
diff --cc contrib/sendmail/libsm/lowercase.c
index 000000000000,8448eee5ad40..8448eee5ad40
mode 000000,100644..100644
--- a/contrib/sendmail/libsm/lowercase.c
+++ b/contrib/sendmail/libsm/lowercase.c
diff --cc contrib/sendmail/libsm/strcaseeq.c
index 000000000000,c252d85e53e0..c252d85e53e0
mode 000000,100644..100644
--- a/contrib/sendmail/libsm/strcaseeq.c
+++ b/contrib/sendmail/libsm/strcaseeq.c
diff --cc contrib/sendmail/libsm/t-ixlen.c
index 000000000000,cc29431725a8..cc29431725a8
mode 000000,100644..100644
--- a/contrib/sendmail/libsm/t-ixlen.c
+++ b/contrib/sendmail/libsm/t-ixlen.c
diff --cc contrib/sendmail/libsm/t-ixlen.sh
index 000000000000,6c5cdf771d10..6c5cdf771d10
mode 000000,100755..100755
--- a/contrib/sendmail/libsm/t-ixlen.sh
+++ b/contrib/sendmail/libsm/t-ixlen.sh
diff --cc contrib/sendmail/libsm/t-str2prt.c
index 000000000000,f9baa568c10a..f9baa568c10a
mode 000000,100644..100644
--- a/contrib/sendmail/libsm/t-str2prt.c
+++ b/contrib/sendmail/libsm/t-str2prt.c
diff --cc contrib/sendmail/libsm/t-streq.c
index 000000000000,a193eca5f02d..a193eca5f02d
mode 000000,100644..100644
--- a/contrib/sendmail/libsm/t-streq.c
+++ b/contrib/sendmail/libsm/t-streq.c
diff --cc contrib/sendmail/libsm/t-streq.sh
index 000000000000,7797e3f848f0..7797e3f848f0
mode 000000,100755..100755
--- a/contrib/sendmail/libsm/t-streq.sh
+++ b/contrib/sendmail/libsm/t-streq.sh
diff --cc contrib/sendmail/libsm/utf8_valid.c
index 000000000000,3181eca907b9..3181eca907b9
mode 000000,100644..100644
--- a/contrib/sendmail/libsm/utf8_valid.c
+++ b/contrib/sendmail/libsm/utf8_valid.c
diff --cc contrib/sendmail/libsm/uxtext_unquote.c
index 000000000000,67e77c306048..67e77c306048
mode 000000,100644..100644
--- a/contrib/sendmail/libsm/uxtext_unquote.c
+++ b/contrib/sendmail/libsm/uxtext_unquote.c
diff --cc contrib/sendmail/libsm/xleni.c
index 000000000000,3d0b9d94d24e..3d0b9d94d24e
mode 000000,100644..100644
--- a/contrib/sendmail/libsm/xleni.c
+++ b/contrib/sendmail/libsm/xleni.c
diff --cc contrib/sendmail/libsmutil/t-lockfile-0.sh
index 000000000000,bc4ed311f410..bc4ed311f410
mode 000000,100755..100755
--- a/contrib/sendmail/libsmutil/t-lockfile-0.sh
+++ b/contrib/sendmail/libsmutil/t-lockfile-0.sh
diff --cc contrib/sendmail/libsmutil/t-lockfile.c
index 000000000000,27818a990873..27818a990873
mode 000000,100644..100644
--- a/contrib/sendmail/libsmutil/t-lockfile.c
+++ b/contrib/sendmail/libsmutil/t-lockfile.c
diff --cc contrib/sendmail/libsmutil/t-maplock-0.sh
index 000000000000,1884211baf45..1884211baf45
mode 000000,100755..100755
--- a/contrib/sendmail/libsmutil/t-maplock-0.sh
+++ b/contrib/sendmail/libsmutil/t-maplock-0.sh
diff --cc contrib/sendmail/mail.local/mail.local.c
index f193f9542375,4a0a5582382e..d62f74eadbf1
--- a/contrib/sendmail/mail.local/mail.local.c
+++ b/contrib/sendmail/mail.local/mail.local.c
@@@ -150,10 -146,11 +148,13 @@@ off_t BodyLength
#endif
bool EightBitMime = true; /* advertise 8BITMIME in LMTP */
+ #if USE_EAI
+ bool EAI = true; /* advertise SMTPUTF8 in LMTP */
+ #endif
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 */
@@@ -237,14 -234,16 +238,16 @@@ main(argc, argv
mailerr("421", "Configuration error: _PATH_MAILDIR too large");
sm_exit(EX_CONFIG);
}
+
+ /* HACK: add U to all options - this should be only for USE_EAI */
#if HASHSPOOL
- while ((ch = getopt(argc, argv, "7BbdD:f:h:r:lH:p:ns")) != -1)
- while ((ch = getopt(argc, argv, "7bdD:f:h:r:lH:p:nUV")) != -1)
++ while ((ch = getopt(argc, argv, "7BbdD:f:h:r:lH:p:nsUV")) != -1)
#else /* HASHSPOOL */
- # if _FFR_SPOOL_PATH
- while ((ch = getopt(argc, argv, "7BbdD:f:h:r:lp:s")) != -1)
- # else
- while ((ch = getopt(argc, argv, "7BbdD:f:h:r:ls")) != -1)
- # endif
+ # if _FFR_SPOOL_PATH
- while ((ch = getopt(argc, argv, "7bdD:f:h:r:lp:UV")) != -1)
++ while ((ch = getopt(argc, argv, "7BbdD:f:h:r:lp:sUV")) != -1)
+ # else
- while ((ch = getopt(argc, argv, "7bdD:f:h:r:lUV")) != -1)
++ while ((ch = getopt(argc, argv, "7BbdD:f:h:r:lsUV")) != -1)
+ # endif
#endif /* HASHSPOOL */
{
switch(ch)
@@@ -1351,9 -1362,9 +1378,9 @@@ 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));
+ mailerr("450 4.2.0", "Sync %s: %s", path, sm_errstring(errno));
err3:
#ifdef DEBUG
fprintf(stderr, "reset euid = %d\n", (int) geteuid());
@@@ -1418,10 -1433,14 +1449,14 @@@ err0
/* Attempt to truncate back to pre-write size */
goto err3;
}
- else
+ else if (!nobiff)
notifybiff(biffmsg);
- if (setreuid(0, 0) < 0)
+ if (
+ #if MAIL_LOCAL_TEST
+ (HomeMailFile == NULL || user.mbdb_uid != getuid()) &&
+ #endif
+ setreuid(0, 0) < 0)
{
mailerr("450 4.2.0", "setreuid(0, 0): %s",
sm_errstring(errno));
@@@ -1597,11 -1616,12 +1632,12 @@@ voi
usage()
{
ExitVal = EX_USAGE;
- # if _FFR_SPOOL_PATH
+ /* XXX add U to options for USE_EAI */
+ #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
+ #else
- 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
+ #endif
sm_exit(ExitVal);
}
diff --cc contrib/sendmail/src/sendmail.8
index f525c3e29806,6b10fac4ebc5..14e17a22635e
--- a/contrib/sendmail/src/sendmail.8
+++ b/contrib/sendmail/src/sendmail.8
@@@ -733,11 -739,10 +738,11 @@@ mail(1)
syslog(3),
aliases(5),
mailaddr(7),
-rc(8)
+mail.local(8),
+rc(8),
+rmail(8)
.PP
- DARPA
+ DARPA
Internet Request For Comments
.IR RFC819 ,
.IR RFC821 ,