aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1999-01-12 12:26:57 +0000
committerPeter Wemm <peter@FreeBSD.org>1999-01-12 12:26:57 +0000
commit065a643db393fd78e62e8b414b4789e13fbdb5ae (patch)
tree8d45e99e5e320ab4e55408b355a04b2be475a0ed
parentc2aa98e247e56d5266d789dfc9b90b524b0019fe (diff)
downloadsrc-065a643db393fd78e62e8b414b4789e13fbdb5ae.tar.gz
src-065a643db393fd78e62e8b414b4789e13fbdb5ae.zip
Import sendmail-8.9.2 onto vendor branch (update from 8.9.1)
Obtained from: ftp.sendamil.org
Notes
Notes: svn path=/vendor/sendmail/dist/; revision=42575
-rw-r--r--contrib/sendmail/BuildTools/M4/depend/BSD.m42
-rw-r--r--contrib/sendmail/BuildTools/M4/depend/CC-M.m42
-rw-r--r--contrib/sendmail/BuildTools/M4/depend/NCR.m42
-rw-r--r--contrib/sendmail/BuildTools/M4/depend/Solaris.m42
-rw-r--r--contrib/sendmail/BuildTools/M4/depend/X11.m42
-rw-r--r--contrib/sendmail/BuildTools/M4/depend/generic.m42
-rw-r--r--contrib/sendmail/BuildTools/M4/header.m42
-rw-r--r--contrib/sendmail/BuildTools/OS/386BSD2
-rw-r--r--contrib/sendmail/BuildTools/OS/A-UX2
-rw-r--r--contrib/sendmail/BuildTools/OS/AIX2
-rw-r--r--contrib/sendmail/BuildTools/OS/AIX.22
-rw-r--r--contrib/sendmail/BuildTools/OS/AIX.4.24
-rw-r--r--contrib/sendmail/BuildTools/OS/AIX.4.34
-rw-r--r--contrib/sendmail/BuildTools/OS/AIX.4.x4
-rw-r--r--contrib/sendmail/BuildTools/OS/Altos2
-rw-r--r--contrib/sendmail/BuildTools/OS/BSD-OS2
-rw-r--r--contrib/sendmail/BuildTools/OS/BSD432
-rw-r--r--contrib/sendmail/BuildTools/OS/CLIX2
-rw-r--r--contrib/sendmail/BuildTools/OS/CRAYT3E.2.0.x2
-rw-r--r--contrib/sendmail/BuildTools/OS/CSOS2
-rw-r--r--contrib/sendmail/BuildTools/OS/ConvexOS2
-rw-r--r--contrib/sendmail/BuildTools/OS/Dell2
-rw-r--r--contrib/sendmail/BuildTools/OS/DomainOS2
-rw-r--r--contrib/sendmail/BuildTools/OS/DomainOS.10.42
-rw-r--r--contrib/sendmail/BuildTools/OS/Dynix2
-rw-r--r--contrib/sendmail/BuildTools/OS/EWS-UX_V2
-rw-r--r--contrib/sendmail/BuildTools/OS/FreeBSD2
-rw-r--r--contrib/sendmail/BuildTools/OS/HP-UX2
-rw-r--r--contrib/sendmail/BuildTools/OS/HP-UX.10.x2
-rw-r--r--contrib/sendmail/BuildTools/OS/HP-UX.11.x2
-rw-r--r--contrib/sendmail/BuildTools/OS/IRIX2
-rw-r--r--contrib/sendmail/BuildTools/OS/IRIX.5.x2
-rw-r--r--contrib/sendmail/BuildTools/OS/IRIX.6.52
-rw-r--r--contrib/sendmail/BuildTools/OS/IRIX.6.x2
-rw-r--r--contrib/sendmail/BuildTools/OS/IRIX64.6.02
-rw-r--r--contrib/sendmail/BuildTools/OS/IRIX64.6.12
-rw-r--r--contrib/sendmail/BuildTools/OS/IRIX64.6.535
-rw-r--r--contrib/sendmail/BuildTools/OS/IRIX64.6.x2
-rw-r--r--contrib/sendmail/BuildTools/OS/ISC2
-rw-r--r--contrib/sendmail/BuildTools/OS/KSR2
-rw-r--r--contrib/sendmail/BuildTools/OS/LUNA2
-rw-r--r--contrib/sendmail/BuildTools/OS/Linux2
-rw-r--r--contrib/sendmail/BuildTools/OS/Linux.ppc2
-rw-r--r--contrib/sendmail/BuildTools/OS/Mach3862
-rw-r--r--contrib/sendmail/BuildTools/OS/NCR.MP-RAS.2.x2
-rw-r--r--contrib/sendmail/BuildTools/OS/NCR.MP-RAS.3.x4
-rw-r--r--contrib/sendmail/BuildTools/OS/NEWS-OS.4.x2
-rw-r--r--contrib/sendmail/BuildTools/OS/NEWS-OS.6.x2
-rw-r--r--contrib/sendmail/BuildTools/OS/NEXTSTEP.4.x2
-rw-r--r--contrib/sendmail/BuildTools/OS/NeXT.2.x2
-rw-r--r--contrib/sendmail/BuildTools/OS/NeXT.3.x2
-rw-r--r--contrib/sendmail/BuildTools/OS/NeXT.4.x4
-rw-r--r--contrib/sendmail/BuildTools/OS/NetBSD2
-rw-r--r--contrib/sendmail/BuildTools/OS/NetBSD.8.32
-rw-r--r--contrib/sendmail/BuildTools/OS/NonStop-UX2
-rw-r--r--contrib/sendmail/BuildTools/OS/OSF12
-rw-r--r--contrib/sendmail/BuildTools/OS/OpenBSD2
-rw-r--r--contrib/sendmail/BuildTools/OS/PTX2
-rw-r--r--contrib/sendmail/BuildTools/OS/Paragon2
-rw-r--r--contrib/sendmail/BuildTools/OS/PowerUX2
-rw-r--r--contrib/sendmail/BuildTools/OS/QNX2
-rw-r--r--contrib/sendmail/BuildTools/OS/RISCos2
-rw-r--r--contrib/sendmail/BuildTools/OS/RISCos.4_02
-rw-r--r--contrib/sendmail/BuildTools/OS/Rhapsody16
-rw-r--r--contrib/sendmail/BuildTools/OS/SCO2
-rw-r--r--contrib/sendmail/BuildTools/OS/SCO.4.22
-rw-r--r--contrib/sendmail/BuildTools/OS/SCO.5.x2
-rw-r--r--contrib/sendmail/BuildTools/OS/SINIX2
-rw-r--r--contrib/sendmail/BuildTools/OS/SVR42
-rw-r--r--contrib/sendmail/BuildTools/OS/SunOS2
-rw-r--r--contrib/sendmail/BuildTools/OS/SunOS.4.02
-rw-r--r--contrib/sendmail/BuildTools/OS/SunOS.5.12
-rw-r--r--contrib/sendmail/BuildTools/OS/SunOS.5.22
-rw-r--r--contrib/sendmail/BuildTools/OS/SunOS.5.32
-rw-r--r--contrib/sendmail/BuildTools/OS/SunOS.5.42
-rw-r--r--contrib/sendmail/BuildTools/OS/SunOS.5.52
-rw-r--r--contrib/sendmail/BuildTools/OS/SunOS.5.62
-rw-r--r--contrib/sendmail/BuildTools/OS/SunOS.5.72
-rw-r--r--contrib/sendmail/BuildTools/OS/Titan2
-rw-r--r--contrib/sendmail/BuildTools/OS/ULTRIX4
-rw-r--r--contrib/sendmail/BuildTools/OS/UMAX2
-rw-r--r--contrib/sendmail/BuildTools/OS/UNICOS2
-rw-r--r--contrib/sendmail/BuildTools/OS/UNIX_SV.4.x.i3862
-rw-r--r--contrib/sendmail/BuildTools/OS/UX48002
-rw-r--r--contrib/sendmail/BuildTools/OS/UXPDS.V102
-rw-r--r--contrib/sendmail/BuildTools/OS/UXPDS.V202
-rw-r--r--contrib/sendmail/BuildTools/OS/UnixWare.5.i38618
-rw-r--r--contrib/sendmail/BuildTools/OS/dcosx.1.x.NILE2
-rw-r--r--contrib/sendmail/BuildTools/OS/dgux2
-rw-r--r--contrib/sendmail/BuildTools/OS/maxion2
-rw-r--r--contrib/sendmail/BuildTools/OS/uts.systemV2
-rw-r--r--contrib/sendmail/BuildTools/README2
-rw-r--r--contrib/sendmail/BuildTools/Site/README2
-rwxr-xr-xcontrib/sendmail/BuildTools/bin/Build2
-rw-r--r--contrib/sendmail/BuildTools/bin/configure.sh2
-rwxr-xr-xcontrib/sendmail/BuildTools/bin/find_m4.sh2
-rwxr-xr-xcontrib/sendmail/BuildTools/bin/install.sh2
-rw-r--r--contrib/sendmail/KNOWNBUGS14
-rw-r--r--contrib/sendmail/LICENSE2
-rw-r--r--contrib/sendmail/Makefile2
-rw-r--r--contrib/sendmail/README14
-rw-r--r--contrib/sendmail/RELEASE_NOTES180
-rw-r--r--contrib/sendmail/cf/README89
-rwxr-xr-xcontrib/sendmail/cf/cf/Build2
-rw-r--r--contrib/sendmail/cf/cf/Makefile2
-rw-r--r--contrib/sendmail/cf/cf/chez.cs.mc2
-rw-r--r--contrib/sendmail/cf/cf/clientproto.mc2
-rw-r--r--contrib/sendmail/cf/cf/cs-hpux10.mc2
-rw-r--r--contrib/sendmail/cf/cf/cs-hpux9.mc2
-rw-r--r--contrib/sendmail/cf/cf/cs-osf1.mc2
-rw-r--r--contrib/sendmail/cf/cf/cs-solaris2.mc2
-rw-r--r--contrib/sendmail/cf/cf/cs-sunos4.1.mc2
-rw-r--r--contrib/sendmail/cf/cf/cs-ultrix4.mc2
-rw-r--r--contrib/sendmail/cf/cf/generic-bsd4.4.mc2
-rw-r--r--contrib/sendmail/cf/cf/generic-hpux10.mc2
-rw-r--r--contrib/sendmail/cf/cf/generic-hpux9.mc2
-rw-r--r--contrib/sendmail/cf/cf/generic-nextstep3.3.mc2
-rw-r--r--contrib/sendmail/cf/cf/generic-osf1.mc2
-rw-r--r--contrib/sendmail/cf/cf/generic-solaris2.mc2
-rw-r--r--contrib/sendmail/cf/cf/generic-sunos4.1.mc2
-rw-r--r--contrib/sendmail/cf/cf/generic-ultrix4.mc2
-rw-r--r--contrib/sendmail/cf/cf/huginn.cs.mc2
-rw-r--r--contrib/sendmail/cf/cf/knecht.mc2
-rw-r--r--contrib/sendmail/cf/cf/mail.cs.mc2
-rw-r--r--contrib/sendmail/cf/cf/mail.eecs.mc2
-rw-r--r--contrib/sendmail/cf/cf/mailspool.cs.mc2
-rw-r--r--contrib/sendmail/cf/cf/python.cs.mc2
-rw-r--r--contrib/sendmail/cf/cf/s2k-osf1.mc2
-rw-r--r--contrib/sendmail/cf/cf/s2k-ultrix4.mc2
-rw-r--r--contrib/sendmail/cf/cf/tcpproto.mc2
-rw-r--r--contrib/sendmail/cf/cf/ucbarpa.mc2
-rw-r--r--contrib/sendmail/cf/cf/ucbvax.mc2
-rw-r--r--contrib/sendmail/cf/cf/uucpproto.mc2
-rw-r--r--contrib/sendmail/cf/cf/vangogh.cs.mc2
-rw-r--r--contrib/sendmail/cf/domain/Berkeley.EDU.m42
-rw-r--r--contrib/sendmail/cf/domain/CS.Berkeley.EDU.m42
-rw-r--r--contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m42
-rw-r--r--contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m42
-rw-r--r--contrib/sendmail/cf/domain/berkeley-only.m42
-rw-r--r--contrib/sendmail/cf/domain/generic.m42
-rw-r--r--contrib/sendmail/cf/feature/accept_unqualified_senders.m42
-rw-r--r--contrib/sendmail/cf/feature/accept_unresolvable_domains.m42
-rw-r--r--contrib/sendmail/cf/feature/access_db.m42
-rw-r--r--contrib/sendmail/cf/feature/allmasquerade.m42
-rw-r--r--contrib/sendmail/cf/feature/always_add_domain.m42
-rw-r--r--contrib/sendmail/cf/feature/bestmx_is_local.m44
-rw-r--r--contrib/sendmail/cf/feature/bitdomain.m48
-rw-r--r--contrib/sendmail/cf/feature/blacklist_recipients.m42
-rw-r--r--contrib/sendmail/cf/feature/domaintable.m49
-rw-r--r--contrib/sendmail/cf/feature/genericstable.m48
-rw-r--r--contrib/sendmail/cf/feature/limited_masquerade.m42
-rw-r--r--contrib/sendmail/cf/feature/local_lmtp.m42
-rw-r--r--contrib/sendmail/cf/feature/local_procmail.m42
-rw-r--r--contrib/sendmail/cf/feature/loose_relay_check.m42
-rw-r--r--contrib/sendmail/cf/feature/mailertable.m48
-rw-r--r--contrib/sendmail/cf/feature/masquerade_entire_domain.m42
-rw-r--r--contrib/sendmail/cf/feature/masquerade_envelope.m42
-rw-r--r--contrib/sendmail/cf/feature/nocanonify.m42
-rw-r--r--contrib/sendmail/cf/feature/nodns.m44
-rw-r--r--contrib/sendmail/cf/feature/notsticky.m42
-rw-r--r--contrib/sendmail/cf/feature/nouucp.m42
-rw-r--r--contrib/sendmail/cf/feature/nullclient.m42
-rw-r--r--contrib/sendmail/cf/feature/promiscuous_relay.m42
-rw-r--r--contrib/sendmail/cf/feature/rbl.m42
-rw-r--r--contrib/sendmail/cf/feature/redirect.m42
-rw-r--r--contrib/sendmail/cf/feature/relay_based_on_MX.m42
-rw-r--r--contrib/sendmail/cf/feature/relay_entire_domain.m42
-rw-r--r--contrib/sendmail/cf/feature/relay_hosts_only.m42
-rw-r--r--contrib/sendmail/cf/feature/relay_local_from.m42
-rw-r--r--contrib/sendmail/cf/feature/smrsh.m42
-rw-r--r--contrib/sendmail/cf/feature/stickyhost.m42
-rw-r--r--contrib/sendmail/cf/feature/use_ct_file.m42
-rw-r--r--contrib/sendmail/cf/feature/use_cw_file.m42
-rw-r--r--contrib/sendmail/cf/feature/uucpdomain.m48
-rw-r--r--contrib/sendmail/cf/feature/virtusertable.m48
-rw-r--r--contrib/sendmail/cf/hack/cssubdomain.m42
-rw-r--r--contrib/sendmail/cf/m4/cf.m42
-rw-r--r--contrib/sendmail/cf/m4/cfhead.m46
-rw-r--r--contrib/sendmail/cf/m4/nullrelay.m42
-rw-r--r--contrib/sendmail/cf/m4/proto.m4121
-rw-r--r--contrib/sendmail/cf/m4/version.m44
-rw-r--r--contrib/sendmail/cf/mailer/cyrus.m42
-rw-r--r--contrib/sendmail/cf/mailer/fax.m42
-rw-r--r--contrib/sendmail/cf/mailer/local.m42
-rw-r--r--contrib/sendmail/cf/mailer/mail11.m42
-rw-r--r--contrib/sendmail/cf/mailer/phquery.m42
-rw-r--r--contrib/sendmail/cf/mailer/pop.m42
-rw-r--r--contrib/sendmail/cf/mailer/procmail.m42
-rw-r--r--contrib/sendmail/cf/mailer/smtp.m42
-rw-r--r--contrib/sendmail/cf/mailer/usenet.m42
-rw-r--r--contrib/sendmail/cf/mailer/uucp.m42
-rw-r--r--contrib/sendmail/cf/ostype/aix2.m42
-rw-r--r--contrib/sendmail/cf/ostype/aix3.m42
-rw-r--r--contrib/sendmail/cf/ostype/aix4.m42
-rw-r--r--contrib/sendmail/cf/ostype/altos.m46
-rw-r--r--contrib/sendmail/cf/ostype/amdahl-uts.m48
-rw-r--r--contrib/sendmail/cf/ostype/aux.m46
-rw-r--r--contrib/sendmail/cf/ostype/bsd4.3.m42
-rw-r--r--contrib/sendmail/cf/ostype/bsd4.4.m46
-rw-r--r--contrib/sendmail/cf/ostype/bsdi1.0.m42
-rw-r--r--contrib/sendmail/cf/ostype/bsdi2.0.m42
-rw-r--r--contrib/sendmail/cf/ostype/dgux.m42
-rw-r--r--contrib/sendmail/cf/ostype/domainos.m46
-rw-r--r--contrib/sendmail/cf/ostype/dynix3.2.m44
-rw-r--r--contrib/sendmail/cf/ostype/gnuhurd.m46
-rw-r--r--contrib/sendmail/cf/ostype/hpux10.m46
-rw-r--r--contrib/sendmail/cf/ostype/hpux9.m46
-rw-r--r--contrib/sendmail/cf/ostype/irix4.m46
-rw-r--r--contrib/sendmail/cf/ostype/irix5.m48
-rw-r--r--contrib/sendmail/cf/ostype/irix6.m48
-rw-r--r--contrib/sendmail/cf/ostype/isc4.1.m48
-rw-r--r--contrib/sendmail/cf/ostype/linux.m42
-rw-r--r--contrib/sendmail/cf/ostype/maxion.m48
-rw-r--r--contrib/sendmail/cf/ostype/mklinux.m44
-rw-r--r--contrib/sendmail/cf/ostype/nextstep.m48
-rw-r--r--contrib/sendmail/cf/ostype/osf1.m48
-rw-r--r--contrib/sendmail/cf/ostype/powerux.m46
-rw-r--r--contrib/sendmail/cf/ostype/ptx2.m48
-rw-r--r--contrib/sendmail/cf/ostype/qnx.m44
-rw-r--r--contrib/sendmail/cf/ostype/riscos4.5.m46
-rw-r--r--contrib/sendmail/cf/ostype/sco-uw-2.1.m48
-rw-r--r--contrib/sendmail/cf/ostype/sco3.2.m46
-rw-r--r--contrib/sendmail/cf/ostype/sinix.m48
-rw-r--r--contrib/sendmail/cf/ostype/solaris2.m48
-rw-r--r--contrib/sendmail/cf/ostype/solaris2.ml.m48
-rw-r--r--contrib/sendmail/cf/ostype/sunos3.5.m42
-rw-r--r--contrib/sendmail/cf/ostype/sunos4.1.m42
-rw-r--r--contrib/sendmail/cf/ostype/svr4.m48
-rw-r--r--contrib/sendmail/cf/ostype/ultrix4.m42
-rw-r--r--contrib/sendmail/cf/ostype/unixware7.m416
-rw-r--r--contrib/sendmail/cf/ostype/unknown.m42
-rw-r--r--contrib/sendmail/cf/ostype/uxpds.m48
-rw-r--r--contrib/sendmail/cf/sh/makeinfo.sh2
-rwxr-xr-xcontrib/sendmail/contrib/smcontrol.pl361
-rw-r--r--contrib/sendmail/doc/changes/Makefile2
-rw-r--r--contrib/sendmail/doc/changes/changes.me2
-rw-r--r--contrib/sendmail/doc/intro/Makefile2
-rw-r--r--contrib/sendmail/doc/intro/intro.me2
-rw-r--r--contrib/sendmail/doc/op/Makefile2
-rw-r--r--contrib/sendmail/doc/op/op.me44
-rw-r--r--contrib/sendmail/doc/usenix/Makefile2
-rw-r--r--contrib/sendmail/doc/usenix/usenix.me2
-rw-r--r--contrib/sendmail/mail.local/Makefile.m46
-rw-r--r--contrib/sendmail/mail.local/README2
-rw-r--r--contrib/sendmail/mail.local/mail.local.82
-rw-r--r--contrib/sendmail/mail.local/mail.local.c128
-rw-r--r--contrib/sendmail/mail.local/pathnames.h2
-rw-r--r--contrib/sendmail/mailstats/Makefile.m46
-rw-r--r--contrib/sendmail/mailstats/mailstats.818
-rw-r--r--contrib/sendmail/mailstats/mailstats.c60
-rw-r--r--contrib/sendmail/makemap/Makefile.m46
-rw-r--r--contrib/sendmail/makemap/makemap.814
-rw-r--r--contrib/sendmail/makemap/makemap.c85
-rw-r--r--contrib/sendmail/praliases/Makefile.m46
-rw-r--r--contrib/sendmail/praliases/praliases.82
-rw-r--r--contrib/sendmail/praliases/praliases.c237
-rw-r--r--contrib/sendmail/rmail/Makefile.m46
-rw-r--r--contrib/sendmail/rmail/rmail.82
-rw-r--r--contrib/sendmail/rmail/rmail.c6
-rw-r--r--contrib/sendmail/smrsh/Makefile.m46
-rw-r--r--contrib/sendmail/smrsh/README2
-rw-r--r--contrib/sendmail/smrsh/smrsh.82
-rw-r--r--contrib/sendmail/smrsh/smrsh.c2
-rw-r--r--contrib/sendmail/src/Makefile.m411
-rw-r--r--contrib/sendmail/src/README17
-rw-r--r--contrib/sendmail/src/TRACEFLAGS2
-rw-r--r--contrib/sendmail/src/alias.c5
-rw-r--r--contrib/sendmail/src/aliases.52
-rw-r--r--contrib/sendmail/src/arpadate.c2
-rw-r--r--contrib/sendmail/src/clock.c2
-rw-r--r--contrib/sendmail/src/collect.c14
-rw-r--r--contrib/sendmail/src/conf.c265
-rw-r--r--contrib/sendmail/src/conf.h97
-rw-r--r--contrib/sendmail/src/control.c356
-rw-r--r--contrib/sendmail/src/convtime.c2
-rw-r--r--contrib/sendmail/src/daemon.c177
-rw-r--r--contrib/sendmail/src/deliver.c64
-rw-r--r--contrib/sendmail/src/domain.c14
-rw-r--r--contrib/sendmail/src/envelope.c4
-rw-r--r--contrib/sendmail/src/err.c2
-rw-r--r--contrib/sendmail/src/headers.c125
-rw-r--r--contrib/sendmail/src/ldap_map.h4
-rw-r--r--contrib/sendmail/src/macro.c6
-rw-r--r--contrib/sendmail/src/mailq.12
-rw-r--r--contrib/sendmail/src/mailstats.h2
-rw-r--r--contrib/sendmail/src/main.c151
-rw-r--r--contrib/sendmail/src/map.c189
-rw-r--r--contrib/sendmail/src/mci.c12
-rw-r--r--contrib/sendmail/src/mime.c28
-rw-r--r--contrib/sendmail/src/newaliases.12
-rw-r--r--contrib/sendmail/src/parseaddr.c18
-rw-r--r--contrib/sendmail/src/pathnames.h2
-rw-r--r--contrib/sendmail/src/queue.c47
-rw-r--r--contrib/sendmail/src/readcf.c80
-rw-r--r--contrib/sendmail/src/recipient.c18
-rw-r--r--contrib/sendmail/src/safefile.c16
-rw-r--r--contrib/sendmail/src/savemail.c5
-rw-r--r--contrib/sendmail/src/sendmail.87
-rw-r--r--contrib/sendmail/src/sendmail.h27
-rw-r--r--contrib/sendmail/src/sendmail.hf7
-rw-r--r--contrib/sendmail/src/snprintf.c10
-rw-r--r--contrib/sendmail/src/srvrsmtp.c52
-rw-r--r--contrib/sendmail/src/stab.c2
-rw-r--r--contrib/sendmail/src/stats.c2
-rw-r--r--contrib/sendmail/src/sysexits.c2
-rw-r--r--contrib/sendmail/src/trace.c2
-rw-r--r--contrib/sendmail/src/udb.c99
-rw-r--r--contrib/sendmail/src/useful.h2
-rw-r--r--contrib/sendmail/src/usersmtp.c25
-rw-r--r--contrib/sendmail/src/util.c309
-rw-r--r--contrib/sendmail/src/version.c4
-rw-r--r--contrib/sendmail/test/Results2
312 files changed, 3462 insertions, 996 deletions
diff --git a/contrib/sendmail/BuildTools/M4/depend/BSD.m4 b/contrib/sendmail/BuildTools/M4/depend/BSD.m4
index 661f69ec12ec..83827a7a7f6f 100644
--- a/contrib/sendmail/BuildTools/M4/depend/BSD.m4
+++ b/contrib/sendmail/BuildTools/M4/depend/BSD.m4
@@ -1,4 +1,4 @@
-# @(#)BSD.m4 8.3 (Berkeley) 2/9/98
+# @(#)BSD.m4 8.3 (Berkeley) 2/9/1998
depend: ${BEFORE}
@mv Makefile Makefile.old
@sed -e '/^# Do not edit or remove this line or anything below it.$$/,$$d' < Makefile.old > Makefile
diff --git a/contrib/sendmail/BuildTools/M4/depend/CC-M.m4 b/contrib/sendmail/BuildTools/M4/depend/CC-M.m4
index 01d82662b1bc..10d61b8ccebc 100644
--- a/contrib/sendmail/BuildTools/M4/depend/CC-M.m4
+++ b/contrib/sendmail/BuildTools/M4/depend/CC-M.m4
@@ -1,4 +1,4 @@
-# @(#)CC-M.m4 8.2 (Berkeley) 2/19/98
+# @(#)CC-M.m4 8.2 (Berkeley) 2/19/1998
depend: ${BEFORE}
@mv Makefile Makefile.old
@sed -e '/^# Do not edit or remove this line or anything below it.$$/,$$d' < Makefile.old > Makefile
diff --git a/contrib/sendmail/BuildTools/M4/depend/NCR.m4 b/contrib/sendmail/BuildTools/M4/depend/NCR.m4
index 03e0c10dd387..22af77da8b5f 100644
--- a/contrib/sendmail/BuildTools/M4/depend/NCR.m4
+++ b/contrib/sendmail/BuildTools/M4/depend/NCR.m4
@@ -1,4 +1,4 @@
-# @(#)NCR.m4 8.3 (Berkeley) 2/19/98
+# @(#)NCR.m4 8.3 (Berkeley) 2/19/1998
depend: ${BEFORE}
@mv Makefile Makefile.old
@sed -e '/^# Do not edit or remove this line or anything below it.$$/,$$d' < Makefile.old > Makefile
diff --git a/contrib/sendmail/BuildTools/M4/depend/Solaris.m4 b/contrib/sendmail/BuildTools/M4/depend/Solaris.m4
index cbdc618abfc8..bf245f6fa191 100644
--- a/contrib/sendmail/BuildTools/M4/depend/Solaris.m4
+++ b/contrib/sendmail/BuildTools/M4/depend/Solaris.m4
@@ -1,4 +1,4 @@
-# @(#)Solaris.m4 8.1 (Berkeley) 3/5/98
+# @(#)Solaris.m4 8.1 (Berkeley) 3/5/1998
depend: ${BEFORE}
@mv Makefile Makefile.old
@sed -e '/^# Do not edit or remove this line or anything below it.$$/,$$d' < Makefile.old > Makefile
diff --git a/contrib/sendmail/BuildTools/M4/depend/X11.m4 b/contrib/sendmail/BuildTools/M4/depend/X11.m4
index 27f90361f4c3..3afbfe95d821 100644
--- a/contrib/sendmail/BuildTools/M4/depend/X11.m4
+++ b/contrib/sendmail/BuildTools/M4/depend/X11.m4
@@ -1,4 +1,4 @@
-# @(#)X11.m4 8.1 (Berkeley) 4/8/98
+# @(#)X11.m4 8.1 (Berkeley) 4/8/1998
depend: ${BEFORE}
makedepend -- ${COPTS} -- *.c
diff --git a/contrib/sendmail/BuildTools/M4/depend/generic.m4 b/contrib/sendmail/BuildTools/M4/depend/generic.m4
index e7452d9e3297..330d4cf2e072 100644
--- a/contrib/sendmail/BuildTools/M4/depend/generic.m4
+++ b/contrib/sendmail/BuildTools/M4/depend/generic.m4
@@ -1,4 +1,4 @@
-# @(#)generic.m4 8.2 (Berkeley) 2/9/98
+# @(#)generic.m4 8.2 (Berkeley) 2/9/1998
# dependencies
# gross overkill, and yet still not quite enough....
${OBJS}: ${SRCDIR}/sendmail.h ${SRCDIR}/conf.h
diff --git a/contrib/sendmail/BuildTools/M4/header.m4 b/contrib/sendmail/BuildTools/M4/header.m4
index df216bb96714..087cf0e48dce 100644
--- a/contrib/sendmail/BuildTools/M4/header.m4
+++ b/contrib/sendmail/BuildTools/M4/header.m4
@@ -8,7 +8,7 @@
#
# Definitions for Makefile construction for sendmail
#
-# @(#)header.m4 8.14 (Berkeley) 5/19/98
+# @(#)header.m4 8.14 (Berkeley) 5/19/1998
#
changecom(^A)
undefine(`format')
diff --git a/contrib/sendmail/BuildTools/OS/386BSD b/contrib/sendmail/BuildTools/OS/386BSD
index 34af745c8a57..cb6ea87a796a 100644
--- a/contrib/sendmail/BuildTools/OS/386BSD
+++ b/contrib/sendmail/BuildTools/OS/386BSD
@@ -1,4 +1,4 @@
-# @(#)386BSD 8.1 (Berkeley) 1/30/98
+# @(#)386BSD 8.1 (Berkeley) 1/30/1998
define(`confENVDEF', ` -DMIME')
define(`confLIBS', `-lutil')
define(`confLINKS', `/usr/sbin/sendmail /usr/bin/newaliases \
diff --git a/contrib/sendmail/BuildTools/OS/A-UX b/contrib/sendmail/BuildTools/OS/A-UX
index 782106d7e155..3a23f367d680 100644
--- a/contrib/sendmail/BuildTools/OS/A-UX
+++ b/contrib/sendmail/BuildTools/OS/A-UX
@@ -1,4 +1,4 @@
-# @(#)A-UX 8.4 (Berkeley) 3/12/98
+# @(#)A-UX 8.4 (Berkeley) 3/12/1998
define(`confMAPDEF', `-DNDBM')
define(`confENVDEF', `-D_POSIX_SOURCE ')
define(`confLIBS', `-ldbm -lposix -lUTIL')
diff --git a/contrib/sendmail/BuildTools/OS/AIX b/contrib/sendmail/BuildTools/OS/AIX
index ebf1f123262a..03d8407a12b1 100644
--- a/contrib/sendmail/BuildTools/OS/AIX
+++ b/contrib/sendmail/BuildTools/OS/AIX
@@ -1,4 +1,4 @@
-# @(#)AIX 8.6 (Berkeley) 3/12/98
+# @(#)AIX 8.6 (Berkeley) 3/12/1998
define(`confMAPDEF', `-DNDBM -DNIS')
define(`confENVDEF', `-D_AIX3 ')
define(`confOPTIMIZE', `-g')
diff --git a/contrib/sendmail/BuildTools/OS/AIX.2 b/contrib/sendmail/BuildTools/OS/AIX.2
index 3838e893631a..8cec811f59c1 100644
--- a/contrib/sendmail/BuildTools/OS/AIX.2
+++ b/contrib/sendmail/BuildTools/OS/AIX.2
@@ -1,4 +1,4 @@
-# @(#)AIX.2 8.8 (Berkeley) 3/12/98
+# @(#)AIX.2 8.8 (Berkeley) 3/12/1998
PUSHDIVERT(1)
SMROOT= /usr/local/newmail
POPDIVERT
diff --git a/contrib/sendmail/BuildTools/OS/AIX.4.2 b/contrib/sendmail/BuildTools/OS/AIX.4.2
index e302f5a11369..3e1be252ae6b 100644
--- a/contrib/sendmail/BuildTools/OS/AIX.4.2
+++ b/contrib/sendmail/BuildTools/OS/AIX.4.2
@@ -1,7 +1,7 @@
-# @(#)AIX.4.2 8.5 (Berkeley) 3/14/98
+# @(#)AIX.4.2 8.6 (Berkeley) 8/6/1998
define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX')
define(`confENVDEF', `-D_AIX4=40200 ')
-define(`confOPTIMIZE', `-O3')
+define(`confOPTIMIZE', `-O3 -qstrict')
define(`confLIBS', `-ldbm')
define(`confSTDIR', `/etc')
define(`confHFDIR', `/usr/lib')
diff --git a/contrib/sendmail/BuildTools/OS/AIX.4.3 b/contrib/sendmail/BuildTools/OS/AIX.4.3
index 75a4272f04b0..00688c6e903a 100644
--- a/contrib/sendmail/BuildTools/OS/AIX.4.3
+++ b/contrib/sendmail/BuildTools/OS/AIX.4.3
@@ -1,7 +1,7 @@
-# @(#)AIX.4.3 8.4 (Berkeley) 3/14/98
+# @(#)AIX.4.3 8.5 (Berkeley) 8/6/1998
define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX')
define(`confENVDEF', `-D_AIX4=40300 ')
-define(`confOPTIMIZE', `-O3')
+define(`confOPTIMIZE', `-O3 -qstrict')
define(`confCC', `/usr/bin/xlc')
define(`confLIBS', `-ldbm')
define(`confSTDIR', `/etc')
diff --git a/contrib/sendmail/BuildTools/OS/AIX.4.x b/contrib/sendmail/BuildTools/OS/AIX.4.x
index f08bfcb4a357..a427d07860d4 100644
--- a/contrib/sendmail/BuildTools/OS/AIX.4.x
+++ b/contrib/sendmail/BuildTools/OS/AIX.4.x
@@ -1,7 +1,7 @@
-# @(#)AIX.4.x 8.7 (Berkeley) 3/14/98
+# @(#)AIX.4.x 8.8 (Berkeley) 8/6/1998
define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX')
define(`confENVDEF', `-D_AIX4 ')
-define(`confOPTIMIZE', `-O3')
+define(`confOPTIMIZE', `-O3 -qstrict')
define(`confLIBS', `-ldbm')
define(`confSTDIR', `/etc')
define(`confHFDIR', `/usr/lib')
diff --git a/contrib/sendmail/BuildTools/OS/Altos b/contrib/sendmail/BuildTools/OS/Altos
index 9c1f301d18d0..9865f9a14ec5 100644
--- a/contrib/sendmail/BuildTools/OS/Altos
+++ b/contrib/sendmail/BuildTools/OS/Altos
@@ -1,4 +1,4 @@
-# @(#)Altos 8.6 (Berkeley) 2/19/98
+# @(#)Altos 8.6 (Berkeley) 2/19/1998
define(`confCC', `gcc')
define(`confENVDEF', `-DALTOS_SYSTEM_V ')
define(`confLIBS', `-lsocket -lrpc')
diff --git a/contrib/sendmail/BuildTools/OS/BSD-OS b/contrib/sendmail/BuildTools/OS/BSD-OS
index 58586dd596f3..67a6243ddd01 100644
--- a/contrib/sendmail/BuildTools/OS/BSD-OS
+++ b/contrib/sendmail/BuildTools/OS/BSD-OS
@@ -1,4 +1,4 @@
-# @(#)BSD-OS 8.8 (Berkeley) 6/3/98
+# @(#)BSD-OS 8.8 (Berkeley) 6/3/1998
define(`confMAPDEF', `-DNEWDB -DMAP_REGEX')
define(`confENVDEF', `-DNETISO')
define(`confLIBS', `-lutil -lkvm')
diff --git a/contrib/sendmail/BuildTools/OS/BSD43 b/contrib/sendmail/BuildTools/OS/BSD43
index 1bbccea2c7fa..6a04bef287c3 100644
--- a/contrib/sendmail/BuildTools/OS/BSD43
+++ b/contrib/sendmail/BuildTools/OS/BSD43
@@ -1,4 +1,4 @@
-# @(#)BSD43 8.5 (Berkeley) 3/12/98
+# @(#)BSD43 8.5 (Berkeley) 3/12/1998
define(`confBEFORE', `unistd.h stddef.h stdlib.h dirent.h sys/time.h')
define(`confMAPDEF', `-DNDBM')
define(`confENVDEF', `-DoldBSD43 ')
diff --git a/contrib/sendmail/BuildTools/OS/CLIX b/contrib/sendmail/BuildTools/OS/CLIX
index 69f422965bbd..35b67a69752e 100644
--- a/contrib/sendmail/BuildTools/OS/CLIX
+++ b/contrib/sendmail/BuildTools/OS/CLIX
@@ -1,4 +1,4 @@
-# @(#)CLIX 8.8 (Berkeley) 3/12/98
+# @(#)CLIX 8.8 (Berkeley) 3/12/1998
define(`confCC', `gcc')
define(`confMAPDEF', `-DNDBM')
define(`confENVDEF', `-DCLIX ')
diff --git a/contrib/sendmail/BuildTools/OS/CRAYT3E.2.0.x b/contrib/sendmail/BuildTools/OS/CRAYT3E.2.0.x
index 6f5abb5de390..4455e51ec816 100644
--- a/contrib/sendmail/BuildTools/OS/CRAYT3E.2.0.x
+++ b/contrib/sendmail/BuildTools/OS/CRAYT3E.2.0.x
@@ -1,4 +1,4 @@
-# @(#)CRAYT3E.2.0.x 8.1 (Berkeley) 4/21/98
+# @(#)CRAYT3E.2.0.x 8.1 (Berkeley) 4/21/1998
define(`confMAPDEF', `-DNDBM')
define(`confENVDEF', `-DUNICOS ')
define(`confOPTIMIZE', `-O')
diff --git a/contrib/sendmail/BuildTools/OS/CSOS b/contrib/sendmail/BuildTools/OS/CSOS
index 3a995c9496f2..e39218efe8c6 100644
--- a/contrib/sendmail/BuildTools/OS/CSOS
+++ b/contrib/sendmail/BuildTools/OS/CSOS
@@ -1,4 +1,4 @@
-# @(#)CSOS 8.5 (Berkeley) 2/8/98
+# @(#)CSOS 8.5 (Berkeley) 2/8/1998
define(`confLIBS', `-lnet')
define(`confMBINDIR', `/usr/lib')
define(`confSBINDIR', `/usr/etc')
diff --git a/contrib/sendmail/BuildTools/OS/ConvexOS b/contrib/sendmail/BuildTools/OS/ConvexOS
index 8ea990c6e664..cdb81eb901c8 100644
--- a/contrib/sendmail/BuildTools/OS/ConvexOS
+++ b/contrib/sendmail/BuildTools/OS/ConvexOS
@@ -1,4 +1,4 @@
-# @(#)ConvexOS 8.6 (Berkeley) 3/12/98
+# @(#)ConvexOS 8.6 (Berkeley) 3/12/1998
define(`confMAPDEF', `-DNDBM -DYPCOMPAT -DNIS')
define(`confENVDEF', `-D__STDC__ -d non_int_bit_field')
define(`confOPTIMIZE', `-g')
diff --git a/contrib/sendmail/BuildTools/OS/Dell b/contrib/sendmail/BuildTools/OS/Dell
index 2b9c1ea44a1f..55fc05179465 100644
--- a/contrib/sendmail/BuildTools/OS/Dell
+++ b/contrib/sendmail/BuildTools/OS/Dell
@@ -1,4 +1,4 @@
-# @(#)Dell 8.8 (Berkeley) 3/12/98
+# @(#)Dell 8.8 (Berkeley) 3/12/1998
define(`confCC', `gcc')
define(`confMAPDEF', `-DNDBM')
define(`confENVDEF', `-D__svr4__ ')
diff --git a/contrib/sendmail/BuildTools/OS/DomainOS b/contrib/sendmail/BuildTools/OS/DomainOS
index ee6be2726b81..06b1e3825cac 100644
--- a/contrib/sendmail/BuildTools/OS/DomainOS
+++ b/contrib/sendmail/BuildTools/OS/DomainOS
@@ -1,4 +1,4 @@
-# @(#)DomainOS 8.6 (Berkeley) 6/24/98
+# @(#)DomainOS 8.6 (Berkeley) 6/24/1998
define(`confCC', `cc -A nansi -A,systype,any -A,runtype,bsd4.3')
define(`confBEFORE', `unistd.h dirent.h')
define(`confMAPDEF', `-DNDBM')
diff --git a/contrib/sendmail/BuildTools/OS/DomainOS.10.4 b/contrib/sendmail/BuildTools/OS/DomainOS.10.4
index a92051b6befd..c8a4acf06d26 100644
--- a/contrib/sendmail/BuildTools/OS/DomainOS.10.4
+++ b/contrib/sendmail/BuildTools/OS/DomainOS.10.4
@@ -1,4 +1,4 @@
-# @(#)DomainOS.10.4 8.1 (Berkeley) 6/24/98
+# @(#)DomainOS.10.4 8.1 (Berkeley) 6/24/1998
define(`confCC', `cc -A nansi -A,systype,any -A,runtype,bsd4.3')
define(`confBEFORE', `dirent.h')
define(`confMAPDEF', `-DNDBM')
diff --git a/contrib/sendmail/BuildTools/OS/Dynix b/contrib/sendmail/BuildTools/OS/Dynix
index 2781e49d1c1e..0da6fb583c23 100644
--- a/contrib/sendmail/BuildTools/OS/Dynix
+++ b/contrib/sendmail/BuildTools/OS/Dynix
@@ -1,4 +1,4 @@
-# @(#)Dynix 8.7 (Berkeley) 2/26/98
+# @(#)Dynix 8.7 (Berkeley) 2/26/1998
define(`confCC', `gcc')
define(`confOPTIMIZE', `-O -g')
define(`confLIBS', `-lseq')
diff --git a/contrib/sendmail/BuildTools/OS/EWS-UX_V b/contrib/sendmail/BuildTools/OS/EWS-UX_V
index bf11275a2cd1..7875fdce7f48 100644
--- a/contrib/sendmail/BuildTools/OS/EWS-UX_V
+++ b/contrib/sendmail/BuildTools/OS/EWS-UX_V
@@ -1,4 +1,4 @@
-# @(#)EWS-UX_V 8.6 (Berkeley) 3/12/98
+# @(#)EWS-UX_V 8.6 (Berkeley) 3/12/1998
define(`confCC', `/usr/abiccs/bin/cc -KOlimit=900')
define(`confBEFORE', `sysexits.h ndbm.h ndbm.o')
define(`confMAPDEF', `-DNDBM -DNIS')
diff --git a/contrib/sendmail/BuildTools/OS/FreeBSD b/contrib/sendmail/BuildTools/OS/FreeBSD
index bec2c599060b..baede69c7d7d 100644
--- a/contrib/sendmail/BuildTools/OS/FreeBSD
+++ b/contrib/sendmail/BuildTools/OS/FreeBSD
@@ -1,3 +1,3 @@
-# @(#)FreeBSD 8.5 (Berkeley) 3/12/98
+# @(#)FreeBSD 8.5 (Berkeley) 3/12/1998
define(`confMAPDEF', `-DNEWDB -DNIS -DMAP_REGEX')
define(`confLIBS', `-lutil')
diff --git a/contrib/sendmail/BuildTools/OS/HP-UX b/contrib/sendmail/BuildTools/OS/HP-UX
index 66d71a45eed0..2ba83c9b5dda 100644
--- a/contrib/sendmail/BuildTools/OS/HP-UX
+++ b/contrib/sendmail/BuildTools/OS/HP-UX
@@ -1,4 +1,4 @@
-# @(#)HP-UX 8.9 (Berkeley) 3/14/98
+# @(#)HP-UX 8.9 (Berkeley) 3/14/1998
define(`confCC', `cc -Aa -D_HPUX_SOURCE')
define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX')
define(`confOPTIMIZE', `+O1')
diff --git a/contrib/sendmail/BuildTools/OS/HP-UX.10.x b/contrib/sendmail/BuildTools/OS/HP-UX.10.x
index a4b3a816048f..5deacd0eaeab 100644
--- a/contrib/sendmail/BuildTools/OS/HP-UX.10.x
+++ b/contrib/sendmail/BuildTools/OS/HP-UX.10.x
@@ -1,4 +1,4 @@
-# @(#)HP-UX.10.x 8.10 (Berkeley) 3/21/98
+# @(#)HP-UX.10.x 8.10 (Berkeley) 3/21/1998
define(`confCC', `cc -Aa -D_HPUX_SOURCE')
define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX')
define(`confENVDEF', `-DV4FS ')
diff --git a/contrib/sendmail/BuildTools/OS/HP-UX.11.x b/contrib/sendmail/BuildTools/OS/HP-UX.11.x
index 9e13c58e979a..1717430a0611 100644
--- a/contrib/sendmail/BuildTools/OS/HP-UX.11.x
+++ b/contrib/sendmail/BuildTools/OS/HP-UX.11.x
@@ -1,4 +1,4 @@
-# @(#)HP-UX.11.x 8.7 (Berkeley) 3/30/98
+# @(#)HP-UX.11.x 8.7 (Berkeley) 3/30/1998
define(`confCC', `cc -Ae')
define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX')
define(`confENVDEF', `-DV4FS -DHPUX11 ')
diff --git a/contrib/sendmail/BuildTools/OS/IRIX b/contrib/sendmail/BuildTools/OS/IRIX
index dafbda6a5fb6..ed5e3e23380c 100644
--- a/contrib/sendmail/BuildTools/OS/IRIX
+++ b/contrib/sendmail/BuildTools/OS/IRIX
@@ -1,4 +1,4 @@
-# @(#)IRIX 8.7 (Berkeley) 3/12/98
+# @(#)IRIX 8.7 (Berkeley) 3/12/1998
define(`confMAPDEF', `-DNDBM -DNIS')
define(`confENVDEF', `-DIRIX ')
define(`confLIBS', `-lmld -lmalloc -lsun')
diff --git a/contrib/sendmail/BuildTools/OS/IRIX.5.x b/contrib/sendmail/BuildTools/OS/IRIX.5.x
index 4ac44c29aea1..6d492a29c646 100644
--- a/contrib/sendmail/BuildTools/OS/IRIX.5.x
+++ b/contrib/sendmail/BuildTools/OS/IRIX.5.x
@@ -1,4 +1,4 @@
-# @(#)IRIX.5.x 8.7 (Berkeley) 3/12/98
+# @(#)IRIX.5.x 8.7 (Berkeley) 3/12/1998
define(`confMAPDEF', `-DNDBM -DNIS')
define(`confENVDEF', `-DIRIX5 ')
define(`confLIBS', `-lmld -lmalloc')
diff --git a/contrib/sendmail/BuildTools/OS/IRIX.6.5 b/contrib/sendmail/BuildTools/OS/IRIX.6.5
index 3056ff449128..1b34f2e6e6d2 100644
--- a/contrib/sendmail/BuildTools/OS/IRIX.6.5
+++ b/contrib/sendmail/BuildTools/OS/IRIX.6.5
@@ -1,4 +1,4 @@
-# @(#)IRIX.6.5 8.2 (Berkeley) 4/24/98
+# @(#)IRIX.6.5 8.2 (Berkeley) 4/24/1998
PUSHDIVERT(1)
# Select what ABI we are using -- see abi(5) for details
# -32 ~ IRIX 5.3 (default: -mips2)
diff --git a/contrib/sendmail/BuildTools/OS/IRIX.6.x b/contrib/sendmail/BuildTools/OS/IRIX.6.x
index c52fd4ea41dc..0424933da9bd 100644
--- a/contrib/sendmail/BuildTools/OS/IRIX.6.x
+++ b/contrib/sendmail/BuildTools/OS/IRIX.6.x
@@ -1,4 +1,4 @@
-# @(#)IRIX.6.x 8.11 (Berkeley) 4/24/98
+# @(#)IRIX.6.x 8.11 (Berkeley) 4/24/1998
PUSHDIVERT(1)
# Select what ABI we are using -- see abi(5) for details
# -32 ~ IRIX 5.3 (default: -mips2)
diff --git a/contrib/sendmail/BuildTools/OS/IRIX64.6.0 b/contrib/sendmail/BuildTools/OS/IRIX64.6.0
index 5226bb535c52..e8b2e3a82f69 100644
--- a/contrib/sendmail/BuildTools/OS/IRIX64.6.0
+++ b/contrib/sendmail/BuildTools/OS/IRIX64.6.0
@@ -1,4 +1,4 @@
-# @(#)IRIX64.6.0 8.10 (Berkeley) 3/12/98
+# @(#)IRIX64.6.0 8.10 (Berkeley) 3/12/1998
PUSHDIVERT(1)
# Select what ABI we are using -- see abi(5) for details
# -32 ~ IRIX 5.3 (default: -mips2)
diff --git a/contrib/sendmail/BuildTools/OS/IRIX64.6.1 b/contrib/sendmail/BuildTools/OS/IRIX64.6.1
index 4876a8807a47..1183766b1eab 100644
--- a/contrib/sendmail/BuildTools/OS/IRIX64.6.1
+++ b/contrib/sendmail/BuildTools/OS/IRIX64.6.1
@@ -1,4 +1,4 @@
-# @(#)IRIX64.6.1 8.10 (Berkeley) 3/12/98
+# @(#)IRIX64.6.1 8.10 (Berkeley) 3/12/1998
PUSHDIVERT(1)
# Select what ABI we are using -- see abi(5) for details
# -32 ~ IRIX 5.3 (default: -mips2)
diff --git a/contrib/sendmail/BuildTools/OS/IRIX64.6.5 b/contrib/sendmail/BuildTools/OS/IRIX64.6.5
new file mode 100644
index 000000000000..d0281f5c070b
--- /dev/null
+++ b/contrib/sendmail/BuildTools/OS/IRIX64.6.5
@@ -0,0 +1,35 @@
+# @(#)IRIX64.6.5 8.1 (Berkeley) 11/29/1998
+PUSHDIVERT(1)
+# Select what ABI we are using -- see abi(5) for details
+# -32 ~ IRIX 5.3 (default: -mips2)
+# - long and pointer are 32 bit
+# -n32 New to IRIX 6.2 (default: -mips3)
+# - long and pointer are 32 bit
+# -64 ~ IRIX 6.1 (default: -mips4)
+# - long and pointer are 64 bit
+# We force ABI here, so then it does not depend on CPU
+#
+# With IDO 6.2 (IRIX 6.2) you need subsystem compiler_dev.sw32.lib
+# for compilation with ABI=-n32 -- alternatively you can set ABI=-32
+# ABI=-64 requires subsystem compiler_dev.sw64.lib, but this runs
+# only with IRIX64 (ie. 64 bit kernels)
+#
+# NOTE: Do not set `confABI' in a site configuration file! The ABI MUST
+# be given on the Build command line using the -E parameter, e.g.:
+#
+# Build -E ABI=-n32
+#
+ABI= confABI
+POPDIVERT
+define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX')
+define(`confENVDEF', `-DIRIX6 -DHASSNPRINTF=1 ${ABI} ')
+define(`confLDOPTS', `${ABI}')
+define(`confMBINDIR', `/usr/lib')
+define(`confSBINDIR', `/usr/etc')
+define(`confUBINDIR', `/usr/bsd')
+define(`confEBINDIR', `/usr/lib')
+define(`confSBINGRP', `sys')
+define(`confSTDIR', `/var')
+define(`confHFDIR', `/etc')
+define(`confINSTALL', `${BUILDBIN}/install.sh')
+define(`confDEPEND_TYPE', `CC-M')
diff --git a/contrib/sendmail/BuildTools/OS/IRIX64.6.x b/contrib/sendmail/BuildTools/OS/IRIX64.6.x
index 503df04b42c6..f105edf8ff43 100644
--- a/contrib/sendmail/BuildTools/OS/IRIX64.6.x
+++ b/contrib/sendmail/BuildTools/OS/IRIX64.6.x
@@ -1,4 +1,4 @@
-# @(#)IRIX64.6.x 8.11 (Berkeley) 4/24/98
+# @(#)IRIX64.6.x 8.11 (Berkeley) 4/24/1998
PUSHDIVERT(1)
# Select what ABI we are using -- see abi(5) for details
# -32 ~ IRIX 5.3 (default: -mips2)
diff --git a/contrib/sendmail/BuildTools/OS/ISC b/contrib/sendmail/BuildTools/OS/ISC
index f07093f660b0..58b8b78aabc3 100644
--- a/contrib/sendmail/BuildTools/OS/ISC
+++ b/contrib/sendmail/BuildTools/OS/ISC
@@ -1,4 +1,4 @@
-# @(#)ISC 8.5 (Berkeley) 3/12/98
+# @(#)ISC 8.5 (Berkeley) 3/12/1998
define(`confMAPDEF', `-DNDBM -DNIS')
define(`confENVDEF', `-DISC_UNIX -D_POSIX_SOURCE -D_SYSV3 ')
define(`confLIBS', `-lyp -lrpc -lndbm -linet -lcposix')
diff --git a/contrib/sendmail/BuildTools/OS/KSR b/contrib/sendmail/BuildTools/OS/KSR
index d3931a464051..9169cba61437 100644
--- a/contrib/sendmail/BuildTools/OS/KSR
+++ b/contrib/sendmail/BuildTools/OS/KSR
@@ -1,4 +1,4 @@
-# @(#)KSR 8.4 (Berkeley) 3/12/98
+# @(#)KSR 8.4 (Berkeley) 3/12/1998
define(`confMAPDEF', `-DNDBM -DNIS')
define(`confLIBDIRS', `-L/usr/shlib -L/usr/lib')
define(`confLIBS', `-ldbm')
diff --git a/contrib/sendmail/BuildTools/OS/LUNA b/contrib/sendmail/BuildTools/OS/LUNA
index 2a0fe1d78c22..e4637c9f72d1 100644
--- a/contrib/sendmail/BuildTools/OS/LUNA
+++ b/contrib/sendmail/BuildTools/OS/LUNA
@@ -1,4 +1,4 @@
-# @(#)LUNA 8.8 (Berkeley) 3/12/98
+# @(#)LUNA 8.8 (Berkeley) 3/12/1998
define(`confBEFORE', `dirent.h stddef.h stdlib.h unistd.h limits.h time.h sys/time.h')
define(`confMAPDEF', `-DNDBM')
define(`confMBINDIR', `/usr/lib')
diff --git a/contrib/sendmail/BuildTools/OS/Linux b/contrib/sendmail/BuildTools/OS/Linux
index e908c478a944..306c9efce756 100644
--- a/contrib/sendmail/BuildTools/OS/Linux
+++ b/contrib/sendmail/BuildTools/OS/Linux
@@ -1,4 +1,4 @@
-# @(#)Linux 8.4 (Berkeley) 3/22/98
+# @(#)Linux 8.4 (Berkeley) 3/22/1998
define(`confSTDIR', `/etc')
define(`confHFDIR', `/usr/lib')
define(`confDEPEND_TYPE', `CC-M')
diff --git a/contrib/sendmail/BuildTools/OS/Linux.ppc b/contrib/sendmail/BuildTools/OS/Linux.ppc
index d2c3cafa7ca7..e0712e372834 100644
--- a/contrib/sendmail/BuildTools/OS/Linux.ppc
+++ b/contrib/sendmail/BuildTools/OS/Linux.ppc
@@ -1,3 +1,3 @@
-# @(#)Linux.ppc 8.3 (Berkeley) 2/12/98
+# @(#)Linux.ppc 8.3 (Berkeley) 2/12/1998
define(`confHFDIR', `/usr/lib')
define(`confSBINGRP', `mail')
diff --git a/contrib/sendmail/BuildTools/OS/Mach386 b/contrib/sendmail/BuildTools/OS/Mach386
index 981478120463..7ff806e445b8 100644
--- a/contrib/sendmail/BuildTools/OS/Mach386
+++ b/contrib/sendmail/BuildTools/OS/Mach386
@@ -1,4 +1,4 @@
-# @(#)Mach386 8.6 (Berkeley) 3/12/98
+# @(#)Mach386 8.6 (Berkeley) 3/12/1998
define(`confCC', `gcc')
define(`confMAPDEF', `-DNDBM')
define(`confLIBS', `-ldbm')
diff --git a/contrib/sendmail/BuildTools/OS/NCR.MP-RAS.2.x b/contrib/sendmail/BuildTools/OS/NCR.MP-RAS.2.x
index 74d733401675..bd76038a975a 100644
--- a/contrib/sendmail/BuildTools/OS/NCR.MP-RAS.2.x
+++ b/contrib/sendmail/BuildTools/OS/NCR.MP-RAS.2.x
@@ -1,4 +1,4 @@
-# @(#)NCR.MP-RAS.2.x 8.9 (Berkeley) 3/12/98
+# @(#)NCR.MP-RAS.2.x 8.9 (Berkeley) 3/12/1998
define(`confMAPDEF', `-DNDBM')
define(`confENVDEF', `-DNCR_MP_RAS2 ')
define(`confOPTIMIZE', `-O2')
diff --git a/contrib/sendmail/BuildTools/OS/NCR.MP-RAS.3.x b/contrib/sendmail/BuildTools/OS/NCR.MP-RAS.3.x
index 14e02e3ab05c..7af96677d888 100644
--- a/contrib/sendmail/BuildTools/OS/NCR.MP-RAS.3.x
+++ b/contrib/sendmail/BuildTools/OS/NCR.MP-RAS.3.x
@@ -1,10 +1,10 @@
-# @(#)NCR.MP-RAS.3.x 8.9 (Berkeley) 3/12/98
+# @(#)NCR.MP-RAS.3.x 8.10 (Berkeley) 8/6/1998
define(`confMAPDEF', `-DNDBM')
define(`confENVDEF', `-DNCR_MP_RAS3 ')
define(`confOPTIMIZE', `-O2')
define(`confINCDIRS', `-I/usr/include -I/usr/ucbinclude')
define(`confLIBDIRS', `-L/usr/ucblib')
-define(`confLIBS', `-lsocket -lnsl -lelf -lc -lucb')
+define(`confLIBS', `-lresolv -lsocket -lnsl -lelf -lc -lucb')
define(`confMBINDIR', `/usr/ucblib')
define(`confSBINDIR', `/usr/ucbetc')
define(`confUBINDIR', `/usr/ucb')
diff --git a/contrib/sendmail/BuildTools/OS/NEWS-OS.4.x b/contrib/sendmail/BuildTools/OS/NEWS-OS.4.x
index 4fa83bbb7c45..71aa4d46b31b 100644
--- a/contrib/sendmail/BuildTools/OS/NEWS-OS.4.x
+++ b/contrib/sendmail/BuildTools/OS/NEWS-OS.4.x
@@ -1,4 +1,4 @@
-# @(#)NEWS-OS.4.x 8.6 (Berkeley) 3/12/98
+# @(#)NEWS-OS.4.x 8.6 (Berkeley) 3/12/1998
define(`confBEFORE', `limits.h')
define(`confMAPDEF', `-DNDBM')
define(`confLIBS', `-lmld')
diff --git a/contrib/sendmail/BuildTools/OS/NEWS-OS.6.x b/contrib/sendmail/BuildTools/OS/NEWS-OS.6.x
index dec79b5e9ec2..4e5c809642de 100644
--- a/contrib/sendmail/BuildTools/OS/NEWS-OS.6.x
+++ b/contrib/sendmail/BuildTools/OS/NEWS-OS.6.x
@@ -1,4 +1,4 @@
-# @(#)NEWS-OS.6.x 8.8 (Berkeley) 3/12/98
+# @(#)NEWS-OS.6.x 8.8 (Berkeley) 3/12/1998
define(`confCC', `/bin/cc')
define(`confBEFORE', `sysexits.h ndbm.o')
define(`confMAPDEF', `-DNDBM -DNIS')
diff --git a/contrib/sendmail/BuildTools/OS/NEXTSTEP.4.x b/contrib/sendmail/BuildTools/OS/NEXTSTEP.4.x
index 4fd6b0386089..b77581378d18 100644
--- a/contrib/sendmail/BuildTools/OS/NEXTSTEP.4.x
+++ b/contrib/sendmail/BuildTools/OS/NEXTSTEP.4.x
@@ -1,4 +1,4 @@
-# @(#)NEXTSTEP.4.x 8.1 (Berkeley) 3/21/98
+# @(#)NEXTSTEP.4.x 8.1 (Berkeley) 3/21/1998
PUSHDIVERT(1)
# NEXTSTEP 3.1 and 3.2 only support m68k and i386
#ARCH= -arch m68k -arch i386 -arch hppa -arch sparc
diff --git a/contrib/sendmail/BuildTools/OS/NeXT.2.x b/contrib/sendmail/BuildTools/OS/NeXT.2.x
index d8f469495045..0a9d918318f0 100644
--- a/contrib/sendmail/BuildTools/OS/NeXT.2.x
+++ b/contrib/sendmail/BuildTools/OS/NeXT.2.x
@@ -1,4 +1,4 @@
-# @(#)NeXT.2.x 8.7 (Berkeley) 3/12/98
+# @(#)NeXT.2.x 8.7 (Berkeley) 3/12/1998
define(`confBEFORE', `unistd.h dirent.h')
define(`confMAPDEF', `-DNDBM -DNIS -DNETINFO')
define(`confENVDEF', `-DNeXT ')
diff --git a/contrib/sendmail/BuildTools/OS/NeXT.3.x b/contrib/sendmail/BuildTools/OS/NeXT.3.x
index 05aad6f85a51..f5e313dd8510 100644
--- a/contrib/sendmail/BuildTools/OS/NeXT.3.x
+++ b/contrib/sendmail/BuildTools/OS/NeXT.3.x
@@ -1,4 +1,4 @@
-# @(#)NeXT.3.x 8.7 (Berkeley) 3/12/98
+# @(#)NeXT.3.x 8.7 (Berkeley) 3/12/1998
PUSHDIVERT(1)
# NEXTSTEP 3.1 and 3.2 only support m68k and i386
#ARCH= -arch m68k -arch i386 -arch hppa -arch sparc
diff --git a/contrib/sendmail/BuildTools/OS/NeXT.4.x b/contrib/sendmail/BuildTools/OS/NeXT.4.x
index 35f3bdb35e51..8736b74f327c 100644
--- a/contrib/sendmail/BuildTools/OS/NeXT.4.x
+++ b/contrib/sendmail/BuildTools/OS/NeXT.4.x
@@ -1,4 +1,4 @@
-# @(#)NeXT.4.x 8.8 (Berkeley) 5/25/98
+# @(#)NeXT.4.x 8.9 (Berkeley) 7/15/1998
PUSHDIVERT(1)
# NEXTSTEP 3.1 and 3.2 only support m68k and i386
#ARCH= -arch m68k -arch i386 -arch hppa -arch sparc
@@ -11,7 +11,7 @@ define(`confMAPDEF', `-DNDBM -DNIS -DNETINFO')
define(`confENVDEF', `-DNeXT -Wno-precomp -pipe ${RC_CFLAGS}')
define(`confLDOPTS', `${RC_CFLAGS}')
define(`confLIBS', `-ldbm')
-define(`confMANROOT', `/usr/lib/man/cat')
+define(`confMANROOT', `/usr/man/cat')
define(`confMBINDIR', `/usr/lib')
define(`confSBINDIR', `/usr/etc')
define(`confUBINDIR', `/usr/ucb')
diff --git a/contrib/sendmail/BuildTools/OS/NetBSD b/contrib/sendmail/BuildTools/OS/NetBSD
index 595fd2df289d..cd800ef3d953 100644
--- a/contrib/sendmail/BuildTools/OS/NetBSD
+++ b/contrib/sendmail/BuildTools/OS/NetBSD
@@ -1,4 +1,4 @@
-# @(#)NetBSD 8.6 (Berkeley) 3/12/98
+# @(#)NetBSD 8.6 (Berkeley) 3/12/1998
define(`confMAPDEF', `-DNEWDB -DNIS -DMAP_REGEX')
define(`confENVDEF', ` -DNETISO')
define(`confDEPEND_TYPE', `CC-M')
diff --git a/contrib/sendmail/BuildTools/OS/NetBSD.8.3 b/contrib/sendmail/BuildTools/OS/NetBSD.8.3
index 6576660f44e8..714de1e6fbae 100644
--- a/contrib/sendmail/BuildTools/OS/NetBSD.8.3
+++ b/contrib/sendmail/BuildTools/OS/NetBSD.8.3
@@ -1,3 +1,3 @@
-# @(#)NetBSD.8.3 8.6 (Berkeley) 3/12/98
+# @(#)NetBSD.8.3 8.6 (Berkeley) 3/12/1998
define(`confMAPDEF', `-DNEWDB -DNIS -DMAP_REGEX')
define(`confENVDEF', ` # -DNETISO')
diff --git a/contrib/sendmail/BuildTools/OS/NonStop-UX b/contrib/sendmail/BuildTools/OS/NonStop-UX
index 02bdb7801d4d..6ccdead5e480 100644
--- a/contrib/sendmail/BuildTools/OS/NonStop-UX
+++ b/contrib/sendmail/BuildTools/OS/NonStop-UX
@@ -1,4 +1,4 @@
-# @(#)NonStop-UX 8.8 (Berkeley) 3/12/98
+# @(#)NonStop-UX 8.8 (Berkeley) 3/12/1998
define(`confCC', `gcc')
define(`confMAPDEF', `-DNDBM')
define(`confENVDEF', `-DNonStop_UX_BXX -D_SVID ')
diff --git a/contrib/sendmail/BuildTools/OS/OSF1 b/contrib/sendmail/BuildTools/OS/OSF1
index cc65dbc7844d..75fecfe93c6d 100644
--- a/contrib/sendmail/BuildTools/OS/OSF1
+++ b/contrib/sendmail/BuildTools/OS/OSF1
@@ -1,4 +1,4 @@
-# @(#)OSF1 8.7 (Berkeley) 3/14/98
+# @(#)OSF1 8.7 (Berkeley) 3/14/1998
define(`confCC', `cc -Olimit 1000')
define(`confMAPDEF', `-DNDBM -DNIS -DMAP_REGEX')
define(`confLIBS', `-ldbm')
diff --git a/contrib/sendmail/BuildTools/OS/OpenBSD b/contrib/sendmail/BuildTools/OS/OpenBSD
index fb7bc8f42c36..423ab2d6463b 100644
--- a/contrib/sendmail/BuildTools/OS/OpenBSD
+++ b/contrib/sendmail/BuildTools/OS/OpenBSD
@@ -1,3 +1,3 @@
-# @(#)OpenBSD 8.5 (Berkeley) 3/12/98
+# @(#)OpenBSD 8.5 (Berkeley) 3/12/1998
define(`confMAPDEF', `-DNEWDB -DNIS -DMAP_REGEX')
define(`confENVDEF', ` -DNETISO')
diff --git a/contrib/sendmail/BuildTools/OS/PTX b/contrib/sendmail/BuildTools/OS/PTX
index 9af372792a8a..7dd05eecc187 100644
--- a/contrib/sendmail/BuildTools/OS/PTX
+++ b/contrib/sendmail/BuildTools/OS/PTX
@@ -1,4 +1,4 @@
-# @(#)PTX 8.6 (Berkeley) 3/12/98
+# @(#)PTX 8.6 (Berkeley) 3/12/1998
define(`confMAPDEF', `-DNDBM')
define(`confOPTIMIZE', `-g')
define(`confLIBS', `-lsocket -linet -lelf -lnsl -lseq')
diff --git a/contrib/sendmail/BuildTools/OS/Paragon b/contrib/sendmail/BuildTools/OS/Paragon
index e16e051f734a..868780f66531 100644
--- a/contrib/sendmail/BuildTools/OS/Paragon
+++ b/contrib/sendmail/BuildTools/OS/Paragon
@@ -1,4 +1,4 @@
-# @(#)Paragon 8.3 (Berkeley) 3/12/98
+# @(#)Paragon 8.3 (Berkeley) 3/12/1998
define(`confMAPDEF', `-DNDBM')
define(`confLIBDIRS', `-L/usr/shlib -L/usr/lib')
define(`confLIBS', `-ldbm')
diff --git a/contrib/sendmail/BuildTools/OS/PowerUX b/contrib/sendmail/BuildTools/OS/PowerUX
index b0f133d0a8c7..47ab87c66b3d 100644
--- a/contrib/sendmail/BuildTools/OS/PowerUX
+++ b/contrib/sendmail/BuildTools/OS/PowerUX
@@ -1,4 +1,4 @@
-# @(#)PowerUX 8.5 (Berkeley) 2/12/98
+# @(#)PowerUX 8.5 (Berkeley) 2/12/1998
define(`confENVDEF', `-D__svr4__ ')
define(`confLIBS', `-Bstatic -lsocket -lnsl -lelf -lgen')
define(`confMBINDIR', `/usr/local/etc')
diff --git a/contrib/sendmail/BuildTools/OS/QNX b/contrib/sendmail/BuildTools/OS/QNX
index 3cc01821afc8..a8a67fe94cc1 100644
--- a/contrib/sendmail/BuildTools/OS/QNX
+++ b/contrib/sendmail/BuildTools/OS/QNX
@@ -1,4 +1,4 @@
-# @(#)QNX 8.4 (Berkeley) 2/19/98
+# @(#)QNX 8.4 (Berkeley) 2/19/1998
PUSHDIVERT(1)
#
# For this Makefile to work you must compile and install the libdb package
diff --git a/contrib/sendmail/BuildTools/OS/RISCos b/contrib/sendmail/BuildTools/OS/RISCos
index 1888ae691616..4b2d79ee0d06 100644
--- a/contrib/sendmail/BuildTools/OS/RISCos
+++ b/contrib/sendmail/BuildTools/OS/RISCos
@@ -1,4 +1,4 @@
-# @(#)RISCos 8.5 (Berkeley) 3/12/98
+# @(#)RISCos 8.5 (Berkeley) 3/12/1998
define(`confCC', `cc -systype bsd43 -Olimit 900')
define(`confBEFORE', `stdlib.h dirent.h unistd.h stddef.h')
define(`confMAPDEF', `-DNDBM')
diff --git a/contrib/sendmail/BuildTools/OS/RISCos.4_0 b/contrib/sendmail/BuildTools/OS/RISCos.4_0
index e057fb433cfe..1557b8aa1fd3 100644
--- a/contrib/sendmail/BuildTools/OS/RISCos.4_0
+++ b/contrib/sendmail/BuildTools/OS/RISCos.4_0
@@ -1,4 +1,4 @@
-# @(#)RISCos.4_0 8.6 (Berkeley) 3/12/98
+# @(#)RISCos.4_0 8.6 (Berkeley) 3/12/1998
define(`confCC', `cc -systype bsd43 -Olimit 900')
define(`confBEFORE', `stdlib.h dirent.h unistd.h stddef.h')
define(`confMAPDEF', `-DNDBM')
diff --git a/contrib/sendmail/BuildTools/OS/Rhapsody b/contrib/sendmail/BuildTools/OS/Rhapsody
new file mode 100644
index 000000000000..16cf89d80be4
--- /dev/null
+++ b/contrib/sendmail/BuildTools/OS/Rhapsody
@@ -0,0 +1,16 @@
+# @(#)Rhapsody 8.1 (Berkeley) 11/7/1998
+#
+# Wilfredo Sanchez <wsanchez@apple.com>:
+# We look a lot more like 4.4BSD than NeXTStep or OpenStep.
+#
+define(`confMAPDEF', `-DNEWDB -DNIS -DMAP_REGEX -DNETINFO -DAUTO_NETINFO_ALIASES -DAUTO_NETINFO_HOSTS')
+define(`confENVDEF', `-DNETISO -traditional-cpp -pipe ${Extra_CC_Flags}')
+define(`confLDOPTS', `${Extra_LD_Flags}')
+define(`confOPTIMIZE', `-O3')
+define(`confHFDIR', `/usr/share/sendmail')
+define(`confMANOWN', `root')
+define(`confMANGRP', `wheel')
+define(`confUBINOWN', `root')
+define(`confUBINGRP', `wheel')
+define(`confSBINOWN', `root')
+define(`confSBINGRP', `wheel')
diff --git a/contrib/sendmail/BuildTools/OS/SCO b/contrib/sendmail/BuildTools/OS/SCO
index a72ba53eebe4..e995052e225d 100644
--- a/contrib/sendmail/BuildTools/OS/SCO
+++ b/contrib/sendmail/BuildTools/OS/SCO
@@ -1,4 +1,4 @@
-# @(#)SCO 8.3 (Berkeley) 2/8/98
+# @(#)SCO 8.3 (Berkeley) 2/8/1998
define(`confENVDEF', `-D_SCO_unix_ ')
define(`confLIBS', `-lsocket -lprot_s -lx -lc_s')
define(`confMBINDIR', `/usr/lib')
diff --git a/contrib/sendmail/BuildTools/OS/SCO.4.2 b/contrib/sendmail/BuildTools/OS/SCO.4.2
index 027f7300667a..0d458befa3a1 100644
--- a/contrib/sendmail/BuildTools/OS/SCO.4.2
+++ b/contrib/sendmail/BuildTools/OS/SCO.4.2
@@ -1,4 +1,4 @@
-# @(#)SCO.4.2 8.5 (Berkeley) 6/30/98
+# @(#)SCO.4.2 8.5 (Berkeley) 6/30/1998
define(`confENVDEF', `-D_SCO_unix_4_2 ')
define(`confLIBS', `-lsocket -lndbm -lprot_s -lx -lc_s')
define(`confMAPDEF', `-DNDBM')
diff --git a/contrib/sendmail/BuildTools/OS/SCO.5.x b/contrib/sendmail/BuildTools/OS/SCO.5.x
index 8f095ac5aed3..d7fdc736e68a 100644
--- a/contrib/sendmail/BuildTools/OS/SCO.5.x
+++ b/contrib/sendmail/BuildTools/OS/SCO.5.x
@@ -1,4 +1,4 @@
-# @(#)SCO.5.x 8.10 (Berkeley) 6/30/98
+# @(#)SCO.5.x 8.10 (Berkeley) 6/30/1998
define(`confCC', `cc -b elf')
define(`confLIBS', `-lsocket -lndbm -lprot -lcurses -lm -lx -lgen')
define(`confMAPDEF', `-DMAP_REGEX -DNDBM')
diff --git a/contrib/sendmail/BuildTools/OS/SINIX b/contrib/sendmail/BuildTools/OS/SINIX
index 93cc78135012..3c27937af937 100644
--- a/contrib/sendmail/BuildTools/OS/SINIX
+++ b/contrib/sendmail/BuildTools/OS/SINIX
@@ -1,4 +1,4 @@
-# @(#)SINIX 8.5 (Berkeley) 2/12/98
+# @(#)SINIX 8.5 (Berkeley) 2/12/1998
define(`confCC', `/usr/bin/cc')
define(`confENVDEF', `-D__svr4__ ')
define(`confLIBS', `-lsocket -lnsl -lelf')
diff --git a/contrib/sendmail/BuildTools/OS/SVR4 b/contrib/sendmail/BuildTools/OS/SVR4
index f342c3feeb3e..92cf10101202 100644
--- a/contrib/sendmail/BuildTools/OS/SVR4
+++ b/contrib/sendmail/BuildTools/OS/SVR4
@@ -1,4 +1,4 @@
-# @(#)SVR4 8.6 (Berkeley) 3/12/98
+# @(#)SVR4 8.6 (Berkeley) 3/12/1998
define(`confCC', `gcc')
define(`confMAPDEF', `-DNDBM')
define(`confENVDEF', `-D__svr4__ ')
diff --git a/contrib/sendmail/BuildTools/OS/SunOS b/contrib/sendmail/BuildTools/OS/SunOS
index 2a8897825acf..9db95698a4b2 100644
--- a/contrib/sendmail/BuildTools/OS/SunOS
+++ b/contrib/sendmail/BuildTools/OS/SunOS
@@ -1,4 +1,4 @@
-# @(#)SunOS 8.6 (Berkeley) 3/12/98
+# @(#)SunOS 8.6 (Berkeley) 3/12/1998
define(`confMAPDEF', `-DNDBM -DNIS')
define(`confLDOPTS', `-Bstatic')
define(`confMBINDIR', `/usr/lib')
diff --git a/contrib/sendmail/BuildTools/OS/SunOS.4.0 b/contrib/sendmail/BuildTools/OS/SunOS.4.0
index 05bbc57d5049..0bcbc5f57754 100644
--- a/contrib/sendmail/BuildTools/OS/SunOS.4.0
+++ b/contrib/sendmail/BuildTools/OS/SunOS.4.0
@@ -1,4 +1,4 @@
-# @(#)SunOS.4.0 8.6 (Berkeley) 3/12/98
+# @(#)SunOS.4.0 8.6 (Berkeley) 3/12/1998
define(`confBEFORE', `stdlib.h stddef.h limits.h')
define(`confMAPDEF', `-DNDBM -DNIS')
define(`confENVDEF', `-DSUNOS403 ')
diff --git a/contrib/sendmail/BuildTools/OS/SunOS.5.1 b/contrib/sendmail/BuildTools/OS/SunOS.5.1
index 2383609ef14a..fe39bb9c3a73 100644
--- a/contrib/sendmail/BuildTools/OS/SunOS.5.1
+++ b/contrib/sendmail/BuildTools/OS/SunOS.5.1
@@ -1,4 +1,4 @@
-# @(#)SunOS.5.1 8.8 (Berkeley) 3/21/98
+# @(#)SunOS.5.1 8.8 (Berkeley) 3/21/1998
define(`confCC', `gcc')
define(`confBEFORE', `sysexits.h')
define(`confMAPDEF', `-DNDBM -DNIS')
diff --git a/contrib/sendmail/BuildTools/OS/SunOS.5.2 b/contrib/sendmail/BuildTools/OS/SunOS.5.2
index 5e635db694e2..80bc0870ae1d 100644
--- a/contrib/sendmail/BuildTools/OS/SunOS.5.2
+++ b/contrib/sendmail/BuildTools/OS/SunOS.5.2
@@ -1,4 +1,4 @@
-# @(#)SunOS.5.2 8.8 (Berkeley) 3/21/98
+# @(#)SunOS.5.2 8.8 (Berkeley) 3/21/1998
define(`confCC', `gcc')
define(`confBEFORE', `sysexits.h')
define(`confMAPDEF', `-DNDBM -DNIS')
diff --git a/contrib/sendmail/BuildTools/OS/SunOS.5.3 b/contrib/sendmail/BuildTools/OS/SunOS.5.3
index 8f64d219b7be..dcee93ec33de 100644
--- a/contrib/sendmail/BuildTools/OS/SunOS.5.3
+++ b/contrib/sendmail/BuildTools/OS/SunOS.5.3
@@ -1,4 +1,4 @@
-# @(#)SunOS.5.3 8.8 (Berkeley) 3/21/98
+# @(#)SunOS.5.3 8.8 (Berkeley) 3/21/1998
define(`confCC', `gcc')
define(`confBEFORE', `sysexits.h')
define(`confMAPDEF', `-DNDBM -DNIS -DNISPLUS')
diff --git a/contrib/sendmail/BuildTools/OS/SunOS.5.4 b/contrib/sendmail/BuildTools/OS/SunOS.5.4
index 65e84002c7b7..4a6b880a3138 100644
--- a/contrib/sendmail/BuildTools/OS/SunOS.5.4
+++ b/contrib/sendmail/BuildTools/OS/SunOS.5.4
@@ -1,4 +1,4 @@
-# @(#)SunOS.5.4 8.10 (Berkeley) 3/21/98
+# @(#)SunOS.5.4 8.10 (Berkeley) 3/21/1998
define(`confCC', `gcc')
define(`confBEFORE', `sysexits.h')
define(`confMAPDEF', `-DNDBM -DNIS -DNISPLUS')
diff --git a/contrib/sendmail/BuildTools/OS/SunOS.5.5 b/contrib/sendmail/BuildTools/OS/SunOS.5.5
index 267f16d22a1b..64264d7deb24 100644
--- a/contrib/sendmail/BuildTools/OS/SunOS.5.5
+++ b/contrib/sendmail/BuildTools/OS/SunOS.5.5
@@ -1,4 +1,4 @@
-# @(#)SunOS.5.5 8.11 (Berkeley) 3/21/98
+# @(#)SunOS.5.5 8.11 (Berkeley) 3/21/1998
define(`confCC', `gcc')
define(`confBEFORE', `sysexits.h')
define(`confMAPDEF', `-DNDBM -DNIS -DNISPLUS -DMAP_REGEX')
diff --git a/contrib/sendmail/BuildTools/OS/SunOS.5.6 b/contrib/sendmail/BuildTools/OS/SunOS.5.6
index 0537007008d1..da17de8ed32d 100644
--- a/contrib/sendmail/BuildTools/OS/SunOS.5.6
+++ b/contrib/sendmail/BuildTools/OS/SunOS.5.6
@@ -1,4 +1,4 @@
-# @(#)SunOS.5.6 8.10 (Berkeley) 3/21/98
+# @(#)SunOS.5.6 8.10 (Berkeley) 3/21/1998
define(`confCC', `gcc')
define(`confBEFORE', `sysexits.h')
define(`confMAPDEF', `-DNDBM -DNIS -DNISPLUS -DMAP_REGEX')
diff --git a/contrib/sendmail/BuildTools/OS/SunOS.5.7 b/contrib/sendmail/BuildTools/OS/SunOS.5.7
index b030e77c6506..962095dbbcbe 100644
--- a/contrib/sendmail/BuildTools/OS/SunOS.5.7
+++ b/contrib/sendmail/BuildTools/OS/SunOS.5.7
@@ -1,4 +1,4 @@
-# @(#)SunOS.5.7 8.11 (Berkeley) 3/21/98
+# @(#)SunOS.5.7 8.11 (Berkeley) 3/21/1998
define(`confCC', `gcc')
define(`confBEFORE', `sysexits.h')
define(`confMAPDEF', `-DNDBM -DNIS -DNISPLUS -DMAP_REGEX')
diff --git a/contrib/sendmail/BuildTools/OS/Titan b/contrib/sendmail/BuildTools/OS/Titan
index b66820089fd1..938b46df369c 100644
--- a/contrib/sendmail/BuildTools/OS/Titan
+++ b/contrib/sendmail/BuildTools/OS/Titan
@@ -1,4 +1,4 @@
-# @(#)Titan 8.5 (Berkeley) 3/12/98
+# @(#)Titan 8.5 (Berkeley) 3/12/1998
define(`confCC', `cc -43')
define(`confBEFORE', `stddef.h stdlib.h')
define(`confMAPDEF', `-DNDBM')
diff --git a/contrib/sendmail/BuildTools/OS/ULTRIX b/contrib/sendmail/BuildTools/OS/ULTRIX
index f5df633e52ef..e9073f97a56a 100644
--- a/contrib/sendmail/BuildTools/OS/ULTRIX
+++ b/contrib/sendmail/BuildTools/OS/ULTRIX
@@ -1,5 +1,5 @@
-# @(#)ULTRIX 8.7 (Berkeley) 3/12/98
-define(`confCC', `cc -Olimit 950')
+# @(#)ULTRIX 8.8 (Berkeley) 12/18/1998
+define(`confCC', `cc -Olimit 970')
define(`confMAPDEF', `-DNDBM -DNIS')
define(`confENVDEF', `-DIDENTPROTO=0 ')
define(`confMBINDIR', `/usr/lib')
diff --git a/contrib/sendmail/BuildTools/OS/UMAX b/contrib/sendmail/BuildTools/OS/UMAX
index 450c91da7500..078b827a8499 100644
--- a/contrib/sendmail/BuildTools/OS/UMAX
+++ b/contrib/sendmail/BuildTools/OS/UMAX
@@ -1,4 +1,4 @@
-# @(#)UMAX 8.5 (Berkeley) 3/12/98
+# @(#)UMAX 8.5 (Berkeley) 3/12/1998
define(`confBEFORE', `stddef.h')
define(`confMAPDEF', `-DNIS')
define(`confENVDEF', `-DUMAXV ')
diff --git a/contrib/sendmail/BuildTools/OS/UNICOS b/contrib/sendmail/BuildTools/OS/UNICOS
index 7984fa927c95..3b05dc059b9d 100644
--- a/contrib/sendmail/BuildTools/OS/UNICOS
+++ b/contrib/sendmail/BuildTools/OS/UNICOS
@@ -1,4 +1,4 @@
-# @(#)UNICOS 8.7 (Berkeley) 2/26/98
+# @(#)UNICOS 8.7 (Berkeley) 2/26/1998
define(`confENVDEF', `-DUNICOS ')
define(`confOPTIMIZE', `-O')
define(`confMBINDIR', `/usr/lib')
diff --git a/contrib/sendmail/BuildTools/OS/UNIX_SV.4.x.i386 b/contrib/sendmail/BuildTools/OS/UNIX_SV.4.x.i386
index a6865e786aed..b0e27537714d 100644
--- a/contrib/sendmail/BuildTools/OS/UNIX_SV.4.x.i386
+++ b/contrib/sendmail/BuildTools/OS/UNIX_SV.4.x.i386
@@ -1,4 +1,4 @@
-# @(#)UNIX_SV.4.x.i386 8.6 (Berkeley) 3/12/98
+# @(#)UNIX_SV.4.x.i386 8.6 (Berkeley) 3/12/1998
define(`confCC', `gcc')
define(`confMAPDEF', `-DNDBM')
define(`confENVDEF', `-D__svr4__ -DUNIXWARE ')
diff --git a/contrib/sendmail/BuildTools/OS/UX4800 b/contrib/sendmail/BuildTools/OS/UX4800
index 207b370baa0c..7c1822ae7054 100644
--- a/contrib/sendmail/BuildTools/OS/UX4800
+++ b/contrib/sendmail/BuildTools/OS/UX4800
@@ -1,4 +1,4 @@
-# @(#)UX4800 8.8 (Berkeley) 3/12/98
+# @(#)UX4800 8.8 (Berkeley) 3/12/1998
define(`confCC', `/usr/abiccs/bin/cc -KOlimit=900')
define(`confBEFORE', `sysexits.h ndbm.h')
define(`confMAPDEF', `-DNDBM -DNIS # without NEWDB')
diff --git a/contrib/sendmail/BuildTools/OS/UXPDS.V10 b/contrib/sendmail/BuildTools/OS/UXPDS.V10
index bf3014034378..438d88d1c8bf 100644
--- a/contrib/sendmail/BuildTools/OS/UXPDS.V10
+++ b/contrib/sendmail/BuildTools/OS/UXPDS.V10
@@ -1,4 +1,4 @@
-# @(#)UXPDS.V10 8.9 (Berkeley) 3/12/98
+# @(#)UXPDS.V10 8.9 (Berkeley) 3/12/1998
define(`confCC', `/usr/ccs/bin/cc')
define(`confMAPDEF', `-DNDBM -DNIS')
define(`confENVDEF', `-DUXPDS=10 ')
diff --git a/contrib/sendmail/BuildTools/OS/UXPDS.V20 b/contrib/sendmail/BuildTools/OS/UXPDS.V20
index cacdb4af68b3..f2d0b37bbcf6 100644
--- a/contrib/sendmail/BuildTools/OS/UXPDS.V20
+++ b/contrib/sendmail/BuildTools/OS/UXPDS.V20
@@ -1,4 +1,4 @@
-# @(#)UXPDS.V20 8.8 (Berkeley) 3/12/98
+# @(#)UXPDS.V20 8.8 (Berkeley) 3/12/1998
define(`confCC', `/usr/ccs/bin/cc')
define(`confBEFORE', `netinet/ip_var.h')
define(`confMAPDEF', `-DNDBM -DNIS')
diff --git a/contrib/sendmail/BuildTools/OS/UnixWare.5.i386 b/contrib/sendmail/BuildTools/OS/UnixWare.5.i386
new file mode 100644
index 000000000000..77ca82da0a26
--- /dev/null
+++ b/contrib/sendmail/BuildTools/OS/UnixWare.5.i386
@@ -0,0 +1,18 @@
+# @(#)UnixWare.5.i386 8.2 (Berkeley) 10/15/1998
+#
+# System V Rel 5.x (a.k.a Unixware7 w/o BSD-Compatiblity Libs ie. native)
+# Contributed by Paul Gampe <paulg@apnic.net>
+#
+define(`confCC', `/usr/ccs/bin/cc')
+define(`confMAPDEF', `-DNDBM -DMAP_REGEX')
+define(`confENVDEF', `-D__svr5__')
+define(`confLIBS', `-lsocket -lnsl -lelf')
+define(`confSHELL', `/usr/bin/sh')
+define(`confMBINDIR', `/usr/lib')
+define(`confSBINDIR', `/etc/mail')
+define(`confUBINDIR', `/etc/mail')
+define(`confEBINDIR', `/usr/lib')
+define(`confSBINGRP', `mail')
+define(`confSTDIR', `/etc/mail')
+define(`confHFDIR', `/etc/mail')
+define(`confINSTALL', `/usr/ucb/install')
diff --git a/contrib/sendmail/BuildTools/OS/dcosx.1.x.NILE b/contrib/sendmail/BuildTools/OS/dcosx.1.x.NILE
index 900afcd632b9..095de367dad8 100644
--- a/contrib/sendmail/BuildTools/OS/dcosx.1.x.NILE
+++ b/contrib/sendmail/BuildTools/OS/dcosx.1.x.NILE
@@ -1,4 +1,4 @@
-# @(#)dcosx.1.x.NILE 8.3 (Berkeley) 2/8/98
+# @(#)dcosx.1.x.NILE 8.3 (Berkeley) 2/8/1998
define(`confENVDEF', `-D__svr4__ -DDCOSx ')
define(`confLIBS', `-lsocket -lnsl -lelf')
define(`confHFDIR', `/usr/share/lib/mail')
diff --git a/contrib/sendmail/BuildTools/OS/dgux b/contrib/sendmail/BuildTools/OS/dgux
index 7d6d867b1ec1..66132c091b0f 100644
--- a/contrib/sendmail/BuildTools/OS/dgux
+++ b/contrib/sendmail/BuildTools/OS/dgux
@@ -1,4 +1,4 @@
-# @(#)dgux 8.5 (Berkeley) 3/12/98
+# @(#)dgux 8.5 (Berkeley) 3/12/1998
define(`confMAPDEF', `-DNDBM -DNIS')
define(`confLIBS', `-ldbm')
define(`confMBINDIR', `/usr/bin')
diff --git a/contrib/sendmail/BuildTools/OS/maxion b/contrib/sendmail/BuildTools/OS/maxion
index 3bb6e0e2e2cd..0177911dfe13 100644
--- a/contrib/sendmail/BuildTools/OS/maxion
+++ b/contrib/sendmail/BuildTools/OS/maxion
@@ -1,4 +1,4 @@
-# @(#)maxion 8.6 (Berkeley) 3/12/98
+# @(#)maxion 8.6 (Berkeley) 3/12/1998
define(`confCC', `/usr/ucb/cc')
define(`confMAPDEF', `-DNDBM -DNIS')
define(`confLIBDIRS', `-L/usr/ucblib')
diff --git a/contrib/sendmail/BuildTools/OS/uts.systemV b/contrib/sendmail/BuildTools/OS/uts.systemV
index c5f841fb5ab0..acee532530f5 100644
--- a/contrib/sendmail/BuildTools/OS/uts.systemV
+++ b/contrib/sendmail/BuildTools/OS/uts.systemV
@@ -1,4 +1,4 @@
-# @(#)uts.systemV 8.10 (Berkeley) 3/12/98
+# @(#)uts.systemV 8.10 (Berkeley) 3/12/1998
PUSHDIVERT(1)
# Sendmail 8 on UTS requires BIND 4.9's include files and lib44bsd and
# libresolv libraries. The BIND version on UTS is much too old.
diff --git a/contrib/sendmail/BuildTools/README b/contrib/sendmail/BuildTools/README
index 0efc1548b391..65726165c733 100644
--- a/contrib/sendmail/BuildTools/README
+++ b/contrib/sendmail/BuildTools/README
@@ -107,4 +107,4 @@ confUBINGRP bin The group for user-executable binaries.
confUBINMODE 555 The mode for user-executable binaries.
-@(#)README 8.22 (Berkeley) 6/30/98
+@(#)README 8.22 (Berkeley) 6/30/1998
diff --git a/contrib/sendmail/BuildTools/Site/README b/contrib/sendmail/BuildTools/Site/README
index d5ecb96001dc..44e14e886aad 100644
--- a/contrib/sendmail/BuildTools/Site/README
+++ b/contrib/sendmail/BuildTools/Site/README
@@ -13,4 +13,4 @@ directory.
See the README in the BuildTools directory for more information.
-@(#)README 8.3 (Berkeley) 3/27/98
+@(#)README 8.3 (Berkeley) 3/27/1998
diff --git a/contrib/sendmail/BuildTools/bin/Build b/contrib/sendmail/BuildTools/bin/Build
index ab8a49d78cac..bca061f54667 100755
--- a/contrib/sendmail/BuildTools/bin/Build
+++ b/contrib/sendmail/BuildTools/bin/Build
@@ -10,7 +10,7 @@
# the sendmail distribution.
#
#
-# @(#)Build 8.93 (Berkeley) 6/24/98
+# @(#)Build 8.93 (Berkeley) 6/24/1998
#
#
diff --git a/contrib/sendmail/BuildTools/bin/configure.sh b/contrib/sendmail/BuildTools/bin/configure.sh
index eb149b2cdd46..aff771c8127a 100644
--- a/contrib/sendmail/BuildTools/bin/configure.sh
+++ b/contrib/sendmail/BuildTools/bin/configure.sh
@@ -7,7 +7,7 @@
# the sendmail distribution.
#
#
-# @(#)configure.sh 8.27 (Berkeley) 5/19/98
+# @(#)configure.sh 8.27 (Berkeley) 5/19/1998
#
# Special script to autoconfigure for M4 generation of Makefile
diff --git a/contrib/sendmail/BuildTools/bin/find_m4.sh b/contrib/sendmail/BuildTools/bin/find_m4.sh
index d2cf66556d82..632e86f0467a 100755
--- a/contrib/sendmail/BuildTools/bin/find_m4.sh
+++ b/contrib/sendmail/BuildTools/bin/find_m4.sh
@@ -7,7 +7,7 @@
# the sendmail distribution.
#
#
-# @(#)find_m4.sh 8.4 (Berkeley) 5/19/98
+# @(#)find_m4.sh 8.4 (Berkeley) 5/19/1998
#
# Try to find a working M4 program.
diff --git a/contrib/sendmail/BuildTools/bin/install.sh b/contrib/sendmail/BuildTools/bin/install.sh
index 58f7623a1475..840aa3385ff9 100755
--- a/contrib/sendmail/BuildTools/bin/install.sh
+++ b/contrib/sendmail/BuildTools/bin/install.sh
@@ -7,7 +7,7 @@
# the sendmail distribution.
#
#
-# @(#)install.sh 8.9 (Berkeley) 5/19/98
+# @(#)install.sh 8.9 (Berkeley) 5/19/1998
# Set default program
program=mv
diff --git a/contrib/sendmail/KNOWNBUGS b/contrib/sendmail/KNOWNBUGS
index cd62b20eb12e..0a83bb0aaf97 100644
--- a/contrib/sendmail/KNOWNBUGS
+++ b/contrib/sendmail/KNOWNBUGS
@@ -65,9 +65,8 @@ This list is not guaranteed to be complete.
* accept() problem on Linux.
- Apparently, the accept() in sendmail daemon loop can return ETIMEDOUT
- and cause sendmail to sleep for 5 seconds during which time no new
- connections will be accepted. An error is reported to syslog:
+ The accept() in sendmail daemon loop can return ETIMEDOUT. An
+ error is reported to syslog:
Jun 9 17:14:12 hostname sendmail[207]: NOQUEUE: SYSERR(root):
getrequests: accept: Connection timed out
@@ -143,5 +142,12 @@ This list is not guaranteed to be complete.
MustQuoteChars even though it is not listed as a special character in
STD 11.
+* bestmx map with -z flag truncates the list of MX hosts
-(Version 8.32, last updated 6/30/98)
+ A bestmx map configured with the -z flag will truncate the list
+ of MX hosts. This prevents creation of strings which are too
+ long for ruleset parsing. This can have an adverse effect on the
+ relay_based_on_MX feature.
+
+
+(Version 8.34, last updated 12/17/1998)
diff --git a/contrib/sendmail/LICENSE b/contrib/sendmail/LICENSE
index bb1c3a79c7f0..d0ff63a9cb13 100644
--- a/contrib/sendmail/LICENSE
+++ b/contrib/sendmail/LICENSE
@@ -86,4 +86,4 @@ each of the following conditions is met:
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-(Version 8.6, last updated 6/24/98)
+(Version 8.6, last updated 6/24/1998)
diff --git a/contrib/sendmail/Makefile b/contrib/sendmail/Makefile
index 0b44c4203190..98ad6e5b8f4e 100644
--- a/contrib/sendmail/Makefile
+++ b/contrib/sendmail/Makefile
@@ -1,4 +1,4 @@
-# @(#)Makefile.dist 8.2 (Berkeley) 2/17/98
+# @(#)Makefile.dist 8.2 (Berkeley) 2/17/1998
SHELL= /bin/sh
SUBDIRS= src mail.local mailstats makemap praliases rmail smrsh
diff --git a/contrib/sendmail/README b/contrib/sendmail/README
index 5de10764212e..eff3fb2ef550 100644
--- a/contrib/sendmail/README
+++ b/contrib/sendmail/README
@@ -1,5 +1,5 @@
/*-
- * @(#)README 8.48 (Berkeley) 5/19/98
+ * @(#)README 8.50 (Berkeley) 12/17/1998
*/
SENDMAIL RELEASE 8
@@ -13,11 +13,12 @@ There is a web site at http://WWW.Sendmail.ORG -- see that site for
the latest updates.
******************************************************************
-** DO NOT USE MAKE to compile sendmail. Instead, cd src and **
-** use the "Build" shell script. On many environments this **
-** will do everything for you, no fuss, no muss. See **
-** src/README for more details of compilation. See cf/README **
-** for details about building a runtime configuration file. **
+** A new Build architecture is in place that allows you to **
+** use the "Build" shell script in any of the program **
+** directories. On many environments this will do everything **
+** for you, no fuss, no muss. See src/README for more details **
+** of compilation. See cf/README for details about building **
+** a runtime configuration file. **
******************************************************************
Sendmail is a trademark of Sendmail, Inc.
@@ -232,6 +233,7 @@ Important RFCs for electronic mail are:
RFC1894 An Extensible Message Format for Delivery Status
Notifications
RFC1985 SMTP Service Extension for Remote Message Queue Starting
+ RFC2033 Local Mail Transfer Protocol
Other standards that may be of interest (but which are less directly
relevant to sendmail) are:
diff --git a/contrib/sendmail/RELEASE_NOTES b/contrib/sendmail/RELEASE_NOTES
index 2b3475ffbcc6..a8d299a102f9 100644
--- a/contrib/sendmail/RELEASE_NOTES
+++ b/contrib/sendmail/RELEASE_NOTES
@@ -1,11 +1,187 @@
SENDMAIL RELEASE NOTES
- @(#)RELEASE_NOTES 8.9.1.1 (Berkeley) 7/2/98
+ @(#)RELEASE_NOTES 8.9.2.4 (Berkeley) 12/29/1998
This listing shows the version of the sendmail binary, the version
of the sendmail configuration files, the date of release, and a
summary of the changes in that release.
+8.9.2/8.9.2 98/12/30
+ SECURITY: Remove five second sleep on accepting daemon connections
+ due to an accept() failure. This sleep could be used
+ for a denial of service attack.
+ Do not silently ignore queue files with names which are too long.
+ Patch from Bryan Costales of InfoBeat, Inc.
+ Do not store failures closing an SMTP session in persistent
+ host status. Reported by Graeme Hewson of Oracle
+ Corporation UK.
+ Allow symbolic link forward files if they are in safe directories.
+ Problem noted by Andreas Schott of the Max Planck Society.
+ Missing columns in a text map could cause a segmentation fault.
+ Fix from David Lee of the University of Durham.
+ Note that for 8.9.X, PrivacyFlags=goaway also includes the
+ noetrn flag. This is scheduled to change in a future
+ version of sendmail. Problem noted by Theo Van Dinter of
+ Chrysalis Symbolic Designa and Alan Brown of Manawatu
+ Internet Services.
+ When trying to do host canonification in a Wildcard MX
+ environment, try an MX lookup of the hostname without the
+ default domain appended. Problem noted by Olaf Seibert of
+ Polderland Language & Speech Technology.
+ Reject SMTP RCPT To: commands with only comments (i.e.
+ 'RCPT TO: (comment)'. Problem noted by Earle Ake of
+ Hassler Communication Systems Technology, Inc.
+ Handle any number of %s in the LDAP filter spec. Patch from
+ Per Hedeland of Ericsson.
+ Clear ldapx open timeouts even if the map open failed to prevent
+ a segmentation fault. Patch from Wayne Knowles of the
+ National Institute of Water & Atmospheric Research Ltd.
+ Do not syslog envelope clone messages when using address
+ verification (-bv). Problem noted by Kari Hurtta of the
+ Finnish Meteorological Institute.
+ Continue to perform queue runs while in daemon mode even if the
+ daemon is rejecting connections due to a disk full
+ condition. Problem noted by JR Oldroyd of TerraNet
+ Internet Services.
+ Include full filename on installation of the sendmail.hf file
+ in case the $HFDIR directory does not exist. Problem
+ noted by Josef Svitak of Montana State University.
+ Close all maps when exiting the process with one exception.
+ Berkeley DB can use internal shared memory locking for
+ its memory pool. Closing a map opened by another process
+ will interfere with the shared memory and locks of the
+ parent process leaving things in a bad state. For
+ Berkeley DB, only close the map if the current process
+ is also the one that opened the map, otherwise only close
+ the map file descriptor. Thanks to Yoseff Francus of
+ Collective Technologies for volunteering his system for
+ extended testing.
+ Avoid null pointer dereference on XDEBUG output for SMTP reply
+ failures. Problem noted by Carlos Canau of EUnet Portugal.
+ On mailq and hoststat listings being piped to another program, such
+ as more, if the pipe closes (i.e. the user quits more),
+ stop sending output and exit. Patch from Allan E Johannesen
+ of Worcester Polytechnic Institute.
+ In accordance with the documentation, LDAP map lookup failures
+ are now considered temporary failures instead of permanent
+ failures unless the -t flag is used in the map definition.
+ Problem noted by Booker Bense of Stanford University and
+ Eric C. Hagberg of Morgan Stanley.
+ Fix by one error reporting on long alias names. Problem noted by
+ H. Paul Hammann of the Missouri Research and Education
+ Network.
+ Fix DontBlameSendmail=IncludeFileInUnsafeDirPath behavior. Problem
+ noted by Barry S. Finkel of Argonne National Laboratory.
+ When automatically converting from 8 bit to quoted printable MIME,
+ be careful not to miss a multi-part boundary if that
+ boundary is preceded by a boundary-like line. Problem
+ noted by Andreas Raschle of Ansid Inc. Fix from
+ Kari Hurtta of the Finnish Meteorological Institute.
+ Avoid bogus reporting of "LMTP tobuf overflow" when the buffer
+ has enough space for the additional address. Problem
+ noted by Steve Cliffe of the University of Wollongong.
+ Fix DontBlameSendmail=FileDeliveryToSymlinks behavior. Problem
+ noted by Alex Vorobiev of Swarthmore College.
+ If the check_compat ruleset resolves to the $#discard mailer,
+ discard the current recipient. Unlike check_relay,
+ check_mail, and check_rcpt, the entire envelope is not
+ discarded. Problem noted by RZ D. Rahlfs. Fix from
+ Claus Assmann of Christian-Albrechts-University of Kiel.
+ Avoid segmentation fault when reading ServiceSwitch files with
+ bogus formatting. Patch from Kari Hurtta of the Finnish
+ Meteorological Institute.
+ Support Berkeley DB 2.6.4 API change.
+ OP.ME: Pages weren't properly output on duplexed printers. Fix
+ from Matthew Black of CSU Long Beach.
+ Portability:
+ Apple Rhapsody from Wilfredo Sanchez of Apple Computer, Inc.
+ Avoid a clash with IRIX 6.2 getopt.h and the UserDatabase
+ option structure. Problem noted by Ashley M.
+ Kirchner of Photo Craft Laboratories, Inc.
+ Break out IP address to hostname translation for
+ reading network interface addresses into
+ class 'w'. Patch from John Kennedy of
+ Cal State University, Chico.
+ AIX 4.x use -qstrict with -O3 to prevent the optimized
+ from changing the semantics of the compiled
+ program. From Simon Travaglia of the
+ University of Waikato, New Zealand.
+ FreeBSD 2.2.2 and later support setusercontext(). From
+ Peter Wemm of DIALix.
+ FreeBSD 3.x fix from Peter Wemm of DIALix.
+ IRIX 5.x has a syslog buffer size of 512 bytes. From
+ Nao NINOMIYA of Utsunomiya University.
+ IRIX 6.5 64-bit Build support.
+ LDAP Version 3 support from John Beck and Ravi Iyer
+ of Sun Microsystems.
+ Linux does not implement seteuid() properly. From
+ John Kennedy of Cal State University, Chico.
+ Linux timezone type was set improperly. From Takeshi Itoh
+ of Bits Co., Ltd.
+ NCR MP-RAS 3.x needs -lresolv for confLIBS. From
+ Tom J. Moore of NCR.
+ NeXT 4.x correction to man page path. From J. P. McCann
+ of E I A.
+ System V Rel 5.x (a.k.a Unixware7 w/o BSD-Compatibility Libs)
+ from Paul Gampe of the Asia Pacific Network
+ Information Center.
+ ULTRIX now requires an optimization limit of 970 from
+ Allan E Johannesen of Worcester Polytechnic
+ Institute.
+ Fix extern declaration for sm_dopr(). Fix from Henk
+ van Oers of Algemeen Nederlands Persbureau.
+ CONFIG: Catch @hostname,user@anotherhost.domain as relaying.
+ Problem noted by Mark Rogov of AirMedia, Inc. Fix from
+ Claus Assmann of Christian-Albrechts-University of Kiel.
+ CONFIG: Do not refer to http://maps.vix.com/ on RBL rejections as
+ there are multiple RBL's available and the MAPS RBL may
+ not be the one in use. Suggested by Alan Brown of
+ Manawatu Internet Services.
+ CONFIG: Properly strip route addresses (i.e. @host1:user@host2)
+ when stripping down a recipient address to check for
+ relaying. Patch from Claus Assmann of
+ Christian-Albrechts-University of Kiel and Neil W Rickert
+ of Northern Illinois University.
+ CONFIG: Allow the access database to override RBL lookups. Patch
+ from Claus Assmann of Christian-Albrechts-University of
+ Kiel.
+ CONFIG: UnixWare 7 support from Phillip P. Porch of The Porch
+ Dot Com.
+ CONFIG: Fixed check for deferred delivery mode warning. Patch
+ from Claus Assmann of Christian-Albrechts-University of
+ Kiel and Per Hedeland of Ericsson.
+ CONFIG: If a recipient using % addressing is used, e.g.
+ user%site@othersite, and othersite's MX records are now
+ checked for local hosts if FEATURE(relay_based_on_MX) is
+ used. Problem noted by Alexander Litvin of Lucky Net Ltd.
+ Patch from Alexander Litvin of Lucky Net Ltd and
+ Claus Assmann of Christian-Albrechts-University of Kiel.
+ MAIL.LOCAL: Prevent warning messages from appearing in the LMTP
+ stream. Do not allow more than one response per recipient.
+ MAIL.LOCAL: Handle routed addresses properly when using LMTP. Fix
+ from John Beck of Sun Microsystems.
+ MAIL.LOCAL: Properly check for CRLF when using LMTP. Fix from
+ John Beck of Sun Microsystems.
+ MAIL.LOCAL: Substitute MAILER-DAEMON for the LMTP empty sender in
+ the envelope From header.
+ MAIL.LOCAL: Accept underscores in hostnames in LMTP mode.
+ Problem noted by Glenn A. Malling of Syracuse University.
+ MAILSTATS: Document msgsrej and msgsdis fields in the man page.
+ Problem noted by Richard Wong of Princeton University.
+ MAKEMAP: Build group list so group writable files are allowed with
+ the -s flag. Problem noted by Curt Sampson of Internet
+ Portal Services, Inc.
+ PRALIASES: Automatically handle alias files created without the
+ NULL byte at the end of the key. Patch from John Beck of
+ Sun Microsystems.
+ PRALIASES: Support Berkeley DB 2.6.4 API change.
+ New Files:
+ BuildTools/OS/IRIX64.6.5
+ BuildTools/OS/UnixWare.5.i386
+ cf/cf/unixware7.m4
+ contrib/smcontrol.pl
+ src/control.c
+
8.9.1/8.9.1 98/07/02
If both an OS specific site configuration file and a generic
site.config.m4 file existed, only the latter was used
@@ -88,6 +264,8 @@ summary of the changes in that release.
RMAIL: Do not install rmail by default, require 'make force-install'
as this rmail isn't the same as others. Suggested by
Kari Hurtta of the Finnish Meteorological Institute.
+ New Files:
+ BuildTools/OS/DomainOS.10.4
8.9.0/8.9.0 98/05/19
SECURITY: To prevent users from reading files not normally
diff --git a/contrib/sendmail/cf/README b/contrib/sendmail/cf/README
index df50c9da1d03..46a9475563f4 100644
--- a/contrib/sendmail/cf/README
+++ b/contrib/sendmail/cf/README
@@ -4,7 +4,7 @@
Eric Allman <eric@Sendmail.ORG>
- @(#)README 8.174 (Berkeley) 6/30/98
+ @(#)README 8.184 (Berkeley) 12/29/1998
This document describes the sendmail configuration files being used
@@ -719,6 +719,9 @@ nullclient This is a special case -- it creates a stripped down
they are qualified with the masquerade name, which
defaults to the name of the hub machine). No mailers
should be defined. No aliasing or forwarding is done.
+ Also, note that absolutely no anti-spam or anti-relaying
+ is done in a null client configuration. More information
+ can be found in the ANTI-SPAM CONFIGURATION CONTROL section.
local_lmtp Use an LMTP capable local mailer. The argument to this
feature is the pathname of an LMTP capable mailer. By
@@ -783,14 +786,27 @@ relay_hosts_only
relay_based_on_MX
Turns on the ability to allow relaying based on the MX
- records of the host portion of an incoming recipient. See
+ records of the host portion of an incoming recipient; that
+ is, if an MX record for host foo.com points to your site,
+ you will accept and relay mail addressed to foo.com. See
description below for more information before using this
- feature.
+ feature. Also, see the KNOWNBUGS entry regarding bestmx
+ map lookups.
+
+ FEATURE(relay_based_on_MX) does not necessarily allow
+ routing of these messages which you expect to be allowed,
+ if route address syntax (or %-hack syntax) is used. If
+ this is a problem, add entries to the access-table or use
+ FEATURE(loose_relay_check).
relay_local_from
Allows relaying if the domain portion of the mail sender
is a local host. This should only be used if absolutely
- necessary as it opens a window for spammers.
+ necessary as it opens a window for spammers. Specifically,
+ they can send mail to your mail server that claims to be
+ from your domain (either directly or via a routed address),
+ and you will go ahead and relay it out to arbitrary hosts
+ on the Internet.
accept_unqualified_senders
Normally, MAIL FROM: commands in the SMTP session will be
@@ -1203,7 +1219,8 @@ If you use
FEATURE(relay_entire_domain)
then any host in any of your local domains (that is, the $=m class)
-will be relayed.
+will be relayed (that is, you will accept mail either to or from any
+host in your domain).
You can also allow relaying based on the MX records of the host
portion of an incoming recipient address by using
@@ -1212,9 +1229,11 @@ portion of an incoming recipient address by using
For example, if your server receives a recipient of user@domain.com
and domain.com lists your server in its MX records, the mail will be
-accepted. Note that this will stop spammers from using your host to
-relay spam but it will not stop outsiders from using your server as a
-relay for their site. Along the same lines,
+accepted for relay to domain.com. Note that this will stop spammers
+from using your host to relay spam but it will not stop outsiders from
+using your server as a relay for their site (that is, they set up an
+MX record pointing to your mail server, and you will relay mail addressed
+to them without any prior arrangement). Along the same lines,
FEATURE(relay_local_from)
@@ -1265,28 +1284,39 @@ definition for the database; for example
FEATURE(access_db, hash -o /etc/mail/access)
+Remember, since /etc/mail/access is a database, after creating the text
+file as described below, you must use makemap to create the database
+map. For example:
+
+makemap hash /etc/mail/access < /etc/mail/access
+
The table itself uses e-mail addresses, domain names, and network
numbers as keys. For example,
spammer@aol.com REJECT
cyberspammer.com REJECT
- 206.117.147 REJECT
+ 192.168.212 REJECT
would refuse mail from spammer@aol.com, any user from cyberspammer.com
(or any host within the cyberspammer.com domain), and any host on the
-206.117.147.* network.
+192.168.212.* network.
The value part of the map can contain:
- OK accept mail even if other rules in the
- running ruleset would reject it.
- RELAY Allow domain to relay through your SMTP
- server. RELAY also serves an implicit
- OK for the other checks.
- REJECT reject the sender/recipient with a general
+ OK Accept mail even if other rules in the
+ running ruleset would reject it, for example,
+ if the domain name is unresolvable.
+ RELAY Accept mail addressed to the indicated domain or
+ received from the indicated domain for relaying
+ through your SMTP server. RELAY also serves as
+ an implicit OK for the other checks.
+ REJECT Reject the sender or recipient with a general
purpose message.
- DISCARD discard the message completely using
- the $#discard mailer
+ DISCARD Discard the message completely using the
+ $#discard mailer. This only works for sender
+ addresses (i.e., it indicates that you should
+ discard anything received from the indicated
+ domain).
### any text where ### is an RFC 821 compliant error code
and "any text" is a message to return for
the command.
@@ -1333,7 +1363,15 @@ domains, or addresses in your domain which should not receive mail:
This would prevent a recipient of badlocaluser@mydomain.com, any
user at host.mydomain.com, and the single address
-user@otherhost.mydomain.com from receiving mail.
+user@otherhost.mydomain.com from receiving mail. Enabling this
+feature will keep you from sending mails to all addresses that
+have an error message or REJECT as value part in the access map.
+Taking the example from above:
+
+ spammer@aol.com REJECT
+ cyberspammer.com REJECT
+
+Mail can't be sent to spammer@aol.com or anyone at cyberspammer.com.
There is also a ``Realtime Blackhole List'' run by the MAPS project
at http://maps.vix.com/. This is a database maintained in DNS of
@@ -1382,6 +1420,17 @@ a Message-ID: header:
R< $+ @ $+ > $@ OK
R$* $#error $: 553 Header Error
+Users of FEATURE(nullclient) who desire to use the anti-spam and
+anti-relaying capabilities should replace FEATURE(nullclient, mailhub)
+with:
+
+ undefine(`ALIAS_FILE')
+ define(`MAIL_HUB', `mailhub')
+ define(`SMART_HOST', `mailhub')
+ define(`confFORWARD_PATH', `')
+
+where mailhub is the fully qualified hostname for their mail server.
+
+--------------------------------+
| ADDING NEW MAILERS OR RULESETS |
@@ -1712,7 +1761,7 @@ confAUTO_REBUILD AutoRebuildAliases
file if needed.
confERROR_MODE ErrorMode [print] Error message mode.
confERROR_MESSAGE ErrorHeader [undefined] Error message header/file.
-confSAVE_FROM_LINES SafeFromLine Save extra leading From_ lines.
+confSAVE_FROM_LINES SaveFromLine Save extra leading From_ lines.
confTEMP_FILE_MODE TempFileMode [0600] Temporary file mode.
confMATCH_GECOS MatchGECOS [False] Match GECOS field.
confMAX_HOP MaxHopCount [25] Maximum hop count.
diff --git a/contrib/sendmail/cf/cf/Build b/contrib/sendmail/cf/cf/Build
index 3efaffdcdba8..3a91477cdf10 100755
--- a/contrib/sendmail/cf/cf/Build
+++ b/contrib/sendmail/cf/cf/Build
@@ -7,7 +7,7 @@
# the sendmail distribution.
#
#
-# @(#)Build 8.3 (Berkeley) 5/19/98
+# @(#)Build 8.3 (Berkeley) 5/19/1998
#
#
diff --git a/contrib/sendmail/cf/cf/Makefile b/contrib/sendmail/cf/cf/Makefile
index 8b6fb4d64e96..7d0f373d348e 100644
--- a/contrib/sendmail/cf/cf/Makefile
+++ b/contrib/sendmail/cf/cf/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for configuration files.
#
-# @(#)Makefile 8.17 (Berkeley) 4/2/98
+# @(#)Makefile 8.17 (Berkeley) 4/2/1998
#
#
diff --git a/contrib/sendmail/cf/cf/chez.cs.mc b/contrib/sendmail/cf/cf/chez.cs.mc
index 9858330bd407..a5334b5a50ab 100644
--- a/contrib/sendmail/cf/cf/chez.cs.mc
+++ b/contrib/sendmail/cf/cf/chez.cs.mc
@@ -23,7 +23,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)chez.cs.mc 8.11 (Berkeley) 5/19/98')
+VERSIONID(`@(#)chez.cs.mc 8.11 (Berkeley) 5/19/1998')
OSTYPE(bsd4.4)dnl
DOMAIN(CS.Berkeley.EDU)dnl
define(`LOCAL_RELAY', vangogh.CS.Berkeley.EDU)dnl
diff --git a/contrib/sendmail/cf/cf/clientproto.mc b/contrib/sendmail/cf/cf/clientproto.mc
index f0a6ae7d6b23..b0fd9bdf4a5e 100644
--- a/contrib/sendmail/cf/cf/clientproto.mc
+++ b/contrib/sendmail/cf/cf/clientproto.mc
@@ -27,7 +27,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)clientproto.mc 8.12 (Berkeley) 5/19/98')
+VERSIONID(`@(#)clientproto.mc 8.12 (Berkeley) 5/19/1998')
OSTYPE(unknown)
FEATURE(nullclient, mailhost.$m)
diff --git a/contrib/sendmail/cf/cf/cs-hpux10.mc b/contrib/sendmail/cf/cf/cs-hpux10.mc
index 527f9308b990..0be009c5b6b1 100644
--- a/contrib/sendmail/cf/cf/cs-hpux10.mc
+++ b/contrib/sendmail/cf/cf/cs-hpux10.mc
@@ -22,7 +22,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)cs-hpux10.mc 8.10 (Berkeley) 5/19/98')
+VERSIONID(`@(#)cs-hpux10.mc 8.10 (Berkeley) 5/19/1998')
OSTYPE(hpux10)dnl
DOMAIN(CS.Berkeley.EDU)dnl
define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl
diff --git a/contrib/sendmail/cf/cf/cs-hpux9.mc b/contrib/sendmail/cf/cf/cs-hpux9.mc
index f65505296fec..9b5edfe3ea48 100644
--- a/contrib/sendmail/cf/cf/cs-hpux9.mc
+++ b/contrib/sendmail/cf/cf/cs-hpux9.mc
@@ -22,7 +22,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)cs-hpux9.mc 8.11 (Berkeley) 5/19/98')
+VERSIONID(`@(#)cs-hpux9.mc 8.11 (Berkeley) 5/19/1998')
OSTYPE(hpux9)dnl
DOMAIN(CS.Berkeley.EDU)dnl
define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl
diff --git a/contrib/sendmail/cf/cf/cs-osf1.mc b/contrib/sendmail/cf/cf/cs-osf1.mc
index ba35c04ac687..230023ceb137 100644
--- a/contrib/sendmail/cf/cf/cs-osf1.mc
+++ b/contrib/sendmail/cf/cf/cs-osf1.mc
@@ -22,7 +22,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)cs-osf1.mc 8.10 (Berkeley) 5/19/98')
+VERSIONID(`@(#)cs-osf1.mc 8.10 (Berkeley) 5/19/1998')
OSTYPE(osf1)dnl
DOMAIN(CS.Berkeley.EDU)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/cf/cs-solaris2.mc b/contrib/sendmail/cf/cf/cs-solaris2.mc
index 395d19fc7aa5..03fd5e275586 100644
--- a/contrib/sendmail/cf/cf/cs-solaris2.mc
+++ b/contrib/sendmail/cf/cf/cs-solaris2.mc
@@ -22,7 +22,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)cs-solaris2.mc 8.9 (Berkeley) 5/19/98')
+VERSIONID(`@(#)cs-solaris2.mc 8.9 (Berkeley) 5/19/1998')
OSTYPE(solaris2)dnl
DOMAIN(CS.Berkeley.EDU)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/cf/cs-sunos4.1.mc b/contrib/sendmail/cf/cf/cs-sunos4.1.mc
index 45dcd124d99f..39136399732a 100644
--- a/contrib/sendmail/cf/cf/cs-sunos4.1.mc
+++ b/contrib/sendmail/cf/cf/cs-sunos4.1.mc
@@ -22,7 +22,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)cs-sunos4.1.mc 8.10 (Berkeley) 5/19/98')
+VERSIONID(`@(#)cs-sunos4.1.mc 8.10 (Berkeley) 5/19/1998')
OSTYPE(sunos4.1)dnl
DOMAIN(CS.Berkeley.EDU)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/cf/cs-ultrix4.mc b/contrib/sendmail/cf/cf/cs-ultrix4.mc
index f2a4b423b907..a12b9898ef35 100644
--- a/contrib/sendmail/cf/cf/cs-ultrix4.mc
+++ b/contrib/sendmail/cf/cf/cs-ultrix4.mc
@@ -22,7 +22,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)cs-ultrix4.mc 8.10 (Berkeley) 5/19/98')
+VERSIONID(`@(#)cs-ultrix4.mc 8.10 (Berkeley) 5/19/1998')
OSTYPE(ultrix4)dnl
DOMAIN(CS.Berkeley.EDU)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/cf/generic-bsd4.4.mc b/contrib/sendmail/cf/cf/generic-bsd4.4.mc
index 106fa31c44dd..b09760532d49 100644
--- a/contrib/sendmail/cf/cf/generic-bsd4.4.mc
+++ b/contrib/sendmail/cf/cf/generic-bsd4.4.mc
@@ -20,7 +20,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)generic-bsd4.4.mc 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)generic-bsd4.4.mc 8.7 (Berkeley) 5/19/1998')
OSTYPE(bsd4.4)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/cf/generic-hpux10.mc b/contrib/sendmail/cf/cf/generic-hpux10.mc
index 1a7eda909423..200050557c7f 100644
--- a/contrib/sendmail/cf/cf/generic-hpux10.mc
+++ b/contrib/sendmail/cf/cf/generic-hpux10.mc
@@ -19,7 +19,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)generic-hpux10.mc 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)generic-hpux10.mc 8.8 (Berkeley) 5/19/1998')
OSTYPE(hpux10)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/cf/generic-hpux9.mc b/contrib/sendmail/cf/cf/generic-hpux9.mc
index 6aaf3b65e3de..531b4eec5572 100644
--- a/contrib/sendmail/cf/cf/generic-hpux9.mc
+++ b/contrib/sendmail/cf/cf/generic-hpux9.mc
@@ -19,7 +19,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)generic-hpux9.mc 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)generic-hpux9.mc 8.8 (Berkeley) 5/19/1998')
OSTYPE(hpux9)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/cf/generic-nextstep3.3.mc b/contrib/sendmail/cf/cf/generic-nextstep3.3.mc
index 5c81faaf6e7a..1511ce7bb919 100644
--- a/contrib/sendmail/cf/cf/generic-nextstep3.3.mc
+++ b/contrib/sendmail/cf/cf/generic-nextstep3.3.mc
@@ -19,7 +19,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)generic-nextstep3.3.mc 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)generic-nextstep3.3.mc 8.7 (Berkeley) 5/19/1998')
OSTYPE(nextstep)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/cf/generic-osf1.mc b/contrib/sendmail/cf/cf/generic-osf1.mc
index 2113b927223f..83858d13680a 100644
--- a/contrib/sendmail/cf/cf/generic-osf1.mc
+++ b/contrib/sendmail/cf/cf/generic-osf1.mc
@@ -19,7 +19,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)generic-osf1.mc 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)generic-osf1.mc 8.8 (Berkeley) 5/19/1998')
OSTYPE(osf1)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/cf/generic-solaris2.mc b/contrib/sendmail/cf/cf/generic-solaris2.mc
index 1e1aa96a6c43..a696e019a9aa 100644
--- a/contrib/sendmail/cf/cf/generic-solaris2.mc
+++ b/contrib/sendmail/cf/cf/generic-solaris2.mc
@@ -19,7 +19,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)generic-solaris2.mc 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)generic-solaris2.mc 8.8 (Berkeley) 5/19/1998')
OSTYPE(solaris2)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/cf/generic-sunos4.1.mc b/contrib/sendmail/cf/cf/generic-sunos4.1.mc
index 7e916c15ea88..fc0de356137b 100644
--- a/contrib/sendmail/cf/cf/generic-sunos4.1.mc
+++ b/contrib/sendmail/cf/cf/generic-sunos4.1.mc
@@ -19,7 +19,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)generic-sunos4.1.mc 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)generic-sunos4.1.mc 8.8 (Berkeley) 5/19/1998')
OSTYPE(sunos4.1)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/cf/generic-ultrix4.mc b/contrib/sendmail/cf/cf/generic-ultrix4.mc
index 8c900b86e713..6fed36e8af5d 100644
--- a/contrib/sendmail/cf/cf/generic-ultrix4.mc
+++ b/contrib/sendmail/cf/cf/generic-ultrix4.mc
@@ -19,7 +19,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)generic-ultrix4.mc 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)generic-ultrix4.mc 8.8 (Berkeley) 5/19/1998')
OSTYPE(ultrix4)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/cf/huginn.cs.mc b/contrib/sendmail/cf/cf/huginn.cs.mc
index 949e917882d5..a58d121f09ae 100644
--- a/contrib/sendmail/cf/cf/huginn.cs.mc
+++ b/contrib/sendmail/cf/cf/huginn.cs.mc
@@ -21,7 +21,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)huginn.cs.mc 8.12 (Berkeley) 5/19/98')
+VERSIONID(`@(#)huginn.cs.mc 8.12 (Berkeley) 5/19/1998')
OSTYPE(hpux9)dnl
DOMAIN(CS.Berkeley.EDU)dnl
MASQUERADE_AS(CS.Berkeley.EDU)dnl
diff --git a/contrib/sendmail/cf/cf/knecht.mc b/contrib/sendmail/cf/cf/knecht.mc
index 97e5e43eb36a..026c8fbca0c0 100644
--- a/contrib/sendmail/cf/cf/knecht.mc
+++ b/contrib/sendmail/cf/cf/knecht.mc
@@ -16,7 +16,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)knecht.mc 8.30 (Berkeley) 6/11/98')
+VERSIONID(`@(#)knecht.mc 8.30 (Berkeley) 6/11/1998')
OSTYPE(bsd4.4)dnl
DOMAIN(generic)dnl
define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward+$h:$z/.forward')dnl
diff --git a/contrib/sendmail/cf/cf/mail.cs.mc b/contrib/sendmail/cf/cf/mail.cs.mc
index 1ecf34e2a910..8abd9451ca9b 100644
--- a/contrib/sendmail/cf/cf/mail.cs.mc
+++ b/contrib/sendmail/cf/cf/mail.cs.mc
@@ -21,7 +21,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)mail.cs.mc 8.15 (Berkeley) 5/19/98')
+VERSIONID(`@(#)mail.cs.mc 8.15 (Berkeley) 5/19/1998')
OSTYPE(ultrix4)dnl
DOMAIN(Berkeley.EDU)dnl
MASQUERADE_AS(CS.Berkeley.EDU)dnl
diff --git a/contrib/sendmail/cf/cf/mail.eecs.mc b/contrib/sendmail/cf/cf/mail.eecs.mc
index 42d053d70ee1..6522141d265c 100644
--- a/contrib/sendmail/cf/cf/mail.eecs.mc
+++ b/contrib/sendmail/cf/cf/mail.eecs.mc
@@ -21,7 +21,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)mail.eecs.mc 8.15 (Berkeley) 5/19/98')
+VERSIONID(`@(#)mail.eecs.mc 8.15 (Berkeley) 5/19/1998')
OSTYPE(ultrix4)dnl
DOMAIN(EECS.Berkeley.EDU)dnl
MASQUERADE_AS(EECS.Berkeley.EDU)dnl
diff --git a/contrib/sendmail/cf/cf/mailspool.cs.mc b/contrib/sendmail/cf/cf/mailspool.cs.mc
index 7ae62b24d607..08dcce6cc9c7 100644
--- a/contrib/sendmail/cf/cf/mailspool.cs.mc
+++ b/contrib/sendmail/cf/cf/mailspool.cs.mc
@@ -23,7 +23,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)mailspool.cs.mc 8.9 (Berkeley) 5/19/98')
+VERSIONID(`@(#)mailspool.cs.mc 8.9 (Berkeley) 5/19/1998')
OSTYPE(sunos4.1)dnl
DOMAIN(CS.Berkeley.EDU)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/cf/python.cs.mc b/contrib/sendmail/cf/cf/python.cs.mc
index 2cb111d0b655..ddf4fc34300b 100644
--- a/contrib/sendmail/cf/cf/python.cs.mc
+++ b/contrib/sendmail/cf/cf/python.cs.mc
@@ -23,7 +23,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)python.cs.mc 8.9 (Berkeley) 5/19/98')
+VERSIONID(`@(#)python.cs.mc 8.9 (Berkeley) 5/19/1998')
OSTYPE(bsd4.4)dnl
DOMAIN(CS.Berkeley.EDU)dnl
define(`LOCAL_RELAY', vangogh.CS.Berkeley.EDU)dnl
diff --git a/contrib/sendmail/cf/cf/s2k-osf1.mc b/contrib/sendmail/cf/cf/s2k-osf1.mc
index 1c7b1ccd1d74..6f1099a69fd3 100644
--- a/contrib/sendmail/cf/cf/s2k-osf1.mc
+++ b/contrib/sendmail/cf/cf/s2k-osf1.mc
@@ -22,7 +22,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)s2k-osf1.mc 8.10 (Berkeley) 5/19/98')
+VERSIONID(`@(#)s2k-osf1.mc 8.10 (Berkeley) 5/19/1998')
OSTYPE(osf1)dnl
DOMAIN(S2K.Berkeley.EDU)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/cf/s2k-ultrix4.mc b/contrib/sendmail/cf/cf/s2k-ultrix4.mc
index 06c70d45be63..db8e45599753 100644
--- a/contrib/sendmail/cf/cf/s2k-ultrix4.mc
+++ b/contrib/sendmail/cf/cf/s2k-ultrix4.mc
@@ -22,7 +22,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)s2k-ultrix4.mc 8.10 (Berkeley) 5/19/98')
+VERSIONID(`@(#)s2k-ultrix4.mc 8.10 (Berkeley) 5/19/1998')
OSTYPE(ultrix4)dnl
DOMAIN(S2K.Berkeley.EDU)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/cf/tcpproto.mc b/contrib/sendmail/cf/cf/tcpproto.mc
index eb6eadecb656..692a08fbb375 100644
--- a/contrib/sendmail/cf/cf/tcpproto.mc
+++ b/contrib/sendmail/cf/cf/tcpproto.mc
@@ -25,7 +25,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)tcpproto.mc 8.10 (Berkeley) 5/19/98')
+VERSIONID(`@(#)tcpproto.mc 8.10 (Berkeley) 5/19/1998')
OSTYPE(unknown)
FEATURE(nouucp)
MAILER(local)
diff --git a/contrib/sendmail/cf/cf/ucbarpa.mc b/contrib/sendmail/cf/cf/ucbarpa.mc
index 925d47fefb74..40bb6c22636c 100644
--- a/contrib/sendmail/cf/cf/ucbarpa.mc
+++ b/contrib/sendmail/cf/cf/ucbarpa.mc
@@ -20,7 +20,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)ucbarpa.mc 8.9 (Berkeley) 5/19/98')
+VERSIONID(`@(#)ucbarpa.mc 8.9 (Berkeley) 5/19/1998')
DOMAIN(CS.Berkeley.EDU)dnl
OSTYPE(bsd4.4)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/cf/ucbvax.mc b/contrib/sendmail/cf/cf/ucbvax.mc
index 76027fb951e4..2395f8264559 100644
--- a/contrib/sendmail/cf/cf/ucbvax.mc
+++ b/contrib/sendmail/cf/cf/ucbvax.mc
@@ -21,7 +21,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)ucbvax.mc 8.11 (Berkeley) 5/19/98')
+VERSIONID(`@(#)ucbvax.mc 8.11 (Berkeley) 5/19/1998')
OSTYPE(bsd4.3)
DOMAIN(CS.Berkeley.EDU)
MASQUERADE_AS(CS.Berkeley.EDU)
diff --git a/contrib/sendmail/cf/cf/uucpproto.mc b/contrib/sendmail/cf/cf/uucpproto.mc
index 4f1c54a332e2..a547d1037fa6 100644
--- a/contrib/sendmail/cf/cf/uucpproto.mc
+++ b/contrib/sendmail/cf/cf/uucpproto.mc
@@ -25,7 +25,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)uucpproto.mc 8.12 (Berkeley) 5/19/98')
+VERSIONID(`@(#)uucpproto.mc 8.12 (Berkeley) 5/19/1998')
OSTYPE(unknown)
FEATURE(promiscuous_relay)dnl
FEATURE(accept_unresolvable_domains)dnl
diff --git a/contrib/sendmail/cf/cf/vangogh.cs.mc b/contrib/sendmail/cf/cf/vangogh.cs.mc
index deefc29febde..f60dca79c368 100644
--- a/contrib/sendmail/cf/cf/vangogh.cs.mc
+++ b/contrib/sendmail/cf/cf/vangogh.cs.mc
@@ -22,7 +22,7 @@ divert(-1)
#
divert(0)dnl
-VERSIONID(`@(#)vangogh.cs.mc 8.10 (Berkeley) 5/19/98')
+VERSIONID(`@(#)vangogh.cs.mc 8.10 (Berkeley) 5/19/1998')
DOMAIN(CS.Berkeley.EDU)dnl
OSTYPE(bsd4.4)dnl
MAILER(local)dnl
diff --git a/contrib/sendmail/cf/domain/Berkeley.EDU.m4 b/contrib/sendmail/cf/domain/Berkeley.EDU.m4
index 48e151b7b285..85d5e5be60d5 100644
--- a/contrib/sendmail/cf/domain/Berkeley.EDU.m4
+++ b/contrib/sendmail/cf/domain/Berkeley.EDU.m4
@@ -11,7 +11,7 @@ divert(-1)
#
#
divert(0)
-VERSIONID(`@(#)Berkeley.EDU.m4 8.14 (Berkeley) 5/19/98')
+VERSIONID(`@(#)Berkeley.EDU.m4 8.14 (Berkeley) 5/19/1998')
DOMAIN(berkeley-only)dnl
define(`BITNET_RELAY', `bitnet-relay.Berkeley.EDU')dnl
define(`UUCP_RELAY', `uucp-relay.Berkeley.EDU')dnl
diff --git a/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4 b/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4
index 20309210b8c6..5609ce8464a5 100644
--- a/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4
+++ b/contrib/sendmail/cf/domain/CS.Berkeley.EDU.m4
@@ -11,7 +11,7 @@ divert(-1)
#
#
divert(0)
-VERSIONID(`@(#)CS.Berkeley.EDU.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)CS.Berkeley.EDU.m4 8.7 (Berkeley) 5/19/1998')
DOMAIN(Berkeley.EDU)dnl
HACK(cssubdomain)dnl
define(`confUSERDB_SPEC',
diff --git a/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4 b/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4
index 022dddd13a57..095fbc800e6e 100644
--- a/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4
+++ b/contrib/sendmail/cf/domain/EECS.Berkeley.EDU.m4
@@ -11,6 +11,6 @@ divert(-1)
#
#
divert(0)
-VERSIONID(`@(#)EECS.Berkeley.EDU.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)EECS.Berkeley.EDU.m4 8.7 (Berkeley) 5/19/1998')
DOMAIN(Berkeley.EDU)dnl
MASQUERADE_AS(EECS.Berkeley.EDU)dnl
diff --git a/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4 b/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4
index 14965a6bff0e..a951f8b24e34 100644
--- a/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4
+++ b/contrib/sendmail/cf/domain/S2K.Berkeley.EDU.m4
@@ -11,6 +11,6 @@ divert(-1)
#
#
divert(0)
-VERSIONID(`@(#)S2K.Berkeley.EDU.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)S2K.Berkeley.EDU.m4 8.7 (Berkeley) 5/19/1998')
DOMAIN(CS.Berkeley.EDU)dnl
MASQUERADE_AS(postgres.Berkeley.EDU)dnl
diff --git a/contrib/sendmail/cf/domain/berkeley-only.m4 b/contrib/sendmail/cf/domain/berkeley-only.m4
index d3d770811c68..805bab6a682a 100644
--- a/contrib/sendmail/cf/domain/berkeley-only.m4
+++ b/contrib/sendmail/cf/domain/berkeley-only.m4
@@ -11,7 +11,7 @@ divert(-1)
#
#
divert(0)
-VERSIONID(`@(#)unspecified-domain.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)unspecified-domain.m4 8.7 (Berkeley) 5/19/1998')
errprint(`*** ERROR: You are trying to use the Berkeley sample configuration')
errprint(` files outside of the Computer Science Division at Berkeley.')
errprint(` The configuration (.mc) files must be customized to reference')
diff --git a/contrib/sendmail/cf/domain/generic.m4 b/contrib/sendmail/cf/domain/generic.m4
index 1329e4499b81..93057d09a98e 100644
--- a/contrib/sendmail/cf/domain/generic.m4
+++ b/contrib/sendmail/cf/domain/generic.m4
@@ -19,7 +19,7 @@ divert(-1)
# files.
#
divert(0)
-VERSIONID(`@(#)generic.m4 8.9 (Berkeley) 5/19/98')
+VERSIONID(`@(#)generic.m4 8.9 (Berkeley) 5/19/1998')
define(`confFORWARD_PATH', `$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward')dnl
FEATURE(redirect)dnl
FEATURE(use_cw_file)dnl
diff --git a/contrib/sendmail/cf/feature/accept_unqualified_senders.m4 b/contrib/sendmail/cf/feature/accept_unqualified_senders.m4
index 16bef7825394..bf1b1e798452 100644
--- a/contrib/sendmail/cf/feature/accept_unqualified_senders.m4
+++ b/contrib/sendmail/cf/feature/accept_unqualified_senders.m4
@@ -9,7 +9,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)accept_unqualified_senders.m4 8.3 (Berkeley) 5/19/98')
+VERSIONID(`@(#)accept_unqualified_senders.m4 8.3 (Berkeley) 5/19/1998')
divert(-1)
define(`_ACCEPT_UNQUALIFIED_SENDERS_', 1)
diff --git a/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4 b/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4
index 5b7241a314e5..cbc4747d2207 100644
--- a/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4
+++ b/contrib/sendmail/cf/feature/accept_unresolvable_domains.m4
@@ -9,7 +9,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)accept_unresolvable_domains.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)accept_unresolvable_domains.m4 8.7 (Berkeley) 5/19/1998')
divert(-1)
define(`_ACCEPT_UNRESOLVABLE_DOMAINS_', 1)
diff --git a/contrib/sendmail/cf/feature/access_db.m4 b/contrib/sendmail/cf/feature/access_db.m4
index 85820723deee..75b5551ac2ce 100644
--- a/contrib/sendmail/cf/feature/access_db.m4
+++ b/contrib/sendmail/cf/feature/access_db.m4
@@ -9,7 +9,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)access_db.m4 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)access_db.m4 8.8 (Berkeley) 5/19/1998')
divert(-1)
define(`ACCESS_TABLE',
diff --git a/contrib/sendmail/cf/feature/allmasquerade.m4 b/contrib/sendmail/cf/feature/allmasquerade.m4
index 42121e5cc488..ed622dcac6c6 100644
--- a/contrib/sendmail/cf/feature/allmasquerade.m4
+++ b/contrib/sendmail/cf/feature/allmasquerade.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)allmasquerade.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)allmasquerade.m4 8.7 (Berkeley) 5/19/1998')
divert(-1)
diff --git a/contrib/sendmail/cf/feature/always_add_domain.m4 b/contrib/sendmail/cf/feature/always_add_domain.m4
index e609bf000277..69092e31d008 100644
--- a/contrib/sendmail/cf/feature/always_add_domain.m4
+++ b/contrib/sendmail/cf/feature/always_add_domain.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)always_add_domain.m4 8.6 (Berkeley) 5/19/98')
+VERSIONID(`@(#)always_add_domain.m4 8.6 (Berkeley) 5/19/1998')
divert(-1)
define(`_ALWAYS_ADD_DOMAIN_', 1)
diff --git a/contrib/sendmail/cf/feature/bestmx_is_local.m4 b/contrib/sendmail/cf/feature/bestmx_is_local.m4
index 2d3048809ecc..40643877af88 100644
--- a/contrib/sendmail/cf/feature/bestmx_is_local.m4
+++ b/contrib/sendmail/cf/feature/bestmx_is_local.m4
@@ -12,9 +12,11 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)bestmx_is_local.m4 8.12 (Berkeley) 5/19/98')
+VERSIONID(`@(#)bestmx_is_local.m4 8.13 (Berkeley) 8/13/1998')
divert(-1)
+define(_BESTMX_IS_LOCAL_, _ARG_)
+
LOCAL_CONFIG
# turn on bestMX lookup table
Kbestmx bestmx
diff --git a/contrib/sendmail/cf/feature/bitdomain.m4 b/contrib/sendmail/cf/feature/bitdomain.m4
index be5155bd3242..7f9a181e4826 100644
--- a/contrib/sendmail/cf/feature/bitdomain.m4
+++ b/contrib/sendmail/cf/feature/bitdomain.m4
@@ -12,7 +12,11 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)bitdomain.m4 8.13 (Berkeley) 5/19/98')
+VERSIONID(`@(#)bitdomain.m4 8.14 (Berkeley) 10/6/1998')
divert(-1)
-define(`BITDOMAIN_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/bitdomain', `_ARG_'))dnl
+define(`BITDOMAIN_TABLE', ifelse(_ARG_, `',
+ ifdef(`_USE_ETC_MAIL_',
+ DATABASE_MAP_TYPE` -o /etc/mail/bitdomain',
+ DATABASE_MAP_TYPE` -o /etc/bitdomain'),
+ `_ARG_'))dnl
diff --git a/contrib/sendmail/cf/feature/blacklist_recipients.m4 b/contrib/sendmail/cf/feature/blacklist_recipients.m4
index 4417fe093695..e3478d36ff1a 100644
--- a/contrib/sendmail/cf/feature/blacklist_recipients.m4
+++ b/contrib/sendmail/cf/feature/blacklist_recipients.m4
@@ -9,7 +9,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)blacklist_recipients.m4 8.9 (Berkeley) 5/19/98')
+VERSIONID(`@(#)blacklist_recipients.m4 8.9 (Berkeley) 5/19/1998')
divert(-1)
ifdef(`ACCESS_TABLE',
diff --git a/contrib/sendmail/cf/feature/domaintable.m4 b/contrib/sendmail/cf/feature/domaintable.m4
index 0bf9f05fb340..e7303dcdd87c 100644
--- a/contrib/sendmail/cf/feature/domaintable.m4
+++ b/contrib/sendmail/cf/feature/domaintable.m4
@@ -12,7 +12,12 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)domaintable.m4 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)domaintable.m4 8.9 (Berkeley) 10/6/1998')
divert(-1)
-define(`DOMAIN_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/domaintable', `_ARG_'))dnl
+define(`DOMAIN_TABLE', ifelse(_ARG_, `',
+ ifdef(`_USE_ETC_MAIL_',
+ DATABASE_MAP_TYPE` -o /etc/mail/domaintable',
+ DATABASE_MAP_TYPE` -o /etc/domaintable'),
+ `_ARG_'))dnl
+
diff --git a/contrib/sendmail/cf/feature/genericstable.m4 b/contrib/sendmail/cf/feature/genericstable.m4
index ec7a4d3f7d51..654db5d9a168 100644
--- a/contrib/sendmail/cf/feature/genericstable.m4
+++ b/contrib/sendmail/cf/feature/genericstable.m4
@@ -12,7 +12,11 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)genericstable.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)genericstable.m4 8.8 (Berkeley) 10/6/1998')
divert(-1)
-define(`GENERICS_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/genericstable', `_ARG_'))dnl
+define(`GENERICS_TABLE', ifelse(_ARG_, `',
+ ifdef(`_USE_ETC_MAIL_',
+ DATABASE_MAP_TYPE` -o /etc/mail/genericstable',
+ DATABASE_MAP_TYPE` -o /etc/genericstable'),
+ `_ARG_'))dnl
diff --git a/contrib/sendmail/cf/feature/limited_masquerade.m4 b/contrib/sendmail/cf/feature/limited_masquerade.m4
index ae5e868ed966..b036ae134be6 100644
--- a/contrib/sendmail/cf/feature/limited_masquerade.m4
+++ b/contrib/sendmail/cf/feature/limited_masquerade.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)limited_masquerade.m4 8.6 (Berkeley) 5/19/98')
+VERSIONID(`@(#)limited_masquerade.m4 8.6 (Berkeley) 5/19/1998')
divert(-1)
define(`_LIMITED_MASQUERADE_', 1)
diff --git a/contrib/sendmail/cf/feature/local_lmtp.m4 b/contrib/sendmail/cf/feature/local_lmtp.m4
index f323b5b1908e..f328ce54a293 100644
--- a/contrib/sendmail/cf/feature/local_lmtp.m4
+++ b/contrib/sendmail/cf/feature/local_lmtp.m4
@@ -9,7 +9,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)local_lmtp.m4 8.5 (Berkeley) 5/19/98')
+VERSIONID(`@(#)local_lmtp.m4 8.5 (Berkeley) 5/19/1998')
divert(-1)
define(`LOCAL_MAILER_PATH',
diff --git a/contrib/sendmail/cf/feature/local_procmail.m4 b/contrib/sendmail/cf/feature/local_procmail.m4
index adf1237b3987..20618dd5551c 100644
--- a/contrib/sendmail/cf/feature/local_procmail.m4
+++ b/contrib/sendmail/cf/feature/local_procmail.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)local_procmail.m4 8.11 (Berkeley) 5/19/98')
+VERSIONID(`@(#)local_procmail.m4 8.11 (Berkeley) 5/19/1998')
divert(-1)
define(`LOCAL_MAILER_PATH',
diff --git a/contrib/sendmail/cf/feature/loose_relay_check.m4 b/contrib/sendmail/cf/feature/loose_relay_check.m4
index 6e3584b02ed8..988e44144f6a 100644
--- a/contrib/sendmail/cf/feature/loose_relay_check.m4
+++ b/contrib/sendmail/cf/feature/loose_relay_check.m4
@@ -9,7 +9,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)loose_relay_check.m4 8.3 (Berkeley) 5/19/98')
+VERSIONID(`@(#)loose_relay_check.m4 8.3 (Berkeley) 5/19/1998')
divert(-1)
define(`_LOOSE_RELAY_CHECK_', 1)
diff --git a/contrib/sendmail/cf/feature/mailertable.m4 b/contrib/sendmail/cf/feature/mailertable.m4
index 3078261a452c..71a41adf3a75 100644
--- a/contrib/sendmail/cf/feature/mailertable.m4
+++ b/contrib/sendmail/cf/feature/mailertable.m4
@@ -12,7 +12,11 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)mailertable.m4 8.9 (Berkeley) 5/19/98')
+VERSIONID(`@(#)mailertable.m4 8.10 (Berkeley) 10/6/1998')
divert(-1)
-define(`MAILER_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/mailertable', `_ARG_'))dnl
+define(`MAILER_TABLE', ifelse(_ARG_, `',
+ ifdef(`_USE_ETC_MAIL_',
+ DATABASE_MAP_TYPE` -o /etc/mail/mailertable',
+ DATABASE_MAP_TYPE` -o /etc/mailertable'),
+ `_ARG_'))dnl
diff --git a/contrib/sendmail/cf/feature/masquerade_entire_domain.m4 b/contrib/sendmail/cf/feature/masquerade_entire_domain.m4
index 9766ae4499a0..4455b9a70851 100644
--- a/contrib/sendmail/cf/feature/masquerade_entire_domain.m4
+++ b/contrib/sendmail/cf/feature/masquerade_entire_domain.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)masquerade_entire_domain.m4 8.6 (Berkeley) 5/19/98')
+VERSIONID(`@(#)masquerade_entire_domain.m4 8.6 (Berkeley) 5/19/1998')
divert(-1)
define(`_MASQUERADE_ENTIRE_DOMAIN_', 1)
diff --git a/contrib/sendmail/cf/feature/masquerade_envelope.m4 b/contrib/sendmail/cf/feature/masquerade_envelope.m4
index 75d257e64f5d..276c7f41d40c 100644
--- a/contrib/sendmail/cf/feature/masquerade_envelope.m4
+++ b/contrib/sendmail/cf/feature/masquerade_envelope.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)masquerade_envelope.m4 8.6 (Berkeley) 5/19/98')
+VERSIONID(`@(#)masquerade_envelope.m4 8.6 (Berkeley) 5/19/1998')
divert(-1)
define(`_MASQUERADE_ENVELOPE_', 1)
diff --git a/contrib/sendmail/cf/feature/nocanonify.m4 b/contrib/sendmail/cf/feature/nocanonify.m4
index 6211a8ebec55..279a8eaae1bc 100644
--- a/contrib/sendmail/cf/feature/nocanonify.m4
+++ b/contrib/sendmail/cf/feature/nocanonify.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)nocanonify.m4 8.6 (Berkeley) 5/19/98')
+VERSIONID(`@(#)nocanonify.m4 8.6 (Berkeley) 5/19/1998')
divert(-1)
define(`_NO_CANONIFY_', 1)
diff --git a/contrib/sendmail/cf/feature/nodns.m4 b/contrib/sendmail/cf/feature/nodns.m4
index 26458fc3af89..5d383d5475e7 100644
--- a/contrib/sendmail/cf/feature/nodns.m4
+++ b/contrib/sendmail/cf/feature/nodns.m4
@@ -12,10 +12,10 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)nodns.m4 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)nodns.m4 8.9 (Berkeley) 10/6/1998')
divert(-1)
undefine(`confBIND_OPTS')dnl
errprint(`FEATURE(nodns) is no-op.
-Use ServiceSwitchFile ('ifdef(`confSERVICE_SWITCH_FILE',confSERVICE_SWITCH_FILE,`/etc/service.switch' if your OS does not provide its own)`) instead.
+Use ServiceSwitchFile ('ifdef(`confSERVICE_SWITCH_FILE',confSERVICE_SWITCH_FILE,ifdef(`_USE_ETC_MAIL_',`/etc/mail/service.switch',`/etc/service.switch'))`) if your OS does not provide its own instead.
')
diff --git a/contrib/sendmail/cf/feature/notsticky.m4 b/contrib/sendmail/cf/feature/notsticky.m4
index 4fa344d70696..5ba6b2f70ce1 100644
--- a/contrib/sendmail/cf/feature/notsticky.m4
+++ b/contrib/sendmail/cf/feature/notsticky.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)notsticky.m4 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)notsticky.m4 8.8 (Berkeley) 5/19/1998')
#
# This is now the default. Use ``FEATURE(stickyhost)'' if you want
# the old default behaviour.
diff --git a/contrib/sendmail/cf/feature/nouucp.m4 b/contrib/sendmail/cf/feature/nouucp.m4
index 3c1098cac4e6..7cf241f77f70 100644
--- a/contrib/sendmail/cf/feature/nouucp.m4
+++ b/contrib/sendmail/cf/feature/nouucp.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)nouucp.m4 8.6 (Berkeley) 5/19/98')
+VERSIONID(`@(#)nouucp.m4 8.6 (Berkeley) 5/19/1998')
divert(-1)
define(`_NO_UUCP_', 1)
diff --git a/contrib/sendmail/cf/feature/nullclient.m4 b/contrib/sendmail/cf/feature/nullclient.m4
index 1df782e24dea..99346ae03153 100644
--- a/contrib/sendmail/cf/feature/nullclient.m4
+++ b/contrib/sendmail/cf/feature/nullclient.m4
@@ -23,7 +23,7 @@ POPDIVERT
# sendmail.
#
-VERSIONID(`@(#)nullclient.m4 8.12 (Berkeley) 5/19/98')
+VERSIONID(`@(#)nullclient.m4 8.12 (Berkeley) 5/19/1998')
PUSHDIVERT(6)
# hub host (to which all mail is sent)
diff --git a/contrib/sendmail/cf/feature/promiscuous_relay.m4 b/contrib/sendmail/cf/feature/promiscuous_relay.m4
index 975afab752d6..cc3dae62f639 100644
--- a/contrib/sendmail/cf/feature/promiscuous_relay.m4
+++ b/contrib/sendmail/cf/feature/promiscuous_relay.m4
@@ -9,7 +9,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)promiscuous_relay.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)promiscuous_relay.m4 8.7 (Berkeley) 5/19/1998')
divert(-1)
define(`_PROMISCUOUS_RELAY_', 1)
diff --git a/contrib/sendmail/cf/feature/rbl.m4 b/contrib/sendmail/cf/feature/rbl.m4
index a9251e049782..0284aa3cbd87 100644
--- a/contrib/sendmail/cf/feature/rbl.m4
+++ b/contrib/sendmail/cf/feature/rbl.m4
@@ -9,7 +9,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)rbl.m4 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)rbl.m4 8.8 (Berkeley) 5/19/1998')
divert(-1)
define(`_RBL_', ifelse(_ARG_, `', `rbl.maps.vix.com', `_ARG_'))dnl
diff --git a/contrib/sendmail/cf/feature/redirect.m4 b/contrib/sendmail/cf/feature/redirect.m4
index 721d2260c284..a9b333ff1c88 100644
--- a/contrib/sendmail/cf/feature/redirect.m4
+++ b/contrib/sendmail/cf/feature/redirect.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)redirect.m4 8.10 (Berkeley) 5/19/98')
+VERSIONID(`@(#)redirect.m4 8.10 (Berkeley) 5/19/1998')
divert(-1)
diff --git a/contrib/sendmail/cf/feature/relay_based_on_MX.m4 b/contrib/sendmail/cf/feature/relay_based_on_MX.m4
index 44d07116ceb0..f19e89b6d782 100644
--- a/contrib/sendmail/cf/feature/relay_based_on_MX.m4
+++ b/contrib/sendmail/cf/feature/relay_based_on_MX.m4
@@ -9,7 +9,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)relay_based_on_MX.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)relay_based_on_MX.m4 8.7 (Berkeley) 5/19/1998')
divert(-1)
define(`_RELAY_MX_SERVED_', 1)
diff --git a/contrib/sendmail/cf/feature/relay_entire_domain.m4 b/contrib/sendmail/cf/feature/relay_entire_domain.m4
index 823da1e50ff1..c932a70ab396 100644
--- a/contrib/sendmail/cf/feature/relay_entire_domain.m4
+++ b/contrib/sendmail/cf/feature/relay_entire_domain.m4
@@ -9,7 +9,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)relay_entire_domain.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)relay_entire_domain.m4 8.7 (Berkeley) 5/19/1998')
divert(-1)
define(`_RELAY_ENTIRE_DOMAIN_', 1)
diff --git a/contrib/sendmail/cf/feature/relay_hosts_only.m4 b/contrib/sendmail/cf/feature/relay_hosts_only.m4
index 98f72c8f82d8..35f7ab528494 100644
--- a/contrib/sendmail/cf/feature/relay_hosts_only.m4
+++ b/contrib/sendmail/cf/feature/relay_hosts_only.m4
@@ -9,7 +9,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)relay_hosts_only.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)relay_hosts_only.m4 8.7 (Berkeley) 5/19/1998')
divert(-1)
define(`_RELAY_HOSTS_ONLY_', 1)
diff --git a/contrib/sendmail/cf/feature/relay_local_from.m4 b/contrib/sendmail/cf/feature/relay_local_from.m4
index 549bc9c74232..ab040f6c2ff3 100644
--- a/contrib/sendmail/cf/feature/relay_local_from.m4
+++ b/contrib/sendmail/cf/feature/relay_local_from.m4
@@ -9,7 +9,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)relay_local_from.m4 8.2 (Berkeley) 5/19/98')
+VERSIONID(`@(#)relay_local_from.m4 8.2 (Berkeley) 5/19/1998')
divert(-1)
define(`_RELAY_LOCAL_FROM_', 1)
diff --git a/contrib/sendmail/cf/feature/smrsh.m4 b/contrib/sendmail/cf/feature/smrsh.m4
index 2c47632649b3..3b44fa88a67d 100644
--- a/contrib/sendmail/cf/feature/smrsh.m4
+++ b/contrib/sendmail/cf/feature/smrsh.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)smrsh.m4 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)smrsh.m4 8.8 (Berkeley) 5/19/1998')
divert(-1)
ifdef(`_MAILER_local_',
diff --git a/contrib/sendmail/cf/feature/stickyhost.m4 b/contrib/sendmail/cf/feature/stickyhost.m4
index 8bbeb49cac62..1d0d1cd590e4 100644
--- a/contrib/sendmail/cf/feature/stickyhost.m4
+++ b/contrib/sendmail/cf/feature/stickyhost.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)stickyhost.m4 8.6 (Berkeley) 5/19/98')
+VERSIONID(`@(#)stickyhost.m4 8.6 (Berkeley) 5/19/1998')
divert(-1)
define(`_STICKY_LOCAL_DOMAIN_', 1)
diff --git a/contrib/sendmail/cf/feature/use_ct_file.m4 b/contrib/sendmail/cf/feature/use_ct_file.m4
index 344d178504d1..924dd06e0c8f 100644
--- a/contrib/sendmail/cf/feature/use_ct_file.m4
+++ b/contrib/sendmail/cf/feature/use_ct_file.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)use_ct_file.m4 8.6 (Berkeley) 5/19/98')
+VERSIONID(`@(#)use_ct_file.m4 8.6 (Berkeley) 5/19/1998')
divert(-1)
# if defined, the sendmail.cf will read the /etc/sendmail.ct file
diff --git a/contrib/sendmail/cf/feature/use_cw_file.m4 b/contrib/sendmail/cf/feature/use_cw_file.m4
index 9abf2c1b4992..5bbbf7b2b07b 100644
--- a/contrib/sendmail/cf/feature/use_cw_file.m4
+++ b/contrib/sendmail/cf/feature/use_cw_file.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)use_cw_file.m4 8.6 (Berkeley) 5/19/98')
+VERSIONID(`@(#)use_cw_file.m4 8.6 (Berkeley) 5/19/1998')
divert(-1)
# if defined, the sendmail.cf will read the /etc/sendmail.cw file
diff --git a/contrib/sendmail/cf/feature/uucpdomain.m4 b/contrib/sendmail/cf/feature/uucpdomain.m4
index 1c6a33a81fa7..0c584aa2e59f 100644
--- a/contrib/sendmail/cf/feature/uucpdomain.m4
+++ b/contrib/sendmail/cf/feature/uucpdomain.m4
@@ -12,7 +12,11 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)uucpdomain.m4 8.13 (Berkeley) 5/19/98')
+VERSIONID(`@(#)uucpdomain.m4 8.14 (Berkeley) 10/6/1998')
divert(-1)
-define(`UUDOMAIN_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/uudomain', `_ARG_'))dnl
+define(`UUDOMAIN_TABLE', ifelse(_ARG_, `',
+ ifdef(`_USE_ETC_MAIL_',
+ DATABASE_MAP_TYPE` -o /etc/mail/uudomain',
+ DATABASE_MAP_TYPE` -o /etc/uudomain'),
+ `_ARG_'))dnl
diff --git a/contrib/sendmail/cf/feature/virtusertable.m4 b/contrib/sendmail/cf/feature/virtusertable.m4
index 337f635766c0..316f7ea61dcd 100644
--- a/contrib/sendmail/cf/feature/virtusertable.m4
+++ b/contrib/sendmail/cf/feature/virtusertable.m4
@@ -12,7 +12,11 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)virtusertable.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)virtusertable.m4 8.8 (Berkeley) 10/6/1998')
divert(-1)
-define(`VIRTUSER_TABLE', ifelse(_ARG_, `', DATABASE_MAP_TYPE` -o /etc/virtusertable', `_ARG_'))dnl
+define(`VIRTUSER_TABLE', ifelse(_ARG_, `',
+ ifdef(`_USE_ETC_MAIL_',
+ DATABASE_MAP_TYPE` -o /etc/mail/virtusertable',
+ DATABASE_MAP_TYPE` -o /etc/virtusertable'),
+ `_ARG_'))dnl
diff --git a/contrib/sendmail/cf/hack/cssubdomain.m4 b/contrib/sendmail/cf/hack/cssubdomain.m4
index b79b69b5b119..6297d64b6c85 100644
--- a/contrib/sendmail/cf/hack/cssubdomain.m4
+++ b/contrib/sendmail/cf/hack/cssubdomain.m4
@@ -11,7 +11,7 @@ divert(-1)
#
#
divert(0)
-VERSIONID(`@(#)cssubdomain.m4 8.6 (Berkeley) 5/19/98')
+VERSIONID(`@(#)cssubdomain.m4 8.6 (Berkeley) 5/19/1998')
divert(2)
# find possible (old & new) versions of our name via short circuit hack
diff --git a/contrib/sendmail/cf/m4/cf.m4 b/contrib/sendmail/cf/m4/cf.m4
index 21655822b226..0b058098e32b 100644
--- a/contrib/sendmail/cf/m4/cf.m4
+++ b/contrib/sendmail/cf/m4/cf.m4
@@ -25,4 +25,4 @@ ifdef(`_CF_DIR_', `',
divert(0)dnl
ifdef(`OSTYPE', `dnl',
`include(_CF_DIR_`'m4/cfhead.m4)dnl
-VERSIONID(`@(#)cf.m4 8.29 (Berkeley) 5/19/98')')
+VERSIONID(`@(#)cf.m4 8.29 (Berkeley) 5/19/1998')')
diff --git a/contrib/sendmail/cf/m4/cfhead.m4 b/contrib/sendmail/cf/m4/cfhead.m4
index a7a109856d4e..9a5ccd224b25 100644
--- a/contrib/sendmail/cf/m4/cfhead.m4
+++ b/contrib/sendmail/cf/m4/cfhead.m4
@@ -105,7 +105,7 @@ define(`_OPTINS', `ifdef(`$1', `$2$1$3')')
m4wrap(`include(_CF_DIR_`m4/proto.m4')')
# set up default values for options
-define(`ALIAS_FILE', `/etc/aliases')
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/etc/aliases'))
define(`confMAILER_NAME', ``MAILER-DAEMON'')
define(`confFROM_LINE', `From $g $d')
define(`confOPERATORS', `.:%@!^/[]+')
@@ -133,10 +133,10 @@ define(`confSAFE_QUEUE', `True')
define(`confTO_QUEUERETURN', `5d')
define(`confTO_QUEUEWARN', `4h')
define(`confTIME_ZONE', `USE_SYSTEM')
-define(`confCW_FILE', `/etc/sendmail.cw')
+define(`confCW_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/local-host-names', `/etc/sendmail.cw'))
define(`confMIME_FORMAT_ERRORS', `True')
define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward')
define(`confCR_FILE', `-o /etc/mail/relay-domains')
divert(0)dnl
-VERSIONID(`@(#)cfhead.m4 8.22 (Berkeley) 5/19/98')
+VERSIONID(`@(#)cfhead.m4 8.23 (Berkeley) 10/6/1998')
diff --git a/contrib/sendmail/cf/m4/nullrelay.m4 b/contrib/sendmail/cf/m4/nullrelay.m4
index 02020697a862..b71fd570654c 100644
--- a/contrib/sendmail/cf/m4/nullrelay.m4
+++ b/contrib/sendmail/cf/m4/nullrelay.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)nullrelay.m4 8.19 (Berkeley) 5/19/98')
+VERSIONID(`@(#)nullrelay.m4 8.19 (Berkeley) 5/19/1998')
#
# This configuration applies only to relay-only hosts. They send
diff --git a/contrib/sendmail/cf/m4/proto.m4 b/contrib/sendmail/cf/m4/proto.m4
index d8842bfff1f5..8e79454bc04e 100644
--- a/contrib/sendmail/cf/m4/proto.m4
+++ b/contrib/sendmail/cf/m4/proto.m4
@@ -12,12 +12,12 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)proto.m4 8.223 (Berkeley) 6/30/98')
+VERSIONID(`@(#)proto.m4 8.237 (Berkeley) 12/17/1998')
MAILER(local)dnl
# level 8 config file format
-V8/Berkeley
+V8/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley')
divert(-1)
# do some sanity checking
@@ -220,7 +220,7 @@ ifdef(`_NULL_CLIENT_ONLY_', `dnl', `
_OPTION(AliasWait, `confALIAS_WAIT', 5m)
# location of alias file
-_OPTION(AliasFile, `ALIAS_FILE', /etc/aliases)
+_OPTION(AliasFile, `ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', /etc/mail/aliases, /etc/aliases))
')
# minimum number of free blocks on filesystem
_OPTION(MinFreeBlocks, `confMIN_FREE_BLOCKS', 100)
@@ -244,7 +244,7 @@ _OPTION(DeliveryMode, `confDELIVERY_MODE', background)
_OPTION(AutoRebuildAliases, `confAUTO_REBUILD')
# error message header/file
-_OPTION(ErrorHeader, `confERROR_MESSAGE', /etc/sendmail.oE)
+_OPTION(ErrorHeader, `confERROR_MESSAGE', ifdef(`_USE_ETC_MAIL_', /etc/mail/error-header, /etc/sendmail.oE))
# error mode
_OPTION(ErrorMode, `confERROR_MODE', print)
@@ -262,7 +262,7 @@ _OPTION(MatchGECOS, `confMATCH_GECOS')
_OPTION(MaxHopCount, `confMAX_HOP', 17)
# location of help file
-O HelpFile=ifdef(`HELP_FILE', HELP_FILE, /usr/lib/sendmail.hf)
+O HelpFile=ifdef(`HELP_FILE', HELP_FILE, ifdef(`_USE_ETC_MAIL_', /etc/mail/helpfile, /usr/lib/sendmail.hf))
# ignore dots as terminators in incoming messages?
_OPTION(IgnoreDots, `confIGNORE_DOTS')
@@ -351,7 +351,7 @@ _OPTION(DontPruneRoutes, `confDONT_PRUNE_ROUTES')
_OPTION(SuperSafe, `confSAFE_QUEUE')
# status file
-O StatusFile=ifdef(`STATUS_FILE', `STATUS_FILE', /etc/sendmail.st)
+O StatusFile=ifdef(`STATUS_FILE', `STATUS_FILE', ifdef(`_USE_ETC_MAIL_', /etc/mail/statistics, /etc/sendmail.st))
# time zone handling:
# if undefined, use system default
@@ -365,7 +365,7 @@ ifelse(confTIME_ZONE, `USE_SYSTEM', `#O TimeZoneSpec=',
_OPTION(DefaultUser, `confDEF_USER_ID', mailnull)
# list of locations of user database file (null means no lookup)
-_OPTION(UserDatabaseSpec, `confUSERDB_SPEC', /etc/userdb)
+_OPTION(UserDatabaseSpec, `confUSERDB_SPEC', ifdef(`_USE_ETC_MAIL_', /etc/mail/userdb, /etc/userdb))
# fallback MX host
_OPTION(FallbackMXhost, `confFALLBACK_MX', fall.back.host.net)
@@ -407,7 +407,7 @@ _OPTION(MinQueueAge, `confMIN_QUEUE_AGE', 30m)
_OPTION(DefaultCharSet, `confDEF_CHAR_SET', iso-8859-1)
# service switch file (ignored on Solaris, Ultrix, OSF/1, others)
-_OPTION(ServiceSwitchFile, `confSERVICE_SWITCH_FILE', /etc/service.switch)
+_OPTION(ServiceSwitchFile, `confSERVICE_SWITCH_FILE', ifdef(`_USE_ETC_MAIL_', /etc/mail/service.switch, /etc/service.switch))
# hosts file (normally /etc/hosts)
_OPTION(HostsFile, `confHOSTS_FILE', /etc/hosts)
@@ -466,6 +466,19 @@ _OPTION(MaxRecipientsPerMessage, `confMAX_RCPTS_PER_MESSAGE', 100)
# shall we get local names from our installed interfaces?
_OPTION(DontProbeInterfaces, `confDONT_PROBE_INTERFACES')
+ifdef(`confTRUSTED_USER',
+`# Trusted user for file ownership and starting the daemon
+O TrustedUser=confTRUSTED_USER
+')
+ifdef(`confCONTROL_SOCKET_NAME',
+`# Control socket for daemon management
+O ControlSocketName=confCONTROL_SOCKET_NAME
+')
+ifdef(`confMAX_MIME_HEADER_LENGTH',
+`# Maximum MIME header length to protect MUAs
+O MaxMimeHeaderLength=confMAX_MIME_HEADER_LENGTH
+')
+
###########################
# Message precedences #
###########################
@@ -481,7 +494,7 @@ Pjunk=-100
#####################
# this is equivalent to setting class "t"
-ifdef(`_USE_CT_FILE_', `', `#')Ft`'ifdef(`confCT_FILE', confCT_FILE, `/etc/sendmail.ct')
+ifdef(`_USE_CT_FILE_', `', `#')Ft`'ifdef(`confCT_FILE', confCT_FILE, ifdef(`_USE_ETC_MAIL_', `/etc/mail/trusted-users', `/etc/sendmail.ct'))
Troot
Tdaemon
ifdef(`_NO_UUCP_', `dnl', `Tuucp')
@@ -827,7 +840,7 @@ R$* < @ $* > $* $: $>95 < $S > $1 < @ $2 > $3 glue on smarthost name
# deal with other remote names
ifdef(`_MAILER_smtp_',
`R$* < @$* > $* $#_SMTP_ $@ $2 $: $1 < @ $2 > $3 user@host.domain',
-`R$* < @$* > $* $#error $@ 5.1.2 $: "Unrecognized host name" $2')
+`R$* < @$* > $* $#error $@ 5.1.2 $: "Unrecognized host name " $2')
# handle locally delivered names
R$=L $#_LOCAL_ $: @ $1 special local names
@@ -965,7 +978,7 @@ ifdef(`_MASQUERADE_ENVELOPE_',
S98
undivert(3)dnl
-ifelse(confDELIVERY_MODE, defer, `errprint(`WARNING: Antispam rules not available in deferred delivery mode.')')
+ifelse(substr(confDELIVERY_MODE,0,1), `d', `errprint(`WARNING: Antispam rules not available in deferred delivery mode.')')
ifdef(`ACCESS_TABLE', `dnl
######################################################################
### LookUpDomain -- search for domain in access database
@@ -999,6 +1012,24 @@ R<$*> <$+> <$+> <$*> $@ <$1> <$4>',
`dnl')
######################################################################
+### CanonAddr -- Convert an address into a standard form for
+### relay checking. Route address syntax is
+### crudely converted into a %-hack address.
+###
+### Parameters:
+### $1 -- full recipient address
+###
+### Returns:
+### parsed address, not in source route form
+######################################################################
+
+SCanonAddr
+R$* $: $>Parse0 $>3 $1 make domain canonical
+R< @ $+ > : $* @ $* < @ $1 > : $2 % $3 change @ to % in src route
+R$* < @ $+ > : $* : $* $3 $1 < @ $2 > : $4 change to % hack.
+R$* < @ $+ > : $* $3 $1 < @ $2 >
+
+######################################################################
### ParseRecipient -- Strip off hosts in $=R as well as possibly
### $* $=m or the access database.
### Check user portion for host separators.
@@ -1011,27 +1042,35 @@ R<$*> <$+> <$+> <$*> $@ <$1> <$4>',
######################################################################
SParseRecipient
-R$* $: <?> $>Parse0 $>3 $1
-R<?> $* < @ $* . > <?> $1 < @ $2 > strip trailing dots
-R<?> $- < @ $* > $: <?> $(dequote $1 $) < @ $2 > dequote local part
+R$* $: <?> $>CanonAddr $1
+R<?> $* < @ $* . > <?> $1 < @ $2 > strip trailing dots
+R<?> $- < @ $* > $: <?> $(dequote $1 $) < @ $2 > dequote local part
# if no $=O character, no host in the user portion, we are done
-R<?> $* $=O $* < @ $* > $: <NO> $1 $2 $3 < @ $4>
-R<?> $* $@ $1
+R<?> $* $=O $* < @ $* > $: <NO> $1 $2 $3 < @ $4>
+R<?> $* $@ $1
ifdef(`_RELAY_ENTIRE_DOMAIN_', `dnl
# if we relay, check username portion for user%host so host can be checked also
-R<NO> $* < @ $* $=m > $: <RELAY> $1 < @ $2 $3 >', `dnl')
+R<NO> $* < @ $* $=m > $: <RELAY> $1 < @ $2 $3 >', `dnl')
+
+ifdef(`_RELAY_MX_SERVED_', `dnl
+R<NO> $* < @ $+ > $: <MX> < : $(mxserved $2 $) : > < $1 < @$2 > >
+R<MX> < : $* <TEMP> : > $* $#error $@ 4.7.1 $: "450 Can not check MX records for recipient host " $1
+R<MX> < $* : $=w. : $* > < $+ > $: <RELAY> $4
+R<MX> < : $* : > < $+ > $: <NO> $2', `dnl')
+
ifdef(`_RELAY_HOSTS_ONLY_',
-`R<NO> $* < @ $=R > $: <RELAY> $1 < @ $2 >
+`R<NO> $* < @ $=R > $: <RELAY> $1 < @ $2 >
ifdef(`ACCESS_TABLE', `dnl
-R<NO> $* < @ $* > $: <$(access $2 $: NO $)> $1 < @ $2 >',`dnl')',
-`R<NO> $* < @ $* $=R > $: <RELAY> $1 < @ $2 $3 >
+R<NO> $* < @ $+ > $: <$(access $2 $: NO $)> $1 < @ $2 >',`dnl')',
+`R<NO> $* < @ $* $=R > $: <RELAY> $1 < @ $2 $3 >
ifdef(`ACCESS_TABLE', `dnl
-R<NO> $* < @ $* > $: $>LookUpDomain <$2> <NO> <$1 < @ $2 >>
-R<$+> <$+> $: <$1> $2',`dnl')')
-R<RELAY> $* < @ $* > $@ $>ParseRecipient $1
-R<$-> $* $@ $2
+R<NO> $* < @ $+ > $: $>LookUpDomain <$2> <NO> <$1 < @ $2 >>
+R<$+> <$+> $: <$1> $2',`dnl')')
+
+R<RELAY> $* < @ $* > $@ $>ParseRecipient $1
+R<$-> $* $@ $2
######################################################################
### check_relay -- check hostname/address on SMTP startup
@@ -1051,19 +1090,20 @@ R< $* > $* $: $2
ifdef(`ACCESS_TABLE', `dnl
R$+ $| $+ $: $>LookUpDomain < $1 > <?> < $2 >
-R<?> < $+ > $: $>LookUpAddress < $1 > <OK> < $1 >
-R<OK> < $* > $: $1
-R<RELAY> < $* > $: $1
+R<?> < $+ > $: $>LookUpAddress < $1 > <?> < $1 >
+R<?> < $+ > $: $1
+R<OK> < $* > $@ OK
+R<RELAY> < $* > $@ RELAY
R<REJECT> $* $#error $@ 5.7.1 $: "ifdef(`confREJECT_MSG', `confREJECT_MSG', `550 Access denied')"
R<DISCARD> $* $#discard $: discard
R<$+> $* $#error $@ 5.7.1 $: $1', `dnl')
ifdef(`_RBL_', `dnl
-# MAPS project checks -- http://maps.vix.com/
+# DNS based IP address spam lists
R$* $: $&{client_addr}
R$-.$-.$-.$- $: $(host $4.$3.$2.$1._RBL_. $: OK $)
ROK $@ OK
-R$+ $#error $@ 5.7.1 $: "Mail from " $&{client_addr} " refused; see http://maps.vix.com/rbl/"',
+R$+ $#error $@ 5.7.1 $: "Mail from " $&{client_addr} " refused by blackhole site _RBL_"',
`dnl')
######################################################################
@@ -1083,8 +1123,8 @@ R< d > $* $@ deferred
R< $* > $* $: $2
R<> $@ <OK>
-R$* $: <?> $>Parse0 $>3 $1 make domain canonical
-R<?> $* < @ $+ . > $* <?> $1 < @ $2 > $3 strip trailing dots
+R$* $: <?> $>CanonAddr $1
+R<?> $* < @ $+ . > <?> $1 < @ $2 > strip trailing dots
# handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc)
R<?> $* < $* $=P > $* $: <OK> $1 < @ $2 $3 > $4
ifdef(`_ACCEPT_UNRESOLVABLE_DOMAINS_',
@@ -1158,10 +1198,21 @@ R< d > $* $@ deferred
R< $* > $* $: $2
ifdef(`_LOOSE_RELAY_CHECK_',`dnl
-R$* $: $>Parse0 $>3 $1
+R$* $: $>CanonAddr $1
R$* < @ $* . > $1 < @ $2 > strip trailing dots',
`R$* $: $>ParseRecipient $1 strip relayable hosts')
+ifdef(`_BESTMX_IS_LOCAL_',`dnl
+ifelse(_BESTMX_IS_LOCAL_, `', `dnl
+# unlimited bestmx
+R$* < @ $* > $* $: $1 < @ $2 @@ $(bestmx $2 $) > $3',
+`dnl
+# limit bestmx to $=B
+R$* < @ $* $=B > $* $: $1 < @ $2 $3 . @@ $(bestmx $2 $3 $) > $4')
+R$* $=O $* < @ $* @@ $=w . > $* $@ $>Basic_check_rcpt $1 $2 $3
+R$* < @ $* @@ $=w . > $* $: $1 < @ $3 > $4
+R$* < @ $* @@ $* > $* $: $1 < @ $2 > $4')
+
ifdef(`_BLACKLIST_RCPT_',`dnl
ifdef(`ACCESS_TABLE', `dnl
# blacklist local users or any host from receiving mail
@@ -1201,12 +1252,12 @@ ifdef(`_RELAY_MX_SERVED_', `dnl
R$+ < @ $* > $: < : $(mxserved $2 $) : > $1 < @ $2 >
R< : $* <TEMP> : > $* $#error $@ 4.7.1 $: "450 Can not check MX records for recipient host " $1
R<$* : $=w . : $*> $* $@ OK
-R<$*> $* $: $2',
+R< : $* : > $* $: $2',
`dnl')
# check for local user (i.e. unqualified address)
R$* $: <?> $1
-R<?> $+ < @ $+ > $: <REMOTE> $1 < @ $2 >
+R<?> $* < @ $+ > $: <REMOTE> $1 < @ $2 >
# local user is ok
R<?> $+ $@ OK
R<$+> $* $: $2
@@ -1248,7 +1299,7 @@ R$=w $@ OK ... and see if it is local
ifdef(`_RELAY_LOCAL_FROM_', `dnl
# anything with a local FROM is ok
-R$* $: $1 $| $>Parse0 $>3 $&f
+R$* $: $1 $| $>CanonAddr $&f
R$* $| $+ < @ $=w . > $@ OK FROM local
R$* $| $* $: $1
', `dnl')
diff --git a/contrib/sendmail/cf/m4/version.m4 b/contrib/sendmail/cf/m4/version.m4
index 2db220271ad5..6d03e3761a3b 100644
--- a/contrib/sendmail/cf/m4/version.m4
+++ b/contrib/sendmail/cf/m4/version.m4
@@ -10,8 +10,8 @@ divert(-1)
# the sendmail distribution.
#
#
-VERSIONID(`@(#)version.m4 8.9.1.1 (Berkeley) 7/2/98')
+VERSIONID(`@(#)version.m4 8.9.2.1 (Berkeley) 12/29/1998')
#
divert(0)
# Configuration version number
-DZ8.9.1`'ifdef(`confCF_VERSION', `/confCF_VERSION')
+DZ8.9.2`'ifdef(`confCF_VERSION', `/confCF_VERSION')
diff --git a/contrib/sendmail/cf/mailer/cyrus.m4 b/contrib/sendmail/cf/mailer/cyrus.m4
index 6e4badcce29b..567025ffdd0e 100644
--- a/contrib/sendmail/cf/mailer/cyrus.m4
+++ b/contrib/sendmail/cf/mailer/cyrus.m4
@@ -47,7 +47,7 @@ POPDIVERT
### Cyrus Mailer specification ###
##################################################
-VERSIONID(`@(#)cyrus.m4 8.9 (Carnegie Mellon) 5/19/98')
+VERSIONID(`@(#)cyrus.m4 8.9 (Carnegie Mellon) 5/19/1998')
Mcyrus, P=CYRUS_MAILER_PATH, F=CONCAT(`lsDFMnPq', CYRUS_MAILER_FLAGS), S=10, R=20/40, T=X-Unix,
ifdef(`CYRUS_MAILER_MAX', `M=CYRUS_MAILER_MAX, ')U=CYRUS_MAILER_USER,
diff --git a/contrib/sendmail/cf/mailer/fax.m4 b/contrib/sendmail/cf/mailer/fax.m4
index 581cfed088c3..3ee94bdc308b 100644
--- a/contrib/sendmail/cf/mailer/fax.m4
+++ b/contrib/sendmail/cf/mailer/fax.m4
@@ -26,7 +26,7 @@ POPDIVERT
### FAX Mailer specification ###
####################################
-VERSIONID(`@(#)fax.m4 8.11 (Berkeley) 5/19/98')
+VERSIONID(`@(#)fax.m4 8.11 (Berkeley) 5/19/1998')
Mfax, P=FAX_MAILER_PATH, F=DFMhu, S=14, R=24, M=FAX_MAILER_MAX, T=X-Phone/X-FAX/X-Unix,
A=FAX_MAILER_ARGS
diff --git a/contrib/sendmail/cf/mailer/local.m4 b/contrib/sendmail/cf/mailer/local.m4
index 705e723c6ca4..6b4b679d832b 100644
--- a/contrib/sendmail/cf/mailer/local.m4
+++ b/contrib/sendmail/cf/mailer/local.m4
@@ -23,7 +23,7 @@ POPDIVERT
### Local and Program Mailer specification ###
##################################################
-VERSIONID(`@(#)local.m4 8.30 (Berkeley) 6/30/98')
+VERSIONID(`@(#)local.m4 8.30 (Berkeley) 6/30/1998')
Mlocal, P=LOCAL_MAILER_PATH, F=CONCAT(`lsDFMAw5:/|@q', LOCAL_MAILER_FLAGS), S=10/30, R=20/40,
_OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')_OPTINS(`LOCAL_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/X-Unix,
diff --git a/contrib/sendmail/cf/mailer/mail11.m4 b/contrib/sendmail/cf/mailer/mail11.m4
index 5c9d94810c6b..222b53fc91d4 100644
--- a/contrib/sendmail/cf/mailer/mail11.m4
+++ b/contrib/sendmail/cf/mailer/mail11.m4
@@ -40,7 +40,7 @@ POPDIVERT
### UTK-MAIL11 Mailer specification ###
###########################################
-VERSIONID(`@(#)mail11.m4 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)mail11.m4 8.8 (Berkeley) 5/19/1998')
Mmail11, P=MAIL11_MAILER_PATH, F=MAIL11_MAILER_FLAGS, S=15, R=25,
A=MAIL11_MAILER_ARGS
diff --git a/contrib/sendmail/cf/mailer/phquery.m4 b/contrib/sendmail/cf/mailer/phquery.m4
index 5f1b6b41ce86..3e0891ae37b9 100644
--- a/contrib/sendmail/cf/mailer/phquery.m4
+++ b/contrib/sendmail/cf/mailer/phquery.m4
@@ -23,7 +23,7 @@ POPDIVERT
### PH Mailer specification ###
####################################
-VERSIONID(`@(#)phquery.m4 8.6 (Berkeley) 5/19/98')
+VERSIONID(`@(#)phquery.m4 8.6 (Berkeley) 5/19/1998')
Mph, P=PH_MAILER_PATH, F=CONCAT(`nrDFM', PH_MAILER_FLAGS), S=10, R=20/40,
A=PH_MAILER_ARGS
diff --git a/contrib/sendmail/cf/mailer/pop.m4 b/contrib/sendmail/cf/mailer/pop.m4
index a4f3128f19fd..0acea7d9fd5e 100644
--- a/contrib/sendmail/cf/mailer/pop.m4
+++ b/contrib/sendmail/cf/mailer/pop.m4
@@ -21,7 +21,7 @@ POPDIVERT
### POP Mailer specification ###
####################################
-VERSIONID(`@(#)pop.m4 8.11 (Berkeley) 5/19/98')
+VERSIONID(`@(#)pop.m4 8.11 (Berkeley) 5/19/1998')
Mpop, P=POP_MAILER_PATH, F=CONCAT(`lsDFMq', POP_MAILER_FLAGS), S=10, R=20/40, T=DNS/RFC822/X-Unix,
A=POP_MAILER_ARGS
diff --git a/contrib/sendmail/cf/mailer/procmail.m4 b/contrib/sendmail/cf/mailer/procmail.m4
index b6131c06678d..38b6d200dd58 100644
--- a/contrib/sendmail/cf/mailer/procmail.m4
+++ b/contrib/sendmail/cf/mailer/procmail.m4
@@ -26,7 +26,7 @@ POPDIVERT
### PROCMAIL Mailer specification ###
##################*****##################
-VERSIONID(`@(#)procmail.m4 8.11 (Berkeley) 5/19/98')
+VERSIONID(`@(#)procmail.m4 8.11 (Berkeley) 5/19/1998')
Mprocmail, P=PROCMAIL_MAILER_PATH, F=CONCAT(`DFM', PROCMAIL_MAILER_FLAGS), S=11/31, R=21/31, T=DNS/RFC822/X-Unix,
ifdef(`PROCMAIL_MAILER_MAX', `M=PROCMAIL_MAILER_MAX, ')A=PROCMAIL_MAILER_ARGS
diff --git a/contrib/sendmail/cf/mailer/smtp.m4 b/contrib/sendmail/cf/mailer/smtp.m4
index d70195e70669..75455970ae40 100644
--- a/contrib/sendmail/cf/mailer/smtp.m4
+++ b/contrib/sendmail/cf/mailer/smtp.m4
@@ -22,7 +22,7 @@ POPDIVERT
### SMTP Mailer specification ###
#####################################
-VERSIONID(`@(#)smtp.m4 8.38 (Berkeley) 5/19/98')
+VERSIONID(`@(#)smtp.m4 8.38 (Berkeley) 5/19/1998')
Msmtp, P=[IPC], F=CONCAT(mDFMuX, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `21/31', `21'), E=\r\n, L=990,
_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,
diff --git a/contrib/sendmail/cf/mailer/usenet.m4 b/contrib/sendmail/cf/mailer/usenet.m4
index 6c92f5f8dadf..153575187f09 100644
--- a/contrib/sendmail/cf/mailer/usenet.m4
+++ b/contrib/sendmail/cf/mailer/usenet.m4
@@ -19,7 +19,7 @@ POPDIVERT
### USENET Mailer specification ###
####################################
-VERSIONID(`@(#)usenet.m4 8.10 (Berkeley) 5/19/98')
+VERSIONID(`@(#)usenet.m4 8.10 (Berkeley) 5/19/1998')
Musenet, P=USENET_MAILER_PATH, F=USENET_MAILER_FLAGS, S=10, R=20,
_OPTINS(`USENET_MAILER_MAX', `M=', `, ')T=X-Usenet/X-Usenet/X-Unix,
diff --git a/contrib/sendmail/cf/mailer/uucp.m4 b/contrib/sendmail/cf/mailer/uucp.m4
index cd2619db47ec..badd307c963d 100644
--- a/contrib/sendmail/cf/mailer/uucp.m4
+++ b/contrib/sendmail/cf/mailer/uucp.m4
@@ -22,7 +22,7 @@ POPDIVERT
### UUCP Mailer specification ###
#####################################
-VERSIONID(`@(#)uucp.m4 8.30 (Berkeley) 5/19/98')
+VERSIONID(`@(#)uucp.m4 8.30 (Berkeley) 5/19/1998')
#
# There are innumerable variations on the UUCP mailer. It really
diff --git a/contrib/sendmail/cf/ostype/aix2.m4 b/contrib/sendmail/cf/ostype/aix2.m4
index 1e77c1cd1e39..2bda79c60e43 100644
--- a/contrib/sendmail/cf/ostype/aix2.m4
+++ b/contrib/sendmail/cf/ostype/aix2.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)aix2.m4 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)aix2.m4 8.8 (Berkeley) 5/19/1998')
define(`LOCAL_MAILER_PATH', /bin/bellmail)dnl
define(`LOCAL_MAILER_ARGS', mail $u)dnl
define(`LOCAL_MAILER_FLAGS', `mn9')dnl
diff --git a/contrib/sendmail/cf/ostype/aix3.m4 b/contrib/sendmail/cf/ostype/aix3.m4
index 2cfc8c58220a..fb74d9e46190 100644
--- a/contrib/sendmail/cf/ostype/aix3.m4
+++ b/contrib/sendmail/cf/ostype/aix3.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)aix3.m4 8.12 (Berkeley) 5/19/98')
+VERSIONID(`@(#)aix3.m4 8.12 (Berkeley) 5/19/1998')
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /bin/bellmail)')dnl
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', mail $u)')dnl
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `mn9')')dnl
diff --git a/contrib/sendmail/cf/ostype/aix4.m4 b/contrib/sendmail/cf/ostype/aix4.m4
index 06c7d1aba15e..24ff001ae3e6 100644
--- a/contrib/sendmail/cf/ostype/aix4.m4
+++ b/contrib/sendmail/cf/ostype/aix4.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)aix4.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)aix4.m4 8.7 (Berkeley) 5/19/1998')
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /bin/bellmail)')dnl
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', mail -F $g $u)')dnl
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `mn9')')dnl
diff --git a/contrib/sendmail/cf/ostype/altos.m4 b/contrib/sendmail/cf/ostype/altos.m4
index 38a07a0a3199..4dcefa943a6b 100644
--- a/contrib/sendmail/cf/ostype/altos.m4
+++ b/contrib/sendmail/cf/ostype/altos.m4
@@ -14,11 +14,11 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)altos.m4 8.9 (Berkeley) 5/19/98')
+VERSIONID(`@(#)altos.m4 8.10 (Berkeley) 10/6/1998')
-define(`ALIAS_FILE', /usr/lib/mail/aliases)dnl
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/usr/lib/mail/aliases'))dnl
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/usr/lib/sendmail.st'))')dnl
ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/bin/lmail)')dnl
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', mPuhCE9)')dnl
diff --git a/contrib/sendmail/cf/ostype/amdahl-uts.m4 b/contrib/sendmail/cf/ostype/amdahl-uts.m4
index 022b50741371..84d47cdb17e3 100644
--- a/contrib/sendmail/cf/ostype/amdahl-uts.m4
+++ b/contrib/sendmail/cf/ostype/amdahl-uts.m4
@@ -12,12 +12,12 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)amdahl-uts.m4 8.10 (Berkeley) 5/19/98')
+VERSIONID(`@(#)amdahl-uts.m4 8.11 (Berkeley) 10/6/1998')
divert(-1)
define(`ALIAS_FILE', /etc/mail/aliases)
-ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/mail/sendmail.hf)')
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')
+ifdef(`HELP_FILE',, `define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/etc/mail/sendmail.hf'))')
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/usr/lib/sendmail.st'))')
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `fSn9')')
-define(`confCW_FILE', /etc/mail/sendmail.cw)
+define(`confCW_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/local-host-names', `/etc/mail/sendmail.cw'))
define(`confEBINDIR', `/usr/lib')dnl
diff --git a/contrib/sendmail/cf/ostype/aux.m4 b/contrib/sendmail/cf/ostype/aux.m4
index 2adbfe4d221a..8038cb55d833 100644
--- a/contrib/sendmail/cf/ostype/aux.m4
+++ b/contrib/sendmail/cf/ostype/aux.m4
@@ -12,10 +12,10 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)aux.m4 8.10 (Berkeley) 5/19/98')
-define(`ALIAS_FILE', /usr/lib/aliases)dnl
+VERSIONID(`@(#)aux.m4 8.11 (Berkeley) 10/6/1998')
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/usr/lib/aliases'))dnl
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/usr/lib/sendmail.st'))')dnl
ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', mn9)')dnl
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -d -r $f $u')')dnl
diff --git a/contrib/sendmail/cf/ostype/bsd4.3.m4 b/contrib/sendmail/cf/ostype/bsd4.3.m4
index 47c02cc764ae..d0f3f8a32191 100644
--- a/contrib/sendmail/cf/ostype/bsd4.3.m4
+++ b/contrib/sendmail/cf/ostype/bsd4.3.m4
@@ -12,6 +12,6 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)bsd4.3.m4 8.9 (Berkeley) 5/19/98')
+VERSIONID(`@(#)bsd4.3.m4 8.9 (Berkeley) 5/19/1998')
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -z -a$g $h!rmail ($u)')')dnl
diff --git a/contrib/sendmail/cf/ostype/bsd4.4.m4 b/contrib/sendmail/cf/ostype/bsd4.4.m4
index c023de544011..514bce827145 100644
--- a/contrib/sendmail/cf/ostype/bsd4.4.m4
+++ b/contrib/sendmail/cf/ostype/bsd4.4.m4
@@ -13,8 +13,8 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)bsd4.4.m4 8.9 (Berkeley) 5/19/98')
-ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/share/misc/sendmail.hf)')dnl
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/log/sendmail.st)')dnl
+VERSIONID(`@(#)bsd4.4.m4 8.10 (Berkeley) 10/6/1998')
+ifdef(`HELP_FILE',, `define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/usr/share/misc/sendmail.hf'))')dnl
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/var/log/sendmail.st'))')dnl
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/libexec/mail.local)')dnl
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -z -a$g $h!rmail ($u)')')dnl
diff --git a/contrib/sendmail/cf/ostype/bsdi1.0.m4 b/contrib/sendmail/cf/ostype/bsdi1.0.m4
index 48d60b333808..08bd2a574b2e 100644
--- a/contrib/sendmail/cf/ostype/bsdi1.0.m4
+++ b/contrib/sendmail/cf/ostype/bsdi1.0.m4
@@ -12,5 +12,5 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)bsdi1.0.m4 8.7 (Berkeley) 5/19/98')dnl
+VERSIONID(`@(#)bsdi1.0.m4 8.7 (Berkeley) 5/19/1998')dnl
include(_CF_DIR_`'ostype/bsd4.4.m4)dnl
diff --git a/contrib/sendmail/cf/ostype/bsdi2.0.m4 b/contrib/sendmail/cf/ostype/bsdi2.0.m4
index 73b0447ec369..6883eb067056 100644
--- a/contrib/sendmail/cf/ostype/bsdi2.0.m4
+++ b/contrib/sendmail/cf/ostype/bsdi2.0.m4
@@ -12,5 +12,5 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)bsdi2.0.m4 8.6 (Berkeley) 5/19/98')dnl
+VERSIONID(`@(#)bsdi2.0.m4 8.6 (Berkeley) 5/19/1998')dnl
include(_CF_DIR_`'ostype/bsd4.4.m4)dnl
diff --git a/contrib/sendmail/cf/ostype/dgux.m4 b/contrib/sendmail/cf/ostype/dgux.m4
index eeb8c4de3a2d..2f25cd83251a 100644
--- a/contrib/sendmail/cf/ostype/dgux.m4
+++ b/contrib/sendmail/cf/ostype/dgux.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)dgux.m4 8.10 (Berkeley) 5/19/98')
+VERSIONID(`@(#)dgux.m4 8.10 (Berkeley) 5/19/1998')
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', m9)')dnl
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confEBINDIR', `/usr/lib')dnl
diff --git a/contrib/sendmail/cf/ostype/domainos.m4 b/contrib/sendmail/cf/ostype/domainos.m4
index c03dee5fc94f..9f4ea92b8b88 100644
--- a/contrib/sendmail/cf/ostype/domainos.m4
+++ b/contrib/sendmail/cf/ostype/domainos.m4
@@ -12,10 +12,10 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)domainos.m4 8.9 (Berkeley) 5/19/98')
+VERSIONID(`@(#)domainos.m4 8.10 (Berkeley) 10/6/1998')
divert(-1)
-define(`ALIAS_FILE', /usr/lib/aliases)
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/usr/lib/aliases'))
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/usr/lib/sendmail.st'))')
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')
define(`confEBINDIR', `/usr/lib')dnl
diff --git a/contrib/sendmail/cf/ostype/dynix3.2.m4 b/contrib/sendmail/cf/ostype/dynix3.2.m4
index 94d59b5f3712..38364466ba5c 100644
--- a/contrib/sendmail/cf/ostype/dynix3.2.m4
+++ b/contrib/sendmail/cf/ostype/dynix3.2.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)dynix3.2.m4 8.9 (Berkeley) 5/19/98')
-define(`ALIAS_FILE', /usr/lib/aliases)dnl
+VERSIONID(`@(#)dynix3.2.m4 8.10 (Berkeley) 10/6/1998')
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/usr/lib/aliases'))dnl
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
define(`confEBINDIR', `/usr/lib')dnl
diff --git a/contrib/sendmail/cf/ostype/gnuhurd.m4 b/contrib/sendmail/cf/ostype/gnuhurd.m4
index d7127f6b7eb8..a8ed66765e24 100644
--- a/contrib/sendmail/cf/ostype/gnuhurd.m4
+++ b/contrib/sendmail/cf/ostype/gnuhurd.m4
@@ -13,8 +13,8 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)gnuhurd.m4 8.7 (Berkeley) 5/19/98')
-ifdef(`HELP_FILE',, `define(`HELP_FILE', /share/misc/sendmail.hf)')dnl
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/log/sendmail.st)')dnl
+VERSIONID(`@(#)gnuhurd.m4 8.8 (Berkeley) 10/6/1998')
+ifdef(`HELP_FILE',, `define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/share/misc/sendmail.hf'))')dnl
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/var/log/sendmail.st'))')dnl
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /libexec/mail.local)')dnl
define(`confEBINDIR', `/libexec')dnl
diff --git a/contrib/sendmail/cf/ostype/hpux10.m4 b/contrib/sendmail/cf/ostype/hpux10.m4
index 9499474de74b..d349b5488e38 100644
--- a/contrib/sendmail/cf/ostype/hpux10.m4
+++ b/contrib/sendmail/cf/ostype/hpux10.m4
@@ -12,12 +12,12 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)hpux10.m4 8.13 (Berkeley) 5/19/98')
+VERSIONID(`@(#)hpux10.m4 8.14 (Berkeley) 10/6/1998')
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /var/spool/mqueue)')dnl
define(`ALIAS_FILE', /etc/mail/aliases)dnl
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /etc/mail/sendmail.st)')dnl
-ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/share/lib/sendmail.hf)')dnl
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/etc/mail/sendmail.st'))')dnl
+ifdef(`HELP_FILE',, `define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/usr/share/lib/sendmail.hf'))')dnl
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/bin/rmail)')dnl
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `m9')')dnl
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `rmail -d $u')')dnl
diff --git a/contrib/sendmail/cf/ostype/hpux9.m4 b/contrib/sendmail/cf/ostype/hpux9.m4
index 19579caef067..55f1b97c13ae 100644
--- a/contrib/sendmail/cf/ostype/hpux9.m4
+++ b/contrib/sendmail/cf/ostype/hpux9.m4
@@ -12,11 +12,11 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)hpux9.m4 8.18 (Berkeley) 5/19/98')
+VERSIONID(`@(#)hpux9.m4 8.19 (Berkeley) 10/6/1998')
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
-define(`ALIAS_FILE', /usr/lib/aliases)dnl
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/usr/lib/aliases'))dnl
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/usr/lib/sendmail.st'))')dnl
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', `/bin/rmail')')dnl
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `m9')')dnl
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `rmail -d $u')')dnl
diff --git a/contrib/sendmail/cf/ostype/irix4.m4 b/contrib/sendmail/cf/ostype/irix4.m4
index 69890e6acbce..aea6e9e847c3 100644
--- a/contrib/sendmail/cf/ostype/irix4.m4
+++ b/contrib/sendmail/cf/ostype/irix4.m4
@@ -12,9 +12,9 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)irix4.m4 8.13 (Berkeley) 5/19/98')
+VERSIONID(`@(#)irix4.m4 8.14 (Berkeley) 10/6/1998')
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', Ehm9)')dnl
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
-define(`ALIAS_FILE', /usr/lib/aliases)dnl
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/usr/lib/aliases'))dnl
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/usr/lib/sendmail.st'))')dnl
define(`confEBINDIR', `/usr/lib')dnl
diff --git a/contrib/sendmail/cf/ostype/irix5.m4 b/contrib/sendmail/cf/ostype/irix5.m4
index 32f23756e005..426f00207a13 100644
--- a/contrib/sendmail/cf/ostype/irix5.m4
+++ b/contrib/sendmail/cf/ostype/irix5.m4
@@ -28,13 +28,13 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)irix5.m4 8.10 (Berkeley) 5/19/98')
+VERSIONID(`@(#)irix5.m4 8.11 (Berkeley) 10/6/1998')
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', Ehmu9)')dnl
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -s -d $u')')dnl
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /var/spool/mqueue)')dnl
-define(`ALIAS_FILE', /etc/aliases)dnl
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/sendmail.st)')dnl
-ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/sendmail.hf)')dnl
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/etc/aliases'))dnl
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/var/sendmail.st'))')dnl
+ifdef(`HELP_FILE',, `define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/etc/sendmail.hf'))')dnl
define(`confDEF_USER_ID', `998:998')dnl
define(`confTIME_ZONE', USE_TZ)dnl
define(`confEBINDIR', `/usr/lib')dnl
diff --git a/contrib/sendmail/cf/ostype/irix6.m4 b/contrib/sendmail/cf/ostype/irix6.m4
index f046dbf0e8fb..d41920211b40 100644
--- a/contrib/sendmail/cf/ostype/irix6.m4
+++ b/contrib/sendmail/cf/ostype/irix6.m4
@@ -28,13 +28,13 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)irix6.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)irix6.m4 8.8 (Berkeley) 10/6/1998')
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', Ehmu9)')dnl
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -s -d $u')')dnl
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /var/spool/mqueue)')dnl
-define(`ALIAS_FILE', /etc/aliases)dnl
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/sendmail.st)')dnl
-ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/sendmail.hf)')dnl
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/etc/aliases'))dnl
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/var/sendmail.st'))')dnl
+ifdef(`HELP_FILE',, `define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/etc/sendmail.hf'))')dnl
define(`confDEF_USER_ID', `998:998')dnl
define(`confTIME_ZONE', USE_TZ)dnl
define(`confEBINDIR', `/usr/lib')dnl
diff --git a/contrib/sendmail/cf/ostype/isc4.1.m4 b/contrib/sendmail/cf/ostype/isc4.1.m4
index 1869eecfc636..629835bb2ee9 100644
--- a/contrib/sendmail/cf/ostype/isc4.1.m4
+++ b/contrib/sendmail/cf/ostype/isc4.1.m4
@@ -13,14 +13,14 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)isc4.1.m4 8.10 (Berkeley) 5/19/98')
-define(`ALIAS_FILE', /usr/lib/aliases)dnl
-ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/lib/sendmail.hf)')dnl
+VERSIONID(`@(#)isc4.1.m4 8.11 (Berkeley) 10/6/1998')
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/usr/lib/aliases'))dnl
+ifdef(`HELP_FILE',, `define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/usr/lib/sendmail.hf'))')dnl
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `lmail -s $u')')dnl
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `humS9')')dnl
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /bin/lmail)')dnl
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/usr/lib/sendmail.st'))')dnl
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -gC $h!rmail ($u)')')dnl
ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl
define(`confTIME_ZONE', `USE_TZ')dnl
diff --git a/contrib/sendmail/cf/ostype/linux.m4 b/contrib/sendmail/cf/ostype/linux.m4
index d7c3b190b47a..e1f7a92119f8 100644
--- a/contrib/sendmail/cf/ostype/linux.m4
+++ b/contrib/sendmail/cf/ostype/linux.m4
@@ -12,5 +12,5 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)linux.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)linux.m4 8.7 (Berkeley) 5/19/1998')
define(`LOCAL_MAILER_PATH', /bin/mail.local)dnl
diff --git a/contrib/sendmail/cf/ostype/maxion.m4 b/contrib/sendmail/cf/ostype/maxion.m4
index c07ce876e300..a8ecfd0315c9 100644
--- a/contrib/sendmail/cf/ostype/maxion.m4
+++ b/contrib/sendmail/cf/ostype/maxion.m4
@@ -15,12 +15,12 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)maxion.m4 8.10 (Berkeley) 5/19/98')
+VERSIONID(`@(#)maxion.m4 8.11 (Berkeley) 10/6/1998')
-define(`ALIAS_FILE', `/etc/ucbmail/aliases')dnl
-define(`HELP_FILE', `/etc/ucbmail/sendmail.hf')dnl
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/etc/ucbmail/aliases'))dnl
+define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/etc/ucbmail/sendmail.hf'))dnl
define(`QUEUE_DIR', `/var/spool/mqueue')dnl
-define(`STATUS_FILE', `/var/adm/log/sendmail.st')dnl
+define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/var/adm/log/sendmail.st'))dnl
define(`LOCAL_MAILER_PATH', `/usr/bin/mail')dnl
define(`LOCAL_MAILER_FLAGS',`rmn9')dnl
define(`LOCAL_SHELL_FLAGS', `ehuP')dnl
diff --git a/contrib/sendmail/cf/ostype/mklinux.m4 b/contrib/sendmail/cf/ostype/mklinux.m4
index 2f40c72d8e2c..abcdbae786c0 100644
--- a/contrib/sendmail/cf/ostype/mklinux.m4
+++ b/contrib/sendmail/cf/ostype/mklinux.m4
@@ -14,9 +14,9 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)mklinux.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)mklinux.m4 8.8 (Berkeley) 10/6/1998')
ifdef(`STATUS_FILE',,
- `define(`STATUS_FILE', /var/log/sendmail.st)')
+ `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/var/log/sendmail.st'))')
ifdef(`PROCMAIL_MAILER_PATH',,
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail'))
FEATURE(local_procmail)
diff --git a/contrib/sendmail/cf/ostype/nextstep.m4 b/contrib/sendmail/cf/ostype/nextstep.m4
index 73c995fb983c..ebe6957df9b8 100644
--- a/contrib/sendmail/cf/ostype/nextstep.m4
+++ b/contrib/sendmail/cf/ostype/nextstep.m4
@@ -12,11 +12,11 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)nextstep.m4 8.14 (Berkeley) 5/19/98')
+VERSIONID(`@(#)nextstep.m4 8.15 (Berkeley) 10/6/1998')
define(`ALIAS_FILE', /etc/sendmail/aliases)dnl
-define(`confCW_FILE', /etc/sendmail/sendmail.cw)dnl
-ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/lib/sendmail.hf)')dnl
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /etc/sendmail/sendmail.st)')dnl
+define(`confCW_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/local-host-names', `/etc/sendmail/sendmail.cw'))dnl
+ifdef(`HELP_FILE',, `define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/usr/lib/sendmail.hf'))')dnl
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/etc/sendmail/sendmail.st'))')dnl
ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `rmnP9')')dnl
diff --git a/contrib/sendmail/cf/ostype/osf1.m4 b/contrib/sendmail/cf/ostype/osf1.m4
index fe17b35ee6c9..7fcf1cf65343 100644
--- a/contrib/sendmail/cf/ostype/osf1.m4
+++ b/contrib/sendmail/cf/ostype/osf1.m4
@@ -12,8 +12,8 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)osf1.m4 8.10 (Berkeley) 5/19/98')
-define(`ALIAS_FILE', /usr/adm/sendmail/aliases)dnl
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/adm/sendmail/sendmail.st)')dnl
-ifdef(`HELP_FILE',, `define(`HELP_FILE', /usr/share/lib/sendmail.hf)')dnl
+VERSIONID(`@(#)osf1.m4 8.11 (Berkeley) 10/6/1998')
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/usr/adm/sendmail/aliases'))dnl
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/usr/adm/sendmail/sendmail.st'))')dnl
+ifdef(`HELP_FILE',, `define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/usr/share/lib/sendmail.hf'))')dnl
define(`confDEF_USER_ID', `daemon')
diff --git a/contrib/sendmail/cf/ostype/powerux.m4 b/contrib/sendmail/cf/ostype/powerux.m4
index dc23c7ed2956..068bd8e7f166 100644
--- a/contrib/sendmail/cf/ostype/powerux.m4
+++ b/contrib/sendmail/cf/ostype/powerux.m4
@@ -12,11 +12,11 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)powerux.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)powerux.m4 8.8 (Berkeley) 10/6/1998')
define(`ALIAS_FILE', /etc/mail/aliases)dnl
-ifdef(`HELP_FILE',,`define(`HELP_FILE', /etc/mail/sendmail.hf)')dnl
-ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /etc/mail/sendmail.st)')dnl
+ifdef(`HELP_FILE',,`define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/etc/mail/sendmail.hf'))')dnl
+ifdef(`STATUS_FILE',,`define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/etc/mail/sendmail.st'))')dnl
define(`LOCAL_MAILER_PATH', `/usr/bin/rmail')dnl
define(`LOCAL_MAILER_FLAGS', `mn9')dnl
define(`LOCAL_MAILER_ARGS', `rmail $u')dnl
diff --git a/contrib/sendmail/cf/ostype/ptx2.m4 b/contrib/sendmail/cf/ostype/ptx2.m4
index 83a05580b14a..d564ead49e30 100644
--- a/contrib/sendmail/cf/ostype/ptx2.m4
+++ b/contrib/sendmail/cf/ostype/ptx2.m4
@@ -14,11 +14,11 @@ divert(-1)
# Support for DYNIX/ptx 2.x.
divert(0)
-VERSIONID(`@(#)ptx2.m4 8.11 (Berkeley) 5/19/98')
+VERSIONID(`@(#)ptx2.m4 8.12 (Berkeley) 10/6/1998')
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
-define(`ALIAS_FILE', /usr/lib/aliases)dnl
-ifdef(`HELP_FILE',,`define(`HELP_FILE', /usr/lib/sendmail.hf)')dnl
-ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/usr/lib/aliases'))dnl
+ifdef(`HELP_FILE',,`define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/usr/lib/sendmail.hf'))')dnl
+ifdef(`STATUS_FILE',,`define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/usr/lib/sendmail.st'))')dnl
define(`LOCAL_MAILER_PATH', `/bin/mail')dnl
define(`LOCAL_MAILER_FLAGS', `fmn9')dnl
define(`LOCAL_SHELL_FLAGS', `eu')dnl
diff --git a/contrib/sendmail/cf/ostype/qnx.m4 b/contrib/sendmail/cf/ostype/qnx.m4
index 10624dde39f1..91ed669622fb 100644
--- a/contrib/sendmail/cf/ostype/qnx.m4
+++ b/contrib/sendmail/cf/ostype/qnx.m4
@@ -12,9 +12,9 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)qnx.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)qnx.m4 8.8 (Berkeley) 10/6/1998')
define(`QUEUE_DIR', /usr/spool/mqueue)dnl
-define(`HELP_FILE', /etc/sendmail.hf)dnl
+define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/etc/sendmail.hf'))dnl
define(`LOCAL_MAILER_ARGS', `mail $u')dnl
define(`LOCAL_MAILER_FLAGS', `Sh')dnl
define(`LOCAL_MAILER_PATH', /usr/bin/mailx)dnl
diff --git a/contrib/sendmail/cf/ostype/riscos4.5.m4 b/contrib/sendmail/cf/ostype/riscos4.5.m4
index 02db750c023b..c44a1800ed89 100644
--- a/contrib/sendmail/cf/ostype/riscos4.5.m4
+++ b/contrib/sendmail/cf/ostype/riscos4.5.m4
@@ -12,10 +12,10 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)riscos4.5.m4 8.10 (Berkeley) 5/19/98')
+VERSIONID(`@(#)riscos4.5.m4 8.11 (Berkeley) 10/6/1998')
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `rmail -d $u')')dnl
-define(`ALIAS_FILE', `/usr/lib/aliases')dnl
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/usr/lib/aliases'))dnl
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', `/usr/spool/mqueue')')dnl
-ifdef(`HELP_FILE',, `define(`HELP_FILE', `/usr/lib/sendmail.hf')')dnl
+ifdef(`HELP_FILE',, `define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/usr/lib/sendmail.hf'))')dnl
define(`confEBINDIR', `/usr/lib')dnl
diff --git a/contrib/sendmail/cf/ostype/sco-uw-2.1.m4 b/contrib/sendmail/cf/ostype/sco-uw-2.1.m4
index 356c984fa422..07da0ad9b418 100644
--- a/contrib/sendmail/cf/ostype/sco-uw-2.1.m4
+++ b/contrib/sendmail/cf/ostype/sco-uw-2.1.m4
@@ -12,11 +12,11 @@ divert(-1)
# Contributed by Christopher Durham <chrisdu@SCO.COM> of SCO.
#
divert(0)
-VERSIONID(`@(#)sco-uw-2.1.m4 8.6 (Berkeley) 5/19/98')
+VERSIONID(`@(#)sco-uw-2.1.m4 8.7 (Berkeley) 10/6/1998')
-define(`ALIAS_FILE', /usr/lib/mail/aliases)dnl
-ifdef(`HELP_FILE',,`define(`HELP_FILE', /usr/ucblib/sendmail.hf)')dnl
-ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /usr/ucblib/sendmail.st)')dnl
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/usr/lib/mail/aliases'))dnl
+ifdef(`HELP_FILE',,`define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/usr/ucblib/sendmail.hf'))')dnl
+ifdef(`STATUS_FILE',,`define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/usr/ucblib/sendmail.st'))')dnl
define(`LOCAL_MAILER_PATH', `/usr/bin/rmail')dnl
define(`LOCAL_MAILER_FLAGS', `fhCEn9')dnl
define(`LOCAL_SHELL_FLAGS', `ehuP')dnl
diff --git a/contrib/sendmail/cf/ostype/sco3.2.m4 b/contrib/sendmail/cf/ostype/sco3.2.m4
index 1c58585035be..135fefaa0a89 100644
--- a/contrib/sendmail/cf/ostype/sco3.2.m4
+++ b/contrib/sendmail/cf/ostype/sco3.2.m4
@@ -12,10 +12,10 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)sco3.2.m4 8.10 (Berkeley) 5/19/98')
-define(`ALIAS_FILE', /usr/lib/mail/aliases)dnl
+VERSIONID(`@(#)sco3.2.m4 8.11 (Berkeley) 10/6/1998')
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/usr/lib/mail/aliases'))dnl
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /usr/lib/sendmail.st)')dnl
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/usr/lib/sendmail.st'))')dnl
ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/bin/lmail)')dnl
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', PuhCE9)')dnl
diff --git a/contrib/sendmail/cf/ostype/sinix.m4 b/contrib/sendmail/cf/ostype/sinix.m4
index 51c469d8d741..37d12d4211cb 100644
--- a/contrib/sendmail/cf/ostype/sinix.m4
+++ b/contrib/sendmail/cf/ostype/sinix.m4
@@ -12,10 +12,10 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)sinix.m4 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)sinix.m4 8.9 (Berkeley) 10/6/1998')
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /var/spool/mqueue)')dnl
-define(`ALIAS_FILE', /etc/aliases)dnl
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/etc/aliases'))dnl
define(`LOCAL_MAILER_PATH', `/bin/mail.local')dnl
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/sendmail.st)')dnl
-ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/sendmail.hf)')dnl
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/var/sendmail.st'))')dnl
+ifdef(`HELP_FILE',, `define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/etc/sendmail.hf'))')dnl
define(`confEBINDIR', `/usr/ucblib')dnl
diff --git a/contrib/sendmail/cf/ostype/solaris2.m4 b/contrib/sendmail/cf/ostype/solaris2.m4
index 5a90175bd363..5a0e2a9024f0 100644
--- a/contrib/sendmail/cf/ostype/solaris2.m4
+++ b/contrib/sendmail/cf/ostype/solaris2.m4
@@ -12,14 +12,14 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)solaris2.m4 8.15 (Berkeley) 5/19/98')
+VERSIONID(`@(#)solaris2.m4 8.16 (Berkeley) 10/6/1998')
divert(-1)
define(`ALIAS_FILE', /etc/mail/aliases)
-ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/mail/sendmail.hf)')
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /etc/mail/sendmail.st)')
+ifdef(`HELP_FILE',, `define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/etc/mail/sendmail.hf'))')
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/etc/mail/sendmail.st'))')
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `SnE9')')
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -f $g -d $u')')
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g $h!rmail ($u)')')
-define(`confCW_FILE', /etc/mail/sendmail.cw)
+define(`confCW_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/local-host-names', `/etc/mail/sendmail.cw'))
define(`confEBINDIR', `/usr/lib')dnl
diff --git a/contrib/sendmail/cf/ostype/solaris2.ml.m4 b/contrib/sendmail/cf/ostype/solaris2.ml.m4
index 0995d50ff18e..f99cebb84d13 100644
--- a/contrib/sendmail/cf/ostype/solaris2.ml.m4
+++ b/contrib/sendmail/cf/ostype/solaris2.ml.m4
@@ -16,15 +16,15 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)solaris2.ml.m4 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)solaris2.ml.m4 8.9 (Berkeley) 10/6/1998')
divert(-1)
define(`ALIAS_FILE', /etc/mail/aliases)
-ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/mail/sendmail.hf)')
-ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /etc/mail/sendmail.st)')
+ifdef(`HELP_FILE',, `define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/etc/mail/sendmail.hf'))')
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/etc/mail/sendmail.st'))')
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', `/usr/lib/mail.local')')
ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', `fSmn9')')
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail.local -d $u')')
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g $h!rmail ($u)')')
-define(`confCW_FILE', /etc/mail/sendmail.cw)
+define(`confCW_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/local-host-names', `/etc/mail/sendmail.cw'))
define(`confEBINDIR', `/usr/lib')dnl
diff --git a/contrib/sendmail/cf/ostype/sunos3.5.m4 b/contrib/sendmail/cf/ostype/sunos3.5.m4
index 540d36e60756..aeda27249848 100644
--- a/contrib/sendmail/cf/ostype/sunos3.5.m4
+++ b/contrib/sendmail/cf/ostype/sunos3.5.m4
@@ -12,6 +12,6 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)sunos3.5.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)sunos3.5.m4 8.7 (Berkeley) 5/19/1998')
define(`confEBINDIR', `/usr/lib')dnl
diff --git a/contrib/sendmail/cf/ostype/sunos4.1.m4 b/contrib/sendmail/cf/ostype/sunos4.1.m4
index aec96d2fdc9c..78648da7658e 100644
--- a/contrib/sendmail/cf/ostype/sunos4.1.m4
+++ b/contrib/sendmail/cf/ostype/sunos4.1.m4
@@ -12,6 +12,6 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)sunos4.1.m4 8.7 (Berkeley) 5/19/98')
+VERSIONID(`@(#)sunos4.1.m4 8.7 (Berkeley) 5/19/1998')
define(`confEBINDIR', `/usr/lib')dnl
diff --git a/contrib/sendmail/cf/ostype/svr4.m4 b/contrib/sendmail/cf/ostype/svr4.m4
index 1451414797fe..d0de2783b104 100644
--- a/contrib/sendmail/cf/ostype/svr4.m4
+++ b/contrib/sendmail/cf/ostype/svr4.m4
@@ -12,11 +12,11 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)svr4.m4 8.10 (Berkeley) 5/19/98')
+VERSIONID(`@(#)svr4.m4 8.11 (Berkeley) 10/6/1998')
-define(`ALIAS_FILE', /usr/ucblib/aliases)dnl
-ifdef(`HELP_FILE',,`define(`HELP_FILE', /usr/ucblib/sendmail.hf)')dnl
-ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /usr/ucblib/sendmail.st)')dnl
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/usr/ucblib/aliases'))dnl
+ifdef(`HELP_FILE',,`define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/usr/ucblib/sendmail.hf'))')dnl
+ifdef(`STATUS_FILE',,`define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/usr/ucblib/sendmail.st'))')dnl
define(`LOCAL_MAILER_PATH', `/usr/ucblib/binmail')dnl
define(`LOCAL_MAILER_FLAGS', `rmn9')dnl
define(`LOCAL_SHELL_FLAGS', `ehuP')dnl
diff --git a/contrib/sendmail/cf/ostype/ultrix4.m4 b/contrib/sendmail/cf/ostype/ultrix4.m4
index 874fa8b89d6b..d10518ae6a95 100644
--- a/contrib/sendmail/cf/ostype/ultrix4.m4
+++ b/contrib/sendmail/cf/ostype/ultrix4.m4
@@ -12,6 +12,6 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)ultrix4.m4 8.8 (Berkeley) 5/19/98')
+VERSIONID(`@(#)ultrix4.m4 8.8 (Berkeley) 5/19/1998')
define(`confEBINDIR', `/usr/lib')dnl
diff --git a/contrib/sendmail/cf/ostype/unixware7.m4 b/contrib/sendmail/cf/ostype/unixware7.m4
new file mode 100644
index 000000000000..af1bcc8be0f2
--- /dev/null
+++ b/contrib/sendmail/cf/ostype/unixware7.m4
@@ -0,0 +1,16 @@
+divert(-1)
+#
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+#
+# By using this file, you agree to the terms and conditions set
+# forth in the LICENSE file which can be found at the top level of
+# the sendmail distribution.
+#
+#
+
+divert(0)
+VERSIONID(`@(#)unixware7.m4 8.1 (Berkeley) 10/13/1998')
+define(`ALIAS_FILE', `/etc/mail/aliases')dnl
+ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/etc/mailer/sendmail.st'))')dnl
+define(`confEBINDIR', `/usr/lib')dnl
diff --git a/contrib/sendmail/cf/ostype/unknown.m4 b/contrib/sendmail/cf/ostype/unknown.m4
index bb85604efa13..629c31bc23c4 100644
--- a/contrib/sendmail/cf/ostype/unknown.m4
+++ b/contrib/sendmail/cf/ostype/unknown.m4
@@ -12,7 +12,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)unknown.m4 8.6 (Berkeley) 5/19/98')
+VERSIONID(`@(#)unknown.m4 8.6 (Berkeley) 5/19/1998')
errprint(`*** ERROR: You have not specified a valid operating system type.')
errprint(` Use the OSTYPE macro to select a valid system type. This')
errprint(` is necessary in order to get the proper pathnames and flags')
diff --git a/contrib/sendmail/cf/ostype/uxpds.m4 b/contrib/sendmail/cf/ostype/uxpds.m4
index 2fb147eb5223..0f1d908f23b6 100644
--- a/contrib/sendmail/cf/ostype/uxpds.m4
+++ b/contrib/sendmail/cf/ostype/uxpds.m4
@@ -15,12 +15,12 @@ divert(-1)
#
divert(0)
-VERSIONID(`@(#)uxpds.m4 8.9 (Berkeley) 5/19/98')
+VERSIONID(`@(#)uxpds.m4 8.10 (Berkeley) 10/6/1998')
define(`confDEF_GROUP_ID', `6')
-define(`ALIAS_FILE', /usr/ucblib/aliases)dnl
-ifdef(`HELP_FILE',,`define(`HELP_FILE', /usr/ucblib/sendmail.hf)')dnl
-ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /usr/ucblib/sendmail.st)')dnl
+define(`ALIAS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/aliases', `/usr/ucblib/aliases'))dnl
+ifdef(`HELP_FILE',,`define(`HELP_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/helpfile', `/usr/ucblib/sendmail.hf'))')dnl
+ifdef(`STATUS_FILE',,`define(`STATUS_FILE', ifdef(`_USE_ETC_MAIL_', `/etc/mail/statistics', `/usr/ucblib/sendmail.st'))')dnl
define(`LOCAL_MAILER_PATH', `/usr/ucblib/binmail')dnl
define(`LOCAL_MAILER_FLAGS', `rmn9')dnl
define(`LOCAL_SHELL_FLAGS', `ehuP')dnl
diff --git a/contrib/sendmail/cf/sh/makeinfo.sh b/contrib/sendmail/cf/sh/makeinfo.sh
index 424c699d649f..c8621f422d0f 100644
--- a/contrib/sendmail/cf/sh/makeinfo.sh
+++ b/contrib/sendmail/cf/sh/makeinfo.sh
@@ -10,7 +10,7 @@
# the sendmail distribution.
#
#
-# @(#)makeinfo.sh 8.11 (Berkeley) 5/19/98
+# @(#)makeinfo.sh 8.11 (Berkeley) 5/19/1998
#
usewhoami=0
diff --git a/contrib/sendmail/contrib/smcontrol.pl b/contrib/sendmail/contrib/smcontrol.pl
new file mode 100755
index 000000000000..b5ef1f8af677
--- /dev/null
+++ b/contrib/sendmail/contrib/smcontrol.pl
@@ -0,0 +1,361 @@
+#!/usr/local/bin/perl -w
+
+use FileHandle;
+use Socket;
+
+$sendmailDaemon = "/usr/sbin/sendmail -q30m -bd";
+
+##########################################################################
+#
+# &get_controlname -- read ControlSocketName option from sendmail.cf
+#
+# Parameters:
+# none.
+#
+# Returns:
+# control socket filename, undef if not found
+#
+
+sub get_controlname
+{
+ my $cn = undef;
+ my $qd = undef;
+
+ open(CF, "</etc/sendmail.cf") or return $cn;
+ while (<CF>)
+ {
+ chomp;
+ if (/^O ControlSocketName\s*=\s*([^#]+)$/o)
+ {
+ $cn = $1;
+ }
+ if (/^O QueueDirectory\s*=\s*([^#]+)$/o)
+ {
+ $qd = $1;
+ }
+ if (/^OQ([^#]+)$/o)
+ {
+ $qd = $1;
+ }
+ }
+ close(CF);
+ if (not defined $cn)
+ {
+ return undef;
+ }
+ if ($cn !~ /^\//o)
+ {
+ return undef if (not defined $qd);
+
+ $cn = $qd . "/" . $cn;
+ }
+ return $cn;
+}
+
+##########################################################################
+#
+# &do_command -- send command to sendmail daemon view control socket
+#
+# Parameters:
+# controlsocket -- filename for socket
+# command -- command to send
+#
+# Returns:
+# reply from sendmail daemon
+#
+
+sub do_command
+{
+ my $controlsocket = shift;
+ my $command = shift;
+ my $proto = getprotobyname('ip');
+ my @reply;
+
+ socket(SOCK, PF_UNIX, SOCK_STREAM, $proto) or return undef;
+
+ for ($i = 0; $i < 4; $i++)
+ {
+ if (!connect(SOCK, sockaddr_un($controlsocket)))
+ {
+ if ($i == 3)
+ {
+ close(SOCK);
+ return undef;
+ }
+ sleep 1;
+ next;
+ }
+ last;
+ }
+ autoflush SOCK 1;
+ print SOCK "$command\n";
+ @reply = <SOCK>;
+ close(SOCK);
+ return join '', @reply;
+}
+
+##########################################################################
+#
+# &sendmail_running -- check if sendmail is running via SMTP
+#
+# Parameters:
+# none
+#
+# Returns:
+# 1 if running, undef otherwise
+#
+
+sub sendmail_running
+{
+ my $port = getservbyname("smtp", "tcp") || 25;
+ my $proto = getprotobyname("tcp");
+ my $iaddr = inet_aton("localhost");
+ my $paddr = sockaddr_in($port, $iaddr);
+
+ socket(SOCK, PF_INET, SOCK_STREAM, $proto) or return undef;
+ if (!connect(SOCK, $paddr))
+ {
+ close(SOCK);
+ return undef;
+ }
+ autoflush SOCK 1;
+ while (<SOCK>)
+ {
+ if (/^(\d{3})([ -])/)
+ {
+ if ($1 != 220)
+ {
+ close(SOCK);
+ return undef;
+ }
+ }
+ else
+ {
+ close(SOCK);
+ return undef;
+ }
+ last if ($2 eq " ");
+ }
+ print SOCK "QUIT\n";
+ while (<SOCK>)
+ {
+ last if (/^\d{3} /);
+ }
+ close(SOCK);
+ return 1;
+}
+
+##########################################################################
+#
+# &munge_status -- turn machine readable status into human readable text
+#
+# Parameters:
+# raw -- raw results from sendmail daemon STATUS query
+#
+# Returns:
+# human readable text
+#
+
+sub munge_status
+{
+ my $raw = shift;
+ my $cooked = "";
+ my $daemonStatus = "";
+
+ if ($raw =~ /^(\d+)\/(\d+)$/mg)
+ {
+ $cooked .= "Current number of children: $1";
+ if ($2 > 0)
+ {
+ $cooked .= " (maximum $2)";
+ }
+ $cooked .= "\n";
+ }
+ while ($raw =~ /^(\d+) (.*)$/mg)
+ {
+ if (not $daemonStatus)
+ {
+ $daemonStatus = "(process $1) " . ucfirst($2) . "\n";
+ }
+ else
+ {
+ $cooked .= "Child Process $1 Status: $2\n";
+ }
+ }
+ return ($daemonStatus, $cooked);
+}
+
+##########################################################################
+#
+# &start_daemon -- fork off a sendmail daemon
+#
+# Parameters:
+# control -- control socket name
+#
+# Returns:
+# Error message or "OK" if successful
+#
+
+sub start_daemon
+{
+ my $control = shift;
+ my $pid;
+
+ if ($pid = fork)
+ {
+ my $exitstat;
+
+ waitpid $pid, 0 or return "Could not get status of created process: $!\n";
+ $exitstat = $? / 256;
+ if ($exitstat != 0)
+ {
+ return "sendmail daemon startup exited with exit value $exitstat";
+ }
+ }
+ elsif (defined $pid)
+ {
+ exec($main::sendmailDaemon);
+ die "Unable to start sendmail daemon: $!.\n";
+ }
+ else
+ {
+ return "Could not create new process: $!\n";
+ }
+ return "OK\n";
+}
+
+##########################################################################
+#
+# &stop_daemon -- stop the sendmail daemon using control socket
+#
+# Parameters:
+# control -- control socket name
+#
+# Returns:
+# Error message or status message
+#
+
+sub stop_daemon
+{
+ my $control = shift;
+ my $status;
+
+ if (not defined $control)
+ {
+ return "The control socket is not configured so the daemon can not be stopped.\n";
+ }
+ return &do_command($control, "SHUTDOWN");
+}
+
+##########################################################################
+#
+# &restart_daemon -- restart the sendmail daemon using control socket
+#
+# Parameters:
+# control -- control socket name
+#
+# Returns:
+# Error message or status message
+#
+
+sub restart_daemon
+{
+ my $control = shift;
+ my $status;
+
+ if (not defined $control)
+ {
+ return "The control socket is not configured so the daemon can not be restarted.";
+ }
+ return &do_command($control, "RESTART");
+}
+
+##########################################################################
+#
+# &help -- get help from the daemon using the control socket
+#
+# Parameters:
+# control -- control socket name
+#
+# Returns:
+# Error message or status message
+#
+
+sub help
+{
+ my $control = shift;
+ my $status;
+
+ if (not defined $control)
+ {
+ return "The control socket is not configured so the daemon can not be queried for help.";
+ }
+ return &do_command($control, "HELP");
+}
+
+my $command = shift;
+my $control = &get_controlname;
+my $status = undef;
+my $daemonStatus = undef;
+
+if (not defined $control)
+{
+ die "No control socket available.\n";
+}
+if (not defined $command)
+{
+ die "Usage: $0 command\n";
+}
+if ($command eq "status")
+{
+ $status = &do_command($control, "STATUS");
+ if (not defined $status)
+ {
+ # Not responding on control channel, query via SMTP
+ if (&sendmail_running)
+ {
+ $daemonStatus = "Sendmail is running but not answering status queries.";
+ }
+ else
+ {
+ $daemonStatus = "Sendmail does not appear to be running.";
+ }
+ }
+ else
+ {
+ # Munge control channel output
+ ($daemonStatus, $status) = &munge_status($status);
+ }
+}
+elsif (lc($command) eq "shutdown")
+{
+ $status = &stop_daemon($control);
+}
+elsif (lc($command) eq "restart")
+{
+ $status = &restart_daemon($control);
+}
+elsif (lc($command) eq "start")
+{
+ $status = &start_daemon($control);
+}
+elsif (lc($command) eq "help")
+{
+ $status = &help($control);
+}
+else
+{
+ die "Unrecognized command $command\n";
+}
+if (defined $daemonStatus)
+{
+ print "Daemon Status: $daemonStatus\n";
+}
+if (defined $status)
+{
+ print "$status\n";
+}
+else
+{
+ die "No response\n";
+}
diff --git a/contrib/sendmail/doc/changes/Makefile b/contrib/sendmail/doc/changes/Makefile
index 46447c2e5340..76eaa3912ee2 100644
--- a/contrib/sendmail/doc/changes/Makefile
+++ b/contrib/sendmail/doc/changes/Makefile
@@ -1,4 +1,4 @@
-# @(#)Makefile 8.1 (Berkeley) 4/13/94
+# @(#)Makefile 8.1 (Berkeley) 4/13/1994
DIR= smm/09.sendmail
SRCS= changes.me
diff --git a/contrib/sendmail/doc/changes/changes.me b/contrib/sendmail/doc/changes/changes.me
index dbe9bea3cb89..b963396ba49d 100644
--- a/contrib/sendmail/doc/changes/changes.me
+++ b/contrib/sendmail/doc/changes/changes.me
@@ -8,7 +8,7 @@
.\" the sendmail distribution.
.\"
.\"
-.\" @(#)changes.me 8.7 (Berkeley) 5/19/98
+.\" @(#)changes.me 8.7 (Berkeley) 5/19/1998
.\"
.\" ditroff -me -Pxx changes.me
.eh '%''Changes in Sendmail Version 8'
diff --git a/contrib/sendmail/doc/intro/Makefile b/contrib/sendmail/doc/intro/Makefile
index 939cd6c17eb0..6369a4a0fec8 100644
--- a/contrib/sendmail/doc/intro/Makefile
+++ b/contrib/sendmail/doc/intro/Makefile
@@ -1,4 +1,4 @@
-# @(#)Makefile 8.2 (Berkeley) 2/28/94
+# @(#)Makefile 8.2 (Berkeley) 2/28/1994
DIR= smm/09.sendmail
SRCS= intro.me
diff --git a/contrib/sendmail/doc/intro/intro.me b/contrib/sendmail/doc/intro/intro.me
index 5bb5e8947a0b..03cfa336994d 100644
--- a/contrib/sendmail/doc/intro/intro.me
+++ b/contrib/sendmail/doc/intro/intro.me
@@ -8,7 +8,7 @@
.\" the sendmail distribution.
.\"
.\"
-.\" @(#)intro.me 8.7 (Berkeley) 5/19/98
+.\" @(#)intro.me 8.7 (Berkeley) 5/19/1998
.\"
.\" pic -Pxx intro.me | ditroff -me -Pxx
.eh 'SMM:9-%''SENDMAIL \*- An Internetwork Mail Router'
diff --git a/contrib/sendmail/doc/op/Makefile b/contrib/sendmail/doc/op/Makefile
index e8f791a4959c..0d86e91de917 100644
--- a/contrib/sendmail/doc/op/Makefile
+++ b/contrib/sendmail/doc/op/Makefile
@@ -1,4 +1,4 @@
-# @(#)Makefile 8.2 (Berkeley) 2/28/94
+# @(#)Makefile 8.2 (Berkeley) 2/28/1994
DIR= smm/08.sendmailop
SRCS= op.me
diff --git a/contrib/sendmail/doc/op/op.me b/contrib/sendmail/doc/op/op.me
index fc3290ef2d38..a2b0ef142501 100644
--- a/contrib/sendmail/doc/op/op.me
+++ b/contrib/sendmail/doc/op/op.me
@@ -8,7 +8,7 @@
.\" the sendmail distribution.
.\"
.\"
-.\" @(#)op.me 8.129 (Berkeley) 6/29/98
+.\" @(#)op.me 8.134 (Berkeley) 9/16/1998
.\"
.\" eqn op.me | pic | troff -me
.eh 'SMM:08-%''Sendmail Installation and Operation Guide'
@@ -46,7 +46,7 @@ Eric Allman
Sendmail, Inc.
eric@Sendmail.COM
.sp
-Version 8.129
+Version 8.134
.sp
For Sendmail Version 8.9
.)l
@@ -259,7 +259,7 @@ program.
For now, see the file BuildTools/README for details.)
.sh 3 "Tweaking the Makefile"
.pp
-.b "XXX This should all be in the Site Configuration File section."
+.\" .b "XXX This should all be in the Site Configuration File section."
.i Sendmail
supports two different formats
for the local (on disk) version of databases,
@@ -1157,7 +1157,7 @@ does not use the native service switch in this release.
.)f
.pp
If the underlying operating system does not support a service switch
-(e.g., SunOS, HP-UX, BSD)
+(e.g., SunOS 4.X, HP-UX, BSD)
then
.i sendmail
will provide a stub implementation.
@@ -2083,6 +2083,8 @@ The timeout waiting for a reply to an IDENT query
.(f
\**On some systems the default is zero to turn the protocol off entirely.
.)f
+.ip fileopen
+The timeout for opening .forward and :include: files [60s, none].
.ip hoststatus
How long status information about a host
(e.g., host down)
@@ -2731,7 +2733,7 @@ although system routines may use other services
service for user name lookups by
.i getpwname ).
.pp
-However, some systems (such as SunOS)
+However, some systems (such as SunOS 4.X)
will do DNS lookups
regardless of the setting of the service switch entry.
In particular, the system routine
@@ -2823,7 +2825,7 @@ it will not assume that all names match.
.pp
To completely turn off all name server access
on systems without service switch support
-(such as SunOS)
+(such as SunOS 4.X)
you will have to recompile with
\-DNAMED_BIND=0
and remove \-lresolv from the list of libraries to be searched
@@ -3674,7 +3676,7 @@ will be
or whatever is appropriate for the receiving mailer.
.ip $h
The recipient host.
-This is set in ruleset 0 from the $# field of a parsed address.
+This is set in ruleset 0 from the $@ field of a parsed address.
.ip $i
The queue id,
e.g.,
@@ -3788,6 +3790,9 @@ The IP address of the SMTP client.
Defined in the SMTP server only.
.ip ${client_name}
The host name of the SMTP client.
+This may be the client's bracketed IP address
+in the form [ nnn.nnn.nnn.nnn ] if the client's
+IP address is not resolvable.
Defined in the SMTP server only.
.ip ${client_port}
The port number of the SMTP client.
@@ -4599,6 +4604,7 @@ or may be two ids separated by a slash;
if so, the first rewriting set is applied to envelope
addresses
and the second is applied to headers.
+Setting any value zero disables corresponding mailer-specific rewriting.
.pp
The Directory
is actually a colon-separated path of directories to try.
@@ -6123,7 +6129,7 @@ For example,
as of this writing
version 8 config files
(specifically, 8.9)
-used version level 7 configurations.
+used version level 8 configurations.
.pp
.q Old
configuration files are defined as version level one.
@@ -6218,6 +6224,10 @@ flag (use 250 instead of 252 return value for
commands)
was assumed.
.pp
+Version level eight configuration files allow
+.b $#
+on the left hand side of ruleset lines.
+.pp
The
.b V
line may have an optional
@@ -6516,7 +6526,7 @@ if used, it is substituted by the substring matches, delimited by
.b $|
or the string specified with the the
.b \-d
-flag. The flags availble for the map are
+flag. The flags available for the map are
.(b
-n not
-f case sensitive
@@ -6529,7 +6539,8 @@ flag. The flags availble for the map are
replace/discard value
.)b
The
-.b \-s flag can include an optional parameter which can be used
+.b \-s
+flag can include an optional parameter which can be used
to select the substrings in the result of the lookup. For example,
.(b
-s1,3,4
@@ -8178,7 +8189,7 @@ Temporary versions of the qf files,
used during queue file rebuild.
.ip /var/spool/mqueue/xf*
A transcript of the current session.
-.if e \
+.if o \
\{\
. bp
. rs
@@ -8202,7 +8213,7 @@ replace it with a blank sheet for double-sided output.
.\".sz 10
.\"Eric Allman
.\".sp
-.\"Version 8.129
+.\"Version 8.134
.\".ce 0
.bp 3
.ce
@@ -8224,3 +8235,12 @@ TABLE OF CONTENTS
.rm ef
.rm of
.xp
+.if o \
+\{\
+. bp
+. rs
+. sp |4i
+. ce 2
+This page intentionally left blank;
+replace it with a blank sheet for double-sided output.
+.\}
diff --git a/contrib/sendmail/doc/usenix/Makefile b/contrib/sendmail/doc/usenix/Makefile
index ea0665c67bed..d2308cb891bc 100644
--- a/contrib/sendmail/doc/usenix/Makefile
+++ b/contrib/sendmail/doc/usenix/Makefile
@@ -1,4 +1,4 @@
-# @(#)Makefile 8.2 (Berkeley) 2/28/94
+# @(#)Makefile 8.2 (Berkeley) 2/28/1994
SRCS= usenix.me
MACROS= -me
diff --git a/contrib/sendmail/doc/usenix/usenix.me b/contrib/sendmail/doc/usenix/usenix.me
index 0fbb6723c136..4f88a94f8f24 100644
--- a/contrib/sendmail/doc/usenix/usenix.me
+++ b/contrib/sendmail/doc/usenix/usenix.me
@@ -1,6 +1,6 @@
.nr si 3n
.he 'Mail Systems and Addressing in 4.2bsd''%'
-.fo 'Version 8.2'USENIX \- Jan 83'Last Mod 11/27/93'
+.fo 'Version 8.2'USENIX \- Jan 83'Last Mod 11/27/1993'
.if n .ls 2
.+c
.(l C
diff --git a/contrib/sendmail/mail.local/Makefile.m4 b/contrib/sendmail/mail.local/Makefile.m4
index 5dc1857d3b7f..bf9a155eefb1 100644
--- a/contrib/sendmail/mail.local/Makefile.m4
+++ b/contrib/sendmail/mail.local/Makefile.m4
@@ -1,7 +1,7 @@
#
# This Makefile is designed to work on the old "make" program.
#
-# @(#)Makefile.m4 8.21 (Berkeley) 6/4/98
+# @(#)Makefile.m4 8.22 (Berkeley) 7/12/1998
#
# C compiler
@@ -34,7 +34,7 @@ LIBDIRS=confLIBDIRS
LIBS= ifdef(`confLIBS', `confLIBS')
# location of mail.local binary (usually /usr/sbin or /usr/etc)
-BINDIR= ${DESTDIR}ifdef(`confEBINDIR', `confEBINDIR', `/usr/libexec')
+EBINDIR=${DESTDIR}ifdef(`confEBINDIR', `confEBINDIR', `/usr/libexec')
# additional .o files needed
OBJADD= ifdef(`confOBJADD', `confOBJADD')
@@ -91,7 +91,7 @@ install:
force-install: install-mail.local install-docs
install-mail.local: mail.local
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} mail.local ${BINDIR}
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} mail.local ${EBINDIR}
install-docs: mail.local.${MAN8SRC}
ifdef(`confNO_MAN_INSTALL', `dnl',
diff --git a/contrib/sendmail/mail.local/README b/contrib/sendmail/mail.local/README
index a20506831c9d..5da44bbfa1cf 100644
--- a/contrib/sendmail/mail.local/README
+++ b/contrib/sendmail/mail.local/README
@@ -1,4 +1,4 @@
-# @(#)README 8.1 (Berkeley) 2/17/98
+# @(#)README 8.1 (Berkeley) 2/17/1998
This directory contains the source files for mail.local.
diff --git a/contrib/sendmail/mail.local/mail.local.8 b/contrib/sendmail/mail.local/mail.local.8
index e872fbedadf3..05f11ed31e6d 100644
--- a/contrib/sendmail/mail.local/mail.local.8
+++ b/contrib/sendmail/mail.local/mail.local.8
@@ -7,7 +7,7 @@
.\" the sendmail distribution.
.\"
.\"
-.\" @(#)mail.local.8 8.7 (Berkeley) 5/19/98
+.\" @(#)mail.local.8 8.7 (Berkeley) 5/19/1998
.\"
.Dd May 19, 1998
.Dt MAIL.LOCAL 8
diff --git a/contrib/sendmail/mail.local/mail.local.c b/contrib/sendmail/mail.local/mail.local.c
index a0f176f63811..abe1a19ac921 100644
--- a/contrib/sendmail/mail.local/mail.local.c
+++ b/contrib/sendmail/mail.local/mail.local.c
@@ -1,4 +1,4 @@
-/*-
+/*
* Copyright (c) 1998 Sendmail, Inc. All rights reserved.
* Copyright (c) 1990, 1993, 1994
* The Regents of the University of California. All rights reserved.
@@ -16,7 +16,7 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)mail.local.c 8.78 (Berkeley) 5/19/98";
+static char sccsid[] = "@(#)mail.local.c 8.83 (Berkeley) 12/17/1998";
#endif /* not lint */
/*
@@ -102,7 +102,7 @@ static char sccsid[] = "@(#)mail.local.c 8.78 (Berkeley) 5/19/98";
# define USE_VSYSLOG 0
#endif
-#if defined(NeXT)
+#if defined(NeXT) && !defined(__APPLE__)
# include <libc.h>
# define _PATH_MAILDIR "/usr/spool/mail"
# define __dead /* empty */
@@ -216,18 +216,20 @@ extern char *strerror __P((int));
# define S_ISREG(mode) (((mode) & _S_IFMT) == S_IFREG)
#endif
+#ifndef MAILER_DAEMON
+# define MAILER_DAEMON "MAILER-DAEMON"
+#endif
+
int eval = EX_OK; /* sysexits.h error value. */
int lmtpmode = 0;
u_char tTdvect[100];
void deliver __P((int, char *));
void e_to_sys __P((int));
-__dead void err __P((const char *, ...));
void notifybiff __P((char *));
int store __P((char *, int));
void usage __P((void));
void vwarn __P((const char *, _BSD_VA_LIST_));
-void warn __P((const char *, ...));
void lockmbox __P((char *));
void unlockmbox __P((void));
void mailerr __P((const char *, const char *, ...));
@@ -266,7 +268,7 @@ main(argc, argv)
case 'f':
case 'r': /* Backward compatible. */
if (from != NULL) {
- warn("multiple -f options");
+ mailerr(NULL, "multiple -f options");
usage();
}
from = optarg;
@@ -336,7 +338,7 @@ parseaddr(s)
return NULL;
} else {
while ((isascii(*p) && isalnum(*p)) ||
- *p == '.' || *p == '-')
+ strchr(".-_", *p))
p++;
}
if (*p == ',' && p[1] == '@')
@@ -347,6 +349,8 @@ parseaddr(s)
return NULL;
}
+ s = p;
+
/* local-part */
if (*p == '\"') {
p++;
@@ -386,7 +390,7 @@ parseaddr(s)
return NULL;
} else {
while ((isascii(*p) && isalnum(*p)) ||
- *p == '.' || *p == '-')
+ strchr(".-_", *p))
p++;
}
}
@@ -396,6 +400,11 @@ parseaddr(s)
if (*p && *p != ' ')
return NULL;
len = p - s - 1;
+ if (*s == '\0' || len <= 0)
+ {
+ s = MAILER_DAEMON;
+ len = strlen(s);
+ }
p = malloc(len + 1);
if (p == NULL) {
@@ -581,7 +590,7 @@ store(from, lmtprcpts)
char *from;
int lmtprcpts;
{
- FILE *fp;
+ FILE *fp = NULL;
time_t tval;
int fd, eline;
char line[2048];
@@ -593,8 +602,8 @@ store(from, lmtprcpts)
printf("451 4.3.0 unable to open temporary file\r\n");
return -1;
} else {
- e_to_sys(errno);
- err("unable to open temporary file");
+ mailerr("451 4.3.0", "unable to open temporary file");
+ exit(eval);
}
}
(void)unlink(tmpbuf);
@@ -609,13 +618,21 @@ store(from, lmtprcpts)
line[0] = '\0';
for (eline = 1; fgets(line, sizeof(line), stdin);) {
- if (line[strlen(line)-2] == '\r') {
- strcpy(line+strlen(line)-2, "\n");
+ size_t line_len = strlen(line);
+
+ if (line_len >= 2 &&
+ line[line_len - 2] == '\r' &&
+ line[line_len - 1] == '\n') {
+ strcpy(line + line_len - 2, "\n");
}
if (lmtprcpts && line[0] == '.') {
+ char *src = line + 1, *dest = line;
+
if (line[1] == '\n')
goto lmtpdot;
- strcpy(line, line+1);
+ while (*src != '\0')
+ *dest++ = *src++;
+ *dest = '\0';
}
if (line[0] == '\n')
eline = 1;
@@ -634,8 +651,10 @@ store(from, lmtprcpts)
fclose(fp);
return -1;
} else {
- e_to_sys(errno);
- err("temporary file write error");
+ mailerr("451 4.3.0",
+ "temporary file write error");
+ fclose(fp);
+ exit(eval);
}
}
}
@@ -662,8 +681,9 @@ store(from, lmtprcpts)
fclose(fp);
return -1;
} else {
- e_to_sys(errno);
- err("temporary file write error");
+ mailerr("451 4.3.0", "temporary file write error");
+ fclose(fp);
+ exit(eval);
}
}
return (fd);
@@ -697,7 +717,13 @@ deliver(fd, name)
}
}
else {
- warn("unknown name: %s", name);
+ char *errcode = NULL;
+
+ if (eval == EX_TEMPFAIL)
+ errcode = "451 4.3.0";
+ else
+ errcode = "550 5.1.1";
+ mailerr(errcode, "unknown name: %s", name);
}
return;
}
@@ -752,7 +778,8 @@ tryagain:
if (lstat(path, &sb) < 0)
{
eval = EX_CANTCREAT;
- warn("%s: lstat: file changed after open", path);
+ mailerr("550 5.2.0",
+ "%s: lstat: file changed after open", path);
goto err1;
}
else
@@ -791,7 +818,8 @@ tryagain:
#endif
sb.st_uid != fsb.st_uid) {
eval = EX_TEMPFAIL;
- warn("%s: fstat: file changed after open", path);
+ mailerr("550 5.2.0", "%s: fstat: file changed after open",
+ path);
goto err1;
}
@@ -842,9 +870,12 @@ tryagain:
mailerr("450 4.2.0", "%s: %s", path, strerror(errno));
err3:
if (setreuid(0, 0) < 0) {
+#if 0
+ /* already printed an error above for this recipient */
e_to_sys(errno);
mailerr("450 4.2.0", "setreuid(0, 0): %s",
strerror(errno));
+#endif
}
#ifdef DEBUG
printf("reset euid = %d\n", geteuid());
@@ -947,7 +978,6 @@ notifybiff(msg)
if ((sp = getservbyname("biff", "udp")) == NULL)
return;
if ((hp = gethostbyname("localhost")) == NULL) {
- warn("localhost: %s", strerror(errno));
return;
}
addr.sin_family = hp->h_addrtype;
@@ -955,20 +985,18 @@ notifybiff(msg)
addr.sin_port = sp->s_port;
}
if (f < 0 && (f = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
- warn("socket: %s", strerror(errno));
return;
}
len = strlen(msg) + 1;
- if (sendto(f, msg, len, 0, (struct sockaddr *)&addr, sizeof(addr))
- != len)
- warn("sendto biff: %s", strerror(errno));
+ (void) sendto(f, msg, len, 0, (struct sockaddr *)&addr, sizeof(addr));
}
void
usage()
{
eval = EX_USAGE;
- err("usage: mail.local [-l] [-f from] user ...");
+ mailerr(NULL, "usage: mail.local [-l] [-f from] user ...");
+ exit(eval);
}
void
@@ -990,7 +1018,8 @@ mailerr(hdr, fmt, va_alist)
#endif
if (lmtpmode)
{
- printf("%s ", hdr);
+ if (hdr != NULL)
+ printf("%s ", hdr);
vprintf(fmt, ap);
printf("\r\n");
}
@@ -1001,49 +1030,6 @@ mailerr(hdr, fmt, va_alist)
}
}
-#ifdef __STDC__
-void
-err(const char *fmt, ...)
-#else
-void
-err(fmt, va_alist)
- const char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
-
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- vwarn(fmt, ap);
- va_end(ap);
-
- exit(eval);
-}
-
-void
-#ifdef __STDC__
-warn(const char *fmt, ...)
-#else
-warn(fmt, va_alist)
- const char *fmt;
- va_dcl
-#endif
-{
- va_list ap;
-
-#ifdef __STDC__
- va_start(ap, fmt);
-#else
- va_start(ap);
-#endif
- vwarn(fmt, ap);
- va_end(ap);
-}
-
void
vwarn(fmt, ap)
const char *fmt;
diff --git a/contrib/sendmail/mail.local/pathnames.h b/contrib/sendmail/mail.local/pathnames.h
index 5ec006866d85..33d949e4370c 100644
--- a/contrib/sendmail/mail.local/pathnames.h
+++ b/contrib/sendmail/mail.local/pathnames.h
@@ -8,7 +8,7 @@
* the sendmail distribution.
*
*
- * @(#)pathnames.h 8.5 (Berkeley) 5/19/98
+ * @(#)pathnames.h 8.5 (Berkeley) 5/19/1998
*/
#include <paths.h>
diff --git a/contrib/sendmail/mailstats/Makefile.m4 b/contrib/sendmail/mailstats/Makefile.m4
index ae5489c62eee..2de9904f9c3d 100644
--- a/contrib/sendmail/mailstats/Makefile.m4
+++ b/contrib/sendmail/mailstats/Makefile.m4
@@ -1,7 +1,7 @@
#
# This Makefile is designed to work on the old "make" program.
#
-# @(#)Makefile.m4 8.14 (Berkeley) 6/4/98
+# @(#)Makefile.m4 8.15 (Berkeley) 7/12/1998
#
# C compiler
@@ -34,7 +34,7 @@ LIBDIRS=confLIBDIRS
LIBS= ifdef(`confLIBS', `confLIBS')
# location of mailstats binary (usually /usr/sbin or /usr/etc)
-BINDIR= ${DESTDIR}ifdef(`confSBINDIR', `confSBINDIR', `/usr/sbin')
+SBINDIR=${DESTDIR}ifdef(`confSBINDIR', `confSBINDIR', `/usr/sbin')
# additional .o files needed
OBJADD= ifdef(`confOBJADD', `confOBJADD')
@@ -82,7 +82,7 @@ mailstats.${MAN8SRC}: mailstats.8
install: install-mailstats install-docs
install-mailstats: mailstats
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} mailstats ${BINDIR}
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} mailstats ${SBINDIR}
install-docs: mailstats.${MAN8SRC}
ifdef(`confNO_MAN_INSTALL', `dnl',
diff --git a/contrib/sendmail/mailstats/mailstats.8 b/contrib/sendmail/mailstats/mailstats.8
index 3a8847a6f647..be2203d85fa6 100644
--- a/contrib/sendmail/mailstats/mailstats.8
+++ b/contrib/sendmail/mailstats/mailstats.8
@@ -5,7 +5,7 @@
.\" the sendmail distribution.
.\"
.\"
-.\" @(#)mailstats.8 8.5 (Berkeley) 5/19/98
+.\" @(#)mailstats.8 8.8 (Berkeley) 11/13/1998
.\"
.Dd April 25, 1996
.Dt MAILSTATS 1
@@ -16,6 +16,7 @@
.Sh SYNOPSIS
.Nm mailstats
.Op Fl o
+.if \nP .Op Fl p
.Op Fl C Ar cffile
.Op Fl f Ar stfile
.Sh DESCRIPTION
@@ -41,6 +42,10 @@ Kbytes from the mailer.
Number of messages to the mailer.
.It Sy bytes_to
Kbytes to the mailer.
+.It Sy msgsrej
+Number of messages rejected.
+.It Sy msgsdis
+Number of messages discarded.
.It Sy Mailer
The name of the mailer.
.El
@@ -64,6 +69,11 @@ specified in the
.Nm sendmail
.Dq cf
file.
+.if \nP \
+\{
+.It Fl p
+Output information in program-readable mode and clear statistics.
+.\}
.It Fl o
Don't display the name of the mailer in the output.
.El
@@ -73,12 +83,14 @@ The
utility exits 0 on success, and >0 if an error occurs.
.Sh FILES
.Bl -tag -width /var/log/sendmail.stXX -compact
-.It Pa /etc/sendmail.cf
+.ie \nP .It Pa /etc/mail/sendmail.cf
+.el .It Pa /etc/sendmail.cf
The default
.Nm sendmail
.Dq cf
file.
-.It Pa /var/log/sendmail.st
+.ie \nP .It Pa /etc/mail/statistics
+.el .It Pa /var/log/sendmail.st
The default
.Nm sendmail
statistics file.
diff --git a/contrib/sendmail/mailstats/mailstats.c b/contrib/sendmail/mailstats/mailstats.c
index 6fda6db391a1..5df3b95e39c6 100644
--- a/contrib/sendmail/mailstats/mailstats.c
+++ b/contrib/sendmail/mailstats/mailstats.c
@@ -18,7 +18,7 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)mailstats.c 8.26 (Berkeley) 7/2/98";
+static char sccsid[] = "@(#)mailstats.c 8.28 (Berkeley) 9/14/1998";
#endif /* not lint */
#ifndef NOT_SENDMAIL
@@ -45,17 +45,20 @@ main(argc, argv)
char *cfile;
FILE *cfp;
bool mnames;
+ bool progmode;
long frmsgs = 0, frbytes = 0, tomsgs = 0, tobytes = 0, rejmsgs = 0;
long dismsgs = 0;
char mtable[MAXMAILERS][MNAMELEN+1];
char sfilebuf[MAXLINE];
char buf[MAXLINE];
+ time_t now;
extern char *ctime();
cfile = _PATH_SENDMAILCF;
sfile = NULL;
mnames = TRUE;
- while ((ch = getopt(argc, argv, "C:f:o")) != EOF)
+ progmode = FALSE;
+ while ((ch = getopt(argc, argv, "C:f:op")) != EOF)
{
switch (ch)
{
@@ -71,11 +74,22 @@ main(argc, argv)
mnames = FALSE;
break;
+#if _FFR_MAILSTATS_PROGMODE
+ case 'p':
+ progmode = TRUE;
+ break;
+#endif
+
case '?':
default:
usage:
- fputs("usage: mailstats [-C cffile] [-f stfile] -o\n",
+#if _FFR_MAILSTATS_PROGMODE
+ fputs("usage: mailstats [-C cffile] [-f stfile] -o -p\n",
+ stderr);
+#else
+ fputs("usage: mailstats [-C cffile] [-f stfile] -o \n",
stderr);
+#endif
exit(EX_USAGE);
}
}
@@ -226,15 +240,29 @@ main(argc, argv)
}
}
- printf("Statistics from %s", ctime(&stat.stat_itime));
- printf(" M msgsfr bytes_from msgsto bytes_to msgsrej msgsdis%s\n",
- mnames ? " Mailer" : "");
+ if (progmode)
+ {
+ time(&now);
+ printf("%ld %ld\n", (long) stat.stat_itime, (long) now);
+ }
+ else
+ {
+ printf("Statistics from %s", ctime(&stat.stat_itime));
+ printf(" M msgsfr bytes_from msgsto bytes_to msgsrej msgsdis%s\n",
+ mnames ? " Mailer" : "");
+ }
for (i = 0; i < MAXMAILERS; i++)
{
if (stat.stat_nf[i] || stat.stat_nt[i] ||
stat.stat_nr[i] || stat.stat_nd[i])
{
- printf("%2d %8ld %10ldK %8ld %10ldK %6ld %6ld", i,
+ char *format;
+
+ if (progmode)
+ format = "%2d %8ld %10ld %8ld %10ld %6ld %6ld";
+ else
+ format = "%2d %8ld %10ldK %8ld %10ldK %6ld %6ld";
+ printf(format, i,
stat.stat_nf[i], stat.stat_bf[i],
stat.stat_nt[i], stat.stat_bt[i],
stat.stat_nr[i], stat.stat_nd[i]);
@@ -249,8 +277,20 @@ main(argc, argv)
dismsgs += stat.stat_nd[i];
}
}
- printf("=============================================================\n");
- printf(" T %8ld %10ldK %8ld %10ldK %6ld %6ld\n",
- frmsgs, frbytes, tomsgs, tobytes, rejmsgs, dismsgs);
+ if (progmode)
+ {
+ printf(" T %8ld %10ld %8ld %10ld %6ld %6ld\n",
+ frmsgs, frbytes, tomsgs, tobytes, rejmsgs, dismsgs);
+ close(fd);
+ fd = open(sfile, O_RDWR | O_TRUNC);
+ if (fd > 0)
+ close(fd);
+ }
+ else
+ {
+ printf("=============================================================\n");
+ printf(" T %8ld %10ldK %8ld %10ldK %6ld %6ld\n",
+ frmsgs, frbytes, tomsgs, tobytes, rejmsgs, dismsgs);
+ }
exit(EX_OK);
}
diff --git a/contrib/sendmail/makemap/Makefile.m4 b/contrib/sendmail/makemap/Makefile.m4
index 0f0c242d8958..983ffdf3ff82 100644
--- a/contrib/sendmail/makemap/Makefile.m4
+++ b/contrib/sendmail/makemap/Makefile.m4
@@ -1,7 +1,7 @@
#
# This Makefile is designed to work on the old "make" program.
#
-# @(#)Makefile.m4 8.20 (Berkeley) 6/4/98
+# @(#)Makefile.m4 8.21 (Berkeley) 7/12/1998
#
# C compiler
@@ -41,7 +41,7 @@ LIBDIRS=confLIBDIRS
LIBS= ifdef(`confLIBS', `confLIBS')
# location of makemap binary (usually /usr/sbin or /usr/etc)
-BINDIR= ${DESTDIR}ifdef(`confSBINDIR', `confSBINDIR', `/usr/sbin')
+SBINDIR=${DESTDIR}ifdef(`confSBINDIR', `confSBINDIR', `/usr/sbin')
# additional .o files needed
OBJADD= ifdef(`confOBJADD', `confOBJADD')
@@ -95,7 +95,7 @@ makemap.${MAN8SRC}: makemap.8
install: install-makemap install-docs
install-makemap: makemap
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} makemap ${BINDIR}
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} makemap ${SBINDIR}
install-docs: makemap.${MAN8SRC}
ifdef(`confNO_MAN_INSTALL', `dnl',
diff --git a/contrib/sendmail/makemap/makemap.8 b/contrib/sendmail/makemap/makemap.8
index 6180c8bda8b1..81f53a85b52a 100644
--- a/contrib/sendmail/makemap/makemap.8
+++ b/contrib/sendmail/makemap/makemap.8
@@ -7,7 +7,7 @@
.\" the sendmail distribution.
.\"
.\"
-.\" @(#)makemap.8 8.10 (Berkeley) 5/19/98
+.\" @(#)makemap.8 8.12 (Berkeley) 11/13/1998
.\"
.Dd November 16, 1992
.Dt MAKEMAP 8
@@ -18,8 +18,10 @@
.Sh SYNOPSIS
.Nm
.Op Fl N
+.if \nP .Op Fl c Ar cachesize
.Op Fl d
.Op Fl f
+.if \nP .Op Fl l
.Op Fl o
.Op Fl r
.Op Fl s
@@ -76,6 +78,11 @@ Include the null byte that terminates strings
in the map.
This must match the \-N flag in the sendmail.cf
``K'' line.
+.if \nP \
+\{\
+.It Fl c
+Use the specified hash and B-Tree cache size.
+.\}
.It Fl d
Allow duplicate keys in the map.
This is only allowed on B-Tree format maps.
@@ -90,6 +97,11 @@ This is intended to mesh with the
\fBK\fP
line in sendmail.cf.
The value is never case folded.
+.if \nP \
+\{\
+.It Fl l
+List supported map types.
+.\}
.It Fl o
Append to an old file.
This allows you to augment an existing file.
diff --git a/contrib/sendmail/makemap/makemap.c b/contrib/sendmail/makemap/makemap.c
index 53b5865606a9..aaaba32a57ab 100644
--- a/contrib/sendmail/makemap/makemap.c
+++ b/contrib/sendmail/makemap/makemap.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)makemap.c 8.62 (Berkeley) 6/24/98";
+static char sccsid[] = "@(#)makemap.c 8.71 (Berkeley) 11/29/1998";
#endif /* not lint */
#include <sys/types.h>
@@ -57,10 +57,10 @@ uid_t RunAsUid;
uid_t RunAsGid;
char *RunAsUserName;
int Verbose = 2;
-bool DontInitGroups = TRUE;
+bool DontInitGroups = FALSE;
long DontBlameSendmail = DBS_SAFE;
u_char tTdvect[100];
-uid_t TrustedFileUid = 0;
+uid_t TrustedUid = 0;
#define BUFSIZE 1024
@@ -79,16 +79,20 @@ main(argc, argv)
bool foldcase = TRUE;
int exitstat;
int opt;
- char *typename;
- char *mapname;
- char *ext;
+ char *typename = NULL;
+ char *mapname = NULL;
+ char *ext = NULL;
int lineno;
int st;
int mode;
- int putflags;
+ int putflags = 0;
+#ifdef NEWDB
long dbcachesize = 1024 * 1024;
+#endif
enum type type;
+#if !O_EXLOCK
int fd;
+#endif
int sff = SFF_ROOTOK|SFF_REGONLY;
struct passwd *pw;
union
@@ -116,7 +120,7 @@ main(argc, argv)
#ifdef NDBM
char pbuf[MAXNAME];
#endif
-#if _FFR_TRUSTED_FILE_OWNER
+#if _FFR_TRUSTED_USER
FILE *cfp;
char buf[MAXLINE];
#endif
@@ -145,7 +149,7 @@ main(argc, argv)
RunAsUserName = RealUserName = rnamebuf;
#if _FFR_NEW_MAKEMAP_FLAGS
-#define OPTIONS "C:Nc:dforsv"
+#define OPTIONS "C:Nc:dflorsv"
#else
#define OPTIONS "C:Ndforsv"
#endif
@@ -163,7 +167,9 @@ main(argc, argv)
#if _FFR_NEW_MAKEMAP_FLAGS
case 'c':
+# ifdef NEWDB
dbcachesize = atol(optarg);
+# endif
break;
#endif
@@ -175,6 +181,19 @@ main(argc, argv)
foldcase = FALSE;
break;
+#if _FFR_NEW_MAKEMAP_FLAGS
+ case 'l':
+# ifdef NDBM
+ printf("dbm\n");
+# endif
+# ifdef NEWDB
+ printf("hash\n");
+ printf("btree\n");
+# endif
+ exit(EX_OK);
+ break;
+#endif
+
case 'o':
notrunc = TRUE;
break;
@@ -232,7 +251,7 @@ main(argc, argv)
type = T_UNKNOWN;
}
-#if _FFR_TRUSTED_FILE_OWNER
+#if _FFR_TRUSTED_USER
if ((cfp = fopen(cfile, "r")) == NULL)
{
fprintf(stderr, "mailstats: ");
@@ -250,8 +269,8 @@ main(argc, argv)
switch (*b++)
{
case 'O': /* option */
- if (strncasecmp(b, " TrustedFileOwner", 17) == 0 &&
- !(isascii(b[17]) && isalnum(b[17])))
+ if (strncasecmp(b, " TrustedUser", 12) == 0 &&
+ !(isascii(b[12]) && isalnum(b[12])))
{
b = strchr(b, '=');
if (b == NULL)
@@ -259,26 +278,26 @@ main(argc, argv)
while (isascii(*++b) && isspace(*b))
continue;
if (isascii(*b) && isdigit(*b))
- TrustedFileUid = atoi(b);
+ TrustedUid = atoi(b);
else
{
register struct passwd *pw;
- TrustedFileUid = 0;
+ TrustedUid = 0;
pw = getpwnam(b);
if (pw == NULL)
fprintf(stderr,
- "TrustedFileOwner: unknown user %s", b);
+ "TrustedUser: unknown user %s\n", b);
else
- TrustedFileUid = pw->pw_uid;
+ TrustedUid = pw->pw_uid;
}
# ifdef UID_MAX
- if (TrustedFileUid > UID_MAX)
+ if (TrustedUid > UID_MAX)
{
- syserr("TrustedFileOwner: uid value (%ld) > UID_MAX (%ld)",
- TrustedFileUid, UID_MAX);
- TrustedFileUid = 0;
+ syserr("TrustedUser: uid value (%ld) > UID_MAX (%ld)",
+ TrustedUid, UID_MAX);
+ TrustedUid = 0;
}
# endif
break;
@@ -296,7 +315,7 @@ main(argc, argv)
case T_ERR:
#if _FFR_NEW_MAKEMAP_FLAGS
fprintf(stderr,
- "Usage: %s [-N] [-c cachesize] [-d] [-f] [-o] [-r] [-s] [-v] type mapname\n",
+ "Usage: %s [-N] [-c cachesize] [-d] [-f] [-l] [-o] [-r] [-s] [-v] type mapname\n",
progname);
#else
fprintf(stderr, "Usage: %s [-N] [-d] [-f] [-o] [-r] [-s] [-v] type mapname\n", progname);
@@ -505,16 +524,18 @@ main(argc, argv)
dbm_close(dbp.dbm);
exit(EX_CANTCREAT);
}
- if (geteuid() == 0 && TrustedFileUid != 0)
+#if _FFR_TRUSTED_USER
+ if (geteuid() == 0 && TrustedUid != 0)
{
- if (fchown(dbm_dirfno(dbp.dbm), TrustedFileUid, -1) < 0 ||
- fchown(dbm_pagfno(dbp.dbm), TrustedFileUid, -1) < 0)
+ if (fchown(dbm_dirfno(dbp.dbm), TrustedUid, -1) < 0 ||
+ fchown(dbm_pagfno(dbp.dbm), TrustedUid, -1) < 0)
{
fprintf(stderr,
"WARNING: ownership change on %s failed: %s",
mapname, errstring(errno));
}
}
+#endif
break;
#endif
@@ -569,15 +590,17 @@ main(argc, argv)
exit(EX_CANTCREAT);
}
(void) (*dbp.db->sync)(dbp.db, 0);
- if (geteuid() == 0 && TrustedFileUid != 0)
+#if _FFR_TRUSTED_USER
+ if (geteuid() == 0 && TrustedUid != 0)
{
- if (fchown(fd, TrustedFileUid, -1) < 0)
+ if (fchown(fd, TrustedUid, -1) < 0)
{
fprintf(stderr,
"WARNING: ownership change on %s failed: %s",
mapname, errstring(errno));
}
}
+#endif
}
break;
@@ -628,15 +651,17 @@ main(argc, argv)
exit(EX_CANTCREAT);
}
(void) (*dbp.db->sync)(dbp.db, 0);
- if (geteuid() == 0 && TrustedFileUid != 0)
+#if _FFR_TRUSTED_USER
+ if (geteuid() == 0 && TrustedUid != 0)
{
- if (fchown(fd, TrustedFileUid, -1) < 0)
+ if (fchown(fd, TrustedUid, -1) < 0)
{
fprintf(stderr,
"WARNING: ownership change on %s failed: %s",
mapname, errstring(errno));
}
}
+#endif
}
break;
#endif
@@ -936,10 +961,12 @@ const char *
errstring(err)
int err;
{
+#if !HASSTRERROR
static char errstr[64];
-#if !HASSTRERROR && !defined(ERRLIST_PREDEFINED)
+# if !defined(ERRLIST_PREDEFINED)
extern char *sys_errlist[];
extern int sys_nerr;
+# endif
#endif
/* handle pseudo-errors internal to sendmail */
diff --git a/contrib/sendmail/praliases/Makefile.m4 b/contrib/sendmail/praliases/Makefile.m4
index a4a2e61fa49b..7e78412f06ad 100644
--- a/contrib/sendmail/praliases/Makefile.m4
+++ b/contrib/sendmail/praliases/Makefile.m4
@@ -1,7 +1,7 @@
#
# This Makefile is designed to work on the old "make" program.
#
-# @(#)Makefile.m4 8.15 (Berkeley) 6/4/98
+# @(#)Makefile.m4 8.16 (Berkeley) 7/12/1998
#
# C compiler
@@ -41,7 +41,7 @@ LIBDIRS=confLIBDIRS
LIBS= ifdef(`confLIBS', `confLIBS')
# location of praliases binary (usually /usr/sbin or /usr/etc)
-BINDIR= ${DESTDIR}ifdef(`confSBINDIR', `confSBINDIR', `/usr/sbin')
+SBINDIR=${DESTDIR}ifdef(`confSBINDIR', `confSBINDIR', `/usr/sbin')
# additional .o files needed
OBJADD= ifdef(`confOBJADD', `confOBJADD')
@@ -89,7 +89,7 @@ praliases.${MAN8SRC}: praliases.8
install: install-praliases install-docs
install-praliases: praliases
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} praliases ${BINDIR}
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} praliases ${SBINDIR}
install-docs: praliases.${MAN8SRC}
ifdef(`confNO_MAN_INSTALL', `dnl',
diff --git a/contrib/sendmail/praliases/praliases.8 b/contrib/sendmail/praliases/praliases.8
index f47121840de1..08337019dce4 100644
--- a/contrib/sendmail/praliases/praliases.8
+++ b/contrib/sendmail/praliases/praliases.8
@@ -5,7 +5,7 @@
.\" the sendmail distribution.
.\"
.\"
-.\" @(#)praliases.8 8.5 (Berkeley) 5/19/98
+.\" @(#)praliases.8 8.5 (Berkeley) 5/19/1998
.\"
.Dd April 25, 1996
.Dt PRALIASES 1
diff --git a/contrib/sendmail/praliases/praliases.c b/contrib/sendmail/praliases/praliases.c
index 3e0048b4fc73..39351918e3ba 100644
--- a/contrib/sendmail/praliases/praliases.c
+++ b/contrib/sendmail/praliases/praliases.c
@@ -17,7 +17,7 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)praliases.c 8.17 (Berkeley) 6/25/98";
+static char sccsid[] = "@(#)praliases.c 8.21 (Berkeley) 12/27/1998";
#endif /* not lint */
#if !defined(NDBM) && !defined(NEWDB)
@@ -32,6 +32,7 @@ static char sccsid[] = "@(#)praliases.c 8.17 (Berkeley) 6/25/98";
# define NOT_SENDMAIL
#endif
#include <sendmail.h>
+#include <pathnames.h>
#ifdef NEWDB
# include <db.h>
# ifndef DB_VERSION_MAJOR
@@ -50,6 +51,11 @@ static char sccsid[] = "@(#)praliases.c 8.17 (Berkeley) 6/25/98";
extern char *strerror __P((int));
#endif
+static void praliases __P((char *, int, char **));
+#ifdef NDBM
+static void praliases_dbm __P((char *, int, char **));
+#endif
+
int
main(argc, argv)
int argc;
@@ -57,32 +63,148 @@ main(argc, argv)
{
extern char *optarg;
extern int optind;
-#ifdef NDBM
- DBM *dbp;
- datum content, key;
+ char *cfile;
+#if _FFR_GRAB_ALIASFILE_OPTION
+ char *filename = NULL;
+#else
+ char *filename = "/etc/aliases";
#endif
- char *filename;
+ FILE *cfp;
int ch;
-#ifdef NEWDB
- DB *db;
- DBT newdbkey, newdbcontent;
- char buf[MAXNAME];
-#endif
+ char afilebuf[MAXLINE];
+ char buf[MAXLINE];
- filename = "/etc/aliases";
+ cfile = _PATH_SENDMAILCF;
+#if _FFR_GRAB_ALIASFILE_OPTION
+ while ((ch = getopt(argc, argv, "C:f:")) != EOF)
+#else
while ((ch = getopt(argc, argv, "f:")) != EOF)
- switch((char)ch) {
+#endif
+ {
+ switch ((char)ch) {
+ case 'C':
+ cfile = optarg;
+ break;
case 'f':
filename = optarg;
break;
case '?':
default:
- (void)fprintf(stderr, "usage: praliases [-f file]\n");
+ (void)fprintf(stderr,
+#if _FFR_GRAB_ALIASFILE_OPTION
+ "usage: praliases [-C cffile] [-f aliasfile]\n");
+#else
+ "usage: praliases [-f aliasfile]\n");
+#endif
exit(EX_USAGE);
}
+ }
argc -= optind;
argv += optind;
+ if (filename != NULL)
+ {
+ praliases(filename, argc, argv);
+ exit(EX_OK);
+ }
+
+ if ((cfp = fopen(cfile, "r")) == NULL)
+ {
+ fprintf(stderr, "praliases: ");
+ perror(cfile);
+ exit(EX_NOINPUT);
+ }
+
+ while (fgets(buf, sizeof(buf), cfp) != NULL)
+ {
+ register char *b, *p;
+
+ b = buf;
+ switch (*b++)
+ {
+ case 'O': /* option -- see if alias file */
+ if (strncasecmp(b, " AliasFile", 10) == 0 &&
+ !(isascii(b[10]) && isalnum(b[10])))
+ {
+ /* new form -- find value */
+ b = strchr(b, '=');
+ if (b == NULL)
+ continue;
+ while (isascii(*++b) && isspace(*b))
+ continue;
+ }
+ else if (*b++ != 'A')
+ {
+ /* something else boring */
+ continue;
+ }
+
+ /* this is the A or AliasFile option -- save it */
+ if (strlen(b) >= sizeof afilebuf)
+ {
+ fprintf(stderr,
+ "AliasFile filename too long: %.30s...\n",
+ b);
+ (void) fclose(cfp);
+ exit(EX_CONFIG);
+ }
+ strcpy(afilebuf, b);
+ b = afilebuf;
+
+ for (p = b; p != NULL; )
+ {
+ while (isascii(*p) && isspace(*p))
+ p++;
+ if (*p == '\0')
+ break;
+ b = p;
+
+ p = strpbrk(p, " ,/");
+ /* find end of spec */
+ if (p != NULL)
+ p = strpbrk(p, ",\n");
+ if (p != NULL)
+ *p++ = '\0';
+
+ praliases(b, argc, argv);
+ }
+
+ default:
+ continue;
+ }
+ }
+ (void) fclose(cfp);
+ exit(EX_OK);
+}
+
+static void
+praliases(filename, argc, argv)
+ char *filename;
+ int argc;
+ char **argv;
+{
+#ifdef NEWDB
+ DB *db;
+ DBT newdbkey, newdbcontent;
+ char buf[MAXNAME];
+#endif
+ char *class;
+
+ class = strchr(filename, ':');
+ if (class != NULL)
+ {
+ if (strncasecmp(filename, "dbm:", 4) == 0)
+ {
+#ifdef NDBM
+ praliases_dbm(class + 1, argc, argv);
+ return;
+#else
+ fprintf(stderr, "class dbm not available\n");
+ exit(EX_DATAERR);
+#endif
+ }
+ filename = class + 1;
+ }
#ifdef NEWDB
if (strlen(filename) + 4 >= sizeof buf)
{
@@ -99,7 +221,8 @@ main(argc, argv)
# endif
if (db != NULL)
{
- if (!argc) {
+ if (!argc)
+ {
# if DB_VERSION_MAJOR > 1
DBC *dbc;
# endif
@@ -109,7 +232,11 @@ main(argc, argv)
# if DB_VERSION_MAJOR < 2
while(!db->seq(db, &newdbkey, &newdbcontent, R_NEXT))
# else
+# if DB_VERSION_MAJOR > 2 || DB_VERSION_MINOR >=6
+ if ((errno = db->cursor(db, NULL, &dbc, 0)) == 0)
+# else
if ((errno = db->cursor(db, NULL, &dbc)) == 0)
+# endif
{
while ((errno = dbc->c_get(dbc, &newdbkey,
&newdbcontent,
@@ -128,11 +255,13 @@ main(argc, argv)
fprintf(stderr,
"praliases: %s: Could not set cursor: %s\n",
buf, strerror(errno));
+ errno = db->close(db, 0);
exit(EX_DATAERR);
}
# endif
}
- else for (; *argv; ++argv) {
+ else for (; *argv; ++argv)
+ {
bzero(&newdbkey, sizeof newdbkey);
bzero(&newdbcontent, sizeof newdbcontent);
newdbkey.data = *argv;
@@ -156,39 +285,71 @@ main(argc, argv)
errno = db->close(db, 0);
# endif
}
- else {
+ else
+ {
+#endif
+#ifdef NDBM
+ praliases_dbm(filename, argc, argv);
+#endif
+#ifdef NEWDB
+ }
#endif
+}
+
#ifdef NDBM
- if ((dbp = dbm_open(filename, O_RDONLY, 0)) == NULL) {
- (void)fprintf(stderr,
- "praliases: %s: %s\n", filename, strerror(errno));
- exit(EX_OSFILE);
+static void
+praliases_dbm(filename, argc, argv)
+ char *filename;
+ int argc;
+ char **argv;
+{
+ DBM *dbp;
+ datum content, key;
+
+ if ((dbp = dbm_open(filename, O_RDONLY, 0)) == NULL)
+ {
+ (void)fprintf(stderr,
+ "praliases: %s: %s\n", filename, strerror(errno));
+ exit(EX_OSFILE);
+ }
+ if (!argc)
+ {
+ for (key = dbm_firstkey(dbp);
+ key.dptr != NULL; key = dbm_nextkey(dbp))
+ {
+ content = dbm_fetch(dbp, key);
+ (void)printf("%.*s:%.*s\n",
+ (int) key.dsize, key.dptr,
+ (int) content.dsize, content.dptr);
}
- if (!argc)
- for (key = dbm_firstkey(dbp);
- key.dptr != NULL; key = dbm_nextkey(dbp)) {
- content = dbm_fetch(dbp, key);
- (void)printf("%.*s:%.*s\n",
- (int) key.dsize, key.dptr,
- (int) content.dsize, content.dptr);
- }
- else for (; *argv; ++argv) {
+ }
+ else
+ {
+ for (; *argv; ++argv)
+ {
+ /*
+ ** Use the sendmail adaptive algorithm of trying
+ ** the key first without, then if needed with,
+ ** the terminating NULL byte.
+ */
key.dptr = *argv;
- key.dsize = strlen(*argv) + 1;
+ key.dsize = strlen(*argv);
content = dbm_fetch(dbp, key);
- if (!content.dptr)
- (void)printf("%s: No such key\n", key.dptr);
- else
+ if (content.dptr == NULL)
+ {
+ key.dsize++;
+ content = dbm_fetch(dbp, key);
+ }
+ if (content.dptr != NULL)
(void)printf("%s:%.*s\n", key.dptr,
(int) content.dsize, content.dptr);
+ else
+ (void)printf("%s: No such key\n", key.dptr);
}
- dbm_close(dbp);
-#endif
-#ifdef NEWDB
}
-#endif
- exit(EX_OK);
+ dbm_close(dbp);
}
+#endif
#if !HASSTRERROR
diff --git a/contrib/sendmail/rmail/Makefile.m4 b/contrib/sendmail/rmail/Makefile.m4
index 55468bd4f5cf..9f2d87b68a53 100644
--- a/contrib/sendmail/rmail/Makefile.m4
+++ b/contrib/sendmail/rmail/Makefile.m4
@@ -1,7 +1,7 @@
#
# This Makefile is designed to work on the old "make" program.
#
-# @(#)Makefile.m4 8.16 (Berkeley) 6/18/98
+# @(#)Makefile.m4 8.17 (Berkeley) 7/12/1998
#
# C compiler
@@ -34,7 +34,7 @@ LIBDIRS=confLIBDIRS
LIBS= ifdef(`confLIBS', `confLIBS')
# location of rmail binary (usually /usr/sbin or /usr/etc)
-BINDIR= ${DESTDIR}ifdef(`confUBINDIR', `confUBINDIR', `/usr/bin')
+UBINDIR=${DESTDIR}ifdef(`confUBINDIR', `confUBINDIR', `/usr/bin')
# additional .o files needed
OBJADD= ifdef(`confOBJADD', `confOBJADD')
@@ -90,7 +90,7 @@ install:
force-install: install-rmail install-docs
install-rmail: rmail
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} rmail ${BINDIR}
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} rmail ${UBINDIR}
install-docs: rmail.${MAN8SRC}
ifdef(`confNO_MAN_INSTALL', `dnl',
diff --git a/contrib/sendmail/rmail/rmail.8 b/contrib/sendmail/rmail/rmail.8
index ad70e5b5652a..9f6ee26a88c8 100644
--- a/contrib/sendmail/rmail/rmail.8
+++ b/contrib/sendmail/rmail/rmail.8
@@ -7,7 +7,7 @@
.\" the sendmail distribution.
.\"
.\"
-.\" @(#)rmail.8 6.14 (Berkeley) 5/19/98
+.\" @(#)rmail.8 6.14 (Berkeley) 5/19/1998
.\"
.Dd May 19, 1998
.Dt RMAIL 8
diff --git a/contrib/sendmail/rmail/rmail.c b/contrib/sendmail/rmail/rmail.c
index 9d58fcc526b2..f3f5cf67e763 100644
--- a/contrib/sendmail/rmail/rmail.c
+++ b/contrib/sendmail/rmail/rmail.c
@@ -16,7 +16,7 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)rmail.c 8.17 (Berkeley) 5/19/98";
+static char sccsid[] = "@(#)rmail.c 8.18 (Berkeley) 10/23/1998";
#endif /* not lint */
/*
@@ -136,10 +136,10 @@ main(argc, argv)
extern int errno, optind;
FILE *fp;
struct stat sb;
- size_t fplen, fptlen, len;
+ size_t fplen = 0, fptlen = 0, len;
off_t offset;
int ch, debug, i, pdes[2], pid, status;
- char *addrp, *domain, *p, *t;
+ char *addrp = NULL, *domain, *p, *t;
char *from_path, *from_sys, *from_user;
char *args[100], buf[2048], lbuf[2048];
diff --git a/contrib/sendmail/smrsh/Makefile.m4 b/contrib/sendmail/smrsh/Makefile.m4
index 19b2723e8859..5cae3f033366 100644
--- a/contrib/sendmail/smrsh/Makefile.m4
+++ b/contrib/sendmail/smrsh/Makefile.m4
@@ -1,7 +1,7 @@
#
# This Makefile is designed to work on the old "make" program.
#
-# @(#)Makefile.m4 8.13 (Berkeley) 6/4/98
+# @(#)Makefile.m4 8.14 (Berkeley) 7/12/1998
#
# C compiler
@@ -32,7 +32,7 @@ LIBDIRS=confLIBDIRS
LIBS= ifdef(`confLIBS', `confLIBS')
# location of smrsh binary (usually /usr/libexec or /usr/etc)
-BINDIR= ${DESTDIR}ifdef(`confEBINDIR', `confEBINDIR', `/usr/libexec')
+EBINDIR=${DESTDIR}ifdef(`confEBINDIR', `confEBINDIR', `/usr/libexec')
# additional .o files needed
OBJADD= ifdef(`confOBJADD', `confOBJADD')
@@ -81,7 +81,7 @@ smrsh.${MAN8SRC}: smrsh.8
install: install-smrsh install-docs
install-smrsh: smrsh
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} smrsh ${BINDIR}
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} smrsh ${EBINDIR}
install-docs: smrsh.${MAN8SRC}
ifdef(`confNO_MAN_INSTALL', `dnl',
diff --git a/contrib/sendmail/smrsh/README b/contrib/sendmail/smrsh/README
index 13f545c7e666..fa4e2de31616 100644
--- a/contrib/sendmail/smrsh/README
+++ b/contrib/sendmail/smrsh/README
@@ -3,7 +3,7 @@
README smrsh - sendmail restricted shell.
- @(#)README 8.2 11/11/95
+ @(#)README 8.2 11/11/1995
This README file is provided as a courtesy of the CERT Coordination Center,
diff --git a/contrib/sendmail/smrsh/smrsh.8 b/contrib/sendmail/smrsh/smrsh.8
index 067eaf32ee3c..af08fc4c6247 100644
--- a/contrib/sendmail/smrsh/smrsh.8
+++ b/contrib/sendmail/smrsh/smrsh.8
@@ -8,7 +8,7 @@
.\" the sendmail distribution.
.\"
.\"
-.\" @(#)smrsh.8 8.7 (Berkeley) 5/19/98
+.\" @(#)smrsh.8 8.7 (Berkeley) 5/19/1998
.\"
.TH SMRSH 8 11/02/93
.SH NAME
diff --git a/contrib/sendmail/smrsh/smrsh.c b/contrib/sendmail/smrsh/smrsh.c
index 66e0ebab66a3..d4af285f6429 100644
--- a/contrib/sendmail/smrsh/smrsh.c
+++ b/contrib/sendmail/smrsh/smrsh.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)smrsh.c 8.11 (Berkeley) 5/19/98";
+static char sccsid[] = "@(#)smrsh.c 8.11 (Berkeley) 5/19/1998";
#endif /* not lint */
/*
diff --git a/contrib/sendmail/src/Makefile.m4 b/contrib/sendmail/src/Makefile.m4
index f4229c2ad6b4..ad9e1c911a52 100644
--- a/contrib/sendmail/src/Makefile.m4
+++ b/contrib/sendmail/src/Makefile.m4
@@ -2,7 +2,7 @@
# This Makefile is designed to work on any reasonably current version of
# "make" program.
#
-# @(#)Makefile.m4 8.23 (Berkeley) 6/16/98
+# @(#)Makefile.m4 8.25 (Berkeley) 10/5/1998
#
# C compiler
@@ -68,9 +68,9 @@ COPTS= -I. ${INCDIRS} ${MAPDEF} ${ENVDEF}
CFLAGS= $O ${COPTS}
BEFORE= confBEFORE
-OBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \
- deliver.o domain.o envelope.o err.o headers.o macro.o main.o \
- map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \
+OBJS= alias.o arpadate.o clock.o collect.o conf.o control.o convtime.o \
+ daemon.o deliver.o domain.o envelope.o err.o headers.o macro.o \
+ main.o map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \
safefile.o savemail.o snprintf.o srvrsmtp.o stab.o stats.o \
sysexits.o trace.o udb.o usersmtp.o util.o version.o ${OBJADD}
@@ -130,7 +130,8 @@ install: install-sendmail install-docs
install-sendmail: sendmail
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR}
for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR}
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf \
+ ${HFDIR}/sendmail.hf
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 sendmail.st \
${STDIR}/sendmail.st
diff --git a/contrib/sendmail/src/README b/contrib/sendmail/src/README
index a6f7dcfd6640..817b3a4f396f 100644
--- a/contrib/sendmail/src/README
+++ b/contrib/sendmail/src/README
@@ -8,7 +8,7 @@
# the sendmail distribution.
#
#
-# @(#)README 8.206 (Berkeley) 6/30/98
+# @(#)README 8.209 (Berkeley) 10/6/1998
#
This directory contains the source files for sendmail(TM).
@@ -844,6 +844,12 @@ Digital UNIX (formerly DEC OSF/1)
This warning can be ignored.
+ Digital UNIX's linker checks /usr/ccs/lib/ before /usr/lib/.
+ If you have installed a new version of BIND in /usr/include
+ and /usr/lib, you will experience difficulties as Digital ships
+ libresolv.a in /usr/ccs/lib/ as well. Be sure to replace both
+ copies of libresolv.a.
+
IRIX
The header files on SGI IRIX are completely prototyped, and as
a result you can sometimes get some warning messages during
@@ -1072,6 +1078,13 @@ Linux
to LIBS. Data structures may change and you'd be asking for a
core dump.
+AIX 4.2
+ The AIX m4 implements a different mechanism for ifdef which is
+ inconsistent with other versions of m4. Therefore, it will not
+ work properly with the sendmail Build architecture or m4
+ configuration method. To work around this problem, please use
+ GNU m4 from ftp://ftp.gnu.org/pub/gnu/.
+
AIX 3.x
This version of sendmail does not support MB, MG, and MR resource
records, which are supported by AIX sendmail.
@@ -1439,4 +1452,4 @@ version.c The version number and information about this
Eric Allman
-(Version 8.206, last update 6/30/98 22:08:36)
+(Version 8.209, last update 10/6/1998 17:10:21)
diff --git a/contrib/sendmail/src/TRACEFLAGS b/contrib/sendmail/src/TRACEFLAGS
index 588714da7f23..04b9b3c58423 100644
--- a/contrib/sendmail/src/TRACEFLAGS
+++ b/contrib/sendmail/src/TRACEFLAGS
@@ -1,4 +1,4 @@
-# @(#)TRACEFLAGS 8.21 (Berkeley) 4/27/98
+# @(#)TRACEFLAGS 8.21 (Berkeley) 4/27/1998
0, 1 main.c main skip background fork
0, 4 main.c main canonical name, UUCP node name, a.k.a.s
0, 15 main.c main print configuration
diff --git a/contrib/sendmail/src/alias.c b/contrib/sendmail/src/alias.c
index 8da3317a3c1d..a7149f2f849b 100644
--- a/contrib/sendmail/src/alias.c
+++ b/contrib/sendmail/src/alias.c
@@ -13,7 +13,7 @@
# include "sendmail.h"
#ifndef lint
-static char sccsid[] = "@(#)alias.c 8.92 (Berkeley) 6/5/98";
+static char sccsid[] = "@(#)alias.c 8.96 (Berkeley) 12/18/1998";
#endif /* not lint */
@@ -382,7 +382,7 @@ aliaswait(map, ext, isopen)
/* database is out of date */
if (AutoRebuild && stb.st_ino != 0 &&
(stb.st_uid == geteuid() ||
- (geteuid() == 0 && stb.st_uid == TrustedFileUid)))
+ (geteuid() == 0 && stb.st_uid == TrustedUid)))
{
bool oldSuprErrs;
@@ -510,6 +510,7 @@ rebuildaliases(map, automatic)
username());
}
map->map_mflags |= MF_OPEN|MF_WRITABLE;
+ map->map_pid = getpid();
readaliases(map, af, !automatic, TRUE);
success = TRUE;
}
diff --git a/contrib/sendmail/src/aliases.5 b/contrib/sendmail/src/aliases.5
index 8c73ac35a97d..bf4583837e00 100644
--- a/contrib/sendmail/src/aliases.5
+++ b/contrib/sendmail/src/aliases.5
@@ -8,7 +8,7 @@
.\" the sendmail distribution.
.\"
.\"
-.\" @(#)aliases.5 8.8 (Berkeley) 5/19/98
+.\" @(#)aliases.5 8.8 (Berkeley) 5/19/1998
.\"
.Dd May 19, 1998
.Dt ALIASES 5
diff --git a/contrib/sendmail/src/arpadate.c b/contrib/sendmail/src/arpadate.c
index 7a9576bdd4d2..1b539b6ce998 100644
--- a/contrib/sendmail/src/arpadate.c
+++ b/contrib/sendmail/src/arpadate.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)arpadate.c 8.12 (Berkeley) 5/19/98";
+static char sccsid[] = "@(#)arpadate.c 8.12 (Berkeley) 5/19/1998";
#endif /* not lint */
# include "sendmail.h"
diff --git a/contrib/sendmail/src/clock.c b/contrib/sendmail/src/clock.c
index e81c9725d6e7..aab301c2c921 100644
--- a/contrib/sendmail/src/clock.c
+++ b/contrib/sendmail/src/clock.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)clock.c 8.34 (Berkeley) 6/4/98";
+static char sccsid[] = "@(#)clock.c 8.34 (Berkeley) 6/4/1998";
#endif /* not lint */
# include "sendmail.h"
diff --git a/contrib/sendmail/src/collect.c b/contrib/sendmail/src/collect.c
index 190e6995743f..e334e968e020 100644
--- a/contrib/sendmail/src/collect.c
+++ b/contrib/sendmail/src/collect.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)collect.c 8.89 (Berkeley) 6/4/98";
+static char sccsid[] = "@(#)collect.c 8.91 (Berkeley) 8/19/1998";
#endif /* not lint */
# include <errno.h>
@@ -81,7 +81,6 @@ collect(fp, smtpmode, hdrp, e)
char dfname[MAXQFNAME];
char bufbuf[MAXLINE];
extern bool isheader __P((char *));
- extern void eatheader __P((ENVELOPE *, bool));
extern void tferror __P((FILE *volatile, ENVELOPE *));
headeronly = hdrp != NULL;
@@ -101,7 +100,7 @@ collect(fp, smtpmode, hdrp, e)
{
syserr("Cannot create %s", dfname);
e->e_flags |= EF_NO_BODY_RETN;
- finis();
+ finis(TRUE, ExitStat);
}
if (fstat(fileno(tf), &stbuf) < 0)
e->e_dfino = -1;
@@ -159,8 +158,6 @@ collect(fp, smtpmode, hdrp, e)
for (;;)
{
- extern int chompheader __P((char *, bool, HDR **, ENVELOPE *));
-
if (tTd(30, 35))
printf("top, istate=%d, mstate=%d\n", istate, mstate);
for (;;)
@@ -414,7 +411,7 @@ readerr:
{
tferror(tf, e);
flush_errors(TRUE);
- finis();
+ finis(TRUE, ExitStat);
}
/* An EOF when running SMTP is an error */
@@ -456,7 +453,7 @@ readerr:
/* and don't try to deliver the partial message either */
if (InChild)
ExitStat = EX_QUIT;
- finis();
+ finis(TRUE, ExitStat);
}
/*
@@ -504,7 +501,6 @@ readerr:
/* no valid recipient headers */
register ADDRESS *q;
char *hdr = NULL;
- extern void addheader __P((char *, char *, HDR **));
/* create an Apparently-To: field */
/* that or reject the message.... */
@@ -577,7 +573,7 @@ readerr:
{
/* we haven't acked receipt yet, so just chuck this */
syserr("Cannot reopen %s", dfname);
- finis();
+ finis(TRUE, ExitStat);
}
}
diff --git a/contrib/sendmail/src/conf.c b/contrib/sendmail/src/conf.c
index 838cd17d2356..2668f9f3ceb4 100644
--- a/contrib/sendmail/src/conf.c
+++ b/contrib/sendmail/src/conf.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)conf.c 8.431 (Berkeley) 6/25/98";
+static char sccsid[] = "@(#)conf.c 8.450 (Berkeley) 12/17/1998";
#endif /* not lint */
# include "sendmail.h"
@@ -217,7 +217,6 @@ setdefaults(e)
int i;
struct passwd *pw;
char buf[MAXNAME];
- extern void inittimeouts __P((char *));
extern void setdefuser __P((void));
extern void setupmaps __P((void));
extern void setupmailers __P((void));
@@ -247,7 +246,7 @@ setdefaults(e)
DefGid = 1; /* option g */
setdefuser();
}
- TrustedFileUid = 0;
+ TrustedUid = 0;
if (tTd(37, 4))
printf("setdefaults: DefUser=%s, DefUid=%d, DefGid=%d\n",
DefUser != NULL ? DefUser : "<1:1>",
@@ -292,6 +291,7 @@ setdefaults(e)
#ifdef HESIOD_INIT
HesiodContext = NULL;
#endif
+ ControlSocketName = NULL;
setupmaps();
setupmailers();
setupheaders();
@@ -324,7 +324,6 @@ void
setupmailers()
{
char buf[100];
- extern void makemailer __P((char *));
strcpy(buf, "prog, P=/bin/sh, F=lsoDq9, T=DNS/RFC822/X-Unix, A=sh -c \201u");
makemailer(buf);
@@ -838,6 +837,14 @@ switch_map_find(service, maptype, mapreturn)
*p++ = '\0';
if (buf[0] == '\0')
continue;
+ if (p == NULL)
+ {
+ sm_syslog(LOG_ERR, NOQID,
+ "Bad line on %.100s: %.100s",
+ ServiceSwitchFile,
+ buf);
+ continue;
+ }
while (isspace(*p))
p++;
if (*p == '\0')
@@ -1280,10 +1287,10 @@ init_md(argc, argv)
#endif
#ifdef __QNX__
/*
- ** Due to QNX's network distributed nature, you can target a tcpip
- ** stack on a different node in the qnx network; this patch lets
- ** this feature work. The __sock_locate() must be done before the
- ** environment is clear.
+ ** Due to QNX's network distributed nature, you can target a tcpip
+ ** stack on a different node in the qnx network; this patch lets
+ ** this feature work. The __sock_locate() must be done before the
+ ** environment is clear.
*/
__sock_locate();
#endif
@@ -2047,7 +2054,7 @@ refuseconnections(port)
else if (conncnt++ > ConnRateThrottle && ConnRateThrottle > 0)
{
/* sleep to flatten out connection load */
- setproctitle("deferring connections on port %d: %d per second",
+ sm_setproctitle(TRUE, "deferring connections on port %d: %d per second",
port, ConnRateThrottle);
if (LogLevel >= 14)
sm_syslog(LOG_INFO, NOQID,
@@ -2059,7 +2066,7 @@ refuseconnections(port)
CurrentLA = getla();
if (CurrentLA >= refusela)
{
- setproctitle("rejecting connections on port %d: load average: %d",
+ sm_setproctitle(TRUE, "rejecting connections on port %d: load average: %d",
port, CurrentLA);
if (LogLevel >= 14)
sm_syslog(LOG_INFO, NOQID,
@@ -2070,7 +2077,7 @@ refuseconnections(port)
if (!enoughdiskspace(MinBlocksFree + 1))
{
- setproctitle("rejecting connections on port %d: min free: %d",
+ sm_setproctitle(TRUE, "rejecting connections on port %d: min free: %d",
port, MinBlocksFree);
if (LogLevel >= 14)
sm_syslog(LOG_INFO, NOQID,
@@ -2081,12 +2088,10 @@ refuseconnections(port)
if (MaxChildren > 0 && CurChildren >= MaxChildren)
{
- extern void proc_list_probe __P((void));
-
proc_list_probe();
if (CurChildren >= MaxChildren)
{
- setproctitle("rejecting connections on port %d: %d children, max %d",
+ sm_setproctitle(TRUE, "rejecting connections on port %d: %d children, max %d",
port, CurChildren, MaxChildren);
if (LogLevel >= 14)
sm_syslog(LOG_INFO, NOQID,
@@ -2170,12 +2175,12 @@ typedef unsigned int *pt_entry_t;
# define SPT_PADCHAR ' '
# endif
+#endif /* SPT_TYPE != SPT_NONE && SPT_TYPE != SPT_BUILTIN */
+
# ifndef SPT_BUFSIZE
# define SPT_BUFSIZE MAXLINE
# endif
-#endif /* SPT_TYPE != SPT_NONE && SPT_TYPE != SPT_BUILTIN */
-
/*
** Pointers for setproctitle.
** This allows "ps" listings to give more useful information.
@@ -2320,6 +2325,44 @@ setproctitle(fmt, va_alist)
#endif /* SPT_TYPE != SPT_BUILTIN */
/*
+** SM_SETPROCTITLE -- set process task and set process title for ps
+**
+** Possibly set process status and call setproctitle() to
+** change the ps display.
+**
+** Parameters:
+** status -- whether or not to store as process status
+** fmt -- a printf style format string.
+** a, b, c -- possible parameters to fmt.
+**
+** Returns:
+** none.
+*/
+
+/*VARARGS2*/
+void
+# ifdef __STDC__
+sm_setproctitle(bool status, const char *fmt, ...)
+# else
+sm_setproctitle(status, fmt, va_alist)
+ bool status;
+ const char *fmt;
+ va_dcl
+#endif
+{
+ char buf[SPT_BUFSIZE];
+
+ VA_LOCAL_DECL
+ /* print the argument string */
+ VA_START(fmt);
+ (void) vsnprintf(buf, SPT_BUFSIZE, fmt, ap);
+ VA_END;
+
+ if (status)
+ proc_list_set(getpid(), buf);
+ setproctitle("%s", buf);
+}
+ /*
** WAITFOR -- wait for a particular process id.
**
** Parameters:
@@ -2789,8 +2832,8 @@ dgux_inet_addr(host)
/*
-** this version hacked to add `atend' flag to allow state machine
-** to reset if invoked by the program to scan args for a 2nd time
+** this version hacked to add `atend' flag to allow state machine
+** to reset if invoked by the program to scan args for a 2nd time
*/
#if defined(LIBC_SCCS) && !defined(lint)
@@ -2962,7 +3005,7 @@ char *DefaultUserShells[] =
"/bin/bsh", /* Bourne shell */
"/usr/bin/bsh",
#endif
-#ifdef __svr4__
+#if defined(__svr4__) || defined(__svr5__)
"/bin/ksh", /* Korn shell */
"/usr/bin/ksh",
#endif
@@ -3665,9 +3708,63 @@ setvendor(vendor)
}
#endif
+#if defined(VENDOR_NAME) && defined(VENDOR_CODE)
+ if (strcasecmp(vendor, VENDOR_NAME) == 0)
+ {
+ VendorCode = VENDOR_CODE;
+ return TRUE;
+ }
+#endif
+
return FALSE;
}
/*
+** GETVENDOR -- return vendor name based on vendor code
+**
+** Parameters:
+** vendorcode -- numeric representation of vendor.
+**
+** Returns:
+** string containing vendor name.
+*/
+
+char *
+getvendor(vendorcode)
+ int vendorcode;
+{
+#if defined(VENDOR_NAME) && defined(VENDOR_CODE)
+ /*
+ ** Can't have the same switch case twice so need to
+ ** handle VENDOR_CODE outside of switch. It might
+ ** match one of the existing VENDOR_* codes.
+ */
+
+ if (vendorcode == VENDOR_CODE)
+ return VENDOR_NAME;
+#endif
+
+ switch (vendorcode)
+ {
+ case VENDOR_BERKELEY:
+ return "Berkeley";
+
+ case VENDOR_SUN:
+ return "Sun";
+
+ case VENDOR_HP:
+ return "HP";
+
+ case VENDOR_IBM:
+ return "IBM";
+
+ case VENDOR_SENDMAIL:
+ return "Sendmail";
+
+ default:
+ return "Unknown";
+ }
+}
+ /*
** VENDOR_PRE_DEFAULTS, VENDOR_POST_DEFAULTS -- set vendor-specific defaults
**
** Vendor_pre_defaults is called before reading the configuration
@@ -3730,7 +3827,7 @@ vendor_daemon_setup(e)
if (getluid() != -1)
{
usrerr("Daemon cannot have LUID");
- exit(EX_USAGE);
+ finis(FALSE, EX_USAGE);
}
#endif /* SECUREWARE */
}
@@ -4173,11 +4270,88 @@ secureware_setup_secure(uid)
rc, uid);
break;
}
- exit(EX_NOPERM);
+ finis(FALSE, EX_NOPERM);
}
}
#endif /* SECUREWARE */
/*
+** ADD_LOCAL_HOST_NAMES -- Add a hostname to class 'w' based on IP address
+**
+** Add hostnames to class 'w' based on the IP address read from
+** the network interface.
+**
+** Parameters:
+** sa -- a pointer to a SOCKADDR containing the address
+**
+** Returns:
+** 0 if successful, -1 if host lookup fails.
+*/
+
+int
+add_hostnames(sa)
+ SOCKADDR *sa;
+{
+ struct hostent *hp;
+
+ /* lookup name with IP address */
+ switch (sa->sa.sa_family)
+ {
+ case AF_INET:
+ hp = sm_gethostbyaddr((char *) &sa->sin.sin_addr,
+ sizeof(sa->sin.sin_addr), sa->sa.sa_family);
+ break;
+
+ default:
+#if _FFR_LOG_UNSUPPORTED_FAMILIES
+ /* XXX: Give warning about unsupported family */
+ if (LogLevel > 3)
+ sm_syslog(LOG_WARNING, NOQID,
+ "Unsupported address family %d: %.100s",
+ sa->sa.sa_family, anynet_ntoa(sa));
+#endif
+ return -1;
+ }
+
+ if (hp == NULL)
+ {
+ int save_errno = errno;
+
+ if (LogLevel > 3)
+ sm_syslog(LOG_WARNING, NOQID,
+ "gethostbyaddr(%.100s) failed: %d\n",
+ anynet_ntoa(sa),
+#if NAMED_BIND
+ h_errno
+#else
+ -1
+#endif
+ );
+ errno = save_errno;
+ return -1;
+ }
+
+ /* save its cname */
+ if (!wordinclass((char *) hp->h_name, 'w'))
+ {
+ setclass('w', (char *) hp->h_name);
+ if (tTd(0, 4))
+ printf("\ta.k.a.: %s\n", hp->h_name);
+ }
+
+ /* save all it aliases name */
+ while (*hp->h_aliases)
+ {
+ if (!wordinclass(*hp->h_aliases, 'w'))
+ {
+ setclass('w', *hp->h_aliases);
+ if (tTd(0, 4))
+ printf("\ta.k.a.: %s\n", *hp->h_aliases);
+ }
+ hp->h_aliases++;
+ }
+ return 0;
+}
+ /*
** LOAD_IF_NAMES -- load interface-specific names into $=w
**
** Parameters:
@@ -4254,9 +4428,8 @@ load_if_names()
for (i = 0; i < ifc.ifc_len; )
{
struct ifreq *ifr = (struct ifreq *) &ifc.ifc_buf[i];
- struct sockaddr *sa = &ifr->ifr_addr;
+ SOCKADDR *sa = (SOCKADDR *) &ifr->ifr_addr;
struct in_addr ia;
- struct hostent *hp;
#ifdef SIOCGIFFLAGS
struct ifreq ifrf;
#endif
@@ -4264,14 +4437,14 @@ load_if_names()
extern char *inet_ntoa();
#ifdef BSD4_4_SOCKADDR
- if (sa->sa_len > sizeof ifr->ifr_addr)
- i += sizeof ifr->ifr_name + sa->sa_len;
+ if (sa->sa.sa_len > sizeof ifr->ifr_addr)
+ i += sizeof ifr->ifr_name + sa->sa.sa_len;
else
#endif
i += sizeof *ifr;
if (tTd(0, 20))
- printf("%s\n", anynet_ntoa((SOCKADDR *) sa));
+ printf("%s\n", anynet_ntoa(sa));
if (ifr->ifr_addr.sa_family != AF_INET)
continue;
@@ -4290,7 +4463,7 @@ load_if_names()
continue;
/* extract IP address from the list*/
- ia = (((struct sockaddr_in *) sa)->sin_addr);
+ ia = sa->sin.sin_addr;
if (ia.s_addr == INADDR_ANY || ia.s_addr == INADDR_NONE)
{
message("WARNING: interface %s is UP with %s address",
@@ -4313,41 +4486,7 @@ load_if_names()
if (bitset(IFF_LOOPBACK, IFRFREF.ifr_flags))
continue;
- /* lookup name with IP address */
- hp = sm_gethostbyaddr((char *) &ia, sizeof(ia), AF_INET);
- if (hp == NULL)
- {
- if (LogLevel > 3)
- sm_syslog(LOG_WARNING, NOQID,
- "gethostbyaddr(%.100s) failed: %d\n",
- inet_ntoa(ia),
-#if NAMED_BIND
- h_errno);
-#else
- -1);
-#endif
- continue;
- }
-
- /* save its cname */
- if (!wordinclass((char *) hp->h_name, 'w'))
- {
- setclass('w', (char *) hp->h_name);
- if (tTd(0, 4))
- printf("\ta.k.a.: %s\n", hp->h_name);
- }
-
- /* save all it aliases name */
- while (*hp->h_aliases)
- {
- if (!wordinclass(*hp->h_aliases, 'w'))
- {
- setclass('w', *hp->h_aliases);
- if (tTd(0, 4))
- printf("\ta.k.a.: %s\n", *hp->h_aliases);
- }
- hp->h_aliases++;
- }
+ (void) add_hostnames(sa);
}
free(ifc.ifc_buf);
close(s);
@@ -4412,7 +4551,7 @@ sm_syslog(level, id, fmt, va_alist)
extern int SyslogErrno;
extern char *DoprEnd;
VA_LOCAL_DECL
- extern void sm_dopr __P((char *, const char *, ...));
+ extern void sm_dopr __P((char *, const char *, va_list));
SyslogErrno = errno;
if (id == NULL)
diff --git a/contrib/sendmail/src/conf.h b/contrib/sendmail/src/conf.h
index fd14d5aaf433..b9cdc6862caa 100644
--- a/contrib/sendmail/src/conf.h
+++ b/contrib/sendmail/src/conf.h
@@ -9,7 +9,7 @@
* the sendmail distribution.
*
*
- * @(#)conf.h 8.372 (Berkeley) 6/4/98
+ * @(#)conf.h 8.380 (Berkeley) 11/9/1998
*/
/*
@@ -64,6 +64,11 @@ struct rusage; /* forward declaration to get gcc to shut up in wait.h */
# define MACBUFSIZE 4096 /* max expanded macro buffer size */
# define TOBUFSIZE 512 /* max buffer to hold address list */
# define MAXSHORTSTR 203 /* max short string length */
+# if _FFR_MAX_MIME_HEADER_LENGTH
+# define MAXMACNAMELEN 25 /* max macro name length */
+# else
+# define MAXMACNAMELEN 20 /* max macro name length */
+# endif
/**********************************************************************
** Compilation options.
@@ -344,12 +349,12 @@ typedef int pid_t;
# define GIDSET_T gid_t
# define SFS_TYPE SFS_4ARGS /* four argument statfs() call */
# define SFS_BAVAIL f_bfree /* alternate field name */
+# define SYSLOG_BUFSIZE 512
# ifdef IRIX6
# define STAT64 1
# define QUAD_T unsigned long long
# define LA_TYPE LA_IRIX6 /* figure out at run time */
# define SAFENFSPATHCONF 0 /* pathconf(2) lies on NFS filesystems */
-# define SYSLOG_BUFSIZE 512
# else
# define LA_TYPE LA_INT
@@ -674,6 +679,41 @@ typedef int pid_t;
#endif
+/*
+** Apple Rhapsody
+** Contributed by Wilfredo Sanchez <wsanchez@apple.com>
+*/
+
+#ifdef __APPLE__
+# define HASFCHMOD 1 /* has fchmod(2) syscall */
+# define HASFLOCK 1 /* has flock(2) syscall */
+# define HASUNAME 1 /* has uname(2) syscall */
+# define HASUNSETENV 1
+# define HASSETSID 1 /* has the setsid(2) POSIX syscall */
+# define HASINITGROUPS 1
+# define HASSETVBUF 1
+# define HASSETREUID 1
+# define USESETEUID 1 /* has useable seteuid(2) call */
+# define HASLSTAT 1
+# define HASSETRLIMIT 1
+# define HASWAITPID 1
+# define HASSTRERROR 1 /* has strerror(3) */
+# define HASSNPRINTF 1 /* has snprintf(3) and vsnprintf(3) */
+# define USESTRERROR 1 /* has strerror(3) */
+# define HASGETDTABLESIZE 1
+# define HASGETUSERSHELL 1
+# define NEEDGETOPT 1 /* need a replacement for getopt(3) */
+# define BSD4_4_SOCKADDR /* has sa_len */
+# define NETLINK 1 /* supports AF_LINK */
+# define HAS_ST_GEN 1 /* has st_gen field in stat struct */
+# define GIDSET_T gid_t
+# define LA_TYPE LA_SUBR /* use getloadavg(3) */
+# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
+# define SPT_TYPE SPT_PSSTRINGS
+# define SPT_PADCHAR '\0' /* pad process title with nulls */
+# define ERRLIST_PREDEFINED /* don't declare sys_errlist */
+#endif
+
/*
** 4.4 BSD
@@ -814,12 +854,15 @@ typedef int pid_t;
# endif
# if defined(__FreeBSD__)
# undef SPT_TYPE
-# if __FreeBSD__ == 2
-# include <osreldate.h> /* and this works */
-# if __FreeBSD_version >= 199512 /* 2.2-current right now */
+# if __FreeBSD__ >= 2
+# include <osreldate.h>
+# if __FreeBSD_version >= 199512 /* 2.2-current when it appeared */
# include <libutil.h>
# define SPT_TYPE SPT_BUILTIN
# endif
+# if __FreeBSD_version >= 222000 /* 2.2.2-release and later */
+# define HASSETUSERCONTEXT 1 /* BSDI-style login classes */
+# endif
# endif
# ifndef SPT_TYPE
# define SPT_TYPE SPT_REUSEARGV
@@ -1216,9 +1259,9 @@ extern void *malloc();
** Florian La Roche <rzsfl@rz.uni-sb.de>
** Karl London <karl@borg.demon.co.uk>
**
-** Last compiled against: [06/10/96 @ 09:21:40 PM (Monday)]
-** sendmail 8.8-a4 named bind-4.9.4-T4B db-1.85
-** gcc 2.7.2 libc-5.3.12 linux 2.0.0
+** Last compiled against: [07/21/98 @ 11:47:34 AM (Tuesday)]
+** sendmail 8.9.1 bind-8.1.2 db-2.4.14
+** gcc-2.8.1 glibc-2.0.94 linux-2.1.109
**
** NOTE: Override HASFLOCK as you will but, as of 1.99.6, mixed-style
** file locking is no longer allowed. In particular, make sure
@@ -1228,6 +1271,7 @@ extern void *malloc();
#ifdef __linux__
# define BSD 1 /* include BSD defines */
+# define USESETEUID 0 /* Have it due to POSIX, but doesn't work */
# define NEEDGETOPT 1 /* need a replacement for getopt(3) */
# define HASUNAME 1 /* use System V uname(2) system call */
# define HASUNSETENV 1 /* has unsetenv(3) call */
@@ -1255,7 +1299,7 @@ extern void *malloc();
# ifndef _PATH_SENDMAILPID
# define _PATH_SENDMAILPID "/var/run/sendmail.pid"
# endif
-# define TZ_TYPE TZ_TNAME
+# define TZ_TYPE TZ_TZNAME
# include <sys/sysmacros.h>
# undef atol /* wounded in <stdlib.h> */
#endif
@@ -1484,6 +1528,37 @@ typedef int pid_t;
# endif
#endif
+/*
+** System V Rel 5.x (a.k.a Unixware7 w/o BSD-Compatiblity Libs ie. native)
+**
+** Contributed by Paul Gampe <paulg@apnic.net>
+*/
+
+#ifdef __svr5__
+# include <sys/mkdev.h>
+# define __svr4__
+# define SYS5SIGNALS 1
+# define HASSETSID 1
+# define HASSETREUID 1
+# define HASWAITPID 1
+# define HASGETDTABLESIZE 1
+# define GIDSET_T gid_t
+# define SOCKADDR_LEN_T size_t
+# define SOCKOPT_LEN_T size_t
+# ifndef _PATH_UNIX
+# define _PATH_UNIX "/stand/unix"
+# endif
+# define SPT_PADCHAR '\0' /* pad process title with nulls */
+# define SYSLOG_BUFSIZE 1024 /* unsure */
+# ifndef _PATH_VENDOR_CF
+# define _PATH_VENDOR_CF "/etc/sendmail.cf"
+# endif
+# ifndef _PATH_SENDMAILPID
+# define _PATH_SENDMAILPID "/etc/sendmail.pid"
+# endif
+#endif
+
+/* ###################################################################### */
/*
** UnixWare 2.x
@@ -1516,7 +1591,9 @@ typedef int pid_t;
# define LA_TYPE LA_ZERO
# undef WIFEXITED
# undef WEXITSTATUS
-# define _PATH_UNIX "/unix"
+# ifndef _PATH_UNIX
+# define _PATH_UNIX "/unix"
+# endif
# ifndef _PATH_VENDOR_CF
# define _PATH_VENDOR_CF "/usr/ucblib/sendmail.cf"
# endif
diff --git a/contrib/sendmail/src/control.c b/contrib/sendmail/src/control.c
new file mode 100644
index 000000000000..157ca08548ec
--- /dev/null
+++ b/contrib/sendmail/src/control.c
@@ -0,0 +1,356 @@
+/*
+ * Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+ *
+ * By using this file, you agree to the terms and conditions set
+ * forth in the LICENSE file which can be found at the top level of
+ * the sendmail distribution.
+ *
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)control.c 8.17 (Berkeley) 12/1/1998";
+#endif /* not lint */
+
+#include "sendmail.h"
+
+int ControlSocket = -1;
+
+ /*
+** OPENCONTROLSOCKET -- create/open the daemon control named socket
+**
+** Creates and opens a named socket for external control over
+** the sendmail daemon.
+**
+** Parameters:
+** none.
+**
+** Returns:
+** 0 if successful, -1 otherwise
+*/
+
+int
+opencontrolsocket()
+{
+#ifdef NETUNIX
+# if _FFR_CONTROL_SOCKET
+ int rval;
+ int sff = SFF_SAFEDIRPATH|SFF_OPENASROOT|SFF_NOLINK|SFF_CREAT|SFF_MUSTOWN;
+ struct sockaddr_un controladdr;
+
+ if (ControlSocketName == NULL)
+ return 0;
+
+ if (strlen(ControlSocketName) >= sizeof controladdr.sun_path)
+ {
+ errno = ENAMETOOLONG;
+ return -1;
+ }
+
+ rval = safefile(ControlSocketName, RunAsUid, RunAsGid, RunAsUserName,
+ sff, S_IRUSR|S_IWUSR, NULL);
+
+ /* if not safe, don't create */
+ if (rval != 0)
+ {
+ errno = rval;
+ return -1;
+ }
+
+ ControlSocket = socket(AF_UNIX, SOCK_STREAM, 0);
+ if (ControlSocket < 0)
+ return -1;
+
+ unlink(ControlSocketName);
+ bzero(&controladdr, sizeof controladdr);
+ controladdr.sun_family = AF_UNIX;
+ strcpy(controladdr.sun_path, ControlSocketName);
+
+ if (bind(ControlSocket, (struct sockaddr *) &controladdr,
+ sizeof controladdr) < 0)
+ {
+ int save_errno = errno;
+
+ (void) close(ControlSocket);
+ ControlSocket = -1;
+ errno = save_errno;
+ return -1;
+ }
+
+# if _FFR_TRUSTED_USER
+ if (geteuid() == 0 && TrustedUid != 0)
+ {
+ if (chown(ControlSocketName, TrustedUid, -1) < 0)
+ {
+ int save_errno = errno;
+
+ sm_syslog(LOG_ALERT, NOQID,
+ "ownership change on %s failed: %s",
+ ControlSocketName, errstring(save_errno));
+ message("050 ownership change on %s failed: %s",
+ ControlSocketName, errstring(save_errno));
+ errno = save_errno;
+ return -1;
+ }
+ }
+# endif
+
+ if (chmod(ControlSocketName, S_IRUSR|S_IWUSR) < 0)
+ {
+ int save_errno = errno;
+
+ closecontrolsocket(TRUE);
+ errno = save_errno;
+ return -1;
+ }
+
+ if (listen(ControlSocket, 8) < 0)
+ {
+ int save_errno = errno;
+
+ closecontrolsocket(TRUE);
+ errno = save_errno;
+ return -1;
+ }
+# endif
+#endif
+ return 0;
+}
+ /*
+** CLOSECONTROLSOCKET -- close the daemon control named socket
+**
+** Close a named socket.
+**
+** Parameters:
+** fullclose -- if set, close the socket and remove it;
+** otherwise, just remove it
+**
+** Returns:
+** none.
+*/
+
+void
+closecontrolsocket(fullclose)
+ bool fullclose;
+{
+#ifdef NETUNIX
+# if _FFR_CONTROL_SOCKET
+ int sff = SFF_SAFEDIRPATH|SFF_OPENASROOT|SFF_NOLINK|SFF_CREAT|SFF_MUSTOWN;
+
+ if (ControlSocket >= 0)
+ {
+ int rval;
+
+ if (fullclose)
+ {
+ (void) close(ControlSocket);
+ ControlSocket = -1;
+ }
+
+ rval = safefile(ControlSocketName, RunAsUid, RunAsGid, RunAsUserName,
+ sff, S_IRUSR|S_IWUSR, NULL);
+
+ /* if not safe, don't unlink */
+ if (rval != 0)
+ return;
+
+ if (unlink(ControlSocketName) < 0)
+ {
+ sm_syslog(LOG_WARNING, NOQID,
+ "Could not remove control socket: %s",
+ errstring(errno));
+ return;
+ }
+ }
+# endif
+#endif
+ return;
+}
+ /*
+** CLRCONTROL -- reset the control connection
+**
+** Parameters:
+** none.
+**
+** Returns:
+** none.
+**
+** Side Effects:
+** releases any resources used by the control interface.
+*/
+
+void
+clrcontrol()
+{
+#ifdef NETUNIX
+# if _FFR_CONTROL_SOCKET
+ if (ControlSocket >= 0)
+ (void) close(ControlSocket);
+ ControlSocket = -1;
+# endif
+#endif
+}
+
+#ifndef NOT_SENDMAIL
+
+ /*
+** CONTROL_COMMAND -- read and process command from named socket
+**
+** Read and process the command from the opened socket.
+** Return the results down the same socket.
+**
+** Parameters:
+** sock -- the opened socket from getrequests()
+** e -- the current envelope
+**
+** Returns:
+** none.
+*/
+
+struct cmd
+{
+ char *cmdname; /* command name */
+ int cmdcode; /* internal code, see below */
+};
+
+/* values for cmdcode */
+# define CMDERROR 0 /* bad command */
+# define CMDRESTART 1 /* restart daemon */
+# define CMDSHUTDOWN 2 /* end daemon */
+# define CMDHELP 3 /* help */
+# define CMDSTATUS 4 /* daemon status */
+
+static struct cmd CmdTab[] =
+{
+ { "help", CMDHELP },
+ { "restart", CMDRESTART },
+ { "shutdown", CMDSHUTDOWN },
+ { "status", CMDSTATUS },
+ { NULL, CMDERROR }
+};
+
+void
+control_command(sock, e)
+ int sock;
+ ENVELOPE *e;
+{
+ FILE *s;
+ FILE *traffic;
+ FILE *oldout;
+ char *cmd;
+ char *p;
+ struct cmd *c;
+ char cmdbuf[MAXLINE];
+ char inp[MAXLINE];
+ extern char **SaveArgv;
+ extern void help __P((char *));
+
+ sm_setproctitle(FALSE, "control cmd read");
+
+ s = fdopen(sock, "r+");
+ if (s == NULL)
+ {
+ int save_errno = errno;
+
+ close(sock);
+ errno = save_errno;
+ return;
+ }
+ setbuf(s, NULL);
+
+ if (fgets(inp, sizeof inp, s) == NULL)
+ {
+ fclose(s);
+ return;
+ }
+ (void) fflush(s);
+
+ /* clean up end of line */
+ fixcrlf(inp, TRUE);
+
+ sm_setproctitle(FALSE, "control: %s", inp);
+
+ /* break off command */
+ for (p = inp; isascii(*p) && isspace(*p); p++)
+ continue;
+ cmd = cmdbuf;
+ while (*p != '\0' &&
+ !(isascii(*p) && isspace(*p)) &&
+ cmd < &cmdbuf[sizeof cmdbuf - 2])
+ *cmd++ = *p++;
+ *cmd = '\0';
+
+ /* throw away leading whitespace */
+ while (isascii(*p) && isspace(*p))
+ p++;
+
+ /* decode command */
+ for (c = CmdTab; c->cmdname != NULL; c++)
+ {
+ if (!strcasecmp(c->cmdname, cmdbuf))
+ break;
+ }
+
+ switch (c->cmdcode)
+ {
+ case CMDHELP: /* get help */
+ traffic = TrafficLogFile;
+ TrafficLogFile = NULL;
+ oldout = OutChannel;
+ OutChannel = s;
+ help("control");
+ TrafficLogFile = traffic;
+ OutChannel = oldout;
+ break;
+
+ case CMDRESTART: /* restart the daemon */
+ if (SaveArgv[0][0] != '/')
+ {
+ fprintf(s, "ERROR: could not restart: need full path\r\n");
+ break;
+ }
+ if (LogLevel > 3)
+ sm_syslog(LOG_INFO, NOQID,
+ "restarting %s on due to control command",
+ SaveArgv[0]);
+ closecontrolsocket(FALSE);
+ if (drop_privileges(TRUE) != EX_OK)
+ {
+ if (LogLevel > 0)
+ sm_syslog(LOG_ALERT, NOQID,
+ "could not set[ug]id(%d, %d): %m",
+ RunAsUid, RunAsGid);
+
+ fprintf(s, "ERROR: could not set[ug]id(%d, %d): %s, exiting...\r\n",
+ (int)RunAsUid, (int)RunAsGid, errstring(errno));
+ finis(FALSE, EX_OSERR);
+ }
+ fprintf(s, "OK\r\n");
+ clrcontrol();
+ (void) fcntl(sock, F_SETFD, 1);
+ execve(SaveArgv[0], (ARGV_T) SaveArgv, (ARGV_T) ExternalEnviron);
+ if (LogLevel > 0)
+ sm_syslog(LOG_ALERT, NOQID, "could not exec %s: %m",
+ SaveArgv[0]);
+ fprintf(s, "ERROR: could not exec %s: %s, exiting...\r\n",
+ SaveArgv[0], errstring(errno));
+ finis(FALSE, EX_OSFILE);
+ break;
+
+ case CMDSHUTDOWN: /* kill the daemon */
+ fprintf(s, "OK\r\n");
+ finis(FALSE, EX_OK);
+ break;
+
+ case CMDSTATUS: /* daemon status */
+ proc_list_probe();
+ fprintf(s, "%d/%d\r\n", CurChildren, MaxChildren);
+ proc_list_display(s);
+ break;
+
+ case CMDERROR: /* unknown command */
+ fprintf(s, "Bad command (%s)\r\n", cmdbuf);
+ break;
+ }
+ fclose(s);
+}
+#endif
diff --git a/contrib/sendmail/src/convtime.c b/contrib/sendmail/src/convtime.c
index 02c287b13722..ab8591d970ee 100644
--- a/contrib/sendmail/src/convtime.c
+++ b/contrib/sendmail/src/convtime.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)convtime.c 8.14 (Berkeley) 5/19/98";
+static char sccsid[] = "@(#)convtime.c 8.14 (Berkeley) 5/19/1998";
#endif /* not lint */
# include "sendmail.h"
diff --git a/contrib/sendmail/src/daemon.c b/contrib/sendmail/src/daemon.c
index dc0b5b5bd2d5..b74a7a72efe8 100644
--- a/contrib/sendmail/src/daemon.c
+++ b/contrib/sendmail/src/daemon.c
@@ -15,9 +15,9 @@
#ifndef lint
#ifdef DAEMON
-static char sccsid[] = "@(#)daemon.c 8.220 (Berkeley) 6/24/98 (with daemon mode)";
+static char sccsid[] = "@(#)daemon.c 8.234 (Berkeley) 12/17/1998 (with daemon mode)";
#else
-static char sccsid[] = "@(#)daemon.c 8.220 (Berkeley) 6/24/98 (without daemon mode)";
+static char sccsid[] = "@(#)daemon.c 8.234 (Berkeley) 12/17/1998 (without daemon mode)";
#endif
#endif /* not lint */
@@ -103,15 +103,22 @@ getrequests(e)
ENVELOPE *e;
{
int t;
- bool refusingconnections = TRUE;
+ time_t refuse_connections_until = 0;
+ bool firsttime = TRUE;
FILE *pidf;
+ int sff;
int socksize;
u_short port;
#if XDEBUG
bool j_has_dot;
#endif
+ char status[MAXLINE];
extern void reapchild __P((int));
+#ifdef NETUNIX
+ extern int ControlSocket;
+#endif
extern int opendaemonsocket __P((bool));
+ extern int opencontrolsocket __P((void));
/*
** Set up the address for the mailer.
@@ -169,11 +176,18 @@ getrequests(e)
/* get a socket for the SMTP connection */
socksize = opendaemonsocket(TRUE);
+ if (opencontrolsocket() < 0)
+ sm_syslog(LOG_WARNING, NOQID,
+ "daemon could not open control socket: %s",
+ errstring(errno));
+
(void) setsignal(SIGCHLD, reapchild);
/* write the pid to the log file for posterity */
- pidf = safefopen(PidFile, O_WRONLY|O_TRUNC, 0644,
- SFF_NOLINK|SFF_ROOTOK|SFF_REGONLY|SFF_CREAT);
+ sff = SFF_NOLINK|SFF_ROOTOK|SFF_REGONLY|SFF_CREAT;
+ if (TrustedUid != 0 && RealUid == TrustedUid)
+ sff |= SFF_OPENASROOT;
+ pidf = safefopen(PidFile, O_WRONLY|O_TRUNC, 0644, sff);
if (pidf == NULL)
{
sm_syslog(LOG_ERR, NOQID, "unable to write %s", PidFile);
@@ -201,6 +215,9 @@ getrequests(e)
}
#endif
+ /* Add parent process as first item */
+ proc_list_add(getpid(), "Sendmail daemon");
+
if (tTd(15, 1))
printf("getrequests: %d\n", DaemonSocket);
@@ -208,30 +225,34 @@ getrequests(e)
{
register pid_t pid;
auto SOCKADDR_LEN_T lotherend;
+ bool timedout = FALSE;
+ bool control = FALSE;
int savederrno;
int pipefd[2];
extern bool refuseconnections __P((int));
/* see if we are rejecting connections */
(void) blocksignal(SIGALRM);
- if (refuseconnections(ntohs(port)))
+ if (curtime() >= refuse_connections_until)
{
- if (DaemonSocket >= 0)
+ if (refuseconnections(ntohs(port)))
{
- /* close socket so peer will fail quickly */
- (void) close(DaemonSocket);
- DaemonSocket = -1;
- }
- refusingconnections = TRUE;
- sleep(15);
- continue;
- }
+ if (DaemonSocket >= 0)
+ {
+ /* close socket so peer fails quickly */
+ (void) close(DaemonSocket);
+ DaemonSocket = -1;
+ }
- /* arrange to (re)open the socket if necessary */
- if (refusingconnections)
- {
- (void) opendaemonsocket(FALSE);
- refusingconnections = FALSE;
+ /* refuse connections for next 15 seconds */
+ refuse_connections_until = curtime() + 15;
+ }
+ else if (DaemonSocket < 0 || firsttime)
+ {
+ /* arrange to (re)open the socket if needed */
+ (void) opendaemonsocket(FALSE);
+ firsttime = FALSE;
+ }
}
#if XDEBUG
@@ -258,9 +279,6 @@ getrequests(e)
}
#endif
- /* wait for a connection */
- setproctitle("accepting connections on port %d",
- ntohs(port));
#if 0
/*
** Andrew Sun <asun@ieps-sun.ml.com> claims that this will
@@ -268,34 +286,97 @@ getrequests(e)
** so is it worth doing this?
*/
- if (SetNonBlocking(DaemonSocket, FALSE) < 0)
+ if (DaemonSocket >= 0 &&
+ SetNonBlocking(DaemonSocket, FALSE) < 0)
log an error here;
#endif
(void) releasesignal(SIGALRM);
for (;;)
{
+ int highest = -1;
fd_set readfds;
struct timeval timeout;
FD_ZERO(&readfds);
- FD_SET(DaemonSocket, &readfds);
- timeout.tv_sec = 60;
+
+ /* wait for a connection */
+ if (DaemonSocket >= 0)
+ {
+ sm_setproctitle(TRUE,
+ "accepting connections on port %d",
+ ntohs(port));
+ if (DaemonSocket > highest)
+ highest = DaemonSocket;
+ FD_SET(DaemonSocket, &readfds);
+ }
+#ifdef NETUNIX
+ if (ControlSocket >= 0)
+ {
+ if (ControlSocket > highest)
+ highest = ControlSocket;
+ FD_SET(ControlSocket, &readfds);
+ }
+#endif
+ if (DaemonSocket >= 0)
+ timeout.tv_sec = 60;
+ else
+ timeout.tv_sec = 5;
timeout.tv_usec = 0;
- t = select(DaemonSocket + 1, FDSET_CAST &readfds,
- NULL, NULL, &timeout);
+ t = select(highest + 1, FDSET_CAST &readfds,
+ NULL, NULL, &timeout);
+
if (DoQueueRun)
(void) runqueue(TRUE, FALSE);
- if (t <= 0 || !FD_ISSET(DaemonSocket, &readfds))
- continue;
+ if (t <= 0)
+ {
+ timedout = TRUE;
+ break;
+ }
+ control = FALSE;
errno = 0;
- lotherend = socksize;
- t = accept(DaemonSocket,
- (struct sockaddr *)&RealHostAddr, &lotherend);
+ if (DaemonSocket >= 0 &&
+ FD_ISSET(DaemonSocket, &readfds))
+ {
+ lotherend = socksize;
+ t = accept(DaemonSocket,
+ (struct sockaddr *)&RealHostAddr,
+ &lotherend);
+ }
+#ifdef NETUNIX
+ else if (ControlSocket >= 0 &&
+ FD_ISSET(ControlSocket, &readfds))
+ {
+ struct sockaddr_un sa_un;
+
+ lotherend = sizeof sa_un;
+ t = accept(ControlSocket,
+ (struct sockaddr *)&sa_un,
+ &lotherend);
+ control = TRUE;
+ }
+#endif
if (t >= 0 || errno != EINTR)
break;
}
+ if (timedout)
+ {
+ timedout = FALSE;
+ continue;
+ }
+ if (control)
+ {
+ if (t >= 0)
+ {
+ extern void control_command __P((int, ENVELOPE *));
+
+ control_command(t, e);
+ }
+ else
+ syserr("getrequests: control accept");
+ continue;
+ }
savederrno = errno;
(void) blocksignal(SIGALRM);
if (t < 0)
@@ -306,8 +387,6 @@ getrequests(e)
/* arrange to re-open the socket next time around */
(void) close(DaemonSocket);
DaemonSocket = -1;
- refusingconnections = TRUE;
- sleep(5);
continue;
}
@@ -360,12 +439,16 @@ getrequests(e)
(void) setsignal(SIGCHLD, SIG_DFL);
(void) setsignal(SIGHUP, intsig);
(void) close(DaemonSocket);
+ clrcontrol();
proc_list_clear();
+ /* Add parent process as first child item */
+ proc_list_add(getpid(), "daemon child");
+
/* don't schedule queue runs if we are told to ETRN */
QueueIntvl = 0;
- setproctitle("startup with %s",
+ sm_setproctitle(TRUE, "startup with %s",
anynet_ntoa(&RealHostAddr));
if (pipefd[0] != -1)
@@ -395,36 +478,34 @@ getrequests(e)
if (strlen(p) > (SIZE_T) MAXNAME)
p[MAXNAME] = '\0';
RealHostName = newstr(p);
- setproctitle("startup with %s", p);
+ sm_setproctitle(TRUE, "startup with %s", p);
if ((inchannel = fdopen(t, "r")) == NULL ||
(t = dup(t)) < 0 ||
(outchannel = fdopen(t, "w")) == NULL)
{
syserr("cannot open SMTP server channel, fd=%d", t);
- exit(EX_OK);
+ finis(FALSE, EX_OK);
}
InChannel = inchannel;
OutChannel = outchannel;
DisConnected = FALSE;
- /* open maps for check_relay ruleset */
- initmaps(FALSE, e);
-
#ifdef XLA
if (!xla_host_ok(RealHostName))
{
message("421 Too many SMTP sessions for this host");
- exit(EX_OK);
+ finis(FALSE, EX_OK);
}
#endif
-
break;
}
/* parent -- keep track of children */
- proc_list_add(pid);
+ snprintf(status, MAXLINE, "SMTP server child for %s",
+ anynet_ntoa(&RealHostAddr));
+ proc_list_add(pid, status);
(void) releasesignal(SIGCHLD);
/* close the read end of the synchronization pipe */
@@ -552,7 +633,7 @@ opendaemonsocket(firsttime)
return socksize;
} while (ntries++ < MAXOPENTRIES && transienterror(saveerrno));
syserr("!opendaemonsocket: server SMTP socket wedged: exiting");
- finis();
+ /*NOTREACHED*/
return -1; /* avoid compiler warning on IRIX */
}
/*
@@ -1280,7 +1361,7 @@ getauthinfo(fd, may_be_forged)
/* translate that to a host name */
RealHostName = newstr(hostnamebyanyaddr(&RealHostAddr));
if (strlen(RealHostName) > MAXNAME)
- RealHostName[MAXNAME - 1] = '\0';
+ RealHostName[MAXNAME] = '\0';
}
/* cross check RealHostName with forward DNS lookup */
@@ -1288,8 +1369,8 @@ getauthinfo(fd, may_be_forged)
RealHostName[0] == '[')
{
/*
- ** address is not a socket or have an
- ** IP address with no forward lookup
+ ** address is not a socket or have an
+ ** IP address with no forward lookup
*/
*may_be_forged = FALSE;
}
diff --git a/contrib/sendmail/src/deliver.c b/contrib/sendmail/src/deliver.c
index 0e5eb0729905..e70f17e675aa 100644
--- a/contrib/sendmail/src/deliver.c
+++ b/contrib/sendmail/src/deliver.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)deliver.c 8.353 (Berkeley) 6/30/98";
+static char sccsid[] = "@(#)deliver.c 8.366 (Berkeley) 12/18/1998";
#endif /* not lint */
#include "sendmail.h"
@@ -360,7 +360,7 @@ sendall(e, mode)
if (mode != SM_VERIFY && bitset(EF_HAS_DF, e->e_flags))
dup_queue_file(e, ee, 'd');
openxscript(ee);
- if (LogLevel > 4)
+ if (mode != SM_VERIFY && LogLevel > 4)
sm_syslog(LOG_INFO, ee->e_id,
"clone %s, owner=%s",
e->e_id, owner);
@@ -552,7 +552,7 @@ sendall(e, mode)
# else
e->e_id = NULL;
# endif /* HASFLOCK */
- finis();
+ finis(TRUE, ExitStat);
}
/* be sure to give error messages in child */
@@ -570,6 +570,15 @@ sendall(e, mode)
mci_flush(FALSE, NULL);
+ /*
+ ** Since the delivery may happen in a child and the parent
+ ** does not wait, the parent may close the maps thereby
+ ** removing any shared memory used by the map. Therefore,
+ ** open a copy of the maps for the delivery process.
+ */
+
+ initmaps(FALSE, e);
+
# if HASFLOCK
break;
# else
@@ -586,7 +595,7 @@ sendall(e, mode)
ee->e_sibling = sibling;
}
(void) dowork(e->e_id, FALSE, FALSE, e);
- finis();
+ finis(TRUE, ExitStat);
# endif /* !HASFLOCK */
}
@@ -604,7 +613,7 @@ sendall(e, mode)
Verbose = oldverbose;
if (mode == SM_FORK)
- finis();
+ finis(TRUE, ExitStat);
}
void
@@ -1091,8 +1100,9 @@ deliver(e, firstto)
e->e_from.q_paddr, to->q_paddr, e);
if (rcode == EX_OK)
{
- /* do in-code checking */
- rcode = checkcompat(to, e);
+ /* do in-code checking if not discarding */
+ if (!bitset(EF_DISCARD, e->e_flags))
+ rcode = checkcompat(to, e);
}
if (rcode != EX_OK)
{
@@ -1100,6 +1110,22 @@ deliver(e, firstto)
giveresponse(rcode, m, NULL, ctladdr, xstart, e);
continue;
}
+ if (bitset(EF_DISCARD, e->e_flags))
+ {
+ if (tTd(10, 5))
+ {
+ printf("deliver: discarding recipient ");
+ printaddr(to, FALSE);
+ }
+
+ /*
+ ** Remove discard bit to prevent discard of
+ ** future recipients
+ */
+ e->e_flags &= ~EF_DISCARD;
+
+ continue;
+ }
/*
** Strip quote bits from names if the mailer is dumb
@@ -1409,7 +1435,7 @@ tryhost:
}
/* try the connection */
- setproctitle("%s %s: %s", e->e_id, hostbuf, "user open");
+ sm_setproctitle(TRUE, "%s %s: %s", e->e_id, hostbuf, "user open");
if (port == 0)
message("Connecting to %s via %s...",
hostbuf, m->m_name);
@@ -2096,7 +2122,7 @@ do_transfer:
rcode = smtpgetstat(m, mci, e);
if (rcode == EX_OK)
{
- if (strlen(to->q_paddr) + strlen(tobuf) + 2 >= sizeof tobuf)
+ if (strlen(to->q_paddr) + strlen(tobuf) + 2 > sizeof tobuf)
{
syserr("LMTP tobuf overflow");
}
@@ -2827,7 +2853,7 @@ putfromline(mci, e)
char hname[MAXNAME];
/*
- ** If we can construct a UUCP path, do so
+ ** If we can construct a UUCP path, do so
*/
at = strrchr(buf, '@');
@@ -2882,6 +2908,7 @@ putbody(mci, e, separator)
char *separator;
{
char buf[MAXLINE];
+ char *boundaries[MAXMIMENESTING + 1];
/*
** Output the body of the message
@@ -2923,8 +2950,6 @@ putbody(mci, e, separator)
#if MIME8TO7
if (bitset(MCIF_CVT8TO7, mci->mci_flags))
{
- char *boundaries[MAXMIMENESTING + 1];
-
/*
** Do 8 to 7 bit MIME conversion.
*/
@@ -2952,6 +2977,13 @@ putbody(mci, e, separator)
mime7to8(mci, e->e_header, e);
}
# endif
+ else if (MaxMimeHeaderLength > 0 || MaxMimeFieldLength > 0)
+ {
+ /* Use mime8to7 to check multipart for MIME header overflows */
+ boundaries[0] = NULL;
+ mci->mci_flags |= MCIF_INHEADER;
+ mime8to7(mci, e->e_header, e, boundaries, M87F_OUTER|M87F_NO8TO7);
+ }
else
#endif
{
@@ -2966,7 +2998,6 @@ putbody(mci, e, separator)
size_t eol_len;
char peekbuf[10];
- /* we can pass it through unmodified */
if (bitset(MCIF_INHEADER, mci->mci_flags))
{
putline("", mci);
@@ -3292,6 +3323,7 @@ mailfile(filename, mailer, ctladdr, sfflags, e)
/* child -- actually write to file */
struct stat stb;
MCI mcibuf;
+ int err;
volatile int oflags = O_WRONLY|O_APPEND;
if (e->e_lockfp != NULL)
@@ -3315,7 +3347,11 @@ mailfile(filename, mailer, ctladdr, sfflags, e)
ev = NULL;
#ifdef HASLSTAT
- if (lstat(filename, &stb) < 0)
+ if (bitset(DBS_FILEDELIVERYTOSYMLINK, DontBlameSendmail))
+ err = stat(filename, &stb);
+ else
+ err = lstat(filename, &stb);
+ if (err < 0)
#else
if (stat(filename, &stb) < 0)
#endif
diff --git a/contrib/sendmail/src/domain.c b/contrib/sendmail/src/domain.c
index e3a5500b5516..a279c0e69a96 100644
--- a/contrib/sendmail/src/domain.c
+++ b/contrib/sendmail/src/domain.c
@@ -14,9 +14,9 @@
#ifndef lint
#if NAMED_BIND
-static char sccsid[] = "@(#)domain.c 8.77 (Berkeley) 6/4/98 (with name server)";
+static char sccsid[] = "@(#)domain.c 8.80 (Berkeley) 12/17/1998 (with name server)";
#else
-static char sccsid[] = "@(#)domain.c 8.77 (Berkeley) 6/4/98 (without name server)";
+static char sccsid[] = "@(#)domain.c 8.80 (Berkeley) 12/17/1998 (without name server)";
#endif
#endif /* not lint */
@@ -451,7 +451,7 @@ bestmx_map_lookup(map, name, av, statp)
int i, len = 0;
char *p;
char *mxhosts[MAXMXHOSTS + 1];
- char buf[MXHOSTBUFSIZE + 1];
+ char buf[PSBUFSIZE / 2];
_res.options &= ~(RES_DNSRCH|RES_DEFNAMES);
nmx = getmxrr(name, mxhosts, FALSE, &rcode);
@@ -464,8 +464,8 @@ bestmx_map_lookup(map, name, av, statp)
return map_rewrite(map, mxhosts[0], strlen(mxhosts[0]), av);
/*
- ** We were given a -z flag (return all MXs) and there are multiple
- ** ones. We need to build them all into a list.
+ ** We were given a -z flag (return all MXs) and there are multiple
+ ** ones. We need to build them all into a list.
*/
p = buf;
for (i = 0; i < nmx; i++)
@@ -663,7 +663,7 @@ cnameloop:
qtype = T_A;
continue;
}
- else if (qtype == T_A && !gotmx && trymx)
+ else if (qtype == T_A && !gotmx && (trymx || **dp == '\0'))
{
qtype = T_MX;
continue;
@@ -824,7 +824,7 @@ cnameloop:
if (qtype == T_ANY)
qtype = T_A;
- else if (qtype == T_A && !gotmx && trymx)
+ else if (qtype == T_A && !gotmx && (trymx || **dp == '\0'))
qtype = T_MX;
else
{
diff --git a/contrib/sendmail/src/envelope.c b/contrib/sendmail/src/envelope.c
index 092148a2a0ca..a17aa8c2dfcf 100644
--- a/contrib/sendmail/src/envelope.c
+++ b/contrib/sendmail/src/envelope.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)envelope.c 8.117 (Berkeley) 6/4/98";
+static char sccsid[] = "@(#)envelope.c 8.121 (Berkeley) 12/18/1998";
#endif /* not lint */
#include "sendmail.h"
@@ -827,7 +827,7 @@ setsender(from, e, delimptr, delimchar, internal)
sm_syslog(LOG_NOTICE, e->e_id,
"cannot prescan from (%s)",
shortenstring(from, MAXSHORTSTR));
- finis();
+ finis(TRUE, ExitStat);
}
(void) rewrite(pvp, 3, 0, e);
(void) rewrite(pvp, 1, 0, e);
diff --git a/contrib/sendmail/src/err.c b/contrib/sendmail/src/err.c
index 066139557a00..1a875a2f92e0 100644
--- a/contrib/sendmail/src/err.c
+++ b/contrib/sendmail/src/err.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)err.c 8.74 (Berkeley) 6/4/98";
+static char sccsid[] = "@(#)err.c 8.74 (Berkeley) 6/4/1998";
#endif /* not lint */
# include "sendmail.h"
diff --git a/contrib/sendmail/src/headers.c b/contrib/sendmail/src/headers.c
index a04f59e14f4d..fcf1d9c0d95f 100644
--- a/contrib/sendmail/src/headers.c
+++ b/contrib/sendmail/src/headers.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)headers.c 8.127 (Berkeley) 6/4/98";
+static char sccsid[] = "@(#)headers.c 8.134 (Berkeley) 11/29/1998";
#endif /* not lint */
# include <errno.h>
@@ -521,8 +521,8 @@ eatheader(e, full)
#if 0
/*
- ** Change functionality so a fatal error on an
- ** address doesn't affect the entire envelope.
+ ** Change functionality so a fatal error on an
+ ** address doesn't affect the entire envelope.
*/
/* delete fatal errors generated by this address */
@@ -1198,6 +1198,59 @@ putheader(mci, hdr, e)
xputs(p);
}
+#if _FFR_MAX_MIME_HEADER_LENGTH
+ /* heuristic shortening of MIME fields to avoid MUA overflows */
+ if (MaxMimeFieldLength > 0 &&
+ wordinclass(h->h_field,
+ macid("{checkMIMEFieldHeaders}", NULL)))
+ {
+ extern bool fix_mime_header __P((char *));
+
+ if (fix_mime_header(h->h_value))
+ {
+ sm_syslog(LOG_ALERT, e->e_id,
+ "Truncated MIME %s header due to field size (possible attack)",
+ h->h_field);
+ if (tTd(34, 11))
+ printf(" truncated MIME %s header due to field size (possible attack)\n",
+ h->h_field);
+ }
+ }
+
+ if (MaxMimeHeaderLength > 0 &&
+ wordinclass(h->h_field,
+ macid("{checkMIMETextHeaders}", NULL)))
+ {
+ if (strlen(h->h_value) > MaxMimeHeaderLength)
+ {
+ h->h_value[MaxMimeHeaderLength - 1] = '\0';
+ sm_syslog(LOG_ALERT, e->e_id,
+ "Truncated long MIME %s header (possible attack)",
+ h->h_field);
+ if (tTd(34, 11))
+ printf(" truncated long MIME %s header (possible attack)\n",
+ h->h_field);
+ }
+ }
+
+ if (MaxMimeHeaderLength > 0 &&
+ wordinclass(h->h_field,
+ macid("{checkMIMEHeaders}", NULL)))
+ {
+ extern bool shorten_rfc822_string __P((char *, int));
+
+ if (shorten_rfc822_string(h->h_value, MaxMimeHeaderLength))
+ {
+ sm_syslog(LOG_ALERT, e->e_id,
+ "Truncated long MIME %s header (possible attack)",
+ h->h_field);
+ if (tTd(34, 11))
+ printf(" truncated long MIME %s header (possible attack)\n",
+ h->h_field);
+ }
+ }
+#endif
+
/* suppress Content-Transfer-Encoding: if we are MIMEing */
if (bitset(H_CTE, h->h_flags) &&
bitset(MCIF_CVT8TO7|MCIF_CVT7TO8|MCIF_INMIME, mci->mci_flags))
@@ -1568,3 +1621,69 @@ copyheader(header)
return ret;
}
+ /*
+** FIX_MIME_HEADER -- possibly truncate/rebalance parameters in a MIME header
+**
+** Run through all of the parameters of a MIME header and
+** possibly truncate and rebalance the parameter according
+** to MaxMimeFieldLength.
+**
+** Parameters:
+** string -- the full header
+**
+** Returns:
+** TRUE if the header was modified, FALSE otherwise
+**
+** Side Effects:
+** string modified in place
+*/
+
+bool
+fix_mime_header(string)
+ char *string;
+{
+ bool modified = FALSE;
+ char *begin = string;
+ char *end;
+ extern char *find_character __P((char *, char));
+ extern bool shorten_rfc822_string __P((char *, int));
+
+ if (string == NULL || *string == '\0')
+ return FALSE;
+
+ /* Split on each ';' */
+ while ((end = find_character(begin, ';')) != NULL)
+ {
+ char save = *end;
+ char *bp;
+
+ *end = '\0';
+
+ /* Shorten individual parameter */
+ if (shorten_rfc822_string(begin, MaxMimeFieldLength))
+ modified = TRUE;
+
+ /* Collapse the possibly shortened string with rest */
+ bp = begin + strlen(begin);
+ if (bp != end)
+ {
+ char *ep = end;
+
+ *end = save;
+ end = bp;
+
+ /* copy character by character due to overlap */
+ while (*ep != '\0')
+ *bp++ = *ep++;
+ *bp = '\0';
+ }
+ else
+ *end = save;
+ if (*end == '\0')
+ break;
+
+ /* Move past ';' */
+ begin = end + 1;
+ }
+ return modified;
+}
diff --git a/contrib/sendmail/src/ldap_map.h b/contrib/sendmail/src/ldap_map.h
index 9f6a6796d7a6..97eb29ec072c 100644
--- a/contrib/sendmail/src/ldap_map.h
+++ b/contrib/sendmail/src/ldap_map.h
@@ -14,7 +14,7 @@
** Please go to him for support -- since I (Eric) don't run LDAP, I
** can't help you at all.
**
-** @(#)ldap_map.h 8.9 (Berkeley) 5/19/98
+** @(#)ldap_map.h 8.10 (Berkeley) 9/14/1998
*/
#ifndef _LDAP_MAP_H
@@ -61,7 +61,7 @@ typedef struct ldap_map_struct LDAP_MAP_STRUCT;
#define DEFAULT_LDAP_MAP_DEREF LDAP_DEREF_NEVER
#define DEFAULT_LDAP_MAP_SIZELIMIT 0
#define DEFAULT_LDAP_MAP_ATTRSONLY 0
-#define LDAP_MAP_MAX_FILTER 256
+#define LDAP_MAP_MAX_FILTER 1024
#ifdef LDAP_REFERRALS
# define DEFAULT_LDAP_MAP_LDAP_OPTIONS LDAP_OPT_REFERRALS
#else /* LDAP_REFERRALS */
diff --git a/contrib/sendmail/src/macro.c b/contrib/sendmail/src/macro.c
index c1f9f7bb06cf..d45a0c7080e9 100644
--- a/contrib/sendmail/src/macro.c
+++ b/contrib/sendmail/src/macro.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)macro.c 8.25 (Berkeley) 5/19/98";
+static char sccsid[] = "@(#)macro.c 8.26 (Berkeley) 11/8/1998";
#endif /* not lint */
# include "sendmail.h"
@@ -333,7 +333,7 @@ macid(p, ep)
{
int mid;
register char *bp;
- char mbuf[21];
+ char mbuf[MAXMACNAMELEN + 1];
if (tTd(35, 14))
{
@@ -361,7 +361,7 @@ macid(p, ep)
return *p;
}
bp = mbuf;
- while (*++p != '\0' && *p != '}' && bp < &mbuf[sizeof mbuf])
+ while (*++p != '\0' && *p != '}' && bp < &mbuf[sizeof mbuf - 1])
{
if (isascii(*p) && (isalnum(*p) || *p == '_'))
*bp++ = *p;
diff --git a/contrib/sendmail/src/mailq.1 b/contrib/sendmail/src/mailq.1
index fa1d0d56f519..8b6e63ac1297 100644
--- a/contrib/sendmail/src/mailq.1
+++ b/contrib/sendmail/src/mailq.1
@@ -8,7 +8,7 @@
.\" the sendmail distribution.
.\"
.\"
-.\" @(#)mailq.1 8.10 (Berkeley) 5/19/98
+.\" @(#)mailq.1 8.10 (Berkeley) 5/19/1998
.\"
.Dd May 19, 1998
.Dt MAILQ 1
diff --git a/contrib/sendmail/src/mailstats.h b/contrib/sendmail/src/mailstats.h
index 2121e149587e..86390b3911a3 100644
--- a/contrib/sendmail/src/mailstats.h
+++ b/contrib/sendmail/src/mailstats.h
@@ -9,7 +9,7 @@
* the sendmail distribution.
*
*
- * @(#)mailstats.h 8.8 (Berkeley) 5/19/98
+ * @(#)mailstats.h 8.8 (Berkeley) 5/19/1998
*/
#define STAT_VERSION 2
diff --git a/contrib/sendmail/src/main.c b/contrib/sendmail/src/main.c
index f014d83c359f..cea9d158d711 100644
--- a/contrib/sendmail/src/main.c
+++ b/contrib/sendmail/src/main.c
@@ -19,7 +19,7 @@ static char copyright[] =
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 8.302 (Berkeley) 6/4/98";
+static char sccsid[] = "@(#)main.c 8.322 (Berkeley) 12/18/1998";
#endif /* not lint */
#define _DEFINE
@@ -129,6 +129,7 @@ main(argc, argv, envp)
extern char *getcfname __P((void));
extern SIGFUNC_DECL sigusr1 __P((int));
extern SIGFUNC_DECL sighup __P((int));
+ extern SIGFUNC_DECL quiesce __P((int));
extern void initmacros __P((ENVELOPE *));
extern void init_md __P((int, char **));
extern int getdtsize __P((void));
@@ -304,9 +305,7 @@ main(argc, argv, envp)
if (tTd(0, 101))
{
printf("Version %s\n", Version);
- endpwent();
- setuid(RealUid);
- exit(EX_OK);
+ finis(FALSE, EX_OK);
}
/*
@@ -419,8 +418,8 @@ main(argc, argv, envp)
environ = emptyenviron;
/*
- ** restore any original TZ setting until TimeZoneSpec has been
- ** determined - or early log messages may get bogus time stamps
+ ** restore any original TZ setting until TimeZoneSpec has been
+ ** determined - or early log messages may get bogus time stamps
*/
if ((p = getextenv("TZ")) != NULL)
{
@@ -549,7 +548,7 @@ main(argc, argv, envp)
QueueLimitId = (QUEUE_CHAR *) NULL;
/*
- ** Crack argv.
+ ** Crack argv.
*/
av = argv;
@@ -835,8 +834,7 @@ main(argc, argv, envp)
# endif
default:
- ExitStat = EX_USAGE;
- finis();
+ finis(TRUE, EX_USAGE);
break;
}
}
@@ -971,8 +969,11 @@ main(argc, argv, envp)
}
/* check for permissions */
- if ((OpMode == MD_DAEMON || OpMode == MD_FGDAEMON ||
- OpMode == MD_PURGESTAT) && RealUid != 0)
+ if ((OpMode == MD_DAEMON ||
+ OpMode == MD_FGDAEMON ||
+ OpMode == MD_PURGESTAT) &&
+ RealUid != 0 &&
+ RealUid != TrustedUid)
{
if (LogLevel > 1)
sm_syslog(LOG_ALERT, NOQID,
@@ -981,7 +982,7 @@ main(argc, argv, envp)
OpMode != MD_PURGESTAT ? "run daemon"
: "purge host status");
usrerr("Permission denied");
- exit(EX_USAGE);
+ finis(FALSE, EX_USAGE);
}
if (MeToo)
@@ -1083,6 +1084,17 @@ main(argc, argv, envp)
setoption('d', "", TRUE, FALSE, CurEnv);
}
+#ifdef VENDOR_CODE
+ /* check for vendor mismatch */
+ if (VendorCode != VENDOR_CODE)
+ {
+ extern char *getvendor __P((int));
+
+ message("Warning: .cf file vendor code mismatch: sendmail expects vendor %s, .cf file vendor is %s",
+ getvendor(VENDOR_CODE), getvendor(VendorCode));
+ }
+#endif
+
/* check for out of date configuration level */
if (ConfigLevel < MAXCONFIGLEVEL)
{
@@ -1199,6 +1211,22 @@ main(argc, argv, envp)
setclass('b', "application/octet-stream");
#endif
+#if _FFR_MAX_MIME_HEADER_LENGTH
+ /* MIME headers which have fields to check for overflow */
+ setclass(macid("{checkMIMEFieldHeaders}", NULL), "content-disposition");
+ setclass(macid("{checkMIMEFieldHeaders}", NULL), "content-type");
+
+ /* MIME headers to check for length overflow */
+ setclass(macid("{checkMIMETextHeaders}", NULL), "content-description");
+
+ /* MIME headers to check for overflow and rebalance */
+ setclass(macid("{checkMIMEHeaders}", NULL), "content-disposition");
+ setclass(macid("{checkMIMEHeaders}", NULL), "content-id");
+ setclass(macid("{checkMIMEHeaders}", NULL), "content-transfer-encoding");
+ setclass(macid("{checkMIMEHeaders}", NULL), "content-type");
+ setclass(macid("{checkMIMEHeaders}", NULL), "mime-version");
+#endif
+
/* operate in queue directory */
if (QueueDir == NULL)
{
@@ -1241,18 +1269,14 @@ main(argc, argv, envp)
{
/* nope, really a botch */
usrerr("You do not have permission to process the queue");
- exit (EX_NOPERM);
+ finis(FALSE, EX_NOPERM);
}
}
# endif /* QUEUE */
/* if we've had errors so far, exit now */
if (ExitStat != EX_OK && OpMode != MD_TEST)
- {
- endpwent();
- setuid(RealUid);
- exit(ExitStat);
- }
+ finis(FALSE, ExitStat);
#if XDEBUG
checkfd012("before main() initmaps");
@@ -1268,31 +1292,31 @@ main(argc, argv, envp)
/* print the queue */
#if QUEUE
dropenvelope(CurEnv, TRUE);
+ signal(SIGPIPE, quiesce);
printqueue();
- endpwent();
- setuid(RealUid);
- exit(EX_OK);
+ finis(FALSE, EX_OK);
#else /* QUEUE */
usrerr("No queue to print");
- finis();
+ finis(FALSE, ExitStat);
#endif /* QUEUE */
+ break;
case MD_HOSTSTAT:
+ signal(SIGPIPE, quiesce);
mci_traverse_persistent(mci_print_persistent, NULL);
- exit(EX_OK);
+ finis(FALSE, EX_OK);
break;
case MD_PURGESTAT:
mci_traverse_persistent(mci_purge_persistent, NULL);
- exit(EX_OK);
+ finis(FALSE, EX_OK);
break;
case MD_INITALIAS:
- /* initialize alias database */
+ /* initialize maps */
initmaps(TRUE, CurEnv);
- endpwent();
- setuid(RealUid);
- exit(ExitStat);
+ finis(FALSE, ExitStat);
+ break;
case MD_SMTP:
case MD_DAEMON:
@@ -1301,11 +1325,11 @@ main(argc, argv, envp)
CurEnv->e_envid = NULL;
CurEnv->e_flags &= ~(EF_RET_PARAM|EF_NO_BODY_RETN);
- /* don't open alias database -- done in srvrsmtp */
+ /* don't open maps for daemon -- done below in child */
break;
default:
- /* open the alias database */
+ /* open the maps */
initmaps(FALSE, CurEnv);
break;
}
@@ -1359,7 +1383,7 @@ main(argc, argv, envp)
printf("> ");
(void) fflush(stdout);
if (fgets(buf, sizeof buf, stdin) == NULL)
- finis();
+ finis(TRUE, ExitStat);
p = strchr(buf, '\n');
if (p != NULL)
*p = '\0';
@@ -1377,7 +1401,7 @@ main(argc, argv, envp)
if (queuemode && OpMode != MD_DAEMON && QueueIntvl == 0)
{
(void) runqueue(FALSE, Verbose);
- finis();
+ finis(TRUE, ExitStat);
}
# endif /* QUEUE */
@@ -1402,7 +1426,7 @@ main(argc, argv, envp)
if (i < 0)
syserr("daemon: cannot fork");
if (i != 0)
- exit(EX_OK);
+ finis(FALSE, EX_OK);
/* disconnect from our controlling tty */
disconnect(2, CurEnv);
@@ -1495,6 +1519,9 @@ main(argc, argv, envp)
snprintf(pbuf, sizeof pbuf, "0");
define(macid("{client_port}", NULL), newstr(pbuf), &BlankEnvelope);
+ /* initialize maps now for check_relay ruleset */
+ initmaps(FALSE, CurEnv);
+
if (OpMode == MD_DAEMON)
{
/* validate the connection */
@@ -1539,7 +1566,7 @@ main(argc, argv, envp)
/* collect body for UUCP return */
if (OpMode != MD_VERIFY)
collect(InChannel, FALSE, NULL, CurEnv);
- finis();
+ finis(TRUE, ExitStat);
}
/*
@@ -1583,7 +1610,7 @@ main(argc, argv, envp)
/* bail out if message too large */
if (bitset(EF_CLRQUEUE, CurEnv->e_flags))
{
- finis();
+ finis(TRUE, ExitStat);
/*NOTREACHED*/
return -1;
}
@@ -1615,11 +1642,18 @@ main(argc, argv, envp)
** Don't send return error message if in VERIFY mode.
*/
- finis();
+ finis(TRUE, ExitStat);
/*NOTREACHED*/
return -1;
}
+/* ARGSUSED */
+SIGFUNC_DECL
+quiesce(sig)
+ int sig;
+{
+ finis(FALSE, EX_OK);
+}
/* ARGSUSED */
SIGFUNC_DECL
@@ -1635,7 +1669,8 @@ intindebug(sig)
** FINIS -- Clean up and exit.
**
** Parameters:
-** none
+** drop -- whether or not to drop CurEnv envelope
+** exitstat -- exit status to use for exit() call
**
** Returns:
** never
@@ -1645,14 +1680,21 @@ intindebug(sig)
*/
void
-finis()
+finis(drop, exitstat)
+ bool drop;
+ volatile int exitstat;
{
+ extern void closemaps __P((void));
+#ifdef USERDB
+ extern void _udbx_close __P((void));
+#endif
+
if (tTd(2, 1))
{
extern void printenvflags __P((ENVELOPE *));
printf("\n====finis: stat %d e_id=%s e_flags=",
- ExitStat,
+ exitstat,
CurEnv->e_id == NULL ? "NOQUEUE" : CurEnv->e_id);
printenvflags(CurEnv);
}
@@ -1668,12 +1710,20 @@ finis()
/* clean up temp files */
CurEnv->e_to = NULL;
- if (CurEnv->e_id != NULL)
+ if (drop && CurEnv->e_id != NULL)
dropenvelope(CurEnv, TRUE);
/* flush any cached connections */
mci_flush(TRUE, NULL);
+ /* close maps belonging to this pid */
+ closemaps();
+
+#ifdef USERDB
+ /* close UserDatabase */
+ _udbx_close();
+#endif
+
# ifdef XLA
/* clean up extended load average stuff */
xla_all_end();
@@ -1685,14 +1735,14 @@ finis()
sm_syslog(LOG_DEBUG, CurEnv->e_id,
"finis, pid=%d",
getpid());
- if (ExitStat == EX_TEMPFAIL || CurEnv->e_errormode == EM_BERKNET)
- ExitStat = EX_OK;
+ if (exitstat == EX_TEMPFAIL || CurEnv->e_errormode == EM_BERKNET)
+ exitstat = EX_OK;
/* reset uid for process accounting */
endpwent();
setuid(RealUid);
- exit(ExitStat);
+ exit(exitstat);
}
/*
** INTSIG -- clean up on interrupt
@@ -1719,15 +1769,11 @@ intsig(sig)
sm_syslog(LOG_DEBUG, CurEnv->e_id, "interrupt");
FileName = NULL;
unlockqueue(CurEnv);
+ closecontrolsocket(TRUE);
#ifdef XLA
xla_all_end();
#endif
-
- /* reset uid for process accounting */
- endpwent();
- setuid(RealUid);
-
- exit(EX_OK);
+ finis(FALSE, EX_OK);
}
/*
** INITMACROS -- initialize the macro system
@@ -2157,23 +2203,24 @@ sighup(sig)
{
if (LogLevel > 3)
sm_syslog(LOG_INFO, NOQID, "could not restart: need full path");
- exit(EX_OSFILE);
+ finis(FALSE, EX_OSFILE);
}
if (LogLevel > 3)
sm_syslog(LOG_INFO, NOQID, "restarting %s on signal", SaveArgv[0]);
alarm(0);
releasesignal(SIGHUP);
+ closecontrolsocket(TRUE);
if (drop_privileges(TRUE) != EX_OK)
{
if (LogLevel > 0)
sm_syslog(LOG_ALERT, NOQID, "could not set[ug]id(%d, %d): %m",
RunAsUid, RunAsGid);
- exit(EX_OSERR);
+ finis(FALSE, EX_OSERR);
}
execve(SaveArgv[0], (ARGV_T) SaveArgv, (ARGV_T) ExternalEnviron);
if (LogLevel > 0)
sm_syslog(LOG_ALERT, NOQID, "could not exec %s: %m", SaveArgv[0]);
- exit(EX_OSFILE);
+ finis(FALSE, EX_OSFILE);
}
/*
** DROP_PRIVILEGES -- reduce privileges to those of the RunAsUser option
diff --git a/contrib/sendmail/src/map.c b/contrib/sendmail/src/map.c
index 4c95b7fd6ab4..787ae07deb8d 100644
--- a/contrib/sendmail/src/map.c
+++ b/contrib/sendmail/src/map.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)map.c 8.239 (Berkeley) 6/5/98";
+static char sccsid[] = "@(#)map.c 8.256 (Berkeley) 11/15/1998";
#endif /* not lint */
#include "sendmail.h"
@@ -437,9 +437,9 @@ map_init(s, pass)
pass);
/*
- ** Pass 0 opens all non-rebuildable maps.
- ** Pass 1 opens all rebuildable maps for read.
- ** Pass 2 rebuilds all rebuildable maps.
+ ** Pass 0 opens all non-rebuildable maps.
+ ** Pass 1 opens all rebuildable maps for read.
+ ** Pass 2 rebuilds all rebuildable maps.
*/
rebuildable = (bitset(MF_ALIAS, map->map_mflags) &&
@@ -478,6 +478,7 @@ map_init(s, pass)
map->map_file == NULL ? "NULL" :
map->map_file);
map->map_mflags |= MF_OPEN;
+ map->map_pid = getpid();
}
else
{
@@ -496,10 +497,55 @@ map_init(s, pass)
map->map_class = &BogusMapClass;
map->map_mflags |= MF_OPEN;
+ map->map_pid = getpid();
}
}
}
/*
+** CLOSEMAPS -- close all open maps opened by the current pid.
+**
+** Parameters:
+** none
+**
+** Returns:
+** none.
+*/
+
+void
+closemaps()
+{
+ extern void map_close __P((STAB *, int));
+
+ stabapply(map_close, 0);
+}
+
+/* ARGSUSED1 */
+void
+map_close(s, unused)
+ register STAB *s;
+ int unused;
+{
+ MAP *map;
+
+ if (s->s_type != ST_MAP)
+ return;
+
+ map = &s->s_map;
+
+ if (!bitset(MF_VALID, map->map_mflags) ||
+ !bitset(MF_OPEN, map->map_mflags) ||
+ map->map_pid != getpid())
+ return;
+
+ if (tTd(38, 5))
+ printf("closemaps: closing %s (%s)\n",
+ map->map_mname == NULL ? "NULL" : map->map_mname,
+ map->map_file == NULL ? "NULL" : map->map_file);
+
+ map->map_class->map_close(map);
+ map->map_mflags &= ~(MF_OPEN|MF_WRITABLE);
+}
+ /*
** GETCANONNAME -- look up name using service switch
**
** Parameters:
@@ -953,10 +999,11 @@ ndbm_map_open(map, mode)
else
{
map->map_mflags |= MF_LOCKED;
- if (geteuid() == 0 && TrustedFileUid != 0)
+#if _FFR_TRUSTED_USER
+ if (geteuid() == 0 && TrustedUid != 0)
{
- if (fchown(dfd, TrustedFileUid, -1) < 0 ||
- fchown(pfd, TrustedFileUid, -1) < 0)
+ if (fchown(dfd, TrustedUid, -1) < 0 ||
+ fchown(pfd, TrustedUid, -1) < 0)
{
int err = errno;
@@ -967,6 +1014,7 @@ ndbm_map_open(map, mode)
map->map_file, errstring(err));
}
}
+#endif
}
if (fstat(dfd, &st) >= 0)
map->map_mtime = st.st_mtime;
@@ -1020,6 +1068,7 @@ lockdbm:
if (map->map_class->map_open(map, omode))
{
map->map_mflags |= MF_OPEN;
+ map->map_pid = getpid();
if ((omode && O_ACCMODE) == O_RDWR)
map->map_mflags |= MF_WRITABLE;
goto lockdbm;
@@ -1033,6 +1082,7 @@ lockdbm:
*statp = EX_TEMPFAIL;
map->map_class = &BogusMapClass;
map->map_mflags |= MF_OPEN;
+ map->map_pid = getpid();
syserr("Cannot reopen NDBM database %s",
map->map_file);
}
@@ -1159,7 +1209,7 @@ ndbm_map_close(map)
{
#ifdef NDBM_YP_COMPAT
bool inclnull;
- char buf[200];
+ char buf[MAXHOSTNAMELEN];
inclnull = bitset(MF_INCLNULL, map->map_mflags);
map->map_mflags &= ~MF_INCLNULL;
@@ -1500,9 +1550,10 @@ db_map_open(map, mode, mapclassname, dbtype, openinfo)
if (mode == O_RDWR)
{
(void) db->sync(db, 0);
- if (geteuid() == 0 && TrustedFileUid != 0)
+#if _FFR_TRUSTED_USER
+ if (geteuid() == 0 && TrustedUid != 0)
{
- if (fchown(fd, TrustedFileUid, -1) < 0)
+ if (fchown(fd, TrustedUid, -1) < 0)
{
int err = errno;
@@ -1513,6 +1564,7 @@ db_map_open(map, mode, mapclassname, dbtype, openinfo)
buf, errstring(err));
}
}
+#endif
}
if (fd >= 0 && fstat(fd, &st) >= 0)
@@ -1590,6 +1642,7 @@ db_map_lookup(map, name, av, statp)
if (map->map_class->map_open(map, omode))
{
map->map_mflags |= MF_OPEN;
+ map->map_pid = getpid();
if ((omode && O_ACCMODE) == O_RDWR)
map->map_mflags |= MF_WRITABLE;
db = (DB *) map->map_db2;
@@ -1604,6 +1657,7 @@ db_map_lookup(map, name, av, statp)
*statp = EX_TEMPFAIL;
map->map_class = &BogusMapClass;
map->map_mflags |= MF_OPEN;
+ map->map_pid = getpid();
syserr("Cannot reopen DB database %s",
map->map_file);
}
@@ -1817,9 +1871,31 @@ db_map_close(map)
#if DB_VERSION_MAJOR < 2
if (db->close(db) != 0)
#else
+ /*
+ ** Berkeley DB can use internal shared memory
+ ** locking for its memory pool. Closing a map
+ ** opened by another process will interfere
+ ** with the shared memory and locks of the parent
+ ** process leaving things in a bad state.
+ **
+ ** If this map was not opened by the current
+ ** process, do not close it here but recover
+ ** the file descriptor.
+ */
+ if (map->map_pid != getpid())
+ {
+ int fd = -1;
+
+ errno = db->fd(db, &fd);
+ if (fd >= 0)
+ (void) close(fd);
+ return;
+ }
+
if ((errno = db->close(db, 0)) != 0)
#endif
- syserr("readaliases: db close failure");
+ syserr("db_map_close(%s, %s, %lx): db close failure",
+ map->map_mname, map->map_file, map->map_mflags);
}
#endif
@@ -2250,7 +2326,10 @@ nisplus_map_lookup(map, name, av, statp)
if (!bitset(MF_OPEN, map->map_mflags))
{
if (nisplus_map_open(map, O_RDONLY))
+ {
map->map_mflags |= MF_OPEN;
+ map->map_pid = getpid();
+ }
else
{
*statp = EX_UNAVAILABLE;
@@ -2591,18 +2670,38 @@ ldap_map_start(map)
ev = setevent(lmap->timeout.tv_sec, ldaptimeout, 0);
}
- if ((ld = ldap_open(lmap->ldaphost,lmap->ldapport)) == NULL)
+#ifdef LDAP_VERSION3
+ ld = ldap_init(lmap->ldaphost,lmap->ldapport);
+#else
+ ld = ldap_open(lmap->ldaphost,lmap->ldapport);
+#endif
+
+ /* clear the event if it has not sprung */
+ if (lmap->timeout.tv_sec != 0)
+ clrevent(ev);
+
+ if (ld == NULL)
{
if (!bitset(MF_OPTIONAL, map->map_mflags))
{
- syserr("ldapopen failed to %s in map %s",
+ syserr("%sldapopen failed to %s in map %s",
+ bitset(MF_NODEFER, map->map_mflags) ? "" : "421 ",
lmap->ldaphost, map->map_mname);
}
return FALSE;
}
- /* clear the event if it has not sprung */
- clrevent(ev);
+#ifdef LDAP_VERSION3
+ ldap_set_option(ld, LDAP_OPT_DEREF, &lmap->deref);
+ ldap_set_option(ld, LDAP_OPT_TIMELIMIT, &lmap->timelimit);
+ ldap_set_option(ld, LDAP_OPT_SIZELIMIT, &lmap->sizelimit);
+ ldap_set_option(ld, LDAP_OPT_REFERRALS, &lmap->ldap_options);
+
+ /* ld needs to be cast into the map struct */
+ lmap->ld = ld;
+ return TRUE;
+#else
+
/* From here on in we can use ldap internal timelimits */
ld->ld_deref = lmap->deref;
ld->ld_timelimit = lmap->timelimit;
@@ -2625,11 +2724,12 @@ ldap_map_start(map)
}
return FALSE;
+#endif
}
/*
-** LDAP_MAP_CLOSE -- close ldap map
+** LDAP_MAP_CLOSE -- close ldap map
*/
void
@@ -2645,8 +2745,8 @@ ldap_map_close(map)
#ifdef SUNET_ID
/*
-** SUNET_ID_HASH -- Convert a string to it's Sunet_id canonical form
-** This only makes sense at Stanford University.
+** SUNET_ID_HASH -- Convert a string to it's Sunet_id canonical form
+** This only makes sense at Stanford University.
*/
char *
@@ -2680,7 +2780,7 @@ sunet_id_hash(str)
#endif /* SUNET_ID */
/*
-** LDAP_MAP_LOOKUP -- look up a datum in a LDAP map
+** LDAP_MAP_LOOKUP -- look up a datum in a LDAP map
*/
char *
@@ -2699,6 +2799,7 @@ ldap_map_lookup(map, name, av, statp)
char **attr_values = NULL;
char *result;
int name_len;
+ char *fp, *p, *q;
if (tTd(38, 20))
printf("ldap_map_lookup(%s, %s)\n", map->map_mname, name);
@@ -2727,8 +2828,28 @@ ldap_map_lookup(map, name, av, statp)
makelower(keybuf);
#endif /*SUNET_ID */
- /* sprintf keybuf into filter */
- snprintf(filter, sizeof filter, lmap->filter, keybuf);
+ /* substitute keybuf into filter, perhaps multiple times */
+ fp = filter;
+ p = lmap->filter;
+ while ((q = strchr(p, '%')) != NULL)
+ {
+ if (q[1] == 's')
+ {
+ snprintf(fp, SPACELEFT(filter, fp), "%.*s%s",
+ q - p, p, keybuf);
+ p = q + 2;
+ }
+ else
+ {
+ snprintf(fp, SPACELEFT(filter, fp), "%.*s",
+ q - p + 1, p);
+ p = q + (q[1] == '%' ? 2 : 1);
+ }
+ fp += strlen(fp);
+ }
+ snprintf(fp, SPACELEFT(filter, fp), "%s", p);
+ if (tTd(38, 20))
+ printf("ldap search filter=%s\n", filter);
if (ldap_search_st(lmap->ld, lmap->base,lmap->scope,filter,
lmap->attr, lmap->attrsonly, &(lmap->timeout),
@@ -2749,7 +2870,8 @@ ldap_map_lookup(map, name, av, statp)
{
if (!bitset(MF_OPTIONAL, map->map_mflags))
{
- syserr("Error in ldap_search_st using %s in map %s",
+ syserr("%sError in ldap_search_st using %s in map %s",
+ bitset(MF_NODEFER, map->map_mflags) ? "" : "421 ",
filter, map->map_mname);
}
result = NULL;
@@ -2802,7 +2924,7 @@ ldap_map_lookup(map, name, av, statp)
/*
-** LDAP_MAP_DEQUOTE - helper routine for ldap_map_parseargs
+** LDAP_MAP_DEQUOTE - helper routine for ldap_map_parseargs
*/
char *
@@ -2832,7 +2954,7 @@ ldap_map_dequote(str)
}
/*
-** LDAP_MAP_PARSEARGS -- parse ldap map definition args.
+** LDAP_MAP_PARSEARGS -- parse ldap map definition args.
*/
bool
@@ -3036,8 +3158,8 @@ ldap_map_parseargs(map,args)
map->map_domain = newstr(ldap_map_dequote(map->map_domain));
/*
- ** We need to swallow up all the stuff into a struct
- ** and dump it into map->map_dbptr1
+ ** We need to swallow up all the stuff into a struct
+ ** and dump it into map->map_dbptr1
*/
if (lmap->ldaphost != NULL)
@@ -3095,7 +3217,7 @@ ldap_map_parseargs(map,args)
#endif /* LDAP Modules */
/*
-** syslog map
+** syslog map
*/
#if _FFR_MAP_SYSLOG
@@ -3103,7 +3225,7 @@ ldap_map_parseargs(map,args)
#define map_prio map_lockfd /* overload field */
/*
-** SYSLOG_MAP_PARSEARGS -- check for priority level to syslog messages.
+** SYSLOG_MAP_PARSEARGS -- check for priority level to syslog messages.
*/
bool
@@ -3185,7 +3307,7 @@ syslog_map_parseargs(map, args)
}
/*
-** SYSLOG_MAP_LOOKUP -- rewrite and syslog message. Always return empty string
+** SYSLOG_MAP_LOOKUP -- rewrite and syslog message. Always return empty string
*/
char *
@@ -3382,8 +3504,6 @@ ni_map_open(map, mode)
MAP *map;
int mode;
{
- char *p;
-
if (tTd(38, 2))
printf("ni_map_open(%s, %s, %d)\n",
map->map_mname, map->map_file, mode);
@@ -3666,7 +3786,7 @@ ni_propval(keydir, keyprop, keyval, valprop, sepchar)
return propval;
}
-#endif
+#endif /* NETINFO */
/*
** TEXT (unindexed text file) Modules
**
@@ -3842,6 +3962,11 @@ text_map_lookup(map, name, av, statp)
return NULL;
}
vp = get_column(linebuf, map->map_valcolno, delim, buf, sizeof buf);
+ if (vp == NULL)
+ {
+ *statp = EX_NOTFOUND;
+ return NULL;
+ }
vsize = strlen(vp);
*statp = EX_OK;
if (bitset(MF_MATCHONLY, map->map_mflags))
diff --git a/contrib/sendmail/src/mci.c b/contrib/sendmail/src/mci.c
index efb8cbad67a8..41649a252712 100644
--- a/contrib/sendmail/src/mci.c
+++ b/contrib/sendmail/src/mci.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)mci.c 8.82 (Berkeley) 6/15/98";
+static char sccsid[] = "@(#)mci.c 8.83 (Berkeley) 10/13/1998";
#endif /* not lint */
#include "sendmail.h"
@@ -503,7 +503,7 @@ mci_dump_all(logit)
mci_dump(MciCache[i], logit);
}
/*
-** MCI_LOCK_HOST -- Lock host while sending.
+** MCI_LOCK_HOST -- Lock host while sending.
**
** If we are contacting a host, we'll need to
** update the status information in the host status
@@ -643,7 +643,7 @@ mci_unlock_host(mci)
errno = saveErrno;
}
/*
-** MCI_LOAD_PERSISTENT -- load persistent host info
+** MCI_LOAD_PERSISTENT -- load persistent host info
**
** Load information about host that is kept
** in common for all running sendmails.
@@ -1016,8 +1016,8 @@ mci_traverse_persistent(action, pathname)
*hostptr = '\0';
/*
- ** Do something with the file containing the persistent
- ** information.
+ ** Do something with the file containing the persistent
+ ** information.
*/
ret = (*action)(pathname, host);
}
@@ -1167,7 +1167,7 @@ mci_purge_persistent(pathname, hostname)
return 0;
}
/*
-** MCI_GENERATE_PERSISTENT_PATH -- generate path from hostname
+** MCI_GENERATE_PERSISTENT_PATH -- generate path from hostname
**
** Given `host', convert from a.b.c to $QueueDir/.hoststat/c./b./a,
** putting the result into `path'. if `createflag' is set, intervening
diff --git a/contrib/sendmail/src/mime.c b/contrib/sendmail/src/mime.c
index 11a141e4f8a3..a1429cb950d0 100644
--- a/contrib/sendmail/src/mime.c
+++ b/contrib/sendmail/src/mime.c
@@ -14,7 +14,7 @@
# include <string.h>
#ifndef lint
-static char sccsid[] = "@(#)mime.c 8.66 (Berkeley) 5/19/98";
+static char sccsid[] = "@(#)mime.c 8.70 (Berkeley) 11/10/1998";
#endif /* not lint */
/*
@@ -225,7 +225,8 @@ mime8to7(mci, header, e, boundaries, flags)
** Do a recursive descent into the message.
*/
- if (strcasecmp(type, "multipart") == 0 && !bitset(M87F_NO8BIT, flags))
+ if (strcasecmp(type, "multipart") == 0 &&
+ (!bitset(M87F_NO8BIT, flags) || bitset(M87F_NO8TO7, flags)))
{
int blen;
@@ -379,7 +380,7 @@ mime8to7(mci, header, e, boundaries, flags)
*/
sectionsize = sectionhighbits = 0;
- if (!bitset(M87F_NO8BIT, flags))
+ if (!bitset(M87F_NO8BIT|M87F_NO8TO7, flags))
{
/* remember where we were */
offset = ftell(e->e_dfp);
@@ -441,8 +442,13 @@ mime8to7(mci, header, e, boundaries, flags)
if (sectionhighbits == 0)
{
/* no encoding necessary */
- if (cte != NULL)
+ if (cte != NULL && bitset(MCIF_INMIME, mci->mci_flags))
{
+ /*
+ ** Skip _unless_ in MIME mode; see putheader() for the
+ ** counterpart where this is skipped _if_ in MIME mode.
+ */
+
snprintf(buf, sizeof buf,
"Content-Transfer-Encoding: %.200s", cte);
putline(buf, mci);
@@ -662,15 +668,22 @@ mime_getchar(fp, boundaries, btp)
static bool atbol = TRUE; /* at beginning of line */
static int bt = MBT_SYNTAX; /* boundary type of next EOF */
static u_char buf[128]; /* need not be a full line */
+ int start = 0; /* indicates position of - in buffer */
- if (buflen > 0)
+ if (buflen == 1 && *bp == '\n')
+ {
+ /* last \n in buffer may be part of next MIME boundary */
+ c = *bp;
+ }
+ else if (buflen > 0)
{
buflen--;
return *bp++;
}
+ else
+ c = getc(fp);
bp = buf;
buflen = 0;
- c = getc(fp);
if (c == '\n')
{
/* might be part of a MIME boundary */
@@ -682,6 +695,7 @@ mime_getchar(fp, boundaries, btp)
ungetc(c, fp);
return c;
}
+ start = 1;
}
if (c != EOF)
*bp++ = c;
@@ -710,7 +724,7 @@ mime_getchar(fp, boundaries, btp)
*bp++ = c;
}
*bp = '\0';
- bt = mimeboundary((char *) &buf[1], boundaries);
+ bt = mimeboundary((char *) &buf[start], boundaries);
switch (bt)
{
case MBT_FINAL:
diff --git a/contrib/sendmail/src/newaliases.1 b/contrib/sendmail/src/newaliases.1
index acf324531640..b9673cd35353 100644
--- a/contrib/sendmail/src/newaliases.1
+++ b/contrib/sendmail/src/newaliases.1
@@ -8,7 +8,7 @@
.\" the sendmail distribution.
.\"
.\"
-.\" @(#)newaliases.1 8.10 (Berkeley) 5/19/98
+.\" @(#)newaliases.1 8.10 (Berkeley) 5/19/1998
.\"
.Dd May 19, 1998
.Dt NEWALIASES 1
diff --git a/contrib/sendmail/src/parseaddr.c b/contrib/sendmail/src/parseaddr.c
index c3c89b45d2f2..86762fd66945 100644
--- a/contrib/sendmail/src/parseaddr.c
+++ b/contrib/sendmail/src/parseaddr.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)parseaddr.c 8.153 (Berkeley) 6/24/98";
+static char sccsid[] = "@(#)parseaddr.c 8.156 (Berkeley) 10/27/1998";
#endif /* not lint */
# include "sendmail.h"
@@ -67,7 +67,6 @@ parseaddr(addr, a, flags, delim, delimptr, e)
auto char *delimptrbuf;
bool queueup;
char pvpbuf[PSBUFSIZE];
- extern ADDRESS *buildaddr __P((char **, ADDRESS *, int, ENVELOPE *));
extern bool invalidaddr __P((char *, char *));
extern void allocaddr __P((ADDRESS *, int, char *));
@@ -1450,8 +1449,17 @@ map_lookup(map, key, argvect, pstat, e)
/* XXX should try to auto-open the map here */
if (tTd(60, 1))
- printf("map_lookup(%s, %s) => ",
- map->s_name, key);
+ {
+ printf("map_lookup(%s, %s", map->s_name, key);
+ if (tTd(60, 5))
+ {
+ int i;
+
+ for (i = 0; argvect[i] != NULL; i++)
+ printf(", %%%d=%s", i, argvect[i]);
+ }
+ printf(") => ");
+ }
replac = (*map->s_map.map_class->map_lookup)(&map->s_map,
key, argvect, &stat);
if (tTd(60, 1))
@@ -1553,7 +1561,7 @@ buildaddr(tv, a, flags, e)
static MAILER errormailer;
static char *discardargv[] = { "DISCARD", NULL };
static char *errorargv[] = { "ERROR", NULL };
- static char ubuf[MAXNAME + 1];
+ static char ubuf[MAXNAME + 2];
if (tTd(24, 5))
{
diff --git a/contrib/sendmail/src/pathnames.h b/contrib/sendmail/src/pathnames.h
index e10387ee398e..7a06b120652c 100644
--- a/contrib/sendmail/src/pathnames.h
+++ b/contrib/sendmail/src/pathnames.h
@@ -8,7 +8,7 @@
* the sendmail distribution.
*
*
- * @(#)pathnames.h 8.8 (Berkeley) 5/19/98
+ * @(#)pathnames.h 8.8 (Berkeley) 5/19/1998
*/
#ifndef _PATH_SENDMAILCF
diff --git a/contrib/sendmail/src/queue.c b/contrib/sendmail/src/queue.c
index 24b789a251b8..65e777ac5aba 100644
--- a/contrib/sendmail/src/queue.c
+++ b/contrib/sendmail/src/queue.c
@@ -14,9 +14,9 @@
#ifndef lint
#if QUEUE
-static char sccsid[] = "@(#)queue.c 8.202 (Berkeley) 6/15/98 (with queueing)";
+static char sccsid[] = "@(#)queue.c 8.210 (Berkeley) 10/15/1998 (with queueing)";
#else
-static char sccsid[] = "@(#)queue.c 8.202 (Berkeley) 6/15/98 (without queueing)";
+static char sccsid[] = "@(#)queue.c 8.210 (Berkeley) 10/15/1998 (without queueing)";
#endif
#endif /* not lint */
@@ -611,7 +611,7 @@ runqueue(forkflag, verbose)
{
/* parent -- pick up intermediate zombie */
(void) blocksignal(SIGALRM);
- proc_list_add(pid);
+ proc_list_add(pid, "Queue runner");
(void) releasesignal(SIGALRM);
releasesignal(SIGCHLD);
if (QueueIntvl != 0)
@@ -619,13 +619,17 @@ runqueue(forkflag, verbose)
return TRUE;
}
/* child -- double fork and clean up signals */
+ clrcontrol();
proc_list_clear();
+
+ /* Add parent process as first child item */
+ proc_list_add(getpid(), "Queue runner child process");
releasesignal(SIGCHLD);
(void) setsignal(SIGCHLD, SIG_DFL);
(void) setsignal(SIGHUP, intsig);
}
- setproctitle("running queue: %s", QueueDir);
+ sm_setproctitle(TRUE, "running queue: %s", QueueDir);
if (LogLevel > 69)
sm_syslog(LOG_DEBUG, NOQID,
@@ -750,7 +754,6 @@ runqueue(forkflag, verbose)
else
{
pid_t pid;
- extern pid_t dowork __P((char *, bool, bool, ENVELOPE *));
if (Verbose)
{
@@ -771,7 +774,7 @@ runqueue(forkflag, verbose)
/* exit without the usual cleanup */
e->e_id = NULL;
- finis();
+ finis(TRUE, ExitStat);
/*NOTREACHED*/
return TRUE;
}
@@ -893,7 +896,16 @@ orderq(doall)
continue;
if (strlen(d->d_name) > MAXQFNAME)
+ {
+ if (Verbose)
+ printf("orderq: %s too long, %d max characters\n",
+ d->d_name, MAXQFNAME);
+ if (LogLevel > 0)
+ sm_syslog(LOG_ALERT, NOQID,
+ "orderq: %s too long, %d max characters",
+ d->d_name, MAXQFNAME);
continue;
+ }
check = QueueLimitId;
while (check != NULL)
@@ -1443,6 +1455,16 @@ dowork(id, forkflag, requeueflag, e)
{
/* child -- error messages to the transcript */
QuickAbort = OnlyOneError = FALSE;
+
+ /*
+ ** Since the delivery may happen in a child and the
+ ** parent does not wait, the parent may close the
+ ** maps thereby removing any shared memory used by
+ ** the map. Therefore, open a copy of the maps for
+ ** the delivery process.
+ */
+
+ initmaps(FALSE, e);
}
}
else
@@ -1474,7 +1496,7 @@ dowork(id, forkflag, requeueflag, e)
disconnect(1, e);
OpMode = MD_DELIVER;
}
- setproctitle("%s: from queue", id);
+ sm_setproctitle(TRUE, "%s: from queue", id);
if (LogLevel > 76)
sm_syslog(LOG_DEBUG, e->e_id,
"dowork, pid=%d",
@@ -1490,7 +1512,7 @@ dowork(id, forkflag, requeueflag, e)
printf("readqf(%s) failed\n", e->e_id);
e->e_id = NULL;
if (forkflag)
- exit(EX_OK);
+ finis(FALSE, EX_OK);
else
return 0;
}
@@ -1506,7 +1528,7 @@ dowork(id, forkflag, requeueflag, e)
/* finish up and exit */
if (forkflag)
- finis();
+ finis(TRUE, ExitStat);
else
dropenvelope(e, TRUE);
}
@@ -1777,7 +1799,6 @@ readqf(e)
curtime() < e->e_dtime + MinQueueAge)
{
char *howlong = pintvl(curtime() - e->e_dtime, TRUE);
- extern void unlockqueue __P((ENVELOPE *));
if (Verbose || tTd(40, 8))
printf("%s: too young (%s)\n",
@@ -2185,7 +2206,7 @@ queuename(e, type)
continue;
syserr("queuename: Cannot create \"%s\" in \"%s\" (euid=%d)",
qf, QueueDir, geteuid());
- exit(EX_UNAVAILABLE);
+ finis(FALSE, EX_UNAVAILABLE);
}
do
{
@@ -2212,7 +2233,7 @@ queuename(e, type)
{
syserr("queuename: Cannot lock \"%s\" in \"%s\" (euid=%d)",
qf, QueueDir, geteuid());
- exit(EX_OSERR);
+ finis(FALSE, EX_OSERR);
}
/* a reader got the file; abandon it and try again */
@@ -2222,7 +2243,7 @@ queuename(e, type)
{
syserr("queuename: Cannot create \"%s\" in \"%s\" (euid=%d)",
qf, QueueDir, geteuid());
- exit(EX_OSERR);
+ finis(FALSE, EX_OSERR);
}
e->e_id = newstr(&qf[2]);
define('i', e->e_id, e);
diff --git a/contrib/sendmail/src/readcf.c b/contrib/sendmail/src/readcf.c
index db71937fba6e..56aa825981b4 100644
--- a/contrib/sendmail/src/readcf.c
+++ b/contrib/sendmail/src/readcf.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)readcf.c 8.230 (Berkeley) 6/5/98";
+static char sccsid[] = "@(#)readcf.c 8.235 (Berkeley) 8/18/1998";
#endif /* not lint */
# include "sendmail.h"
@@ -106,19 +106,19 @@ readcf(cfname, safe, e)
if (cf == NULL)
{
syserr("cannot open");
- exit(EX_OSFILE);
+ finis(FALSE, EX_OSFILE);
}
if (fstat(fileno(cf), &statb) < 0)
{
syserr("cannot fstat");
- exit(EX_OSFILE);
+ finis(FALSE, EX_OSFILE);
}
if (!S_ISREG(statb.st_mode))
{
syserr("not a plain file");
- exit(EX_OSFILE);
+ finis(FALSE, EX_OSFILE);
}
if (OpMode != MD_TEST && bitset(S_IWGRP|S_IWOTH, statb.st_mode))
@@ -518,7 +518,7 @@ readcf(cfname, safe, e)
if (ferror(cf))
{
syserr("I/O read error");
- exit(EX_OSFILE);
+ finis(FALSE, EX_OSFILE);
}
fclose(cf);
FileName = NULL;
@@ -1515,11 +1515,18 @@ struct optioninfo
#define O_CNCTONLYTO 0xa6
{ "ConnectOnlyTo", O_CNCTONLYTO, FALSE },
#endif
-#if _FFR_TRUSTED_FILE_OWNER
-#define O_TRUSTFILEOWN 0xa7
- { "TrustedFileOwner", O_TRUSTFILEOWN, FALSE },
+#if _FFR_TRUSTED_USER
+#define O_TRUSTUSER 0xa7
+ { "TrustedUser", O_TRUSTUSER, FALSE },
+#endif
+#if _FFR_MAX_MIME_HEADER_LENGTH
+#define O_MAXMIMEHDRLEN 0xa8
+ { "MaxMimeHeaderLength", O_MAXMIMEHDRLEN, FALSE },
+#endif
+#if _FFR_CONTROL_SOCKET
+#define O_CONTROLSOCKET 0xa9
+ { "ControlSocketName", O_CONTROLSOCKET, FALSE },
#endif
-
{ NULL, '\0', FALSE }
};
@@ -1707,7 +1714,7 @@ setoption(opt, val, safe, sticky, e)
default:
syserr("Unknown 8-bit mode %c", *val);
- exit(EX_USAGE);
+ finis(FALSE, EX_USAGE);
}
break;
#endif
@@ -1771,7 +1778,7 @@ setoption(opt, val, safe, sticky, e)
default:
syserr("Unknown delivery mode %c", *val);
- exit(EX_USAGE);
+ finis(FALSE, EX_USAGE);
}
buf[0] = (char)e->e_sendmode;
buf[1] = '\0';
@@ -2401,33 +2408,64 @@ setoption(opt, val, safe, sticky, e)
break;
#endif
-#if _FFR_TRUSTED_FILE_OWNER
- case O_TRUSTFILEOWN:
+#if _FFR_TRUSTED_USER
+ case O_TRUSTUSER:
if (isascii(*val) && isdigit(*val))
- TrustedFileUid = atoi(val);
+ TrustedUid = atoi(val);
else
{
register struct passwd *pw;
- TrustedFileUid = 0;
+ TrustedUid = 0;
pw = sm_getpwnam(val);
if (pw == NULL)
- syserr("readcf: option TrustedFileOwner: unknown user %s", val);
+ syserr("readcf: option TrustedUser: unknown user %s", val);
else
- TrustedFileUid = pw->pw_uid;
+ TrustedUid = pw->pw_uid;
}
#ifdef UID_MAX
- if (TrustedFileUid > UID_MAX)
+ if (TrustedUid > UID_MAX)
{
- syserr("readcf: option TrustedFileOwner: uid value (%ld) > UID_MAX (%ld)",
- TrustedFileUid, UID_MAX);
- TrustedFileUid = 0;
+ syserr("readcf: option TrustedUser: uid value (%ld) > UID_MAX (%ld)",
+ TrustedUid, UID_MAX);
+ TrustedUid = 0;
}
#endif
break;
#endif
+#if _FFR_MAX_MIME_HEADER_LENGTH
+ case O_MAXMIMEHDRLEN:
+ p = strchr(val, '/');
+ if (p != NULL)
+ *p++ = '\0';
+ MaxMimeHeaderLength = atoi(val);
+ if (p != NULL && *p != '\0')
+ MaxMimeFieldLength = atoi(p);
+ else
+ MaxMimeFieldLength = MaxMimeHeaderLength / 2;
+
+ if (MaxMimeHeaderLength < 0)
+ MaxMimeHeaderLength = 0;
+ else if (MaxMimeHeaderLength < 128)
+ printf("Warning: MaxMimeHeaderLength: header length limit set lower than 128\n");
+
+ if (MaxMimeFieldLength < 0)
+ MaxMimeFieldLength = 0;
+ else if (MaxMimeFieldLength < 40)
+ printf("Warning: MaxMimeHeaderLength: field length limit set lower than 40\n");
+ break;
+#endif
+
+#if _FFR_CONTROL_SOCKET
+ case O_CONTROLSOCKET:
+ if (ControlSocketName != NULL)
+ free(ControlSocketName);
+ ControlSocketName = newstr(val);
+ break;
+#endif
+
default:
if (tTd(37, 1))
{
diff --git a/contrib/sendmail/src/recipient.c b/contrib/sendmail/src/recipient.c
index 9a73b6a39cf9..59412a842c65 100644
--- a/contrib/sendmail/src/recipient.c
+++ b/contrib/sendmail/src/recipient.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)recipient.c 8.154 (Berkeley) 6/24/98";
+static char sccsid[] = "@(#)recipient.c 8.161 (Berkeley) 12/18/1998";
#endif /* not lint */
# include "sendmail.h"
@@ -331,8 +331,11 @@ recipient(a, sendq, aliaslevel, e)
}
/* add address on list */
- *pq = a;
- a->q_next = NULL;
+ if (pq != NULL)
+ {
+ *pq = a;
+ a->q_next = NULL;
+ }
/*
** Alias the name and handle special mailer types.
@@ -340,7 +343,10 @@ recipient(a, sendq, aliaslevel, e)
trylocaluser:
if (tTd(29, 7))
- printf("at trylocaluser %s\n", a->q_user);
+ {
+ printf("at trylocaluser: ");
+ printaddr(a, FALSE);
+ }
if (bitset(QDONTSEND|QBADADDR|QVERIFIED, a->q_flags))
goto testselfdestruct;
@@ -931,7 +937,7 @@ include(fname, forwarding, ctladdr, sendq, aliaslevel, e)
(int) getuid(), (int) geteuid());
if (forwarding)
- sfflags |= SFF_MUSTOWN|SFF_ROOTOK|SFF_NOSLINK;
+ sfflags |= SFF_MUSTOWN|SFF_ROOTOK|SFF_NOWLINK;
ca = getctladdr(ctladdr);
if (ca == NULL)
@@ -1195,7 +1201,7 @@ resetuid:
}
/*
- ** Check to see if some bad guy can write this file
+ ** Check to see if some bad guy can write this file
**
** Group write checking could be more clever, e.g.,
** guessing as to which groups are actually safe ("sys"
diff --git a/contrib/sendmail/src/safefile.c b/contrib/sendmail/src/safefile.c
index 16f3f3927c99..ff94b3d243bf 100644
--- a/contrib/sendmail/src/safefile.c
+++ b/contrib/sendmail/src/safefile.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)safefile.c 8.40 (Berkeley) 6/5/98";
+static char sccsid[] = "@(#)safefile.c 8.43 (Berkeley) 10/13/1998";
#endif /* not lint */
# include "sendmail.h"
@@ -102,7 +102,7 @@ safefile(fn, uid, gid, uname, flags, mode, st)
if (bitset(S_ISUID, st->st_mode))
#else
if (bitset(S_ISUID, st->st_mode) && st->st_uid != 0 &&
- st->st_uid != TrustedFileUid)
+ st->st_uid != TrustedUid)
#endif
{
uid = st->st_uid;
@@ -206,7 +206,7 @@ safefile(fn, uid, gid, uname, flags, mode, st)
if (stbuf.st_uid == uid)
;
- else if (uid == 0 && TrustedFileUid != 0 && stbuf.st_uid == TrustedFileUid)
+ else if (uid == 0 && stbuf.st_uid == TrustedUid)
;
else
{
@@ -299,7 +299,7 @@ safefile(fn, uid, gid, uname, flags, mode, st)
mode >>= 6;
else if (st->st_uid == uid)
;
- else if (uid == 0 && TrustedFileUid != 0 && st->st_uid == TrustedFileUid)
+ else if (uid == 0 && st->st_uid == TrustedUid)
;
else
{
@@ -328,7 +328,7 @@ safefile(fn, uid, gid, uname, flags, mode, st)
(int) st->st_uid, (int) st->st_nlink,
(u_long) st->st_mode, (u_long) mode);
if ((st->st_uid == uid || st->st_uid == 0 ||
- st->st_uid == TrustedFileUid ||
+ st->st_uid == TrustedUid ||
!bitset(SFF_MUSTOWN, flags)) &&
(st->st_mode & mode) == mode)
{
@@ -429,9 +429,9 @@ safedirpath(fn, uid, gid, uname, flags)
}
/*
- ** Let OS determine access to file if we are not
- ** running as a privileged user. This allows ACLs
- ** to work.
+ ** Let OS determine access to file if we are not
+ ** running as a privileged user. This allows ACLs
+ ** to work.
*/
if (geteuid() != 0)
continue;
diff --git a/contrib/sendmail/src/savemail.c b/contrib/sendmail/src/savemail.c
index 4fbfd675621b..f15c8de4ade8 100644
--- a/contrib/sendmail/src/savemail.c
+++ b/contrib/sendmail/src/savemail.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)savemail.c 8.138 (Berkeley) 6/17/98";
+static char sccsid[] = "@(#)savemail.c 8.139 (Berkeley) 8/5/1998";
#endif /* not lint */
# include "sendmail.h"
@@ -91,8 +91,7 @@ savemail(e, sendbody)
RF_COPYPARSE|RF_SENDERADDR, '\0', NULL, e) == NULL)
{
syserr("553 Cannot parse Postmaster!");
- ExitStat = EX_SOFTWARE;
- finis();
+ finis(TRUE, EX_SOFTWARE);
}
}
e->e_to = NULL;
diff --git a/contrib/sendmail/src/sendmail.8 b/contrib/sendmail/src/sendmail.8
index 5105e831d359..093b6e6f9f2a 100644
--- a/contrib/sendmail/src/sendmail.8
+++ b/contrib/sendmail/src/sendmail.8
@@ -8,9 +8,9 @@
.\" the sendmail distribution.
.\"
.\"
-.\" @(#)sendmail.8 8.19 (Berkeley) 5/19/98
+.\" @(#)sendmail.8 8.20 (Berkeley) 8/2/1998
.\"
-.Dd May 19, 1998
+.Dd August 2, 1998
.Dt SENDMAIL 8
.Os BSD 4
.Sh NAME
@@ -277,6 +277,9 @@ Log all traffic in and out of mailers in the indicated log file.
This should only be used as a last resort
for debugging mailer bugs.
It will log a lot of data very quickly.
+.It Fl -
+Stop processing command flags and use the rest of the arguments
+as addresses.
.El
.Ss Options
There are also a number of processing options that may be set.
diff --git a/contrib/sendmail/src/sendmail.h b/contrib/sendmail/src/sendmail.h
index 7bfe11b76069..023799d7e81b 100644
--- a/contrib/sendmail/src/sendmail.h
+++ b/contrib/sendmail/src/sendmail.h
@@ -9,7 +9,7 @@
* the sendmail distribution.
*
*
- * @(#)sendmail.h 8.280 (Berkeley) 6/5/98
+ * @(#)sendmail.h 8.292 (Berkeley) 11/21/1998
*/
/*
@@ -19,7 +19,7 @@
# ifdef _DEFINE
# define EXTERN
# ifndef lint
-static char SmailSccsId[] = "@(#)sendmail.h 8.280 6/5/98";
+static char SmailSccsId[] = "@(#)sendmail.h 8.292 11/21/1998";
# endif
# else /* _DEFINE */
# define EXTERN extern
@@ -684,6 +684,7 @@ MAP
char *map_domain; /* the (nominal) NIS domain */
char *map_rebuild; /* program to run to do auto-rebuild */
time_t map_mtime; /* last database modification time */
+ pid_t map_pid; /* PID of process which opened map */
int map_lockfd; /* auxiliary lock file descriptor */
short map_specificity; /* specificity of aliases */
MAP *map_stack[MAXMAPSTACK]; /* list for stacked maps */
@@ -1008,6 +1009,7 @@ extern bool filechanged __P((char *, int, struct stat *));
#define M87F_OUTER 0 /* outer context */
#define M87F_NO8BIT 0x0001 /* can't have 8-bit in this section */
#define M87F_DIGEST 0x0002 /* processing multipart/digest */
+#define M87F_NO8TO7 0x0004 /* don't do 8->7 bit conversions */
/*
@@ -1077,6 +1079,7 @@ extern char *validate_connection __P((SOCKADDR *, char *, ENVELOPE *));
#define VENDOR_SUN 2 /* Sun-native configuration file */
#define VENDOR_HP 3 /* Hewlett-Packard specific config syntax */
#define VENDOR_IBM 4 /* IBM specific config syntax */
+#define VENDOR_SENDMAIL 5 /* Sendmail, Inc. specific config syntax */
EXTERN int VendorCode; /* vendor-specific operation enhancements */
@@ -1097,7 +1100,6 @@ extern void vendor_daemon_setup __P((ENVELOPE *));
#define DBS_GROUPWRITABLEALIASFILE 0x00000010
#define DBS_WORLDWRITABLEALIASFILE 0x00000020
#define DBS_FORWARDFILEINUNSAFEDIRPATH 0x00000040
-#define DBS_INCLUDEFILEINUNSAFEDIRPATH 0x00000060
#define DBS_MAPINUNSAFEDIRPATH 0x00000080
#define DBS_LINKEDALIASFILEINWRITABLEDIR 0x00000100
#define DBS_LINKEDCLASSFILEINWRITABLEDIR 0x00000200
@@ -1120,6 +1122,7 @@ extern void vendor_daemon_setup __P((ENVELOPE *));
#define DBS_INCLUDEFILEINUNSAFEDIRPATHSAFE 0x04000000
#define DBS_RUNPROGRAMINUNSAFEDIRPATH 0x08000000
#define DBS_RUNWRITABLEPROGRAM 0x10000000
+#define DBS_INCLUDEFILEINUNSAFEDIRPATH 0x20000000
/* struct defining such things */
struct dbsval
@@ -1183,7 +1186,7 @@ EXTERN gid_t RealGid; /* real gid of caller */
EXTERN uid_t DefUid; /* default uid to run as */
EXTERN gid_t DefGid; /* default gid to run as */
EXTERN char *DefUser; /* default user to run as (from DefUid) */
-EXTERN uid_t TrustedFileUid; /* uid of trusted owner of files and dirs */
+EXTERN uid_t TrustedUid; /* uid of trusted user for files and startup */
EXTERN MODE_T OldUmask; /* umask when sendmail starts up */
EXTERN int Verbose; /* set if blow-by-blow desired */
EXTERN int Errors; /* set if errors (local to single pass) */
@@ -1221,6 +1224,7 @@ EXTERN char SpaceSub; /* substitution for <lwsp> */
EXTERN int PrivacyFlags; /* privacy flags */
EXTERN char *ConfFile; /* location of configuration file [conf.c] */
EXTERN char *PidFile; /* location of proc id file [conf.c] */
+EXTERN char *ControlSocketName; /* control socket filename [control.c] */
extern ADDRESS NullAddress; /* a null (template) address [main.c] */
EXTERN long WkClassFact; /* multiplier for message class -> priority */
EXTERN long WkRecipFact; /* multiplier for # of recipients -> priority */
@@ -1285,10 +1289,13 @@ EXTERN char *DoubleBounceAddr; /* where to send double bounces */
EXTERN char **ExternalEnviron; /* input environment */
EXTERN char *UserEnviron[MAXUSERENVIRON + 1];
/* saved user environment */
+EXTERN int MaxMimeHeaderLength; /* maximum MIME header length */
+EXTERN int MaxMimeFieldLength; /* maximum MIME field length */
+
extern int errno;
/*
-** Queue Run Limitations
+** Queue Run Limitations
*/
struct queue_char
{
@@ -1400,7 +1407,7 @@ extern char *denlstring __P((char *, bool, bool));
extern void makelower __P((char *));
extern bool rebuildaliases __P((MAP *, bool));
extern void readaliases __P((MAP *, FILE *, bool, bool));
-extern void finis __P((void));
+extern void finis __P((bool, volatile int));
extern void setsender __P((char *, ENVELOPE *, char **, int, bool));
extern void xputs __P((const char *));
extern void logsender __P((ENVELOPE *, char *));
@@ -1428,9 +1435,12 @@ extern void xfclose __P((FILE *, char *, char *));
extern int switch_map_find __P((char *, char *[], short []));
extern void shorten_hostname __P((char []));
extern int waitfor __P((pid_t));
-extern void proc_list_add __P((pid_t));
+extern void proc_list_add __P((pid_t, char *));
+extern void proc_list_set __P((pid_t, char *));
extern void proc_list_drop __P((pid_t));
extern void proc_list_clear __P((void));
+extern void proc_list_display __P((FILE *));
+extern void proc_list_probe __P((void));
extern void buffer_errors __P((void));
extern void flush_errors __P((bool));
extern void putline __P((char *, MCI *));
@@ -1468,6 +1478,8 @@ extern bool path_is_dir __P((char *, bool));
extern pid_t dowork __P((char *, bool, bool, ENVELOPE *));
extern int drop_privileges __P((bool));
extern void fill_fd __P((int, char *));
+extern void closecontrolsocket __P((bool));
+extern void clrcontrol __P((void));
extern const char *errstring __P((int));
extern sigfunc_t setsignal __P((int, sigfunc_t));
@@ -1491,6 +1503,7 @@ extern void usrerr __P((const char *, ...));
extern void message __P((const char *, ...));
extern void nmessage __P((const char *, ...));
extern void setproctitle __P((const char *, ...));
+extern void sm_setproctitle __P((bool, const char *, ...));
extern void sm_syslog __P((int, const char *, const char *, ...));
#if !HASSNPRINTF
diff --git a/contrib/sendmail/src/sendmail.hf b/contrib/sendmail/src/sendmail.hf
index 12a306012b38..0952963b8bd2 100644
--- a/contrib/sendmail/src/sendmail.hf
+++ b/contrib/sendmail/src/sendmail.hf
@@ -9,7 +9,7 @@ cpyr By using this file, you agree to the terms and conditions set
cpyr forth in the LICENSE file which can be found at the top level of
cpyr the sendmail distribution.
cpyr
-cpyr @(#)sendmail.hf 8.16 (Berkeley) 5/19/98
+cpyr @(#)sendmail.hf 8.18 (Berkeley) 11/19/1998
cpyr
smtp Topics:
smtp HELO EHLO MAIL RCPT DATA
@@ -117,3 +117,8 @@ dsn ORCPT Original recipient.
-bt /map mapname key :look up `key' in the indicated `mapname'.
-bt rules addr :run the indicated address through the named rules.
-bt Rules can be a comma separated list of rules.
+control Help for smcontrol:
+control help This message.
+control restart Restart sendmail.
+control shutdown Shutdown sendmail.
+control status Show sendmail status.
diff --git a/contrib/sendmail/src/snprintf.c b/contrib/sendmail/src/snprintf.c
index 9e0b6f14f15a..3e07e1b9920f 100644
--- a/contrib/sendmail/src/snprintf.c
+++ b/contrib/sendmail/src/snprintf.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)snprintf.c 8.11 (Berkeley) 6/4/98";
+static char sccsid[] = "@(#)snprintf.c 8.12 (Berkeley) 10/13/1998";
#endif /* not lint */
#include "sendmail.h"
@@ -367,10 +367,10 @@ quad_to_string(value)
static char buf[64];
/*
- ** Use sprintf() instead of snprintf() since snprintf()
- ** does not support %qu or %llu. The buffer is large enough
- ** to hold the string so there is no danger of buffer
- ** overflow.
+ ** Use sprintf() instead of snprintf() since snprintf()
+ ** does not support %qu or %llu. The buffer is large enough
+ ** to hold the string so there is no danger of buffer
+ ** overflow.
*/
#if NEED_PERCENTQ
diff --git a/contrib/sendmail/src/srvrsmtp.c b/contrib/sendmail/src/srvrsmtp.c
index fba103c6f045..f4ffe8c0dfa6 100644
--- a/contrib/sendmail/src/srvrsmtp.c
+++ b/contrib/sendmail/src/srvrsmtp.c
@@ -14,9 +14,9 @@
#ifndef lint
#if SMTP
-static char sccsid[] = "@(#)srvrsmtp.c 8.181 (Berkeley) 6/15/98 (with SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.187 (Berkeley) 10/23/1998 (with SMTP)";
#else
-static char sccsid[] = "@(#)srvrsmtp.c 8.181 (Berkeley) 6/15/98 (without SMTP)";
+static char sccsid[] = "@(#)srvrsmtp.c 8.187 (Berkeley) 10/23/1998 (without SMTP)";
#endif
#endif /* not lint */
@@ -127,7 +127,7 @@ smtp(nullserver, e)
char *id;
volatile int nrcpts = 0; /* number of RCPT commands */
bool doublequeue;
- bool discard;
+ volatile bool discard;
volatile int badcommands = 0; /* count of bad commands */
volatile int nverifies = 0; /* count of VRFY/EXPN commands */
volatile int n_etrn = 0; /* count of ETRN commands */
@@ -163,7 +163,7 @@ smtp(nullserver, e)
/* check_relay may have set discard bit, save for later */
discard = bitset(EF_DISCARD, e->e_flags);
- setproctitle("server %s startup", CurSmtpClient);
+ sm_setproctitle(TRUE, "server %s startup", CurSmtpClient);
#if DAEMON
if (LogLevel > 11)
{
@@ -222,7 +222,7 @@ smtp(nullserver, e)
/* read the input line */
SmtpPhase = "server cmd read";
- setproctitle("server %s cmd read", CurSmtpClient);
+ sm_setproctitle(TRUE, "server %s cmd read", CurSmtpClient);
p = sfgets(inp, sizeof inp, InChannel, TimeOuts.to_nextcommand,
SmtpPhase);
@@ -243,15 +243,15 @@ smtp(nullserver, e)
CurSmtpClient);
/*
- ** If have not accepted mail (DATA), do not bounce
- ** bad addresses back to sender.
+ ** If have not accepted mail (DATA), do not bounce
+ ** bad addresses back to sender.
*/
if (bitset(EF_CLRQUEUE, e->e_flags))
e->e_sendqueue = NULL;
if (InChild)
ExitStat = EX_QUIT;
- finis();
+ finis(TRUE, ExitStat);
}
/* clean up end of line */
@@ -267,9 +267,9 @@ smtp(nullserver, e)
inp);
if (e->e_id == NULL)
- setproctitle("%s: %.80s", CurSmtpClient, inp);
+ sm_setproctitle(TRUE, "%s: %.80s", CurSmtpClient, inp);
else
- setproctitle("%s %s: %.80s", e->e_id, CurSmtpClient, inp);
+ sm_setproctitle(TRUE, "%s %s: %.80s", e->e_id, CurSmtpClient, inp);
/* break off command */
for (p = inp; isascii(*p) && isspace(*p); p++)
@@ -457,7 +457,7 @@ smtp(nullserver, e)
{
errno = 0;
syserr("503 Nested MAIL command: MAIL %s", p);
- finis();
+ finis(TRUE, ExitStat);
}
/* make sure we know who the sending host is */
@@ -498,7 +498,7 @@ smtp(nullserver, e)
goto undo_subproc_no_pm;
nrcpts = 0;
e->e_flags |= EF_LOGSENDER|EF_CLRQUEUE;
- setproctitle("%s %s: %.80s", e->e_id, CurSmtpClient, inp);
+ sm_setproctitle(TRUE, "%s %s: %.80s", e->e_id, CurSmtpClient, inp);
/* child -- go do the processing */
if (setjmp(TopFrame) > 0)
@@ -512,7 +512,7 @@ smtp(nullserver, e)
QuickAbort = FALSE;
SuprErrs = TRUE;
e->e_flags &= ~EF_FATALERRS;
- finis();
+ finis(TRUE, ExitStat);
}
break;
}
@@ -633,8 +633,14 @@ smtp(nullserver, e)
if (p == NULL)
break;
a = parseaddr(p, NULLADDR, RF_COPYALL, ' ', &delimptr, e);
- if (a == NULL || Errors > 0)
+ if (Errors > 0)
+ break;
+ if (a == NULL)
+ {
+ usrerr("501 Missing recipient");
break;
+ }
+
if (delimptr != NULL && *delimptr != '\0')
*delimptr++ = '\0';
@@ -808,8 +814,6 @@ smtp(nullserver, e)
if (!shouldqueue(e->e_msgpriority, e->e_ctime))
{
- extern pid_t dowork __P((char *, bool, bool, ENVELOPE *));
-
unlockqueue(e);
(void) dowork(id, TRUE, TRUE, e);
}
@@ -818,7 +822,7 @@ smtp(nullserver, e)
abortmessage:
/* if in a child, pop back to our parent */
if (InChild)
- finis();
+ finis(TRUE, ExitStat);
/* clean up a bit */
gotmail = FALSE;
@@ -837,7 +841,7 @@ smtp(nullserver, e)
e->e_sendqueue = NULL;
e->e_flags |= EF_CLRQUEUE;
if (InChild)
- finis();
+ finis(TRUE, ExitStat);
/* clean up a bit */
gotmail = FALSE;
@@ -916,7 +920,7 @@ smtp(nullserver, e)
vrfyqueue = vrfyqueue->q_next;
}
if (InChild)
- finis();
+ finis(TRUE, ExitStat);
break;
case CMDETRN: /* etrn -- force queue flush */
@@ -992,7 +996,7 @@ doquit:
sm_syslog(LOG_INFO, NULL,
"Null connection from %.100s",
CurSmtpClient);
- finis();
+ finis(TRUE, ExitStat);
case CMDVERB: /* set verbose mode */
if (bitset(PRIV_NOEXPN, PrivacyFlags) ||
@@ -1417,7 +1421,7 @@ runinchild(label, e)
auto int st;
/* parent -- wait for child to complete */
- setproctitle("server %s child wait", CurSmtpClient);
+ sm_setproctitle(TRUE, "server %s child wait", CurSmtpClient);
st = waitfor(childpid);
if (st == -1)
syserr("451 %s: lost child", label);
@@ -1429,7 +1433,7 @@ runinchild(label, e)
if (WEXITSTATUS(st) == EX_QUIT)
{
disconnect(1, e);
- finis();
+ finis(TRUE, ExitStat);
}
/* restore the child signal */
@@ -1447,10 +1451,6 @@ runinchild(label, e)
(void) releasesignal(SIGCHLD);
}
}
-
- /* open alias database */
- initmaps(FALSE, e);
-
return (0);
}
diff --git a/contrib/sendmail/src/stab.c b/contrib/sendmail/src/stab.c
index 1ffc7cb1fcf3..37b87a371246 100644
--- a/contrib/sendmail/src/stab.c
+++ b/contrib/sendmail/src/stab.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)stab.c 8.19 (Berkeley) 5/19/98";
+static char sccsid[] = "@(#)stab.c 8.19 (Berkeley) 5/19/1998";
#endif /* not lint */
# include "sendmail.h"
diff --git a/contrib/sendmail/src/stats.c b/contrib/sendmail/src/stats.c
index 767a55e17413..b1162ff79ea2 100644
--- a/contrib/sendmail/src/stats.c
+++ b/contrib/sendmail/src/stats.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)stats.c 8.22 (Berkeley) 5/19/98";
+static char sccsid[] = "@(#)stats.c 8.22 (Berkeley) 5/19/1998";
#endif /* not lint */
# include "sendmail.h"
diff --git a/contrib/sendmail/src/sysexits.c b/contrib/sendmail/src/sysexits.c
index 10d7c85a1824..c7934c738409 100644
--- a/contrib/sendmail/src/sysexits.c
+++ b/contrib/sendmail/src/sysexits.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)sysexits.c 8.13 (Berkeley) 5/24/98";
+static char sccsid[] = "@(#)sysexits.c 8.13 (Berkeley) 5/24/1998";
#endif /* not lint */
#include "sendmail.h"
diff --git a/contrib/sendmail/src/trace.c b/contrib/sendmail/src/trace.c
index 5ff9795c5122..5ab60325133f 100644
--- a/contrib/sendmail/src/trace.c
+++ b/contrib/sendmail/src/trace.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)trace.c 8.12 (Berkeley) 5/19/98";
+static char sccsid[] = "@(#)trace.c 8.12 (Berkeley) 5/19/1998";
#endif /* not lint */
# include "sendmail.h"
diff --git a/contrib/sendmail/src/udb.c b/contrib/sendmail/src/udb.c
index e7f42af2ba91..a279afff1552 100644
--- a/contrib/sendmail/src/udb.c
+++ b/contrib/sendmail/src/udb.c
@@ -14,9 +14,9 @@
#ifndef lint
#if USERDB
-static char sccsid [] = "@(#)udb.c 8.66 (Berkeley) 6/18/98 (with USERDB)";
+static char sccsid [] = "@(#)udb.c 8.70 (Berkeley) 12/21/1998 (with USERDB)";
#else
-static char sccsid [] = "@(#)udb.c 8.66 (Berkeley) 6/18/98 (without USERDB)";
+static char sccsid [] = "@(#)udb.c 8.70 (Berkeley) 12/21/1998 (without USERDB)";
#endif
#endif
@@ -49,6 +49,7 @@ struct udbent
{
char *udb_spec; /* string version of spec */
int udb_type; /* type of entry */
+ pid_t udb_pid; /* PID of process which opened db */
char *udb_default; /* default host for outgoing mail */
union
{
@@ -91,7 +92,7 @@ struct udbent
#define MAXUDBENT 10 /* maximum number of UDB entries */
-struct option
+struct udb_option
{
char *name;
char *val;
@@ -140,6 +141,7 @@ udbexpand(a, sendq, aliaslevel, e)
register struct udbent *up;
int keylen;
int naddrs;
+ char *user;
char keybuf[MAXKEY];
bzero(&key, sizeof key);
@@ -164,20 +166,24 @@ udbexpand(a, sendq, aliaslevel, e)
if (UdbSpec == NULL || UdbSpec[0] == '\0')
return EX_OK;
+ /* extract user to do userdb matching on */
+ user = a->q_user;
+
/* short circuit name begins with '\\' since it can't possibly match */
- if (a->q_user[0] == '\\')
+ /* (might want to treat this as unquoted instead) */
+ if (user[0] == '\\')
return EX_OK;
/* if name is too long, assume it won't match */
- if (strlen(a->q_user) > (SIZE_T) sizeof keybuf - 12)
+ if (strlen(user) > (SIZE_T) sizeof keybuf - 12)
return EX_OK;
/* if name begins with a colon, it indicates our metadata */
- if (a->q_user[0] == ':')
+ if (user[0] == ':')
return EX_OK;
/* build actual database key */
- (void) strcpy(keybuf, a->q_user);
+ (void) strcpy(keybuf, user);
(void) strcat(keybuf, ":maildrop");
keylen = strlen(keybuf);
@@ -222,8 +228,13 @@ udbexpand(a, sendq, aliaslevel, e)
#else
i = 0;
if (dbc == NULL &&
+# if DB_VERSION_MAJOR > 2 || DB_VERSION_MINOR >=6
+ (errno = (*up->udb_dbp->cursor)(up->udb_dbp,
+ NULL, &dbc, 0)) != 0)
+# else
(errno = (*up->udb_dbp->cursor)(up->udb_dbp,
NULL, &dbc)) != 0)
+# endif
i = -1;
if (i != 0 || dbc == NULL ||
(errno = dbc->c_get(dbc, &key,
@@ -892,8 +903,8 @@ _udbx_init(e)
register struct hostent *h;
char *mxhosts[MAXMXHOSTS + 1];
# endif
- struct option opts[MAXUDBOPTS + 1];
- extern int _udb_parsespec __P((char *, struct option [], int));
+ struct udb_option opts[MAXUDBOPTS + 1];
+ extern int _udb_parsespec __P((char *, struct udb_option [], int));
while (*p == ' ' || *p == '\t' || *p == ',')
p++;
@@ -972,6 +983,7 @@ _udbx_init(e)
if (h == NULL)
continue;
up->udb_type = UDB_REMOTE;
+ up->udb_pid = getpid();
up->udb_addr.sin_family = h->h_addrtype;
bcopy(h->h_addr_list[0],
(char *) &up->udb_addr.sin_addr,
@@ -993,6 +1005,7 @@ _udbx_init(e)
case '@': /* forward to remote host */
up->udb_type = UDB_FORWARD;
+ up->udb_pid = getpid();
up->udb_fwdhost = spec + 1;
ents++;
up++;
@@ -1004,6 +1017,7 @@ _udbx_init(e)
if (strcasecmp(spec, "hesiod") != 0)
goto badspec;
up->udb_type = UDB_HESIOD;
+ up->udb_pid = getpid();
ents++;
up++;
break;
@@ -1066,7 +1080,17 @@ _udbx_init(e)
free(up->udb_dbname);
break;
}
+ if (tTd(28, 1))
+ {
+#if DB_VERSION_MAJOR < 2
+ printf("_udbx_init: dbopen(%s)\n",
+#else
+ printf("_udbx_init: db_open(%s)\n",
+#endif
+ up->udb_dbname);
+ }
up->udb_type = UDB_DBFETCH;
+ up->udb_pid = getpid();
ents++;
up++;
break;
@@ -1138,6 +1162,15 @@ badspec:
#else
errno = (*up->udb_dbp->close)(up->udb_dbp, 0);
#endif
+ if (tTd(28, 1))
+ {
+#if DB_VERSION_MAJOR < 2
+ printf("_udbx_init: db->close(%s)\n",
+#else
+ printf("_udbx_init: db->close(%s)\n",
+#endif
+ up->udb_dbname);
+ }
}
}
#endif
@@ -1147,7 +1180,7 @@ badspec:
int
_udb_parsespec(udbspec, opt, maxopts)
char *udbspec;
- struct option opt[];
+ struct udb_option opt[];
int maxopts;
{
register char *spec;
@@ -1173,6 +1206,52 @@ _udb_parsespec(udbspec, opt, maxopts)
}
return optnum;
}
+ /*
+** _UDBX_CLOSE -- close all file based UDB entries.
+**
+** Parameters:
+** none
+**
+** Returns:
+** none
+*/
+void
+_udbx_close()
+{
+ pid_t pid;
+ struct udbent *up;
+
+ if (!UdbInitialized)
+ return;
+
+ pid = getpid();
+
+ for (up = UdbEnts; up->udb_type != UDB_EOLIST; up++)
+ {
+ if (up->udb_pid != pid)
+ continue;
+
+#ifdef NEWDB
+ if (up->udb_type == UDB_DBFETCH)
+ {
+#if DB_VERSION_MAJOR < 2
+ (*up->udb_dbp->close)(up->udb_dbp);
+#else
+ errno = (*up->udb_dbp->close)(up->udb_dbp, 0);
+#endif
+ }
+ if (tTd(28, 1))
+ {
+#if DB_VERSION_MAJOR < 2
+ printf("_udbx_init: db->close(%s)\n",
+#else
+ printf("_udbx_init: db->close(%s)\n",
+#endif
+ up->udb_dbname);
+ }
+#endif
+ }
+}
#ifdef HESIOD
diff --git a/contrib/sendmail/src/useful.h b/contrib/sendmail/src/useful.h
index 2a283ab7b8be..a19dd9e0305d 100644
--- a/contrib/sendmail/src/useful.h
+++ b/contrib/sendmail/src/useful.h
@@ -9,7 +9,7 @@
* the sendmail distribution.
*
*
- * @(#)useful.h 8.12 (Berkeley) 5/19/98
+ * @(#)useful.h 8.12 (Berkeley) 5/19/1998
*/
# include <sys/types.h>
diff --git a/contrib/sendmail/src/usersmtp.c b/contrib/sendmail/src/usersmtp.c
index 23e4d0256933..99ea64696f03 100644
--- a/contrib/sendmail/src/usersmtp.c
+++ b/contrib/sendmail/src/usersmtp.c
@@ -14,9 +14,9 @@
#ifndef lint
#if SMTP
-static char sccsid[] = "@(#)usersmtp.c 8.104 (Berkeley) 6/30/98 (with SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 8.108 (Berkeley) 10/6/1998 (with SMTP)";
#else
-static char sccsid[] = "@(#)usersmtp.c 8.104 (Berkeley) 6/30/98 (without SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 8.108 (Berkeley) 10/6/1998 (without SMTP)";
#endif
#endif /* not lint */
@@ -118,7 +118,7 @@ smtpinit(m, mci, e)
*/
SmtpPhase = mci->mci_phase = "client greeting";
- setproctitle("%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
+ sm_setproctitle(TRUE, "%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
r = reply(m, mci, e, TimeOuts.to_initial, esmtp_check);
if (r < 0)
goto tempfail1;
@@ -151,7 +151,7 @@ tryhelo:
smtpmessage("HELO %s", m, mci, MyHostName);
SmtpPhase = mci->mci_phase = "client HELO";
}
- setproctitle("%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
+ sm_setproctitle(TRUE, "%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
r = reply(m, mci, e, TimeOuts.to_helo, helo_options);
if (r < 0)
goto tempfail1;
@@ -439,7 +439,7 @@ smtpmailfrom(m, mci, e)
*bufp == '@' ? ',' : ':', bufp, optbuf);
}
SmtpPhase = mci->mci_phase = "client MAIL";
- setproctitle("%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
+ sm_setproctitle(TRUE, "%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
r = reply(m, mci, e, TimeOuts.to_mail, NULL);
if (r < 0)
{
@@ -580,7 +580,7 @@ smtprcpt(to, m, mci, e)
smtpmessage("RCPT To:<%s>%s", m, mci, to->q_user, optbuf);
SmtpPhase = mci->mci_phase = "client RCPT";
- setproctitle("%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
+ sm_setproctitle(TRUE, "%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
r = reply(m, mci, e, TimeOuts.to_rcpt, NULL);
to->q_rstatus = newstr(SmtpReplyBuffer);
to->q_status = smtptodsn(r);
@@ -661,7 +661,7 @@ smtpdata(m, mci, e)
/* send the command and check ok to proceed */
smtpmessage("DATA", m, mci);
SmtpPhase = mci->mci_phase = "client DATA 354";
- setproctitle("%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
+ sm_setproctitle(TRUE, "%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
r = reply(m, mci, e, TimeOuts.to_datainit, NULL);
if (r < 0 || REPLYTYPE(r) == 4)
{
@@ -741,7 +741,7 @@ smtpdata(m, mci, e)
/* check for the results of the transaction */
SmtpPhase = mci->mci_phase = "client DATA status";
- setproctitle("%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
+ sm_setproctitle(TRUE, "%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
if (bitnset(M_LMTP, m->m_flags))
return EX_OK;
r = reply(m, mci, e, TimeOuts.to_datafinal, NULL);
@@ -974,7 +974,6 @@ reply(m, mci, e, timeout, pfunc)
for (;;)
{
register char *p;
- extern time_t curtime __P((void));
/* actually do the read */
if (e->e_xfp != NULL)
@@ -1008,7 +1007,10 @@ reply(m, mci, e, timeout, pfunc)
oldholderrs = HoldErrs;
HoldErrs = TRUE;
usrerr("451 reply: read error from %s", CurHostName);
- mci_setstat(mci, EX_TEMPFAIL, "4.4.2", MsgBuf);
+
+ /* errors on QUIT should not be persistent */
+ if (strncmp(SmtpMsgBuffer, "QUIT", 4) != 0)
+ mci_setstat(mci, EX_TEMPFAIL, "4.4.2", MsgBuf);
/* if debugging, pause so we can see state */
if (tTd(18, 100))
@@ -1032,7 +1034,8 @@ reply(m, mci, e, timeout, pfunc)
wbufleft -= plen;
}
snprintf(p, wbufleft, "reply(%.100s) during %s",
- CurHostName, SmtpPhase);
+ CurHostName == NULL ? "NO_HOST" : CurHostName,
+ SmtpPhase);
checkfd012(wbuf);
}
#endif
diff --git a/contrib/sendmail/src/util.c b/contrib/sendmail/src/util.c
index ba35dcd9531c..785d36269eb9 100644
--- a/contrib/sendmail/src/util.c
+++ b/contrib/sendmail/src/util.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)util.c 8.159 (Berkeley) 7/1/98";
+static char sccsid[] = "@(#)util.c 8.167 (Berkeley) 12/1/1998";
#endif /* not lint */
# include "sendmail.h"
@@ -174,6 +174,182 @@ rfc822_string(s)
return TRUE;
}
/*
+** SHORTEN_RFC822_STRING -- Truncate and rebalance an RFC822 string
+**
+** Arbitratily shorten (in place) an RFC822 string and rebalance
+** comments and quotes.
+**
+** Parameters:
+** string -- the string to shorten
+** length -- the maximum size, 0 if no maximum
+**
+** Returns:
+** TRUE if string is changed, FALSE otherwise
+**
+** Side Effects:
+** Changes string in place, possibly resulting
+** in a shorter string.
+*/
+
+bool
+shorten_rfc822_string(string, length)
+ char *string;
+ size_t length;
+{
+ bool backslash = FALSE;
+ bool modified = FALSE;
+ bool quoted = FALSE;
+ size_t slen;
+ int parencount = 0;
+ char *ptr = string;
+
+ /*
+ ** If have to rebalance an already short enough string,
+ ** need to do it within allocated space.
+ */
+ slen = strlen(string);
+ if (length == 0 || slen < length)
+ length = slen;
+
+ while (*ptr != '\0')
+ {
+ if (backslash)
+ {
+ backslash = FALSE;
+ goto increment;
+ }
+
+ if (*ptr == '\\')
+ backslash = TRUE;
+ else if (*ptr == '(')
+ {
+ if (!quoted)
+ parencount++;
+ }
+ else if (*ptr == ')')
+ {
+ if (--parencount < 0)
+ parencount = 0;
+ }
+
+ /* Inside a comment, quotes don't matter */
+ if (parencount <= 0 && *ptr == '"')
+ quoted = !quoted;
+
+increment:
+ /* Check for sufficient space for next character */
+ if (length - (ptr - string) <= ((backslash ? 1 : 0) +
+ parencount +
+ (quoted ? 1 : 0)))
+ {
+ /* Not enough, backtrack */
+ if (*ptr == '\\')
+ backslash = FALSE;
+ else if (*ptr == '(' && !quoted)
+ parencount--;
+ else if (*ptr == '"' && parencount == 0)
+ quoted = FALSE;
+ break;
+ }
+ ptr++;
+ }
+
+ /* Rebalance */
+ while (parencount-- > 0)
+ {
+ if (*ptr != ')')
+ {
+ modified = TRUE;
+ *ptr = ')';
+ }
+ ptr++;
+ }
+ if (quoted)
+ {
+ if (*ptr != '"')
+ {
+ modified = TRUE;
+ *ptr = '"';
+ }
+ ptr++;
+ }
+ if (*ptr != '\0')
+ {
+ modified = TRUE;
+ *ptr = '\0';
+ }
+ return modified;
+}
+ /*
+** FIND_CHARACTER -- find an unquoted character in an RFC822 string
+**
+** Find an unquoted, non-commented character in an RFC822
+** string and return a pointer to its location in the
+** string.
+**
+** Parameters:
+** string -- the string to search
+** character -- the character to find
+**
+** Returns:
+** pointer to the character, or
+** a pointer to the end of the line if character is not found
+*/
+
+char *
+find_character(string, character)
+ char *string;
+ char character;
+{
+ bool backslash = FALSE;
+ bool quoted = FALSE;
+ int parencount = 0;
+
+ while (string != NULL && *string != '\0')
+ {
+ if (backslash)
+ {
+ backslash = FALSE;
+ if (!quoted && character == '\\' && *string == '\\')
+ break;
+ string++;
+ continue;
+ }
+ switch (*string)
+ {
+ case '\\':
+ backslash = TRUE;
+ break;
+
+ case '(':
+ if (!quoted)
+ parencount++;
+ break;
+
+ case ')':
+ if (--parencount < 0)
+ parencount = 0;
+ break;
+ }
+
+ /* Inside a comment, nothing matters */
+ if (parencount > 0)
+ {
+ string++;
+ continue;
+ }
+
+ if (*string == '"')
+ quoted = !quoted;
+ else if (*string == character && !quoted)
+ break;
+ string++;
+ }
+
+ /* Return pointer to the character */
+ return string;
+}
+ /*
** XALLOC -- Allocate memory and bitch wildly on failure.
**
** THIS IS A CLUDGE. This should be made to give a proper
@@ -1846,7 +2022,13 @@ path_is_dir(pathname, createflag)
** none
*/
-static pid_t *ProcListVec = NULL;
+struct procs
+{
+ pid_t proc_pid;
+ char *proc_task;
+};
+
+static struct procs *ProcListVec = NULL;
static int ProcListSize = 0;
#define NO_PID ((pid_t) 0)
@@ -1855,15 +2037,15 @@ static int ProcListSize = 0;
#endif
void
-proc_list_add(pid)
+proc_list_add(pid, task)
pid_t pid;
+ char *task;
{
int i;
- extern void proc_list_probe __P((void));
for (i = 0; i < ProcListSize; i++)
{
- if (ProcListVec[i] == NO_PID)
+ if (ProcListVec[i].proc_pid == NO_PID)
break;
}
if (i >= ProcListSize)
@@ -1874,29 +2056,66 @@ proc_list_add(pid)
/* now scan again */
for (i = 0; i < ProcListSize; i++)
{
- if (ProcListVec[i] == NO_PID)
+ if (ProcListVec[i].proc_pid == NO_PID)
break;
}
}
if (i >= ProcListSize)
{
/* grow process list */
- pid_t *npv;
+ struct procs *npv;
- npv = (pid_t *) xalloc(sizeof (pid_t) * (ProcListSize + PROC_LIST_SEG));
+ npv = (struct procs *) xalloc(sizeof (struct procs) * (ProcListSize + PROC_LIST_SEG));
if (ProcListSize > 0)
{
- bcopy(ProcListVec, npv, ProcListSize * sizeof (pid_t));
+ bcopy(ProcListVec, npv, ProcListSize *
+ sizeof (struct procs));
free(ProcListVec);
}
for (i = ProcListSize; i < ProcListSize + PROC_LIST_SEG; i++)
- npv[i] = NO_PID;
+ {
+ npv[i].proc_pid = NO_PID;
+ npv[i].proc_task = NULL;
+ }
i = ProcListSize;
ProcListSize += PROC_LIST_SEG;
ProcListVec = npv;
}
- ProcListVec[i] = pid;
- CurChildren++;
+ ProcListVec[i].proc_pid = pid;
+ ProcListVec[i].proc_task = newstr(task);
+
+ /* if process adding itself, it's not a child */
+ if (pid != getpid())
+ CurChildren++;
+}
+ /*
+** PROC_LIST_SET -- set pid task in process list
+**
+** Parameters:
+** pid -- pid to set
+** task -- task of pid
+**
+** Returns:
+** none.
+*/
+
+void
+proc_list_set(pid, task)
+ pid_t pid;
+ char *task;
+{
+ int i;
+
+ for (i = 0; i < ProcListSize; i++)
+ {
+ if (ProcListVec[i].proc_pid == pid)
+ {
+ if (ProcListVec[i].proc_task != NULL)
+ free(ProcListVec[i].proc_task);
+ ProcListVec[i].proc_task = newstr(task);
+ break;
+ }
+ }
}
/*
** PROC_LIST_DROP -- drop pid from process list
@@ -1916,9 +2135,14 @@ proc_list_drop(pid)
for (i = 0; i < ProcListSize; i++)
{
- if (ProcListVec[i] == pid)
+ if (ProcListVec[i].proc_pid == pid)
{
- ProcListVec[i] = NO_PID;
+ ProcListVec[i].proc_pid = NO_PID;
+ if (ProcListVec[i].proc_task != NULL)
+ {
+ free(ProcListVec[i].proc_task);
+ ProcListVec[i].proc_task = NULL;
+ }
break;
}
}
@@ -1940,8 +2164,16 @@ proc_list_clear()
{
int i;
- for (i = 0; i < ProcListSize; i++)
- ProcListVec[i] = NO_PID;
+ /* start from 1 since 0 is the daemon itself */
+ for (i = 1; i < ProcListSize; i++)
+ {
+ ProcListVec[i].proc_pid = NO_PID;
+ if (ProcListVec[i].proc_task != NULL)
+ {
+ free(ProcListVec[i].proc_task);
+ ProcListVec[i].proc_task = NULL;
+ }
+ }
CurChildren = 0;
}
/*
@@ -1959,17 +2191,23 @@ proc_list_probe()
{
int i;
- for (i = 0; i < ProcListSize; i++)
+ /* start from 1 since 0 is the daemon itself */
+ for (i = 1; i < ProcListSize; i++)
{
- if (ProcListVec[i] == NO_PID)
+ if (ProcListVec[i].proc_pid == NO_PID)
continue;
- if (kill(ProcListVec[i], 0) < 0)
+ if (kill(ProcListVec[i].proc_pid, 0) < 0)
{
if (LogLevel > 3)
sm_syslog(LOG_DEBUG, CurEnv->e_id,
"proc_list_probe: lost pid %d",
- ProcListVec[i]);
- ProcListVec[i] = NO_PID;
+ (int) ProcListVec[i].proc_pid);
+ ProcListVec[i].proc_pid = NO_PID;
+ if (ProcListVec[i].proc_task != NULL)
+ {
+ free(ProcListVec[i].proc_task);
+ ProcListVec[i].proc_task = NULL;
+ }
CurChildren--;
}
}
@@ -1977,6 +2215,35 @@ proc_list_probe()
CurChildren = 0;
}
/*
+** PROC_LIST_DISPLAY -- display the process list
+**
+** Parameters:
+** out -- output file pointer
+**
+** Returns:
+** none.
+*/
+
+void
+proc_list_display(out)
+ FILE *out;
+{
+ int i;
+
+ for (i = 0; i < ProcListSize; i++)
+ {
+ if (ProcListVec[i].proc_pid == NO_PID)
+ continue;
+
+ fprintf(out, "%d %s%s\n", (int) ProcListVec[i].proc_pid,
+ ProcListVec[i].proc_task != NULL ?
+ ProcListVec[i].proc_task : "(unknown)",
+ (OpMode == MD_SMTP ||
+ OpMode == MD_DAEMON ||
+ OpMode == MD_ARPAFTP) ? "\r" : "");
+ }
+}
+ /*
** SM_STRCASECMP -- 8-bit clean version of strcasecmp
**
** Thank you, vendors, for making this all necessary.
diff --git a/contrib/sendmail/src/version.c b/contrib/sendmail/src/version.c
index bf0b3918adc4..8e8707b7a9f5 100644
--- a/contrib/sendmail/src/version.c
+++ b/contrib/sendmail/src/version.c
@@ -11,7 +11,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)version.c 8.9.1.1 (Berkeley) 7/2/98";
+static char sccsid[] = "@(#)version.c 8.9.2.1 (Berkeley) 12/29/1998";
#endif /* not lint */
-char Version[] = "8.9.1";
+char Version[] = "8.9.2";
diff --git a/contrib/sendmail/test/Results b/contrib/sendmail/test/Results
index 3d930daa129d..e31a68bf9a25 100644
--- a/contrib/sendmail/test/Results
+++ b/contrib/sendmail/test/Results
@@ -60,6 +60,7 @@ Linux 0.99p14 OK 93.11.30 Christian Kuhtz <chk@data-hh.Hanse.DE>
Linux 1.0 OK 94.03.19 Shayne Smith <snsmith@rastus.brisnet.org.au>
Linux 1.2.13 OK 95.11.02 Sven Neuhaus <sven@ping.de>
Linux 2.0.17 OK 96.09.03 Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
+Linux 2.1.109 OK 98.07.21 John Kennedy <jk@csuchico.edu>
BSD/386 1.0 OK 93.11.13 Tony Sanders
@@ -81,6 +82,7 @@ Solaris 2.5.1 OK 96.11.29 Gregory Neil Shapiro <gshapiro@wpi.edu>
Linux 1.2.13 FAIL 95.11.02 Sven Neuhaus <sven@ping.de>
Linux 2.0.17 FAIL 96.09.03 Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
+Linux 2.1.109 FAIL 98.07.21 John Kennedy <jk@csuchico.edu>
AIX 4.1 OK 96.10.21 Hakan Lindholm <hakan@af.lu.se>