summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-01-01 20:34:09 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-01-01 20:34:09 +0000
commiteee2b4eb53e92b81e49de60573e674a396e7fabf (patch)
tree275b5f6fa0ac9e556790ec96876d3af0af4feaee
parent73ee31937b7b4ae7257f3dc1da71e8072d535784 (diff)
sendmail 8.9.2
-rw-r--r--usr.sbin/sendmail/BuildTools/M4/depend/BSD.m42
-rw-r--r--usr.sbin/sendmail/BuildTools/M4/depend/CC-M.m42
-rw-r--r--usr.sbin/sendmail/BuildTools/M4/depend/NCR.m42
-rw-r--r--usr.sbin/sendmail/BuildTools/M4/depend/Solaris.m42
-rw-r--r--usr.sbin/sendmail/BuildTools/M4/depend/X11.m42
-rw-r--r--usr.sbin/sendmail/BuildTools/M4/depend/generic.m42
-rw-r--r--usr.sbin/sendmail/BuildTools/M4/header.m42
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/386BSD2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/A-UX2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/AIX2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/AIX.22
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/AIX.4.24
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/AIX.4.34
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/AIX.4.x4
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/Altos2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/BSD-OS2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/BSD432
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/CLIX2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/CRAYT3E.2.0.x2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/CSOS2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/ConvexOS2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/Dell2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/DomainOS2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/DomainOS.10.42
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/Dynix2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/EWS-UX_V2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/FreeBSD2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/HP-UX2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/HP-UX.10.x2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/HP-UX.11.x2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/IRIX2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/IRIX.5.x2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/IRIX.6.52
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/IRIX.6.x2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/IRIX64.6.02
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/IRIX64.6.12
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/IRIX64.6.535
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/IRIX64.6.x2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/ISC2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/KSR2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/LUNA2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/Linux2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/Linux.ppc2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/Mach3862
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/NCR.MP-RAS.2.x2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/NCR.MP-RAS.3.x4
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/NEWS-OS.4.x2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/NEWS-OS.6.x2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/NEXTSTEP.4.x2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/NeXT.2.x2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/NeXT.3.x2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/NeXT.4.x4
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/NetBSD2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/NetBSD.8.32
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/NonStop-UX2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/OSF12
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/OpenBSD2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/PTX2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/Paragon2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/PowerUX2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/QNX2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/RISCos2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/RISCos.4_02
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/Rhapsody16
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/SCO2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/SCO.4.22
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/SCO.5.x2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/SINIX2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/SVR42
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/SunOS2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/SunOS.4.02
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/SunOS.5.12
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/SunOS.5.22
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/SunOS.5.32
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/SunOS.5.42
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/SunOS.5.52
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/SunOS.5.62
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/SunOS.5.72
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/Titan2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/ULTRIX4
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/UMAX2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/UNICOS2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/UNIX_SV.4.x.i3862
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/UX48002
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/UXPDS.V102
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/UXPDS.V202
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/UnixWare.5.i38618
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/dcosx.1.x.NILE2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/dgux2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/maxion2
-rw-r--r--usr.sbin/sendmail/BuildTools/OS/uts.systemV2
-rw-r--r--usr.sbin/sendmail/BuildTools/README2
-rw-r--r--usr.sbin/sendmail/BuildTools/Site/README2
-rw-r--r--usr.sbin/sendmail/BuildTools/bin/Build2
-rw-r--r--usr.sbin/sendmail/BuildTools/bin/configure.sh2
-rw-r--r--usr.sbin/sendmail/BuildTools/bin/find_m4.sh2
-rw-r--r--usr.sbin/sendmail/BuildTools/bin/install.sh2
-rw-r--r--usr.sbin/sendmail/KNOWNBUGS14
-rw-r--r--usr.sbin/sendmail/LICENSE2
-rw-r--r--usr.sbin/sendmail/Makefile.dist2
-rw-r--r--usr.sbin/sendmail/README14
-rw-r--r--usr.sbin/sendmail/RELEASE_NOTES180
-rw-r--r--usr.sbin/sendmail/cf/README89
-rw-r--r--usr.sbin/sendmail/cf/cf/Build2
-rw-r--r--usr.sbin/sendmail/cf/cf/Makefile4
-rw-r--r--usr.sbin/sendmail/cf/cf/chez.cs.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/clientproto.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/cs-hpux10.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/cs-hpux9.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/cs-osf1.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/cs-solaris2.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/cs-sunos4.1.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/cs-ultrix4.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/generic-bsd4.4.cf1054
-rw-r--r--usr.sbin/sendmail/cf/cf/generic-bsd4.4.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/generic-hpux10.cf1055
-rw-r--r--usr.sbin/sendmail/cf/cf/generic-hpux10.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/generic-hpux9.cf1055
-rw-r--r--usr.sbin/sendmail/cf/cf/generic-hpux9.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/generic-nextstep3.3.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/generic-osf1.cf1055
-rw-r--r--usr.sbin/sendmail/cf/cf/generic-osf1.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/generic-solaris2.cf1054
-rw-r--r--usr.sbin/sendmail/cf/cf/generic-solaris2.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/generic-sunos4.1.cf1055
-rw-r--r--usr.sbin/sendmail/cf/cf/generic-sunos4.1.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/generic-ultrix4.cf1055
-rw-r--r--usr.sbin/sendmail/cf/cf/generic-ultrix4.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/huginn.cs.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/knecht.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/mail.cs.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/mail.eecs.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/mailspool.cs.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/python.cs.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/s2k-osf1.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/s2k-ultrix4.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/tcpproto.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/ucbarpa.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/ucbvax.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/uucpproto.mc2
-rw-r--r--usr.sbin/sendmail/cf/cf/vangogh.cs.mc2
-rw-r--r--usr.sbin/sendmail/cf/domain/Berkeley.EDU.m42
-rw-r--r--usr.sbin/sendmail/cf/domain/CS.Berkeley.EDU.m42
-rw-r--r--usr.sbin/sendmail/cf/domain/EECS.Berkeley.EDU.m42
-rw-r--r--usr.sbin/sendmail/cf/domain/S2K.Berkeley.EDU.m42
-rw-r--r--usr.sbin/sendmail/cf/domain/berkeley-only.m42
-rw-r--r--usr.sbin/sendmail/cf/domain/generic.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/accept_unqualified_senders.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/accept_unresolvable_domains.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/access_db.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/allmasquerade.m434
-rw-r--r--usr.sbin/sendmail/cf/feature/always_add_domain.m434
-rw-r--r--usr.sbin/sendmail/cf/feature/bestmx_is_local.m44
-rw-r--r--usr.sbin/sendmail/cf/feature/bitdomain.m449
-rw-r--r--usr.sbin/sendmail/cf/feature/blacklist_recipients.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/domaintable.m441
-rw-r--r--usr.sbin/sendmail/cf/feature/genericstable.m48
-rw-r--r--usr.sbin/sendmail/cf/feature/limited_masquerade.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/local_lmtp.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/local_procmail.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/loose_relay_check.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/mailertable.m440
-rw-r--r--usr.sbin/sendmail/cf/feature/masquerade_entire_domain.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/masquerade_envelope.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/nocanonify.m434
-rw-r--r--usr.sbin/sendmail/cf/feature/nodns.m437
-rw-r--r--usr.sbin/sendmail/cf/feature/notsticky.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/nouucp.m434
-rw-r--r--usr.sbin/sendmail/cf/feature/nullclient.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/promiscuous_relay.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/rbl.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/redirect.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/relay_based_on_MX.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/relay_entire_domain.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/relay_hosts_only.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/relay_local_from.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/smrsh.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/stickyhost.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/use_ct_file.m42
-rw-r--r--usr.sbin/sendmail/cf/feature/use_cw_file.m434
-rw-r--r--usr.sbin/sendmail/cf/feature/uucpdomain.m449
-rw-r--r--usr.sbin/sendmail/cf/feature/virtusertable.m48
-rw-r--r--usr.sbin/sendmail/cf/hack/cssubdomain.m434
-rw-r--r--usr.sbin/sendmail/cf/m4/cf.m42
-rw-r--r--usr.sbin/sendmail/cf/m4/cfhead.m46
-rw-r--r--usr.sbin/sendmail/cf/m4/nullrelay.m42
-rw-r--r--usr.sbin/sendmail/cf/m4/proto.m4121
-rw-r--r--usr.sbin/sendmail/cf/m4/version.m44
-rw-r--r--usr.sbin/sendmail/cf/mailer/cyrus.m42
-rw-r--r--usr.sbin/sendmail/cf/mailer/fax.m42
-rw-r--r--usr.sbin/sendmail/cf/mailer/local.m42
-rw-r--r--usr.sbin/sendmail/cf/mailer/mail11.m42
-rw-r--r--usr.sbin/sendmail/cf/mailer/phquery.m42
-rw-r--r--usr.sbin/sendmail/cf/mailer/pop.m42
-rw-r--r--usr.sbin/sendmail/cf/mailer/procmail.m42
-rw-r--r--usr.sbin/sendmail/cf/mailer/smtp.m42
-rw-r--r--usr.sbin/sendmail/cf/mailer/usenet.m42
-rw-r--r--usr.sbin/sendmail/cf/mailer/uucp.m42
-rw-r--r--usr.sbin/sendmail/cf/ostype/aix2.m42
-rw-r--r--usr.sbin/sendmail/cf/ostype/aix3.m42
-rw-r--r--usr.sbin/sendmail/cf/ostype/aix4.m42
-rw-r--r--usr.sbin/sendmail/cf/ostype/altos.m46
-rw-r--r--usr.sbin/sendmail/cf/ostype/amdahl-uts.m48
-rw-r--r--usr.sbin/sendmail/cf/ostype/aux.m46
-rw-r--r--usr.sbin/sendmail/cf/ostype/bsd4.3.m42
-rw-r--r--usr.sbin/sendmail/cf/ostype/bsd4.4.m46
-rw-r--r--usr.sbin/sendmail/cf/ostype/bsdi1.0.m42
-rw-r--r--usr.sbin/sendmail/cf/ostype/bsdi2.0.m42
-rw-r--r--usr.sbin/sendmail/cf/ostype/dgux.m42
-rw-r--r--usr.sbin/sendmail/cf/ostype/domainos.m46
-rw-r--r--usr.sbin/sendmail/cf/ostype/dynix3.2.m44
-rw-r--r--usr.sbin/sendmail/cf/ostype/gnuhurd.m46
-rw-r--r--usr.sbin/sendmail/cf/ostype/hpux10.m46
-rw-r--r--usr.sbin/sendmail/cf/ostype/hpux9.m46
-rw-r--r--usr.sbin/sendmail/cf/ostype/irix4.m46
-rw-r--r--usr.sbin/sendmail/cf/ostype/irix5.m48
-rw-r--r--usr.sbin/sendmail/cf/ostype/irix6.m48
-rw-r--r--usr.sbin/sendmail/cf/ostype/isc4.1.m48
-rw-r--r--usr.sbin/sendmail/cf/ostype/linux.m42
-rw-r--r--usr.sbin/sendmail/cf/ostype/maxion.m48
-rw-r--r--usr.sbin/sendmail/cf/ostype/mklinux.m44
-rw-r--r--usr.sbin/sendmail/cf/ostype/nextstep.m48
-rw-r--r--usr.sbin/sendmail/cf/ostype/osf1.m48
-rw-r--r--usr.sbin/sendmail/cf/ostype/powerux.m46
-rw-r--r--usr.sbin/sendmail/cf/ostype/ptx2.m48
-rw-r--r--usr.sbin/sendmail/cf/ostype/qnx.m44
-rw-r--r--usr.sbin/sendmail/cf/ostype/riscos4.5.m46
-rw-r--r--usr.sbin/sendmail/cf/ostype/sco-uw-2.1.m48
-rw-r--r--usr.sbin/sendmail/cf/ostype/sco3.2.m46
-rw-r--r--usr.sbin/sendmail/cf/ostype/sinix.m48
-rw-r--r--usr.sbin/sendmail/cf/ostype/solaris2.m48
-rw-r--r--usr.sbin/sendmail/cf/ostype/solaris2.ml.m48
-rw-r--r--usr.sbin/sendmail/cf/ostype/sunos3.5.m42
-rw-r--r--usr.sbin/sendmail/cf/ostype/sunos4.1.m42
-rw-r--r--usr.sbin/sendmail/cf/ostype/svr4.m48
-rw-r--r--usr.sbin/sendmail/cf/ostype/ultrix4.m42
-rw-r--r--usr.sbin/sendmail/cf/ostype/unixware7.m416
-rw-r--r--usr.sbin/sendmail/cf/ostype/unknown.m42
-rw-r--r--usr.sbin/sendmail/cf/ostype/uxpds.m48
-rw-r--r--usr.sbin/sendmail/cf/sh/makeinfo.sh2
-rw-r--r--usr.sbin/sendmail/doc/changes/Makefile2
-rw-r--r--usr.sbin/sendmail/doc/changes/changes.me2
-rw-r--r--usr.sbin/sendmail/doc/intro/Makefile2
-rw-r--r--usr.sbin/sendmail/doc/intro/intro.me34
-rw-r--r--usr.sbin/sendmail/doc/op/Makefile2
-rw-r--r--usr.sbin/sendmail/doc/op/op.me44
-rw-r--r--usr.sbin/sendmail/doc/usenix/Makefile2
-rw-r--r--usr.sbin/sendmail/doc/usenix/usenix.me2
-rw-r--r--usr.sbin/sendmail/mailstats/Makefile.m46
-rw-r--r--usr.sbin/sendmail/mailstats/mailstats.818
-rw-r--r--usr.sbin/sendmail/mailstats/mailstats.c60
-rw-r--r--usr.sbin/sendmail/makemap/Makefile.m46
-rw-r--r--usr.sbin/sendmail/makemap/makemap.814
-rw-r--r--usr.sbin/sendmail/makemap/makemap.c85
-rw-r--r--usr.sbin/sendmail/praliases/Makefile.m46
-rw-r--r--usr.sbin/sendmail/praliases/praliases.12
-rw-r--r--usr.sbin/sendmail/praliases/praliases.c237
-rw-r--r--usr.sbin/sendmail/smrsh/Makefile.m46
-rw-r--r--usr.sbin/sendmail/smrsh/README2
-rw-r--r--usr.sbin/sendmail/smrsh/smrsh.82
-rw-r--r--usr.sbin/sendmail/smrsh/smrsh.c2
-rw-r--r--usr.sbin/sendmail/src/Makefile8
-rw-r--r--usr.sbin/sendmail/src/Makefile.m411
-rw-r--r--usr.sbin/sendmail/src/README17
-rw-r--r--usr.sbin/sendmail/src/TRACEFLAGS2
-rw-r--r--usr.sbin/sendmail/src/alias.c5
-rw-r--r--usr.sbin/sendmail/src/aliases.52
-rw-r--r--usr.sbin/sendmail/src/arpadate.c2
-rw-r--r--usr.sbin/sendmail/src/clock.c2
-rw-r--r--usr.sbin/sendmail/src/collect.c14
-rw-r--r--usr.sbin/sendmail/src/conf.c267
-rw-r--r--usr.sbin/sendmail/src/conf.h97
-rw-r--r--usr.sbin/sendmail/src/control.c356
-rw-r--r--usr.sbin/sendmail/src/convtime.c2
-rw-r--r--usr.sbin/sendmail/src/daemon.c177
-rw-r--r--usr.sbin/sendmail/src/deliver.c53
-rw-r--r--usr.sbin/sendmail/src/domain.c14
-rw-r--r--usr.sbin/sendmail/src/envelope.c4
-rw-r--r--usr.sbin/sendmail/src/err.c2
-rw-r--r--usr.sbin/sendmail/src/headers.c30
-rw-r--r--usr.sbin/sendmail/src/ldap_map.h4
-rw-r--r--usr.sbin/sendmail/src/macro.c6
-rw-r--r--usr.sbin/sendmail/src/mailq.12
-rw-r--r--usr.sbin/sendmail/src/mailstats.h41
-rw-r--r--usr.sbin/sendmail/src/main.c144
-rw-r--r--usr.sbin/sendmail/src/makesendmail2
-rw-r--r--usr.sbin/sendmail/src/map.c189
-rw-r--r--usr.sbin/sendmail/src/mci.c12
-rw-r--r--usr.sbin/sendmail/src/mime.c23
-rw-r--r--usr.sbin/sendmail/src/newaliases.12
-rw-r--r--usr.sbin/sendmail/src/parseaddr.c18
-rw-r--r--usr.sbin/sendmail/src/pathnames.h2
-rw-r--r--usr.sbin/sendmail/src/queue.c47
-rw-r--r--usr.sbin/sendmail/src/readcf.c53
-rw-r--r--usr.sbin/sendmail/src/recipient.c18
-rw-r--r--usr.sbin/sendmail/src/safefile.c16
-rw-r--r--usr.sbin/sendmail/src/savemail.c5
-rw-r--r--usr.sbin/sendmail/src/sendmail.87
-rw-r--r--usr.sbin/sendmail/src/sendmail.h23
-rw-r--r--usr.sbin/sendmail/src/sendmail.hf7
-rw-r--r--usr.sbin/sendmail/src/snprintf.c12
-rw-r--r--usr.sbin/sendmail/src/srvrsmtp.c52
-rw-r--r--usr.sbin/sendmail/src/stab.c2
-rw-r--r--usr.sbin/sendmail/src/stats.c2
-rw-r--r--usr.sbin/sendmail/src/sysexits.c2
-rw-r--r--usr.sbin/sendmail/src/trace.c2
-rw-r--r--usr.sbin/sendmail/src/udb.c99
-rw-r--r--usr.sbin/sendmail/src/useful.h2
-rw-r--r--usr.sbin/sendmail/src/usersmtp.c25
-rw-r--r--usr.sbin/sendmail/src/util.c139
-rw-r--r--usr.sbin/sendmail/src/version.c4
-rw-r--r--usr.sbin/sendmail/test/Results2
312 files changed, 10174 insertions, 1291 deletions
diff --git a/usr.sbin/sendmail/BuildTools/M4/depend/BSD.m4 b/usr.sbin/sendmail/BuildTools/M4/depend/BSD.m4
index 661f69ec12e..83827a7a7f6 100644
--- a/usr.sbin/sendmail/BuildTools/M4/depend/BSD.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/M4/depend/CC-M.m4 b/usr.sbin/sendmail/BuildTools/M4/depend/CC-M.m4
index 01d82662b1b..10d61b8cceb 100644
--- a/usr.sbin/sendmail/BuildTools/M4/depend/CC-M.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/M4/depend/NCR.m4 b/usr.sbin/sendmail/BuildTools/M4/depend/NCR.m4
index 03e0c10dd38..22af77da8b5 100644
--- a/usr.sbin/sendmail/BuildTools/M4/depend/NCR.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/M4/depend/Solaris.m4 b/usr.sbin/sendmail/BuildTools/M4/depend/Solaris.m4
index cbdc618abfc..bf245f6fa19 100644
--- a/usr.sbin/sendmail/BuildTools/M4/depend/Solaris.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/M4/depend/X11.m4 b/usr.sbin/sendmail/BuildTools/M4/depend/X11.m4
index 27f90361f4c..3afbfe95d82 100644
--- a/usr.sbin/sendmail/BuildTools/M4/depend/X11.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/M4/depend/generic.m4 b/usr.sbin/sendmail/BuildTools/M4/depend/generic.m4
index e7452d9e329..330d4cf2e07 100644
--- a/usr.sbin/sendmail/BuildTools/M4/depend/generic.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/M4/header.m4 b/usr.sbin/sendmail/BuildTools/M4/header.m4
index df216bb9671..087cf0e48dc 100644
--- a/usr.sbin/sendmail/BuildTools/M4/header.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/386BSD b/usr.sbin/sendmail/BuildTools/OS/386BSD
index 34af745c8a5..cb6ea87a796 100644
--- a/usr.sbin/sendmail/BuildTools/OS/386BSD
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/A-UX b/usr.sbin/sendmail/BuildTools/OS/A-UX
index 782106d7e15..3a23f367d68 100644
--- a/usr.sbin/sendmail/BuildTools/OS/A-UX
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/AIX b/usr.sbin/sendmail/BuildTools/OS/AIX
index ebf1f123262..03d8407a12b 100644
--- a/usr.sbin/sendmail/BuildTools/OS/AIX
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/AIX.2 b/usr.sbin/sendmail/BuildTools/OS/AIX.2
index 3838e893631..8cec811f59c 100644
--- a/usr.sbin/sendmail/BuildTools/OS/AIX.2
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/AIX.4.2 b/usr.sbin/sendmail/BuildTools/OS/AIX.4.2
index e302f5a1136..3e1be252ae6 100644
--- a/usr.sbin/sendmail/BuildTools/OS/AIX.4.2
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/AIX.4.3 b/usr.sbin/sendmail/BuildTools/OS/AIX.4.3
index 75a4272f04b..00688c6e903 100644
--- a/usr.sbin/sendmail/BuildTools/OS/AIX.4.3
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/AIX.4.x b/usr.sbin/sendmail/BuildTools/OS/AIX.4.x
index f08bfcb4a35..a427d07860d 100644
--- a/usr.sbin/sendmail/BuildTools/OS/AIX.4.x
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/Altos b/usr.sbin/sendmail/BuildTools/OS/Altos
index 9c1f301d18d..9865f9a14ec 100644
--- a/usr.sbin/sendmail/BuildTools/OS/Altos
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/BSD-OS b/usr.sbin/sendmail/BuildTools/OS/BSD-OS
index 58586dd596f..67a6243ddd0 100644
--- a/usr.sbin/sendmail/BuildTools/OS/BSD-OS
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/BSD43 b/usr.sbin/sendmail/BuildTools/OS/BSD43
index 1bbccea2c7f..6a04bef287c 100644
--- a/usr.sbin/sendmail/BuildTools/OS/BSD43
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/CLIX b/usr.sbin/sendmail/BuildTools/OS/CLIX
index 69f422965bb..35b67a69752 100644
--- a/usr.sbin/sendmail/BuildTools/OS/CLIX
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/CRAYT3E.2.0.x b/usr.sbin/sendmail/BuildTools/OS/CRAYT3E.2.0.x
index 6f5abb5de39..4455e51ec81 100644
--- a/usr.sbin/sendmail/BuildTools/OS/CRAYT3E.2.0.x
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/CSOS b/usr.sbin/sendmail/BuildTools/OS/CSOS
index 3a995c9496f..e39218efe8c 100644
--- a/usr.sbin/sendmail/BuildTools/OS/CSOS
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/ConvexOS b/usr.sbin/sendmail/BuildTools/OS/ConvexOS
index 8ea990c6e66..cdb81eb901c 100644
--- a/usr.sbin/sendmail/BuildTools/OS/ConvexOS
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/Dell b/usr.sbin/sendmail/BuildTools/OS/Dell
index 2b9c1ea44a1..55fc0517946 100644
--- a/usr.sbin/sendmail/BuildTools/OS/Dell
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/DomainOS b/usr.sbin/sendmail/BuildTools/OS/DomainOS
index ee6be2726b8..06b1e3825ca 100644
--- a/usr.sbin/sendmail/BuildTools/OS/DomainOS
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/DomainOS.10.4 b/usr.sbin/sendmail/BuildTools/OS/DomainOS.10.4
index a92051b6bef..c8a4acf06d2 100644
--- a/usr.sbin/sendmail/BuildTools/OS/DomainOS.10.4
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/Dynix b/usr.sbin/sendmail/BuildTools/OS/Dynix
index 2781e49d1c1..0da6fb583c2 100644
--- a/usr.sbin/sendmail/BuildTools/OS/Dynix
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/EWS-UX_V b/usr.sbin/sendmail/BuildTools/OS/EWS-UX_V
index bf11275a2cd..7875fdce7f4 100644
--- a/usr.sbin/sendmail/BuildTools/OS/EWS-UX_V
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/FreeBSD b/usr.sbin/sendmail/BuildTools/OS/FreeBSD
index bec2c599060..baede69c7d7 100644
--- a/usr.sbin/sendmail/BuildTools/OS/FreeBSD
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/HP-UX b/usr.sbin/sendmail/BuildTools/OS/HP-UX
index 66d71a45eed..2ba83c9b5dd 100644
--- a/usr.sbin/sendmail/BuildTools/OS/HP-UX
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/HP-UX.10.x b/usr.sbin/sendmail/BuildTools/OS/HP-UX.10.x
index a4b3a816048..5deacd0eaea 100644
--- a/usr.sbin/sendmail/BuildTools/OS/HP-UX.10.x
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/HP-UX.11.x b/usr.sbin/sendmail/BuildTools/OS/HP-UX.11.x
index 9e13c58e979..1717430a061 100644
--- a/usr.sbin/sendmail/BuildTools/OS/HP-UX.11.x
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/IRIX b/usr.sbin/sendmail/BuildTools/OS/IRIX
index dafbda6a5fb..ed5e3e23380 100644
--- a/usr.sbin/sendmail/BuildTools/OS/IRIX
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/IRIX.5.x b/usr.sbin/sendmail/BuildTools/OS/IRIX.5.x
index 4ac44c29aea..6d492a29c64 100644
--- a/usr.sbin/sendmail/BuildTools/OS/IRIX.5.x
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/IRIX.6.5 b/usr.sbin/sendmail/BuildTools/OS/IRIX.6.5
index 3056ff44912..1b34f2e6e6d 100644
--- a/usr.sbin/sendmail/BuildTools/OS/IRIX.6.5
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/IRIX.6.x b/usr.sbin/sendmail/BuildTools/OS/IRIX.6.x
index c52fd4ea41d..0424933da9b 100644
--- a/usr.sbin/sendmail/BuildTools/OS/IRIX.6.x
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/IRIX64.6.0 b/usr.sbin/sendmail/BuildTools/OS/IRIX64.6.0
index 5226bb535c5..e8b2e3a82f6 100644
--- a/usr.sbin/sendmail/BuildTools/OS/IRIX64.6.0
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/IRIX64.6.1 b/usr.sbin/sendmail/BuildTools/OS/IRIX64.6.1
index 4876a8807a4..1183766b1ea 100644
--- a/usr.sbin/sendmail/BuildTools/OS/IRIX64.6.1
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/IRIX64.6.5 b/usr.sbin/sendmail/BuildTools/OS/IRIX64.6.5
new file mode 100644
index 00000000000..d0281f5c070
--- /dev/null
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/IRIX64.6.x b/usr.sbin/sendmail/BuildTools/OS/IRIX64.6.x
index 503df04b42c..f105edf8ff4 100644
--- a/usr.sbin/sendmail/BuildTools/OS/IRIX64.6.x
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/ISC b/usr.sbin/sendmail/BuildTools/OS/ISC
index f07093f660b..58b8b78aabc 100644
--- a/usr.sbin/sendmail/BuildTools/OS/ISC
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/KSR b/usr.sbin/sendmail/BuildTools/OS/KSR
index d3931a46405..9169cba6143 100644
--- a/usr.sbin/sendmail/BuildTools/OS/KSR
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/LUNA b/usr.sbin/sendmail/BuildTools/OS/LUNA
index 2a0fe1d78c2..e4637c9f72d 100644
--- a/usr.sbin/sendmail/BuildTools/OS/LUNA
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/Linux b/usr.sbin/sendmail/BuildTools/OS/Linux
index e908c478a94..306c9efce75 100644
--- a/usr.sbin/sendmail/BuildTools/OS/Linux
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/Linux.ppc b/usr.sbin/sendmail/BuildTools/OS/Linux.ppc
index d2c3cafa7ca..e0712e37283 100644
--- a/usr.sbin/sendmail/BuildTools/OS/Linux.ppc
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/Mach386 b/usr.sbin/sendmail/BuildTools/OS/Mach386
index 98147812046..7ff806e445b 100644
--- a/usr.sbin/sendmail/BuildTools/OS/Mach386
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/NCR.MP-RAS.2.x b/usr.sbin/sendmail/BuildTools/OS/NCR.MP-RAS.2.x
index 74d73340167..bd76038a975 100644
--- a/usr.sbin/sendmail/BuildTools/OS/NCR.MP-RAS.2.x
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/NCR.MP-RAS.3.x b/usr.sbin/sendmail/BuildTools/OS/NCR.MP-RAS.3.x
index 14e02e3ab05..7af96677d88 100644
--- a/usr.sbin/sendmail/BuildTools/OS/NCR.MP-RAS.3.x
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/NEWS-OS.4.x b/usr.sbin/sendmail/BuildTools/OS/NEWS-OS.4.x
index 4fa83bbb7c4..71aa4d46b31 100644
--- a/usr.sbin/sendmail/BuildTools/OS/NEWS-OS.4.x
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/NEWS-OS.6.x b/usr.sbin/sendmail/BuildTools/OS/NEWS-OS.6.x
index dec79b5e9ec..4e5c809642d 100644
--- a/usr.sbin/sendmail/BuildTools/OS/NEWS-OS.6.x
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/NEXTSTEP.4.x b/usr.sbin/sendmail/BuildTools/OS/NEXTSTEP.4.x
index 4fd6b038608..b77581378d1 100644
--- a/usr.sbin/sendmail/BuildTools/OS/NEXTSTEP.4.x
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/NeXT.2.x b/usr.sbin/sendmail/BuildTools/OS/NeXT.2.x
index d8f46949504..0a9d918318f 100644
--- a/usr.sbin/sendmail/BuildTools/OS/NeXT.2.x
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/NeXT.3.x b/usr.sbin/sendmail/BuildTools/OS/NeXT.3.x
index 05aad6f85a5..f5e313dd851 100644
--- a/usr.sbin/sendmail/BuildTools/OS/NeXT.3.x
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/NeXT.4.x b/usr.sbin/sendmail/BuildTools/OS/NeXT.4.x
index 35f3bdb35e5..8736b74f327 100644
--- a/usr.sbin/sendmail/BuildTools/OS/NeXT.4.x
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/NetBSD b/usr.sbin/sendmail/BuildTools/OS/NetBSD
index 595fd2df289..cd800ef3d95 100644
--- a/usr.sbin/sendmail/BuildTools/OS/NetBSD
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/NetBSD.8.3 b/usr.sbin/sendmail/BuildTools/OS/NetBSD.8.3
index 6576660f44e..714de1e6fba 100644
--- a/usr.sbin/sendmail/BuildTools/OS/NetBSD.8.3
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/NonStop-UX b/usr.sbin/sendmail/BuildTools/OS/NonStop-UX
index 02bdb7801d4..6ccdead5e48 100644
--- a/usr.sbin/sendmail/BuildTools/OS/NonStop-UX
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/OSF1 b/usr.sbin/sendmail/BuildTools/OS/OSF1
index cc65dbc7844..75fecfe93c6 100644
--- a/usr.sbin/sendmail/BuildTools/OS/OSF1
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/OpenBSD b/usr.sbin/sendmail/BuildTools/OS/OpenBSD
index fb7bc8f42c3..423ab2d6463 100644
--- a/usr.sbin/sendmail/BuildTools/OS/OpenBSD
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/PTX b/usr.sbin/sendmail/BuildTools/OS/PTX
index 9af372792a8..7dd05eecc18 100644
--- a/usr.sbin/sendmail/BuildTools/OS/PTX
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/Paragon b/usr.sbin/sendmail/BuildTools/OS/Paragon
index e16e051f734..868780f6653 100644
--- a/usr.sbin/sendmail/BuildTools/OS/Paragon
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/PowerUX b/usr.sbin/sendmail/BuildTools/OS/PowerUX
index b0f133d0a8c..47ab87c66b3 100644
--- a/usr.sbin/sendmail/BuildTools/OS/PowerUX
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/QNX b/usr.sbin/sendmail/BuildTools/OS/QNX
index 3cc01821afc..a8a67fe94cc 100644
--- a/usr.sbin/sendmail/BuildTools/OS/QNX
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/RISCos b/usr.sbin/sendmail/BuildTools/OS/RISCos
index 1888ae69161..4b2d79ee0d0 100644
--- a/usr.sbin/sendmail/BuildTools/OS/RISCos
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/RISCos.4_0 b/usr.sbin/sendmail/BuildTools/OS/RISCos.4_0
index e057fb433cf..1557b8aa1fd 100644
--- a/usr.sbin/sendmail/BuildTools/OS/RISCos.4_0
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/Rhapsody b/usr.sbin/sendmail/BuildTools/OS/Rhapsody
new file mode 100644
index 00000000000..16cf89d80be
--- /dev/null
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/SCO b/usr.sbin/sendmail/BuildTools/OS/SCO
index a72ba53eebe..e995052e225 100644
--- a/usr.sbin/sendmail/BuildTools/OS/SCO
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/SCO.4.2 b/usr.sbin/sendmail/BuildTools/OS/SCO.4.2
index 027f7300667..0d458befa3a 100644
--- a/usr.sbin/sendmail/BuildTools/OS/SCO.4.2
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/SCO.5.x b/usr.sbin/sendmail/BuildTools/OS/SCO.5.x
index 8f095ac5aed..d7fdc736e68 100644
--- a/usr.sbin/sendmail/BuildTools/OS/SCO.5.x
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/SINIX b/usr.sbin/sendmail/BuildTools/OS/SINIX
index 93cc7813501..3c27937af93 100644
--- a/usr.sbin/sendmail/BuildTools/OS/SINIX
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/SVR4 b/usr.sbin/sendmail/BuildTools/OS/SVR4
index f342c3feeb3..92cf1010120 100644
--- a/usr.sbin/sendmail/BuildTools/OS/SVR4
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/SunOS b/usr.sbin/sendmail/BuildTools/OS/SunOS
index 2a8897825ac..9db95698a4b 100644
--- a/usr.sbin/sendmail/BuildTools/OS/SunOS
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/SunOS.4.0 b/usr.sbin/sendmail/BuildTools/OS/SunOS.4.0
index 05bbc57d504..0bcbc5f5775 100644
--- a/usr.sbin/sendmail/BuildTools/OS/SunOS.4.0
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/SunOS.5.1 b/usr.sbin/sendmail/BuildTools/OS/SunOS.5.1
index 2383609ef14..fe39bb9c3a7 100644
--- a/usr.sbin/sendmail/BuildTools/OS/SunOS.5.1
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/SunOS.5.2 b/usr.sbin/sendmail/BuildTools/OS/SunOS.5.2
index 5e635db694e..80bc0870ae1 100644
--- a/usr.sbin/sendmail/BuildTools/OS/SunOS.5.2
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/SunOS.5.3 b/usr.sbin/sendmail/BuildTools/OS/SunOS.5.3
index 8f64d219b7b..dcee93ec33d 100644
--- a/usr.sbin/sendmail/BuildTools/OS/SunOS.5.3
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/SunOS.5.4 b/usr.sbin/sendmail/BuildTools/OS/SunOS.5.4
index 65e84002c7b..4a6b880a313 100644
--- a/usr.sbin/sendmail/BuildTools/OS/SunOS.5.4
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/SunOS.5.5 b/usr.sbin/sendmail/BuildTools/OS/SunOS.5.5
index 267f16d22a1..64264d7deb2 100644
--- a/usr.sbin/sendmail/BuildTools/OS/SunOS.5.5
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/SunOS.5.6 b/usr.sbin/sendmail/BuildTools/OS/SunOS.5.6
index 0537007008d..da17de8ed32 100644
--- a/usr.sbin/sendmail/BuildTools/OS/SunOS.5.6
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/SunOS.5.7 b/usr.sbin/sendmail/BuildTools/OS/SunOS.5.7
index b030e77c650..962095dbbcb 100644
--- a/usr.sbin/sendmail/BuildTools/OS/SunOS.5.7
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/Titan b/usr.sbin/sendmail/BuildTools/OS/Titan
index b66820089fd..938b46df369 100644
--- a/usr.sbin/sendmail/BuildTools/OS/Titan
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/ULTRIX b/usr.sbin/sendmail/BuildTools/OS/ULTRIX
index f5df633e52e..e9073f97a56 100644
--- a/usr.sbin/sendmail/BuildTools/OS/ULTRIX
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/UMAX b/usr.sbin/sendmail/BuildTools/OS/UMAX
index 450c91da750..078b827a849 100644
--- a/usr.sbin/sendmail/BuildTools/OS/UMAX
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/UNICOS b/usr.sbin/sendmail/BuildTools/OS/UNICOS
index 7984fa927c9..3b05dc059b9 100644
--- a/usr.sbin/sendmail/BuildTools/OS/UNICOS
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/UNIX_SV.4.x.i386 b/usr.sbin/sendmail/BuildTools/OS/UNIX_SV.4.x.i386
index a6865e786ae..b0e27537714 100644
--- a/usr.sbin/sendmail/BuildTools/OS/UNIX_SV.4.x.i386
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/UX4800 b/usr.sbin/sendmail/BuildTools/OS/UX4800
index 207b370baa0..7c1822ae705 100644
--- a/usr.sbin/sendmail/BuildTools/OS/UX4800
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/UXPDS.V10 b/usr.sbin/sendmail/BuildTools/OS/UXPDS.V10
index bf301403437..438d88d1c8b 100644
--- a/usr.sbin/sendmail/BuildTools/OS/UXPDS.V10
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/UXPDS.V20 b/usr.sbin/sendmail/BuildTools/OS/UXPDS.V20
index cacdb4af68b..f2d0b37bbcf 100644
--- a/usr.sbin/sendmail/BuildTools/OS/UXPDS.V20
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/UnixWare.5.i386 b/usr.sbin/sendmail/BuildTools/OS/UnixWare.5.i386
new file mode 100644
index 00000000000..77ca82da0a2
--- /dev/null
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/dcosx.1.x.NILE b/usr.sbin/sendmail/BuildTools/OS/dcosx.1.x.NILE
index 900afcd632b..095de367dad 100644
--- a/usr.sbin/sendmail/BuildTools/OS/dcosx.1.x.NILE
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/dgux b/usr.sbin/sendmail/BuildTools/OS/dgux
index 7d6d867b1ec..66132c091b0 100644
--- a/usr.sbin/sendmail/BuildTools/OS/dgux
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/maxion b/usr.sbin/sendmail/BuildTools/OS/maxion
index 3bb6e0e2e2c..0177911dfe1 100644
--- a/usr.sbin/sendmail/BuildTools/OS/maxion
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/OS/uts.systemV b/usr.sbin/sendmail/BuildTools/OS/uts.systemV
index c5f841fb5ab..acee532530f 100644
--- a/usr.sbin/sendmail/BuildTools/OS/uts.systemV
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/README b/usr.sbin/sendmail/BuildTools/README
index 0efc1548b39..65726165c73 100644
--- a/usr.sbin/sendmail/BuildTools/README
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/Site/README b/usr.sbin/sendmail/BuildTools/Site/README
index d5ecb96001d..44e14e886aa 100644
--- a/usr.sbin/sendmail/BuildTools/Site/README
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/bin/Build b/usr.sbin/sendmail/BuildTools/bin/Build
index ab8a49d78ca..bca061f5466 100644
--- a/usr.sbin/sendmail/BuildTools/bin/Build
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/bin/configure.sh b/usr.sbin/sendmail/BuildTools/bin/configure.sh
index eb149b2cdd4..aff771c8127 100644
--- a/usr.sbin/sendmail/BuildTools/bin/configure.sh
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/bin/find_m4.sh b/usr.sbin/sendmail/BuildTools/bin/find_m4.sh
index d2cf66556d8..632e86f0467 100644
--- a/usr.sbin/sendmail/BuildTools/bin/find_m4.sh
+++ b/usr.sbin/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/usr.sbin/sendmail/BuildTools/bin/install.sh b/usr.sbin/sendmail/BuildTools/bin/install.sh
index 58f7623a147..840aa3385ff 100644
--- a/usr.sbin/sendmail/BuildTools/bin/install.sh
+++ b/usr.sbin/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/usr.sbin/sendmail/KNOWNBUGS b/usr.sbin/sendmail/KNOWNBUGS
index cd62b20eb12..0a83bb0aaf9 100644
--- a/usr.sbin/sendmail/KNOWNBUGS
+++ b/usr.sbin/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/usr.sbin/sendmail/LICENSE b/usr.sbin/sendmail/LICENSE
index bb1c3a79c7f..d0ff63a9cb1 100644
--- a/usr.sbin/sendmail/LICENSE
+++ b/usr.sbin/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/usr.sbin/sendmail/Makefile.dist b/usr.sbin/sendmail/Makefile.dist
index 0b44c420319..98ad6e5b8f4 100644
--- a/usr.sbin/sendmail/Makefile.dist
+++ b/usr.sbin/sendmail/Makefile.dist
@@ -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/usr.sbin/sendmail/README b/usr.sbin/sendmail/README
index 5de10764212..eff3fb2ef55 100644
--- a/usr.sbin/sendmail/README
+++ b/usr.sbin/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/usr.sbin/sendmail/RELEASE_NOTES b/usr.sbin/sendmail/RELEASE_NOTES
index 2b3475ffbcc..a8d299a102f 100644
--- a/usr.sbin/sendmail/RELEASE_NOTES
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/README b/usr.sbin/sendmail/cf/README
index df50c9da1d0..46a9475563f 100644
--- a/usr.sbin/sendmail/cf/README
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/Build b/usr.sbin/sendmail/cf/cf/Build
index 3efaffdcdba..3a91477cdf1 100644
--- a/usr.sbin/sendmail/cf/cf/Build
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/Makefile b/usr.sbin/sendmail/cf/cf/Makefile
index 9b37b499cd7..2fd9099899f 100644
--- a/usr.sbin/sendmail/cf/cf/Makefile
+++ b/usr.sbin/sendmail/cf/cf/Makefile
@@ -1,8 +1,8 @@
-# $OpenBSD: Makefile,v 1.17 1998/07/13 11:55:00 deraadt Exp $
+# $OpenBSD: Makefile,v 1.18 1999/01/01 20:32:29 millert Exp $
#
# Makefile for configuration files.
#
-# @(#)Makefile 8.17 (Berkeley) 4/2/98
+# @(#)Makefile 8.17 (Berkeley) 4/2/1998
#
#
diff --git a/usr.sbin/sendmail/cf/cf/chez.cs.mc b/usr.sbin/sendmail/cf/cf/chez.cs.mc
index 9858330bd40..a5334b5a50a 100644
--- a/usr.sbin/sendmail/cf/cf/chez.cs.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/clientproto.mc b/usr.sbin/sendmail/cf/cf/clientproto.mc
index f0a6ae7d6b2..b0fd9bdf4a5 100644
--- a/usr.sbin/sendmail/cf/cf/clientproto.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/cs-hpux10.mc b/usr.sbin/sendmail/cf/cf/cs-hpux10.mc
index 527f9308b99..0be009c5b6b 100644
--- a/usr.sbin/sendmail/cf/cf/cs-hpux10.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/cs-hpux9.mc b/usr.sbin/sendmail/cf/cf/cs-hpux9.mc
index f65505296fe..9b5edfe3ea4 100644
--- a/usr.sbin/sendmail/cf/cf/cs-hpux9.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/cs-osf1.mc b/usr.sbin/sendmail/cf/cf/cs-osf1.mc
index ba35c04ac68..230023ceb13 100644
--- a/usr.sbin/sendmail/cf/cf/cs-osf1.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/cs-solaris2.mc b/usr.sbin/sendmail/cf/cf/cs-solaris2.mc
index 395d19fc7aa..03fd5e27558 100644
--- a/usr.sbin/sendmail/cf/cf/cs-solaris2.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/cs-sunos4.1.mc b/usr.sbin/sendmail/cf/cf/cs-sunos4.1.mc
index 45dcd124d99..39136399732 100644
--- a/usr.sbin/sendmail/cf/cf/cs-sunos4.1.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/cs-ultrix4.mc b/usr.sbin/sendmail/cf/cf/cs-ultrix4.mc
index f2a4b423b90..a12b9898ef3 100644
--- a/usr.sbin/sendmail/cf/cf/cs-ultrix4.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/generic-bsd4.4.cf b/usr.sbin/sendmail/cf/cf/generic-bsd4.4.cf
new file mode 100644
index 00000000000..f924a899033
--- /dev/null
+++ b/usr.sbin/sendmail/cf/cf/generic-bsd4.4.cf
@@ -0,0 +1,1054 @@
+#
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
+# Copyright (c) 1988, 1993
+# The Regents of the University of California. 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.
+#
+#
+
+######################################################################
+######################################################################
+#####
+##### SENDMAIL CONFIGURATION FILE
+#####
+##### built by gshapiro@knecht.Sendmail.ORG on Tue Dec 29 09:59:24 PST 1998
+##### in /home/knecht/a/eric/src/sendmail/cf/cf
+##### using ../ as configuration include directory
+#####
+######################################################################
+######################################################################
+
+##### @(#)cfhead.m4 8.23 (Berkeley) 10/6/1998 #####
+##### @(#)cf.m4 8.29 (Berkeley) 5/19/1998 #####
+##### @(#)generic-bsd4.4.mc 8.7 (Berkeley) 5/19/1998 #####
+
+##### @(#)bsd4.4.m4 8.10 (Berkeley) 10/6/1998 #####
+
+##### @(#)generic.m4 8.9 (Berkeley) 5/19/1998 #####
+
+##### @(#)redirect.m4 8.10 (Berkeley) 5/19/1998 #####
+
+
+
+
+##### @(#)use_cw_file.m4 8.6 (Berkeley) 5/19/1998 #####
+
+
+
+##### @(#)proto.m4 8.237 (Berkeley) 12/17/1998 #####
+
+
+# level 8 config file format
+V8/Berkeley
+
+# override file safeties - setting this option compromises system security
+# need to set this now for the sake of class files
+#O DontBlameSendmail=safe
+
+##################
+# local info #
+##################
+
+Cwlocalhost
+# file containing names of hosts for which we receive email
+Fw/etc/sendmail.cw
+
+# my official domain name
+# ... define this only if sendmail cannot automatically determine your domain
+#Dj$w.Foo.COM
+
+
+CP.
+
+# "Smart" relay host (may be null)
+DS
+
+
+# operators that cannot be in local usernames (i.e., network indicators)
+CO @ % !
+
+# a class with just dot (for identifying canonical names)
+C..
+
+# a class with just a left bracket (for identifying domain literals)
+C[[
+
+
+
+
+
+
+
+
+
+# Resolve map (to check if a host exists in check_mail)
+Kresolve host -a<OK> -T<TEMP>
+
+# Hosts that will permit relaying ($=R)
+FR-o /etc/mail/relay-domains
+
+# who I send unqualified names to (null means deliver locally)
+DR
+
+# who gets all local email traffic ($R has precedence for unqualified names)
+DH
+
+# dequoting map
+Kdequote dequote
+
+# class E: names that should be exposed as from this host, even if we masquerade
+# class L: names that should be delivered locally, even if we have a relay
+# class M: domains that should be converted to $M
+#CL root
+CE root
+
+# who I masquerade as (null for no masquerading) (see also $=M)
+DM
+
+# my name for error messages
+DnMAILER-DAEMON
+
+
+CPREDIRECT
+
+# Configuration version number
+DZ8.9.2
+
+
+###############
+# Options #
+###############
+
+# strip message body to 7 bits on input?
+O SevenBitInput=False
+
+# 8-bit data handling
+O EightBitMode=pass8
+
+
+# wait for alias file rebuild (default units: minutes)
+O AliasWait=10
+
+# location of alias file
+O AliasFile=/etc/aliases
+
+# minimum number of free blocks on filesystem
+O MinFreeBlocks=100
+
+# maximum message size
+#O MaxMessageSize=1000000
+
+# substitution for space (blank) characters
+O BlankSub=.
+
+# avoid connecting to "expensive" mailers on initial submission?
+O HoldExpensive=False
+
+# checkpoint queue runs after every N successful deliveries
+#O CheckpointInterval=10
+
+# default delivery mode
+O DeliveryMode=background
+
+# automatically rebuild the alias database?
+#O AutoRebuildAliases
+
+# error message header/file
+#O ErrorHeader=/etc/sendmail.oE
+
+# error mode
+#O ErrorMode=print
+
+# save Unix-style "From_" lines at top of header?
+#O SaveFromLine
+
+# temporary file mode
+O TempFileMode=0600
+
+# match recipients against GECOS field?
+#O MatchGECOS
+
+# maximum hop count
+#O MaxHopCount=17
+
+# location of help file
+O HelpFile=/usr/share/misc/sendmail.hf
+
+# ignore dots as terminators in incoming messages?
+#O IgnoreDots
+
+# name resolver options
+#O ResolverOptions=+AAONLY
+
+# deliver MIME-encapsulated error messages?
+O SendMimeErrors=True
+
+# Forward file search path
+O ForwardPath=$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward
+
+# open connection cache size
+O ConnectionCacheSize=2
+
+# open connection cache timeout
+O ConnectionCacheTimeout=5m
+
+# persistent host status directory
+#O HostStatusDirectory=.hoststat
+
+# single thread deliveries (requires HostStatusDirectory)?
+#O SingleThreadDelivery
+
+# use Errors-To: header?
+O UseErrorsTo=False
+
+# log level
+O LogLevel=9
+
+# send to me too, even in an alias expansion?
+#O MeToo
+
+# verify RHS in newaliases?
+O CheckAliases=False
+
+# default messages to old style headers if no special punctuation?
+O OldStyleHeaders=True
+
+# SMTP daemon options
+#O DaemonPortOptions=Port=esmtp
+
+# privacy flags
+O PrivacyOptions=authwarnings
+
+# who (if anyone) should get extra copies of error messages
+#O PostMasterCopy=Postmaster
+
+# slope of queue-only function
+#O QueueFactor=600000
+
+# queue directory
+O QueueDirectory=/var/spool/mqueue
+
+# timeouts (many of these)
+#O Timeout.initial=5m
+#O Timeout.connect=5m
+#O Timeout.iconnect=5m
+#O Timeout.helo=5m
+#O Timeout.mail=10m
+#O Timeout.rcpt=1h
+#O Timeout.datainit=5m
+#O Timeout.datablock=1h
+#O Timeout.datafinal=1h
+#O Timeout.rset=5m
+#O Timeout.quit=2m
+#O Timeout.misc=2m
+#O Timeout.command=1h
+#O Timeout.ident=30s
+#O Timeout.fileopen=60s
+O Timeout.queuereturn=5d
+#O Timeout.queuereturn.normal=5d
+#O Timeout.queuereturn.urgent=2d
+#O Timeout.queuereturn.non-urgent=7d
+O Timeout.queuewarn=4h
+#O Timeout.queuewarn.normal=4h
+#O Timeout.queuewarn.urgent=1h
+#O Timeout.queuewarn.non-urgent=12h
+#O Timeout.hoststatus=30m
+
+# should we not prune routes in route-addr syntax addresses?
+#O DontPruneRoutes
+
+# queue up everything before forking?
+O SuperSafe=True
+
+# status file
+O StatusFile=/var/log/sendmail.st
+
+# time zone handling:
+# if undefined, use system default
+# if defined but null, use TZ envariable passed in
+# if defined and non-null, use that info
+#O TimeZoneSpec=
+
+# default UID (can be username or userid:groupid)
+#O DefaultUser=mailnull
+
+# list of locations of user database file (null means no lookup)
+#O UserDatabaseSpec=/etc/userdb
+
+# fallback MX host
+#O FallbackMXhost=fall.back.host.net
+
+# if we are the best MX host for a site, try it directly instead of config err
+#O TryNullMXList
+
+# load average at which we just queue messages
+#O QueueLA=8
+
+# load average at which we refuse connections
+#O RefuseLA=12
+
+# maximum number of children we allow at one time
+#O MaxDaemonChildren=12
+
+# maximum number of new connections per second
+#O ConnectionRateThrottle=3
+
+# work recipient factor
+#O RecipientFactor=30000
+
+# deliver each queued job in a separate process?
+#O ForkEachJob
+
+# work class factor
+#O ClassFactor=1800
+
+# work time factor
+#O RetryFactor=90000
+
+# shall we sort the queue by hostname first?
+#O QueueSortOrder=priority
+
+# minimum time in queue before retry
+#O MinQueueAge=30m
+
+# default character set
+#O DefaultCharSet=iso-8859-1
+
+# service switch file (ignored on Solaris, Ultrix, OSF/1, others)
+#O ServiceSwitchFile=/etc/service.switch
+
+# hosts file (normally /etc/hosts)
+#O HostsFile=/etc/hosts
+
+# dialup line delay on connection failure
+#O DialDelay=10s
+
+# action to take if there are no recipients in the message
+#O NoRecipientAction=add-to-undisclosed
+
+# chrooted environment for writing to files
+#O SafeFileEnvironment=/arch
+
+# are colons OK in addresses?
+#O ColonOkInAddr
+
+# how many jobs can you process in the queue?
+#O MaxQueueRunSize=10000
+
+# shall I avoid expanding CNAMEs (violates protocols)?
+#O DontExpandCnames
+
+# SMTP initial login message (old $e macro)
+O SmtpGreetingMessage=$j Sendmail $v/$Z; $b
+
+# UNIX initial From header format (old $l macro)
+O UnixFromLine=From $g $d
+
+# From: lines that have embedded newlines are unwrapped onto one line
+#O SingleLineFromHeader=False
+
+# Allow HELO SMTP command that does not include a host name
+#O AllowBogusHELO=False
+
+# Characters to be quoted in a full name phrase (@,;:\()[] are automatic)
+#O MustQuoteChars=.
+
+# delimiter (operator) characters (old $o macro)
+O OperatorChars=.:%@!^/[]+
+
+# shall I avoid calling initgroups(3) because of high NIS costs?
+#O DontInitGroups
+
+# are group-writable :include: and .forward files (un)trustworthy?
+#O UnsafeGroupWrites
+
+# where do errors that occur when sending errors get sent?
+#O DoubleBounceAddress=postmaster
+
+# what user id do we assume for the majority of the processing?
+#O RunAsUser=sendmail
+
+# maximum number of recipients per SMTP envelope
+#O MaxRecipientsPerMessage=100
+
+# shall we get local names from our installed interfaces?
+#O DontProbeInterfaces
+
+
+
+
+
+###########################
+# Message precedences #
+###########################
+
+Pfirst-class=0
+Pspecial-delivery=100
+Plist=-30
+Pbulk=-60
+Pjunk=-100
+
+#####################
+# Trusted users #
+#####################
+
+# this is equivalent to setting class "t"
+#Ft/etc/sendmail.ct
+Troot
+Tdaemon
+Tuucp
+
+#########################
+# Format of headers #
+#########################
+
+H?P?Return-Path: <$g>
+HReceived: $?sfrom $s $.$?_($?s$|from $.$_)
+ $.by $j ($v/$Z)$?r with $r$. id $i$?u
+ for $u; $|;
+ $.$b
+H?D?Resent-Date: $a
+H?D?Date: $a
+H?F?Resent-From: $?x$x <$g>$|$g$.
+H?F?From: $?x$x <$g>$|$g$.
+H?x?Full-Name: $x
+# HPosted-Date: $a
+# H?l?Received-Date: $b
+H?M?Resent-Message-Id: <$t.$i@$j>
+H?M?Message-Id: <$t.$i@$j>
+#
+######################################################################
+######################################################################
+#####
+##### REWRITING RULES
+#####
+######################################################################
+######################################################################
+
+############################################
+### Ruleset 3 -- Name Canonicalization ###
+############################################
+S3
+
+# handle null input (translate to <@> special case)
+R$@ $@ <@>
+
+# strip group: syntax (not inside angle brackets!) and trailing semicolon
+R$* $: $1 <@> mark addresses
+R$* < $* > $* <@> $: $1 < $2 > $3 unmark <addr>
+R@ $* <@> $: @ $1 unmark @host:...
+R$* :: $* <@> $: $1 :: $2 unmark node::addr
+R:include: $* <@> $: :include: $1 unmark :include:...
+R$* [ $* : $* ] <@> $: $1 [ $2 : $3 ] unmark IPv6 addrs
+R$* : $* [ $* ] $: $1 : $2 [ $3 ] <@> remark if leading colon
+R$* : $* <@> $: $2 strip colon if marked
+R$* <@> $: $1 unmark
+R$* ; $1 strip trailing semi
+R$* < $* ; > $1 < $2 > bogus bracketed semi
+
+# null input now results from list:; syntax
+R$@ $@ :; <@>
+
+# strip angle brackets -- note RFC733 heuristic to get innermost item
+R$* $: < $1 > housekeeping <>
+R$+ < $* > < $2 > strip excess on left
+R< $* > $+ < $1 > strip excess on right
+R<> $@ < @ > MAIL FROM:<> case
+R< $+ > $: $1 remove housekeeping <>
+
+# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
+R@ $+ , $+ @ $1 : $2 change all "," to ":"
+
+# localize and dispose of route-based addresses
+R@ $+ : $+ $@ $>96 < @$1 > : $2 handle <route-addr>
+
+# find focus for list syntax
+R $+ : $* ; @ $+ $@ $>96 $1 : $2 ; < @ $3 > list syntax
+R $+ : $* ; $@ $1 : $2; list syntax
+
+# find focus for @ syntax addresses
+R$+ @ $+ $: $1 < @ $2 > focus on domain
+R$+ < $+ @ $+ > $1 $2 < @ $3 > move gaze right
+R$+ < @ $+ > $@ $>96 $1 < @ $2 > already canonical
+
+# do some sanity checking
+R$* < @ $* : $* > $* $1 < @ $2 $3 > $4 nix colons in addrs
+
+# convert old-style addresses to a domain-based address
+R$- ! $+ $@ $>96 $2 < @ $1 .UUCP > resolve uucp names
+R$+ . $- ! $+ $@ $>96 $3 < @ $1 . $2 > domain uucps
+R$+ ! $+ $@ $>96 $2 < @ $1 .UUCP > uucp subdomains
+
+# if we have % signs, take the rightmost one
+R$* % $* $1 @ $2 First make them all @s.
+R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last.
+R$* @ $* $@ $>96 $1 < @ $2 > Insert < > and finish
+
+# else we must be a local name
+R$* $@ $>96 $1
+
+
+################################################
+### Ruleset 96 -- bottom half of ruleset 3 ###
+################################################
+
+S96
+
+# handle special cases for local names
+R$* < @ localhost > $* $: $1 < @ $j . > $2 no domain at all
+R$* < @ localhost . $m > $* $: $1 < @ $j . > $2 local domain
+R$* < @ localhost . UUCP > $* $: $1 < @ $j . > $2 .UUCP domain
+R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [a.b.c.d]
+R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal
+R$* < @@ $+ > $* $@ $1 < @ $2 > $3 canon IP addr
+
+
+
+
+
+# if really UUCP, handle it immediately
+
+# try UUCP traffic as a local address
+R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3
+R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3
+
+# pass to name server to make hostname canonical
+R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4
+
+# local host aliases and pseudo-domains are always canonical
+R$* < @ $=w > $* $: $1 < @ $2 . > $3
+R$* < @ $j > $* $: $1 < @ $j . > $2
+R$* < @ $=M > $* $: $1 < @ $2 . > $3
+R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4
+R$* < @ $* . . > $* $1 < @ $2 . > $3
+
+
+##################################################
+### Ruleset 4 -- Final Output Post-rewriting ###
+##################################################
+S4
+
+R$* <@> $@ handle <> and list:;
+
+# strip trailing dot off possibly canonical name
+R$* < @ $+ . > $* $1 < @ $2 > $3
+
+# eliminate internal code -- should never get this far!
+R$* < @ *LOCAL* > $* $1 < @ $j > $2
+
+# externalize local domain info
+R$* < $+ > $* $1 $2 $3 defocus
+R@ $+ : @ $+ : $+ @ $1 , @ $2 : $3 <route-addr> canonical
+R@ $* $@ @ $1 ... and exit
+
+# UUCP must always be presented in old form
+R$+ @ $- . UUCP $2!$1 u@h.UUCP => h!u
+
+# delete duplicate local names
+R$+ % $=w @ $=w $1 @ $2 u%host@host => u@host
+
+
+
+##############################################################
+### Ruleset 97 -- recanonicalize and call ruleset zero ###
+### (used for recursive calls) ###
+##############################################################
+
+S97
+R$* $: $>3 $1
+R$* $@ $>0 $1
+
+
+######################################
+### Ruleset 0 -- Parse Address ###
+######################################
+
+S0
+
+R$* $: $>Parse0 $1 initial parsing
+R<@> $#local $: <@> special case error msgs
+R$* $: $>98 $1 handle local hacks
+R$* $: $>Parse1 $1 final parsing
+
+#
+# Parse0 -- do initial syntax checking and eliminate local addresses.
+# This should either return with the (possibly modified) input
+# or return with a #error mailer. It should not return with a
+# #mailer other than the #error mailer.
+#
+
+SParse0
+R<@> $@ <@> special case error msgs
+R$* : $* ; <@> $#error $@ 5.1.3 $: "List:; syntax illegal for recipient addresses"
+#R@ <@ $* > < @ $1 > catch "@@host" bogosity
+R<@ $+> $#error $@ 5.1.3 $: "User address required"
+R$* $: <> $1
+R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3
+R<> $* <$* : $* > $* $#error $@ 5.1.3 $: "Colon illegal in host name part"
+R<> $* $1
+R$* < @ . $* > $* $#error $@ 5.1.2 $: "Invalid host name"
+R$* < @ $* .. $* > $* $#error $@ 5.1.2 $: "Invalid host name"
+
+# now delete the local info -- note $=O to find characters that cause forwarding
+R$* < @ > $* $@ $>Parse0 $>3 $1 user@ => user
+R< @ $=w . > : $* $@ $>Parse0 $>3 $2 @here:... -> ...
+R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here
+R< @ $+ > $#error $@ 5.1.3 $: "User address required"
+R$* $=O $* < @ $=w . > $@ $>Parse0 $>3 $1 $2 $3 ...@here -> ...
+R$- $: $(dequote $1 $) < @ *LOCAL* > dequote "foo"
+R< @ *LOCAL* > $#error $@ 5.1.3 $: "User address required"
+R$* $=O $* < @ *LOCAL* >
+ $@ $>Parse0 $>3 $1 $2 $3 ...@*LOCAL* -> ...
+R$* < @ *LOCAL* > $: $1
+
+#
+# Parse1 -- the bottom half of ruleset 0.
+#
+
+SParse1
+# handle numeric address spec
+R$* < @ [ $+ ] > $* $: $>98 $1 < @ [ $2 ] > $3 numeric internet spec
+R$* < @ [ $+ ] > $* $#esmtp $@ [$2] $: $1 < @ [$2] > $3 still numeric: send
+
+
+# short circuit local delivery so forwarded email works
+R$=L < @ $=w . > $#local $: @ $1 special local names
+R$+ < @ $=w . > $#local $: $1 regular local name
+
+
+# resolve remotely connected UUCP links (if any)
+
+# resolve fake top level domains by forwarding to other hosts
+
+
+
+# pass names that still have a host to a smarthost (if defined)
+R$* < @ $* > $* $: $>95 < $S > $1 < @ $2 > $3 glue on smarthost name
+
+# deal with other remote names
+R$* < @$* > $* $#esmtp $@ $2 $: $1 < @ $2 > $3 user@host.domain
+
+# handle locally delivered names
+R$=L $#local $: @ $1 special local names
+R$+ $#local $: $1 regular local names
+
+###########################################################################
+### Ruleset 5 -- special rewriting after aliases have been expanded ###
+###########################################################################
+
+S5
+
+# deal with plussed users so aliases work nicely
+R$+ + * $#local $@ $&h $: $1
+R$+ + $* $#local $@ + $2 $: $1 + *
+
+# prepend an empty "forward host" on the front
+R$+ $: <> $1
+
+
+# see if we have a relay or a hub
+R< > $+ $: < $H > $1 try hub
+R< > $+ $: < $R > $1 try relay
+R< > $+ $: < > < $1 $&h > nope, restore +detail
+R< > < $+ + $* > $* < > < $1 > + $2 $3 find the user part
+R< > < $+ > + $* $#local $@ $2 $: @ $1 strip the extra +
+R< > < $+ > $@ $1 no +detail
+R$+ $: $1 $&h add +detail back in
+R< local : $* > $* $: $>95 < local : $1 > $2 no host extension
+R< error : $* > $* $: $>95 < error : $1 > $2 no host extension
+R< $- : $+ > $+ $: $>95 < $1 : $2 > $3 < @ $2 >
+R< $+ > $+ $@ $>95 < $1 > $2 < @ $1 >
+
+
+###################################################################
+### Ruleset 95 -- canonify mailer:[user@]host syntax to triple ###
+###################################################################
+
+S95
+R< > $* $@ $1 strip off null relay
+R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
+R< local : $* > $* $>CanonLocal < $1 > $2
+R< $- : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user
+R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
+R< $=w > $* $@ $2 delete local host
+R< $+ > $* $#relay $@ $1 $: $2 use unqualified mailer
+
+###################################################################
+### Ruleset CanonLocal -- canonify local: syntax ###
+###################################################################
+
+SCanonLocal
+# strip trailing dot from any host name that may appear
+R< $* > $* < @ $* . > $: < $1 > $2 < @ $3 >
+
+# handle local: syntax -- use old user, either with or without host
+R< > $* < @ $* > $* $#local $@ $1@$2 $: $1
+R< > $+ $#local $@ $1 $: $1
+
+# handle local:user@host syntax -- ignore host part
+R< $+ @ $+ > $* < @ $* > $: < $1 > $3 < @ $4 >
+
+# handle local:user syntax
+R< $+ > $* <@ $* > $* $#local $@ $2@$3 $: $1
+R< $+ > $* $#local $@ $2 $: $1
+
+###################################################################
+### Ruleset 93 -- convert header names to masqueraded form ###
+###################################################################
+
+S93
+
+
+# special case the users that should be exposed
+R$=E < @ *LOCAL* > $@ $1 < @ $j . > leave exposed
+R$=E < @ $=M . > $@ $1 < @ $2 . >
+R$=E < @ $=w . > $@ $1 < @ $2 . >
+
+# handle domain-specific masquerading
+R$* < @ $=M . > $* $: $1 < @ $2 . @ $M > $3 convert masqueraded doms
+R$* < @ $=w . > $* $: $1 < @ $2 . @ $M > $3
+R$* < @ *LOCAL* > $* $: $1 < @ $j . @ $M > $2
+R$* < @ $+ @ > $* $: $1 < @ $2 > $3 $M is null
+R$* < @ $+ @ $+ > $* $: $1 < @ $3 . > $4 $M is not null
+
+###################################################################
+### Ruleset 94 -- convert envelope names to masqueraded form ###
+###################################################################
+
+S94
+R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
+
+###################################################################
+### Ruleset 98 -- local part of ruleset zero (can be null) ###
+###################################################################
+
+S98
+
+# addresses sent to foo@host.REDIRECT will give a 551 error code
+R$* < @ $+ .REDIRECT. > $: $1 < @ $2 . REDIRECT . > < ${opMode} >
+R$* < @ $+ .REDIRECT. > <i> $: $1 < @ $2 . REDIRECT. >
+R$* < @ $+ .REDIRECT. > < $- > $# error $@ 5.1.1 $: "551 User has moved; please try " <$1@$2>
+
+
+
+######################################################################
+### 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.
+###
+### Parameters:
+### $1 -- full recipient address
+###
+### Returns:
+### parsed, non-local-relaying address
+######################################################################
+
+SParseRecipient
+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<NO> $* < @ $* $=R > $: <RELAY> $1 < @ $2 $3 >
+
+R<RELAY> $* < @ $* > $@ $>ParseRecipient $1
+R<$-> $* $@ $2
+
+######################################################################
+### check_relay -- check hostname/address on SMTP startup
+######################################################################
+
+SLocal_check_relay
+Scheck_relay
+R$* $: $1 $| $>"Local_check_relay" $1
+R$* $| $* $| $#$* $#$3
+R$* $| $* $| $* $@ $>"Basic_check_relay" $1 $| $2
+
+SBasic_check_relay
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+
+
+######################################################################
+### check_mail -- check SMTP `MAIL FROM:' command argument
+######################################################################
+
+SLocal_check_mail
+Scheck_mail
+R$* $: $1 $| $>"Local_check_mail" $1
+R$* $| $#$* $#$2
+R$* $| $* $@ $>"Basic_check_mail" $1
+
+SBasic_check_mail
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+R<> $@ <OK>
+R$* $: <?> $>CanonAddr $1
+R<?> $* < @ $+ . > <?> $1 < @ $2 > strip trailing dots
+# handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc)
+R<?> $* < $* $=P > $* $: <OK> $1 < @ $2 $3 > $4
+R<?> $* < @ $+ > $* $: <? $(resolve $2 $: $2 <PERM> $) > $1 < @ $2 > $3
+R<? $* <$->> $* < @ $+ > $*
+ $: <$2> $3 < @ $4 > $5
+
+# handle case of @localhost on address
+R<$+> $* < @localhost > $: < ? $&{client_name} > <$1> $2 < @localhost >
+R<$+> $* < @localhost.$m >
+ $: < ? $&{client_name} > <$1> $2 < @localhost.$m >
+R<$+> $* < @localhost.UUCP >
+ $: < ? $&{client_name} > <$1> $2 < @localhost.UUCP >
+R<? $=w> <$+> $* <?> <$2> $3
+R<? $+> <$+> $* $#error $@ 5.5.4 $: "553 Real domain name required"
+R<?> <$+> $* $: <$1> $2
+
+
+# handle case of no @domain on address
+R<?> $* $: < ? $&{client_name} > $1
+R<?> $* $@ <OK> ...local unqualed ok
+R<? $+> $* $#error $@ 5.5.4 $: "553 Domain name required"
+ ...remote is not
+# check results
+R<?> $* $@ <OK>
+R<OK> $* $@ <OK>
+R<TEMP> $* $#error $@ 4.1.8 $: "451 Sender domain must resolve"
+R<PERM> $* $#error $@ 5.1.8 $: "501 Sender domain must exist"
+
+######################################################################
+### check_rcpt -- check SMTP `RCPT TO:' command argument
+######################################################################
+
+SLocal_check_rcpt
+Scheck_rcpt
+R$* $: $1 $| $>"Local_check_rcpt" $1
+R$* $| $#$* $#$2
+R$* $| $* $@ $>"Basic_check_rcpt" $1
+
+SBasic_check_rcpt
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+R$* $: $>ParseRecipient $1 strip relayable hosts
+
+
+
+
+# anything terminating locally is ok
+R$+ < @ $=w > $@ OK
+R$+ < @ $* $=R > $@ OK
+
+
+# check for local user (i.e. unqualified address)
+R$* $: <?> $1
+R<?> $* < @ $+ > $: <REMOTE> $1 < @ $2 >
+# local user is ok
+R<?> $+ $@ OK
+R<$+> $* $: $2
+
+# anything originating locally is ok
+R$* $: <?> $&{client_name}
+# check if bracketed IP address (forward lookup != reverse lookup)
+R<?> [$+] $: <BAD> [$1]
+# pass to name server to make hostname canonical
+R<?> $* $~P $: <?> $[ $1 $2 $]
+R<$-> $* $: $2
+R$* . $1 strip trailing dots
+R$@ $@ OK
+R$=w $@ OK
+R$* $=R $@ OK
+
+# check IP address
+R$* $: $&{client_addr}
+R$@ $@ OK originated locally
+R0 $@ OK originated locally
+R$=R $* $@ OK relayable IP address
+R$* $: [ $1 ] put brackets around it...
+R$=w $@ OK ... and see if it is local
+
+
+# anything else is bogus
+R$* $#error $@ 5.7.1 $: "550 Relaying denied"
+
+#
+######################################################################
+######################################################################
+#####
+##### MAILER DEFINITIONS
+#####
+######################################################################
+######################################################################
+
+
+##################################################
+### Local and Program Mailer specification ###
+##################################################
+
+##### @(#)local.m4 8.30 (Berkeley) 6/30/1998 #####
+
+Mlocal, P=/usr/libexec/mail.local, F=lsDFMAw5:/|@qrmn9, S=10/30, R=20/40,
+ T=DNS/RFC822/X-Unix,
+ A=mail -d $u
+Mprog, P=/bin/sh, F=lsDFMoqeu9, S=10/30, R=20/40, D=$z:/,
+ T=X-Unix,
+ A=sh -c $u
+
+#
+# Envelope sender rewriting
+#
+S10
+R<@> $n errors to mailer-daemon
+R@ <@ $*> $n temporarily bypass Sun bogosity
+R$+ $: $>50 $1 add local domain if needed
+R$* $: $>94 $1 do masquerading
+
+#
+# Envelope recipient rewriting
+#
+S20
+R$+ < @ $* > $: $1 strip host part
+
+#
+# Header sender rewriting
+#
+S30
+R<@> $n errors to mailer-daemon
+R@ <@ $*> $n temporarily bypass Sun bogosity
+R$+ $: $>50 $1 add local domain if needed
+R$* $: $>93 $1 do masquerading
+
+#
+# Header recipient rewriting
+#
+S40
+R$+ $: $>50 $1 add local domain if needed
+
+#
+# Common code to add local domain name (only if always-add-domain)
+#
+S50
+
+#####################################
+### SMTP Mailer specification ###
+#####################################
+
+##### @(#)smtp.m4 8.38 (Berkeley) 5/19/1998 #####
+
+Msmtp, P=[IPC], F=mDFMuX, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Mesmtp, P=[IPC], F=mDFMuXa, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Msmtp8, P=[IPC], F=mDFMuX8, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Mrelay, P=[IPC], F=mDFMuXa8, S=11/31, R=61, E=\r\n, L=2040,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+
+#
+# envelope sender rewriting
+#
+S11
+R$+ $: $>51 $1 sender/recipient common
+R$* :; <@> $@ list:; special case
+R$* $: $>61 $1 qualify unqual'ed names
+R$+ $: $>94 $1 do masquerading
+
+
+#
+# envelope recipient rewriting --
+# also header recipient if not masquerading recipients
+#
+S21
+R$+ $: $>51 $1 sender/recipient common
+R$+ $: $>61 $1 qualify unqual'ed names
+
+
+#
+# header sender and masquerading header recipient rewriting
+#
+S31
+R$+ $: $>51 $1 sender/recipient common
+R:; <@> $@ list:; special case
+
+# do special header rewriting
+R$* <@> $* $@ $1 <@> $2 pass null host through
+R< @ $* > $* $@ < @ $1 > $2 pass route-addr through
+R$* $: $>61 $1 qualify unqual'ed names
+R$+ $: $>93 $1 do masquerading
+
+
+#
+# convert pseudo-domain addresses to real domain addresses
+#
+S51
+
+# pass <route-addr>s through
+R< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr>
+
+# output fake domains as user%fake@relay
+
+# do UUCP heuristics; note that these are shared with UUCP mailers
+R$+ < @ $+ .UUCP. > $: < $2 ! > $1 convert to UUCP form
+R$+ < @ $* > $* $@ $1 < @ $2 > $3 not UUCP form
+
+# leave these in .UUCP form to avoid further tampering
+R< $&h ! > $- ! $+ $@ $2 < @ $1 .UUCP. >
+R< $&h ! > $-.$+ ! $+ $@ $3 < @ $1.$2 >
+R< $&h ! > $+ $@ $1 < @ $&h .UUCP. >
+R< $+ ! > $+ $: $1 ! $2 < @ $Y > use UUCP_RELAY
+R$+ < @ $+ : $+ > $@ $1 < @ $3 > strip mailer: part
+R$+ < @ > $: $1 < @ *LOCAL* > if no UUCP_RELAY
+
+
+#
+# common sender and masquerading recipient rewriting
+#
+S61
+
+R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified
+R$+ $@ $1 < @ *LOCAL* > add local qualification
+
+
+#
+# relay mailer header masquerading recipient rewriting
+#
+S71
+
+R$+ $: $>61 $1
+R$+ $: $>93 $1
diff --git a/usr.sbin/sendmail/cf/cf/generic-bsd4.4.mc b/usr.sbin/sendmail/cf/cf/generic-bsd4.4.mc
index 106fa31c44d..b09760532d4 100644
--- a/usr.sbin/sendmail/cf/cf/generic-bsd4.4.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/generic-hpux10.cf b/usr.sbin/sendmail/cf/cf/generic-hpux10.cf
new file mode 100644
index 00000000000..d2df96812d7
--- /dev/null
+++ b/usr.sbin/sendmail/cf/cf/generic-hpux10.cf
@@ -0,0 +1,1055 @@
+#
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
+# Copyright (c) 1988, 1993
+# The Regents of the University of California. 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.
+#
+#
+
+######################################################################
+######################################################################
+#####
+##### SENDMAIL CONFIGURATION FILE
+#####
+##### built by gshapiro@knecht.Sendmail.ORG on Tue Dec 29 09:59:25 PST 1998
+##### in /home/knecht/a/eric/src/sendmail/cf/cf
+##### using ../ as configuration include directory
+#####
+######################################################################
+######################################################################
+
+##### @(#)cfhead.m4 8.23 (Berkeley) 10/6/1998 #####
+##### @(#)cf.m4 8.29 (Berkeley) 5/19/1998 #####
+##### @(#)generic-hpux10.mc 8.8 (Berkeley) 5/19/1998 #####
+
+##### @(#)hpux10.m4 8.14 (Berkeley) 10/6/1998 #####
+
+
+##### @(#)generic.m4 8.9 (Berkeley) 5/19/1998 #####
+
+##### @(#)redirect.m4 8.10 (Berkeley) 5/19/1998 #####
+
+
+
+
+##### @(#)use_cw_file.m4 8.6 (Berkeley) 5/19/1998 #####
+
+
+
+##### @(#)proto.m4 8.237 (Berkeley) 12/17/1998 #####
+
+
+# level 8 config file format
+V8/Berkeley
+
+# override file safeties - setting this option compromises system security
+# need to set this now for the sake of class files
+#O DontBlameSendmail=safe
+
+##################
+# local info #
+##################
+
+Cwlocalhost
+# file containing names of hosts for which we receive email
+Fw/etc/sendmail.cw
+
+# my official domain name
+# ... define this only if sendmail cannot automatically determine your domain
+#Dj$w.Foo.COM
+
+
+CP.
+
+# "Smart" relay host (may be null)
+DS
+
+
+# operators that cannot be in local usernames (i.e., network indicators)
+CO @ % !
+
+# a class with just dot (for identifying canonical names)
+C..
+
+# a class with just a left bracket (for identifying domain literals)
+C[[
+
+
+
+
+
+
+
+
+
+# Resolve map (to check if a host exists in check_mail)
+Kresolve host -a<OK> -T<TEMP>
+
+# Hosts that will permit relaying ($=R)
+FR-o /etc/mail/relay-domains
+
+# who I send unqualified names to (null means deliver locally)
+DR
+
+# who gets all local email traffic ($R has precedence for unqualified names)
+DH
+
+# dequoting map
+Kdequote dequote
+
+# class E: names that should be exposed as from this host, even if we masquerade
+# class L: names that should be delivered locally, even if we have a relay
+# class M: domains that should be converted to $M
+#CL root
+CE root
+
+# who I masquerade as (null for no masquerading) (see also $=M)
+DM
+
+# my name for error messages
+DnMAILER-DAEMON
+
+
+CPREDIRECT
+
+# Configuration version number
+DZ8.9.2
+
+
+###############
+# Options #
+###############
+
+# strip message body to 7 bits on input?
+O SevenBitInput=False
+
+# 8-bit data handling
+O EightBitMode=pass8
+
+
+# wait for alias file rebuild (default units: minutes)
+O AliasWait=10
+
+# location of alias file
+O AliasFile=/etc/mail/aliases
+
+# minimum number of free blocks on filesystem
+O MinFreeBlocks=100
+
+# maximum message size
+#O MaxMessageSize=1000000
+
+# substitution for space (blank) characters
+O BlankSub=.
+
+# avoid connecting to "expensive" mailers on initial submission?
+O HoldExpensive=False
+
+# checkpoint queue runs after every N successful deliveries
+#O CheckpointInterval=10
+
+# default delivery mode
+O DeliveryMode=background
+
+# automatically rebuild the alias database?
+#O AutoRebuildAliases
+
+# error message header/file
+#O ErrorHeader=/etc/sendmail.oE
+
+# error mode
+#O ErrorMode=print
+
+# save Unix-style "From_" lines at top of header?
+#O SaveFromLine
+
+# temporary file mode
+O TempFileMode=0600
+
+# match recipients against GECOS field?
+#O MatchGECOS
+
+# maximum hop count
+#O MaxHopCount=17
+
+# location of help file
+O HelpFile=/usr/share/lib/sendmail.hf
+
+# ignore dots as terminators in incoming messages?
+#O IgnoreDots
+
+# name resolver options
+#O ResolverOptions=+AAONLY
+
+# deliver MIME-encapsulated error messages?
+O SendMimeErrors=True
+
+# Forward file search path
+O ForwardPath=$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward
+
+# open connection cache size
+O ConnectionCacheSize=2
+
+# open connection cache timeout
+O ConnectionCacheTimeout=5m
+
+# persistent host status directory
+#O HostStatusDirectory=.hoststat
+
+# single thread deliveries (requires HostStatusDirectory)?
+#O SingleThreadDelivery
+
+# use Errors-To: header?
+O UseErrorsTo=False
+
+# log level
+O LogLevel=9
+
+# send to me too, even in an alias expansion?
+#O MeToo
+
+# verify RHS in newaliases?
+O CheckAliases=False
+
+# default messages to old style headers if no special punctuation?
+O OldStyleHeaders=True
+
+# SMTP daemon options
+#O DaemonPortOptions=Port=esmtp
+
+# privacy flags
+O PrivacyOptions=authwarnings
+
+# who (if anyone) should get extra copies of error messages
+#O PostMasterCopy=Postmaster
+
+# slope of queue-only function
+#O QueueFactor=600000
+
+# queue directory
+O QueueDirectory=/var/spool/mqueue
+
+# timeouts (many of these)
+#O Timeout.initial=5m
+#O Timeout.connect=5m
+#O Timeout.iconnect=5m
+#O Timeout.helo=5m
+#O Timeout.mail=10m
+#O Timeout.rcpt=1h
+#O Timeout.datainit=5m
+#O Timeout.datablock=1h
+#O Timeout.datafinal=1h
+#O Timeout.rset=5m
+#O Timeout.quit=2m
+#O Timeout.misc=2m
+#O Timeout.command=1h
+#O Timeout.ident=30s
+#O Timeout.fileopen=60s
+O Timeout.queuereturn=5d
+#O Timeout.queuereturn.normal=5d
+#O Timeout.queuereturn.urgent=2d
+#O Timeout.queuereturn.non-urgent=7d
+O Timeout.queuewarn=4h
+#O Timeout.queuewarn.normal=4h
+#O Timeout.queuewarn.urgent=1h
+#O Timeout.queuewarn.non-urgent=12h
+#O Timeout.hoststatus=30m
+
+# should we not prune routes in route-addr syntax addresses?
+#O DontPruneRoutes
+
+# queue up everything before forking?
+O SuperSafe=True
+
+# status file
+O StatusFile=/etc/mail/sendmail.st
+
+# time zone handling:
+# if undefined, use system default
+# if defined but null, use TZ envariable passed in
+# if defined and non-null, use that info
+O TimeZoneSpec=
+
+# default UID (can be username or userid:groupid)
+#O DefaultUser=mailnull
+
+# list of locations of user database file (null means no lookup)
+#O UserDatabaseSpec=/etc/userdb
+
+# fallback MX host
+#O FallbackMXhost=fall.back.host.net
+
+# if we are the best MX host for a site, try it directly instead of config err
+#O TryNullMXList
+
+# load average at which we just queue messages
+#O QueueLA=8
+
+# load average at which we refuse connections
+#O RefuseLA=12
+
+# maximum number of children we allow at one time
+#O MaxDaemonChildren=12
+
+# maximum number of new connections per second
+#O ConnectionRateThrottle=3
+
+# work recipient factor
+#O RecipientFactor=30000
+
+# deliver each queued job in a separate process?
+#O ForkEachJob
+
+# work class factor
+#O ClassFactor=1800
+
+# work time factor
+#O RetryFactor=90000
+
+# shall we sort the queue by hostname first?
+#O QueueSortOrder=priority
+
+# minimum time in queue before retry
+#O MinQueueAge=30m
+
+# default character set
+#O DefaultCharSet=iso-8859-1
+
+# service switch file (ignored on Solaris, Ultrix, OSF/1, others)
+#O ServiceSwitchFile=/etc/service.switch
+
+# hosts file (normally /etc/hosts)
+#O HostsFile=/etc/hosts
+
+# dialup line delay on connection failure
+#O DialDelay=10s
+
+# action to take if there are no recipients in the message
+#O NoRecipientAction=add-to-undisclosed
+
+# chrooted environment for writing to files
+#O SafeFileEnvironment=/arch
+
+# are colons OK in addresses?
+#O ColonOkInAddr
+
+# how many jobs can you process in the queue?
+#O MaxQueueRunSize=10000
+
+# shall I avoid expanding CNAMEs (violates protocols)?
+#O DontExpandCnames
+
+# SMTP initial login message (old $e macro)
+O SmtpGreetingMessage=$j Sendmail $v/$Z; $b
+
+# UNIX initial From header format (old $l macro)
+O UnixFromLine=From $g $d
+
+# From: lines that have embedded newlines are unwrapped onto one line
+#O SingleLineFromHeader=False
+
+# Allow HELO SMTP command that does not include a host name
+#O AllowBogusHELO=False
+
+# Characters to be quoted in a full name phrase (@,;:\()[] are automatic)
+#O MustQuoteChars=.
+
+# delimiter (operator) characters (old $o macro)
+O OperatorChars=.:%@!^/[]+
+
+# shall I avoid calling initgroups(3) because of high NIS costs?
+#O DontInitGroups
+
+# are group-writable :include: and .forward files (un)trustworthy?
+#O UnsafeGroupWrites
+
+# where do errors that occur when sending errors get sent?
+#O DoubleBounceAddress=postmaster
+
+# what user id do we assume for the majority of the processing?
+#O RunAsUser=sendmail
+
+# maximum number of recipients per SMTP envelope
+#O MaxRecipientsPerMessage=100
+
+# shall we get local names from our installed interfaces?
+#O DontProbeInterfaces
+
+
+
+
+
+###########################
+# Message precedences #
+###########################
+
+Pfirst-class=0
+Pspecial-delivery=100
+Plist=-30
+Pbulk=-60
+Pjunk=-100
+
+#####################
+# Trusted users #
+#####################
+
+# this is equivalent to setting class "t"
+#Ft/etc/sendmail.ct
+Troot
+Tdaemon
+Tuucp
+
+#########################
+# Format of headers #
+#########################
+
+H?P?Return-Path: <$g>
+HReceived: $?sfrom $s $.$?_($?s$|from $.$_)
+ $.by $j ($v/$Z)$?r with $r$. id $i$?u
+ for $u; $|;
+ $.$b
+H?D?Resent-Date: $a
+H?D?Date: $a
+H?F?Resent-From: $?x$x <$g>$|$g$.
+H?F?From: $?x$x <$g>$|$g$.
+H?x?Full-Name: $x
+# HPosted-Date: $a
+# H?l?Received-Date: $b
+H?M?Resent-Message-Id: <$t.$i@$j>
+H?M?Message-Id: <$t.$i@$j>
+#
+######################################################################
+######################################################################
+#####
+##### REWRITING RULES
+#####
+######################################################################
+######################################################################
+
+############################################
+### Ruleset 3 -- Name Canonicalization ###
+############################################
+S3
+
+# handle null input (translate to <@> special case)
+R$@ $@ <@>
+
+# strip group: syntax (not inside angle brackets!) and trailing semicolon
+R$* $: $1 <@> mark addresses
+R$* < $* > $* <@> $: $1 < $2 > $3 unmark <addr>
+R@ $* <@> $: @ $1 unmark @host:...
+R$* :: $* <@> $: $1 :: $2 unmark node::addr
+R:include: $* <@> $: :include: $1 unmark :include:...
+R$* [ $* : $* ] <@> $: $1 [ $2 : $3 ] unmark IPv6 addrs
+R$* : $* [ $* ] $: $1 : $2 [ $3 ] <@> remark if leading colon
+R$* : $* <@> $: $2 strip colon if marked
+R$* <@> $: $1 unmark
+R$* ; $1 strip trailing semi
+R$* < $* ; > $1 < $2 > bogus bracketed semi
+
+# null input now results from list:; syntax
+R$@ $@ :; <@>
+
+# strip angle brackets -- note RFC733 heuristic to get innermost item
+R$* $: < $1 > housekeeping <>
+R$+ < $* > < $2 > strip excess on left
+R< $* > $+ < $1 > strip excess on right
+R<> $@ < @ > MAIL FROM:<> case
+R< $+ > $: $1 remove housekeeping <>
+
+# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
+R@ $+ , $+ @ $1 : $2 change all "," to ":"
+
+# localize and dispose of route-based addresses
+R@ $+ : $+ $@ $>96 < @$1 > : $2 handle <route-addr>
+
+# find focus for list syntax
+R $+ : $* ; @ $+ $@ $>96 $1 : $2 ; < @ $3 > list syntax
+R $+ : $* ; $@ $1 : $2; list syntax
+
+# find focus for @ syntax addresses
+R$+ @ $+ $: $1 < @ $2 > focus on domain
+R$+ < $+ @ $+ > $1 $2 < @ $3 > move gaze right
+R$+ < @ $+ > $@ $>96 $1 < @ $2 > already canonical
+
+# do some sanity checking
+R$* < @ $* : $* > $* $1 < @ $2 $3 > $4 nix colons in addrs
+
+# convert old-style addresses to a domain-based address
+R$- ! $+ $@ $>96 $2 < @ $1 .UUCP > resolve uucp names
+R$+ . $- ! $+ $@ $>96 $3 < @ $1 . $2 > domain uucps
+R$+ ! $+ $@ $>96 $2 < @ $1 .UUCP > uucp subdomains
+
+# if we have % signs, take the rightmost one
+R$* % $* $1 @ $2 First make them all @s.
+R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last.
+R$* @ $* $@ $>96 $1 < @ $2 > Insert < > and finish
+
+# else we must be a local name
+R$* $@ $>96 $1
+
+
+################################################
+### Ruleset 96 -- bottom half of ruleset 3 ###
+################################################
+
+S96
+
+# handle special cases for local names
+R$* < @ localhost > $* $: $1 < @ $j . > $2 no domain at all
+R$* < @ localhost . $m > $* $: $1 < @ $j . > $2 local domain
+R$* < @ localhost . UUCP > $* $: $1 < @ $j . > $2 .UUCP domain
+R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [a.b.c.d]
+R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal
+R$* < @@ $+ > $* $@ $1 < @ $2 > $3 canon IP addr
+
+
+
+
+
+# if really UUCP, handle it immediately
+
+# try UUCP traffic as a local address
+R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3
+R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3
+
+# pass to name server to make hostname canonical
+R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4
+
+# local host aliases and pseudo-domains are always canonical
+R$* < @ $=w > $* $: $1 < @ $2 . > $3
+R$* < @ $j > $* $: $1 < @ $j . > $2
+R$* < @ $=M > $* $: $1 < @ $2 . > $3
+R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4
+R$* < @ $* . . > $* $1 < @ $2 . > $3
+
+
+##################################################
+### Ruleset 4 -- Final Output Post-rewriting ###
+##################################################
+S4
+
+R$* <@> $@ handle <> and list:;
+
+# strip trailing dot off possibly canonical name
+R$* < @ $+ . > $* $1 < @ $2 > $3
+
+# eliminate internal code -- should never get this far!
+R$* < @ *LOCAL* > $* $1 < @ $j > $2
+
+# externalize local domain info
+R$* < $+ > $* $1 $2 $3 defocus
+R@ $+ : @ $+ : $+ @ $1 , @ $2 : $3 <route-addr> canonical
+R@ $* $@ @ $1 ... and exit
+
+# UUCP must always be presented in old form
+R$+ @ $- . UUCP $2!$1 u@h.UUCP => h!u
+
+# delete duplicate local names
+R$+ % $=w @ $=w $1 @ $2 u%host@host => u@host
+
+
+
+##############################################################
+### Ruleset 97 -- recanonicalize and call ruleset zero ###
+### (used for recursive calls) ###
+##############################################################
+
+S97
+R$* $: $>3 $1
+R$* $@ $>0 $1
+
+
+######################################
+### Ruleset 0 -- Parse Address ###
+######################################
+
+S0
+
+R$* $: $>Parse0 $1 initial parsing
+R<@> $#local $: <@> special case error msgs
+R$* $: $>98 $1 handle local hacks
+R$* $: $>Parse1 $1 final parsing
+
+#
+# Parse0 -- do initial syntax checking and eliminate local addresses.
+# This should either return with the (possibly modified) input
+# or return with a #error mailer. It should not return with a
+# #mailer other than the #error mailer.
+#
+
+SParse0
+R<@> $@ <@> special case error msgs
+R$* : $* ; <@> $#error $@ 5.1.3 $: "List:; syntax illegal for recipient addresses"
+#R@ <@ $* > < @ $1 > catch "@@host" bogosity
+R<@ $+> $#error $@ 5.1.3 $: "User address required"
+R$* $: <> $1
+R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3
+R<> $* <$* : $* > $* $#error $@ 5.1.3 $: "Colon illegal in host name part"
+R<> $* $1
+R$* < @ . $* > $* $#error $@ 5.1.2 $: "Invalid host name"
+R$* < @ $* .. $* > $* $#error $@ 5.1.2 $: "Invalid host name"
+
+# now delete the local info -- note $=O to find characters that cause forwarding
+R$* < @ > $* $@ $>Parse0 $>3 $1 user@ => user
+R< @ $=w . > : $* $@ $>Parse0 $>3 $2 @here:... -> ...
+R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here
+R< @ $+ > $#error $@ 5.1.3 $: "User address required"
+R$* $=O $* < @ $=w . > $@ $>Parse0 $>3 $1 $2 $3 ...@here -> ...
+R$- $: $(dequote $1 $) < @ *LOCAL* > dequote "foo"
+R< @ *LOCAL* > $#error $@ 5.1.3 $: "User address required"
+R$* $=O $* < @ *LOCAL* >
+ $@ $>Parse0 $>3 $1 $2 $3 ...@*LOCAL* -> ...
+R$* < @ *LOCAL* > $: $1
+
+#
+# Parse1 -- the bottom half of ruleset 0.
+#
+
+SParse1
+# handle numeric address spec
+R$* < @ [ $+ ] > $* $: $>98 $1 < @ [ $2 ] > $3 numeric internet spec
+R$* < @ [ $+ ] > $* $#esmtp $@ [$2] $: $1 < @ [$2] > $3 still numeric: send
+
+
+# short circuit local delivery so forwarded email works
+R$=L < @ $=w . > $#local $: @ $1 special local names
+R$+ < @ $=w . > $#local $: $1 regular local name
+
+
+# resolve remotely connected UUCP links (if any)
+
+# resolve fake top level domains by forwarding to other hosts
+
+
+
+# pass names that still have a host to a smarthost (if defined)
+R$* < @ $* > $* $: $>95 < $S > $1 < @ $2 > $3 glue on smarthost name
+
+# deal with other remote names
+R$* < @$* > $* $#esmtp $@ $2 $: $1 < @ $2 > $3 user@host.domain
+
+# handle locally delivered names
+R$=L $#local $: @ $1 special local names
+R$+ $#local $: $1 regular local names
+
+###########################################################################
+### Ruleset 5 -- special rewriting after aliases have been expanded ###
+###########################################################################
+
+S5
+
+# deal with plussed users so aliases work nicely
+R$+ + * $#local $@ $&h $: $1
+R$+ + $* $#local $@ + $2 $: $1 + *
+
+# prepend an empty "forward host" on the front
+R$+ $: <> $1
+
+
+# see if we have a relay or a hub
+R< > $+ $: < $H > $1 try hub
+R< > $+ $: < $R > $1 try relay
+R< > $+ $: < > < $1 $&h > nope, restore +detail
+R< > < $+ + $* > $* < > < $1 > + $2 $3 find the user part
+R< > < $+ > + $* $#local $@ $2 $: @ $1 strip the extra +
+R< > < $+ > $@ $1 no +detail
+R$+ $: $1 $&h add +detail back in
+R< local : $* > $* $: $>95 < local : $1 > $2 no host extension
+R< error : $* > $* $: $>95 < error : $1 > $2 no host extension
+R< $- : $+ > $+ $: $>95 < $1 : $2 > $3 < @ $2 >
+R< $+ > $+ $@ $>95 < $1 > $2 < @ $1 >
+
+
+###################################################################
+### Ruleset 95 -- canonify mailer:[user@]host syntax to triple ###
+###################################################################
+
+S95
+R< > $* $@ $1 strip off null relay
+R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
+R< local : $* > $* $>CanonLocal < $1 > $2
+R< $- : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user
+R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
+R< $=w > $* $@ $2 delete local host
+R< $+ > $* $#relay $@ $1 $: $2 use unqualified mailer
+
+###################################################################
+### Ruleset CanonLocal -- canonify local: syntax ###
+###################################################################
+
+SCanonLocal
+# strip trailing dot from any host name that may appear
+R< $* > $* < @ $* . > $: < $1 > $2 < @ $3 >
+
+# handle local: syntax -- use old user, either with or without host
+R< > $* < @ $* > $* $#local $@ $1@$2 $: $1
+R< > $+ $#local $@ $1 $: $1
+
+# handle local:user@host syntax -- ignore host part
+R< $+ @ $+ > $* < @ $* > $: < $1 > $3 < @ $4 >
+
+# handle local:user syntax
+R< $+ > $* <@ $* > $* $#local $@ $2@$3 $: $1
+R< $+ > $* $#local $@ $2 $: $1
+
+###################################################################
+### Ruleset 93 -- convert header names to masqueraded form ###
+###################################################################
+
+S93
+
+
+# special case the users that should be exposed
+R$=E < @ *LOCAL* > $@ $1 < @ $j . > leave exposed
+R$=E < @ $=M . > $@ $1 < @ $2 . >
+R$=E < @ $=w . > $@ $1 < @ $2 . >
+
+# handle domain-specific masquerading
+R$* < @ $=M . > $* $: $1 < @ $2 . @ $M > $3 convert masqueraded doms
+R$* < @ $=w . > $* $: $1 < @ $2 . @ $M > $3
+R$* < @ *LOCAL* > $* $: $1 < @ $j . @ $M > $2
+R$* < @ $+ @ > $* $: $1 < @ $2 > $3 $M is null
+R$* < @ $+ @ $+ > $* $: $1 < @ $3 . > $4 $M is not null
+
+###################################################################
+### Ruleset 94 -- convert envelope names to masqueraded form ###
+###################################################################
+
+S94
+R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
+
+###################################################################
+### Ruleset 98 -- local part of ruleset zero (can be null) ###
+###################################################################
+
+S98
+
+# addresses sent to foo@host.REDIRECT will give a 551 error code
+R$* < @ $+ .REDIRECT. > $: $1 < @ $2 . REDIRECT . > < ${opMode} >
+R$* < @ $+ .REDIRECT. > <i> $: $1 < @ $2 . REDIRECT. >
+R$* < @ $+ .REDIRECT. > < $- > $# error $@ 5.1.1 $: "551 User has moved; please try " <$1@$2>
+
+
+
+######################################################################
+### 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.
+###
+### Parameters:
+### $1 -- full recipient address
+###
+### Returns:
+### parsed, non-local-relaying address
+######################################################################
+
+SParseRecipient
+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<NO> $* < @ $* $=R > $: <RELAY> $1 < @ $2 $3 >
+
+R<RELAY> $* < @ $* > $@ $>ParseRecipient $1
+R<$-> $* $@ $2
+
+######################################################################
+### check_relay -- check hostname/address on SMTP startup
+######################################################################
+
+SLocal_check_relay
+Scheck_relay
+R$* $: $1 $| $>"Local_check_relay" $1
+R$* $| $* $| $#$* $#$3
+R$* $| $* $| $* $@ $>"Basic_check_relay" $1 $| $2
+
+SBasic_check_relay
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+
+
+######################################################################
+### check_mail -- check SMTP `MAIL FROM:' command argument
+######################################################################
+
+SLocal_check_mail
+Scheck_mail
+R$* $: $1 $| $>"Local_check_mail" $1
+R$* $| $#$* $#$2
+R$* $| $* $@ $>"Basic_check_mail" $1
+
+SBasic_check_mail
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+R<> $@ <OK>
+R$* $: <?> $>CanonAddr $1
+R<?> $* < @ $+ . > <?> $1 < @ $2 > strip trailing dots
+# handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc)
+R<?> $* < $* $=P > $* $: <OK> $1 < @ $2 $3 > $4
+R<?> $* < @ $+ > $* $: <? $(resolve $2 $: $2 <PERM> $) > $1 < @ $2 > $3
+R<? $* <$->> $* < @ $+ > $*
+ $: <$2> $3 < @ $4 > $5
+
+# handle case of @localhost on address
+R<$+> $* < @localhost > $: < ? $&{client_name} > <$1> $2 < @localhost >
+R<$+> $* < @localhost.$m >
+ $: < ? $&{client_name} > <$1> $2 < @localhost.$m >
+R<$+> $* < @localhost.UUCP >
+ $: < ? $&{client_name} > <$1> $2 < @localhost.UUCP >
+R<? $=w> <$+> $* <?> <$2> $3
+R<? $+> <$+> $* $#error $@ 5.5.4 $: "553 Real domain name required"
+R<?> <$+> $* $: <$1> $2
+
+
+# handle case of no @domain on address
+R<?> $* $: < ? $&{client_name} > $1
+R<?> $* $@ <OK> ...local unqualed ok
+R<? $+> $* $#error $@ 5.5.4 $: "553 Domain name required"
+ ...remote is not
+# check results
+R<?> $* $@ <OK>
+R<OK> $* $@ <OK>
+R<TEMP> $* $#error $@ 4.1.8 $: "451 Sender domain must resolve"
+R<PERM> $* $#error $@ 5.1.8 $: "501 Sender domain must exist"
+
+######################################################################
+### check_rcpt -- check SMTP `RCPT TO:' command argument
+######################################################################
+
+SLocal_check_rcpt
+Scheck_rcpt
+R$* $: $1 $| $>"Local_check_rcpt" $1
+R$* $| $#$* $#$2
+R$* $| $* $@ $>"Basic_check_rcpt" $1
+
+SBasic_check_rcpt
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+R$* $: $>ParseRecipient $1 strip relayable hosts
+
+
+
+
+# anything terminating locally is ok
+R$+ < @ $=w > $@ OK
+R$+ < @ $* $=R > $@ OK
+
+
+# check for local user (i.e. unqualified address)
+R$* $: <?> $1
+R<?> $* < @ $+ > $: <REMOTE> $1 < @ $2 >
+# local user is ok
+R<?> $+ $@ OK
+R<$+> $* $: $2
+
+# anything originating locally is ok
+R$* $: <?> $&{client_name}
+# check if bracketed IP address (forward lookup != reverse lookup)
+R<?> [$+] $: <BAD> [$1]
+# pass to name server to make hostname canonical
+R<?> $* $~P $: <?> $[ $1 $2 $]
+R<$-> $* $: $2
+R$* . $1 strip trailing dots
+R$@ $@ OK
+R$=w $@ OK
+R$* $=R $@ OK
+
+# check IP address
+R$* $: $&{client_addr}
+R$@ $@ OK originated locally
+R0 $@ OK originated locally
+R$=R $* $@ OK relayable IP address
+R$* $: [ $1 ] put brackets around it...
+R$=w $@ OK ... and see if it is local
+
+
+# anything else is bogus
+R$* $#error $@ 5.7.1 $: "550 Relaying denied"
+
+#
+######################################################################
+######################################################################
+#####
+##### MAILER DEFINITIONS
+#####
+######################################################################
+######################################################################
+
+
+##################################################
+### Local and Program Mailer specification ###
+##################################################
+
+##### @(#)local.m4 8.30 (Berkeley) 6/30/1998 #####
+
+Mlocal, P=/usr/bin/rmail, F=lsDFMAw5:/|@qm9, S=10/30, R=20/40,
+ T=DNS/RFC822/X-Unix,
+ A=rmail -d $u
+Mprog, P=/usr/bin/sh, F=lsDFMoqeu9, S=10/30, R=20/40, D=$z:/,
+ T=X-Unix,
+ A=sh -c $u
+
+#
+# Envelope sender rewriting
+#
+S10
+R<@> $n errors to mailer-daemon
+R@ <@ $*> $n temporarily bypass Sun bogosity
+R$+ $: $>50 $1 add local domain if needed
+R$* $: $>94 $1 do masquerading
+
+#
+# Envelope recipient rewriting
+#
+S20
+R$+ < @ $* > $: $1 strip host part
+
+#
+# Header sender rewriting
+#
+S30
+R<@> $n errors to mailer-daemon
+R@ <@ $*> $n temporarily bypass Sun bogosity
+R$+ $: $>50 $1 add local domain if needed
+R$* $: $>93 $1 do masquerading
+
+#
+# Header recipient rewriting
+#
+S40
+R$+ $: $>50 $1 add local domain if needed
+
+#
+# Common code to add local domain name (only if always-add-domain)
+#
+S50
+
+#####################################
+### SMTP Mailer specification ###
+#####################################
+
+##### @(#)smtp.m4 8.38 (Berkeley) 5/19/1998 #####
+
+Msmtp, P=[IPC], F=mDFMuX, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Mesmtp, P=[IPC], F=mDFMuXa, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Msmtp8, P=[IPC], F=mDFMuX8, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Mrelay, P=[IPC], F=mDFMuXa8, S=11/31, R=61, E=\r\n, L=2040,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+
+#
+# envelope sender rewriting
+#
+S11
+R$+ $: $>51 $1 sender/recipient common
+R$* :; <@> $@ list:; special case
+R$* $: $>61 $1 qualify unqual'ed names
+R$+ $: $>94 $1 do masquerading
+
+
+#
+# envelope recipient rewriting --
+# also header recipient if not masquerading recipients
+#
+S21
+R$+ $: $>51 $1 sender/recipient common
+R$+ $: $>61 $1 qualify unqual'ed names
+
+
+#
+# header sender and masquerading header recipient rewriting
+#
+S31
+R$+ $: $>51 $1 sender/recipient common
+R:; <@> $@ list:; special case
+
+# do special header rewriting
+R$* <@> $* $@ $1 <@> $2 pass null host through
+R< @ $* > $* $@ < @ $1 > $2 pass route-addr through
+R$* $: $>61 $1 qualify unqual'ed names
+R$+ $: $>93 $1 do masquerading
+
+
+#
+# convert pseudo-domain addresses to real domain addresses
+#
+S51
+
+# pass <route-addr>s through
+R< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr>
+
+# output fake domains as user%fake@relay
+
+# do UUCP heuristics; note that these are shared with UUCP mailers
+R$+ < @ $+ .UUCP. > $: < $2 ! > $1 convert to UUCP form
+R$+ < @ $* > $* $@ $1 < @ $2 > $3 not UUCP form
+
+# leave these in .UUCP form to avoid further tampering
+R< $&h ! > $- ! $+ $@ $2 < @ $1 .UUCP. >
+R< $&h ! > $-.$+ ! $+ $@ $3 < @ $1.$2 >
+R< $&h ! > $+ $@ $1 < @ $&h .UUCP. >
+R< $+ ! > $+ $: $1 ! $2 < @ $Y > use UUCP_RELAY
+R$+ < @ $+ : $+ > $@ $1 < @ $3 > strip mailer: part
+R$+ < @ > $: $1 < @ *LOCAL* > if no UUCP_RELAY
+
+
+#
+# common sender and masquerading recipient rewriting
+#
+S61
+
+R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified
+R$+ $@ $1 < @ *LOCAL* > add local qualification
+
+
+#
+# relay mailer header masquerading recipient rewriting
+#
+S71
+
+R$+ $: $>61 $1
+R$+ $: $>93 $1
diff --git a/usr.sbin/sendmail/cf/cf/generic-hpux10.mc b/usr.sbin/sendmail/cf/cf/generic-hpux10.mc
index 1a7eda90942..200050557c7 100644
--- a/usr.sbin/sendmail/cf/cf/generic-hpux10.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/generic-hpux9.cf b/usr.sbin/sendmail/cf/cf/generic-hpux9.cf
new file mode 100644
index 00000000000..5e8b207ee4a
--- /dev/null
+++ b/usr.sbin/sendmail/cf/cf/generic-hpux9.cf
@@ -0,0 +1,1055 @@
+#
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
+# Copyright (c) 1988, 1993
+# The Regents of the University of California. 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.
+#
+#
+
+######################################################################
+######################################################################
+#####
+##### SENDMAIL CONFIGURATION FILE
+#####
+##### built by gshapiro@knecht.Sendmail.ORG on Tue Dec 29 09:59:24 PST 1998
+##### in /home/knecht/a/eric/src/sendmail/cf/cf
+##### using ../ as configuration include directory
+#####
+######################################################################
+######################################################################
+
+##### @(#)cfhead.m4 8.23 (Berkeley) 10/6/1998 #####
+##### @(#)cf.m4 8.29 (Berkeley) 5/19/1998 #####
+##### @(#)generic-hpux9.mc 8.8 (Berkeley) 5/19/1998 #####
+
+##### @(#)hpux9.m4 8.19 (Berkeley) 10/6/1998 #####
+
+
+##### @(#)generic.m4 8.9 (Berkeley) 5/19/1998 #####
+
+##### @(#)redirect.m4 8.10 (Berkeley) 5/19/1998 #####
+
+
+
+
+##### @(#)use_cw_file.m4 8.6 (Berkeley) 5/19/1998 #####
+
+
+
+##### @(#)proto.m4 8.237 (Berkeley) 12/17/1998 #####
+
+
+# level 8 config file format
+V8/Berkeley
+
+# override file safeties - setting this option compromises system security
+# need to set this now for the sake of class files
+#O DontBlameSendmail=safe
+
+##################
+# local info #
+##################
+
+Cwlocalhost
+# file containing names of hosts for which we receive email
+Fw/etc/sendmail.cw
+
+# my official domain name
+# ... define this only if sendmail cannot automatically determine your domain
+#Dj$w.Foo.COM
+
+
+CP.
+
+# "Smart" relay host (may be null)
+DS
+
+
+# operators that cannot be in local usernames (i.e., network indicators)
+CO @ % !
+
+# a class with just dot (for identifying canonical names)
+C..
+
+# a class with just a left bracket (for identifying domain literals)
+C[[
+
+
+
+
+
+
+
+
+
+# Resolve map (to check if a host exists in check_mail)
+Kresolve host -a<OK> -T<TEMP>
+
+# Hosts that will permit relaying ($=R)
+FR-o /etc/mail/relay-domains
+
+# who I send unqualified names to (null means deliver locally)
+DR
+
+# who gets all local email traffic ($R has precedence for unqualified names)
+DH
+
+# dequoting map
+Kdequote dequote
+
+# class E: names that should be exposed as from this host, even if we masquerade
+# class L: names that should be delivered locally, even if we have a relay
+# class M: domains that should be converted to $M
+#CL root
+CE root
+
+# who I masquerade as (null for no masquerading) (see also $=M)
+DM
+
+# my name for error messages
+DnMAILER-DAEMON
+
+
+CPREDIRECT
+
+# Configuration version number
+DZ8.9.2
+
+
+###############
+# Options #
+###############
+
+# strip message body to 7 bits on input?
+O SevenBitInput=False
+
+# 8-bit data handling
+O EightBitMode=pass8
+
+
+# wait for alias file rebuild (default units: minutes)
+O AliasWait=10
+
+# location of alias file
+O AliasFile=/usr/lib/aliases
+
+# minimum number of free blocks on filesystem
+O MinFreeBlocks=100
+
+# maximum message size
+#O MaxMessageSize=1000000
+
+# substitution for space (blank) characters
+O BlankSub=.
+
+# avoid connecting to "expensive" mailers on initial submission?
+O HoldExpensive=False
+
+# checkpoint queue runs after every N successful deliveries
+#O CheckpointInterval=10
+
+# default delivery mode
+O DeliveryMode=background
+
+# automatically rebuild the alias database?
+#O AutoRebuildAliases
+
+# error message header/file
+#O ErrorHeader=/etc/sendmail.oE
+
+# error mode
+#O ErrorMode=print
+
+# save Unix-style "From_" lines at top of header?
+#O SaveFromLine
+
+# temporary file mode
+O TempFileMode=0600
+
+# match recipients against GECOS field?
+#O MatchGECOS
+
+# maximum hop count
+#O MaxHopCount=17
+
+# location of help file
+O HelpFile=/usr/lib/sendmail.hf
+
+# ignore dots as terminators in incoming messages?
+#O IgnoreDots
+
+# name resolver options
+#O ResolverOptions=+AAONLY
+
+# deliver MIME-encapsulated error messages?
+O SendMimeErrors=True
+
+# Forward file search path
+O ForwardPath=$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward
+
+# open connection cache size
+O ConnectionCacheSize=2
+
+# open connection cache timeout
+O ConnectionCacheTimeout=5m
+
+# persistent host status directory
+#O HostStatusDirectory=.hoststat
+
+# single thread deliveries (requires HostStatusDirectory)?
+#O SingleThreadDelivery
+
+# use Errors-To: header?
+O UseErrorsTo=False
+
+# log level
+O LogLevel=9
+
+# send to me too, even in an alias expansion?
+#O MeToo
+
+# verify RHS in newaliases?
+O CheckAliases=False
+
+# default messages to old style headers if no special punctuation?
+O OldStyleHeaders=True
+
+# SMTP daemon options
+#O DaemonPortOptions=Port=esmtp
+
+# privacy flags
+O PrivacyOptions=authwarnings
+
+# who (if anyone) should get extra copies of error messages
+#O PostMasterCopy=Postmaster
+
+# slope of queue-only function
+#O QueueFactor=600000
+
+# queue directory
+O QueueDirectory=/usr/spool/mqueue
+
+# timeouts (many of these)
+#O Timeout.initial=5m
+#O Timeout.connect=5m
+#O Timeout.iconnect=5m
+#O Timeout.helo=5m
+#O Timeout.mail=10m
+#O Timeout.rcpt=1h
+#O Timeout.datainit=5m
+#O Timeout.datablock=1h
+#O Timeout.datafinal=1h
+#O Timeout.rset=5m
+#O Timeout.quit=2m
+#O Timeout.misc=2m
+#O Timeout.command=1h
+#O Timeout.ident=30s
+#O Timeout.fileopen=60s
+O Timeout.queuereturn=5d
+#O Timeout.queuereturn.normal=5d
+#O Timeout.queuereturn.urgent=2d
+#O Timeout.queuereturn.non-urgent=7d
+O Timeout.queuewarn=4h
+#O Timeout.queuewarn.normal=4h
+#O Timeout.queuewarn.urgent=1h
+#O Timeout.queuewarn.non-urgent=12h
+#O Timeout.hoststatus=30m
+
+# should we not prune routes in route-addr syntax addresses?
+#O DontPruneRoutes
+
+# queue up everything before forking?
+O SuperSafe=True
+
+# status file
+O StatusFile=/usr/lib/sendmail.st
+
+# time zone handling:
+# if undefined, use system default
+# if defined but null, use TZ envariable passed in
+# if defined and non-null, use that info
+O TimeZoneSpec=
+
+# default UID (can be username or userid:groupid)
+#O DefaultUser=mailnull
+
+# list of locations of user database file (null means no lookup)
+#O UserDatabaseSpec=/etc/userdb
+
+# fallback MX host
+#O FallbackMXhost=fall.back.host.net
+
+# if we are the best MX host for a site, try it directly instead of config err
+#O TryNullMXList
+
+# load average at which we just queue messages
+#O QueueLA=8
+
+# load average at which we refuse connections
+#O RefuseLA=12
+
+# maximum number of children we allow at one time
+#O MaxDaemonChildren=12
+
+# maximum number of new connections per second
+#O ConnectionRateThrottle=3
+
+# work recipient factor
+#O RecipientFactor=30000
+
+# deliver each queued job in a separate process?
+#O ForkEachJob
+
+# work class factor
+#O ClassFactor=1800
+
+# work time factor
+#O RetryFactor=90000
+
+# shall we sort the queue by hostname first?
+#O QueueSortOrder=priority
+
+# minimum time in queue before retry
+#O MinQueueAge=30m
+
+# default character set
+#O DefaultCharSet=iso-8859-1
+
+# service switch file (ignored on Solaris, Ultrix, OSF/1, others)
+#O ServiceSwitchFile=/etc/service.switch
+
+# hosts file (normally /etc/hosts)
+#O HostsFile=/etc/hosts
+
+# dialup line delay on connection failure
+#O DialDelay=10s
+
+# action to take if there are no recipients in the message
+#O NoRecipientAction=add-to-undisclosed
+
+# chrooted environment for writing to files
+#O SafeFileEnvironment=/arch
+
+# are colons OK in addresses?
+#O ColonOkInAddr
+
+# how many jobs can you process in the queue?
+#O MaxQueueRunSize=10000
+
+# shall I avoid expanding CNAMEs (violates protocols)?
+#O DontExpandCnames
+
+# SMTP initial login message (old $e macro)
+O SmtpGreetingMessage=$j Sendmail $v/$Z; $b
+
+# UNIX initial From header format (old $l macro)
+O UnixFromLine=From $g $d
+
+# From: lines that have embedded newlines are unwrapped onto one line
+#O SingleLineFromHeader=False
+
+# Allow HELO SMTP command that does not include a host name
+#O AllowBogusHELO=False
+
+# Characters to be quoted in a full name phrase (@,;:\()[] are automatic)
+#O MustQuoteChars=.
+
+# delimiter (operator) characters (old $o macro)
+O OperatorChars=.:%@!^/[]+
+
+# shall I avoid calling initgroups(3) because of high NIS costs?
+#O DontInitGroups
+
+# are group-writable :include: and .forward files (un)trustworthy?
+#O UnsafeGroupWrites
+
+# where do errors that occur when sending errors get sent?
+#O DoubleBounceAddress=postmaster
+
+# what user id do we assume for the majority of the processing?
+#O RunAsUser=sendmail
+
+# maximum number of recipients per SMTP envelope
+#O MaxRecipientsPerMessage=100
+
+# shall we get local names from our installed interfaces?
+#O DontProbeInterfaces
+
+
+
+
+
+###########################
+# Message precedences #
+###########################
+
+Pfirst-class=0
+Pspecial-delivery=100
+Plist=-30
+Pbulk=-60
+Pjunk=-100
+
+#####################
+# Trusted users #
+#####################
+
+# this is equivalent to setting class "t"
+#Ft/etc/sendmail.ct
+Troot
+Tdaemon
+Tuucp
+
+#########################
+# Format of headers #
+#########################
+
+H?P?Return-Path: <$g>
+HReceived: $?sfrom $s $.$?_($?s$|from $.$_)
+ $.by $j ($v/$Z)$?r with $r$. id $i$?u
+ for $u; $|;
+ $.$b
+H?D?Resent-Date: $a
+H?D?Date: $a
+H?F?Resent-From: $?x$x <$g>$|$g$.
+H?F?From: $?x$x <$g>$|$g$.
+H?x?Full-Name: $x
+# HPosted-Date: $a
+# H?l?Received-Date: $b
+H?M?Resent-Message-Id: <$t.$i@$j>
+H?M?Message-Id: <$t.$i@$j>
+#
+######################################################################
+######################################################################
+#####
+##### REWRITING RULES
+#####
+######################################################################
+######################################################################
+
+############################################
+### Ruleset 3 -- Name Canonicalization ###
+############################################
+S3
+
+# handle null input (translate to <@> special case)
+R$@ $@ <@>
+
+# strip group: syntax (not inside angle brackets!) and trailing semicolon
+R$* $: $1 <@> mark addresses
+R$* < $* > $* <@> $: $1 < $2 > $3 unmark <addr>
+R@ $* <@> $: @ $1 unmark @host:...
+R$* :: $* <@> $: $1 :: $2 unmark node::addr
+R:include: $* <@> $: :include: $1 unmark :include:...
+R$* [ $* : $* ] <@> $: $1 [ $2 : $3 ] unmark IPv6 addrs
+R$* : $* [ $* ] $: $1 : $2 [ $3 ] <@> remark if leading colon
+R$* : $* <@> $: $2 strip colon if marked
+R$* <@> $: $1 unmark
+R$* ; $1 strip trailing semi
+R$* < $* ; > $1 < $2 > bogus bracketed semi
+
+# null input now results from list:; syntax
+R$@ $@ :; <@>
+
+# strip angle brackets -- note RFC733 heuristic to get innermost item
+R$* $: < $1 > housekeeping <>
+R$+ < $* > < $2 > strip excess on left
+R< $* > $+ < $1 > strip excess on right
+R<> $@ < @ > MAIL FROM:<> case
+R< $+ > $: $1 remove housekeeping <>
+
+# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
+R@ $+ , $+ @ $1 : $2 change all "," to ":"
+
+# localize and dispose of route-based addresses
+R@ $+ : $+ $@ $>96 < @$1 > : $2 handle <route-addr>
+
+# find focus for list syntax
+R $+ : $* ; @ $+ $@ $>96 $1 : $2 ; < @ $3 > list syntax
+R $+ : $* ; $@ $1 : $2; list syntax
+
+# find focus for @ syntax addresses
+R$+ @ $+ $: $1 < @ $2 > focus on domain
+R$+ < $+ @ $+ > $1 $2 < @ $3 > move gaze right
+R$+ < @ $+ > $@ $>96 $1 < @ $2 > already canonical
+
+# do some sanity checking
+R$* < @ $* : $* > $* $1 < @ $2 $3 > $4 nix colons in addrs
+
+# convert old-style addresses to a domain-based address
+R$- ! $+ $@ $>96 $2 < @ $1 .UUCP > resolve uucp names
+R$+ . $- ! $+ $@ $>96 $3 < @ $1 . $2 > domain uucps
+R$+ ! $+ $@ $>96 $2 < @ $1 .UUCP > uucp subdomains
+
+# if we have % signs, take the rightmost one
+R$* % $* $1 @ $2 First make them all @s.
+R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last.
+R$* @ $* $@ $>96 $1 < @ $2 > Insert < > and finish
+
+# else we must be a local name
+R$* $@ $>96 $1
+
+
+################################################
+### Ruleset 96 -- bottom half of ruleset 3 ###
+################################################
+
+S96
+
+# handle special cases for local names
+R$* < @ localhost > $* $: $1 < @ $j . > $2 no domain at all
+R$* < @ localhost . $m > $* $: $1 < @ $j . > $2 local domain
+R$* < @ localhost . UUCP > $* $: $1 < @ $j . > $2 .UUCP domain
+R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [a.b.c.d]
+R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal
+R$* < @@ $+ > $* $@ $1 < @ $2 > $3 canon IP addr
+
+
+
+
+
+# if really UUCP, handle it immediately
+
+# try UUCP traffic as a local address
+R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3
+R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3
+
+# pass to name server to make hostname canonical
+R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4
+
+# local host aliases and pseudo-domains are always canonical
+R$* < @ $=w > $* $: $1 < @ $2 . > $3
+R$* < @ $j > $* $: $1 < @ $j . > $2
+R$* < @ $=M > $* $: $1 < @ $2 . > $3
+R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4
+R$* < @ $* . . > $* $1 < @ $2 . > $3
+
+
+##################################################
+### Ruleset 4 -- Final Output Post-rewriting ###
+##################################################
+S4
+
+R$* <@> $@ handle <> and list:;
+
+# strip trailing dot off possibly canonical name
+R$* < @ $+ . > $* $1 < @ $2 > $3
+
+# eliminate internal code -- should never get this far!
+R$* < @ *LOCAL* > $* $1 < @ $j > $2
+
+# externalize local domain info
+R$* < $+ > $* $1 $2 $3 defocus
+R@ $+ : @ $+ : $+ @ $1 , @ $2 : $3 <route-addr> canonical
+R@ $* $@ @ $1 ... and exit
+
+# UUCP must always be presented in old form
+R$+ @ $- . UUCP $2!$1 u@h.UUCP => h!u
+
+# delete duplicate local names
+R$+ % $=w @ $=w $1 @ $2 u%host@host => u@host
+
+
+
+##############################################################
+### Ruleset 97 -- recanonicalize and call ruleset zero ###
+### (used for recursive calls) ###
+##############################################################
+
+S97
+R$* $: $>3 $1
+R$* $@ $>0 $1
+
+
+######################################
+### Ruleset 0 -- Parse Address ###
+######################################
+
+S0
+
+R$* $: $>Parse0 $1 initial parsing
+R<@> $#local $: <@> special case error msgs
+R$* $: $>98 $1 handle local hacks
+R$* $: $>Parse1 $1 final parsing
+
+#
+# Parse0 -- do initial syntax checking and eliminate local addresses.
+# This should either return with the (possibly modified) input
+# or return with a #error mailer. It should not return with a
+# #mailer other than the #error mailer.
+#
+
+SParse0
+R<@> $@ <@> special case error msgs
+R$* : $* ; <@> $#error $@ 5.1.3 $: "List:; syntax illegal for recipient addresses"
+#R@ <@ $* > < @ $1 > catch "@@host" bogosity
+R<@ $+> $#error $@ 5.1.3 $: "User address required"
+R$* $: <> $1
+R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3
+R<> $* <$* : $* > $* $#error $@ 5.1.3 $: "Colon illegal in host name part"
+R<> $* $1
+R$* < @ . $* > $* $#error $@ 5.1.2 $: "Invalid host name"
+R$* < @ $* .. $* > $* $#error $@ 5.1.2 $: "Invalid host name"
+
+# now delete the local info -- note $=O to find characters that cause forwarding
+R$* < @ > $* $@ $>Parse0 $>3 $1 user@ => user
+R< @ $=w . > : $* $@ $>Parse0 $>3 $2 @here:... -> ...
+R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here
+R< @ $+ > $#error $@ 5.1.3 $: "User address required"
+R$* $=O $* < @ $=w . > $@ $>Parse0 $>3 $1 $2 $3 ...@here -> ...
+R$- $: $(dequote $1 $) < @ *LOCAL* > dequote "foo"
+R< @ *LOCAL* > $#error $@ 5.1.3 $: "User address required"
+R$* $=O $* < @ *LOCAL* >
+ $@ $>Parse0 $>3 $1 $2 $3 ...@*LOCAL* -> ...
+R$* < @ *LOCAL* > $: $1
+
+#
+# Parse1 -- the bottom half of ruleset 0.
+#
+
+SParse1
+# handle numeric address spec
+R$* < @ [ $+ ] > $* $: $>98 $1 < @ [ $2 ] > $3 numeric internet spec
+R$* < @ [ $+ ] > $* $#esmtp $@ [$2] $: $1 < @ [$2] > $3 still numeric: send
+
+
+# short circuit local delivery so forwarded email works
+R$=L < @ $=w . > $#local $: @ $1 special local names
+R$+ < @ $=w . > $#local $: $1 regular local name
+
+
+# resolve remotely connected UUCP links (if any)
+
+# resolve fake top level domains by forwarding to other hosts
+
+
+
+# pass names that still have a host to a smarthost (if defined)
+R$* < @ $* > $* $: $>95 < $S > $1 < @ $2 > $3 glue on smarthost name
+
+# deal with other remote names
+R$* < @$* > $* $#esmtp $@ $2 $: $1 < @ $2 > $3 user@host.domain
+
+# handle locally delivered names
+R$=L $#local $: @ $1 special local names
+R$+ $#local $: $1 regular local names
+
+###########################################################################
+### Ruleset 5 -- special rewriting after aliases have been expanded ###
+###########################################################################
+
+S5
+
+# deal with plussed users so aliases work nicely
+R$+ + * $#local $@ $&h $: $1
+R$+ + $* $#local $@ + $2 $: $1 + *
+
+# prepend an empty "forward host" on the front
+R$+ $: <> $1
+
+
+# see if we have a relay or a hub
+R< > $+ $: < $H > $1 try hub
+R< > $+ $: < $R > $1 try relay
+R< > $+ $: < > < $1 $&h > nope, restore +detail
+R< > < $+ + $* > $* < > < $1 > + $2 $3 find the user part
+R< > < $+ > + $* $#local $@ $2 $: @ $1 strip the extra +
+R< > < $+ > $@ $1 no +detail
+R$+ $: $1 $&h add +detail back in
+R< local : $* > $* $: $>95 < local : $1 > $2 no host extension
+R< error : $* > $* $: $>95 < error : $1 > $2 no host extension
+R< $- : $+ > $+ $: $>95 < $1 : $2 > $3 < @ $2 >
+R< $+ > $+ $@ $>95 < $1 > $2 < @ $1 >
+
+
+###################################################################
+### Ruleset 95 -- canonify mailer:[user@]host syntax to triple ###
+###################################################################
+
+S95
+R< > $* $@ $1 strip off null relay
+R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
+R< local : $* > $* $>CanonLocal < $1 > $2
+R< $- : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user
+R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
+R< $=w > $* $@ $2 delete local host
+R< $+ > $* $#relay $@ $1 $: $2 use unqualified mailer
+
+###################################################################
+### Ruleset CanonLocal -- canonify local: syntax ###
+###################################################################
+
+SCanonLocal
+# strip trailing dot from any host name that may appear
+R< $* > $* < @ $* . > $: < $1 > $2 < @ $3 >
+
+# handle local: syntax -- use old user, either with or without host
+R< > $* < @ $* > $* $#local $@ $1@$2 $: $1
+R< > $+ $#local $@ $1 $: $1
+
+# handle local:user@host syntax -- ignore host part
+R< $+ @ $+ > $* < @ $* > $: < $1 > $3 < @ $4 >
+
+# handle local:user syntax
+R< $+ > $* <@ $* > $* $#local $@ $2@$3 $: $1
+R< $+ > $* $#local $@ $2 $: $1
+
+###################################################################
+### Ruleset 93 -- convert header names to masqueraded form ###
+###################################################################
+
+S93
+
+
+# special case the users that should be exposed
+R$=E < @ *LOCAL* > $@ $1 < @ $j . > leave exposed
+R$=E < @ $=M . > $@ $1 < @ $2 . >
+R$=E < @ $=w . > $@ $1 < @ $2 . >
+
+# handle domain-specific masquerading
+R$* < @ $=M . > $* $: $1 < @ $2 . @ $M > $3 convert masqueraded doms
+R$* < @ $=w . > $* $: $1 < @ $2 . @ $M > $3
+R$* < @ *LOCAL* > $* $: $1 < @ $j . @ $M > $2
+R$* < @ $+ @ > $* $: $1 < @ $2 > $3 $M is null
+R$* < @ $+ @ $+ > $* $: $1 < @ $3 . > $4 $M is not null
+
+###################################################################
+### Ruleset 94 -- convert envelope names to masqueraded form ###
+###################################################################
+
+S94
+R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
+
+###################################################################
+### Ruleset 98 -- local part of ruleset zero (can be null) ###
+###################################################################
+
+S98
+
+# addresses sent to foo@host.REDIRECT will give a 551 error code
+R$* < @ $+ .REDIRECT. > $: $1 < @ $2 . REDIRECT . > < ${opMode} >
+R$* < @ $+ .REDIRECT. > <i> $: $1 < @ $2 . REDIRECT. >
+R$* < @ $+ .REDIRECT. > < $- > $# error $@ 5.1.1 $: "551 User has moved; please try " <$1@$2>
+
+
+
+######################################################################
+### 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.
+###
+### Parameters:
+### $1 -- full recipient address
+###
+### Returns:
+### parsed, non-local-relaying address
+######################################################################
+
+SParseRecipient
+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<NO> $* < @ $* $=R > $: <RELAY> $1 < @ $2 $3 >
+
+R<RELAY> $* < @ $* > $@ $>ParseRecipient $1
+R<$-> $* $@ $2
+
+######################################################################
+### check_relay -- check hostname/address on SMTP startup
+######################################################################
+
+SLocal_check_relay
+Scheck_relay
+R$* $: $1 $| $>"Local_check_relay" $1
+R$* $| $* $| $#$* $#$3
+R$* $| $* $| $* $@ $>"Basic_check_relay" $1 $| $2
+
+SBasic_check_relay
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+
+
+######################################################################
+### check_mail -- check SMTP `MAIL FROM:' command argument
+######################################################################
+
+SLocal_check_mail
+Scheck_mail
+R$* $: $1 $| $>"Local_check_mail" $1
+R$* $| $#$* $#$2
+R$* $| $* $@ $>"Basic_check_mail" $1
+
+SBasic_check_mail
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+R<> $@ <OK>
+R$* $: <?> $>CanonAddr $1
+R<?> $* < @ $+ . > <?> $1 < @ $2 > strip trailing dots
+# handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc)
+R<?> $* < $* $=P > $* $: <OK> $1 < @ $2 $3 > $4
+R<?> $* < @ $+ > $* $: <? $(resolve $2 $: $2 <PERM> $) > $1 < @ $2 > $3
+R<? $* <$->> $* < @ $+ > $*
+ $: <$2> $3 < @ $4 > $5
+
+# handle case of @localhost on address
+R<$+> $* < @localhost > $: < ? $&{client_name} > <$1> $2 < @localhost >
+R<$+> $* < @localhost.$m >
+ $: < ? $&{client_name} > <$1> $2 < @localhost.$m >
+R<$+> $* < @localhost.UUCP >
+ $: < ? $&{client_name} > <$1> $2 < @localhost.UUCP >
+R<? $=w> <$+> $* <?> <$2> $3
+R<? $+> <$+> $* $#error $@ 5.5.4 $: "553 Real domain name required"
+R<?> <$+> $* $: <$1> $2
+
+
+# handle case of no @domain on address
+R<?> $* $: < ? $&{client_name} > $1
+R<?> $* $@ <OK> ...local unqualed ok
+R<? $+> $* $#error $@ 5.5.4 $: "553 Domain name required"
+ ...remote is not
+# check results
+R<?> $* $@ <OK>
+R<OK> $* $@ <OK>
+R<TEMP> $* $#error $@ 4.1.8 $: "451 Sender domain must resolve"
+R<PERM> $* $#error $@ 5.1.8 $: "501 Sender domain must exist"
+
+######################################################################
+### check_rcpt -- check SMTP `RCPT TO:' command argument
+######################################################################
+
+SLocal_check_rcpt
+Scheck_rcpt
+R$* $: $1 $| $>"Local_check_rcpt" $1
+R$* $| $#$* $#$2
+R$* $| $* $@ $>"Basic_check_rcpt" $1
+
+SBasic_check_rcpt
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+R$* $: $>ParseRecipient $1 strip relayable hosts
+
+
+
+
+# anything terminating locally is ok
+R$+ < @ $=w > $@ OK
+R$+ < @ $* $=R > $@ OK
+
+
+# check for local user (i.e. unqualified address)
+R$* $: <?> $1
+R<?> $* < @ $+ > $: <REMOTE> $1 < @ $2 >
+# local user is ok
+R<?> $+ $@ OK
+R<$+> $* $: $2
+
+# anything originating locally is ok
+R$* $: <?> $&{client_name}
+# check if bracketed IP address (forward lookup != reverse lookup)
+R<?> [$+] $: <BAD> [$1]
+# pass to name server to make hostname canonical
+R<?> $* $~P $: <?> $[ $1 $2 $]
+R<$-> $* $: $2
+R$* . $1 strip trailing dots
+R$@ $@ OK
+R$=w $@ OK
+R$* $=R $@ OK
+
+# check IP address
+R$* $: $&{client_addr}
+R$@ $@ OK originated locally
+R0 $@ OK originated locally
+R$=R $* $@ OK relayable IP address
+R$* $: [ $1 ] put brackets around it...
+R$=w $@ OK ... and see if it is local
+
+
+# anything else is bogus
+R$* $#error $@ 5.7.1 $: "550 Relaying denied"
+
+#
+######################################################################
+######################################################################
+#####
+##### MAILER DEFINITIONS
+#####
+######################################################################
+######################################################################
+
+
+##################################################
+### Local and Program Mailer specification ###
+##################################################
+
+##### @(#)local.m4 8.30 (Berkeley) 6/30/1998 #####
+
+Mlocal, P=/bin/rmail, F=lsDFMAw5:/|@qm9, S=10/30, R=20/40,
+ T=DNS/RFC822/X-Unix,
+ A=rmail -d $u
+Mprog, P=/bin/sh, F=lsDFMoqeu9, S=10/30, R=20/40, D=$z:/,
+ T=X-Unix,
+ A=sh -c $u
+
+#
+# Envelope sender rewriting
+#
+S10
+R<@> $n errors to mailer-daemon
+R@ <@ $*> $n temporarily bypass Sun bogosity
+R$+ $: $>50 $1 add local domain if needed
+R$* $: $>94 $1 do masquerading
+
+#
+# Envelope recipient rewriting
+#
+S20
+R$+ < @ $* > $: $1 strip host part
+
+#
+# Header sender rewriting
+#
+S30
+R<@> $n errors to mailer-daemon
+R@ <@ $*> $n temporarily bypass Sun bogosity
+R$+ $: $>50 $1 add local domain if needed
+R$* $: $>93 $1 do masquerading
+
+#
+# Header recipient rewriting
+#
+S40
+R$+ $: $>50 $1 add local domain if needed
+
+#
+# Common code to add local domain name (only if always-add-domain)
+#
+S50
+
+#####################################
+### SMTP Mailer specification ###
+#####################################
+
+##### @(#)smtp.m4 8.38 (Berkeley) 5/19/1998 #####
+
+Msmtp, P=[IPC], F=mDFMuX, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Mesmtp, P=[IPC], F=mDFMuXa, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Msmtp8, P=[IPC], F=mDFMuX8, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Mrelay, P=[IPC], F=mDFMuXa8, S=11/31, R=61, E=\r\n, L=2040,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+
+#
+# envelope sender rewriting
+#
+S11
+R$+ $: $>51 $1 sender/recipient common
+R$* :; <@> $@ list:; special case
+R$* $: $>61 $1 qualify unqual'ed names
+R$+ $: $>94 $1 do masquerading
+
+
+#
+# envelope recipient rewriting --
+# also header recipient if not masquerading recipients
+#
+S21
+R$+ $: $>51 $1 sender/recipient common
+R$+ $: $>61 $1 qualify unqual'ed names
+
+
+#
+# header sender and masquerading header recipient rewriting
+#
+S31
+R$+ $: $>51 $1 sender/recipient common
+R:; <@> $@ list:; special case
+
+# do special header rewriting
+R$* <@> $* $@ $1 <@> $2 pass null host through
+R< @ $* > $* $@ < @ $1 > $2 pass route-addr through
+R$* $: $>61 $1 qualify unqual'ed names
+R$+ $: $>93 $1 do masquerading
+
+
+#
+# convert pseudo-domain addresses to real domain addresses
+#
+S51
+
+# pass <route-addr>s through
+R< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr>
+
+# output fake domains as user%fake@relay
+
+# do UUCP heuristics; note that these are shared with UUCP mailers
+R$+ < @ $+ .UUCP. > $: < $2 ! > $1 convert to UUCP form
+R$+ < @ $* > $* $@ $1 < @ $2 > $3 not UUCP form
+
+# leave these in .UUCP form to avoid further tampering
+R< $&h ! > $- ! $+ $@ $2 < @ $1 .UUCP. >
+R< $&h ! > $-.$+ ! $+ $@ $3 < @ $1.$2 >
+R< $&h ! > $+ $@ $1 < @ $&h .UUCP. >
+R< $+ ! > $+ $: $1 ! $2 < @ $Y > use UUCP_RELAY
+R$+ < @ $+ : $+ > $@ $1 < @ $3 > strip mailer: part
+R$+ < @ > $: $1 < @ *LOCAL* > if no UUCP_RELAY
+
+
+#
+# common sender and masquerading recipient rewriting
+#
+S61
+
+R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified
+R$+ $@ $1 < @ *LOCAL* > add local qualification
+
+
+#
+# relay mailer header masquerading recipient rewriting
+#
+S71
+
+R$+ $: $>61 $1
+R$+ $: $>93 $1
diff --git a/usr.sbin/sendmail/cf/cf/generic-hpux9.mc b/usr.sbin/sendmail/cf/cf/generic-hpux9.mc
index 6aaf3b65e3d..531b4eec557 100644
--- a/usr.sbin/sendmail/cf/cf/generic-hpux9.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/generic-nextstep3.3.mc b/usr.sbin/sendmail/cf/cf/generic-nextstep3.3.mc
index 5c81faaf6e7..1511ce7bb91 100644
--- a/usr.sbin/sendmail/cf/cf/generic-nextstep3.3.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/generic-osf1.cf b/usr.sbin/sendmail/cf/cf/generic-osf1.cf
new file mode 100644
index 00000000000..0cf4bb39d66
--- /dev/null
+++ b/usr.sbin/sendmail/cf/cf/generic-osf1.cf
@@ -0,0 +1,1055 @@
+#
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
+# Copyright (c) 1988, 1993
+# The Regents of the University of California. 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.
+#
+#
+
+######################################################################
+######################################################################
+#####
+##### SENDMAIL CONFIGURATION FILE
+#####
+##### built by gshapiro@knecht.Sendmail.ORG on Tue Dec 29 09:59:25 PST 1998
+##### in /home/knecht/a/eric/src/sendmail/cf/cf
+##### using ../ as configuration include directory
+#####
+######################################################################
+######################################################################
+
+##### @(#)cfhead.m4 8.23 (Berkeley) 10/6/1998 #####
+##### @(#)cf.m4 8.29 (Berkeley) 5/19/1998 #####
+##### @(#)generic-osf1.mc 8.8 (Berkeley) 5/19/1998 #####
+
+##### @(#)osf1.m4 8.11 (Berkeley) 10/6/1998 #####
+
+
+##### @(#)generic.m4 8.9 (Berkeley) 5/19/1998 #####
+
+##### @(#)redirect.m4 8.10 (Berkeley) 5/19/1998 #####
+
+
+
+
+##### @(#)use_cw_file.m4 8.6 (Berkeley) 5/19/1998 #####
+
+
+
+##### @(#)proto.m4 8.237 (Berkeley) 12/17/1998 #####
+
+
+# level 8 config file format
+V8/Berkeley
+
+# override file safeties - setting this option compromises system security
+# need to set this now for the sake of class files
+#O DontBlameSendmail=safe
+
+##################
+# local info #
+##################
+
+Cwlocalhost
+# file containing names of hosts for which we receive email
+Fw/etc/sendmail.cw
+
+# my official domain name
+# ... define this only if sendmail cannot automatically determine your domain
+#Dj$w.Foo.COM
+
+
+CP.
+
+# "Smart" relay host (may be null)
+DS
+
+
+# operators that cannot be in local usernames (i.e., network indicators)
+CO @ % !
+
+# a class with just dot (for identifying canonical names)
+C..
+
+# a class with just a left bracket (for identifying domain literals)
+C[[
+
+
+
+
+
+
+
+
+
+# Resolve map (to check if a host exists in check_mail)
+Kresolve host -a<OK> -T<TEMP>
+
+# Hosts that will permit relaying ($=R)
+FR-o /etc/mail/relay-domains
+
+# who I send unqualified names to (null means deliver locally)
+DR
+
+# who gets all local email traffic ($R has precedence for unqualified names)
+DH
+
+# dequoting map
+Kdequote dequote
+
+# class E: names that should be exposed as from this host, even if we masquerade
+# class L: names that should be delivered locally, even if we have a relay
+# class M: domains that should be converted to $M
+#CL root
+CE root
+
+# who I masquerade as (null for no masquerading) (see also $=M)
+DM
+
+# my name for error messages
+DnMAILER-DAEMON
+
+
+CPREDIRECT
+
+# Configuration version number
+DZ8.9.2
+
+
+###############
+# Options #
+###############
+
+# strip message body to 7 bits on input?
+O SevenBitInput=False
+
+# 8-bit data handling
+O EightBitMode=pass8
+
+
+# wait for alias file rebuild (default units: minutes)
+O AliasWait=10
+
+# location of alias file
+O AliasFile=/usr/adm/sendmail/aliases
+
+# minimum number of free blocks on filesystem
+O MinFreeBlocks=100
+
+# maximum message size
+#O MaxMessageSize=1000000
+
+# substitution for space (blank) characters
+O BlankSub=.
+
+# avoid connecting to "expensive" mailers on initial submission?
+O HoldExpensive=False
+
+# checkpoint queue runs after every N successful deliveries
+#O CheckpointInterval=10
+
+# default delivery mode
+O DeliveryMode=background
+
+# automatically rebuild the alias database?
+#O AutoRebuildAliases
+
+# error message header/file
+#O ErrorHeader=/etc/sendmail.oE
+
+# error mode
+#O ErrorMode=print
+
+# save Unix-style "From_" lines at top of header?
+#O SaveFromLine
+
+# temporary file mode
+O TempFileMode=0600
+
+# match recipients against GECOS field?
+#O MatchGECOS
+
+# maximum hop count
+#O MaxHopCount=17
+
+# location of help file
+O HelpFile=/usr/share/lib/sendmail.hf
+
+# ignore dots as terminators in incoming messages?
+#O IgnoreDots
+
+# name resolver options
+#O ResolverOptions=+AAONLY
+
+# deliver MIME-encapsulated error messages?
+O SendMimeErrors=True
+
+# Forward file search path
+O ForwardPath=$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward
+
+# open connection cache size
+O ConnectionCacheSize=2
+
+# open connection cache timeout
+O ConnectionCacheTimeout=5m
+
+# persistent host status directory
+#O HostStatusDirectory=.hoststat
+
+# single thread deliveries (requires HostStatusDirectory)?
+#O SingleThreadDelivery
+
+# use Errors-To: header?
+O UseErrorsTo=False
+
+# log level
+O LogLevel=9
+
+# send to me too, even in an alias expansion?
+#O MeToo
+
+# verify RHS in newaliases?
+O CheckAliases=False
+
+# default messages to old style headers if no special punctuation?
+O OldStyleHeaders=True
+
+# SMTP daemon options
+#O DaemonPortOptions=Port=esmtp
+
+# privacy flags
+O PrivacyOptions=authwarnings
+
+# who (if anyone) should get extra copies of error messages
+#O PostMasterCopy=Postmaster
+
+# slope of queue-only function
+#O QueueFactor=600000
+
+# queue directory
+O QueueDirectory=/var/spool/mqueue
+
+# timeouts (many of these)
+#O Timeout.initial=5m
+#O Timeout.connect=5m
+#O Timeout.iconnect=5m
+#O Timeout.helo=5m
+#O Timeout.mail=10m
+#O Timeout.rcpt=1h
+#O Timeout.datainit=5m
+#O Timeout.datablock=1h
+#O Timeout.datafinal=1h
+#O Timeout.rset=5m
+#O Timeout.quit=2m
+#O Timeout.misc=2m
+#O Timeout.command=1h
+#O Timeout.ident=30s
+#O Timeout.fileopen=60s
+O Timeout.queuereturn=5d
+#O Timeout.queuereturn.normal=5d
+#O Timeout.queuereturn.urgent=2d
+#O Timeout.queuereturn.non-urgent=7d
+O Timeout.queuewarn=4h
+#O Timeout.queuewarn.normal=4h
+#O Timeout.queuewarn.urgent=1h
+#O Timeout.queuewarn.non-urgent=12h
+#O Timeout.hoststatus=30m
+
+# should we not prune routes in route-addr syntax addresses?
+#O DontPruneRoutes
+
+# queue up everything before forking?
+O SuperSafe=True
+
+# status file
+O StatusFile=/usr/adm/sendmail/sendmail.st
+
+# time zone handling:
+# if undefined, use system default
+# if defined but null, use TZ envariable passed in
+# if defined and non-null, use that info
+#O TimeZoneSpec=
+
+# default UID (can be username or userid:groupid)
+O DefaultUser=daemon
+
+# list of locations of user database file (null means no lookup)
+#O UserDatabaseSpec=/etc/userdb
+
+# fallback MX host
+#O FallbackMXhost=fall.back.host.net
+
+# if we are the best MX host for a site, try it directly instead of config err
+#O TryNullMXList
+
+# load average at which we just queue messages
+#O QueueLA=8
+
+# load average at which we refuse connections
+#O RefuseLA=12
+
+# maximum number of children we allow at one time
+#O MaxDaemonChildren=12
+
+# maximum number of new connections per second
+#O ConnectionRateThrottle=3
+
+# work recipient factor
+#O RecipientFactor=30000
+
+# deliver each queued job in a separate process?
+#O ForkEachJob
+
+# work class factor
+#O ClassFactor=1800
+
+# work time factor
+#O RetryFactor=90000
+
+# shall we sort the queue by hostname first?
+#O QueueSortOrder=priority
+
+# minimum time in queue before retry
+#O MinQueueAge=30m
+
+# default character set
+#O DefaultCharSet=iso-8859-1
+
+# service switch file (ignored on Solaris, Ultrix, OSF/1, others)
+#O ServiceSwitchFile=/etc/service.switch
+
+# hosts file (normally /etc/hosts)
+#O HostsFile=/etc/hosts
+
+# dialup line delay on connection failure
+#O DialDelay=10s
+
+# action to take if there are no recipients in the message
+#O NoRecipientAction=add-to-undisclosed
+
+# chrooted environment for writing to files
+#O SafeFileEnvironment=/arch
+
+# are colons OK in addresses?
+#O ColonOkInAddr
+
+# how many jobs can you process in the queue?
+#O MaxQueueRunSize=10000
+
+# shall I avoid expanding CNAMEs (violates protocols)?
+#O DontExpandCnames
+
+# SMTP initial login message (old $e macro)
+O SmtpGreetingMessage=$j Sendmail $v/$Z; $b
+
+# UNIX initial From header format (old $l macro)
+O UnixFromLine=From $g $d
+
+# From: lines that have embedded newlines are unwrapped onto one line
+#O SingleLineFromHeader=False
+
+# Allow HELO SMTP command that does not include a host name
+#O AllowBogusHELO=False
+
+# Characters to be quoted in a full name phrase (@,;:\()[] are automatic)
+#O MustQuoteChars=.
+
+# delimiter (operator) characters (old $o macro)
+O OperatorChars=.:%@!^/[]+
+
+# shall I avoid calling initgroups(3) because of high NIS costs?
+#O DontInitGroups
+
+# are group-writable :include: and .forward files (un)trustworthy?
+#O UnsafeGroupWrites
+
+# where do errors that occur when sending errors get sent?
+#O DoubleBounceAddress=postmaster
+
+# what user id do we assume for the majority of the processing?
+#O RunAsUser=sendmail
+
+# maximum number of recipients per SMTP envelope
+#O MaxRecipientsPerMessage=100
+
+# shall we get local names from our installed interfaces?
+#O DontProbeInterfaces
+
+
+
+
+
+###########################
+# Message precedences #
+###########################
+
+Pfirst-class=0
+Pspecial-delivery=100
+Plist=-30
+Pbulk=-60
+Pjunk=-100
+
+#####################
+# Trusted users #
+#####################
+
+# this is equivalent to setting class "t"
+#Ft/etc/sendmail.ct
+Troot
+Tdaemon
+Tuucp
+
+#########################
+# Format of headers #
+#########################
+
+H?P?Return-Path: <$g>
+HReceived: $?sfrom $s $.$?_($?s$|from $.$_)
+ $.by $j ($v/$Z)$?r with $r$. id $i$?u
+ for $u; $|;
+ $.$b
+H?D?Resent-Date: $a
+H?D?Date: $a
+H?F?Resent-From: $?x$x <$g>$|$g$.
+H?F?From: $?x$x <$g>$|$g$.
+H?x?Full-Name: $x
+# HPosted-Date: $a
+# H?l?Received-Date: $b
+H?M?Resent-Message-Id: <$t.$i@$j>
+H?M?Message-Id: <$t.$i@$j>
+#
+######################################################################
+######################################################################
+#####
+##### REWRITING RULES
+#####
+######################################################################
+######################################################################
+
+############################################
+### Ruleset 3 -- Name Canonicalization ###
+############################################
+S3
+
+# handle null input (translate to <@> special case)
+R$@ $@ <@>
+
+# strip group: syntax (not inside angle brackets!) and trailing semicolon
+R$* $: $1 <@> mark addresses
+R$* < $* > $* <@> $: $1 < $2 > $3 unmark <addr>
+R@ $* <@> $: @ $1 unmark @host:...
+R$* :: $* <@> $: $1 :: $2 unmark node::addr
+R:include: $* <@> $: :include: $1 unmark :include:...
+R$* [ $* : $* ] <@> $: $1 [ $2 : $3 ] unmark IPv6 addrs
+R$* : $* [ $* ] $: $1 : $2 [ $3 ] <@> remark if leading colon
+R$* : $* <@> $: $2 strip colon if marked
+R$* <@> $: $1 unmark
+R$* ; $1 strip trailing semi
+R$* < $* ; > $1 < $2 > bogus bracketed semi
+
+# null input now results from list:; syntax
+R$@ $@ :; <@>
+
+# strip angle brackets -- note RFC733 heuristic to get innermost item
+R$* $: < $1 > housekeeping <>
+R$+ < $* > < $2 > strip excess on left
+R< $* > $+ < $1 > strip excess on right
+R<> $@ < @ > MAIL FROM:<> case
+R< $+ > $: $1 remove housekeeping <>
+
+# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
+R@ $+ , $+ @ $1 : $2 change all "," to ":"
+
+# localize and dispose of route-based addresses
+R@ $+ : $+ $@ $>96 < @$1 > : $2 handle <route-addr>
+
+# find focus for list syntax
+R $+ : $* ; @ $+ $@ $>96 $1 : $2 ; < @ $3 > list syntax
+R $+ : $* ; $@ $1 : $2; list syntax
+
+# find focus for @ syntax addresses
+R$+ @ $+ $: $1 < @ $2 > focus on domain
+R$+ < $+ @ $+ > $1 $2 < @ $3 > move gaze right
+R$+ < @ $+ > $@ $>96 $1 < @ $2 > already canonical
+
+# do some sanity checking
+R$* < @ $* : $* > $* $1 < @ $2 $3 > $4 nix colons in addrs
+
+# convert old-style addresses to a domain-based address
+R$- ! $+ $@ $>96 $2 < @ $1 .UUCP > resolve uucp names
+R$+ . $- ! $+ $@ $>96 $3 < @ $1 . $2 > domain uucps
+R$+ ! $+ $@ $>96 $2 < @ $1 .UUCP > uucp subdomains
+
+# if we have % signs, take the rightmost one
+R$* % $* $1 @ $2 First make them all @s.
+R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last.
+R$* @ $* $@ $>96 $1 < @ $2 > Insert < > and finish
+
+# else we must be a local name
+R$* $@ $>96 $1
+
+
+################################################
+### Ruleset 96 -- bottom half of ruleset 3 ###
+################################################
+
+S96
+
+# handle special cases for local names
+R$* < @ localhost > $* $: $1 < @ $j . > $2 no domain at all
+R$* < @ localhost . $m > $* $: $1 < @ $j . > $2 local domain
+R$* < @ localhost . UUCP > $* $: $1 < @ $j . > $2 .UUCP domain
+R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [a.b.c.d]
+R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal
+R$* < @@ $+ > $* $@ $1 < @ $2 > $3 canon IP addr
+
+
+
+
+
+# if really UUCP, handle it immediately
+
+# try UUCP traffic as a local address
+R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3
+R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3
+
+# pass to name server to make hostname canonical
+R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4
+
+# local host aliases and pseudo-domains are always canonical
+R$* < @ $=w > $* $: $1 < @ $2 . > $3
+R$* < @ $j > $* $: $1 < @ $j . > $2
+R$* < @ $=M > $* $: $1 < @ $2 . > $3
+R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4
+R$* < @ $* . . > $* $1 < @ $2 . > $3
+
+
+##################################################
+### Ruleset 4 -- Final Output Post-rewriting ###
+##################################################
+S4
+
+R$* <@> $@ handle <> and list:;
+
+# strip trailing dot off possibly canonical name
+R$* < @ $+ . > $* $1 < @ $2 > $3
+
+# eliminate internal code -- should never get this far!
+R$* < @ *LOCAL* > $* $1 < @ $j > $2
+
+# externalize local domain info
+R$* < $+ > $* $1 $2 $3 defocus
+R@ $+ : @ $+ : $+ @ $1 , @ $2 : $3 <route-addr> canonical
+R@ $* $@ @ $1 ... and exit
+
+# UUCP must always be presented in old form
+R$+ @ $- . UUCP $2!$1 u@h.UUCP => h!u
+
+# delete duplicate local names
+R$+ % $=w @ $=w $1 @ $2 u%host@host => u@host
+
+
+
+##############################################################
+### Ruleset 97 -- recanonicalize and call ruleset zero ###
+### (used for recursive calls) ###
+##############################################################
+
+S97
+R$* $: $>3 $1
+R$* $@ $>0 $1
+
+
+######################################
+### Ruleset 0 -- Parse Address ###
+######################################
+
+S0
+
+R$* $: $>Parse0 $1 initial parsing
+R<@> $#local $: <@> special case error msgs
+R$* $: $>98 $1 handle local hacks
+R$* $: $>Parse1 $1 final parsing
+
+#
+# Parse0 -- do initial syntax checking and eliminate local addresses.
+# This should either return with the (possibly modified) input
+# or return with a #error mailer. It should not return with a
+# #mailer other than the #error mailer.
+#
+
+SParse0
+R<@> $@ <@> special case error msgs
+R$* : $* ; <@> $#error $@ 5.1.3 $: "List:; syntax illegal for recipient addresses"
+#R@ <@ $* > < @ $1 > catch "@@host" bogosity
+R<@ $+> $#error $@ 5.1.3 $: "User address required"
+R$* $: <> $1
+R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3
+R<> $* <$* : $* > $* $#error $@ 5.1.3 $: "Colon illegal in host name part"
+R<> $* $1
+R$* < @ . $* > $* $#error $@ 5.1.2 $: "Invalid host name"
+R$* < @ $* .. $* > $* $#error $@ 5.1.2 $: "Invalid host name"
+
+# now delete the local info -- note $=O to find characters that cause forwarding
+R$* < @ > $* $@ $>Parse0 $>3 $1 user@ => user
+R< @ $=w . > : $* $@ $>Parse0 $>3 $2 @here:... -> ...
+R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here
+R< @ $+ > $#error $@ 5.1.3 $: "User address required"
+R$* $=O $* < @ $=w . > $@ $>Parse0 $>3 $1 $2 $3 ...@here -> ...
+R$- $: $(dequote $1 $) < @ *LOCAL* > dequote "foo"
+R< @ *LOCAL* > $#error $@ 5.1.3 $: "User address required"
+R$* $=O $* < @ *LOCAL* >
+ $@ $>Parse0 $>3 $1 $2 $3 ...@*LOCAL* -> ...
+R$* < @ *LOCAL* > $: $1
+
+#
+# Parse1 -- the bottom half of ruleset 0.
+#
+
+SParse1
+# handle numeric address spec
+R$* < @ [ $+ ] > $* $: $>98 $1 < @ [ $2 ] > $3 numeric internet spec
+R$* < @ [ $+ ] > $* $#esmtp $@ [$2] $: $1 < @ [$2] > $3 still numeric: send
+
+
+# short circuit local delivery so forwarded email works
+R$=L < @ $=w . > $#local $: @ $1 special local names
+R$+ < @ $=w . > $#local $: $1 regular local name
+
+
+# resolve remotely connected UUCP links (if any)
+
+# resolve fake top level domains by forwarding to other hosts
+
+
+
+# pass names that still have a host to a smarthost (if defined)
+R$* < @ $* > $* $: $>95 < $S > $1 < @ $2 > $3 glue on smarthost name
+
+# deal with other remote names
+R$* < @$* > $* $#esmtp $@ $2 $: $1 < @ $2 > $3 user@host.domain
+
+# handle locally delivered names
+R$=L $#local $: @ $1 special local names
+R$+ $#local $: $1 regular local names
+
+###########################################################################
+### Ruleset 5 -- special rewriting after aliases have been expanded ###
+###########################################################################
+
+S5
+
+# deal with plussed users so aliases work nicely
+R$+ + * $#local $@ $&h $: $1
+R$+ + $* $#local $@ + $2 $: $1 + *
+
+# prepend an empty "forward host" on the front
+R$+ $: <> $1
+
+
+# see if we have a relay or a hub
+R< > $+ $: < $H > $1 try hub
+R< > $+ $: < $R > $1 try relay
+R< > $+ $: < > < $1 $&h > nope, restore +detail
+R< > < $+ + $* > $* < > < $1 > + $2 $3 find the user part
+R< > < $+ > + $* $#local $@ $2 $: @ $1 strip the extra +
+R< > < $+ > $@ $1 no +detail
+R$+ $: $1 $&h add +detail back in
+R< local : $* > $* $: $>95 < local : $1 > $2 no host extension
+R< error : $* > $* $: $>95 < error : $1 > $2 no host extension
+R< $- : $+ > $+ $: $>95 < $1 : $2 > $3 < @ $2 >
+R< $+ > $+ $@ $>95 < $1 > $2 < @ $1 >
+
+
+###################################################################
+### Ruleset 95 -- canonify mailer:[user@]host syntax to triple ###
+###################################################################
+
+S95
+R< > $* $@ $1 strip off null relay
+R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
+R< local : $* > $* $>CanonLocal < $1 > $2
+R< $- : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user
+R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
+R< $=w > $* $@ $2 delete local host
+R< $+ > $* $#relay $@ $1 $: $2 use unqualified mailer
+
+###################################################################
+### Ruleset CanonLocal -- canonify local: syntax ###
+###################################################################
+
+SCanonLocal
+# strip trailing dot from any host name that may appear
+R< $* > $* < @ $* . > $: < $1 > $2 < @ $3 >
+
+# handle local: syntax -- use old user, either with or without host
+R< > $* < @ $* > $* $#local $@ $1@$2 $: $1
+R< > $+ $#local $@ $1 $: $1
+
+# handle local:user@host syntax -- ignore host part
+R< $+ @ $+ > $* < @ $* > $: < $1 > $3 < @ $4 >
+
+# handle local:user syntax
+R< $+ > $* <@ $* > $* $#local $@ $2@$3 $: $1
+R< $+ > $* $#local $@ $2 $: $1
+
+###################################################################
+### Ruleset 93 -- convert header names to masqueraded form ###
+###################################################################
+
+S93
+
+
+# special case the users that should be exposed
+R$=E < @ *LOCAL* > $@ $1 < @ $j . > leave exposed
+R$=E < @ $=M . > $@ $1 < @ $2 . >
+R$=E < @ $=w . > $@ $1 < @ $2 . >
+
+# handle domain-specific masquerading
+R$* < @ $=M . > $* $: $1 < @ $2 . @ $M > $3 convert masqueraded doms
+R$* < @ $=w . > $* $: $1 < @ $2 . @ $M > $3
+R$* < @ *LOCAL* > $* $: $1 < @ $j . @ $M > $2
+R$* < @ $+ @ > $* $: $1 < @ $2 > $3 $M is null
+R$* < @ $+ @ $+ > $* $: $1 < @ $3 . > $4 $M is not null
+
+###################################################################
+### Ruleset 94 -- convert envelope names to masqueraded form ###
+###################################################################
+
+S94
+R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
+
+###################################################################
+### Ruleset 98 -- local part of ruleset zero (can be null) ###
+###################################################################
+
+S98
+
+# addresses sent to foo@host.REDIRECT will give a 551 error code
+R$* < @ $+ .REDIRECT. > $: $1 < @ $2 . REDIRECT . > < ${opMode} >
+R$* < @ $+ .REDIRECT. > <i> $: $1 < @ $2 . REDIRECT. >
+R$* < @ $+ .REDIRECT. > < $- > $# error $@ 5.1.1 $: "551 User has moved; please try " <$1@$2>
+
+
+
+######################################################################
+### 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.
+###
+### Parameters:
+### $1 -- full recipient address
+###
+### Returns:
+### parsed, non-local-relaying address
+######################################################################
+
+SParseRecipient
+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<NO> $* < @ $* $=R > $: <RELAY> $1 < @ $2 $3 >
+
+R<RELAY> $* < @ $* > $@ $>ParseRecipient $1
+R<$-> $* $@ $2
+
+######################################################################
+### check_relay -- check hostname/address on SMTP startup
+######################################################################
+
+SLocal_check_relay
+Scheck_relay
+R$* $: $1 $| $>"Local_check_relay" $1
+R$* $| $* $| $#$* $#$3
+R$* $| $* $| $* $@ $>"Basic_check_relay" $1 $| $2
+
+SBasic_check_relay
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+
+
+######################################################################
+### check_mail -- check SMTP `MAIL FROM:' command argument
+######################################################################
+
+SLocal_check_mail
+Scheck_mail
+R$* $: $1 $| $>"Local_check_mail" $1
+R$* $| $#$* $#$2
+R$* $| $* $@ $>"Basic_check_mail" $1
+
+SBasic_check_mail
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+R<> $@ <OK>
+R$* $: <?> $>CanonAddr $1
+R<?> $* < @ $+ . > <?> $1 < @ $2 > strip trailing dots
+# handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc)
+R<?> $* < $* $=P > $* $: <OK> $1 < @ $2 $3 > $4
+R<?> $* < @ $+ > $* $: <? $(resolve $2 $: $2 <PERM> $) > $1 < @ $2 > $3
+R<? $* <$->> $* < @ $+ > $*
+ $: <$2> $3 < @ $4 > $5
+
+# handle case of @localhost on address
+R<$+> $* < @localhost > $: < ? $&{client_name} > <$1> $2 < @localhost >
+R<$+> $* < @localhost.$m >
+ $: < ? $&{client_name} > <$1> $2 < @localhost.$m >
+R<$+> $* < @localhost.UUCP >
+ $: < ? $&{client_name} > <$1> $2 < @localhost.UUCP >
+R<? $=w> <$+> $* <?> <$2> $3
+R<? $+> <$+> $* $#error $@ 5.5.4 $: "553 Real domain name required"
+R<?> <$+> $* $: <$1> $2
+
+
+# handle case of no @domain on address
+R<?> $* $: < ? $&{client_name} > $1
+R<?> $* $@ <OK> ...local unqualed ok
+R<? $+> $* $#error $@ 5.5.4 $: "553 Domain name required"
+ ...remote is not
+# check results
+R<?> $* $@ <OK>
+R<OK> $* $@ <OK>
+R<TEMP> $* $#error $@ 4.1.8 $: "451 Sender domain must resolve"
+R<PERM> $* $#error $@ 5.1.8 $: "501 Sender domain must exist"
+
+######################################################################
+### check_rcpt -- check SMTP `RCPT TO:' command argument
+######################################################################
+
+SLocal_check_rcpt
+Scheck_rcpt
+R$* $: $1 $| $>"Local_check_rcpt" $1
+R$* $| $#$* $#$2
+R$* $| $* $@ $>"Basic_check_rcpt" $1
+
+SBasic_check_rcpt
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+R$* $: $>ParseRecipient $1 strip relayable hosts
+
+
+
+
+# anything terminating locally is ok
+R$+ < @ $=w > $@ OK
+R$+ < @ $* $=R > $@ OK
+
+
+# check for local user (i.e. unqualified address)
+R$* $: <?> $1
+R<?> $* < @ $+ > $: <REMOTE> $1 < @ $2 >
+# local user is ok
+R<?> $+ $@ OK
+R<$+> $* $: $2
+
+# anything originating locally is ok
+R$* $: <?> $&{client_name}
+# check if bracketed IP address (forward lookup != reverse lookup)
+R<?> [$+] $: <BAD> [$1]
+# pass to name server to make hostname canonical
+R<?> $* $~P $: <?> $[ $1 $2 $]
+R<$-> $* $: $2
+R$* . $1 strip trailing dots
+R$@ $@ OK
+R$=w $@ OK
+R$* $=R $@ OK
+
+# check IP address
+R$* $: $&{client_addr}
+R$@ $@ OK originated locally
+R0 $@ OK originated locally
+R$=R $* $@ OK relayable IP address
+R$* $: [ $1 ] put brackets around it...
+R$=w $@ OK ... and see if it is local
+
+
+# anything else is bogus
+R$* $#error $@ 5.7.1 $: "550 Relaying denied"
+
+#
+######################################################################
+######################################################################
+#####
+##### MAILER DEFINITIONS
+#####
+######################################################################
+######################################################################
+
+
+##################################################
+### Local and Program Mailer specification ###
+##################################################
+
+##### @(#)local.m4 8.30 (Berkeley) 6/30/1998 #####
+
+Mlocal, P=/bin/mail, F=lsDFMAw5:/|@qrmn9, S=10/30, R=20/40,
+ T=DNS/RFC822/X-Unix,
+ A=mail -d $u
+Mprog, P=/bin/sh, F=lsDFMoqeu9, S=10/30, R=20/40, D=$z:/,
+ T=X-Unix,
+ A=sh -c $u
+
+#
+# Envelope sender rewriting
+#
+S10
+R<@> $n errors to mailer-daemon
+R@ <@ $*> $n temporarily bypass Sun bogosity
+R$+ $: $>50 $1 add local domain if needed
+R$* $: $>94 $1 do masquerading
+
+#
+# Envelope recipient rewriting
+#
+S20
+R$+ < @ $* > $: $1 strip host part
+
+#
+# Header sender rewriting
+#
+S30
+R<@> $n errors to mailer-daemon
+R@ <@ $*> $n temporarily bypass Sun bogosity
+R$+ $: $>50 $1 add local domain if needed
+R$* $: $>93 $1 do masquerading
+
+#
+# Header recipient rewriting
+#
+S40
+R$+ $: $>50 $1 add local domain if needed
+
+#
+# Common code to add local domain name (only if always-add-domain)
+#
+S50
+
+#####################################
+### SMTP Mailer specification ###
+#####################################
+
+##### @(#)smtp.m4 8.38 (Berkeley) 5/19/1998 #####
+
+Msmtp, P=[IPC], F=mDFMuX, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Mesmtp, P=[IPC], F=mDFMuXa, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Msmtp8, P=[IPC], F=mDFMuX8, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Mrelay, P=[IPC], F=mDFMuXa8, S=11/31, R=61, E=\r\n, L=2040,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+
+#
+# envelope sender rewriting
+#
+S11
+R$+ $: $>51 $1 sender/recipient common
+R$* :; <@> $@ list:; special case
+R$* $: $>61 $1 qualify unqual'ed names
+R$+ $: $>94 $1 do masquerading
+
+
+#
+# envelope recipient rewriting --
+# also header recipient if not masquerading recipients
+#
+S21
+R$+ $: $>51 $1 sender/recipient common
+R$+ $: $>61 $1 qualify unqual'ed names
+
+
+#
+# header sender and masquerading header recipient rewriting
+#
+S31
+R$+ $: $>51 $1 sender/recipient common
+R:; <@> $@ list:; special case
+
+# do special header rewriting
+R$* <@> $* $@ $1 <@> $2 pass null host through
+R< @ $* > $* $@ < @ $1 > $2 pass route-addr through
+R$* $: $>61 $1 qualify unqual'ed names
+R$+ $: $>93 $1 do masquerading
+
+
+#
+# convert pseudo-domain addresses to real domain addresses
+#
+S51
+
+# pass <route-addr>s through
+R< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr>
+
+# output fake domains as user%fake@relay
+
+# do UUCP heuristics; note that these are shared with UUCP mailers
+R$+ < @ $+ .UUCP. > $: < $2 ! > $1 convert to UUCP form
+R$+ < @ $* > $* $@ $1 < @ $2 > $3 not UUCP form
+
+# leave these in .UUCP form to avoid further tampering
+R< $&h ! > $- ! $+ $@ $2 < @ $1 .UUCP. >
+R< $&h ! > $-.$+ ! $+ $@ $3 < @ $1.$2 >
+R< $&h ! > $+ $@ $1 < @ $&h .UUCP. >
+R< $+ ! > $+ $: $1 ! $2 < @ $Y > use UUCP_RELAY
+R$+ < @ $+ : $+ > $@ $1 < @ $3 > strip mailer: part
+R$+ < @ > $: $1 < @ *LOCAL* > if no UUCP_RELAY
+
+
+#
+# common sender and masquerading recipient rewriting
+#
+S61
+
+R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified
+R$+ $@ $1 < @ *LOCAL* > add local qualification
+
+
+#
+# relay mailer header masquerading recipient rewriting
+#
+S71
+
+R$+ $: $>61 $1
+R$+ $: $>93 $1
diff --git a/usr.sbin/sendmail/cf/cf/generic-osf1.mc b/usr.sbin/sendmail/cf/cf/generic-osf1.mc
index 2113b927223..83858d13680 100644
--- a/usr.sbin/sendmail/cf/cf/generic-osf1.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/generic-solaris2.cf b/usr.sbin/sendmail/cf/cf/generic-solaris2.cf
new file mode 100644
index 00000000000..bcf3e8199a8
--- /dev/null
+++ b/usr.sbin/sendmail/cf/cf/generic-solaris2.cf
@@ -0,0 +1,1054 @@
+#
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
+# Copyright (c) 1988, 1993
+# The Regents of the University of California. 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.
+#
+#
+
+######################################################################
+######################################################################
+#####
+##### SENDMAIL CONFIGURATION FILE
+#####
+##### built by gshapiro@knecht.Sendmail.ORG on Tue Dec 29 09:59:26 PST 1998
+##### in /home/knecht/a/eric/src/sendmail/cf/cf
+##### using ../ as configuration include directory
+#####
+######################################################################
+######################################################################
+
+##### @(#)cfhead.m4 8.23 (Berkeley) 10/6/1998 #####
+##### @(#)cf.m4 8.29 (Berkeley) 5/19/1998 #####
+##### @(#)generic-solaris2.mc 8.8 (Berkeley) 5/19/1998 #####
+
+##### @(#)solaris2.m4 8.16 (Berkeley) 10/6/1998 #####
+
+##### @(#)generic.m4 8.9 (Berkeley) 5/19/1998 #####
+
+##### @(#)redirect.m4 8.10 (Berkeley) 5/19/1998 #####
+
+
+
+
+##### @(#)use_cw_file.m4 8.6 (Berkeley) 5/19/1998 #####
+
+
+
+##### @(#)proto.m4 8.237 (Berkeley) 12/17/1998 #####
+
+
+# level 8 config file format
+V8/Berkeley
+
+# override file safeties - setting this option compromises system security
+# need to set this now for the sake of class files
+#O DontBlameSendmail=safe
+
+##################
+# local info #
+##################
+
+Cwlocalhost
+# file containing names of hosts for which we receive email
+Fw/etc/mail/sendmail.cw
+
+# my official domain name
+# ... define this only if sendmail cannot automatically determine your domain
+#Dj$w.Foo.COM
+
+
+CP.
+
+# "Smart" relay host (may be null)
+DS
+
+
+# operators that cannot be in local usernames (i.e., network indicators)
+CO @ % !
+
+# a class with just dot (for identifying canonical names)
+C..
+
+# a class with just a left bracket (for identifying domain literals)
+C[[
+
+
+
+
+
+
+
+
+
+# Resolve map (to check if a host exists in check_mail)
+Kresolve host -a<OK> -T<TEMP>
+
+# Hosts that will permit relaying ($=R)
+FR-o /etc/mail/relay-domains
+
+# who I send unqualified names to (null means deliver locally)
+DR
+
+# who gets all local email traffic ($R has precedence for unqualified names)
+DH
+
+# dequoting map
+Kdequote dequote
+
+# class E: names that should be exposed as from this host, even if we masquerade
+# class L: names that should be delivered locally, even if we have a relay
+# class M: domains that should be converted to $M
+#CL root
+CE root
+
+# who I masquerade as (null for no masquerading) (see also $=M)
+DM
+
+# my name for error messages
+DnMAILER-DAEMON
+
+
+CPREDIRECT
+
+# Configuration version number
+DZ8.9.2
+
+
+###############
+# Options #
+###############
+
+# strip message body to 7 bits on input?
+O SevenBitInput=False
+
+# 8-bit data handling
+O EightBitMode=pass8
+
+
+# wait for alias file rebuild (default units: minutes)
+O AliasWait=10
+
+# location of alias file
+O AliasFile=/etc/mail/aliases
+
+# minimum number of free blocks on filesystem
+O MinFreeBlocks=100
+
+# maximum message size
+#O MaxMessageSize=1000000
+
+# substitution for space (blank) characters
+O BlankSub=.
+
+# avoid connecting to "expensive" mailers on initial submission?
+O HoldExpensive=False
+
+# checkpoint queue runs after every N successful deliveries
+#O CheckpointInterval=10
+
+# default delivery mode
+O DeliveryMode=background
+
+# automatically rebuild the alias database?
+#O AutoRebuildAliases
+
+# error message header/file
+#O ErrorHeader=/etc/sendmail.oE
+
+# error mode
+#O ErrorMode=print
+
+# save Unix-style "From_" lines at top of header?
+#O SaveFromLine
+
+# temporary file mode
+O TempFileMode=0600
+
+# match recipients against GECOS field?
+#O MatchGECOS
+
+# maximum hop count
+#O MaxHopCount=17
+
+# location of help file
+O HelpFile=/etc/mail/sendmail.hf
+
+# ignore dots as terminators in incoming messages?
+#O IgnoreDots
+
+# name resolver options
+#O ResolverOptions=+AAONLY
+
+# deliver MIME-encapsulated error messages?
+O SendMimeErrors=True
+
+# Forward file search path
+O ForwardPath=$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward
+
+# open connection cache size
+O ConnectionCacheSize=2
+
+# open connection cache timeout
+O ConnectionCacheTimeout=5m
+
+# persistent host status directory
+#O HostStatusDirectory=.hoststat
+
+# single thread deliveries (requires HostStatusDirectory)?
+#O SingleThreadDelivery
+
+# use Errors-To: header?
+O UseErrorsTo=False
+
+# log level
+O LogLevel=9
+
+# send to me too, even in an alias expansion?
+#O MeToo
+
+# verify RHS in newaliases?
+O CheckAliases=False
+
+# default messages to old style headers if no special punctuation?
+O OldStyleHeaders=True
+
+# SMTP daemon options
+#O DaemonPortOptions=Port=esmtp
+
+# privacy flags
+O PrivacyOptions=authwarnings
+
+# who (if anyone) should get extra copies of error messages
+#O PostMasterCopy=Postmaster
+
+# slope of queue-only function
+#O QueueFactor=600000
+
+# queue directory
+O QueueDirectory=/var/spool/mqueue
+
+# timeouts (many of these)
+#O Timeout.initial=5m
+#O Timeout.connect=5m
+#O Timeout.iconnect=5m
+#O Timeout.helo=5m
+#O Timeout.mail=10m
+#O Timeout.rcpt=1h
+#O Timeout.datainit=5m
+#O Timeout.datablock=1h
+#O Timeout.datafinal=1h
+#O Timeout.rset=5m
+#O Timeout.quit=2m
+#O Timeout.misc=2m
+#O Timeout.command=1h
+#O Timeout.ident=30s
+#O Timeout.fileopen=60s
+O Timeout.queuereturn=5d
+#O Timeout.queuereturn.normal=5d
+#O Timeout.queuereturn.urgent=2d
+#O Timeout.queuereturn.non-urgent=7d
+O Timeout.queuewarn=4h
+#O Timeout.queuewarn.normal=4h
+#O Timeout.queuewarn.urgent=1h
+#O Timeout.queuewarn.non-urgent=12h
+#O Timeout.hoststatus=30m
+
+# should we not prune routes in route-addr syntax addresses?
+#O DontPruneRoutes
+
+# queue up everything before forking?
+O SuperSafe=True
+
+# status file
+O StatusFile=/etc/mail/sendmail.st
+
+# time zone handling:
+# if undefined, use system default
+# if defined but null, use TZ envariable passed in
+# if defined and non-null, use that info
+#O TimeZoneSpec=
+
+# default UID (can be username or userid:groupid)
+#O DefaultUser=mailnull
+
+# list of locations of user database file (null means no lookup)
+#O UserDatabaseSpec=/etc/userdb
+
+# fallback MX host
+#O FallbackMXhost=fall.back.host.net
+
+# if we are the best MX host for a site, try it directly instead of config err
+#O TryNullMXList
+
+# load average at which we just queue messages
+#O QueueLA=8
+
+# load average at which we refuse connections
+#O RefuseLA=12
+
+# maximum number of children we allow at one time
+#O MaxDaemonChildren=12
+
+# maximum number of new connections per second
+#O ConnectionRateThrottle=3
+
+# work recipient factor
+#O RecipientFactor=30000
+
+# deliver each queued job in a separate process?
+#O ForkEachJob
+
+# work class factor
+#O ClassFactor=1800
+
+# work time factor
+#O RetryFactor=90000
+
+# shall we sort the queue by hostname first?
+#O QueueSortOrder=priority
+
+# minimum time in queue before retry
+#O MinQueueAge=30m
+
+# default character set
+#O DefaultCharSet=iso-8859-1
+
+# service switch file (ignored on Solaris, Ultrix, OSF/1, others)
+#O ServiceSwitchFile=/etc/service.switch
+
+# hosts file (normally /etc/hosts)
+#O HostsFile=/etc/hosts
+
+# dialup line delay on connection failure
+#O DialDelay=10s
+
+# action to take if there are no recipients in the message
+#O NoRecipientAction=add-to-undisclosed
+
+# chrooted environment for writing to files
+#O SafeFileEnvironment=/arch
+
+# are colons OK in addresses?
+#O ColonOkInAddr
+
+# how many jobs can you process in the queue?
+#O MaxQueueRunSize=10000
+
+# shall I avoid expanding CNAMEs (violates protocols)?
+#O DontExpandCnames
+
+# SMTP initial login message (old $e macro)
+O SmtpGreetingMessage=$j Sendmail $v/$Z; $b
+
+# UNIX initial From header format (old $l macro)
+O UnixFromLine=From $g $d
+
+# From: lines that have embedded newlines are unwrapped onto one line
+#O SingleLineFromHeader=False
+
+# Allow HELO SMTP command that does not include a host name
+#O AllowBogusHELO=False
+
+# Characters to be quoted in a full name phrase (@,;:\()[] are automatic)
+#O MustQuoteChars=.
+
+# delimiter (operator) characters (old $o macro)
+O OperatorChars=.:%@!^/[]+
+
+# shall I avoid calling initgroups(3) because of high NIS costs?
+#O DontInitGroups
+
+# are group-writable :include: and .forward files (un)trustworthy?
+#O UnsafeGroupWrites
+
+# where do errors that occur when sending errors get sent?
+#O DoubleBounceAddress=postmaster
+
+# what user id do we assume for the majority of the processing?
+#O RunAsUser=sendmail
+
+# maximum number of recipients per SMTP envelope
+#O MaxRecipientsPerMessage=100
+
+# shall we get local names from our installed interfaces?
+#O DontProbeInterfaces
+
+
+
+
+
+###########################
+# Message precedences #
+###########################
+
+Pfirst-class=0
+Pspecial-delivery=100
+Plist=-30
+Pbulk=-60
+Pjunk=-100
+
+#####################
+# Trusted users #
+#####################
+
+# this is equivalent to setting class "t"
+#Ft/etc/sendmail.ct
+Troot
+Tdaemon
+Tuucp
+
+#########################
+# Format of headers #
+#########################
+
+H?P?Return-Path: <$g>
+HReceived: $?sfrom $s $.$?_($?s$|from $.$_)
+ $.by $j ($v/$Z)$?r with $r$. id $i$?u
+ for $u; $|;
+ $.$b
+H?D?Resent-Date: $a
+H?D?Date: $a
+H?F?Resent-From: $?x$x <$g>$|$g$.
+H?F?From: $?x$x <$g>$|$g$.
+H?x?Full-Name: $x
+# HPosted-Date: $a
+# H?l?Received-Date: $b
+H?M?Resent-Message-Id: <$t.$i@$j>
+H?M?Message-Id: <$t.$i@$j>
+#
+######################################################################
+######################################################################
+#####
+##### REWRITING RULES
+#####
+######################################################################
+######################################################################
+
+############################################
+### Ruleset 3 -- Name Canonicalization ###
+############################################
+S3
+
+# handle null input (translate to <@> special case)
+R$@ $@ <@>
+
+# strip group: syntax (not inside angle brackets!) and trailing semicolon
+R$* $: $1 <@> mark addresses
+R$* < $* > $* <@> $: $1 < $2 > $3 unmark <addr>
+R@ $* <@> $: @ $1 unmark @host:...
+R$* :: $* <@> $: $1 :: $2 unmark node::addr
+R:include: $* <@> $: :include: $1 unmark :include:...
+R$* [ $* : $* ] <@> $: $1 [ $2 : $3 ] unmark IPv6 addrs
+R$* : $* [ $* ] $: $1 : $2 [ $3 ] <@> remark if leading colon
+R$* : $* <@> $: $2 strip colon if marked
+R$* <@> $: $1 unmark
+R$* ; $1 strip trailing semi
+R$* < $* ; > $1 < $2 > bogus bracketed semi
+
+# null input now results from list:; syntax
+R$@ $@ :; <@>
+
+# strip angle brackets -- note RFC733 heuristic to get innermost item
+R$* $: < $1 > housekeeping <>
+R$+ < $* > < $2 > strip excess on left
+R< $* > $+ < $1 > strip excess on right
+R<> $@ < @ > MAIL FROM:<> case
+R< $+ > $: $1 remove housekeeping <>
+
+# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
+R@ $+ , $+ @ $1 : $2 change all "," to ":"
+
+# localize and dispose of route-based addresses
+R@ $+ : $+ $@ $>96 < @$1 > : $2 handle <route-addr>
+
+# find focus for list syntax
+R $+ : $* ; @ $+ $@ $>96 $1 : $2 ; < @ $3 > list syntax
+R $+ : $* ; $@ $1 : $2; list syntax
+
+# find focus for @ syntax addresses
+R$+ @ $+ $: $1 < @ $2 > focus on domain
+R$+ < $+ @ $+ > $1 $2 < @ $3 > move gaze right
+R$+ < @ $+ > $@ $>96 $1 < @ $2 > already canonical
+
+# do some sanity checking
+R$* < @ $* : $* > $* $1 < @ $2 $3 > $4 nix colons in addrs
+
+# convert old-style addresses to a domain-based address
+R$- ! $+ $@ $>96 $2 < @ $1 .UUCP > resolve uucp names
+R$+ . $- ! $+ $@ $>96 $3 < @ $1 . $2 > domain uucps
+R$+ ! $+ $@ $>96 $2 < @ $1 .UUCP > uucp subdomains
+
+# if we have % signs, take the rightmost one
+R$* % $* $1 @ $2 First make them all @s.
+R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last.
+R$* @ $* $@ $>96 $1 < @ $2 > Insert < > and finish
+
+# else we must be a local name
+R$* $@ $>96 $1
+
+
+################################################
+### Ruleset 96 -- bottom half of ruleset 3 ###
+################################################
+
+S96
+
+# handle special cases for local names
+R$* < @ localhost > $* $: $1 < @ $j . > $2 no domain at all
+R$* < @ localhost . $m > $* $: $1 < @ $j . > $2 local domain
+R$* < @ localhost . UUCP > $* $: $1 < @ $j . > $2 .UUCP domain
+R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [a.b.c.d]
+R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal
+R$* < @@ $+ > $* $@ $1 < @ $2 > $3 canon IP addr
+
+
+
+
+
+# if really UUCP, handle it immediately
+
+# try UUCP traffic as a local address
+R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3
+R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3
+
+# pass to name server to make hostname canonical
+R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4
+
+# local host aliases and pseudo-domains are always canonical
+R$* < @ $=w > $* $: $1 < @ $2 . > $3
+R$* < @ $j > $* $: $1 < @ $j . > $2
+R$* < @ $=M > $* $: $1 < @ $2 . > $3
+R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4
+R$* < @ $* . . > $* $1 < @ $2 . > $3
+
+
+##################################################
+### Ruleset 4 -- Final Output Post-rewriting ###
+##################################################
+S4
+
+R$* <@> $@ handle <> and list:;
+
+# strip trailing dot off possibly canonical name
+R$* < @ $+ . > $* $1 < @ $2 > $3
+
+# eliminate internal code -- should never get this far!
+R$* < @ *LOCAL* > $* $1 < @ $j > $2
+
+# externalize local domain info
+R$* < $+ > $* $1 $2 $3 defocus
+R@ $+ : @ $+ : $+ @ $1 , @ $2 : $3 <route-addr> canonical
+R@ $* $@ @ $1 ... and exit
+
+# UUCP must always be presented in old form
+R$+ @ $- . UUCP $2!$1 u@h.UUCP => h!u
+
+# delete duplicate local names
+R$+ % $=w @ $=w $1 @ $2 u%host@host => u@host
+
+
+
+##############################################################
+### Ruleset 97 -- recanonicalize and call ruleset zero ###
+### (used for recursive calls) ###
+##############################################################
+
+S97
+R$* $: $>3 $1
+R$* $@ $>0 $1
+
+
+######################################
+### Ruleset 0 -- Parse Address ###
+######################################
+
+S0
+
+R$* $: $>Parse0 $1 initial parsing
+R<@> $#local $: <@> special case error msgs
+R$* $: $>98 $1 handle local hacks
+R$* $: $>Parse1 $1 final parsing
+
+#
+# Parse0 -- do initial syntax checking and eliminate local addresses.
+# This should either return with the (possibly modified) input
+# or return with a #error mailer. It should not return with a
+# #mailer other than the #error mailer.
+#
+
+SParse0
+R<@> $@ <@> special case error msgs
+R$* : $* ; <@> $#error $@ 5.1.3 $: "List:; syntax illegal for recipient addresses"
+#R@ <@ $* > < @ $1 > catch "@@host" bogosity
+R<@ $+> $#error $@ 5.1.3 $: "User address required"
+R$* $: <> $1
+R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3
+R<> $* <$* : $* > $* $#error $@ 5.1.3 $: "Colon illegal in host name part"
+R<> $* $1
+R$* < @ . $* > $* $#error $@ 5.1.2 $: "Invalid host name"
+R$* < @ $* .. $* > $* $#error $@ 5.1.2 $: "Invalid host name"
+
+# now delete the local info -- note $=O to find characters that cause forwarding
+R$* < @ > $* $@ $>Parse0 $>3 $1 user@ => user
+R< @ $=w . > : $* $@ $>Parse0 $>3 $2 @here:... -> ...
+R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here
+R< @ $+ > $#error $@ 5.1.3 $: "User address required"
+R$* $=O $* < @ $=w . > $@ $>Parse0 $>3 $1 $2 $3 ...@here -> ...
+R$- $: $(dequote $1 $) < @ *LOCAL* > dequote "foo"
+R< @ *LOCAL* > $#error $@ 5.1.3 $: "User address required"
+R$* $=O $* < @ *LOCAL* >
+ $@ $>Parse0 $>3 $1 $2 $3 ...@*LOCAL* -> ...
+R$* < @ *LOCAL* > $: $1
+
+#
+# Parse1 -- the bottom half of ruleset 0.
+#
+
+SParse1
+# handle numeric address spec
+R$* < @ [ $+ ] > $* $: $>98 $1 < @ [ $2 ] > $3 numeric internet spec
+R$* < @ [ $+ ] > $* $#esmtp $@ [$2] $: $1 < @ [$2] > $3 still numeric: send
+
+
+# short circuit local delivery so forwarded email works
+R$=L < @ $=w . > $#local $: @ $1 special local names
+R$+ < @ $=w . > $#local $: $1 regular local name
+
+
+# resolve remotely connected UUCP links (if any)
+
+# resolve fake top level domains by forwarding to other hosts
+
+
+
+# pass names that still have a host to a smarthost (if defined)
+R$* < @ $* > $* $: $>95 < $S > $1 < @ $2 > $3 glue on smarthost name
+
+# deal with other remote names
+R$* < @$* > $* $#esmtp $@ $2 $: $1 < @ $2 > $3 user@host.domain
+
+# handle locally delivered names
+R$=L $#local $: @ $1 special local names
+R$+ $#local $: $1 regular local names
+
+###########################################################################
+### Ruleset 5 -- special rewriting after aliases have been expanded ###
+###########################################################################
+
+S5
+
+# deal with plussed users so aliases work nicely
+R$+ + * $#local $@ $&h $: $1
+R$+ + $* $#local $@ + $2 $: $1 + *
+
+# prepend an empty "forward host" on the front
+R$+ $: <> $1
+
+
+# see if we have a relay or a hub
+R< > $+ $: < $H > $1 try hub
+R< > $+ $: < $R > $1 try relay
+R< > $+ $: < > < $1 $&h > nope, restore +detail
+R< > < $+ + $* > $* < > < $1 > + $2 $3 find the user part
+R< > < $+ > + $* $#local $@ $2 $: @ $1 strip the extra +
+R< > < $+ > $@ $1 no +detail
+R$+ $: $1 $&h add +detail back in
+R< local : $* > $* $: $>95 < local : $1 > $2 no host extension
+R< error : $* > $* $: $>95 < error : $1 > $2 no host extension
+R< $- : $+ > $+ $: $>95 < $1 : $2 > $3 < @ $2 >
+R< $+ > $+ $@ $>95 < $1 > $2 < @ $1 >
+
+
+###################################################################
+### Ruleset 95 -- canonify mailer:[user@]host syntax to triple ###
+###################################################################
+
+S95
+R< > $* $@ $1 strip off null relay
+R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
+R< local : $* > $* $>CanonLocal < $1 > $2
+R< $- : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user
+R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
+R< $=w > $* $@ $2 delete local host
+R< $+ > $* $#relay $@ $1 $: $2 use unqualified mailer
+
+###################################################################
+### Ruleset CanonLocal -- canonify local: syntax ###
+###################################################################
+
+SCanonLocal
+# strip trailing dot from any host name that may appear
+R< $* > $* < @ $* . > $: < $1 > $2 < @ $3 >
+
+# handle local: syntax -- use old user, either with or without host
+R< > $* < @ $* > $* $#local $@ $1@$2 $: $1
+R< > $+ $#local $@ $1 $: $1
+
+# handle local:user@host syntax -- ignore host part
+R< $+ @ $+ > $* < @ $* > $: < $1 > $3 < @ $4 >
+
+# handle local:user syntax
+R< $+ > $* <@ $* > $* $#local $@ $2@$3 $: $1
+R< $+ > $* $#local $@ $2 $: $1
+
+###################################################################
+### Ruleset 93 -- convert header names to masqueraded form ###
+###################################################################
+
+S93
+
+
+# special case the users that should be exposed
+R$=E < @ *LOCAL* > $@ $1 < @ $j . > leave exposed
+R$=E < @ $=M . > $@ $1 < @ $2 . >
+R$=E < @ $=w . > $@ $1 < @ $2 . >
+
+# handle domain-specific masquerading
+R$* < @ $=M . > $* $: $1 < @ $2 . @ $M > $3 convert masqueraded doms
+R$* < @ $=w . > $* $: $1 < @ $2 . @ $M > $3
+R$* < @ *LOCAL* > $* $: $1 < @ $j . @ $M > $2
+R$* < @ $+ @ > $* $: $1 < @ $2 > $3 $M is null
+R$* < @ $+ @ $+ > $* $: $1 < @ $3 . > $4 $M is not null
+
+###################################################################
+### Ruleset 94 -- convert envelope names to masqueraded form ###
+###################################################################
+
+S94
+R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
+
+###################################################################
+### Ruleset 98 -- local part of ruleset zero (can be null) ###
+###################################################################
+
+S98
+
+# addresses sent to foo@host.REDIRECT will give a 551 error code
+R$* < @ $+ .REDIRECT. > $: $1 < @ $2 . REDIRECT . > < ${opMode} >
+R$* < @ $+ .REDIRECT. > <i> $: $1 < @ $2 . REDIRECT. >
+R$* < @ $+ .REDIRECT. > < $- > $# error $@ 5.1.1 $: "551 User has moved; please try " <$1@$2>
+
+
+
+######################################################################
+### 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.
+###
+### Parameters:
+### $1 -- full recipient address
+###
+### Returns:
+### parsed, non-local-relaying address
+######################################################################
+
+SParseRecipient
+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<NO> $* < @ $* $=R > $: <RELAY> $1 < @ $2 $3 >
+
+R<RELAY> $* < @ $* > $@ $>ParseRecipient $1
+R<$-> $* $@ $2
+
+######################################################################
+### check_relay -- check hostname/address on SMTP startup
+######################################################################
+
+SLocal_check_relay
+Scheck_relay
+R$* $: $1 $| $>"Local_check_relay" $1
+R$* $| $* $| $#$* $#$3
+R$* $| $* $| $* $@ $>"Basic_check_relay" $1 $| $2
+
+SBasic_check_relay
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+
+
+######################################################################
+### check_mail -- check SMTP `MAIL FROM:' command argument
+######################################################################
+
+SLocal_check_mail
+Scheck_mail
+R$* $: $1 $| $>"Local_check_mail" $1
+R$* $| $#$* $#$2
+R$* $| $* $@ $>"Basic_check_mail" $1
+
+SBasic_check_mail
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+R<> $@ <OK>
+R$* $: <?> $>CanonAddr $1
+R<?> $* < @ $+ . > <?> $1 < @ $2 > strip trailing dots
+# handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc)
+R<?> $* < $* $=P > $* $: <OK> $1 < @ $2 $3 > $4
+R<?> $* < @ $+ > $* $: <? $(resolve $2 $: $2 <PERM> $) > $1 < @ $2 > $3
+R<? $* <$->> $* < @ $+ > $*
+ $: <$2> $3 < @ $4 > $5
+
+# handle case of @localhost on address
+R<$+> $* < @localhost > $: < ? $&{client_name} > <$1> $2 < @localhost >
+R<$+> $* < @localhost.$m >
+ $: < ? $&{client_name} > <$1> $2 < @localhost.$m >
+R<$+> $* < @localhost.UUCP >
+ $: < ? $&{client_name} > <$1> $2 < @localhost.UUCP >
+R<? $=w> <$+> $* <?> <$2> $3
+R<? $+> <$+> $* $#error $@ 5.5.4 $: "553 Real domain name required"
+R<?> <$+> $* $: <$1> $2
+
+
+# handle case of no @domain on address
+R<?> $* $: < ? $&{client_name} > $1
+R<?> $* $@ <OK> ...local unqualed ok
+R<? $+> $* $#error $@ 5.5.4 $: "553 Domain name required"
+ ...remote is not
+# check results
+R<?> $* $@ <OK>
+R<OK> $* $@ <OK>
+R<TEMP> $* $#error $@ 4.1.8 $: "451 Sender domain must resolve"
+R<PERM> $* $#error $@ 5.1.8 $: "501 Sender domain must exist"
+
+######################################################################
+### check_rcpt -- check SMTP `RCPT TO:' command argument
+######################################################################
+
+SLocal_check_rcpt
+Scheck_rcpt
+R$* $: $1 $| $>"Local_check_rcpt" $1
+R$* $| $#$* $#$2
+R$* $| $* $@ $>"Basic_check_rcpt" $1
+
+SBasic_check_rcpt
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+R$* $: $>ParseRecipient $1 strip relayable hosts
+
+
+
+
+# anything terminating locally is ok
+R$+ < @ $=w > $@ OK
+R$+ < @ $* $=R > $@ OK
+
+
+# check for local user (i.e. unqualified address)
+R$* $: <?> $1
+R<?> $* < @ $+ > $: <REMOTE> $1 < @ $2 >
+# local user is ok
+R<?> $+ $@ OK
+R<$+> $* $: $2
+
+# anything originating locally is ok
+R$* $: <?> $&{client_name}
+# check if bracketed IP address (forward lookup != reverse lookup)
+R<?> [$+] $: <BAD> [$1]
+# pass to name server to make hostname canonical
+R<?> $* $~P $: <?> $[ $1 $2 $]
+R<$-> $* $: $2
+R$* . $1 strip trailing dots
+R$@ $@ OK
+R$=w $@ OK
+R$* $=R $@ OK
+
+# check IP address
+R$* $: $&{client_addr}
+R$@ $@ OK originated locally
+R0 $@ OK originated locally
+R$=R $* $@ OK relayable IP address
+R$* $: [ $1 ] put brackets around it...
+R$=w $@ OK ... and see if it is local
+
+
+# anything else is bogus
+R$* $#error $@ 5.7.1 $: "550 Relaying denied"
+
+#
+######################################################################
+######################################################################
+#####
+##### MAILER DEFINITIONS
+#####
+######################################################################
+######################################################################
+
+
+##################################################
+### Local and Program Mailer specification ###
+##################################################
+
+##### @(#)local.m4 8.30 (Berkeley) 6/30/1998 #####
+
+Mlocal, P=/bin/mail, F=lsDFMAw5:/|@qSnE9, S=10/30, R=20/40,
+ T=DNS/RFC822/X-Unix,
+ A=mail -f $g -d $u
+Mprog, P=/bin/sh, F=lsDFMoqeu9, S=10/30, R=20/40, D=$z:/,
+ T=X-Unix,
+ A=sh -c $u
+
+#
+# Envelope sender rewriting
+#
+S10
+R<@> $n errors to mailer-daemon
+R@ <@ $*> $n temporarily bypass Sun bogosity
+R$+ $: $>50 $1 add local domain if needed
+R$* $: $>94 $1 do masquerading
+
+#
+# Envelope recipient rewriting
+#
+S20
+R$+ < @ $* > $: $1 strip host part
+
+#
+# Header sender rewriting
+#
+S30
+R<@> $n errors to mailer-daemon
+R@ <@ $*> $n temporarily bypass Sun bogosity
+R$+ $: $>50 $1 add local domain if needed
+R$* $: $>93 $1 do masquerading
+
+#
+# Header recipient rewriting
+#
+S40
+R$+ $: $>50 $1 add local domain if needed
+
+#
+# Common code to add local domain name (only if always-add-domain)
+#
+S50
+
+#####################################
+### SMTP Mailer specification ###
+#####################################
+
+##### @(#)smtp.m4 8.38 (Berkeley) 5/19/1998 #####
+
+Msmtp, P=[IPC], F=mDFMuX, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Mesmtp, P=[IPC], F=mDFMuXa, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Msmtp8, P=[IPC], F=mDFMuX8, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Mrelay, P=[IPC], F=mDFMuXa8, S=11/31, R=61, E=\r\n, L=2040,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+
+#
+# envelope sender rewriting
+#
+S11
+R$+ $: $>51 $1 sender/recipient common
+R$* :; <@> $@ list:; special case
+R$* $: $>61 $1 qualify unqual'ed names
+R$+ $: $>94 $1 do masquerading
+
+
+#
+# envelope recipient rewriting --
+# also header recipient if not masquerading recipients
+#
+S21
+R$+ $: $>51 $1 sender/recipient common
+R$+ $: $>61 $1 qualify unqual'ed names
+
+
+#
+# header sender and masquerading header recipient rewriting
+#
+S31
+R$+ $: $>51 $1 sender/recipient common
+R:; <@> $@ list:; special case
+
+# do special header rewriting
+R$* <@> $* $@ $1 <@> $2 pass null host through
+R< @ $* > $* $@ < @ $1 > $2 pass route-addr through
+R$* $: $>61 $1 qualify unqual'ed names
+R$+ $: $>93 $1 do masquerading
+
+
+#
+# convert pseudo-domain addresses to real domain addresses
+#
+S51
+
+# pass <route-addr>s through
+R< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr>
+
+# output fake domains as user%fake@relay
+
+# do UUCP heuristics; note that these are shared with UUCP mailers
+R$+ < @ $+ .UUCP. > $: < $2 ! > $1 convert to UUCP form
+R$+ < @ $* > $* $@ $1 < @ $2 > $3 not UUCP form
+
+# leave these in .UUCP form to avoid further tampering
+R< $&h ! > $- ! $+ $@ $2 < @ $1 .UUCP. >
+R< $&h ! > $-.$+ ! $+ $@ $3 < @ $1.$2 >
+R< $&h ! > $+ $@ $1 < @ $&h .UUCP. >
+R< $+ ! > $+ $: $1 ! $2 < @ $Y > use UUCP_RELAY
+R$+ < @ $+ : $+ > $@ $1 < @ $3 > strip mailer: part
+R$+ < @ > $: $1 < @ *LOCAL* > if no UUCP_RELAY
+
+
+#
+# common sender and masquerading recipient rewriting
+#
+S61
+
+R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified
+R$+ $@ $1 < @ *LOCAL* > add local qualification
+
+
+#
+# relay mailer header masquerading recipient rewriting
+#
+S71
+
+R$+ $: $>61 $1
+R$+ $: $>93 $1
diff --git a/usr.sbin/sendmail/cf/cf/generic-solaris2.mc b/usr.sbin/sendmail/cf/cf/generic-solaris2.mc
index 1e1aa96a6c4..a696e019a9a 100644
--- a/usr.sbin/sendmail/cf/cf/generic-solaris2.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/generic-sunos4.1.cf b/usr.sbin/sendmail/cf/cf/generic-sunos4.1.cf
new file mode 100644
index 00000000000..1afbebd01fa
--- /dev/null
+++ b/usr.sbin/sendmail/cf/cf/generic-sunos4.1.cf
@@ -0,0 +1,1055 @@
+#
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
+# Copyright (c) 1988, 1993
+# The Regents of the University of California. 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.
+#
+#
+
+######################################################################
+######################################################################
+#####
+##### SENDMAIL CONFIGURATION FILE
+#####
+##### built by gshapiro@knecht.Sendmail.ORG on Tue Dec 29 09:59:26 PST 1998
+##### in /home/knecht/a/eric/src/sendmail/cf/cf
+##### using ../ as configuration include directory
+#####
+######################################################################
+######################################################################
+
+##### @(#)cfhead.m4 8.23 (Berkeley) 10/6/1998 #####
+##### @(#)cf.m4 8.29 (Berkeley) 5/19/1998 #####
+##### @(#)generic-sunos4.1.mc 8.8 (Berkeley) 5/19/1998 #####
+
+##### @(#)sunos4.1.m4 8.7 (Berkeley) 5/19/1998 #####
+
+
+##### @(#)generic.m4 8.9 (Berkeley) 5/19/1998 #####
+
+##### @(#)redirect.m4 8.10 (Berkeley) 5/19/1998 #####
+
+
+
+
+##### @(#)use_cw_file.m4 8.6 (Berkeley) 5/19/1998 #####
+
+
+
+##### @(#)proto.m4 8.237 (Berkeley) 12/17/1998 #####
+
+
+# level 8 config file format
+V8/Berkeley
+
+# override file safeties - setting this option compromises system security
+# need to set this now for the sake of class files
+#O DontBlameSendmail=safe
+
+##################
+# local info #
+##################
+
+Cwlocalhost
+# file containing names of hosts for which we receive email
+Fw/etc/sendmail.cw
+
+# my official domain name
+# ... define this only if sendmail cannot automatically determine your domain
+#Dj$w.Foo.COM
+
+
+CP.
+
+# "Smart" relay host (may be null)
+DS
+
+
+# operators that cannot be in local usernames (i.e., network indicators)
+CO @ % !
+
+# a class with just dot (for identifying canonical names)
+C..
+
+# a class with just a left bracket (for identifying domain literals)
+C[[
+
+
+
+
+
+
+
+
+
+# Resolve map (to check if a host exists in check_mail)
+Kresolve host -a<OK> -T<TEMP>
+
+# Hosts that will permit relaying ($=R)
+FR-o /etc/mail/relay-domains
+
+# who I send unqualified names to (null means deliver locally)
+DR
+
+# who gets all local email traffic ($R has precedence for unqualified names)
+DH
+
+# dequoting map
+Kdequote dequote
+
+# class E: names that should be exposed as from this host, even if we masquerade
+# class L: names that should be delivered locally, even if we have a relay
+# class M: domains that should be converted to $M
+#CL root
+CE root
+
+# who I masquerade as (null for no masquerading) (see also $=M)
+DM
+
+# my name for error messages
+DnMAILER-DAEMON
+
+
+CPREDIRECT
+
+# Configuration version number
+DZ8.9.2
+
+
+###############
+# Options #
+###############
+
+# strip message body to 7 bits on input?
+O SevenBitInput=False
+
+# 8-bit data handling
+O EightBitMode=pass8
+
+
+# wait for alias file rebuild (default units: minutes)
+O AliasWait=10
+
+# location of alias file
+O AliasFile=/etc/aliases
+
+# minimum number of free blocks on filesystem
+O MinFreeBlocks=100
+
+# maximum message size
+#O MaxMessageSize=1000000
+
+# substitution for space (blank) characters
+O BlankSub=.
+
+# avoid connecting to "expensive" mailers on initial submission?
+O HoldExpensive=False
+
+# checkpoint queue runs after every N successful deliveries
+#O CheckpointInterval=10
+
+# default delivery mode
+O DeliveryMode=background
+
+# automatically rebuild the alias database?
+#O AutoRebuildAliases
+
+# error message header/file
+#O ErrorHeader=/etc/sendmail.oE
+
+# error mode
+#O ErrorMode=print
+
+# save Unix-style "From_" lines at top of header?
+#O SaveFromLine
+
+# temporary file mode
+O TempFileMode=0600
+
+# match recipients against GECOS field?
+#O MatchGECOS
+
+# maximum hop count
+#O MaxHopCount=17
+
+# location of help file
+O HelpFile=/usr/lib/sendmail.hf
+
+# ignore dots as terminators in incoming messages?
+#O IgnoreDots
+
+# name resolver options
+#O ResolverOptions=+AAONLY
+
+# deliver MIME-encapsulated error messages?
+O SendMimeErrors=True
+
+# Forward file search path
+O ForwardPath=$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward
+
+# open connection cache size
+O ConnectionCacheSize=2
+
+# open connection cache timeout
+O ConnectionCacheTimeout=5m
+
+# persistent host status directory
+#O HostStatusDirectory=.hoststat
+
+# single thread deliveries (requires HostStatusDirectory)?
+#O SingleThreadDelivery
+
+# use Errors-To: header?
+O UseErrorsTo=False
+
+# log level
+O LogLevel=9
+
+# send to me too, even in an alias expansion?
+#O MeToo
+
+# verify RHS in newaliases?
+O CheckAliases=False
+
+# default messages to old style headers if no special punctuation?
+O OldStyleHeaders=True
+
+# SMTP daemon options
+#O DaemonPortOptions=Port=esmtp
+
+# privacy flags
+O PrivacyOptions=authwarnings
+
+# who (if anyone) should get extra copies of error messages
+#O PostMasterCopy=Postmaster
+
+# slope of queue-only function
+#O QueueFactor=600000
+
+# queue directory
+O QueueDirectory=/var/spool/mqueue
+
+# timeouts (many of these)
+#O Timeout.initial=5m
+#O Timeout.connect=5m
+#O Timeout.iconnect=5m
+#O Timeout.helo=5m
+#O Timeout.mail=10m
+#O Timeout.rcpt=1h
+#O Timeout.datainit=5m
+#O Timeout.datablock=1h
+#O Timeout.datafinal=1h
+#O Timeout.rset=5m
+#O Timeout.quit=2m
+#O Timeout.misc=2m
+#O Timeout.command=1h
+#O Timeout.ident=30s
+#O Timeout.fileopen=60s
+O Timeout.queuereturn=5d
+#O Timeout.queuereturn.normal=5d
+#O Timeout.queuereturn.urgent=2d
+#O Timeout.queuereturn.non-urgent=7d
+O Timeout.queuewarn=4h
+#O Timeout.queuewarn.normal=4h
+#O Timeout.queuewarn.urgent=1h
+#O Timeout.queuewarn.non-urgent=12h
+#O Timeout.hoststatus=30m
+
+# should we not prune routes in route-addr syntax addresses?
+#O DontPruneRoutes
+
+# queue up everything before forking?
+O SuperSafe=True
+
+# status file
+O StatusFile=/etc/sendmail.st
+
+# time zone handling:
+# if undefined, use system default
+# if defined but null, use TZ envariable passed in
+# if defined and non-null, use that info
+#O TimeZoneSpec=
+
+# default UID (can be username or userid:groupid)
+#O DefaultUser=mailnull
+
+# list of locations of user database file (null means no lookup)
+#O UserDatabaseSpec=/etc/userdb
+
+# fallback MX host
+#O FallbackMXhost=fall.back.host.net
+
+# if we are the best MX host for a site, try it directly instead of config err
+#O TryNullMXList
+
+# load average at which we just queue messages
+#O QueueLA=8
+
+# load average at which we refuse connections
+#O RefuseLA=12
+
+# maximum number of children we allow at one time
+#O MaxDaemonChildren=12
+
+# maximum number of new connections per second
+#O ConnectionRateThrottle=3
+
+# work recipient factor
+#O RecipientFactor=30000
+
+# deliver each queued job in a separate process?
+#O ForkEachJob
+
+# work class factor
+#O ClassFactor=1800
+
+# work time factor
+#O RetryFactor=90000
+
+# shall we sort the queue by hostname first?
+#O QueueSortOrder=priority
+
+# minimum time in queue before retry
+#O MinQueueAge=30m
+
+# default character set
+#O DefaultCharSet=iso-8859-1
+
+# service switch file (ignored on Solaris, Ultrix, OSF/1, others)
+#O ServiceSwitchFile=/etc/service.switch
+
+# hosts file (normally /etc/hosts)
+#O HostsFile=/etc/hosts
+
+# dialup line delay on connection failure
+#O DialDelay=10s
+
+# action to take if there are no recipients in the message
+#O NoRecipientAction=add-to-undisclosed
+
+# chrooted environment for writing to files
+#O SafeFileEnvironment=/arch
+
+# are colons OK in addresses?
+#O ColonOkInAddr
+
+# how many jobs can you process in the queue?
+#O MaxQueueRunSize=10000
+
+# shall I avoid expanding CNAMEs (violates protocols)?
+#O DontExpandCnames
+
+# SMTP initial login message (old $e macro)
+O SmtpGreetingMessage=$j Sendmail $v/$Z; $b
+
+# UNIX initial From header format (old $l macro)
+O UnixFromLine=From $g $d
+
+# From: lines that have embedded newlines are unwrapped onto one line
+#O SingleLineFromHeader=False
+
+# Allow HELO SMTP command that does not include a host name
+#O AllowBogusHELO=False
+
+# Characters to be quoted in a full name phrase (@,;:\()[] are automatic)
+#O MustQuoteChars=.
+
+# delimiter (operator) characters (old $o macro)
+O OperatorChars=.:%@!^/[]+
+
+# shall I avoid calling initgroups(3) because of high NIS costs?
+#O DontInitGroups
+
+# are group-writable :include: and .forward files (un)trustworthy?
+#O UnsafeGroupWrites
+
+# where do errors that occur when sending errors get sent?
+#O DoubleBounceAddress=postmaster
+
+# what user id do we assume for the majority of the processing?
+#O RunAsUser=sendmail
+
+# maximum number of recipients per SMTP envelope
+#O MaxRecipientsPerMessage=100
+
+# shall we get local names from our installed interfaces?
+#O DontProbeInterfaces
+
+
+
+
+
+###########################
+# Message precedences #
+###########################
+
+Pfirst-class=0
+Pspecial-delivery=100
+Plist=-30
+Pbulk=-60
+Pjunk=-100
+
+#####################
+# Trusted users #
+#####################
+
+# this is equivalent to setting class "t"
+#Ft/etc/sendmail.ct
+Troot
+Tdaemon
+Tuucp
+
+#########################
+# Format of headers #
+#########################
+
+H?P?Return-Path: <$g>
+HReceived: $?sfrom $s $.$?_($?s$|from $.$_)
+ $.by $j ($v/$Z)$?r with $r$. id $i$?u
+ for $u; $|;
+ $.$b
+H?D?Resent-Date: $a
+H?D?Date: $a
+H?F?Resent-From: $?x$x <$g>$|$g$.
+H?F?From: $?x$x <$g>$|$g$.
+H?x?Full-Name: $x
+# HPosted-Date: $a
+# H?l?Received-Date: $b
+H?M?Resent-Message-Id: <$t.$i@$j>
+H?M?Message-Id: <$t.$i@$j>
+#
+######################################################################
+######################################################################
+#####
+##### REWRITING RULES
+#####
+######################################################################
+######################################################################
+
+############################################
+### Ruleset 3 -- Name Canonicalization ###
+############################################
+S3
+
+# handle null input (translate to <@> special case)
+R$@ $@ <@>
+
+# strip group: syntax (not inside angle brackets!) and trailing semicolon
+R$* $: $1 <@> mark addresses
+R$* < $* > $* <@> $: $1 < $2 > $3 unmark <addr>
+R@ $* <@> $: @ $1 unmark @host:...
+R$* :: $* <@> $: $1 :: $2 unmark node::addr
+R:include: $* <@> $: :include: $1 unmark :include:...
+R$* [ $* : $* ] <@> $: $1 [ $2 : $3 ] unmark IPv6 addrs
+R$* : $* [ $* ] $: $1 : $2 [ $3 ] <@> remark if leading colon
+R$* : $* <@> $: $2 strip colon if marked
+R$* <@> $: $1 unmark
+R$* ; $1 strip trailing semi
+R$* < $* ; > $1 < $2 > bogus bracketed semi
+
+# null input now results from list:; syntax
+R$@ $@ :; <@>
+
+# strip angle brackets -- note RFC733 heuristic to get innermost item
+R$* $: < $1 > housekeeping <>
+R$+ < $* > < $2 > strip excess on left
+R< $* > $+ < $1 > strip excess on right
+R<> $@ < @ > MAIL FROM:<> case
+R< $+ > $: $1 remove housekeeping <>
+
+# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
+R@ $+ , $+ @ $1 : $2 change all "," to ":"
+
+# localize and dispose of route-based addresses
+R@ $+ : $+ $@ $>96 < @$1 > : $2 handle <route-addr>
+
+# find focus for list syntax
+R $+ : $* ; @ $+ $@ $>96 $1 : $2 ; < @ $3 > list syntax
+R $+ : $* ; $@ $1 : $2; list syntax
+
+# find focus for @ syntax addresses
+R$+ @ $+ $: $1 < @ $2 > focus on domain
+R$+ < $+ @ $+ > $1 $2 < @ $3 > move gaze right
+R$+ < @ $+ > $@ $>96 $1 < @ $2 > already canonical
+
+# do some sanity checking
+R$* < @ $* : $* > $* $1 < @ $2 $3 > $4 nix colons in addrs
+
+# convert old-style addresses to a domain-based address
+R$- ! $+ $@ $>96 $2 < @ $1 .UUCP > resolve uucp names
+R$+ . $- ! $+ $@ $>96 $3 < @ $1 . $2 > domain uucps
+R$+ ! $+ $@ $>96 $2 < @ $1 .UUCP > uucp subdomains
+
+# if we have % signs, take the rightmost one
+R$* % $* $1 @ $2 First make them all @s.
+R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last.
+R$* @ $* $@ $>96 $1 < @ $2 > Insert < > and finish
+
+# else we must be a local name
+R$* $@ $>96 $1
+
+
+################################################
+### Ruleset 96 -- bottom half of ruleset 3 ###
+################################################
+
+S96
+
+# handle special cases for local names
+R$* < @ localhost > $* $: $1 < @ $j . > $2 no domain at all
+R$* < @ localhost . $m > $* $: $1 < @ $j . > $2 local domain
+R$* < @ localhost . UUCP > $* $: $1 < @ $j . > $2 .UUCP domain
+R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [a.b.c.d]
+R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal
+R$* < @@ $+ > $* $@ $1 < @ $2 > $3 canon IP addr
+
+
+
+
+
+# if really UUCP, handle it immediately
+
+# try UUCP traffic as a local address
+R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3
+R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3
+
+# pass to name server to make hostname canonical
+R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4
+
+# local host aliases and pseudo-domains are always canonical
+R$* < @ $=w > $* $: $1 < @ $2 . > $3
+R$* < @ $j > $* $: $1 < @ $j . > $2
+R$* < @ $=M > $* $: $1 < @ $2 . > $3
+R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4
+R$* < @ $* . . > $* $1 < @ $2 . > $3
+
+
+##################################################
+### Ruleset 4 -- Final Output Post-rewriting ###
+##################################################
+S4
+
+R$* <@> $@ handle <> and list:;
+
+# strip trailing dot off possibly canonical name
+R$* < @ $+ . > $* $1 < @ $2 > $3
+
+# eliminate internal code -- should never get this far!
+R$* < @ *LOCAL* > $* $1 < @ $j > $2
+
+# externalize local domain info
+R$* < $+ > $* $1 $2 $3 defocus
+R@ $+ : @ $+ : $+ @ $1 , @ $2 : $3 <route-addr> canonical
+R@ $* $@ @ $1 ... and exit
+
+# UUCP must always be presented in old form
+R$+ @ $- . UUCP $2!$1 u@h.UUCP => h!u
+
+# delete duplicate local names
+R$+ % $=w @ $=w $1 @ $2 u%host@host => u@host
+
+
+
+##############################################################
+### Ruleset 97 -- recanonicalize and call ruleset zero ###
+### (used for recursive calls) ###
+##############################################################
+
+S97
+R$* $: $>3 $1
+R$* $@ $>0 $1
+
+
+######################################
+### Ruleset 0 -- Parse Address ###
+######################################
+
+S0
+
+R$* $: $>Parse0 $1 initial parsing
+R<@> $#local $: <@> special case error msgs
+R$* $: $>98 $1 handle local hacks
+R$* $: $>Parse1 $1 final parsing
+
+#
+# Parse0 -- do initial syntax checking and eliminate local addresses.
+# This should either return with the (possibly modified) input
+# or return with a #error mailer. It should not return with a
+# #mailer other than the #error mailer.
+#
+
+SParse0
+R<@> $@ <@> special case error msgs
+R$* : $* ; <@> $#error $@ 5.1.3 $: "List:; syntax illegal for recipient addresses"
+#R@ <@ $* > < @ $1 > catch "@@host" bogosity
+R<@ $+> $#error $@ 5.1.3 $: "User address required"
+R$* $: <> $1
+R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3
+R<> $* <$* : $* > $* $#error $@ 5.1.3 $: "Colon illegal in host name part"
+R<> $* $1
+R$* < @ . $* > $* $#error $@ 5.1.2 $: "Invalid host name"
+R$* < @ $* .. $* > $* $#error $@ 5.1.2 $: "Invalid host name"
+
+# now delete the local info -- note $=O to find characters that cause forwarding
+R$* < @ > $* $@ $>Parse0 $>3 $1 user@ => user
+R< @ $=w . > : $* $@ $>Parse0 $>3 $2 @here:... -> ...
+R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here
+R< @ $+ > $#error $@ 5.1.3 $: "User address required"
+R$* $=O $* < @ $=w . > $@ $>Parse0 $>3 $1 $2 $3 ...@here -> ...
+R$- $: $(dequote $1 $) < @ *LOCAL* > dequote "foo"
+R< @ *LOCAL* > $#error $@ 5.1.3 $: "User address required"
+R$* $=O $* < @ *LOCAL* >
+ $@ $>Parse0 $>3 $1 $2 $3 ...@*LOCAL* -> ...
+R$* < @ *LOCAL* > $: $1
+
+#
+# Parse1 -- the bottom half of ruleset 0.
+#
+
+SParse1
+# handle numeric address spec
+R$* < @ [ $+ ] > $* $: $>98 $1 < @ [ $2 ] > $3 numeric internet spec
+R$* < @ [ $+ ] > $* $#esmtp $@ [$2] $: $1 < @ [$2] > $3 still numeric: send
+
+
+# short circuit local delivery so forwarded email works
+R$=L < @ $=w . > $#local $: @ $1 special local names
+R$+ < @ $=w . > $#local $: $1 regular local name
+
+
+# resolve remotely connected UUCP links (if any)
+
+# resolve fake top level domains by forwarding to other hosts
+
+
+
+# pass names that still have a host to a smarthost (if defined)
+R$* < @ $* > $* $: $>95 < $S > $1 < @ $2 > $3 glue on smarthost name
+
+# deal with other remote names
+R$* < @$* > $* $#esmtp $@ $2 $: $1 < @ $2 > $3 user@host.domain
+
+# handle locally delivered names
+R$=L $#local $: @ $1 special local names
+R$+ $#local $: $1 regular local names
+
+###########################################################################
+### Ruleset 5 -- special rewriting after aliases have been expanded ###
+###########################################################################
+
+S5
+
+# deal with plussed users so aliases work nicely
+R$+ + * $#local $@ $&h $: $1
+R$+ + $* $#local $@ + $2 $: $1 + *
+
+# prepend an empty "forward host" on the front
+R$+ $: <> $1
+
+
+# see if we have a relay or a hub
+R< > $+ $: < $H > $1 try hub
+R< > $+ $: < $R > $1 try relay
+R< > $+ $: < > < $1 $&h > nope, restore +detail
+R< > < $+ + $* > $* < > < $1 > + $2 $3 find the user part
+R< > < $+ > + $* $#local $@ $2 $: @ $1 strip the extra +
+R< > < $+ > $@ $1 no +detail
+R$+ $: $1 $&h add +detail back in
+R< local : $* > $* $: $>95 < local : $1 > $2 no host extension
+R< error : $* > $* $: $>95 < error : $1 > $2 no host extension
+R< $- : $+ > $+ $: $>95 < $1 : $2 > $3 < @ $2 >
+R< $+ > $+ $@ $>95 < $1 > $2 < @ $1 >
+
+
+###################################################################
+### Ruleset 95 -- canonify mailer:[user@]host syntax to triple ###
+###################################################################
+
+S95
+R< > $* $@ $1 strip off null relay
+R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
+R< local : $* > $* $>CanonLocal < $1 > $2
+R< $- : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user
+R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
+R< $=w > $* $@ $2 delete local host
+R< $+ > $* $#relay $@ $1 $: $2 use unqualified mailer
+
+###################################################################
+### Ruleset CanonLocal -- canonify local: syntax ###
+###################################################################
+
+SCanonLocal
+# strip trailing dot from any host name that may appear
+R< $* > $* < @ $* . > $: < $1 > $2 < @ $3 >
+
+# handle local: syntax -- use old user, either with or without host
+R< > $* < @ $* > $* $#local $@ $1@$2 $: $1
+R< > $+ $#local $@ $1 $: $1
+
+# handle local:user@host syntax -- ignore host part
+R< $+ @ $+ > $* < @ $* > $: < $1 > $3 < @ $4 >
+
+# handle local:user syntax
+R< $+ > $* <@ $* > $* $#local $@ $2@$3 $: $1
+R< $+ > $* $#local $@ $2 $: $1
+
+###################################################################
+### Ruleset 93 -- convert header names to masqueraded form ###
+###################################################################
+
+S93
+
+
+# special case the users that should be exposed
+R$=E < @ *LOCAL* > $@ $1 < @ $j . > leave exposed
+R$=E < @ $=M . > $@ $1 < @ $2 . >
+R$=E < @ $=w . > $@ $1 < @ $2 . >
+
+# handle domain-specific masquerading
+R$* < @ $=M . > $* $: $1 < @ $2 . @ $M > $3 convert masqueraded doms
+R$* < @ $=w . > $* $: $1 < @ $2 . @ $M > $3
+R$* < @ *LOCAL* > $* $: $1 < @ $j . @ $M > $2
+R$* < @ $+ @ > $* $: $1 < @ $2 > $3 $M is null
+R$* < @ $+ @ $+ > $* $: $1 < @ $3 . > $4 $M is not null
+
+###################################################################
+### Ruleset 94 -- convert envelope names to masqueraded form ###
+###################################################################
+
+S94
+R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
+
+###################################################################
+### Ruleset 98 -- local part of ruleset zero (can be null) ###
+###################################################################
+
+S98
+
+# addresses sent to foo@host.REDIRECT will give a 551 error code
+R$* < @ $+ .REDIRECT. > $: $1 < @ $2 . REDIRECT . > < ${opMode} >
+R$* < @ $+ .REDIRECT. > <i> $: $1 < @ $2 . REDIRECT. >
+R$* < @ $+ .REDIRECT. > < $- > $# error $@ 5.1.1 $: "551 User has moved; please try " <$1@$2>
+
+
+
+######################################################################
+### 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.
+###
+### Parameters:
+### $1 -- full recipient address
+###
+### Returns:
+### parsed, non-local-relaying address
+######################################################################
+
+SParseRecipient
+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<NO> $* < @ $* $=R > $: <RELAY> $1 < @ $2 $3 >
+
+R<RELAY> $* < @ $* > $@ $>ParseRecipient $1
+R<$-> $* $@ $2
+
+######################################################################
+### check_relay -- check hostname/address on SMTP startup
+######################################################################
+
+SLocal_check_relay
+Scheck_relay
+R$* $: $1 $| $>"Local_check_relay" $1
+R$* $| $* $| $#$* $#$3
+R$* $| $* $| $* $@ $>"Basic_check_relay" $1 $| $2
+
+SBasic_check_relay
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+
+
+######################################################################
+### check_mail -- check SMTP `MAIL FROM:' command argument
+######################################################################
+
+SLocal_check_mail
+Scheck_mail
+R$* $: $1 $| $>"Local_check_mail" $1
+R$* $| $#$* $#$2
+R$* $| $* $@ $>"Basic_check_mail" $1
+
+SBasic_check_mail
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+R<> $@ <OK>
+R$* $: <?> $>CanonAddr $1
+R<?> $* < @ $+ . > <?> $1 < @ $2 > strip trailing dots
+# handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc)
+R<?> $* < $* $=P > $* $: <OK> $1 < @ $2 $3 > $4
+R<?> $* < @ $+ > $* $: <? $(resolve $2 $: $2 <PERM> $) > $1 < @ $2 > $3
+R<? $* <$->> $* < @ $+ > $*
+ $: <$2> $3 < @ $4 > $5
+
+# handle case of @localhost on address
+R<$+> $* < @localhost > $: < ? $&{client_name} > <$1> $2 < @localhost >
+R<$+> $* < @localhost.$m >
+ $: < ? $&{client_name} > <$1> $2 < @localhost.$m >
+R<$+> $* < @localhost.UUCP >
+ $: < ? $&{client_name} > <$1> $2 < @localhost.UUCP >
+R<? $=w> <$+> $* <?> <$2> $3
+R<? $+> <$+> $* $#error $@ 5.5.4 $: "553 Real domain name required"
+R<?> <$+> $* $: <$1> $2
+
+
+# handle case of no @domain on address
+R<?> $* $: < ? $&{client_name} > $1
+R<?> $* $@ <OK> ...local unqualed ok
+R<? $+> $* $#error $@ 5.5.4 $: "553 Domain name required"
+ ...remote is not
+# check results
+R<?> $* $@ <OK>
+R<OK> $* $@ <OK>
+R<TEMP> $* $#error $@ 4.1.8 $: "451 Sender domain must resolve"
+R<PERM> $* $#error $@ 5.1.8 $: "501 Sender domain must exist"
+
+######################################################################
+### check_rcpt -- check SMTP `RCPT TO:' command argument
+######################################################################
+
+SLocal_check_rcpt
+Scheck_rcpt
+R$* $: $1 $| $>"Local_check_rcpt" $1
+R$* $| $#$* $#$2
+R$* $| $* $@ $>"Basic_check_rcpt" $1
+
+SBasic_check_rcpt
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+R$* $: $>ParseRecipient $1 strip relayable hosts
+
+
+
+
+# anything terminating locally is ok
+R$+ < @ $=w > $@ OK
+R$+ < @ $* $=R > $@ OK
+
+
+# check for local user (i.e. unqualified address)
+R$* $: <?> $1
+R<?> $* < @ $+ > $: <REMOTE> $1 < @ $2 >
+# local user is ok
+R<?> $+ $@ OK
+R<$+> $* $: $2
+
+# anything originating locally is ok
+R$* $: <?> $&{client_name}
+# check if bracketed IP address (forward lookup != reverse lookup)
+R<?> [$+] $: <BAD> [$1]
+# pass to name server to make hostname canonical
+R<?> $* $~P $: <?> $[ $1 $2 $]
+R<$-> $* $: $2
+R$* . $1 strip trailing dots
+R$@ $@ OK
+R$=w $@ OK
+R$* $=R $@ OK
+
+# check IP address
+R$* $: $&{client_addr}
+R$@ $@ OK originated locally
+R0 $@ OK originated locally
+R$=R $* $@ OK relayable IP address
+R$* $: [ $1 ] put brackets around it...
+R$=w $@ OK ... and see if it is local
+
+
+# anything else is bogus
+R$* $#error $@ 5.7.1 $: "550 Relaying denied"
+
+#
+######################################################################
+######################################################################
+#####
+##### MAILER DEFINITIONS
+#####
+######################################################################
+######################################################################
+
+
+##################################################
+### Local and Program Mailer specification ###
+##################################################
+
+##### @(#)local.m4 8.30 (Berkeley) 6/30/1998 #####
+
+Mlocal, P=/bin/mail, F=lsDFMAw5:/|@qrmn9, S=10/30, R=20/40,
+ T=DNS/RFC822/X-Unix,
+ A=mail -d $u
+Mprog, P=/bin/sh, F=lsDFMoqeu9, S=10/30, R=20/40, D=$z:/,
+ T=X-Unix,
+ A=sh -c $u
+
+#
+# Envelope sender rewriting
+#
+S10
+R<@> $n errors to mailer-daemon
+R@ <@ $*> $n temporarily bypass Sun bogosity
+R$+ $: $>50 $1 add local domain if needed
+R$* $: $>94 $1 do masquerading
+
+#
+# Envelope recipient rewriting
+#
+S20
+R$+ < @ $* > $: $1 strip host part
+
+#
+# Header sender rewriting
+#
+S30
+R<@> $n errors to mailer-daemon
+R@ <@ $*> $n temporarily bypass Sun bogosity
+R$+ $: $>50 $1 add local domain if needed
+R$* $: $>93 $1 do masquerading
+
+#
+# Header recipient rewriting
+#
+S40
+R$+ $: $>50 $1 add local domain if needed
+
+#
+# Common code to add local domain name (only if always-add-domain)
+#
+S50
+
+#####################################
+### SMTP Mailer specification ###
+#####################################
+
+##### @(#)smtp.m4 8.38 (Berkeley) 5/19/1998 #####
+
+Msmtp, P=[IPC], F=mDFMuX, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Mesmtp, P=[IPC], F=mDFMuXa, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Msmtp8, P=[IPC], F=mDFMuX8, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Mrelay, P=[IPC], F=mDFMuXa8, S=11/31, R=61, E=\r\n, L=2040,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+
+#
+# envelope sender rewriting
+#
+S11
+R$+ $: $>51 $1 sender/recipient common
+R$* :; <@> $@ list:; special case
+R$* $: $>61 $1 qualify unqual'ed names
+R$+ $: $>94 $1 do masquerading
+
+
+#
+# envelope recipient rewriting --
+# also header recipient if not masquerading recipients
+#
+S21
+R$+ $: $>51 $1 sender/recipient common
+R$+ $: $>61 $1 qualify unqual'ed names
+
+
+#
+# header sender and masquerading header recipient rewriting
+#
+S31
+R$+ $: $>51 $1 sender/recipient common
+R:; <@> $@ list:; special case
+
+# do special header rewriting
+R$* <@> $* $@ $1 <@> $2 pass null host through
+R< @ $* > $* $@ < @ $1 > $2 pass route-addr through
+R$* $: $>61 $1 qualify unqual'ed names
+R$+ $: $>93 $1 do masquerading
+
+
+#
+# convert pseudo-domain addresses to real domain addresses
+#
+S51
+
+# pass <route-addr>s through
+R< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr>
+
+# output fake domains as user%fake@relay
+
+# do UUCP heuristics; note that these are shared with UUCP mailers
+R$+ < @ $+ .UUCP. > $: < $2 ! > $1 convert to UUCP form
+R$+ < @ $* > $* $@ $1 < @ $2 > $3 not UUCP form
+
+# leave these in .UUCP form to avoid further tampering
+R< $&h ! > $- ! $+ $@ $2 < @ $1 .UUCP. >
+R< $&h ! > $-.$+ ! $+ $@ $3 < @ $1.$2 >
+R< $&h ! > $+ $@ $1 < @ $&h .UUCP. >
+R< $+ ! > $+ $: $1 ! $2 < @ $Y > use UUCP_RELAY
+R$+ < @ $+ : $+ > $@ $1 < @ $3 > strip mailer: part
+R$+ < @ > $: $1 < @ *LOCAL* > if no UUCP_RELAY
+
+
+#
+# common sender and masquerading recipient rewriting
+#
+S61
+
+R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified
+R$+ $@ $1 < @ *LOCAL* > add local qualification
+
+
+#
+# relay mailer header masquerading recipient rewriting
+#
+S71
+
+R$+ $: $>61 $1
+R$+ $: $>93 $1
diff --git a/usr.sbin/sendmail/cf/cf/generic-sunos4.1.mc b/usr.sbin/sendmail/cf/cf/generic-sunos4.1.mc
index 7e916c15ea8..fc0de356137 100644
--- a/usr.sbin/sendmail/cf/cf/generic-sunos4.1.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/generic-ultrix4.cf b/usr.sbin/sendmail/cf/cf/generic-ultrix4.cf
new file mode 100644
index 00000000000..7f532fb90c6
--- /dev/null
+++ b/usr.sbin/sendmail/cf/cf/generic-ultrix4.cf
@@ -0,0 +1,1055 @@
+#
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
+# Copyright (c) 1988, 1993
+# The Regents of the University of California. 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.
+#
+#
+
+######################################################################
+######################################################################
+#####
+##### SENDMAIL CONFIGURATION FILE
+#####
+##### built by gshapiro@knecht.Sendmail.ORG on Tue Dec 29 09:59:27 PST 1998
+##### in /home/knecht/a/eric/src/sendmail/cf/cf
+##### using ../ as configuration include directory
+#####
+######################################################################
+######################################################################
+
+##### @(#)cfhead.m4 8.23 (Berkeley) 10/6/1998 #####
+##### @(#)cf.m4 8.29 (Berkeley) 5/19/1998 #####
+##### @(#)generic-ultrix4.mc 8.8 (Berkeley) 5/19/1998 #####
+
+##### @(#)ultrix4.m4 8.8 (Berkeley) 5/19/1998 #####
+
+
+##### @(#)generic.m4 8.9 (Berkeley) 5/19/1998 #####
+
+##### @(#)redirect.m4 8.10 (Berkeley) 5/19/1998 #####
+
+
+
+
+##### @(#)use_cw_file.m4 8.6 (Berkeley) 5/19/1998 #####
+
+
+
+##### @(#)proto.m4 8.237 (Berkeley) 12/17/1998 #####
+
+
+# level 8 config file format
+V8/Berkeley
+
+# override file safeties - setting this option compromises system security
+# need to set this now for the sake of class files
+#O DontBlameSendmail=safe
+
+##################
+# local info #
+##################
+
+Cwlocalhost
+# file containing names of hosts for which we receive email
+Fw/etc/sendmail.cw
+
+# my official domain name
+# ... define this only if sendmail cannot automatically determine your domain
+#Dj$w.Foo.COM
+
+
+CP.
+
+# "Smart" relay host (may be null)
+DS
+
+
+# operators that cannot be in local usernames (i.e., network indicators)
+CO @ % !
+
+# a class with just dot (for identifying canonical names)
+C..
+
+# a class with just a left bracket (for identifying domain literals)
+C[[
+
+
+
+
+
+
+
+
+
+# Resolve map (to check if a host exists in check_mail)
+Kresolve host -a<OK> -T<TEMP>
+
+# Hosts that will permit relaying ($=R)
+FR-o /etc/mail/relay-domains
+
+# who I send unqualified names to (null means deliver locally)
+DR
+
+# who gets all local email traffic ($R has precedence for unqualified names)
+DH
+
+# dequoting map
+Kdequote dequote
+
+# class E: names that should be exposed as from this host, even if we masquerade
+# class L: names that should be delivered locally, even if we have a relay
+# class M: domains that should be converted to $M
+#CL root
+CE root
+
+# who I masquerade as (null for no masquerading) (see also $=M)
+DM
+
+# my name for error messages
+DnMAILER-DAEMON
+
+
+CPREDIRECT
+
+# Configuration version number
+DZ8.9.2
+
+
+###############
+# Options #
+###############
+
+# strip message body to 7 bits on input?
+O SevenBitInput=False
+
+# 8-bit data handling
+O EightBitMode=pass8
+
+
+# wait for alias file rebuild (default units: minutes)
+O AliasWait=10
+
+# location of alias file
+O AliasFile=/etc/aliases
+
+# minimum number of free blocks on filesystem
+O MinFreeBlocks=100
+
+# maximum message size
+#O MaxMessageSize=1000000
+
+# substitution for space (blank) characters
+O BlankSub=.
+
+# avoid connecting to "expensive" mailers on initial submission?
+O HoldExpensive=False
+
+# checkpoint queue runs after every N successful deliveries
+#O CheckpointInterval=10
+
+# default delivery mode
+O DeliveryMode=background
+
+# automatically rebuild the alias database?
+#O AutoRebuildAliases
+
+# error message header/file
+#O ErrorHeader=/etc/sendmail.oE
+
+# error mode
+#O ErrorMode=print
+
+# save Unix-style "From_" lines at top of header?
+#O SaveFromLine
+
+# temporary file mode
+O TempFileMode=0600
+
+# match recipients against GECOS field?
+#O MatchGECOS
+
+# maximum hop count
+#O MaxHopCount=17
+
+# location of help file
+O HelpFile=/usr/lib/sendmail.hf
+
+# ignore dots as terminators in incoming messages?
+#O IgnoreDots
+
+# name resolver options
+#O ResolverOptions=+AAONLY
+
+# deliver MIME-encapsulated error messages?
+O SendMimeErrors=True
+
+# Forward file search path
+O ForwardPath=$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward
+
+# open connection cache size
+O ConnectionCacheSize=2
+
+# open connection cache timeout
+O ConnectionCacheTimeout=5m
+
+# persistent host status directory
+#O HostStatusDirectory=.hoststat
+
+# single thread deliveries (requires HostStatusDirectory)?
+#O SingleThreadDelivery
+
+# use Errors-To: header?
+O UseErrorsTo=False
+
+# log level
+O LogLevel=9
+
+# send to me too, even in an alias expansion?
+#O MeToo
+
+# verify RHS in newaliases?
+O CheckAliases=False
+
+# default messages to old style headers if no special punctuation?
+O OldStyleHeaders=True
+
+# SMTP daemon options
+#O DaemonPortOptions=Port=esmtp
+
+# privacy flags
+O PrivacyOptions=authwarnings
+
+# who (if anyone) should get extra copies of error messages
+#O PostMasterCopy=Postmaster
+
+# slope of queue-only function
+#O QueueFactor=600000
+
+# queue directory
+O QueueDirectory=/var/spool/mqueue
+
+# timeouts (many of these)
+#O Timeout.initial=5m
+#O Timeout.connect=5m
+#O Timeout.iconnect=5m
+#O Timeout.helo=5m
+#O Timeout.mail=10m
+#O Timeout.rcpt=1h
+#O Timeout.datainit=5m
+#O Timeout.datablock=1h
+#O Timeout.datafinal=1h
+#O Timeout.rset=5m
+#O Timeout.quit=2m
+#O Timeout.misc=2m
+#O Timeout.command=1h
+#O Timeout.ident=30s
+#O Timeout.fileopen=60s
+O Timeout.queuereturn=5d
+#O Timeout.queuereturn.normal=5d
+#O Timeout.queuereturn.urgent=2d
+#O Timeout.queuereturn.non-urgent=7d
+O Timeout.queuewarn=4h
+#O Timeout.queuewarn.normal=4h
+#O Timeout.queuewarn.urgent=1h
+#O Timeout.queuewarn.non-urgent=12h
+#O Timeout.hoststatus=30m
+
+# should we not prune routes in route-addr syntax addresses?
+#O DontPruneRoutes
+
+# queue up everything before forking?
+O SuperSafe=True
+
+# status file
+O StatusFile=/etc/sendmail.st
+
+# time zone handling:
+# if undefined, use system default
+# if defined but null, use TZ envariable passed in
+# if defined and non-null, use that info
+#O TimeZoneSpec=
+
+# default UID (can be username or userid:groupid)
+#O DefaultUser=mailnull
+
+# list of locations of user database file (null means no lookup)
+#O UserDatabaseSpec=/etc/userdb
+
+# fallback MX host
+#O FallbackMXhost=fall.back.host.net
+
+# if we are the best MX host for a site, try it directly instead of config err
+#O TryNullMXList
+
+# load average at which we just queue messages
+#O QueueLA=8
+
+# load average at which we refuse connections
+#O RefuseLA=12
+
+# maximum number of children we allow at one time
+#O MaxDaemonChildren=12
+
+# maximum number of new connections per second
+#O ConnectionRateThrottle=3
+
+# work recipient factor
+#O RecipientFactor=30000
+
+# deliver each queued job in a separate process?
+#O ForkEachJob
+
+# work class factor
+#O ClassFactor=1800
+
+# work time factor
+#O RetryFactor=90000
+
+# shall we sort the queue by hostname first?
+#O QueueSortOrder=priority
+
+# minimum time in queue before retry
+#O MinQueueAge=30m
+
+# default character set
+#O DefaultCharSet=iso-8859-1
+
+# service switch file (ignored on Solaris, Ultrix, OSF/1, others)
+#O ServiceSwitchFile=/etc/service.switch
+
+# hosts file (normally /etc/hosts)
+#O HostsFile=/etc/hosts
+
+# dialup line delay on connection failure
+#O DialDelay=10s
+
+# action to take if there are no recipients in the message
+#O NoRecipientAction=add-to-undisclosed
+
+# chrooted environment for writing to files
+#O SafeFileEnvironment=/arch
+
+# are colons OK in addresses?
+#O ColonOkInAddr
+
+# how many jobs can you process in the queue?
+#O MaxQueueRunSize=10000
+
+# shall I avoid expanding CNAMEs (violates protocols)?
+#O DontExpandCnames
+
+# SMTP initial login message (old $e macro)
+O SmtpGreetingMessage=$j Sendmail $v/$Z; $b
+
+# UNIX initial From header format (old $l macro)
+O UnixFromLine=From $g $d
+
+# From: lines that have embedded newlines are unwrapped onto one line
+#O SingleLineFromHeader=False
+
+# Allow HELO SMTP command that does not include a host name
+#O AllowBogusHELO=False
+
+# Characters to be quoted in a full name phrase (@,;:\()[] are automatic)
+#O MustQuoteChars=.
+
+# delimiter (operator) characters (old $o macro)
+O OperatorChars=.:%@!^/[]+
+
+# shall I avoid calling initgroups(3) because of high NIS costs?
+#O DontInitGroups
+
+# are group-writable :include: and .forward files (un)trustworthy?
+#O UnsafeGroupWrites
+
+# where do errors that occur when sending errors get sent?
+#O DoubleBounceAddress=postmaster
+
+# what user id do we assume for the majority of the processing?
+#O RunAsUser=sendmail
+
+# maximum number of recipients per SMTP envelope
+#O MaxRecipientsPerMessage=100
+
+# shall we get local names from our installed interfaces?
+#O DontProbeInterfaces
+
+
+
+
+
+###########################
+# Message precedences #
+###########################
+
+Pfirst-class=0
+Pspecial-delivery=100
+Plist=-30
+Pbulk=-60
+Pjunk=-100
+
+#####################
+# Trusted users #
+#####################
+
+# this is equivalent to setting class "t"
+#Ft/etc/sendmail.ct
+Troot
+Tdaemon
+Tuucp
+
+#########################
+# Format of headers #
+#########################
+
+H?P?Return-Path: <$g>
+HReceived: $?sfrom $s $.$?_($?s$|from $.$_)
+ $.by $j ($v/$Z)$?r with $r$. id $i$?u
+ for $u; $|;
+ $.$b
+H?D?Resent-Date: $a
+H?D?Date: $a
+H?F?Resent-From: $?x$x <$g>$|$g$.
+H?F?From: $?x$x <$g>$|$g$.
+H?x?Full-Name: $x
+# HPosted-Date: $a
+# H?l?Received-Date: $b
+H?M?Resent-Message-Id: <$t.$i@$j>
+H?M?Message-Id: <$t.$i@$j>
+#
+######################################################################
+######################################################################
+#####
+##### REWRITING RULES
+#####
+######################################################################
+######################################################################
+
+############################################
+### Ruleset 3 -- Name Canonicalization ###
+############################################
+S3
+
+# handle null input (translate to <@> special case)
+R$@ $@ <@>
+
+# strip group: syntax (not inside angle brackets!) and trailing semicolon
+R$* $: $1 <@> mark addresses
+R$* < $* > $* <@> $: $1 < $2 > $3 unmark <addr>
+R@ $* <@> $: @ $1 unmark @host:...
+R$* :: $* <@> $: $1 :: $2 unmark node::addr
+R:include: $* <@> $: :include: $1 unmark :include:...
+R$* [ $* : $* ] <@> $: $1 [ $2 : $3 ] unmark IPv6 addrs
+R$* : $* [ $* ] $: $1 : $2 [ $3 ] <@> remark if leading colon
+R$* : $* <@> $: $2 strip colon if marked
+R$* <@> $: $1 unmark
+R$* ; $1 strip trailing semi
+R$* < $* ; > $1 < $2 > bogus bracketed semi
+
+# null input now results from list:; syntax
+R$@ $@ :; <@>
+
+# strip angle brackets -- note RFC733 heuristic to get innermost item
+R$* $: < $1 > housekeeping <>
+R$+ < $* > < $2 > strip excess on left
+R< $* > $+ < $1 > strip excess on right
+R<> $@ < @ > MAIL FROM:<> case
+R< $+ > $: $1 remove housekeeping <>
+
+# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
+R@ $+ , $+ @ $1 : $2 change all "," to ":"
+
+# localize and dispose of route-based addresses
+R@ $+ : $+ $@ $>96 < @$1 > : $2 handle <route-addr>
+
+# find focus for list syntax
+R $+ : $* ; @ $+ $@ $>96 $1 : $2 ; < @ $3 > list syntax
+R $+ : $* ; $@ $1 : $2; list syntax
+
+# find focus for @ syntax addresses
+R$+ @ $+ $: $1 < @ $2 > focus on domain
+R$+ < $+ @ $+ > $1 $2 < @ $3 > move gaze right
+R$+ < @ $+ > $@ $>96 $1 < @ $2 > already canonical
+
+# do some sanity checking
+R$* < @ $* : $* > $* $1 < @ $2 $3 > $4 nix colons in addrs
+
+# convert old-style addresses to a domain-based address
+R$- ! $+ $@ $>96 $2 < @ $1 .UUCP > resolve uucp names
+R$+ . $- ! $+ $@ $>96 $3 < @ $1 . $2 > domain uucps
+R$+ ! $+ $@ $>96 $2 < @ $1 .UUCP > uucp subdomains
+
+# if we have % signs, take the rightmost one
+R$* % $* $1 @ $2 First make them all @s.
+R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last.
+R$* @ $* $@ $>96 $1 < @ $2 > Insert < > and finish
+
+# else we must be a local name
+R$* $@ $>96 $1
+
+
+################################################
+### Ruleset 96 -- bottom half of ruleset 3 ###
+################################################
+
+S96
+
+# handle special cases for local names
+R$* < @ localhost > $* $: $1 < @ $j . > $2 no domain at all
+R$* < @ localhost . $m > $* $: $1 < @ $j . > $2 local domain
+R$* < @ localhost . UUCP > $* $: $1 < @ $j . > $2 .UUCP domain
+R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [a.b.c.d]
+R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal
+R$* < @@ $+ > $* $@ $1 < @ $2 > $3 canon IP addr
+
+
+
+
+
+# if really UUCP, handle it immediately
+
+# try UUCP traffic as a local address
+R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3
+R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3
+
+# pass to name server to make hostname canonical
+R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4
+
+# local host aliases and pseudo-domains are always canonical
+R$* < @ $=w > $* $: $1 < @ $2 . > $3
+R$* < @ $j > $* $: $1 < @ $j . > $2
+R$* < @ $=M > $* $: $1 < @ $2 . > $3
+R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4
+R$* < @ $* . . > $* $1 < @ $2 . > $3
+
+
+##################################################
+### Ruleset 4 -- Final Output Post-rewriting ###
+##################################################
+S4
+
+R$* <@> $@ handle <> and list:;
+
+# strip trailing dot off possibly canonical name
+R$* < @ $+ . > $* $1 < @ $2 > $3
+
+# eliminate internal code -- should never get this far!
+R$* < @ *LOCAL* > $* $1 < @ $j > $2
+
+# externalize local domain info
+R$* < $+ > $* $1 $2 $3 defocus
+R@ $+ : @ $+ : $+ @ $1 , @ $2 : $3 <route-addr> canonical
+R@ $* $@ @ $1 ... and exit
+
+# UUCP must always be presented in old form
+R$+ @ $- . UUCP $2!$1 u@h.UUCP => h!u
+
+# delete duplicate local names
+R$+ % $=w @ $=w $1 @ $2 u%host@host => u@host
+
+
+
+##############################################################
+### Ruleset 97 -- recanonicalize and call ruleset zero ###
+### (used for recursive calls) ###
+##############################################################
+
+S97
+R$* $: $>3 $1
+R$* $@ $>0 $1
+
+
+######################################
+### Ruleset 0 -- Parse Address ###
+######################################
+
+S0
+
+R$* $: $>Parse0 $1 initial parsing
+R<@> $#local $: <@> special case error msgs
+R$* $: $>98 $1 handle local hacks
+R$* $: $>Parse1 $1 final parsing
+
+#
+# Parse0 -- do initial syntax checking and eliminate local addresses.
+# This should either return with the (possibly modified) input
+# or return with a #error mailer. It should not return with a
+# #mailer other than the #error mailer.
+#
+
+SParse0
+R<@> $@ <@> special case error msgs
+R$* : $* ; <@> $#error $@ 5.1.3 $: "List:; syntax illegal for recipient addresses"
+#R@ <@ $* > < @ $1 > catch "@@host" bogosity
+R<@ $+> $#error $@ 5.1.3 $: "User address required"
+R$* $: <> $1
+R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3
+R<> $* <$* : $* > $* $#error $@ 5.1.3 $: "Colon illegal in host name part"
+R<> $* $1
+R$* < @ . $* > $* $#error $@ 5.1.2 $: "Invalid host name"
+R$* < @ $* .. $* > $* $#error $@ 5.1.2 $: "Invalid host name"
+
+# now delete the local info -- note $=O to find characters that cause forwarding
+R$* < @ > $* $@ $>Parse0 $>3 $1 user@ => user
+R< @ $=w . > : $* $@ $>Parse0 $>3 $2 @here:... -> ...
+R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here
+R< @ $+ > $#error $@ 5.1.3 $: "User address required"
+R$* $=O $* < @ $=w . > $@ $>Parse0 $>3 $1 $2 $3 ...@here -> ...
+R$- $: $(dequote $1 $) < @ *LOCAL* > dequote "foo"
+R< @ *LOCAL* > $#error $@ 5.1.3 $: "User address required"
+R$* $=O $* < @ *LOCAL* >
+ $@ $>Parse0 $>3 $1 $2 $3 ...@*LOCAL* -> ...
+R$* < @ *LOCAL* > $: $1
+
+#
+# Parse1 -- the bottom half of ruleset 0.
+#
+
+SParse1
+# handle numeric address spec
+R$* < @ [ $+ ] > $* $: $>98 $1 < @ [ $2 ] > $3 numeric internet spec
+R$* < @ [ $+ ] > $* $#esmtp $@ [$2] $: $1 < @ [$2] > $3 still numeric: send
+
+
+# short circuit local delivery so forwarded email works
+R$=L < @ $=w . > $#local $: @ $1 special local names
+R$+ < @ $=w . > $#local $: $1 regular local name
+
+
+# resolve remotely connected UUCP links (if any)
+
+# resolve fake top level domains by forwarding to other hosts
+
+
+
+# pass names that still have a host to a smarthost (if defined)
+R$* < @ $* > $* $: $>95 < $S > $1 < @ $2 > $3 glue on smarthost name
+
+# deal with other remote names
+R$* < @$* > $* $#esmtp $@ $2 $: $1 < @ $2 > $3 user@host.domain
+
+# handle locally delivered names
+R$=L $#local $: @ $1 special local names
+R$+ $#local $: $1 regular local names
+
+###########################################################################
+### Ruleset 5 -- special rewriting after aliases have been expanded ###
+###########################################################################
+
+S5
+
+# deal with plussed users so aliases work nicely
+R$+ + * $#local $@ $&h $: $1
+R$+ + $* $#local $@ + $2 $: $1 + *
+
+# prepend an empty "forward host" on the front
+R$+ $: <> $1
+
+
+# see if we have a relay or a hub
+R< > $+ $: < $H > $1 try hub
+R< > $+ $: < $R > $1 try relay
+R< > $+ $: < > < $1 $&h > nope, restore +detail
+R< > < $+ + $* > $* < > < $1 > + $2 $3 find the user part
+R< > < $+ > + $* $#local $@ $2 $: @ $1 strip the extra +
+R< > < $+ > $@ $1 no +detail
+R$+ $: $1 $&h add +detail back in
+R< local : $* > $* $: $>95 < local : $1 > $2 no host extension
+R< error : $* > $* $: $>95 < error : $1 > $2 no host extension
+R< $- : $+ > $+ $: $>95 < $1 : $2 > $3 < @ $2 >
+R< $+ > $+ $@ $>95 < $1 > $2 < @ $1 >
+
+
+###################################################################
+### Ruleset 95 -- canonify mailer:[user@]host syntax to triple ###
+###################################################################
+
+S95
+R< > $* $@ $1 strip off null relay
+R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
+R< local : $* > $* $>CanonLocal < $1 > $2
+R< $- : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user
+R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
+R< $=w > $* $@ $2 delete local host
+R< $+ > $* $#relay $@ $1 $: $2 use unqualified mailer
+
+###################################################################
+### Ruleset CanonLocal -- canonify local: syntax ###
+###################################################################
+
+SCanonLocal
+# strip trailing dot from any host name that may appear
+R< $* > $* < @ $* . > $: < $1 > $2 < @ $3 >
+
+# handle local: syntax -- use old user, either with or without host
+R< > $* < @ $* > $* $#local $@ $1@$2 $: $1
+R< > $+ $#local $@ $1 $: $1
+
+# handle local:user@host syntax -- ignore host part
+R< $+ @ $+ > $* < @ $* > $: < $1 > $3 < @ $4 >
+
+# handle local:user syntax
+R< $+ > $* <@ $* > $* $#local $@ $2@$3 $: $1
+R< $+ > $* $#local $@ $2 $: $1
+
+###################################################################
+### Ruleset 93 -- convert header names to masqueraded form ###
+###################################################################
+
+S93
+
+
+# special case the users that should be exposed
+R$=E < @ *LOCAL* > $@ $1 < @ $j . > leave exposed
+R$=E < @ $=M . > $@ $1 < @ $2 . >
+R$=E < @ $=w . > $@ $1 < @ $2 . >
+
+# handle domain-specific masquerading
+R$* < @ $=M . > $* $: $1 < @ $2 . @ $M > $3 convert masqueraded doms
+R$* < @ $=w . > $* $: $1 < @ $2 . @ $M > $3
+R$* < @ *LOCAL* > $* $: $1 < @ $j . @ $M > $2
+R$* < @ $+ @ > $* $: $1 < @ $2 > $3 $M is null
+R$* < @ $+ @ $+ > $* $: $1 < @ $3 . > $4 $M is not null
+
+###################################################################
+### Ruleset 94 -- convert envelope names to masqueraded form ###
+###################################################################
+
+S94
+R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
+
+###################################################################
+### Ruleset 98 -- local part of ruleset zero (can be null) ###
+###################################################################
+
+S98
+
+# addresses sent to foo@host.REDIRECT will give a 551 error code
+R$* < @ $+ .REDIRECT. > $: $1 < @ $2 . REDIRECT . > < ${opMode} >
+R$* < @ $+ .REDIRECT. > <i> $: $1 < @ $2 . REDIRECT. >
+R$* < @ $+ .REDIRECT. > < $- > $# error $@ 5.1.1 $: "551 User has moved; please try " <$1@$2>
+
+
+
+######################################################################
+### 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.
+###
+### Parameters:
+### $1 -- full recipient address
+###
+### Returns:
+### parsed, non-local-relaying address
+######################################################################
+
+SParseRecipient
+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<NO> $* < @ $* $=R > $: <RELAY> $1 < @ $2 $3 >
+
+R<RELAY> $* < @ $* > $@ $>ParseRecipient $1
+R<$-> $* $@ $2
+
+######################################################################
+### check_relay -- check hostname/address on SMTP startup
+######################################################################
+
+SLocal_check_relay
+Scheck_relay
+R$* $: $1 $| $>"Local_check_relay" $1
+R$* $| $* $| $#$* $#$3
+R$* $| $* $| $* $@ $>"Basic_check_relay" $1 $| $2
+
+SBasic_check_relay
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+
+
+######################################################################
+### check_mail -- check SMTP `MAIL FROM:' command argument
+######################################################################
+
+SLocal_check_mail
+Scheck_mail
+R$* $: $1 $| $>"Local_check_mail" $1
+R$* $| $#$* $#$2
+R$* $| $* $@ $>"Basic_check_mail" $1
+
+SBasic_check_mail
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+R<> $@ <OK>
+R$* $: <?> $>CanonAddr $1
+R<?> $* < @ $+ . > <?> $1 < @ $2 > strip trailing dots
+# handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc)
+R<?> $* < $* $=P > $* $: <OK> $1 < @ $2 $3 > $4
+R<?> $* < @ $+ > $* $: <? $(resolve $2 $: $2 <PERM> $) > $1 < @ $2 > $3
+R<? $* <$->> $* < @ $+ > $*
+ $: <$2> $3 < @ $4 > $5
+
+# handle case of @localhost on address
+R<$+> $* < @localhost > $: < ? $&{client_name} > <$1> $2 < @localhost >
+R<$+> $* < @localhost.$m >
+ $: < ? $&{client_name} > <$1> $2 < @localhost.$m >
+R<$+> $* < @localhost.UUCP >
+ $: < ? $&{client_name} > <$1> $2 < @localhost.UUCP >
+R<? $=w> <$+> $* <?> <$2> $3
+R<? $+> <$+> $* $#error $@ 5.5.4 $: "553 Real domain name required"
+R<?> <$+> $* $: <$1> $2
+
+
+# handle case of no @domain on address
+R<?> $* $: < ? $&{client_name} > $1
+R<?> $* $@ <OK> ...local unqualed ok
+R<? $+> $* $#error $@ 5.5.4 $: "553 Domain name required"
+ ...remote is not
+# check results
+R<?> $* $@ <OK>
+R<OK> $* $@ <OK>
+R<TEMP> $* $#error $@ 4.1.8 $: "451 Sender domain must resolve"
+R<PERM> $* $#error $@ 5.1.8 $: "501 Sender domain must exist"
+
+######################################################################
+### check_rcpt -- check SMTP `RCPT TO:' command argument
+######################################################################
+
+SLocal_check_rcpt
+Scheck_rcpt
+R$* $: $1 $| $>"Local_check_rcpt" $1
+R$* $| $#$* $#$2
+R$* $| $* $@ $>"Basic_check_rcpt" $1
+
+SBasic_check_rcpt
+# check for deferred delivery mode
+R$* $: < ${deliveryMode} > $1
+R< d > $* $@ deferred
+R< $* > $* $: $2
+
+R$* $: $>ParseRecipient $1 strip relayable hosts
+
+
+
+
+# anything terminating locally is ok
+R$+ < @ $=w > $@ OK
+R$+ < @ $* $=R > $@ OK
+
+
+# check for local user (i.e. unqualified address)
+R$* $: <?> $1
+R<?> $* < @ $+ > $: <REMOTE> $1 < @ $2 >
+# local user is ok
+R<?> $+ $@ OK
+R<$+> $* $: $2
+
+# anything originating locally is ok
+R$* $: <?> $&{client_name}
+# check if bracketed IP address (forward lookup != reverse lookup)
+R<?> [$+] $: <BAD> [$1]
+# pass to name server to make hostname canonical
+R<?> $* $~P $: <?> $[ $1 $2 $]
+R<$-> $* $: $2
+R$* . $1 strip trailing dots
+R$@ $@ OK
+R$=w $@ OK
+R$* $=R $@ OK
+
+# check IP address
+R$* $: $&{client_addr}
+R$@ $@ OK originated locally
+R0 $@ OK originated locally
+R$=R $* $@ OK relayable IP address
+R$* $: [ $1 ] put brackets around it...
+R$=w $@ OK ... and see if it is local
+
+
+# anything else is bogus
+R$* $#error $@ 5.7.1 $: "550 Relaying denied"
+
+#
+######################################################################
+######################################################################
+#####
+##### MAILER DEFINITIONS
+#####
+######################################################################
+######################################################################
+
+
+##################################################
+### Local and Program Mailer specification ###
+##################################################
+
+##### @(#)local.m4 8.30 (Berkeley) 6/30/1998 #####
+
+Mlocal, P=/bin/mail, F=lsDFMAw5:/|@qrmn9, S=10/30, R=20/40,
+ T=DNS/RFC822/X-Unix,
+ A=mail -d $u
+Mprog, P=/bin/sh, F=lsDFMoqeu9, S=10/30, R=20/40, D=$z:/,
+ T=X-Unix,
+ A=sh -c $u
+
+#
+# Envelope sender rewriting
+#
+S10
+R<@> $n errors to mailer-daemon
+R@ <@ $*> $n temporarily bypass Sun bogosity
+R$+ $: $>50 $1 add local domain if needed
+R$* $: $>94 $1 do masquerading
+
+#
+# Envelope recipient rewriting
+#
+S20
+R$+ < @ $* > $: $1 strip host part
+
+#
+# Header sender rewriting
+#
+S30
+R<@> $n errors to mailer-daemon
+R@ <@ $*> $n temporarily bypass Sun bogosity
+R$+ $: $>50 $1 add local domain if needed
+R$* $: $>93 $1 do masquerading
+
+#
+# Header recipient rewriting
+#
+S40
+R$+ $: $>50 $1 add local domain if needed
+
+#
+# Common code to add local domain name (only if always-add-domain)
+#
+S50
+
+#####################################
+### SMTP Mailer specification ###
+#####################################
+
+##### @(#)smtp.m4 8.38 (Berkeley) 5/19/1998 #####
+
+Msmtp, P=[IPC], F=mDFMuX, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Mesmtp, P=[IPC], F=mDFMuXa, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Msmtp8, P=[IPC], F=mDFMuX8, S=11/31, R=21, E=\r\n, L=990,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+Mrelay, P=[IPC], F=mDFMuXa8, S=11/31, R=61, E=\r\n, L=2040,
+ T=DNS/RFC822/SMTP,
+ A=IPC $h
+
+#
+# envelope sender rewriting
+#
+S11
+R$+ $: $>51 $1 sender/recipient common
+R$* :; <@> $@ list:; special case
+R$* $: $>61 $1 qualify unqual'ed names
+R$+ $: $>94 $1 do masquerading
+
+
+#
+# envelope recipient rewriting --
+# also header recipient if not masquerading recipients
+#
+S21
+R$+ $: $>51 $1 sender/recipient common
+R$+ $: $>61 $1 qualify unqual'ed names
+
+
+#
+# header sender and masquerading header recipient rewriting
+#
+S31
+R$+ $: $>51 $1 sender/recipient common
+R:; <@> $@ list:; special case
+
+# do special header rewriting
+R$* <@> $* $@ $1 <@> $2 pass null host through
+R< @ $* > $* $@ < @ $1 > $2 pass route-addr through
+R$* $: $>61 $1 qualify unqual'ed names
+R$+ $: $>93 $1 do masquerading
+
+
+#
+# convert pseudo-domain addresses to real domain addresses
+#
+S51
+
+# pass <route-addr>s through
+R< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr>
+
+# output fake domains as user%fake@relay
+
+# do UUCP heuristics; note that these are shared with UUCP mailers
+R$+ < @ $+ .UUCP. > $: < $2 ! > $1 convert to UUCP form
+R$+ < @ $* > $* $@ $1 < @ $2 > $3 not UUCP form
+
+# leave these in .UUCP form to avoid further tampering
+R< $&h ! > $- ! $+ $@ $2 < @ $1 .UUCP. >
+R< $&h ! > $-.$+ ! $+ $@ $3 < @ $1.$2 >
+R< $&h ! > $+ $@ $1 < @ $&h .UUCP. >
+R< $+ ! > $+ $: $1 ! $2 < @ $Y > use UUCP_RELAY
+R$+ < @ $+ : $+ > $@ $1 < @ $3 > strip mailer: part
+R$+ < @ > $: $1 < @ *LOCAL* > if no UUCP_RELAY
+
+
+#
+# common sender and masquerading recipient rewriting
+#
+S61
+
+R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified
+R$+ $@ $1 < @ *LOCAL* > add local qualification
+
+
+#
+# relay mailer header masquerading recipient rewriting
+#
+S71
+
+R$+ $: $>61 $1
+R$+ $: $>93 $1
diff --git a/usr.sbin/sendmail/cf/cf/generic-ultrix4.mc b/usr.sbin/sendmail/cf/cf/generic-ultrix4.mc
index 8c900b86e71..6fed36e8af5 100644
--- a/usr.sbin/sendmail/cf/cf/generic-ultrix4.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/huginn.cs.mc b/usr.sbin/sendmail/cf/cf/huginn.cs.mc
index 949e917882d..a58d121f09a 100644
--- a/usr.sbin/sendmail/cf/cf/huginn.cs.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/knecht.mc b/usr.sbin/sendmail/cf/cf/knecht.mc
index 97e5e43eb36..026c8fbca0c 100644
--- a/usr.sbin/sendmail/cf/cf/knecht.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/mail.cs.mc b/usr.sbin/sendmail/cf/cf/mail.cs.mc
index 1ecf34e2a91..8abd9451ca9 100644
--- a/usr.sbin/sendmail/cf/cf/mail.cs.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/mail.eecs.mc b/usr.sbin/sendmail/cf/cf/mail.eecs.mc
index 42d053d70ee..6522141d265 100644
--- a/usr.sbin/sendmail/cf/cf/mail.eecs.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/mailspool.cs.mc b/usr.sbin/sendmail/cf/cf/mailspool.cs.mc
index 7ae62b24d60..08dcce6cc9c 100644
--- a/usr.sbin/sendmail/cf/cf/mailspool.cs.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/python.cs.mc b/usr.sbin/sendmail/cf/cf/python.cs.mc
index 2cb111d0b65..ddf4fc34300 100644
--- a/usr.sbin/sendmail/cf/cf/python.cs.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/s2k-osf1.mc b/usr.sbin/sendmail/cf/cf/s2k-osf1.mc
index 1c7b1ccd1d7..6f1099a69fd 100644
--- a/usr.sbin/sendmail/cf/cf/s2k-osf1.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/s2k-ultrix4.mc b/usr.sbin/sendmail/cf/cf/s2k-ultrix4.mc
index 06c70d45be6..db8e4559975 100644
--- a/usr.sbin/sendmail/cf/cf/s2k-ultrix4.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/tcpproto.mc b/usr.sbin/sendmail/cf/cf/tcpproto.mc
index eb6eadecb65..692a08fbb37 100644
--- a/usr.sbin/sendmail/cf/cf/tcpproto.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/ucbarpa.mc b/usr.sbin/sendmail/cf/cf/ucbarpa.mc
index 925d47fefb7..40bb6c22636 100644
--- a/usr.sbin/sendmail/cf/cf/ucbarpa.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/ucbvax.mc b/usr.sbin/sendmail/cf/cf/ucbvax.mc
index 76027fb951e..2395f826455 100644
--- a/usr.sbin/sendmail/cf/cf/ucbvax.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/uucpproto.mc b/usr.sbin/sendmail/cf/cf/uucpproto.mc
index 4f1c54a332e..a547d1037fa 100644
--- a/usr.sbin/sendmail/cf/cf/uucpproto.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/cf/vangogh.cs.mc b/usr.sbin/sendmail/cf/cf/vangogh.cs.mc
index deefc29febd..f60dca79c36 100644
--- a/usr.sbin/sendmail/cf/cf/vangogh.cs.mc
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/domain/Berkeley.EDU.m4 b/usr.sbin/sendmail/cf/domain/Berkeley.EDU.m4
index 48e151b7b28..85d5e5be60d 100644
--- a/usr.sbin/sendmail/cf/domain/Berkeley.EDU.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/domain/CS.Berkeley.EDU.m4 b/usr.sbin/sendmail/cf/domain/CS.Berkeley.EDU.m4
index 20309210b8c..5609ce8464a 100644
--- a/usr.sbin/sendmail/cf/domain/CS.Berkeley.EDU.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/domain/EECS.Berkeley.EDU.m4 b/usr.sbin/sendmail/cf/domain/EECS.Berkeley.EDU.m4
index 022dddd13a5..095fbc800e6 100644
--- a/usr.sbin/sendmail/cf/domain/EECS.Berkeley.EDU.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/domain/S2K.Berkeley.EDU.m4 b/usr.sbin/sendmail/cf/domain/S2K.Berkeley.EDU.m4
index 14965a6bff0..a951f8b24e3 100644
--- a/usr.sbin/sendmail/cf/domain/S2K.Berkeley.EDU.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/domain/berkeley-only.m4 b/usr.sbin/sendmail/cf/domain/berkeley-only.m4
index d3d770811c6..805bab6a682 100644
--- a/usr.sbin/sendmail/cf/domain/berkeley-only.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/domain/generic.m4 b/usr.sbin/sendmail/cf/domain/generic.m4
index 1329e4499b8..93057d09a98 100644
--- a/usr.sbin/sendmail/cf/domain/generic.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/accept_unqualified_senders.m4 b/usr.sbin/sendmail/cf/feature/accept_unqualified_senders.m4
index 16bef782539..bf1b1e79845 100644
--- a/usr.sbin/sendmail/cf/feature/accept_unqualified_senders.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/accept_unresolvable_domains.m4 b/usr.sbin/sendmail/cf/feature/accept_unresolvable_domains.m4
index 5b7241a314e..cbc4747d220 100644
--- a/usr.sbin/sendmail/cf/feature/accept_unresolvable_domains.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/access_db.m4 b/usr.sbin/sendmail/cf/feature/access_db.m4
index 85820723dee..75b5551ac2c 100644
--- a/usr.sbin/sendmail/cf/feature/access_db.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/allmasquerade.m4 b/usr.sbin/sendmail/cf/feature/allmasquerade.m4
index c7cbffa78ea..ed622dcac6c 100644
--- a/usr.sbin/sendmail/cf/feature/allmasquerade.m4
+++ b/usr.sbin/sendmail/cf/feature/allmasquerade.m4
@@ -1,40 +1,18 @@
divert(-1)
#
-# Copyright (c) 1983 Eric P. Allman
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the University of
-# California, Berkeley and its contributors.
-# 4. Neither the name of the University nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
+# 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.
#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
#
divert(0)
-VERSIONID(`@(#)allmasquerade.m4 8.2 (Berkeley) 1/22/94')
+VERSIONID(`@(#)allmasquerade.m4 8.7 (Berkeley) 5/19/1998')
divert(-1)
diff --git a/usr.sbin/sendmail/cf/feature/always_add_domain.m4 b/usr.sbin/sendmail/cf/feature/always_add_domain.m4
index dd572c8130d..69092e31d00 100644
--- a/usr.sbin/sendmail/cf/feature/always_add_domain.m4
+++ b/usr.sbin/sendmail/cf/feature/always_add_domain.m4
@@ -1,40 +1,18 @@
divert(-1)
#
-# Copyright (c) 1983 Eric P. Allman
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the University of
-# California, Berkeley and its contributors.
-# 4. Neither the name of the University nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
+# 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.
#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
#
divert(0)
-VERSIONID(`@(#)always_add_domain.m4 8.1 (Berkeley) 6/7/93')
+VERSIONID(`@(#)always_add_domain.m4 8.6 (Berkeley) 5/19/1998')
divert(-1)
define(`_ALWAYS_ADD_DOMAIN_', 1)
diff --git a/usr.sbin/sendmail/cf/feature/bestmx_is_local.m4 b/usr.sbin/sendmail/cf/feature/bestmx_is_local.m4
index 2d3048809ec..40643877af8 100644
--- a/usr.sbin/sendmail/cf/feature/bestmx_is_local.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/bitdomain.m4 b/usr.sbin/sendmail/cf/feature/bitdomain.m4
index 85c8cf0017f..7f9a181e482 100644
--- a/usr.sbin/sendmail/cf/feature/bitdomain.m4
+++ b/usr.sbin/sendmail/cf/feature/bitdomain.m4
@@ -1,49 +1,22 @@
divert(-1)
#
-# Copyright (c) 1983 Eric P. Allman
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the University of
-# California, Berkeley and its contributors.
-# 4. Neither the name of the University nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
+# 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.
#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
#
divert(0)
-VERSIONID(`@(#)bitdomain.m4 8.6 (Berkeley) 2/19/94')
+VERSIONID(`@(#)bitdomain.m4 8.14 (Berkeley) 10/6/1998')
divert(-1)
-
-PUSHDIVERT(6)
-Kbitdomain ifelse(_ARG_, `', `hash -o /etc/bitdomain', `_ARG_')
-POPDIVERT
-
-
-PUSHDIVERT(2)
-# handle BITNET mapping
-R$* < @ $+ .BITNET > $* $: $1 < @ $(bitdomain $2 $: $2.BITNET $) > $3
-POPDIVERT
+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/usr.sbin/sendmail/cf/feature/blacklist_recipients.m4 b/usr.sbin/sendmail/cf/feature/blacklist_recipients.m4
index 4417fe09369..e3478d36ff1 100644
--- a/usr.sbin/sendmail/cf/feature/blacklist_recipients.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/domaintable.m4 b/usr.sbin/sendmail/cf/feature/domaintable.m4
index bfad1bcecc4..e7303dcdd87 100644
--- a/usr.sbin/sendmail/cf/feature/domaintable.m4
+++ b/usr.sbin/sendmail/cf/feature/domaintable.m4
@@ -1,40 +1,23 @@
divert(-1)
#
-# Copyright (c) 1983 Eric P. Allman
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the University of
-# California, Berkeley and its contributors.
-# 4. Neither the name of the University nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
+# 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.
#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
#
divert(0)
-VERSIONID(`@(#)domaintable.m4 8.2 (Berkeley) 8/9/93')
+VERSIONID(`@(#)domaintable.m4 8.9 (Berkeley) 10/6/1998')
divert(-1)
-define(`DOMAIN_TABLE', ifelse(_ARG_, `', `hash -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/usr.sbin/sendmail/cf/feature/genericstable.m4 b/usr.sbin/sendmail/cf/feature/genericstable.m4
index ec7a4d3f7d5..654db5d9a16 100644
--- a/usr.sbin/sendmail/cf/feature/genericstable.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/limited_masquerade.m4 b/usr.sbin/sendmail/cf/feature/limited_masquerade.m4
index ae5e868ed96..b036ae134be 100644
--- a/usr.sbin/sendmail/cf/feature/limited_masquerade.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/local_lmtp.m4 b/usr.sbin/sendmail/cf/feature/local_lmtp.m4
index f323b5b1908..f328ce54a29 100644
--- a/usr.sbin/sendmail/cf/feature/local_lmtp.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/local_procmail.m4 b/usr.sbin/sendmail/cf/feature/local_procmail.m4
index adf1237b398..20618dd5551 100644
--- a/usr.sbin/sendmail/cf/feature/local_procmail.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/loose_relay_check.m4 b/usr.sbin/sendmail/cf/feature/loose_relay_check.m4
index 6e3584b02ed..988e44144f6 100644
--- a/usr.sbin/sendmail/cf/feature/loose_relay_check.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/mailertable.m4 b/usr.sbin/sendmail/cf/feature/mailertable.m4
index fa399973bf7..71a41adf3a7 100644
--- a/usr.sbin/sendmail/cf/feature/mailertable.m4
+++ b/usr.sbin/sendmail/cf/feature/mailertable.m4
@@ -1,40 +1,22 @@
divert(-1)
#
-# Copyright (c) 1983 Eric P. Allman
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the University of
-# California, Berkeley and its contributors.
-# 4. Neither the name of the University nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
+# 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.
#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
#
divert(0)
-VERSIONID(`@(#)mailertable.m4 8.3 (Berkeley) 8/7/93')
+VERSIONID(`@(#)mailertable.m4 8.10 (Berkeley) 10/6/1998')
divert(-1)
-define(`MAILER_TABLE', ifelse(_ARG_, `', `hash -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/usr.sbin/sendmail/cf/feature/masquerade_entire_domain.m4 b/usr.sbin/sendmail/cf/feature/masquerade_entire_domain.m4
index 9766ae4499a..4455b9a7085 100644
--- a/usr.sbin/sendmail/cf/feature/masquerade_entire_domain.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/masquerade_envelope.m4 b/usr.sbin/sendmail/cf/feature/masquerade_envelope.m4
index 75d257e64f5..276c7f41d40 100644
--- a/usr.sbin/sendmail/cf/feature/masquerade_envelope.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/nocanonify.m4 b/usr.sbin/sendmail/cf/feature/nocanonify.m4
index 0157e6b9e48..279a8eaae1b 100644
--- a/usr.sbin/sendmail/cf/feature/nocanonify.m4
+++ b/usr.sbin/sendmail/cf/feature/nocanonify.m4
@@ -1,40 +1,18 @@
divert(-1)
#
-# Copyright (c) 1983 Eric P. Allman
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the University of
-# California, Berkeley and its contributors.
-# 4. Neither the name of the University nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
+# 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.
#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
#
divert(0)
-VERSIONID(`@(#)nocanonify.m4 8.1 (Berkeley) 6/7/93')
+VERSIONID(`@(#)nocanonify.m4 8.6 (Berkeley) 5/19/1998')
divert(-1)
define(`_NO_CANONIFY_', 1)
diff --git a/usr.sbin/sendmail/cf/feature/nodns.m4 b/usr.sbin/sendmail/cf/feature/nodns.m4
index 465a5ae4653..5d383d5475e 100644
--- a/usr.sbin/sendmail/cf/feature/nodns.m4
+++ b/usr.sbin/sendmail/cf/feature/nodns.m4
@@ -1,40 +1,21 @@
divert(-1)
#
-# Copyright (c) 1983 Eric P. Allman
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the University of
-# California, Berkeley and its contributors.
-# 4. Neither the name of the University nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
+# 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.
#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
#
divert(0)
-VERSIONID(`@(#)nodns.m4 8.1 (Berkeley) 8/6/93')
+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,ifdef(`_USE_ETC_MAIL_',`/etc/mail/service.switch',`/etc/service.switch'))`) if your OS does not provide its own instead.
+')
diff --git a/usr.sbin/sendmail/cf/feature/notsticky.m4 b/usr.sbin/sendmail/cf/feature/notsticky.m4
index 4fa344d7069..5ba6b2f70ce 100644
--- a/usr.sbin/sendmail/cf/feature/notsticky.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/nouucp.m4 b/usr.sbin/sendmail/cf/feature/nouucp.m4
index 8723437b3c7..7cf241f77f7 100644
--- a/usr.sbin/sendmail/cf/feature/nouucp.m4
+++ b/usr.sbin/sendmail/cf/feature/nouucp.m4
@@ -1,40 +1,18 @@
divert(-1)
#
-# Copyright (c) 1983 Eric P. Allman
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the University of
-# California, Berkeley and its contributors.
-# 4. Neither the name of the University nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
+# 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.
#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
#
divert(0)
-VERSIONID(`@(#)nouucp.m4 8.1 (Berkeley) 6/7/93')
+VERSIONID(`@(#)nouucp.m4 8.6 (Berkeley) 5/19/1998')
divert(-1)
define(`_NO_UUCP_', 1)
diff --git a/usr.sbin/sendmail/cf/feature/nullclient.m4 b/usr.sbin/sendmail/cf/feature/nullclient.m4
index 1df782e24de..99346ae0315 100644
--- a/usr.sbin/sendmail/cf/feature/nullclient.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/promiscuous_relay.m4 b/usr.sbin/sendmail/cf/feature/promiscuous_relay.m4
index 975afab752d..cc3dae62f63 100644
--- a/usr.sbin/sendmail/cf/feature/promiscuous_relay.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/rbl.m4 b/usr.sbin/sendmail/cf/feature/rbl.m4
index a9251e04978..0284aa3cbd8 100644
--- a/usr.sbin/sendmail/cf/feature/rbl.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/redirect.m4 b/usr.sbin/sendmail/cf/feature/redirect.m4
index 721d2260c28..a9b333ff1c8 100644
--- a/usr.sbin/sendmail/cf/feature/redirect.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/relay_based_on_MX.m4 b/usr.sbin/sendmail/cf/feature/relay_based_on_MX.m4
index 44d07116ceb..f19e89b6d78 100644
--- a/usr.sbin/sendmail/cf/feature/relay_based_on_MX.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/relay_entire_domain.m4 b/usr.sbin/sendmail/cf/feature/relay_entire_domain.m4
index 823da1e50ff..c932a70ab39 100644
--- a/usr.sbin/sendmail/cf/feature/relay_entire_domain.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/relay_hosts_only.m4 b/usr.sbin/sendmail/cf/feature/relay_hosts_only.m4
index 98f72c8f82d..35f7ab52849 100644
--- a/usr.sbin/sendmail/cf/feature/relay_hosts_only.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/relay_local_from.m4 b/usr.sbin/sendmail/cf/feature/relay_local_from.m4
index 549bc9c7423..ab040f6c2ff 100644
--- a/usr.sbin/sendmail/cf/feature/relay_local_from.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/smrsh.m4 b/usr.sbin/sendmail/cf/feature/smrsh.m4
index 2c47632649b..3b44fa88a67 100644
--- a/usr.sbin/sendmail/cf/feature/smrsh.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/stickyhost.m4 b/usr.sbin/sendmail/cf/feature/stickyhost.m4
index 8bbeb49cac6..1d0d1cd590e 100644
--- a/usr.sbin/sendmail/cf/feature/stickyhost.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/use_ct_file.m4 b/usr.sbin/sendmail/cf/feature/use_ct_file.m4
index 344d178504d..924dd06e0c8 100644
--- a/usr.sbin/sendmail/cf/feature/use_ct_file.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/feature/use_cw_file.m4 b/usr.sbin/sendmail/cf/feature/use_cw_file.m4
index 33b5ad56ed0..5bbbf7b2b07 100644
--- a/usr.sbin/sendmail/cf/feature/use_cw_file.m4
+++ b/usr.sbin/sendmail/cf/feature/use_cw_file.m4
@@ -1,40 +1,18 @@
divert(-1)
#
-# Copyright (c) 1983 Eric P. Allman
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the University of
-# California, Berkeley and its contributors.
-# 4. Neither the name of the University nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
+# 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.
#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
#
divert(0)
-VERSIONID(`@(#)use_cw_file.m4 8.1 (Berkeley) 6/7/93')
+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/usr.sbin/sendmail/cf/feature/uucpdomain.m4 b/usr.sbin/sendmail/cf/feature/uucpdomain.m4
index 77cc97bbe4a..0c584aa2e59 100644
--- a/usr.sbin/sendmail/cf/feature/uucpdomain.m4
+++ b/usr.sbin/sendmail/cf/feature/uucpdomain.m4
@@ -1,49 +1,22 @@
divert(-1)
#
-# Copyright (c) 1983 Eric P. Allman
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the University of
-# California, Berkeley and its contributors.
-# 4. Neither the name of the University nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
+# 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.
#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
#
divert(0)
-VERSIONID(`@(#)uucpdomain.m4 8.6 (Berkeley) 2/19/94')
+VERSIONID(`@(#)uucpdomain.m4 8.14 (Berkeley) 10/6/1998')
divert(-1)
-
-PUSHDIVERT(6)
-Kuudomain ifelse(_ARG_, `', `hash -o /etc/uudomain', `_ARG_')
-POPDIVERT
-
-
-PUSHDIVERT(2)
-# handle UUCP mapping
-R$* < @ $+ .UUCP > $* $: $1 < @ $(uudomain $2 $: $2.UUCP $) > $3
-POPDIVERT
+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/usr.sbin/sendmail/cf/feature/virtusertable.m4 b/usr.sbin/sendmail/cf/feature/virtusertable.m4
index 337f635766c..316f7ea61dc 100644
--- a/usr.sbin/sendmail/cf/feature/virtusertable.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/hack/cssubdomain.m4 b/usr.sbin/sendmail/cf/hack/cssubdomain.m4
index 4f270c05f06..6297d64b6c8 100644
--- a/usr.sbin/sendmail/cf/hack/cssubdomain.m4
+++ b/usr.sbin/sendmail/cf/hack/cssubdomain.m4
@@ -1,39 +1,17 @@
divert(-1)
#
-# Copyright (c) 1983 Eric P. Allman
+# Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the University of
-# California, Berkeley and its contributors.
-# 4. Neither the name of the University nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
+# 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.
#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
#
divert(0)
-VERSIONID(`@(#)cssubdomain.m4 8.1 (Berkeley) 6/7/93')
+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/usr.sbin/sendmail/cf/m4/cf.m4 b/usr.sbin/sendmail/cf/m4/cf.m4
index 21655822b22..0b058098e32 100644
--- a/usr.sbin/sendmail/cf/m4/cf.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/m4/cfhead.m4 b/usr.sbin/sendmail/cf/m4/cfhead.m4
index a7a109856d4..9a5ccd224b2 100644
--- a/usr.sbin/sendmail/cf/m4/cfhead.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/m4/nullrelay.m4 b/usr.sbin/sendmail/cf/m4/nullrelay.m4
index 02020697a86..b71fd570654 100644
--- a/usr.sbin/sendmail/cf/m4/nullrelay.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/m4/proto.m4 b/usr.sbin/sendmail/cf/m4/proto.m4
index d8842bfff1f..8e79454bc04 100644
--- a/usr.sbin/sendmail/cf/m4/proto.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/m4/version.m4 b/usr.sbin/sendmail/cf/m4/version.m4
index 2db220271ad..6d03e3761a3 100644
--- a/usr.sbin/sendmail/cf/m4/version.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/mailer/cyrus.m4 b/usr.sbin/sendmail/cf/mailer/cyrus.m4
index 6e4badcce29..567025ffdd0 100644
--- a/usr.sbin/sendmail/cf/mailer/cyrus.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/mailer/fax.m4 b/usr.sbin/sendmail/cf/mailer/fax.m4
index 581cfed088c..3ee94bdc308 100644
--- a/usr.sbin/sendmail/cf/mailer/fax.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/mailer/local.m4 b/usr.sbin/sendmail/cf/mailer/local.m4
index 705e723c6ca..6b4b679d832 100644
--- a/usr.sbin/sendmail/cf/mailer/local.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/mailer/mail11.m4 b/usr.sbin/sendmail/cf/mailer/mail11.m4
index 5c9d94810c6..222b53fc91d 100644
--- a/usr.sbin/sendmail/cf/mailer/mail11.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/mailer/phquery.m4 b/usr.sbin/sendmail/cf/mailer/phquery.m4
index 5f1b6b41ce8..3e0891ae37b 100644
--- a/usr.sbin/sendmail/cf/mailer/phquery.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/mailer/pop.m4 b/usr.sbin/sendmail/cf/mailer/pop.m4
index a4f3128f19f..0acea7d9fd5 100644
--- a/usr.sbin/sendmail/cf/mailer/pop.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/mailer/procmail.m4 b/usr.sbin/sendmail/cf/mailer/procmail.m4
index b6131c06678..38b6d200dd5 100644
--- a/usr.sbin/sendmail/cf/mailer/procmail.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/mailer/smtp.m4 b/usr.sbin/sendmail/cf/mailer/smtp.m4
index d70195e7066..75455970ae4 100644
--- a/usr.sbin/sendmail/cf/mailer/smtp.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/mailer/usenet.m4 b/usr.sbin/sendmail/cf/mailer/usenet.m4
index 6c92f5f8dad..153575187f0 100644
--- a/usr.sbin/sendmail/cf/mailer/usenet.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/mailer/uucp.m4 b/usr.sbin/sendmail/cf/mailer/uucp.m4
index cd2619db47e..badd307c963 100644
--- a/usr.sbin/sendmail/cf/mailer/uucp.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/aix2.m4 b/usr.sbin/sendmail/cf/ostype/aix2.m4
index 1e77c1cd1e3..2bda79c60e4 100644
--- a/usr.sbin/sendmail/cf/ostype/aix2.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/aix3.m4 b/usr.sbin/sendmail/cf/ostype/aix3.m4
index 2cfc8c58220..fb74d9e4619 100644
--- a/usr.sbin/sendmail/cf/ostype/aix3.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/aix4.m4 b/usr.sbin/sendmail/cf/ostype/aix4.m4
index 06c7d1aba15..24ff001ae3e 100644
--- a/usr.sbin/sendmail/cf/ostype/aix4.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/altos.m4 b/usr.sbin/sendmail/cf/ostype/altos.m4
index 38a07a0a319..4dcefa943a6 100644
--- a/usr.sbin/sendmail/cf/ostype/altos.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/amdahl-uts.m4 b/usr.sbin/sendmail/cf/ostype/amdahl-uts.m4
index 022b5074137..84d47cdb17e 100644
--- a/usr.sbin/sendmail/cf/ostype/amdahl-uts.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/aux.m4 b/usr.sbin/sendmail/cf/ostype/aux.m4
index 2adbfe4d221..8038cb55d83 100644
--- a/usr.sbin/sendmail/cf/ostype/aux.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/bsd4.3.m4 b/usr.sbin/sendmail/cf/ostype/bsd4.3.m4
index 47c02cc764a..d0f3f8a3219 100644
--- a/usr.sbin/sendmail/cf/ostype/bsd4.3.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/bsd4.4.m4 b/usr.sbin/sendmail/cf/ostype/bsd4.4.m4
index c023de54401..514bce82714 100644
--- a/usr.sbin/sendmail/cf/ostype/bsd4.4.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/bsdi1.0.m4 b/usr.sbin/sendmail/cf/ostype/bsdi1.0.m4
index 48d60b33380..08bd2a574b2 100644
--- a/usr.sbin/sendmail/cf/ostype/bsdi1.0.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/bsdi2.0.m4 b/usr.sbin/sendmail/cf/ostype/bsdi2.0.m4
index 73b0447ec36..6883eb06705 100644
--- a/usr.sbin/sendmail/cf/ostype/bsdi2.0.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/dgux.m4 b/usr.sbin/sendmail/cf/ostype/dgux.m4
index eeb8c4de3a2..2f25cd83251 100644
--- a/usr.sbin/sendmail/cf/ostype/dgux.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/domainos.m4 b/usr.sbin/sendmail/cf/ostype/domainos.m4
index c03dee5fc94..9f4ea92b8b8 100644
--- a/usr.sbin/sendmail/cf/ostype/domainos.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/dynix3.2.m4 b/usr.sbin/sendmail/cf/ostype/dynix3.2.m4
index 94d59b5f371..38364466ba5 100644
--- a/usr.sbin/sendmail/cf/ostype/dynix3.2.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/gnuhurd.m4 b/usr.sbin/sendmail/cf/ostype/gnuhurd.m4
index d7127f6b7eb..a8ed66765e2 100644
--- a/usr.sbin/sendmail/cf/ostype/gnuhurd.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/hpux10.m4 b/usr.sbin/sendmail/cf/ostype/hpux10.m4
index 9499474de74..d349b5488e3 100644
--- a/usr.sbin/sendmail/cf/ostype/hpux10.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/hpux9.m4 b/usr.sbin/sendmail/cf/ostype/hpux9.m4
index 19579caef06..55f1b97c13a 100644
--- a/usr.sbin/sendmail/cf/ostype/hpux9.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/irix4.m4 b/usr.sbin/sendmail/cf/ostype/irix4.m4
index 69890e6acbc..aea6e9e847c 100644
--- a/usr.sbin/sendmail/cf/ostype/irix4.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/irix5.m4 b/usr.sbin/sendmail/cf/ostype/irix5.m4
index 32f23756e00..426f00207a1 100644
--- a/usr.sbin/sendmail/cf/ostype/irix5.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/irix6.m4 b/usr.sbin/sendmail/cf/ostype/irix6.m4
index f046dbf0e8f..d41920211b4 100644
--- a/usr.sbin/sendmail/cf/ostype/irix6.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/isc4.1.m4 b/usr.sbin/sendmail/cf/ostype/isc4.1.m4
index 1869eecfc63..629835bb2ee 100644
--- a/usr.sbin/sendmail/cf/ostype/isc4.1.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/linux.m4 b/usr.sbin/sendmail/cf/ostype/linux.m4
index d7c3b190b47..e1f7a92119f 100644
--- a/usr.sbin/sendmail/cf/ostype/linux.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/maxion.m4 b/usr.sbin/sendmail/cf/ostype/maxion.m4
index c07ce876e30..a8ecfd0315c 100644
--- a/usr.sbin/sendmail/cf/ostype/maxion.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/mklinux.m4 b/usr.sbin/sendmail/cf/ostype/mklinux.m4
index 2f40c72d8e2..abcdbae786c 100644
--- a/usr.sbin/sendmail/cf/ostype/mklinux.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/nextstep.m4 b/usr.sbin/sendmail/cf/ostype/nextstep.m4
index 73c995fb983..ebe6957df9b 100644
--- a/usr.sbin/sendmail/cf/ostype/nextstep.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/osf1.m4 b/usr.sbin/sendmail/cf/ostype/osf1.m4
index fe17b35ee6c..7fcf1cf6534 100644
--- a/usr.sbin/sendmail/cf/ostype/osf1.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/powerux.m4 b/usr.sbin/sendmail/cf/ostype/powerux.m4
index dc23c7ed295..068bd8e7f16 100644
--- a/usr.sbin/sendmail/cf/ostype/powerux.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/ptx2.m4 b/usr.sbin/sendmail/cf/ostype/ptx2.m4
index 83a05580b14..d564ead49e3 100644
--- a/usr.sbin/sendmail/cf/ostype/ptx2.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/qnx.m4 b/usr.sbin/sendmail/cf/ostype/qnx.m4
index 10624dde39f..91ed669622f 100644
--- a/usr.sbin/sendmail/cf/ostype/qnx.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/riscos4.5.m4 b/usr.sbin/sendmail/cf/ostype/riscos4.5.m4
index 02db750c023..c44a1800ed8 100644
--- a/usr.sbin/sendmail/cf/ostype/riscos4.5.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/sco-uw-2.1.m4 b/usr.sbin/sendmail/cf/ostype/sco-uw-2.1.m4
index 356c984fa42..07da0ad9b41 100644
--- a/usr.sbin/sendmail/cf/ostype/sco-uw-2.1.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/sco3.2.m4 b/usr.sbin/sendmail/cf/ostype/sco3.2.m4
index 1c58585035b..135fefaa0a8 100644
--- a/usr.sbin/sendmail/cf/ostype/sco3.2.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/sinix.m4 b/usr.sbin/sendmail/cf/ostype/sinix.m4
index 51c469d8d74..37d12d4211c 100644
--- a/usr.sbin/sendmail/cf/ostype/sinix.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/solaris2.m4 b/usr.sbin/sendmail/cf/ostype/solaris2.m4
index 5a90175bd36..5a0e2a9024f 100644
--- a/usr.sbin/sendmail/cf/ostype/solaris2.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/solaris2.ml.m4 b/usr.sbin/sendmail/cf/ostype/solaris2.ml.m4
index 0995d50ff18..f99cebb84d1 100644
--- a/usr.sbin/sendmail/cf/ostype/solaris2.ml.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/sunos3.5.m4 b/usr.sbin/sendmail/cf/ostype/sunos3.5.m4
index 540d36e6075..aeda2724984 100644
--- a/usr.sbin/sendmail/cf/ostype/sunos3.5.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/sunos4.1.m4 b/usr.sbin/sendmail/cf/ostype/sunos4.1.m4
index aec96d2fdc9..78648da7658 100644
--- a/usr.sbin/sendmail/cf/ostype/sunos4.1.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/svr4.m4 b/usr.sbin/sendmail/cf/ostype/svr4.m4
index 1451414797f..d0de2783b10 100644
--- a/usr.sbin/sendmail/cf/ostype/svr4.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/ultrix4.m4 b/usr.sbin/sendmail/cf/ostype/ultrix4.m4
index 874fa8b89d6..d10518ae6a9 100644
--- a/usr.sbin/sendmail/cf/ostype/ultrix4.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/unixware7.m4 b/usr.sbin/sendmail/cf/ostype/unixware7.m4
new file mode 100644
index 00000000000..af1bcc8be0f
--- /dev/null
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/unknown.m4 b/usr.sbin/sendmail/cf/ostype/unknown.m4
index bb85604efa1..629c31bc23c 100644
--- a/usr.sbin/sendmail/cf/ostype/unknown.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/ostype/uxpds.m4 b/usr.sbin/sendmail/cf/ostype/uxpds.m4
index 2fb147eb522..0f1d908f23b 100644
--- a/usr.sbin/sendmail/cf/ostype/uxpds.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/cf/sh/makeinfo.sh b/usr.sbin/sendmail/cf/sh/makeinfo.sh
index 424c699d649..c8621f422d0 100644
--- a/usr.sbin/sendmail/cf/sh/makeinfo.sh
+++ b/usr.sbin/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/usr.sbin/sendmail/doc/changes/Makefile b/usr.sbin/sendmail/doc/changes/Makefile
index 46447c2e534..76eaa3912ee 100644
--- a/usr.sbin/sendmail/doc/changes/Makefile
+++ b/usr.sbin/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/usr.sbin/sendmail/doc/changes/changes.me b/usr.sbin/sendmail/doc/changes/changes.me
index dbe9bea3cb8..b963396ba49 100644
--- a/usr.sbin/sendmail/doc/changes/changes.me
+++ b/usr.sbin/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/usr.sbin/sendmail/doc/intro/Makefile b/usr.sbin/sendmail/doc/intro/Makefile
index 939cd6c17eb..6369a4a0fec 100644
--- a/usr.sbin/sendmail/doc/intro/Makefile
+++ b/usr.sbin/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/usr.sbin/sendmail/doc/intro/intro.me b/usr.sbin/sendmail/doc/intro/intro.me
index 0406bb1fdd6..03cfa336994 100644
--- a/usr.sbin/sendmail/doc/intro/intro.me
+++ b/usr.sbin/sendmail/doc/intro/intro.me
@@ -1,36 +1,14 @@
-.\" Copyright (c) 1983 Eric P. Allman
+.\" Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+.\" Copyright (c) 1983 Eric P. Allman. All rights reserved.
.\" Copyright (c) 1988, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
+.\" 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.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
.\"
-.\" @(#)intro.me 8.2 (Berkeley) 11/27/93
+.\" @(#)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/usr.sbin/sendmail/doc/op/Makefile b/usr.sbin/sendmail/doc/op/Makefile
index e8f791a4959..0d86e91de91 100644
--- a/usr.sbin/sendmail/doc/op/Makefile
+++ b/usr.sbin/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/usr.sbin/sendmail/doc/op/op.me b/usr.sbin/sendmail/doc/op/op.me
index fc3290ef2d3..a2b0ef14250 100644
--- a/usr.sbin/sendmail/doc/op/op.me
+++ b/usr.sbin/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/usr.sbin/sendmail/doc/usenix/Makefile b/usr.sbin/sendmail/doc/usenix/Makefile
index ea0665c67be..d2308cb891b 100644
--- a/usr.sbin/sendmail/doc/usenix/Makefile
+++ b/usr.sbin/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/usr.sbin/sendmail/doc/usenix/usenix.me b/usr.sbin/sendmail/doc/usenix/usenix.me
index 0fbb6723c13..4f88a94f8f2 100644
--- a/usr.sbin/sendmail/doc/usenix/usenix.me
+++ b/usr.sbin/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/usr.sbin/sendmail/mailstats/Makefile.m4 b/usr.sbin/sendmail/mailstats/Makefile.m4
index ae5489c62ee..2de9904f9c3 100644
--- a/usr.sbin/sendmail/mailstats/Makefile.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/mailstats/mailstats.8 b/usr.sbin/sendmail/mailstats/mailstats.8
index 3a8847a6f64..be2203d85fa 100644
--- a/usr.sbin/sendmail/mailstats/mailstats.8
+++ b/usr.sbin/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/usr.sbin/sendmail/mailstats/mailstats.c b/usr.sbin/sendmail/mailstats/mailstats.c
index 6fda6db391a..5df3b95e39c 100644
--- a/usr.sbin/sendmail/mailstats/mailstats.c
+++ b/usr.sbin/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/usr.sbin/sendmail/makemap/Makefile.m4 b/usr.sbin/sendmail/makemap/Makefile.m4
index 0f0c242d895..983ffdf3ff8 100644
--- a/usr.sbin/sendmail/makemap/Makefile.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/makemap/makemap.8 b/usr.sbin/sendmail/makemap/makemap.8
index f3428a135a2..27b89936bc0 100644
--- a/usr.sbin/sendmail/makemap/makemap.8
+++ b/usr.sbin/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 makemap
.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/usr.sbin/sendmail/makemap/makemap.c b/usr.sbin/sendmail/makemap/makemap.c
index 53b5865606a..aaaba32a57a 100644
--- a/usr.sbin/sendmail/makemap/makemap.c
+++ b/usr.sbin/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/usr.sbin/sendmail/praliases/Makefile.m4 b/usr.sbin/sendmail/praliases/Makefile.m4
index a4a2e61fa49..7e78412f06a 100644
--- a/usr.sbin/sendmail/praliases/Makefile.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/praliases/praliases.1 b/usr.sbin/sendmail/praliases/praliases.1
index f47121840de..08337019dce 100644
--- a/usr.sbin/sendmail/praliases/praliases.1
+++ b/usr.sbin/sendmail/praliases/praliases.1
@@ -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/usr.sbin/sendmail/praliases/praliases.c b/usr.sbin/sendmail/praliases/praliases.c
index 3e0048b4fc7..39351918e3b 100644
--- a/usr.sbin/sendmail/praliases/praliases.c
+++ b/usr.sbin/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/usr.sbin/sendmail/smrsh/Makefile.m4 b/usr.sbin/sendmail/smrsh/Makefile.m4
index 19b2723e885..5cae3f03336 100644
--- a/usr.sbin/sendmail/smrsh/Makefile.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/smrsh/README b/usr.sbin/sendmail/smrsh/README
index 13f545c7e66..fa4e2de3161 100644
--- a/usr.sbin/sendmail/smrsh/README
+++ b/usr.sbin/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/usr.sbin/sendmail/smrsh/smrsh.8 b/usr.sbin/sendmail/smrsh/smrsh.8
index 067eaf32ee3..af08fc4c624 100644
--- a/usr.sbin/sendmail/smrsh/smrsh.8
+++ b/usr.sbin/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/usr.sbin/sendmail/smrsh/smrsh.c b/usr.sbin/sendmail/smrsh/smrsh.c
index 66e0ebab66a..d4af285f642 100644
--- a/usr.sbin/sendmail/smrsh/smrsh.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/Makefile b/usr.sbin/sendmail/src/Makefile
index 149e49c9e12..f8f82ce170f 100644
--- a/usr.sbin/sendmail/src/Makefile
+++ b/usr.sbin/sendmail/src/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.19 1998/08/14 00:55:52 millert Exp $
+# $OpenBSD: Makefile,v 1.20 1999/01/01 20:33:35 millert Exp $
#
# OpenBSD Makefile
#
@@ -32,9 +32,9 @@ LDADD= -lwrap
CFLAGS+=-I${.CURDIR} ${MAPDEF} ${ENVDEF}
-SRCS= alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
- deliver.c domain.c envelope.c err.c headers.c macro.c main.c map.c \
- mci.c mime.c parseaddr.c queue.c readcf.c recipient.c safefile.c \
+SRCS= alias.c arpadate.c clock.c collect.c conf.c control.c convtime.c \
+ daemon.c deliver.c domain.c envelope.c err.c headers.c macro.c main.c \
+ map.c mci.c mime.c parseaddr.c queue.c readcf.c recipient.c safefile.c \
savemail.c snprintf.c srvrsmtp.c stab.c stats.c sysexits.c trace.c \
udb.c usersmtp.c util.c version.c
MAN= aliases.5 mailq.1 newaliases.1 sendmail.8
diff --git a/usr.sbin/sendmail/src/Makefile.m4 b/usr.sbin/sendmail/src/Makefile.m4
index f4229c2ad6b..ad9e1c911a5 100644
--- a/usr.sbin/sendmail/src/Makefile.m4
+++ b/usr.sbin/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/usr.sbin/sendmail/src/README b/usr.sbin/sendmail/src/README
index a6f7dcfd664..817b3a4f396 100644
--- a/usr.sbin/sendmail/src/README
+++ b/usr.sbin/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/usr.sbin/sendmail/src/TRACEFLAGS b/usr.sbin/sendmail/src/TRACEFLAGS
index 588714da7f2..04b9b3c5842 100644
--- a/usr.sbin/sendmail/src/TRACEFLAGS
+++ b/usr.sbin/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/usr.sbin/sendmail/src/alias.c b/usr.sbin/sendmail/src/alias.c
index 8da3317a3c1..a7149f2f849 100644
--- a/usr.sbin/sendmail/src/alias.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/aliases.5 b/usr.sbin/sendmail/src/aliases.5
index 8c73ac35a97..bf4583837e0 100644
--- a/usr.sbin/sendmail/src/aliases.5
+++ b/usr.sbin/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/usr.sbin/sendmail/src/arpadate.c b/usr.sbin/sendmail/src/arpadate.c
index 7a9576bdd4d..1b539b6ce99 100644
--- a/usr.sbin/sendmail/src/arpadate.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/clock.c b/usr.sbin/sendmail/src/clock.c
index e81c9725d6e..aab301c2c92 100644
--- a/usr.sbin/sendmail/src/clock.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/collect.c b/usr.sbin/sendmail/src/collect.c
index 190e6995743..e334e968e02 100644
--- a/usr.sbin/sendmail/src/collect.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/conf.c b/usr.sbin/sendmail/src/conf.c
index 46a4b88eef3..443ae034de4 100644
--- a/usr.sbin/sendmail/src/conf.c
+++ b/usr.sbin/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
@@ -1939,7 +1946,7 @@ getla()
/* Non Apollo stuff removed by Don Lewis 11/15/93 */
#ifndef lint
-static char rcsid[] = "@(#)$Id: conf.c,v 1.10 1998/07/12 19:44:26 millert Exp $";
+static char rcsid[] = "@(#)$Id: conf.c,v 1.11 1999/01/01 20:33:39 millert Exp $";
#endif /* !lint */
#ifdef apollo
@@ -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/usr.sbin/sendmail/src/conf.h b/usr.sbin/sendmail/src/conf.h
index fd14d5aaf43..b9cdc6862ca 100644
--- a/usr.sbin/sendmail/src/conf.h
+++ b/usr.sbin/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/usr.sbin/sendmail/src/control.c b/usr.sbin/sendmail/src/control.c
new file mode 100644
index 00000000000..157ca08548e
--- /dev/null
+++ b/usr.sbin/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/usr.sbin/sendmail/src/convtime.c b/usr.sbin/sendmail/src/convtime.c
index 02c287b1372..ab8591d970e 100644
--- a/usr.sbin/sendmail/src/convtime.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/daemon.c b/usr.sbin/sendmail/src/daemon.c
index dc0b5b5bd2d..b74a7a72efe 100644
--- a/usr.sbin/sendmail/src/daemon.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/deliver.c b/usr.sbin/sendmail/src/deliver.c
index 55083d34783..e70f17e675a 100644
--- a/usr.sbin/sendmail/src/deliver.c
+++ b/usr.sbin/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, '@');
@@ -3297,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)
@@ -3320,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/usr.sbin/sendmail/src/domain.c b/usr.sbin/sendmail/src/domain.c
index e3a5500b551..a279c0e69a9 100644
--- a/usr.sbin/sendmail/src/domain.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/envelope.c b/usr.sbin/sendmail/src/envelope.c
index 092148a2a0c..a17aa8c2dfc 100644
--- a/usr.sbin/sendmail/src/envelope.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/err.c b/usr.sbin/sendmail/src/err.c
index 066139557a0..1a875a2f92e 100644
--- a/usr.sbin/sendmail/src/err.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/headers.c b/usr.sbin/sendmail/src/headers.c
index b753b7e2dcc..fcf1d9c0d95 100644
--- a/usr.sbin/sendmail/src/headers.c
+++ b/usr.sbin/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 */
@@ -1200,7 +1200,9 @@ putheader(mci, hdr, e)
#if _FFR_MAX_MIME_HEADER_LENGTH
/* heuristic shortening of MIME fields to avoid MUA overflows */
- if (wordinclass(h->h_field, macid("{checkMIMEFieldHeaders}", NULL)))
+ if (MaxMimeFieldLength > 0 &&
+ wordinclass(h->h_field,
+ macid("{checkMIMEFieldHeaders}", NULL)))
{
extern bool fix_mime_header __P((char *));
@@ -1215,7 +1217,25 @@ putheader(mci, hdr, e)
}
}
- if (wordinclass(h->h_field, macid("{checkMIMEHeaders}", NULL)))
+ 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));
diff --git a/usr.sbin/sendmail/src/ldap_map.h b/usr.sbin/sendmail/src/ldap_map.h
index 9f6a6796d7a..97eb29ec072 100644
--- a/usr.sbin/sendmail/src/ldap_map.h
+++ b/usr.sbin/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/usr.sbin/sendmail/src/macro.c b/usr.sbin/sendmail/src/macro.c
index c1f9f7bb06c..d45a0c7080e 100644
--- a/usr.sbin/sendmail/src/macro.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/mailq.1 b/usr.sbin/sendmail/src/mailq.1
index fa1d0d56f51..8b6e63ac129 100644
--- a/usr.sbin/sendmail/src/mailq.1
+++ b/usr.sbin/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/usr.sbin/sendmail/src/mailstats.h b/usr.sbin/sendmail/src/mailstats.h
index 0164d91e144..86390b3911a 100644
--- a/usr.sbin/sendmail/src/mailstats.h
+++ b/usr.sbin/sendmail/src/mailstats.h
@@ -1,49 +1,34 @@
/*
- * Copyright (c) 1983 Eric P. Allman
+ * Copyright (c) 1998 Sendmail, Inc. All rights reserved.
+ * Copyright (c) 1983 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
+ * 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.
*
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
*
- * @(#)mailstats.h 8.1 (Berkeley) 6/7/93
+ * @(#)mailstats.h 8.8 (Berkeley) 5/19/1998
*/
+#define STAT_VERSION 2
+#define STAT_MAGIC 0x1B1DE
+
/*
** Statistics structure.
*/
struct statistics
{
+ int stat_magic; /* magic number */
+ int stat_version; /* stat file version */
time_t stat_itime; /* file initialization time */
short stat_size; /* size of this structure */
long stat_nf[MAXMAILERS]; /* # msgs from each mailer */
long stat_bf[MAXMAILERS]; /* kbytes from each mailer */
long stat_nt[MAXMAILERS]; /* # msgs to each mailer */
long stat_bt[MAXMAILERS]; /* kbytes to each mailer */
+ long stat_nr[MAXMAILERS]; /* # rejects by each mailer */
+ long stat_nd[MAXMAILERS]; /* # discards by each mailer */
};
diff --git a/usr.sbin/sendmail/src/main.c b/usr.sbin/sendmail/src/main.c
index 1af9f6c6e29..cea9d158d71 100644
--- a/usr.sbin/sendmail/src/main.c
+++ b/usr.sbin/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,18 +1211,21 @@ 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 overflow */
- setclass(macid("{checkMIMEHeaders}", NULL), "content-description");
+ /* 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)
@@ -1254,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");
@@ -1281,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:
@@ -1314,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;
}
@@ -1372,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';
@@ -1390,7 +1401,7 @@ main(argc, argv, envp)
if (queuemode && OpMode != MD_DAEMON && QueueIntvl == 0)
{
(void) runqueue(FALSE, Verbose);
- finis();
+ finis(TRUE, ExitStat);
}
# endif /* QUEUE */
@@ -1415,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);
@@ -1508,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 */
@@ -1552,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);
}
/*
@@ -1596,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;
}
@@ -1628,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
@@ -1648,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
@@ -1658,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);
}
@@ -1681,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();
@@ -1698,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
@@ -1732,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
@@ -2170,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/usr.sbin/sendmail/src/makesendmail b/usr.sbin/sendmail/src/makesendmail
index ab8a49d78ca..bca061f5466 100644
--- a/usr.sbin/sendmail/src/makesendmail
+++ b/usr.sbin/sendmail/src/makesendmail
@@ -10,7 +10,7 @@
# the sendmail distribution.
#
#
-# @(#)Build 8.93 (Berkeley) 6/24/98
+# @(#)Build 8.93 (Berkeley) 6/24/1998
#
#
diff --git a/usr.sbin/sendmail/src/map.c b/usr.sbin/sendmail/src/map.c
index 4c95b7fd6ab..787ae07deb8 100644
--- a/usr.sbin/sendmail/src/map.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/mci.c b/usr.sbin/sendmail/src/mci.c
index efb8cbad67a..41649a25271 100644
--- a/usr.sbin/sendmail/src/mci.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/mime.c b/usr.sbin/sendmail/src/mime.c
index 2262a169b9f..a1429cb950d 100644
--- a/usr.sbin/sendmail/src/mime.c
+++ b/usr.sbin/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 */
/*
@@ -442,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);
@@ -663,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 */
@@ -683,6 +695,7 @@ mime_getchar(fp, boundaries, btp)
ungetc(c, fp);
return c;
}
+ start = 1;
}
if (c != EOF)
*bp++ = c;
@@ -711,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/usr.sbin/sendmail/src/newaliases.1 b/usr.sbin/sendmail/src/newaliases.1
index acf32453164..b9673cd3535 100644
--- a/usr.sbin/sendmail/src/newaliases.1
+++ b/usr.sbin/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/usr.sbin/sendmail/src/parseaddr.c b/usr.sbin/sendmail/src/parseaddr.c
index c3c89b45d2f..86762fd6694 100644
--- a/usr.sbin/sendmail/src/parseaddr.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/pathnames.h b/usr.sbin/sendmail/src/pathnames.h
index e10387ee398..7a06b120652 100644
--- a/usr.sbin/sendmail/src/pathnames.h
+++ b/usr.sbin/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/usr.sbin/sendmail/src/queue.c b/usr.sbin/sendmail/src/queue.c
index 24b789a251b..65e777ac5ab 100644
--- a/usr.sbin/sendmail/src/queue.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/readcf.c b/usr.sbin/sendmail/src/readcf.c
index c66e98e3855..56aa825981b 100644
--- a/usr.sbin/sendmail/src/readcf.c
+++ b/usr.sbin/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,15 +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 }
};
@@ -1711,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
@@ -1775,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';
@@ -2405,28 +2408,28 @@ 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;
@@ -2455,6 +2458,14 @@ setoption(opt, val, safe, sticky, e)
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/usr.sbin/sendmail/src/recipient.c b/usr.sbin/sendmail/src/recipient.c
index 9a73b6a39cf..59412a842c6 100644
--- a/usr.sbin/sendmail/src/recipient.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/safefile.c b/usr.sbin/sendmail/src/safefile.c
index 16f3f3927c9..ff94b3d243b 100644
--- a/usr.sbin/sendmail/src/safefile.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/savemail.c b/usr.sbin/sendmail/src/savemail.c
index 4fbfd675621..f15c8de4ade 100644
--- a/usr.sbin/sendmail/src/savemail.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/sendmail.8 b/usr.sbin/sendmail/src/sendmail.8
index 5105e831d35..093b6e6f9f2 100644
--- a/usr.sbin/sendmail/src/sendmail.8
+++ b/usr.sbin/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/usr.sbin/sendmail/src/sendmail.h b/usr.sbin/sendmail/src/sendmail.h
index b35b58908b8..023799d7e81 100644
--- a/usr.sbin/sendmail/src/sendmail.h
+++ b/usr.sbin/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 */
@@ -1078,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 */
@@ -1098,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
@@ -1121,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
@@ -1184,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) */
@@ -1222,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 */
@@ -1292,7 +1295,7 @@ EXTERN int MaxMimeFieldLength; /* maximum MIME field length */
extern int errno;
/*
-** Queue Run Limitations
+** Queue Run Limitations
*/
struct queue_char
{
@@ -1404,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 *));
@@ -1432,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 *));
@@ -1472,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));
@@ -1495,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/usr.sbin/sendmail/src/sendmail.hf b/usr.sbin/sendmail/src/sendmail.hf
index 12a306012b3..0952963b8bd 100644
--- a/usr.sbin/sendmail/src/sendmail.hf
+++ b/usr.sbin/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/usr.sbin/sendmail/src/snprintf.c b/usr.sbin/sendmail/src/snprintf.c
index 72fce924cd0..f35d4c7a858 100644
--- a/usr.sbin/sendmail/src/snprintf.c
+++ b/usr.sbin/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"
@@ -38,7 +38,7 @@ static char sccsid[] = "@(#)snprintf.c 8.11 (Berkeley) 6/4/98";
* causing nast effects.
**************************************************************/
-/*static char _id[] = "$Id: snprintf.c,v 1.2 1998/07/12 19:45:15 millert Exp $";*/
+/*static char _id[] = "$Id: snprintf.c,v 1.3 1999/01/01 20:34:02 millert Exp $";*/
void sm_dopr();
char *DoprEnd;
int SnprfOverflow;
@@ -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/usr.sbin/sendmail/src/srvrsmtp.c b/usr.sbin/sendmail/src/srvrsmtp.c
index fba103c6f04..f4ffe8c0dfa 100644
--- a/usr.sbin/sendmail/src/srvrsmtp.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/stab.c b/usr.sbin/sendmail/src/stab.c
index 1ffc7cb1fcf..37b87a37124 100644
--- a/usr.sbin/sendmail/src/stab.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/stats.c b/usr.sbin/sendmail/src/stats.c
index 767a55e1741..b1162ff79ea 100644
--- a/usr.sbin/sendmail/src/stats.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/sysexits.c b/usr.sbin/sendmail/src/sysexits.c
index 10d7c85a182..c7934c73840 100644
--- a/usr.sbin/sendmail/src/sysexits.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/trace.c b/usr.sbin/sendmail/src/trace.c
index 5ff9795c512..5ab60325133 100644
--- a/usr.sbin/sendmail/src/trace.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/udb.c b/usr.sbin/sendmail/src/udb.c
index e7f42af2ba9..a279afff155 100644
--- a/usr.sbin/sendmail/src/udb.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/useful.h b/usr.sbin/sendmail/src/useful.h
index 2a283ab7b8b..a19dd9e0305 100644
--- a/usr.sbin/sendmail/src/useful.h
+++ b/usr.sbin/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/usr.sbin/sendmail/src/usersmtp.c b/usr.sbin/sendmail/src/usersmtp.c
index 23e4d025693..99ea64696f0 100644
--- a/usr.sbin/sendmail/src/usersmtp.c
+++ b/usr.sbin/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/usr.sbin/sendmail/src/util.c b/usr.sbin/sendmail/src/util.c
index 04aea652cc4..785d36269eb 100644
--- a/usr.sbin/sendmail/src/util.c
+++ b/usr.sbin/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"
@@ -204,8 +204,8 @@ shorten_rfc822_string(string, length)
char *ptr = string;
/*
- ** If have to rebalance an already short enough string,
- ** need to do it within allocated space.
+ ** If have to rebalance an already short enough string,
+ ** need to do it within allocated space.
*/
slen = strlen(string);
if (length == 0 || slen < length)
@@ -247,7 +247,7 @@ increment:
backslash = FALSE;
else if (*ptr == '(' && !quoted)
parencount--;
- else if (*ptr == '"' && !backslash && parencount == 0)
+ else if (*ptr == '"' && parencount == 0)
quoted = FALSE;
break;
}
@@ -2022,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)
@@ -2031,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)
@@ -2050,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
@@ -2092,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;
}
}
@@ -2116,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;
}
/*
@@ -2135,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--;
}
}
@@ -2153,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/usr.sbin/sendmail/src/version.c b/usr.sbin/sendmail/src/version.c
index fdcad5c24f7..8e8707b7a9f 100644
--- a/usr.sbin/sendmail/src/version.c
+++ b/usr.sbin/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.1a";
+char Version[] = "8.9.2";
diff --git a/usr.sbin/sendmail/test/Results b/usr.sbin/sendmail/test/Results
index 3d930daa129..e31a68bf9a2 100644
--- a/usr.sbin/sendmail/test/Results
+++ b/usr.sbin/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>