summaryrefslogtreecommitdiff
path: root/usr.sbin/sendmail/cf
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 /usr.sbin/sendmail/cf
parent73ee31937b7b4ae7257f3dc1da71e8072d535784 (diff)
sendmail 8.9.2
Diffstat (limited to 'usr.sbin/sendmail/cf')
-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
138 files changed, 7844 insertions, 575 deletions
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