summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schulze <joey@infodrom.org>2004-09-13 09:07:18 +0200
committerAndreas Beckmann <debian@abeckmann.de>2012-10-01 19:58:43 +0200
commitae03fe5d926a63cab418207f760d62a947957123 (patch)
treeaa48cfe56ac7c47fb9b0abce4d4689033d3098d6
parentdd994db23cb7f88732be927fad3a7039bd6301db (diff)
downloadsendmail-ae03fe5d926a63cab418207f760d62a947957123.tar.gz
Imported Debian patch 8.12.3-7.1debian/8.12.3-7.1
-rw-r--r--debian/Debian-specific103
-rw-r--r--debian/README.Build114
-rw-r--r--debian/README.Debian.libmilter-dev25
-rw-r--r--debian/README.Debian.sendmail111
-rw-r--r--debian/README.Debian.sendmail-doc11
-rw-r--r--debian/README.dbs20
-rw-r--r--debian/README.potato128
-rw-r--r--debian/TODO (renamed from debian/sendmail.TODO)32
-rw-r--r--debian/build/Build23
-rw-r--r--debian/build/autoconf.mk.in98
-rw-r--r--debian/build/autoconf.pl.in39
-rw-r--r--debian/build/autoconf.sh.in31
-rw-r--r--debian/build/changelog.sh.in59
-rw-r--r--debian/build/control.m4.in142
-rw-r--r--debian/build/install-sh251
-rw-r--r--debian/build/rules.in1189
-rw-r--r--debian/build/site.config.m4.in235
-rw-r--r--debian/build/update_chaos.in202
-rw-r--r--debian/build/version.c1
-rw-r--r--debian/cf/cf/debproto.mc42
-rw-r--r--debian/cf/debian/autoconf.m4.in59
-rw-r--r--debian/cf/debian/sendmail.mc.in46
-rw-r--r--debian/cf/debian/starttls.m4.in52
-rw-r--r--debian/cf/debian/submit.mc.in56
-rw-r--r--debian/cf/domain/debian-msp.m4.in98
-rw-r--r--debian/cf/domain/debian-mta.m4.in134
-rw-r--r--debian/cf/feature/dont_masquerade_local.m49
-rw-r--r--debian/cf/feature/dssl.m45
-rw-r--r--debian/cf/feature/imrss.m45
-rw-r--r--debian/cf/feature/ldap.m413
-rw-r--r--debian/cf/feature/orbs.m47
-rw-r--r--debian/cf/feature/orca.m46
-rw-r--r--debian/cf/feature/rhsbl.m440
-rw-r--r--debian/cf/feature/vnet.m461
-rw-r--r--debian/cf/hack/debian_auth.m4.in47
-rw-r--r--debian/cf/hack/msp_nullclient.m495
-rw-r--r--debian/cf/hack/nodns.m447
-rw-r--r--debian/cf/hack/spamtrap.m462
-rw-r--r--debian/cf/hack/virthost_by_ip.m4.in77
-rw-r--r--debian/cf/mailer/cyrus21.m466
-rw-r--r--debian/cf/ostype/debian.m4105
-rw-r--r--debian/cf/ostype/debian.m4.in110
-rw-r--r--debian/changelog1099
-rw-r--r--debian/checks20
-rw-r--r--debian/configure8658
-rw-r--r--debian/configure.ac1
-rw-r--r--debian/control97
-rw-r--r--debian/copyright (renamed from debian/sendmail.copyright)24
-rw-r--r--debian/examples/Makefile.in124
-rw-r--r--debian/examples/amavis-doc/README8
-rw-r--r--debian/examples/amavis-doc/amavis-doc.lyx904
-rw-r--r--debian/examples/amavis/amavis-doc-1.html75
-rw-r--r--debian/examples/amavis/amavis-doc-2.html138
-rw-r--r--debian/examples/amavis/amavis-doc-3.html38
-rw-r--r--debian/examples/amavis/amavis-doc-4.html31
-rw-r--r--debian/examples/amavis/amavis-doc-5.html85
-rw-r--r--debian/examples/amavis/amavis-doc-6.html48
-rw-r--r--debian/examples/amavis/amavis-doc-7.html96
-rw-r--r--debian/examples/amavis/amavis-doc-8.html72
-rw-r--r--debian/examples/amavis/amavis-doc.html72
-rw-r--r--debian/examples/db/access (renamed from debian/db-examples/access)0
-rw-r--r--debian/examples/db/aliases (renamed from debian/db-examples/aliases)0
-rw-r--r--debian/examples/db/domaintable (renamed from debian/db-examples/domaintable)0
-rw-r--r--debian/examples/db/genericstable (renamed from debian/db-examples/genericstable)0
-rw-r--r--debian/examples/db/mailertable (renamed from debian/db-examples/mailertable)0
-rw-r--r--debian/examples/db/relay-domains (renamed from debian/db-examples/relay-domains)0
-rw-r--r--debian/examples/db/sendmail.cM (renamed from debian/db-examples/sendmail.cM)0
-rw-r--r--debian/examples/db/virtusertable (renamed from debian/db-examples/virtusertable)0
-rw-r--r--debian/examples/dialup/ip-down.d57
-rw-r--r--debian/examples/dialup/ip-up.d130
-rw-r--r--debian/examples/ldap/sendmail.schema.v160
-rw-r--r--debian/examples/ldap/sendmail.schema.v2216
-rw-r--r--debian/examples/logcheck/ignore.d.paranoid/sendmail21
-rw-r--r--debian/examples/logcheck/ignore.d.server/sendmail21
-rw-r--r--debian/examples/logcheck/ignore.d.workstation/sendmail21
-rw-r--r--debian/examples/logcheck/violations.ignore.d/logcheck-sendmail12
-rw-r--r--debian/examples/logcheck/violations.ignore.d/sendmail12
-rw-r--r--debian/examples/milter/Makefile25
-rw-r--r--debian/examples/milter/sample.c236
-rw-r--r--debian/examples/milter/strl.h17
-rw-r--r--debian/examples/pam/smtp14
-rw-r--r--debian/examples/sasl/Sendmail.conf18
-rw-r--r--debian/examples/sasl/saslpasswd.conf17
-rw-r--r--debian/faq.txt2111
-rw-r--r--debian/ida-aliases.m423
-rw-r--r--debian/ida-aliases.m4.README168
-rw-r--r--debian/libmilter-dev.dirs.in3
-rw-r--r--debian/libmilter-dev.postinst47
-rw-r--r--debian/libmilter-dev.postrm.in53
-rw-r--r--debian/libmilter-dev.preinst.in55
-rw-r--r--debian/libmilter-dev.prerm54
-rw-r--r--debian/local/Makefile.in143
-rw-r--r--debian/local/Parse_mc.pm.in933
-rw-r--r--debian/local/configure903
-rw-r--r--debian/local/configure.in10
-rw-r--r--debian/local/el33t.h6
-rw-r--r--debian/local/ip-down.d43
-rw-r--r--debian/local/ip-up.d100
-rw-r--r--debian/local/local_no_masquerade.m425
-rw-r--r--debian/local/parse_mc.in86
-rw-r--r--debian/local/parsemc608
-rw-r--r--debian/local/provider4
-rw-r--r--debian/local/qtool.8213
-rw-r--r--debian/local/qtool.pl1234
-rw-r--r--debian/local/runq27
-rw-r--r--debian/local/runq.8 (renamed from debian/local/runq.1)2
-rw-r--r--debian/local/sendmail.in1121
-rw-r--r--debian/local/sendmailconfig.in (renamed from debian/local/sendmailconfig)637
-rw-r--r--debian/local/sensible-mda.c124
-rw-r--r--debian/local/site.config.m4.in59
-rw-r--r--debian/local/socks_wrapper (renamed from debian/socks_wrapper)0
-rw-r--r--debian/local/update_auth.in250
-rw-r--r--debian/local/update_conf.in1140
-rw-r--r--debian/local/update_db.in591
-rw-r--r--debian/local/update_ldap.in118
-rw-r--r--debian/local/update_mc.in212
-rw-r--r--debian/local/update_mk.in661
-rw-r--r--debian/local/update_notices177
-rw-r--r--debian/local/update_sendmail77
-rw-r--r--debian/local/update_smrsh.in73
-rw-r--r--debian/local/update_sys.in282
-rw-r--r--debian/local/update_tcpd53
-rw-r--r--debian/local/update_tls.in305
-rw-r--r--debian/local/updatedb481
-rw-r--r--debian/notes8
-rw-r--r--debian/patches/8.12/8.12.3/CAN-2003-0681.patch87
-rw-r--r--debian/patches/8.12/8.12.3/CAN-2003-0694.patch15
-rw-r--r--debian/patches/8.12/8.12.3/bf.c.8.5130
-rw-r--r--debian/patches/8.12/8.12.3/domain.c.8.18116
-rw-r--r--debian/patches/8.12/8.12.3/dpatch.00150
-rw-r--r--debian/patches/8.12/8.12.3/dpatch.002 (renamed from debian/patches/cf.mailer.cyrus.m4)9
-rw-r--r--debian/patches/8.12/8.12.3/dpatch.003 (renamed from debian/patches/patch.rmail)30
-rw-r--r--debian/patches/8.12/8.12.3/dpatch.00452
-rw-r--r--debian/patches/8.12/8.12.3/dpatch.00554
-rw-r--r--debian/patches/8.12/8.12.3/dsa-doublebounce.patch20
-rw-r--r--debian/patches/8.12/8.12.3/dsa-expn.patch20
-rw-r--r--debian/patches/8.12/8.12.3/main.c.8.87617
-rw-r--r--debian/patches/8.12/8.12.3/maxseq.patch51
-rw-r--r--debian/patches/8.12/8.12.3/patch.milter.replbody63
-rw-r--r--debian/patches/8.12/8.12.3/proto.m4.8.64611
-rw-r--r--debian/patches/8.12/8.12.3/proto.m4.8.649.2.1318
-rw-r--r--debian/patches/8.12/8.12.3/recipient.c.8.330.2.117
-rw-r--r--debian/patches/8.12/8.12.3/security.parsaddr58
-rw-r--r--debian/patches/8.12/8.12.3/sendmail.8.12.security.cr.patch (renamed from debian/patches/sendmail.8.9.3.security.cr.patch)181
-rw-r--r--debian/patches/8.12/8.12.3/smrsh-20020924.patch63
-rw-r--r--debian/patches/8.12/8.12.3/socks.patch50
-rw-r--r--debian/patches/Makefile51
-rw-r--r--debian/patches/align.893.p117
-rw-r--r--debian/patches/contrib/etrn.patch0142
-rw-r--r--debian/patches/mime-patch62
-rw-r--r--debian/patches/mime-patch.README31
-rw-r--r--debian/patches/mrbl.p3168
-rw-r--r--debian/patches/mrbl.p3.README12
-rw-r--r--debian/patches/patch.DOS21
-rw-r--r--debian/patches/patch.IP_SRCROUTE94
-rw-r--r--debian/patches/patch.dont_masquerade_local39
-rw-r--r--debian/patches/patch.ldap.m417
-rw-r--r--debian/patches/patch.ldap.src377
-rw-r--r--debian/patches/patch.local_procmail68
-rw-r--r--debian/patches/patch.mail.local68
-rw-r--r--debian/patches/patches.index16
-rw-r--r--debian/patches/prescan.8.9.3.patch122
-rw-r--r--debian/patches/proto.m4.8.9.313
-rw-r--r--debian/patches/src.conf.h.linux54
-rw-r--r--debian/patches/util.c.893.patch48
-rw-r--r--debian/proto.m41329
-rwxr-xr-xdebian/rules1424
-rw-r--r--debian/scripts/dbs-build.mk94
-rw-r--r--debian/scripts/dbs_split83
-rw-r--r--debian/scripts/dpkg-arch.mk7
-rw-r--r--debian/scripts/file2cat13
-rw-r--r--debian/sendmail-8.9.3-imrss-patches193
-rw-r--r--debian/sendmail-doc.dirs.in5
-rw-r--r--debian/sendmail-doc.docs4
-rw-r--r--debian/sendmail-doc.postinst47
-rw-r--r--debian/sendmail-doc.postrm.in53
-rw-r--r--debian/sendmail-doc.preinst.in55
-rw-r--r--debian/sendmail-doc.prerm54
-rw-r--r--debian/sendmail.README.Debian34
-rw-r--r--debian/sendmail.conffiles6
-rw-r--r--debian/sendmail.conffiles.in13
-rw-r--r--debian/sendmail.cron.daily36
-rw-r--r--debian/sendmail.cron.daily.in101
-rw-r--r--debian/sendmail.dirs25
-rw-r--r--debian/sendmail.dirs.in54
-rw-r--r--debian/sendmail.dirs.template25
-rw-r--r--debian/sendmail.docs7
-rw-r--r--debian/sendmail.examples4
-rw-r--r--debian/sendmail.init.d169
-rw-r--r--debian/sendmail.init.d.in42
-rw-r--r--debian/sendmail.links.in1
-rw-r--r--debian/sendmail.lintian-overrides16
-rw-r--r--debian/sendmail.logrotate86
-rw-r--r--debian/sendmail.postinst331
-rw-r--r--debian/sendmail.postinst.in356
-rw-r--r--debian/sendmail.postrm41
-rw-r--r--debian/sendmail.postrm.in119
-rw-r--r--debian/sendmail.preinst21
-rw-r--r--debian/sendmail.preinst.in61
-rw-r--r--debian/sendmail.prerm36
-rw-r--r--debian/sendmail.prerm.in153
-rw-r--r--debian/sendmail.suid3
-rw-r--r--debian/sendmail.suid.in2
-rw-r--r--debian/sensible_mda/Makefile.in61
-rw-r--r--debian/sensible_mda/sensible-mda.8 (renamed from debian/local/sensible-mda.8)21
-rw-r--r--debian/sensible_mda/sensible-mda.c.in351
-rw-r--r--debian/sensible_mda/sensible-mda.c.old281
-rw-r--r--debian/sources1
-rw-r--r--debian/watch5
209 files changed, 28865 insertions, 8933 deletions
diff --git a/debian/Debian-specific b/debian/Debian-specific
index b9fad25..7692165 100644
--- a/debian/Debian-specific
+++ b/debian/Debian-specific
@@ -1,8 +1,13 @@
+Please take a gander at /usr/share/doc/sendmail/sendmail/README.Debian.gz -
+it has a quick overview of important matters.
+
Changes: Items that cause a functional difference in the way
sendmail works.
These items *may* bite you if you aren't careful !
+Removed: Items that are not shipped
+
Enhancements: Items above and beyond the base sendmail distribution
These will be Debian add ons, or items the sendmail folk
consider *not ready for prime time* (the _FFR_'s).
@@ -14,7 +19,53 @@ Patches: Items correcting flaws in the original sendmail distribution
these items are culled from c.m.s, notes from developers,
and user input.
-+++++++++++++++++++++++++++++Sendmail 8.11.0:++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++Sendmail 8.12.0:++++++++++++++++++++++++++++++++
+
+ Changes:-------------------------------------------------------------
+ 1) rmail/rmail.c: Deliver mail foreground, not queued
+ Roland Rosenfeld (closes: bug #31138)
+
+ 2) cf/feature/local_procmail.m4: Remove -Y from procmail
+ (closes: bug #25639)
+
+ 3) sendmail/control.c: Make control socket mode 0660
+
+ 4) cf/mailer/cyrus.m4 Support cyrus-deliver
+
+ 5) cf/mailer/local.m4 Support FEATURE(dont_masquerade_local)
+
+ Removed:-------------------------------------------------------------
+
+ 1) TLS support disabled because the maintainer is in the US,
+ he'll need to wait until Debian supports crypto export from US.
+
+ 2) smtpd alias for sendmail (in smtpd package)
+ moved to /usr/lib/sm.bin
+
+ 3) hoststat alias for sendmail (in newscache package)
+ moved to /usr/lib/sm.bin
+
+ 4) vacation vacation program (in vacation package)
+ moved to /usr/lib/sm.bin
+
+ Enhancements:--------------------------------------------------------
+ 1) cf/cf/debproto.m4: Sample, mimimal sendmail.mc file
+ cf/ostype/debian.m4: Debian customizations for OSTYPE(debian)
+
+ 2) cf/feature/dont_masquerade_local.m4 -- superceded by
+ FEATURE(local_no_masquerade)
+
+ 3) cf/hack/nodns.m4: /etc/mail/service.switch-nodns
+ (closes: bug#24608)
+
+ 4) /etc/mail/sendmail.conf
+ /etc/init.d/sendmail Nice, powerfull means to control sendmail
+
+ Patches:-------------------------------------------------------------
+ 1) cf/mailer/cyrus.m4: Support Debian cyrus delivery agent pkg
+ Manoj Srivastava (closes: bug #63441)
+
++++++++++++++++++++++++++++++Sendmail 8.11.6:++++++++++++++++++++++++++++++++
Changes:-------------------------------------------------------------
1) rmail/rmail.c: Deliver mail foreground, not queued
@@ -25,6 +76,20 @@ Patches: Items correcting flaws in the original sendmail distribution
3) sendmail/control.c: Make control socket mode 0660
+ 4) cf/mailer/cyrus.m4 Support cyrus-deliver
+
+ 5) cf/mailer/local.m4 Support FEATURE(dont_masquerade_local)
+
+ Removed:-------------------------------------------------------------
+ 1) TLS support disabled because the maintainer is in the US,
+ he'll need to wait until Debian supports crypto export from US.
+ 2) smtpd alias for sendmail (in smtpd package)
+ moved to /usr/lib/sm.bin
+ 3) hoststat alias for sendmail (in newscache package)
+ moved to /usr/lib/sm.bin
+ 4) vacation vacation program (in vacation package)
+ moved to /usr/lib/sm.bin
+
Enhancements:--------------------------------------------------------
1) cf/cf/debproto.m4: Sample, mimimal sendmail.mc file
cf/ostype/debian.m4: Debian customizations for OSTYPE(debian)
@@ -35,21 +100,16 @@ Patches: Items correcting flaws in the original sendmail distribution
3) cf/hack/nodns.m4: /etc/mail/service.switch-nodns
(closes: bug#24608)
- 4) cf/feature/dssl.m4
- cf/feature/imrss.m4
- cf/feature/orbs.m4 Note, these are deprecated and will
- cf/feature/orca.m4 be removed soon, please update to use
- cf/feature/rbl.m4 the FEATURE(dnsbl,[addr],[message])
- cf/m4/cfhead.m4
- cf/m4/proto.m4: Anti spam/relay/etc
- Claus Assmann
+
+ 4) /etc/default/sendmail
+ /etc/init.d/sendmail Nice, powerfull means to control sendmail
Patches:-------------------------------------------------------------
- 1) cf/mailer/cyrus/m4: Support Debian cyrus delivery agent pkg
+ 1) cf/mailer/cyrus.m4: Support Debian cyrus delivery agent pkg
Manoj Srivastava (closes: bug #63441)
-+++++++++++++++++++++++++++++Sendmail 8.10.1:++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++Sendmail 8.10.2:++++++++++++++++++++++++++++++++
Changes:-------------------------------------------------------------
1) rmail/rmail.c: Deliver mail foreground, not queued
@@ -60,7 +120,12 @@ Patches: Items correcting flaws in the original sendmail distribution
3) sendmail/control.c: Make control socket mode 0660
- Enhancements:--------------------------------------------------------
+ Removed:-------------------------------------------------------------
+ 1) smtpd alias for sendmail (in smtpd package)
+ 2) hoststat alias for sendmail (in newscache package)
+ 3) vacation vacation program (in vacation package)
+
+ Enhancements:--------------------------------------------------------
1) cf/cf/debproto.m4: Sample, mimimal sendmail.mc file
cf/ostype/debian.m4: Debian customizations for OSTYPE(debian)
@@ -76,12 +141,12 @@ Patches: Items correcting flaws in the original sendmail distribution
cf/feature/orbs.m4 Note, these are deprecated and will
cf/feature/orca.m4 be removed soon, please update to use
cf/feature/rbl.m4 the FEATURE(dnsbl,[addr],[message])
- cf/m4/cfhead.m4
- cf/m4/proto.m4: Anti spam/relay/etc
- Claus Assmann
+
+ 5) /etc/default/sendmail
+ /etc/init.d/sendmail Nice, powerfull means to control sendmail
Patches:-------------------------------------------------------------
- 1) cf/mailer/cyrus/m4: Support Debian cyrus delivery agent pkg
+ 1) cf/mailer/cyrus.m4: Support Debian cyrus delivery agent pkg
Manoj Srivastava (closes: bug #63441)
2) mail.local/mail.local.c: Fix unsafe fgets in mail.local
@@ -96,6 +161,11 @@ Patches: Items correcting flaws in the original sendmail distribution
2) cf/feature/local_procmail.m4: Remove -Y from procmail
(closes: bug #25639)
+
+ Removed:-------------------------------------------------------------
+ 1) smtpd alias for sendmail (in smtpd package)
+ 2) hoststat alias for sendmail (in newscache package)
+ 3) vacation vacation program (in vacation package)
Enhancements:--------------------------------------------------------
1) cf/cf/debproto.m4: Sample, mimimal sendmail.mc file
@@ -138,3 +208,4 @@ Patches: Items correcting flaws in the original sendmail distribution
5) src/main.c: sendmail -bi(newalias) DOS
c.m.s (closes: bug #51126)
+vim: noautoindent
diff --git a/debian/README.Build b/debian/README.Build
new file mode 100644
index 0000000..d9f6868
--- /dev/null
+++ b/debian/README.Build
@@ -0,0 +1,114 @@
+ Welcome to the badlands production of Sendmail
+ 2001/08/07 12:00:00
+
+If you're reading this, I'll assume you'd like to build your own private
+copy of sendmail using the Debian supplied version as a starting point.
+
+I've tried (hard) to make this as easy as possible, and would greatly
+appreciate any feedback.
+
+I've built sendmail 8.7.6 - 8.12.0
+on Debian slink - sid with this setup.
+
+I see a few reasons to build sendmail yourself:
+ 1) You want to build the current package on an older/newer Debian release
+ 2) You want to port to a different architecture
+ 3) You want additional features not included in the stock distribution
+ 4) You want to remove features from the stock distribution
+ 5) You want to further customize/patch the stock distribution
+
+First, you'll need to locate, download, and unpack the source from a
+Debian site (which, I guess you've already done that if you are reading this).
+
+Then, what you do depends upon why you're building:
+
+ 1) You want to build the current package on an older/newer Debian release:
+ Hopefully, autoconf will automagically take care of things for you!
+ A) Build the package using whatever tools you're used to:
+ dpkg-buildpackage -rfakeroot -uc -us
+ debuild -rfakeroot -uc -us
+ etc.
+ B) If you get a successful build, great ! install it and enjoy !!!
+ C) If you get any build errors, contact me and we'll figure out what
+ to do... probably will be a simple update to the autoconf setup.
+
+ 2) You want to port to a different architecture:
+ This is pretty much like 1) except that you're more likely to run
+ into problems ;-( Likely error candidates are kernel/library headers
+ and lack of support for desired add-ons (other -dev packages).
+
+ See Known Issues below and Follow the directions for 1) above.
+
+ 3) You want additional features not included in the stock distribution:
+ This should be fairly rare, as the stock distribution includes just
+ about everything !!!
+
+ Follow the directions for 5) below and let me know - I'll most likely
+ add the support to the stock package, especially if it doesn't conflict
+ with other options.
+
+ 4) You want to remove features from the stock distribution:
+ This is likely to be due to some kind of library conflict, or a
+ desire to reduce the package size.
+
+ To remove most features, just make sure you *DO NOT* have the -dev
+ package for that feature installed - autoconf will do the rest !
+ In these cases, Follow the directions for 1) above.
+
+ Otherwise, Follow the directions for 5) below.
+
+ 5) You want to further customize/patch the stock distribution:
+ A) Decide which features you wish to support (LDAP,SASL,TLS, etc.)
+ B) Install the apropriate -dev packages (libssl-dev, etc.)
+ C) Evaluate the following files for updates:
+ debian/build/site.config.m4.in ==> Sendmail compile config
+ debian/cf/ostype/debian.m4.in ==> Common .mc file config
+ debian/cf/domain/debian-msp.m4.in ==> MSP .mc file config
+ debian/cf/domain/debian-mta.m4.in ==> MTA .mc file config
+ D) Examine debian/rules for possible overrides (listed in the
+ header... Don't change debian/rules because it will get replaced
+ by the configure step.
+ E) Create any necessary patches (or contact me for assistance).
+ Patches go in debian/patches/${version}/ and must be able
+ to be applied with -p0 from debian/.. There's almost always
+ at least one existing patch you can peek at for an example.
+ F) Build the package as outlined in 1) above.
+ G) Please pass the patch on to me, with any description you have
+ so that if it is common, it can get added to the Debian stock
+ distribution, and maybe forwarded upstream (with your approval).
+
+Known issues:
+ Arch:
+ arm: 1)
+ m68k: 2)
+ Sendmail:
+ <8.10.0 3)
+ Misc:
+ IPV6 4)
+
+ 1) Shared memory support requires a 2.2.x; x>=19 or 2.4.x kernel to
+ compile on. Runtime support also requires said kernels, but the
+ support can be turned on/off at runtime, so the real constraint
+ is having an appropriate kernel for building on.
+ - Can be overridden via configure option (see top of debia/rules)
+ - Defaulted by a arch test in configure - if you hit this on
+ your arch, let me know and I'll update the test.
+
+ 2) Compiler miss-optimizing long-long values
+ - Supported via a patch making the test variables volatile so
+ the beast builds. I don't know of any runtime problems, but hey...
+
+ 3) Sendmail <8.10.0 will *NOT* compile against libdb3-dev!
+ - Install libdb2-dev for the compilation (db2 and db3 can coexist
+ with newer libc/libdbx packages) - you can then reinstall libdb3-dev
+ if you need it for other things.
+
+ 4) IPV6 support requires the bind-8 developement package (bind-dev)
+ because the libc folk have changed things above and beyond bind-8,
+ and sendmail can't figure out what to do.
+
+PS: This is obviously a *very* rough draft, please let me know how to make
+ it more useful for you!
+
+--
+Rick Nelson (cowboy@debian.org)
diff --git a/debian/README.Debian.libmilter-dev b/debian/README.Debian.libmilter-dev
new file mode 100644
index 0000000..f621a7c
--- /dev/null
+++ b/debian/README.Debian.libmilter-dev
@@ -0,0 +1,25 @@
+The sendmail Mail Filter API (Milter) is designed to allow third-party
+programs access to mail messages as they are being processed in order to
+filter meta-information and content.
+
+NOTE: With Sendmail 8.12.0 and above, the Milter API is built-in.
+Before 8.12.0, both libmilter and the callouts in sendmail are marked
+as an FFR (For Future Release). This means that support is *NOT*
+guaranteed - but things have been working well, and the usenet/mailing
+list (comp.mail.sendmail) does help if you have questions/problems.
+
+Everything you'll need to create a milter filter is contained in
+/usr/share/doc/sendmail (for which you need to install sendmail-doc):
+
+ - libmilter/README Document on build/install/config for milter
+ NOTE: see updated make in milter directory
+ - cf.README Document on configuring milter in sendmail.mc
+ - RELEASE_NOTES Any late breaking news
+
+and /usr/share/sendmail/examples (for which you need to install sendmail):
+
+ - examples/milter/* Sample milter filter and makefile
+
+--
+Rick Nelson
+cowboy@debian.org
diff --git a/debian/README.Debian.sendmail b/debian/README.Debian.sendmail
new file mode 100644
index 0000000..6188f37
--- /dev/null
+++ b/debian/README.Debian.sendmail
@@ -0,0 +1,111 @@
+ ***** Important notes on sendmail 8.12.0 ****
+
+*) This is a significant improvement in security, functionality and speed !
+ I strongly urge you to install sendmail-doc and peruse files here and in
+ /usr/share/doc/sendmail-doc
+
+*) Sendmail has extended control over queue management, and these changes can
+ cause a performance drop if you don't change your local configuration.
+
+ Old:
+ MaxDaemonChildren controlled number of listener *and* queue runners
+
+ Sendmail would fork as many children as needed to run the queues
+
+ New:
+ MaxDaemonChildren still works as a total limit
+ MaxQueueChildren limits *only* the number of total queue runners
+ MaxRunnersPerQueue limits the number of runners per individual
+ queue (in 8.11+, you can have multiple queues) -- *AND* you
+ can override this global limit on per queue basis!
+ MaxQueueRunSize limits the number of messages processed per queue run
+
+ Sendmail only forks upto MaxRunnersPerQueue for each queue per run
+
+ The gotcha here is that MaxRunnersPerQueue defaults to one !
+
+ I've changed the default MaxRunnersPerQueue to 5, so deliveries aren't
+ single threaded, but you may want to have more or less than 5.
+
+*) Check out queue groups!!! It can significantly improve throughput
+ see /usr/share/doc/sendmail-doc/cf.README.gz
+ and /usr/share/doc/sendmail-doc/op/op.{ps,txt}.gz
+
+*) Sendmail is *much* more secure now, and you'll never have problems
+ because sendmail doesn't accept new submissions (when using the sendmail
+ command, TCP connections will still be refused).
+
+ Message submission (sendmail -bs, -m, etc.) now use a SGID binary and
+ a separate g+w message queue.
+
+ see /usr/share/doc/sendmail-doc/sendmail.SECURITY.gz for further info
+ on the changes - which should be transparent to both the admin and user.
+
+*) The Debian package includes the ability to run sendmail in a variety of
+ ways:
+ MTA listener (port 25): None, daemon, or via INETD
+ MTA queue runner: None, daemon, or via cron
+ MSP queue runner: None, daemon, or via cron
+ MTA queue aging: None, or via cron
+ See /etc/mail/sendmail.conf for more details
+
+*) Sendmail now supports multiple queues! You can distribute queues
+ across devices, and the queues are run independantly - improving
+ throughput !
+
+*) There are new queue sort orders - amongst them are:
+ FileName: removes the need to read .qf files
+ Random: good for multi-queue runners
+
+*) Virtual hosting support has been enhanced in the os/site debian.m4
+ file. If you need more, checkout DAEMON_OPTIONS (Modifier=b)
+ see /usr/share/doc/sendmail-doc/cf.README.gz
+ and /usr/share/doc/sendmail-doc/op.{ps,txt}.gz
+ let me know what you think - any more extensions you'd like to see?
+
+*) IPv6 support is inboard, but Linux does things oddly (and differently
+ wrt kernel versions)... To run IPv6 on 2.2.x and 2.4.x, try this:
+ FEATURE(`no_default_msa')dnl
+ CLIENT_OPTIONS(`Family=inet6, Modifier=h')dnl
+ DAEMON_OPTIONS(`Port=smtp, Name=MTA-v6, Family=inet6')dnl
+ DAEMON_OPTIONS(`Port=587, Name=MSA-v6, Family=inet6, M=aE')dnl
+
+*) Sendmail now always uses TCP wrappers (/etc/hosts.allow /etc/hosts.deny)
+ This is a change from prior versions where wrapper support was enabled
+ via sendmail.mc.
+
+ Please make sure you add the appropriate entry to the /etc/hosts.* file.
+ The most likely candidate is to place sendmail: all in /etc/hosts.allow
+
+*) sendmail.st (for mailstats command) is *NOT* automagically created
+ because writing the statistic can be a performance hinderance.
+ If you want statistics: touch /var/lib/sendmail/sendmail.st
+
+*) You should *really* read RELEASE_NOTES... There are *many* changes for
+ spam control.
+ A) Relaying is, by default, prohibitted
+ B) Mail from non-resolvable domains is, by default, prohibitted
+
+ **** Other information ****
+
+This Debian package includes an automatic configuration utility
+`sendmailconfig' which can be run at any time to modify the current sendmail
+configuration.
+
+Most mail-related configuration files are kept in the /etc/mail directory.
+
+Specialized configurations can be accomplished by editing the file
+/etc/mail/sendmail.mc by hand and then running `sendmailconfig' to generate
+and use the appropriate corresponding sendmail.cf file. Such configurations
+can make use of the m4 configuration macros kept in the
+/usr/share/sendmail/cf directory.
+
+See also the other documentation in this directory and in the optional
+directory /usr/share/doc/sendmail-doc (installed via sendmail-doc package).
+
+Finally, the file /etc/aliases holds a text representation of the current mail
+aliases. See the aliases(5) man page for more information. If you edit this
+file, be sure to run `newaliases' to update the corresponding binary database.
+
+Rick Nelson
+cowboy@debian.org
diff --git a/debian/README.Debian.sendmail-doc b/debian/README.Debian.sendmail-doc
new file mode 100644
index 0000000..358d1c8
--- /dev/null
+++ b/debian/README.Debian.sendmail-doc
@@ -0,0 +1,11 @@
+This is the documentation directory for the sendmail program.
+
+The material here is optional, but may be important in configuring
+sendmail for your use.
+
+Other information (and examples) can be found in the following directories:
+ 1) /usr/share/doc/sendmail Required documentation and examples
+ 2) /usr/share/doc/libmilter-dev Required documentation for Mail fILTERs
+
+Rick Nelson
+cowboy@debian.org
diff --git a/debian/README.dbs b/debian/README.dbs
new file mode 100644
index 0000000..946bac0
--- /dev/null
+++ b/debian/README.dbs
@@ -0,0 +1,20 @@
+This package uses a form of source build based on DBS. To setup the
+source, run "debian/rules setup". This will extract the pristine source in
+build-dir/, apply patches from debian/patches/ and split the package
+scripts from debian/packages.d/ into their component files.
+
+A few cavaets. Modifying the source in build-tree/ or the package files in
+debian/, will not be preserved after the "clean" target is run. Actual
+files for packages are in debian/packages.d/ and will be regerated after
+being modified.
+
+To create patches for the source, you can remember several steps. There
+are two targes for handling source. The "unpack" target, will simply
+unpack the tarball(s) into build-tree/ and "patch" will apply all patches
+from debian/patches/. If you make any changes you can generate a new patch
+using the "make_patch" target. This will move your current sources under
+build-tree/, unpack the source+patches again, and then generate a diff
+between the two. Note, you should run the "clean" target in the
+build-tree/ source before doing this, to get a clean patch.
+
+Ben
diff --git a/debian/README.potato b/debian/README.potato
new file mode 100644
index 0000000..94f4d7e
--- /dev/null
+++ b/debian/README.potato
@@ -0,0 +1,128 @@
+#
+# COMPILING THE DEBIAN SENDMAIL PACKAGE ON POTATO
+#
+I am writing this document to summarize the assistance that Richard A
+Nelson (Rick) <cowboy@debian.org> gave me in getting the
+sendmail-8.12.1-1 package to compile under Potato. Hopefully this
+will save him the effort of responding to other email from people as
+clueless as myself.
+
+Pre-requisites (supplied by potato):
+ Linux 2.2.19 or 2.4.7+ for shm support.
+ m4
+ debhelper 1.1.17+
+ groff
+ bsdmainutils
+ libopenldap-dev
+ libwrap0-dev
+ liblockfile-dev
+ libpam0g-dev
+ automake
+ libtool
+ libdb2-dev
+ dpkg-dev
+
+Pre-requisites (that you must fulfill on your own):
+ libsasl-dev
+
+Instructions on how to fulfill above dependency:
+1) download from your nearest Debian source mirror the cyrus-sasl
+ source. At the point of the writing of this document that was version
+ 1.5.24-9. The source should be in "debian/pool/main/c/cyrus-sasl",
+ you will need the following files (possibly replacing the version):
+ cyrus-sasl_1.5.24-9.diff.gz
+ cyrus-sasl_1.5.24-9.dsc
+ cyrus-sasl_1.5.24.orig.tar.gz
+
+2) extract the source using dpkg-source -x cyrus-sasl_1.5.24-9.dsc
+ This should create a directory cyrus-sasl-1.5.24/
+3) compile+package sasl, this can be accomplished in different
+ ways. For either of them you will need to cd into the source
+ directory you just extracted (cd cyrus-sasl-1.5.24). Then you will
+ need to execute one of the following sets of commands:
+ debian/rules build as a normal user
+ debian/rules binary as root
+ or
+ debian/rules binary as root
+ or
+ dpkg-buildpackage
+4) install the resulting packages with a command similar to:
+ cd ..;dpkg --install *1.5.24-9*deb
+
+At this time, all of the prerequisites should be fulfilled to build the
+sendmail-8.12.1-1 packages.
+
+Note: to get a functional sendmail binary, I had to uninstall
+libdb2-dev at this point. See note on libdb at the end of this
+document. If your sendmail binary segfaults on startup, try removing
+libdb2-dev and going through all the remaining steps again.
+
+
+Now on to the real reason why you are reading this, making a sendmail
+binary package:
+1) download the sendmail source from your nearest Debian source
+ mirror. At the point of the writing of this document that was
+ version 8.12.1-1. The source should be in "debian/pool/main/s/sendmail",
+ you will need the following files (possibly replacing the version):
+ sendmail_8.12.1-1.diff.gz
+ sendmail_8.12.1-1.dsc
+ sendmail_8.12.1.orig.tar.gz
+2) extract the source using dpkg-source -x sendmail_8.12.1-1.dsc
+ This should create a directory named sendmail-8.12.1/
+3) modify debian portion to remove perl-5.6.1 dependancy and to fix a
+ typo. Some or all of this step will possibly disappear from future
+ versions. First cd sendmail-8.12.1/debian
+ a) Fix typo in the debian rules file
+ Search for the string "dh_testversion 2"
+ if dh_testversion is immediately preceded by a / remove it.
+ i.e. if you see /dh_testversion change it to dh_testversion
+ *** Note: you no longer need to do this as of 8.12.1-2 !
+ b) Change directory into sendmail-8.12.1/debian/local. Edit the
+ following files:
+ Parse_mc.pm.in
+ parse_mc.in
+ update_conf.in
+ update_mk.in
+ commenting out the following lines:
+ use warnings;
+ no warnings qw(once);
+ you may optionally also with to remove the -w for the first line
+ of those files.
+4) compile+package sendmail, this can be accomplished in different
+ ways. For either of them you will need to cd into the source
+ directory you extracted (cd sendmail-8.12.1). Then you will
+ need to execute one of the following sets of commands:
+ debian/rules build as a normal user
+ debian/rules binary as root
+ or
+ debian/rules binary as root
+ or
+ dpkg-buildpackage
+5) install the resulting packages with a command similar to:
+ cd ..;dpkg --install *8.12.1-1*deb
+
+At this point you should have a working sendmail binary installed. It
+is time to start testing. If sendmail seg faults on start up (verify
+with sendmail -bD), you should read the following note on libdb,
+libdb2, and libdb3).
+
+
+Yours,
+
+William R Thomas <corvar@theonering.net>
+
+
+A note on libdb, libdb2, and libdb3:
+ Sendmail and all of the various libraries it uses must all use
+ the same version of libdb. The quick, dirty, easy way to verify
+ this is to use ldd to determine which libdb library is being
+ used in the finished binaries:
+ ldd /usr/lib/sendmail
+ ldd /usr/lib/libnss_db.so
+ ldd /usr/sbin/saslpasswd (if available)
+ ldd /usr/sbin/slapd (if available)
+ if everything has gone well, you should see that all of the
+ above files are using the same version of libdb.
+
+ To get everything on the same version of libdb, I needed to
+ uninstall libdb2-dev previous to compiling the sendmail package.
diff --git a/debian/sendmail.TODO b/debian/TODO
index 06ce774..8f9a89b 100644
--- a/debian/sendmail.TODO
+++ b/debian/TODO
@@ -1,13 +1,35 @@
+Important:
Misc:
- cleanup/extend sendmailconfig
- sendmail -> mgetty/fax linkage
- sensible-mda understand maildrop mda (part of 40024)
+ * MSP/MTA split related
+ - -Am -bs failure if not root (can't write to /var/spool/mqueue)
+ would have to make queue dir 0660
+ * Don't do that ;-)
+ - queue cleaning for MSP -- do queue cleaning by subdirs
+ * 8.12 related ?
+ - recheck milter (Beta9+, its no longer _FFR_)
+ - debian/examples/milter needs looking at
+ * Debian stuff
+ - removing /etc/cron.d/sendmail to stop gid mismatch errors doesn't
+ work because cron may not see the update before scheduling...
+ shipping binary suid may solve this (and removes a small window
+ where calls to sendmail binary fail)
+ - split sendmail into sendmail/sendmail-common, with
+ sendmail-common containing /usr/share/sendmail stuff
+ - rules.in: why doesn't a failure in lower make propogate up?
+ - no need to configure rules, instead have rules depend upon
+ autoconf.mk !
+ - update debian/patches/patches.index
+ - create an LDAP migration script
+ - cleanup/extend sendmailconfig (debconf)
+ - support submit.mc updates (nullclient, etc)
+ - put stuff in sendmail.mc appropriately
+ above/below MAILER_DEFINITIONS
+ - sendmail -> mgetty/fax linkage
+ - sensible-mda: make sure mbox exists, setgid mail, drop suid
Doc:
- add hoststat to sendmail manpage
FHS:
- * /usr/lib/sm.bin -> ?
* /usr/lib/sendmail (obsolete link used by rmail/pine/others)
IRC comments:
diff --git a/debian/build/Build b/debian/build/Build
new file mode 100644
index 0000000..bf94717
--- /dev/null
+++ b/debian/build/Build
@@ -0,0 +1,23 @@
+#!/bin/sh
+#-----------------------------------------------------------------------------
+# $Sendmail: build/Build,v 8.12.0 2001/03/21 11:41:31 cowboy Exp $
+#
+# Copyright (c) 2001-2001 Richard Nelson. All Rights Reserved.
+#
+# Debian script to rationalize builds for Sendmail prior to 8.9.0
+#
+#-----------------------------------------------------------------------------
+set -e;
+
+# If ./Makefiles is a directory, we need to use makesendmail
+if [ -d Makefiles ]; then
+ sh makesendmail;
+
+# If ./Makefile.dist exists, use it
+elif [ -f Makefile.dist ]; then
+ (cd obj* && make;);
+
+# Otherwise, well, there's not much we can do
+else
+ :;
+ fi;
diff --git a/debian/build/autoconf.mk.in b/debian/build/autoconf.mk.in
new file mode 100644
index 0000000..c531e82
--- /dev/null
+++ b/debian/build/autoconf.mk.in
@@ -0,0 +1,98 @@
+#!/usr/bin/make -f
+#------------------------------------------------------------------------------
+# vim: syntax=make
+#
+# $Sendmail: autoconf.mk,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# Rules file for Sendmail @sm_version@@sm_revision@(@sm_version_math@)
+# on @sm_dist_name@ @sm_dist_vers@
+# via Debhelper V@DEBIAN_DH@
+#
+# Note: the .in file supports Sendmail @SM_MINVERS@ - @SM_MAXVERS@
+# on Debian slink, potato, woody, testing, sid, ...
+# but the generated file is customized to the version noted above.
+#
+# Richard Nelson <cowboy@debian.org> @sm_date@ @sm_time@ (@sm_utc@)
+#------------------------------------------------------------------------------
+#SHELL := /bin/sh -x
+
+# Variables for, and by, Autoconf (Don't touch these! edit config step)
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = ${DESTDIR}@bindir@
+sbindir = ${DESTDIR}@sbindir@
+libexecdir = ${DESTDIR}@libexecdir@
+datadir = ${DESTDIR}@datadir@
+sysconfdir = ${DESTDIR}@sysconfdir@
+sharedstatedir = ${DESTDIR}@sharedstatedir@
+localstatedir = ${DESTDIR}@localstatedir@
+libdir = ${DESTDIR}@libdir@
+includedir = ${DESTDIR}@includedir@
+infodir = ${DESTDIR}@infodir@
+mandir = ${DESTDIR}@mandir@
+srcdir = @srcdir@
+abs_srcdir = @abs_srcdir@
+top_srcdir = @top_srcdir@
+abs_top_srcdir = @abs_top_srcdir@
+builddir = @builddir@
+abs_builddir = @abs_builddir@
+top_builddir = @top_builddir@
+abs_top_builddir = @abs_top_builddir@
+VPATH = @srcdir@
+
+docdir = ${DESTDIR}@docdir@
+buildtree = @buildtree@
+
+# I like to preserve timestamps...
+INSTALL := @INSTALL@ -p
+INSTALL_PROGRAM := @INSTALL_PROGRAM@
+# We'll let the dh_strip program take care of this for us...
+#ifeq (,$(findstring nostrip,${DEB_BUILD_OPTIONS}))
+# override INSTALL_PROGRAM += -s
+# endif
+INSTALL_DATA := @INSTALL_DATA@
+# Scripts need to be executable also
+INSTALL_SCRIPT := @INSTALL_SCRIPT@ -m 0755
+
+# AutoConfig generated
+AC_CC := @CC@
+AC_CFLAGS := @CFLAGS@
+AC_DEFS := @CPPFLAGS@ @DEFS@
+AC_LDFLAGS := @LDFLAGS@
+AC_LIBS := @LIBS@
+
+# Define standard compile/install flags (skip if not yet configured)
+DUMMY_CC := $(shell echo '-CC-' | tr '-' '@')
+ifeq ("cc", "${AC_CC}")
+ ifeq ("y", "$(shell test -x /usr/bin/gcc-3.2 && echo 'y' || echo 'n')")
+ AC_CC := gcc-3.2
+ else
+ ifeq ("y", "$(shell test -x /usr/bin/gcc-3.1 && echo 'y' || echo 'n')")
+ AC_CC := gcc-3.1
+ endif
+ endif
+ endif
+ifneq ("${DUMMY_CC}", "${AC_CC}")
+ CC := ${AC_CC}
+ #DEFS := ${AC_DEFS} ${DEFINES}
+ DEFS := ${DEFINES}
+ LDFLAGS := ${AC_LDFLAGS}
+ LIBS := ${AC_LIBS}
+ endif
+ifeq (,${CFLAGS})
+ CFLAGS := -O2 -g -Wall ${DEFS}
+ endif
+# No longer needed, left as an example:
+# Force no optimization for arm - buggy compiler...
+ifeq ("arm", "${DEB_HOST_ARCH}")
+ override CFLAGS := -O0 -Wall
+ endif
+ifneq (,$(findstring noopt,${DEB_BUILD_OPTIONS}))
+ override CFLAGS += -O0
+ endif
diff --git a/debian/build/autoconf.pl.in b/debian/build/autoconf.pl.in
new file mode 100644
index 0000000..96ad3af
--- /dev/null
+++ b/debian/build/autoconf.pl.in
@@ -0,0 +1,39 @@
+#------------------------------------------------------------------------------
+# Autoconf variables - in a form suitable for sh, perl
+# @configure_input@
+#------------------------------------------------------------------------------
+# Variables for, and by, Autoconf (Don't touch these! edit config step)
+my ($PACKAGE_NAME, $PACKAGE_VERSION, $prefix, $exec_prefix, $bindir,
+ $sbindir, $libexecdir, $datadir, $sysconfdir, $sharedstatedir,
+ $localstatedir, $libdir, $includedir, $infodir, $mandir, $docdir,
+ $srcdir, $abs_srcdir, $top_srcdir, $abs_top_srcdir,
+ $builddir, $abs_builddir, $top_builddir, $abs_top_builddir,
+ $VPATH);
+BEGIN {
+ $PACKAGE_NAME = "@PACKAGE_NAME@";
+ $PACKAGE_VERSION = "@PACKAGE_VERSION@";
+ $prefix = "@prefix@";
+ $exec_prefix = "@exec_prefix@";
+ $bindir = "@bindir@";
+ $sbindir = "@sbindir@";
+ $libexecdir = "@libexecdir@";
+ $datadir = "@datadir@";
+ $sysconfdir = "@sysconfdir@";
+ $sharedstatedir = "@sharedstatedir@";
+ $localstatedir = "@localstatedir@";
+ $libdir = "@libdir@";
+ $includedir = "@includedir@";
+ $infodir = "@infodir@";
+ $mandir = "@mandir@";
+ $docdir = "@docdir@";
+ $srcdir = "@srcdir@";
+ $abs_srcdir = "@abs_srcdir@";
+ $top_srcdir = "@top_srcdir@";
+ $abs_top_srcdir = "@abs_top_srcdir@";
+ $builddir = "@builddir@";
+ $abs_builddir = "@abs_builddir@";
+ $top_builddir = "@top_builddir@";
+ $abs_top_builddir = "@abs_top_builddir@";
+ $VPATH = "@srcdir@";
+ };
+
diff --git a/debian/build/autoconf.sh.in b/debian/build/autoconf.sh.in
new file mode 100644
index 0000000..cac3d18
--- /dev/null
+++ b/debian/build/autoconf.sh.in
@@ -0,0 +1,31 @@
+#------------------------------------------------------------------------------
+# Autoconf variables - in a form suitable for sh, perl
+# @configure_input@
+#------------------------------------------------------------------------------
+# Variables for, and by, Autoconf (Don't touch these! edit config step)
+PACKAGE_NAME="@PACKAGE_NAME@";
+PACKAGE_VERSION="@PACKAGE_VERSION@";
+prefix="@prefix@";
+exec_prefix="@exec_prefix@";
+bindir="@bindir@";
+sbindir="@sbindir@";
+libexecdir="@libexecdir@";
+datadir="@datadir@";
+sysconfdir="@sysconfdir@";
+sharedstatedir="@sharedstatedir@";
+localstatedir="@localstatedir@";
+libdir="@libdir@";
+includedir="@includedir@";
+infodir="@infodir@";
+mandir="@mandir@";
+docdir="@docdir@";
+srcdir="@srcdir@";
+abs_srcdir="@abs_srcdir@"
+top_srcdir="@top_srcdir@"
+abs_top_srcdir="@abs_top_srcdir@"
+builddir="@builddir@"
+abs_builddir="@abs_builddir@"
+top_builddir="@top_builddir@"
+abs_top_builddir="@abs_top_builddir@"
+VPATH="@srcdir@"
+
diff --git a/debian/build/changelog.sh.in b/debian/build/changelog.sh.in
new file mode 100644
index 0000000..b05cc16
--- /dev/null
+++ b/debian/build/changelog.sh.in
@@ -0,0 +1,59 @@
+#!/bin/sh -e
+#-----------------------------------------------------------------------------
+# $Sendmail: changelog.sh,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# Debian script to generate changelogs for sendmail @sm_version@@sm_revision@
+#
+# Note: this file supports @SM_MINVERS@ - @SM_MAXVERS@
+#
+#-----------------------------------------------------------------------------
+set -e;
+#
+# Initialization
+PACKAGE='sendmail';
+
+# Create a combined changelog *IFF* we have the pieces/parts...
+if [ -d private/changelogs ]; then
+ echo "Building @PACKAGE_NAME@ @sm_version@@sm_revision@(@sm_version_math@) changelog.";
+ #
+ # Remove old combined changelog
+ rm -f changelog;
+ #
+ # Beta changelogs
+ if [ -f private/changelogs/@sm_version@ ]; then
+ cat private/changelogs/@sm_version@ \
+ >> changelog;
+ #
+ # 8.12 changelogs
+ elif [ @sm_version_math@ -ge 527360 ]; then
+ cat private/changelogs/8.12 >> changelog;
+ #
+ # 8.11 changelogs
+ elif [ @sm_version_math@ -ge 527104 ]; then
+ cat private/changelogs/8.11 >> changelog;
+ #
+ # 8.10 changelogs
+ elif [ @sm_version_math@ -ge 526848 ]; then
+ cat private/changelogs/8.10 >> changelog;
+ #
+ # 8.9 changelogs
+ elif [ @sm_version_math@ -ge 526592 ]; then
+ cat private/changelogs/8.9 >> changelog;
+ #
+ # 8.8 changelogs
+ elif [ @sm_version_math@ -ge 526336 ]; then
+ cat private/changelogs/8.8 >> changelog;
+ #
+ # 8.7 changelogs
+ elif [ @sm_version_math@ -ge 526080 ]; then
+ cat private/changelogs/8.7 >> changelog;
+ fi;
+ #
+ # Variable definitions
+ cat private/changelogs/vars >> changelog;
+ fi;
+
diff --git a/debian/build/control.m4.in b/debian/build/control.m4.in
new file mode 100644
index 0000000..054494a
--- /dev/null
+++ b/debian/build/control.m4.in
@@ -0,0 +1,142 @@
+dnl #--------------------------------------------------------------------------
+dnl # $Sendmail: control.m4,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+dnl #
+dnl # Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+dnl #
+dnl # @configure_input@
+dnl #
+dnl # Debian control.m4 for sendmail @sm_version@@sm_revision@(@sm_version_math@)
+dnl #
+dnl # Note: the .in file supports @SM_MINVERS@ - @SM_MAXVERS@, but the generated
+dnl # file is customized to the version noted above.
+dnl #
+dnl # Note: Exercise care in the feeding of this file, especially wrt quoting!
+dnl #
+dnl #--------------------------------------------------------------------------
+changequote([[, ]])dnl
+dnl #
+dnl # The source description
+dnl # Always built
+dnl #
+[[Source: sendmail
+Priority: extra
+Section: mail
+Maintainer: Richard A Nelson (Rick) <cowboy@debian.org>
+Standards-Version: 3.5.7.0
+Build-Depends-Indep: groff, bsdmainutils
+Build-Depends: m4, patch, debhelper (>= 1.1.17), @sm_badepends@]]
+dnl #
+dnl # The first arch=any package description
+dnl # Always built
+dnl #
+[[
+Package: sendmail
+Architecture: any
+Section: mail
+Replaces: mail-transport-agent, sendmail-tls
+Provides: mail-transport-agent
+Conflicts: mail-transport-agent
+Depends: adduser, m4, ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, @sm_depends@
+Recommends: @sm_recommends@
+Suggests: sendmail-doc (>= ${Source-Version}), mail-reader, procmail | mailagent | maildrop | deliver, make, logcheck, @sm_suggests@
+Description: A powerful, efficient, and scalable Mail Transport Agent
+ Sendmail is an alternative Mail Transport Agent (MTA) for Debian.
+ It is suitable for handling sophisticated mail configurations,
+ although this means that its configuration can also be complex.
+ Fortunately, easy thing can be done easily, and complex things
+ are possible, even if not easily understood ;) Sendmail is the *ONLY*
+ MTA with a Turing complete language to control *ALL* aspects of delivery!
+ .
+ Sendmail provides Security and SPAM/UCE/UBE protection via several means:]]dnl
+ifelse([[@sm_enable_tls@]], [[yes]], [[
+ - STARTTLS(SSL) RFC2487 encryption for mail reception/delivery.
+ - STARTTLS(SSL) authentication (certificate based) for access/relay control.]])dnl
+ifelse([[@sm_enable_auth@]], [[yes]], [[
+ - SMTP AUTH (SASL/PAM) authentication for access/relay control.]])[[
+ - ACCESS database (by IP/host) for access/relay control.
+ - Use of varied Realtime Blackhole Lists (RBL) to prevent access.
+ - Integration of LOGCHECK rules to fine-tune logging.
+ - Inboard POSIX Regular Expression processing of *all* headers.]]dnl
+ifelse([[@sm_enable_milter@]], [[yes]], [[
+ - Ability (via MILTER) to scan/change headers *and* body of *ALL* mail
+ A site may utilize zero, one, or more MILTERs.]])[[
+ - Reduced SUID exposures by running SGID smmsp/mail where possible.
+ .
+ Sendmail provides Performance and Scalability by:
+ - Allowing multiple queues, with the ability to tune both interval and
+ queue runners on a queue by queue basis.
+ - Providing (a Debian exclusive) an easy to configure means of queue-aging
+ to improve throughput by not continually retrying failed deliveries.]]dnl
+ifelse([[@sm_enable_ldap@]], [[yes]], [[
+ - Allowing most all maps/databases to be obtained via LDAP; reducing the
+ number of used databases and simplifying the maintenance of Sendmail.]])[[
+ - Reducing the file I/O where possible by buffering files in memory.
+ .
+ Sendmail provides site enhanced site configuration/customization by:
+ - Allowing the listener (usually port 25) to run as a daemon or via INETD.
+ - Allowing the queue runner (mail delivery) to run as a daemon or via CRON.
+ - Automagically updating configuration and databases on upgrades.
+ - Providing a Turing complete language for site customization of mail
+ handling.]]dnl
+ifelse([[@sm_enable_milter@]], [[yes]],[[
+ - Providing a means (MILTER) for a site to scan/change all email - both
+ incoming and outgoing. A site can write their own MILTER, or may use
+ any of those found on internet. To write your own MILTER, you'll need
+ to install the optional milter-dev package.]])[[
+ - Providing extensive documentation via the sendmail-doc (optional) package.
+ - Providing an inboard Mail Delivery Agent (MDA) (mail.local), but supporting
+ procmail, mailagent, maildrop, or deliver automatically if installed.
+ Sendmail will also deliver to anythings else (cyrus, etc) if asked to.
+ .
+ Sendmail includes *no* Mail User Agents (MUA), you'll have to
+ pick from the plethora of available MUAs (pine, mutt, vm, etc.)
+ .
+ This package supports @sm_databases@ maps,
+ and has enabled @sm_features@.]]dnl
+dnl #
+dnl # The second arch=any package (libmilter-dev)
+dnl # Only built if MILTER is enabled
+dnl #
+ifelse([[@sm_enable_dev@]], [[yes]], dnl
+ifelse([[@sm_enable_milter@]], [[yes]], [[
+
+Package: libmilter-dev
+Architecture: any
+Section: devel
+Suggests: sendmail-doc (>= ${Source-Version})
+Description: Sendmail Mail Filter API (Milter)
+ The Sendmail Mail Filter API (Milter) is designed to allow third-party
+ programs access to mail messages as they are being processed in order
+ to filter meta-information(headers) and content.
+ .
+ The Debian Sendmail package is built to support libmilter.
+ .
+ This is the libmilter static library and include files for development.
+ .
+ The documentation on building a Milter is in the sendmail-doc package.]]))dnl
+dnl #
+dnl # The first (and only) arch=all (sendmail-doc)
+dnl #
+ifelse([[@sm_enable_doc@]], [[yes]], [[
+
+Package: sendmail-doc
+Architecture: all
+Section: doc
+Description: A powerful, efficient, and scalable Mail Transport Agent
+ Sendmail is an alternative Mail Transport Agent (MTA) for
+ Debian. It is suitable for handling sophisticated mail
+ configurations, although this means that its configuration
+ can also be complex.
+ .
+ Because of the complexity, you may find yourself wanting to peruse
+ the documentation files included herein. The main files are:
+ 1) cf.README.gz -- A reference for all things in sendmail.{mc,cf}
+ 2) op.{ps,txt}.gz -- The care and feeding of Sendmail.
+ 3) faq.txt.gz -- Sendmail FAQ, current as of the package date.
+ .
+ Other files include the references for smrsh and libmilter.]])dnl
+dnl #
+dnl # Provide the requisite trailing newline
+dnl #
+
+
diff --git a/debian/build/install-sh b/debian/build/install-sh
new file mode 100644
index 0000000..b41a245
--- /dev/null
+++ b/debian/build/install-sh
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission. M.I.T. makes no representations about the
+# suitability of this software for any purpose. It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+else
+ true
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d $dst ]; then
+ instcmd=:
+ chmodcmd=""
+ else
+ instcmd=$mkdirprog
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f $src -o -d $src ]
+ then
+ true
+ else
+ echo "install: $src does not exist"
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "install: no destination specified"
+ exit 1
+ else
+ true
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d $dst ]
+ then
+ dst="$dst"/`basename $src`
+ else
+ true
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+ '
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp="${pathcomp}${1}"
+ shift
+
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $mkdirprog "${pathcomp}"
+ else
+ true
+ fi
+
+ pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd $dst &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ dstfile=`basename $dst $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ true
+ fi
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd $src $dsttmp &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+
+fi &&
+
+
+exit 0
diff --git a/debian/build/rules.in b/debian/build/rules.in
new file mode 100644
index 0000000..8ee3f6a
--- /dev/null
+++ b/debian/build/rules.in
@@ -0,0 +1,1189 @@
+#!/usr/bin/make -f
+#------------------------------------------------------------------------------
+# vim: syntax=make
+#
+# $Sendmail: rules,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# Rules file for Sendmail @sm_version@@sm_revision@(@sm_version_math@)
+# on @sm_dist_name@ @sm_dist_vers@
+# via Debhelper V@DEBIAN_DH@
+#
+# Note: the .in file supports Sendmail @SM_MINVERS@ - @SM_MAXVERS@
+# on Debian slink, potato, woody, testing, sid, ...
+# but the generated file is customized to the version noted above.
+#
+# The only thing to watch for is to make sure the changelog correctly
+# reflects the appropriate version and distribution!
+#
+# To support private builds:
+# 1) use the environment variables (defaults shown first):
+# CC=gcc|gcc-3.0..........-- choose compiler
+# CFLAGS='-O2 -Wall [-g]'.-- choose compile options
+# DEFINES=''..............-- additional -Dxxx
+# SM_CONF_OPT=''..........-- additional configure options
+# SM_BUILD_OPT=''.........-- additional build options
+# 2) Build the package using your normal setup:
+# A) [fakeroot] debian/rules binary
+# B) debuild -rfakeroot
+# C) dpkg-buildpackage -rfakeroot -uc -us
+#
+# DEB_BUILD_OPTIONS (global Debian package build options)
+# Debian specific, and common across package options
+# noopt - Do *NOT* compile with optimization (force -O0)
+# nostrip - Do *NOT* strip binaries (for debugging)
+#
+#
+# SM_CONF_OPT
+# Additional configure options and/or overrides may be specified thusly:
+# 1) export SM_CONF_OPT='--enable-shm=no'
+# dpkg-buildpackage -rfakeroot -uc -us
+# 2) SM_CONF_OPT='--enable-shm=no' dpkg-buildpackage
+# 3) debuild -e SM_CONF_OPT='--enable-shm=no'
+# etc...
+#
+# SM_BUILD_OPT
+# 1) export SM_BUILD_OPT='notls'
+# dpkg-buildpackage -rfakeroot -uc -us
+# 2) SM_BUILD_OPT='notls' dpkg-buildpackage -rfakeroot -uc -us
+# 3) debuild -e SM_BUILD_OPT='notls' -e CLFAGS='-O3 Wall'
+# etc...
+#
+# Supported options values for SM_BUILD_OPT:
+# notls Disable STARTTLS (OpenSSL) support
+# noauth Disable SMTP AUTH (sasl) support
+# nodev Disable generation of libmilter-dev package
+# nodoc Disable generation of sendmail-doc package
+#
+# This make file uses scripts from the DBS (0.8) package!
+#
+# Richard Nelson <cowboy@debian.org> @sm_date@ @sm_time@ (@sm_utc@)
+#------------------------------------------------------------------------------
+#SHELL := /bin/sh -x
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This is the debhelper compatibility version to use. (we'll set it later)
+#export DH_COMPAT=4
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+# Support separate debian directory
+ifeq (yes, $(shell test -d debian && echo 'yes'))
+ debian_dir := debian
+ pwd_dir := ${PWD}
+else
+ debian_dir := .
+ pwd_dir := ${PWD}/..
+ endif
+
+# Determine build,host architectures (via dpkg-architecture)
+ifeq (, ${DEB_BUILD_ARCH})
+ ifeq (yes, $(shell test -x /usr/bin/dpkg-architecture && echo 'yes'))
+ include ${debian_dir}/scripts/dpkg-arch.mk
+ endif
+ endif
+
+# Check for cross-compilation
+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+ ifneq (, $(DEB_BUILD_GNU_TYPE))
+ endif
+ endif
+
+# will want path info for some things... Like patches/changelogs...
+pwd_string := $(shell expr "${pwd_dir}" : '.*-\([0-9.].*\)')
+ifeq (, $(findstring +,${pwd_string}))
+ pwd_version := ${pwd_string}
+else
+ pwd_version := $(shell expr "${pwd_string}" : '.*+\([0-9.].*\)')
+ endif
+pwd_major := $(shell expr "${pwd_version}" : '\([0-9]*\.[0-9]*\)')
+
+# get package/version information from the changelog
+package := $(shell (cd ${debian_dir}/.. && \
+ dpkg-parsechangelog 2>/dev/null) | awk '/^Source:/ {print $$2}')
+version_string := $(shell (cd ${debian_dir}/.. && \
+ dpkg-parsechangelog 2>/dev/null) | awk '/^Version:/ {print $$2}')
+version_full := $(shell expr "${version_string}" : '\([^-]*\)')
+version_debian := $(shell expr "${version_string}" : '[^-]*\(-.*\)')
+version := ${version_full}
+version_major := $(shell expr "${version_full}" : '\([0-9]*\.[0-9]*\)')
+version_minor := $(shell expr "${version_full}" : '[0-9]*\.[0-9]*\.\(.*\)')
+ifneq (, $(findstring +,${version_minor}))
+ beta_version := $(shell expr "${version_full}" : '.*+\([0-9.].*\)')
+ beta_major := $(shell expr "${beta_version}" : '\([0-9]*\.[0-9]*\)')
+ beta_minor := $(shell expr "${beta_version}" : '[0-9]*\.[0-9]*\.\(.*\)')
+ ifneq (, $(beta_version))
+ version := ${beta_version}
+ version_major := ${beta_major}
+ version_minor := ${beta_minor}
+ endif
+ endif
+
+# Many things depend upon which release (slink, potato, woody, etc.)
+PKG_DIR := ${debian_dir}/${package}
+DATA_DIR := /usr/share
+ifeq (v4, $(shell (cd ${debian_dir}/.. && dh_testversion 4.0.0 2>/dev/null && echo 'v4')))
+ DH_COMPAT := 4
+else
+ ifeq (v3, $(shell (cd ${debian_dir}/.. && dh_testversion 3.0.0 2>/dev/null && echo 'v3')))
+ DH_COMPAT := 3
+ else
+ ifeq (v2, $(shell (cd ${debian_dir}/.. && dh_testversion 2.0.40 2>/dev/null && echo 'v2')))
+ DH_COMPAT := 2
+ else
+ DH_COMPAT := 1
+ PKG_DIR := ${debian_dir}/tmp
+ DATA_DIR := /usr
+ endif
+ endif
+ endif
+export DH_COMPAT
+
+# the dbs rules
+TAR_DIR := ${package}-${version}
+# Handle the case where the changelog is newer that what we're building
+ifneq (yes, $(shell test -e ${debian_dir}/../${TAR_DIR}.tar.gz && echo 'yes'))
+ TAR_DIR := ${package}-${pwd_version}
+ endif
+SOURCE_DIR := build-tree
+BUILD_TREE := ${SOURCE_DIR}/${TAR_DIR}
+PATCH_DIR := ${debian_dir}/patches/${version_major}/${version}
+SCRIPT_DIR := ${debian_dir}/scripts
+STAMP_DIR := ${debian_dir}/build/stampdir
+
+# Include Debian Autoconf settings
+ifeq (yes, $(shell test -e ${debian_dir}/build/autoconf.mk && echo 'yes'))
+ include ${debian_dir}/build/autoconf.mk
+else
+ include ${debian_dir}/build/autoconf.mk.in
+ endif
+
+# these are strictly for my own consuption
+PKG_DOC := ${debian_dir}/${package}-doc${docdir}/${package}-doc
+MAKE_SUBDIRS := examples local sensible_mda
+PACKAGES := sendmail sendmail-doc libmilter-dev
+SM_SUBDIRS := editmap libmilter mail.local mailstats \
+ makemap praliases rmail sendmail smrsh vacation
+#
+# We want delayed interpretation of the options !
+ifeq (yes, $(shell test -x /usr/bin/debuild && echo 'yes'))
+ DEB_BUILD = \
+ SM_CONF_OPT="${SM_CONF_OPT}" \
+ SM_BUILD_OPT="${SM_BUILD_OPT}" \
+ DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
+ debuild -e SM_CONF_OPT -e SM_BUILD_OPT
+else
+ DEB_BUILD = \
+ SM_CONF_OPT="${SM_CONF_OPT}" \
+ SM_BUILD_OPT="${SM_BUILD_OPT}" \
+ DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
+ dpkg-buildpackage
+ endif
+
+# Process build-time options:
+# 1) options from SM_BUILD_OPT (Prior to configure)
+# 2) defaults (Prior to configure)
+ENABLE_INDEP := yes
+ENABLE_ARCH := yes
+ENABLE_LIB := no
+ENABLE_BIN := yes
+ifneq (, $(findstring notls,${SM_BUILD_OPT}))
+ ENABLE_TLS := no
+else
+ ENABLE_TLS := yes
+ endif
+ifneq (, $(findstring noauth,${SM_BUILD_OPT}))
+ ENABLE_AUTH := no
+else
+ ENABLE_AUTH := yes
+ endif
+ifneq (, $(findstring nodev,${SM_BUILD_OPT}))
+ ENABLE_DEV := no
+else
+ ENABLE_DEV := yes
+ endif
+ifneq (, $(findstring nodoc,${SM_BUILD_OPT}))
+ ENABLE_DOC := no
+else
+ ENABLE_DOC := yes
+ endif
+#
+# Summarize above options into -INDEP and -ARCH for this Makefile
+ENABLE_INDEP := ${ENABLE_DOC}
+ifeq (no, ${ENABLE_BIN})
+ ifeq (no, ${ENABLE_LIB})
+ ifeq (no, ${ENABLE_DEV})
+ ENABLE_ARCH := no
+ endif
+ endif
+ endif
+
+all:
+ @echo 'Please specify a real target in the future...';
+ $(MAKE) -f ${debian_dir}/rules \
+ version_string=${pwd_string} \
+ SM_CONF_OPT="${SM_CONF_OPT}" SM_BUILD_OPT="${SM_BUILD_OPT}" \
+ DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
+ binary;
+
+
+#------------------------------------------------------------------------------
+# Rules to maintain the external Debian directory
+#------------------------------------------------------------------------------
+#-------------
+refresh-dbs:
+ @echo 'updating debian/scripts directory...';
+ cp -af /usr/share/dbs/* ${SCRIPT_DIR}/;
+ chmod a-w ${SCRIPT_DIR}/*;
+
+#-------------
+refresh-debian:
+ @dh_testdir;
+ @echo 'updating debian directory ...';
+ sudo $(RM) -r debian;
+ cp -a ../debian ./;
+ sudo $(RM) -r ${SOURCE_DIR} ${STAMP_DIR};
+ rm -f ${debian_dir}/config.status;
+ touch ${debian_dir}/rules;
+ $(MAKE) -f ${debian_dir}/rules \
+ version_string=${pwd_string} \
+ SM_CONF_OPT="${SM_CONF_OPT}" SM_BUILD_OPT="${SM_BUILD_OPT}" \
+ DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
+ debian-setup;
+
+debian-setup:
+ # Force a configure here, using $${PWD} so the changelog, etc.
+ # wind up with the right version numbers
+ rm -f ${debian_dir}/configure ${debian_dir}/config.status;
+ rm -f ${debian_dir}/build/autoconf.mk;
+ $(MAKE) -f ${debian_dir}/rules \
+ version_string=${pwd_string} \
+ SM_CONF_OPT="${SM_CONF_OPT}" SM_BUILD_OPT="${SM_BUILD_OPT}" \
+ DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
+ configure;
+ $(MAKE) -f ${debian_dir}/rules clean-debian;
+
+ # Remove pieces not needed for further building
+ find ${debian_dir}/patches -type d -a ! -name 'patches' \
+ -a ! -name 'contrib' \
+ -a ! -name "${pwd_major}" \
+ -a ! -name "${pwd_version}" \
+ | xargs -r $(RM) -r;
+ $(RM) -r ${debian_dir}/bugs ${debian_dir}/private ${debian_dir}/watch;
+ $(RM) ${debian_dir}/build/acinclude.m4 \
+ ${debian_dir}/build/aclocal.m4 \
+ ${debian_dir}/build/sendmail.m4 \
+ ${debian_dir}/build/ndbm.m4 \
+ ${debian_dir}/config.log ${debian_dir}/config.cache \
+ ${debian_dir}/config.status \
+ ${debian_dir}/build/config.guess ${debian_dir}/build/config.sub;
+ $(RM) -r ${debian_dir}/autom4te.cache;
+ # Fakeout Make to look like current
+ $(RM) ${debian_dir}/configure.ac;
+ echo `date` > ${debian_dir}/configure.ac;
+ touch ${debian_dir}/configure;
+ touch ${debian_dir}/rules;
+
+
+#-------------
+clean-debian:
+ @echo 'cleaning debian directory...';
+ find ${debian_dir} -name '*~' -o -name '\.*\.swp' \
+ | xargs -r rm;
+ $(RM) ${debian_dir}/*.sav;
+ $(RM) ${debian_dir}/config.log ${debian_dir}/config.cache \
+ ${debian_dir}/config.status \
+ ${debian_dir}/build/config.guess.sav \
+ ${debian_dir}/build/config.sub.sav;
+ $(RM) -r ${debian_dir}/autom4te.cache;
+ # can't touch control/changelog/configure -- needed by debuild, etc
+ for file in $$(find ${debian_dir} -type f -name '*\.in' \
+ -a ! -name 'configure.in'); do \
+ $(RM) $$(echo "$$file" | sed -e 's/\.in$$//'); \
+ done;
+ $(RM) ${STAMP_DIR}/autotools ${STAMP_DIR}/configure;
+
+#-------------
+refresh-faq:
+ @echo 'Refreshing FAQ'
+ @chmod u+w ${debian_dir}/faq.txt;
+ (cd ${debian_dir} && wget --passive-ftp --timestamping \
+ --cache=off http://www.sendmail.org/faq/faq.txt;);
+ @chmod a-w ${debian_dir}/faq.txt;
+ @echo 'Refreshing Misc'
+ @chmod u+w ${debian_dir}/cf/feature/rhsbl.m4;
+ (cd ${debian_dir}/cf/feature && wget --passive-ftp --timestamping \
+ --cache=off http://www.rfc-ignorant.org/rhsbl.m4;);
+ @chmod u-w ${debian_dir}/cf/feature/rhsbl.m4;
+
+
+#-------------
+world:
+ # Debian build daemons don't (for the nonce) support build-indep,
+ # so this rule allows *me* to build both arch and indep portions
+ # of sendmail in one go (so I don't forget).
+ @dh_testdir;
+ $(MAKE) -f ${debian_dir}/rules info;
+ time ${DEB_BUILD} -rfakeroot
+
+test:
+ @dh_testdir;
+ $(MAKE) -f ${debian_dir}/rules clean-debian;
+ fakeroot $(MAKE) -f ${debian_dir}/rules clean;
+ $(MAKE) -f ${debian_dir}/rules \
+ ENABLE_TLS=yes ENABLE_DEV=no ENABLE_DOC=no \
+ CFLAGS='-O2 -Wall' DEB_BUILD_OPTIONS='nostrip' configure;
+ #time ${DEB_BUILD} -rfakeroot -d -us -uc;
+ time $(MAKE) -f ${debian_dir}/rules build-arch;
+
+print:
+ @dh_testdir;
+ -(cd ${BUILD_TREE}/.. && \
+ for file in `find . -name 'README'`; do \
+ lpr $$file; \
+ done; );
+ -(cd ${BUILD_TREE}/.. && \
+ lpr */KNOWNBUGS; \
+ lpr */RELEASE_NOTES; \
+ lpr */sendmail/SECURITY; \
+ lpr */sendmail/TUNING; \
+ lpr */sendmail/TRACEFLAGS; \
+ lpr */doc/op/op.ps; \
+ lpr */cf/feature/nullclient.m4; \
+ lpr */cf/feature/msp.m4; \
+ );
+ -(cd ${debian_dir} && \
+ lpr ../../${debian_dir}/configure.ac; \
+ lpr ../../${debian_dir}/build/rules.in; \
+ lpr build/site.config.m4.in; \
+ lpr cf/hack/msp_nullclient.m4; \
+ );
+
+
+#------------------------------------------------------------------------------
+# Misc rules
+#------------------------------------------------------------------------------
+#-------------
+${STAMP_DIR}:
+ mkdir -p ${STAMP_DIR};
+
+
+#------------------------------------------------------------------------------
+# Autoconf rules
+#------------------------------------------------------------------------------
+#-------------
+${debian_dir}/rules: ${debian_dir}/build/rules.in ${debian_dir}/config.status
+ # *** *** *** configure changed ?!? *** *** ***
+ if [ -e ${debian_dir}/config.status ]; then \
+ chmod ug+x ${debian_dir}/config.status; \
+ (cd ${debian_dir} && ./config.status;); \
+ fi;
+
+#-------------
+${debian_dir}/config.status: ${debian_dir}/configure
+ # *** *** *** configure changed ?!? *** *** ***
+ if [ -e ${debian_dir}/config.status ]; then \
+ chmod ug+x ${debian_dir}/config.status; \
+ (cd ${debian_dir} && ./config.status --recheck;) \
+ fi;
+
+#-------------
+${debian_dir}/configure: ${debian_dir}/configure.ac
+ # *** *** *** configure.ac changed ?!? *** *** ***
+ cp -af ${debian_dir}/configure.ac \
+ ${debian_dir}/configure.in;
+ (cd ${debian_dir} && autoconf;);
+ $(RM) ${debian_dir}/configure.in;
+ chmod ug+x ${debian_dir}/configure;
+
+#-------------
+autotools: ${STAMP_DIR} ${STAMP_DIR}/autotools
+${STAMP_DIR}/autotools:
+
+ #Add here commands to setup the autotools environment
+
+ # Make sure we have the latest available config.{guess,sub}
+ # Allow the package to override either by faking the date...
+ if [ -e /usr/share/misc/config.guess -a \
+ -e ${debian_dir}/build/config.guess ]; then \
+ OLDDATEGUESS=`${debian_dir}/build/config.guess -t | tr -d - `; \
+ NEWDATEGUESS=`/usr/share/misc/config.guess -t | tr -d - `; \
+ if [ "$$OLDDATEGUESS" -lt "$$NEWDATEGUESS" ]; then \
+ if [ ! -e ${debian_dir}/build/config.guess.sav ]; then \
+ cp -pf ${debian_dir}/build/config.guess \
+ ${debian_dir}/build/config.guess.sav;\
+ fi; \
+ if [ -e ${debian_dir}/build/config.guess.sav ]; then \
+ cp -pf /usr/share/misc/config.guess \
+ ${debian_dir}/build/config.guess; \
+ fi; \
+ fi; \
+ fi;
+ if [ -e /usr/share/misc/config.sub -a \
+ -e ${debian_dir}/build/config.sub ]; then \
+ OLDDATESUB=`${debian_dir}/build/config.sub -t | tr -d - `; \
+ NEWDATESUB=`/usr/share/misc/config.sub -t | tr -d - `; \
+ if [ "$$OLDDATESUB" -lt "$$NEWDATESUB" ]; then \
+ if [ ! -e ${debian_dir}/build/config.sub.sav ]; then \
+ cp -pf ${debian_dir}/build/config.sub \
+ ${debian_dir}/build/config.sub.sav; \
+ fi; \
+ if [ -e ${debian_dir}/build/config.sub.sav ]; then \
+ cp -pf /usr/share/misc/config.sub \
+ ${debian_dir}/build/config.sub; \
+ fi; \
+ fi; \
+ fi;
+
+ touch ${STAMP_DIR}/autotools;
+
+
+
+#------------------------------------------------------------------------------
+# Build/Package check rules
+#------------------------------------------------------------------------------
+#-------------
+info:
+
+ #--------------------------------------------------------------------
+ # The following information will be used for this run:
+ # Source = ${package} ${pwd_string}
+ # Package = ${package} ${version_string}
+ # Version = ${version_major}.${version_minor}${version_debian}
+ # Arch = ${DEB_BUILD_ARCH} on ${DEB_HOST_ARCH}
+ # Options
+ # config opt = ${SM_CONF_OPT}
+ # build opt = ${SM_BUILD_OPT}
+ # ENABLE_TLS = ${ENABLE_TLS}
+ # ENABLUE_AUTH= ${ENABLE_AUTH}
+ # ENABLE_DEV = ${ENABLE_DEV}
+ # ENABLE_DOC = ${ENABLE_DOC}
+ # compile opt = ${CC} ${CFLAGS} ${DEFINES}
+ # DEB_BUILD_OPTIONS = ${DEB_BUILD_OPTIONS}
+ # DH_VERBOSE = ${DH_VERBOSE}
+ # DH_OPTIONS = ${DH_OPTIONS}
+ # DH_COMPAT = ${DH_COMPAT}
+ #--------------------------------------------------------------------
+
+#-------------
+buildinfo:
+ @echo '';
+ @dpkg -l \
+ debhelper \
+ dpkg-dev \
+ gcc \
+ 'libc6*' \
+ binutils \
+ ldso \
+ make \
+ m4 \
+ libdb3 libdb3-dev \
+ libdb2 libdb2-dev \
+ libwrap0 libwrap0-dev \
+ libldap2 libldap2-dev \
+ libopenldap1 libopenldap-dev \
+ umich-libldap umich-libldap-dev \
+ libsasl7 libsasl-dev \
+ openssl libssl-dev 'libssl0*' \
+ ${BUILD_INFO} \
+ 2> /dev/null \
+ | awk '$$1 == "ii" { printf("%s-%s\n", $$2, $$3) }' \
+ | tee ${debian_dir}/${package}.buildinfo.Debian;
+ @echo '';
+ @chmod 644 ${debian_dir}/${package}.buildinfo.Debian;
+
+#-------------
+pristine:
+ @dh_testdir;
+ #$(MAKE) -f ${debian_dir}/rules info;
+ #
+ # Fail if there are any modifications to the original
+ # tarball, other than the debian directory
+ if [ -f ../${package}_${version_string}.diff.gz ]; then \
+ zgrep -e "^\+\+\+ " ../${package}_${version_string}.diff.gz \
+ | sed -e "/^\+\+\+ ${package}-${version}\/debian\/.*$$/d" - \
+ | sed -e "/^+\+\+ ${package}-${version}\/upstream\/patches\/.*$$/d" - \
+ | [ ! -z - ]; \
+ fi;
+
+ # Check for presence of TLS (crypto) enablement and bitch if found
+ @if (grep -qEe '^#TLS:[[:space:]]*yes' \
+ ${debian_dir}/build/site.config.m4); then \
+ echo '** ** --------------------------------------------------- ** **';\
+ echo '** ** This package contains crypto support ! Be careful ! ** **';\
+ echo '** ** --------------------------------------------------- ** **';\
+ fi;
+
+#-------------
+verify:
+ @dh_testdir;
+ # Verifying the md5 summs and signed files
+ @for file in $$(find . -maxdepth 1 -name '*.md5'); do \
+ echo "Checking MD5 source: $$file."; \
+ cat $$file; \
+ md5sum -c $$file; \
+ done;
+ @for file in $$(find . -maxdepth 1 -name '*.sig'); do \
+ echo "Checking signature file $$file."; \
+ part=$$(echo "$$file" | sed -e 's/\.sig$$//'); \
+ if [ -f $$part ]; then \
+ gpg --verify $$part.sig $$part || true; \
+ elif [ -f $$part.gz ]; then \
+ gunzip -c $$part.gz > $$part; \
+ gpg --verify $$part.sig $$part || true; \
+ rm $$part; \
+ fi; \
+ done;
+
+
+#------------------------------------------------------------------------------
+# User callable rules
+#------------------------------------------------------------------------------
+#-------------
+clean:
+ dh_testdir;
+ dh_testroot;
+
+ # Add here commands to clean up after the build process.
+ #-$(MAKE) clean;
+ #-$(MAKE) distclean;
+
+ # First, remove any patches, and source directories
+ #$(MAKE) -f ${debian_dir}/sys-build.mk source.clean;
+
+ # Debian stuff
+ $(RM) -r ${SOURCE_DIR} ${STAMP_DIR};
+ $(RM) ${debian_dir}/*.buildinfo.Debian;
+ for file in tmp ${PACKAGES};do \
+ $(RM) -r ${debian_dir}/$$file; \
+ done;
+
+ # Local stuff
+ for subdir in ${MAKE_SUBDIRS}; do \
+ (cd ${debian_dir}/$$subdir && $(MAKE) -f Makefile.in clean;); \
+ done;
+
+ifeq (3, $(shell test ${DH_COMPAT} -ge 3 && echo '3'))
+ # Debhelper V3 conffile handling - prevent duplicates
+ for file in $$(find ${debian_dir} -maxdepth 1 -type f \
+ -name '*\.conffiles\.sav'); do \
+ mv $$file $$(echo "$$file" | sed -e 's?\.sav$$??'); \
+ done;
+endif
+
+ # can't touch control/changelog/configure -- needed by debuild, etc
+ $(RM) ${debian_dir}/config.log ${debian_dir}/config.cache \
+ ${debian_dir}/config.status;
+ $(RM) -r ${debian_dir}/autom4te.cache
+ for file in $$(find ${debian_dir} -type f -name '*\.in' \
+ -a ! -name 'configure.in'); do \
+ $(RM) $$(echo "$$file" | sed -e 's/\.in$$//'); \
+ done;
+
+ # Restore pre-existing config.{guess,sub}
+ -if [ -e ${debian_dir}/buil/config.sub.sav ]; then \
+ cp -pf ${debian_dir}/build/config.sub.sav \
+ ${debian_dir}/build/config.sub \
+ && $(RM) ${debian_dir}/build/config.sub.sav; \
+ fi;
+ -if [ -e ${debian_dir}/build/config.guess.sav ]; then \
+ cp -pf ${debian_dir}/build/config.guess.sav \
+ ${debian_dir}/build/config.guess \
+ && $(RM) ${debian_dir}/build/config.guess.sav; \
+ fi;
+
+ # Cleanup after build (for pristine source, smaller diffs)
+ #find .. -name ${package}*.asc -size 0 -maxdepth 1 -exec rm {} ';';
+ dh_clean;
+
+
+#-------------
+setup: ${STAMP_DIR}/setup
+${STAMP_DIR}/setup:
+
+# Support separate debian directory
+ifeq (yes, $(shell test -d debian && echo 'yes'))
+ dh_testdir;
+
+ # unpack and patch source
+ $(MAKE) -f ${SCRIPT_DIR}/dbs-build.mk \
+ BUILD_TREE="${BUILD_TREE}" TAR_DIR="${TAR_DIR}" \
+ STAMP_DIR="${STAMP_DIR}" PATCH_DIR="${PATCH_DIR}" \
+ SCRIPT_DIR="${SCRIPT_DIR}" \
+ ${STAMP_DIR}/unpack ${STAMP_DIR}/patch;
+
+ touch ${STAMP_DIR}/setup;
+endif
+
+
+#-------------
+configure: ${STAMP_DIR}/configure
+${STAMP_DIR}/configure: ${STAMP_DIR}/setup ${STAMP_DIR}/autotools
+
+ $(MAKE) -f ${debian_dir}/rules info;
+
+ #Add here commands to configure the package.
+ #./configure --prefix=/usr
+
+ # Use autoconf to handle varying degrees of library support
+ # NOTE: options values are Yes/No/Auto, but auto isn't always
+ # used herein, as it can cause problems to be ignored
+ # so it is only used on items of lesser importance
+ chmod ug+x ${debian_dir}/configure;
+ (cd ${debian_dir} && \
+ ./configure \
+ --build=${DEB_BUILD_GNU_TYPE} \
+ --host=${DEB_HOST_GNU_TYPE} \
+ --prefix=/usr \
+ --libexecdir=/usr/lib/sm.bin \
+ --datadir=${DATA_DIR} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=${DATA_DIR}/info \
+ --mandir=${DATA_DIR}/man \
+ --srcdir=${pwd_dir}/debian \
+ --with-buildtree=${BUILD_TREE} \
+ --with-docdir=${DATA_DIR}/doc \
+ --with-revision=${version_debian} \
+ --enable-regex=auto \
+ --enable-ndbm=no \
+ --enable-newdb=yes \
+ --enable-nis=auto \
+ --enable-nisplus=auto \
+ --enable-ldap=yes \
+ --enable-hesiod=no \
+ --enable-tcpd=auto \
+ --enable-bind=no \
+ --enable-ipv6=auto \
+ --enable-maillock=yes \
+ --enable-auth=${ENABLE_AUTH} \
+ --enable-tls=${ENABLE_TLS} \
+ --enable-shm=auto \
+ --enable-doc=${ENABLE_DOC} \
+ --enable-dev=${ENABLE_DEV} \
+ ${SM_CONF_OPT} \
+ ;);
+ # CC="${CC}" CFLAGS="${CFLAGS}
+
+ifeq (3, $(shell test ${DH_COMPAT} -ge 3 && echo '3'))
+ # Debhelper V3 conffile handling - prevent duplicates
+ for file in $$(find ${debian_dir} -maxdepth 1 -type f \
+ -name '*.conffiles'); do \
+ mv $$file $$file.sav; \
+ done;
+endif
+
+ touch ${STAMP_DIR}/configure;
+
+
+#-------------
+build-indep: ${STAMP_DIR}/build-indep
+${STAMP_DIR}/build-indep: ${STAMP_DIR}/configure
+
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_INDEP})
+ dh_testdir;
+
+ # Document what we're building against
+ $(MAKE) -f ${debian_dir}/rules buildinfo;
+
+ # Add here commands to build/compile the documentation/package.
+ #$(MAKE) doc;
+
+ # Only valid on newer (8.11+) Sendmails
+ #(cd ${BUILD_TREE}/doc/op/ && make op.txt);
+ # So we'll do it by hand...
+ $(RM) ${BUILD_TREE}/doc/op/op.txt;
+ pic -C ${BUILD_TREE}/doc/op/op.me | eqn -C -Tascii \
+ | GROFF_NO_SGR=1 groff -Tascii -me | ul -t dumb > ${BUILD_TREE}/doc/op/op.txt;
+
+ # Debian stuff
+ for subdir in ${MAKE_SUBDIRS}; do \
+ (cd ${debian_dir}/$$subdir && $(MAKE) build-indep;); \
+ done;
+endif
+
+ touch ${STAMP_DIR}/build-indep;
+
+
+#-------------
+build-arch: ${STAMP_DIR}/build-arch
+${STAMP_DIR}/build-arch: ${STAMP_DIR}/configure
+
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_ARCH})
+ dh_testdir;
+
+ # Document what we're building against
+ $(MAKE) -f ${debian_dir}/rules buildinfo;
+
+ # Add here commands to compile the package.
+ #$(MAKE);
+
+ # Place our m4 configuration files for the sendmail build to use
+ if [ -d ${BUILD_TREE}/devtools/Site ]; then \
+ cp -f ${debian_dir}/build/site.config.m4 ${BUILD_TREE}/devtools/Site/; \
+ fi;
+
+ # Correct some paths in upstream man pages
+ sed -e "s?/usr/adm/sm.bin?${sysconfdir}/mail/smrsh?g" \
+ -e "s?sm.bin?${sysconfdir}/mail/smrsh?g" \
+ ${BUILD_TREE}/smrsh/smrsh.8 \
+ > ${BUILD_TREE}/smrsh/smrsh.8.new;
+ mv ${BUILD_TREE}/smrsh/smrsh.8.new ${BUILD_TREE}/smrsh/smrsh.8;
+ sed -e "s?/etc/mail/statistics?${localstatedir}/lib/sendmail/sendmail.st?g"\
+ ${BUILD_TREE}/sendmail/sendmail.8 \
+ > ${BUILD_TREE}/sendmail/sendmail.8.new;
+ mv ${BUILD_TREE}/sendmail/sendmail.8.new \
+ ${BUILD_TREE}/sendmail/sendmail.8;
+
+ # Finally, build the whole enchilada (we'll let sendmail figure
+ # which, if any of the dependant libraries each component needs)
+ for subdir in ${SM_SUBDIRS}; do \
+ if [ -d ${BUILD_TREE}/$${subdir} ]; then \
+ (cd ${BUILD_TREE}/$${subdir} && ./Build -S;); \
+ fi; \
+ done;
+
+ # Remove our config m4 files
+ $(RM) ${BUILD_TREE}/devtools/Site/site.config.m4;
+
+ # Debian stuff
+ for subdir in ${MAKE_SUBDIRS}; do \
+ (cd ${debian_dir}/$$subdir && $(MAKE) build-arch;); \
+ done;
+endif
+
+ touch ${STAMP_DIR}/build-arch;
+
+
+#-------------
+install-indep: ${STAMP_DIR}/install-indep
+${STAMP_DIR}/install-indep: DH_OPTIONS=-i
+${STAMP_DIR}/install-indep: ${STAMP_DIR}/build-indep
+
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_INDEP})
+ dh_testdir;
+ dh_testroot;
+ dh_clean -k;
+ dh_installdirs;
+ if [ -x /usr/bin/dh_link ]; then dh_link; fi;
+
+ # Add here commands to install the documentation/package.
+ #$(MAKE) prefix=`pwd`/${PKG_DIR}/usr install;
+
+ # sendmail operations guide and other documentation
+ $(INSTALL_DATA) ${BUILD_TREE}/doc/op/op.ps ${PKG_DOC}/op;
+ $(INSTALL_DATA) ${BUILD_TREE}/doc/op/op.txt ${PKG_DOC}/op;
+ $(INSTALL_DATA) ${BUILD_TREE}/README ${PKG_DOC}/;
+ $(INSTALL_DATA) ${BUILD_TREE}/KNOWNBUGS ${PKG_DOC}/;
+ $(INSTALL_DATA) ${BUILD_TREE}/cf/README ${PKG_DOC}/cf.README;
+ $(INSTALL_DATA) debian/README.Debian.sendmail \
+ ${PKG_DOC}/sendmail/README.Debian;
+ $(INSTALL_DATA) ${BUILD_TREE}/sendmail/README \
+ ${PKG_DOC}/sendmail/;
+ if [ -f ${BUILD_TREE}/sendmail/SECURITY ]; then \
+ $(INSTALL_DATA) ${BUILD_TREE}/sendmail/SECURITY \
+ ${PKG_DOC}/sendmail/SECURITY; \
+ fi;
+ $(INSTALL_DATA) ${BUILD_TREE}/sendmail/TRACEFLAGS \
+ ${PKG_DOC}/sendmail/TRACEFLAGS;
+ if [ -f ${BUILD_TREE}/sendmail/TUNING ]; then \
+ $(INSTALL_DATA) ${BUILD_TREE}/sendmail/TUNING \
+ ${PKG_DOC}/sendmail/TUNING; \
+ fi;
+ sed -e "s?/usr/libexec?${libexecdir}?g" \
+ -e "s?/usr/ucb/vacation?${libexecdir}/vacation.sendmail?g" \
+ -e "s?/usr/adm/sm.bin?/etc/mail/smrsh?g" \
+ ${BUILD_TREE}/smrsh/README \
+ > ${PKG_DOC}/smrsh.README;
+ $(INSTALL_DATA) debian/faq.txt ${PKG_DOC}/;
+
+ # libmilter-dev package
+ if [ -d ${BUILD_TREE}/libmilter ]; then \
+ $(INSTALL_DATA) debian/README.Debian.libmilter-dev \
+ ${PKG_DOC}/libmilter/README.Debian; \
+ $(INSTALL_DATA) ${BUILD_TREE}/libmilter/README \
+ ${PKG_DOC}/libmilter/README; \
+ if [ -d ${BUILD_TREE}/libmilter/docs ]; then \
+ cp -a ${BUILD_TREE}/libmilter/docs/* \
+ ${PKG_DOC}/libmilter/html; \
+ fi; \
+ fi;
+
+ # Debian stuff
+ for subdir in ${MAKE_SUBDIRS}; do \
+ (cd ${debian_dir}/$$subdir && \
+ $(MAKE) install-indep \
+ DESTDIR="../../${PKG_DOC}";); \
+ done;
+
+ # Multiple package fixup
+ #dh_movefiles -i --sourcedir debian/${package};
+
+ # Actions from binary-common
+ #
+ dh_fixperms;
+ #
+ # Cleanup misc permissions, etc... (fakeroot, dh_fixperms, etc.)
+endif
+
+ touch ${STAMP_DIR}/install-indep;
+
+
+#-------------
+install-arch: ${STAMP_DIR}/install-arch
+${STAMP_DIR}/install-arch: DH_OPTIONS=-a
+${STAMP_DIR}/install-arch: ${STAMP_DIR}/build-arch
+
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_ARCH})
+ dh_testdir;
+ dh_testroot;
+ dh_clean -k;
+ dh_installdirs;
+ if [ -x /usr/bin/dh_link ]; then dh_link; fi;
+
+ # Add here commands to install the package into ${PKG_DIR}.
+ #$(MAKE) prefix=`pwd`/${PKG_DIR}/usr install;
+
+ # sendmail install proper... with a little help ;-}
+ #$(MAKE) install DESTDIR="$${pwd}/${PKG_DIR}";
+
+ # Finally, install the whole enchilada
+ for subdir in ${SM_SUBDIRS}; do \
+ if [ -d ${BUILD_TREE}/$${subdir} ]; then \
+ if [ "$${subdir}" = 'libmilter' ]; then \
+ :; \
+ elif [ "$${subdir}" = 'mail.local' -o \
+ "$${subdir}" = 'rmail' ]; then \
+ (cd ${BUILD_TREE}/obj*/$${subdir} && \
+ $(MAKE) force-install \
+ DESTDIR="../../../../${PKG_DIR}";); \
+ else \
+ (cd ${BUILD_TREE}/obj*/$${subdir} && \
+ $(MAKE) install \
+ DESTDIR="../../../../${PKG_DIR}";); \
+ fi; \
+ fi; \
+ done;
+ # Support older Sendmail (below 8.10.0)
+ if [ -f ${PKG_DIR}${sysconfdir}/mail/sendmail.hf ]; then \
+ mv -f ${PKG_DIR}${sysconfdir}/mail/sendmail.hf \
+ ${PKG_DIR}${sysconfdir}/mail/helpfile; \
+ $(RM) ${PKG_DIR}${localstatedir}/lib/sendmail/sendmail.st; \
+ fi;
+
+ # FHS says that rmail belongs in ${sbindir}
+ mv ${PKG_DIR}${bindir}/rmail ${PKG_DIR}${sbindir}/rmail;
+
+ # Sendmail alias handling...
+ # NOTE: whilst smptd is a valid alias for sendmail, we don't create
+ # one so that we can co-exists with smtpd (a firewall frontend)
+ # NOTE: newscache package also contains ${sbindir}/hoststat
+ # NOTE: newalias, purgestat, etc. aren't for the general user..
+ # yeah, yeah, I know... these can be done with -b<flag>!
+ (cd ${PKG_DIR}${bindir} && \
+ $(RM) hoststat mailq newaliases purgestat smtpd;)
+ ln -sf ../sbin/sendmail ${PKG_DIR}${libdir}/sendmail;
+ (cd ${PKG_DIR}${sbindir} && for file in \
+ newaliases hoststat purgestat \
+ ; do \
+ ln -sf sendmail $$file; \
+ done;);
+ # Handle man pages for these aliases
+ (cd ${PKG_DIR}${mandir}/man8 && for file in \
+ hoststat.8.gz purgestat.8.gz \
+ ; do \
+ ln -sf sendmail.8.gz $$file; \
+ done;);
+ # Place those removed aliases in ${libexecdir} (mostly for me)
+ (cd ${PKG_DIR}${libexecdir} && for file in \
+ hoststat mailq newaliases purgestat smtpd; do \
+ ln -sf ../../sbin/sendmail $$file; \
+ done;);
+ # NOTE: with the MSP/MTA split, we'll provide our own mailstats (keep orig)
+ mv ${PKG_DIR}${sbindir}/mailstats \
+ ${PKG_DIR}${libexecdir}/mailstats;
+ # Special handling of vacation - Debian has a seperate package
+ # with a different version (sigh) keep our copy just in case...
+ if [ -d ${BUILD_TREE}/vacation ]; then \
+ mv ${PKG_DIR}${bindir}/vacation \
+ ${PKG_DIR}${libexecdir}/vacation.sendmail; \
+ mv ${PKG_DIR}${mandir}/man1/vacation.1 \
+ ${PKG_DIR}${mandir}/man1/vacation.sendmail.1; \
+ fi;
+ # m4 configuration directories
+ cp -a ${BUILD_TREE}/cf/* ${PKG_DIR}${datadir}/sendmail/cf;
+ $(RM) ${PKG_DIR}${datadir}/sendmail/cf/README;
+ $(RM) ${PKG_DIR}${datadir}/sendmail/cf/sendmail.schema;
+ $(RM) ${PKG_DIR}${datadir}/sendmail/cf/cf/Build;
+ $(RM) ${PKG_DIR}${datadir}/sendmail/cf/cf/Makefile;
+ $(RM) ${PKG_DIR}${datadir}/sendmail/cf/cf/*.cf;
+
+ # contributed stuff - scripts
+ sed -e 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ -e "s?/etc/sendmail.cf?${sysconfdir}/mail/sendmail.cf?g" \
+ ${BUILD_TREE}/contrib/etrn.pl \
+ > ${PKG_DIR}${sbindir}/etrn;
+ chmod 0755 ${PKG_DIR}${sbindir}/etrn;
+ if [ -f ${BUILD_TREE}/contrib/etrn.0 ]; then \
+ sed 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/etrn.0 \
+ > ${PKG_DIR}${mandir}/man8/etrn.8; \
+ else \
+ sed 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/etrn.pl \
+ > ${PKG_DIR}${mandir}/man8/etrn.8; \
+ fi;
+ sed -e 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/expn.pl \
+ > ${PKG_DIR}${bindir}/expn;
+ chmod 0755 ${PKG_DIR}${bindir}/expn;
+ sed 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/expn.pl \
+ > ${PKG_DIR}${mandir}/man8/expn.8;
+ sed -e "s?/etc/sendmail.cf?${sysconfdir}/mail/sendmail.cf?g" \
+ debian/checksendmail/checksendmail.perl \
+ > ${PKG_DIR}${sbindir}/checksendmail;
+ chmod 0755 ${PKG_DIR}${sbindir}/checksendmail;
+ $(INSTALL_DATA) debian/checksendmail/checksendmail.8 \
+ ${PKG_DIR}${mandir}/man8/;
+ sed -e 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ -e 's?/usr/sbin/sendmail -q30m -bd?/etc/init.d/sendmail start?g' \
+ ${BUILD_TREE}/contrib/smcontrol.pl \
+ > ${PKG_DIR}${datadir}/sendmail/smcontrol.pl;
+ chmod 0755 ${PKG_DIR}${datadir}/sendmail/smcontrol.pl;
+ $(INSTALL_SCRIPT) ${BUILD_TREE}/contrib/doublebounce.pl \
+ ${PKG_DIR}${datadir}/sendmail;
+ if [ -f ${BUILD_TREE}/contrib/qtool.pl ]; then \
+ sed -e 's?/usr/bin/env perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/qtool.pl \
+ > ${PKG_DIR}${datadir}/sendmail/qtool.pl; \
+ chmod 0755 ${PKG_DIR}${datadir}/sendmail/qtool.pl; \
+ $(INSTALL_DATA) ${BUILD_TREE}/contrib/qtool.8 \
+ ${PKG_DIR}${mandir}/man8/; \
+ fi;
+ if [ -f ${BUILD_TREE}/contrib/buildvirtuser ]; then \
+ $(INSTALL_SCRIPT) ${BUILD_TREE}/contrib/buildvirtuser \
+ ${PKG_DIR}${datadir}/sendmail/; \
+ fi;
+
+ # contributed stuff - examples
+ sed 's?/bin/perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/passwd-to-alias.pl \
+ > ${PKG_DIR}${datadir}/sendmail/examples/passwd-to-alias;
+ chmod 0755 ${PKG_DIR}${datadir}/sendmail/examples/passwd-to-alias;
+
+ # contributed stuff - m4 scripts
+ if [ -f ${BUILD_TREE}/contrib/domainmap.m4 ]; then \
+ $(INSTALL_DATA) ${BUILD_TREE}/contrib/domainmap.m4 \
+ ${PKG_DIR}${datadir}/sendmail/cf/feature; \
+ fi;
+ if [ -f ${BUILD_TREE}/contrib/dnsblaccess.m4 ]; then \
+ $(INSTALL_DATA) ${BUILD_TREE}/contrib/dnsblaccess.m4 \
+ ${PKG_DIR}${datadir}/sendmail/cf/hack; \
+ fi;
+
+ # Debian stuff
+ for subdir in ${MAKE_SUBDIRS}; do \
+ (cd ${debian_dir}/$$subdir && \
+ $(MAKE) install-arch \
+ DESTDIR="../../${PKG_DIR}";); \
+ done;
+ # Debian stuff - m4 scripts
+ (cd debian && \
+ for file in $$(find cf -type f -name '*.m4' -o -name '*.mc'); do \
+ $(INSTALL_DATA) $$file \
+ ../${PKG_DIR}${datadir}/sendmail/$$file; \
+ done;);
+ # Debian stuff - examples
+ $(INSTALL_DATA) debian/checksendmail/address.resolve \
+ ${PKG_DIR}${datadir}/sendmail/examples/;
+
+ # libmilter-dev package
+ifeq (yes, ${ENABLE_DEV})
+ if [ -d ${BUILD_TREE}/libmilter ]; then \
+ (cd ${BUILD_TREE}/obj*/libmilter && \
+ $(MAKE) install \
+ DESTDIR="../../../../debian/libmilter-dev";); \
+ $(INSTALL_PROGRAM) ${BUILD_TREE}/obj.*/libmilter/libmilter.a \
+ debian/libmilter-dev${libdir}/libmilter/; \
+ $(INSTALL_DATA) ${BUILD_TREE}/include/libmilter/mfapi.h \
+ debian/libmilter-dev${includedir}/libmilter/; \
+ if [ -f ${BUILD_TREE}/include/libmilter/mfdef.h ]; then \
+ $(INSTALL_DATA) ${BUILD_TREE}/include/libmilter/mfdef.h \
+ debian/libmilter-dev${includedir}/libmilter/; \
+ fi; \
+ $(INSTALL_PROGRAM) ${BUILD_TREE}/obj.*/libsmutil/libsmutil.a \
+ debian/libmilter-dev${libdir}/libmilter/; \
+ if [ -d ${BUILD_TREE}/libsm ]; then \
+ $(INSTALL_PROGRAM) ${BUILD_TREE}/obj.*/libsm/libsm.a \
+ debian/libmilter-dev${libdir}/libmilter/; \
+ fi; \
+ fi;
+endif
+
+ # Multiple package fixup
+ #dh_movefiles -a --sourcedir debian/${package};
+
+ # Actions from binary-common
+ #dh_installcron;
+ $(INSTALL_SCRIPT) debian/${package}.cron.daily \
+ ${PKG_DIR}${sysconfdir}/cron.daily/sendmail;
+ #dh_installlogrotate;
+ #$(INSTALL_DATA) debian/${package}.logrotate \
+ # ${PKG_DIR}${sysconfdir}/logrotate.d/sendmail;
+ #
+ dh_fixperms;
+ #
+ # Cleanup misc permissions, etc... (fakeroot, dh_fixperms, etc.)
+ chmod a+x ${PKG_DIR}${datadir}/sendmail/cf/sh/makeinfo.sh;
+ chown root:root ${PKG_DIR}${sysconfdir}/mail/helpfile;
+ chown root:root ${PKG_DIR}${sysconfdir}/mail/peers/provider;
+ chown root:root ${PKG_DIR}${sysconfdir}/mail/service.switch*;
+ #
+ # You may want to make some executables suid here.
+ chown root:mail ${PKG_DIR}${sbindir}/sendmail;
+ chmod 04755 ${PKG_DIR}${sbindir}/sendmail;
+ chown root:mail ${PKG_DIR}${libexecdir}/mailstats;
+ chmod 02755 ${PKG_DIR}${libexecdir}/mailstats;
+ chown root:mail ${PKG_DIR}${libexecdir}/mail.local;
+ chmod 0755 ${PKG_DIR}${libexecdir}/mail.local;
+ chown root:mail ${PKG_DIR}${libexecdir}/smrsh;
+ chmod 0755 ${PKG_DIR}${libexecdir}/smrsh;
+ chown root:mail ${PKG_DIR}${libexecdir}/sensible-mda;
+ chmod 0755 ${PKG_DIR}${libexecdir}/sensible-mda;
+
+ # Special case Perl for Debian Slink (2.1), debhelper v1
+ if [ ! -x /usr/bin/dh_perl ]; then \
+ echo 'perl:Depends=perl5|perl' >> debian/substvars; fi;
+
+ # Install Lintian overrides
+ $(INSTALL_DATA) -d -g root -m 755 ${PKG_DIR}${datadir}/lintian/overrides
+ $(INSTALL_DATA) -g root -m 644 debian/${package}.lintian-overrides \
+ ${PKG_DIR}${datadir}/lintian/overrides/${package}
+endif
+
+ touch ${STAMP_DIR}/install-arch;
+
+
+#-------------
+# This single target is used to build all the packages, all at once, or
+# one at a time. So keep in mind: any options passed to commands here will
+# affect _all_ packages. Anything you want to only affect one package
+# should be put in another target, such as the install target.
+#
+# Must not depend on anything. This is to be called by
+# binary-arch/binary-indep in another 'make' thread.
+binary-common:
+ # Need this version of debhelper for DH_OPTIONS to work.
+ dh_testversion 1.1.17;
+ dh_testdir;
+ dh_testroot;
+ # Done in install-xxx, but still need to get rid of *.debhelper !!!
+ #dh_clean -k;
+ $(RM) debian/*.debhelper;
+
+ dh_installchangelogs -k ${BUILD_TREE}/RELEASE_NOTES;
+ #-------- needs script name ala installinit ----
+ # Done in install-xxx
+ #dh_installcron;
+ if [ -x /usr/bin/dh_installdebconf ]; then dh_installdebconf; fi;
+ dh_installdocs;
+ #dh_installemacsen;
+ #dh_installexamples;
+ #if [ -x /usr/bin/dh_installinfo ]; then dh_installinfo; fi;
+ dh_installinit --init-script=sendmail;
+ #-------- needs script name ala installinit ----
+ # Done in install-xxx
+ #if [ -x /usr/bin/dh_installlogrotate ]; then dh_installlogrotate; fi;
+ if [ -x /usr/bin/dh_installman ]; then dh_installman; fi;
+ #dh_installmenu;
+ #dh_installmime;
+ #dh_undocumented;
+ if [ -x /usr/bin/dh_installpam ]; then dh_installpam; fi;
+ # Done in install-xxx
+ #if [ -x /usr/bin/dh_link ]; then dh_link; fi;
+ifeq (, $(findstring nostrip,${DEB_BUILD_OPTIONS}))
+ dh_strip;
+else
+ #dh_strip;
+endif
+ dh_compress;
+ # Done in install-xxx
+ #dh_fixperms;
+ # Need to special case this now that we're using dynamic uid/gid
+ #if [ -x /usr/sbin/suidregister -a -s /etc/suid.conf ]; then
+ # dh_suidregister; fi;
+ #
+ # Cleanup misc permissions, etc... (fakeroot, dh_fixperms, etc.)
+ # Done in install-xxx
+ #
+ # You may want to make some executables suid here.
+ # Done in install-xxx
+ #
+ #dh_makeshlibs;
+ dh_installdeb;
+ dh_shlibdeps;
+ if [ -x /usr/bin/dh_perl ]; then dh_perl; fi
+ dh_gencontrol;
+ dh_md5sums;
+ dh_builddeb;
+
+ $(MAKE) -f ${debian_dir}/rules pristine;
+
+
+#-------------
+# Build architecture independant packages using the common target.
+# (Uncomment this next line if you have such packages.)
+binary-indep: ${STAMP_DIR}/build-indep ${STAMP_DIR}/install-indep
+
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_INDEP})
+ $(MAKE) -f ${debian_dir}/rules DH_OPTIONS=-i binary-common;
+endif
+
+
+#-------------
+# Build architecture dependant packages using the common target.
+binary-arch: ${STAMP_DIR}/build-arch ${STAMP_DIR}/install-arch
+
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_ARCH})
+ $(MAKE) -f ${debian_dir}/rules DH_OPTIONS=-a binary-common;
+endif
+
+
+#-------------
+# Any other binary targets build just one binary package at a time.
+binary-%:
+ $(MAKE) -f ${debian_dir}/rules binary-common DH_OPTIONS=-p$*;
+
+
+#-------------
+# Below here is fairly generic really
+
+source diff:
+ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+# Due to buildd not (for the nonce) supporting build-arch, kluge next rule
+build: build-arch
+install: install-indep install-arch
+binary: binary-indep binary-arch
+.PHONY: refresh-dbs refresh-debian update-debian refresh-faq
+.PHONY: pristine
+.PHONY: info buildinfo
+.PHONY: setup autotools configure
+.PHONY: clean build build-indep build-arch
+.PHONY: install install-indep install-arch
+.PHONY: binary binary-indep binary-arch
+.SUFFIXES:
+.PRECIOUS: ${debian_dir}/rules
diff --git a/debian/build/site.config.m4.in b/debian/build/site.config.m4.in
new file mode 100644
index 0000000..e07df3b
--- /dev/null
+++ b/debian/build/site.config.m4.in
@@ -0,0 +1,235 @@
+#-----------------------------------------------------------------------------
+# $Sendmail: site.config.m4,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# Debian site.config.m4 for sendmail @sm_version@@sm_revision@(@sm_version_math@)
+#
+# Note: the .in file supports @SM_MINVERS@ - @SM_MAXVERS@, but the generated
+# file is customized to the version noted above.
+#
+#-----------------------------------------------------------------------------
+#
+#------------------------------------------------------------------
+# Sendmail @sm_version@@sm_revision@(@sm_version_math@) on @sm_date@ at @sm_time@ (@sm_utc@)
+#------------------------------------------------------------------
+#
+#------------------------------------------------------------------
+# The following sendmail features are included
+#------------------------------------------------------------------
+#REGEX: @sm_enable_regex@
+#NDBM: @sm_enable_ndbm@
+#NEWDB: @sm_enable_newdb@ @sm_newdb_lib@
+#NIS: @sm_enable_nis@
+#NISPLUS: @sm_enable_nisplus@
+#LDAP: @sm_enable_ldap@ @sm_ldap_lib@
+#HESIOD: @sm_enable_hesiod@ @sm_hesiod_parms@
+#TCPD: @sm_enable_tcpd@
+#BIND: @sm_enable_bind@
+#IPv6: @sm_enable_ipv6@
+#Maillock: @sm_enable_maillock@
+#MILTER: @sm_enable_milter@
+#SFIO: @sm_enable_sfio@
+#AUTH: @sm_enable_auth@ @sm_auth_lib@
+#TLS: @sm_enable_tls@
+#SHM: @sm_enable_shm@
+#FFRs: @sm_ffr@
+#M4_FFRs: @sm_m4_ffr@
+#
+#------------------------------------------------------------------
+# Packages and build dependancies (Debian packages)
+#------------------------------------------------------------------
+#Sendmail: sendmail
+#Sendmail-doc: @sm_enable_doc@
+#Libmilter-dev: @sm_enable_dev@
+#Build-Depends: @sm_badepends@
+#Depends: @sm_depends@
+#Recommends: @sm_recommends@
+#Suggests: @sm_suggests@
+#
+#------------------------------------------------------------------
+# Build Architecture (Debian)
+#------------------------------------------------------------------
+#DEB_BUILD_ARCH: @DEB_BUILD_ARCH@
+#DEB_BUILD_GNU_CPU: @DEB_BUILD_GNU_CPU@
+#DEB_BUILD_GNU_SYSTEM: @DEB_BUILD_GNU_SYSTEM@
+#DEB_BUILD_GNU_TYPE: @DEB_BUILD_GNU_TYPE@
+#DEB_HOST_ARCH: @DEB_HOST_ARCH@
+#DEB_HOST_GNU_CPU: @DEB_HOST_GNU_CPU@
+#DEB_HOST_GNU_SYSTEM: @DEB_HOST_GNU_SYSTEM@
+#DEB_HOST_GNU_TYPE: @DEB_HOST_GNU_TYPE@
+#
+#------------------------------------------------------------------
+# Autoconf variable settings defaults
+#------------------------------------------------------------------
+#prefix: @prefix@ /usr/local
+#exec_prefix: @exec_prefix@ ${prefix}
+#bindir: @bindir@ ${exec_prefix}/bin
+#sbindir: @sbindir@ ${exec_prefix}/sbin
+#libexecdir: @libexecdir@ ${exec_prefix}/libexec
+#datadir: @datadir@ ${prefix}/share
+#sysconfdir: @sysconfdir@ ${prefix}/etc
+#sharedstatedir: @sharedstatedir@ ${prefix}/com
+#localstatedir: @localstatedir@ ${prefix}/var
+#libdir: @libdir@ ${exec_prefix}/var
+#includedir: @includedir@ ${prefix}/include
+#oldincludedir: @oldincludedir@ /usr/include
+#infodir: @infodir@ ${prefix}/info
+#mandir: @mandir@ ${prefix}/man
+#docdir: @docdir@ ${prefix}/doc
+#srcdir: @srcdir@ configure or ..
+#
+#------------------------------------------------------------------
+# Build options for the various pieces parts of sendmail
+#------------------------------------------------------------------
+#
+# Make sure defaults are sound...
+define(`confLIBS', `')dnl # was -ldl
+#
+# global
+APPENDDEF(`confINCDIRS', `@sm_incdirs@')
+APPENDDEF(`confMAPDEF', `@sm_mapdef@')
+APPENDDEF(`confENVDEF', `@sm_envdef@')
+APPENDDEF(`confLIBS', `@sm_libs@')
+#
+# editmap
+APPENDDEF(`conf_editmap_ENVDEF', `@sm_editmap_envdef@')
+APPENDDEF(`conf_editmap_LIBS', `@sm_editmap_libs@')
+#
+# libmilter
+APPENDDEF(`conf_libmilter_ENVDEF', `@sm_libmilter_envdef@')
+APPENDDEF(`conf_libmilter_LIBS', `@sm_libmilter_libs@')
+#
+# libsm
+APPENDDEF(`conf_libsm_ENVDEF', `@sm_libsm_envdef@')
+APPENDDEF(`conf_libsm_LIBS', `@sm_libsm_libs@')
+#
+# libsmdb
+APPENDDEF(`conf_libsmdb_ENVDEF', `@sm_libsmdb_envdef@')
+APPENDDEF(`conf_libsmdb_LIBS', `@sm_libsmdb_libs@')
+#
+# libsmutil
+APPENDDEF(`conf_libsmutil_ENVDEF', `@sm_libsmutil_envdef@')
+APPENDDEF(`conf_libsmutil_LIBS', `@sm_libsmutil_libs@')
+#
+# mail.local
+APPENDDEF(`conf_mail_local_ENVDEF', `@sm_mail_local_envdef@')
+APPENDDEF(`conf_mail_local_LIBS', `@sm_mail_local_libs@')
+#
+# mailstats
+APPENDDEF(`conf_mailstats_ENVDEF', `@sm_mailstats_envdef@')
+APPENDDEF(`conf_mailstats_LIBS', `@sm_mailstats_libs@')
+#
+# makemap
+APPENDDEF(`conf_makemap_ENVDEF', `@sm_makemap_envdef@')
+APPENDDEF(`conf_makemap_LIBS', `@sm_makemap_libs@')
+#
+# praliases
+APPENDDEF(`conf_praliases_ENVDEF', `@sm_praliases_envdef@')
+APPENDDEF(`conf_praliases_LIBS', `@sm_praliases_libs@')
+#
+# rmail
+APPENDDEF(`conf_rmail_ENVDEF', `@sm_rmail_envdef@')
+APPENDDEF(`conf_rmail_LIBS', `@sm_rmail_libs@')
+#
+# sendmail
+APPENDDEF(`conf_sendmail_ENVDEF', `@sm_sendmail_envdef@')
+APPENDDEF(`conf_sendmail_LIBS', `@sm_sendmail_libs@')
+#
+# smrsh
+APPENDDEF(`conf_smrsh_ENVDEF', `@sm_smrsh_envdef@')
+APPENDDEF(`conf_smrsh_LIBS', `@sm_smrsh_libs@')
+#
+# vacation
+APPENDDEF(`conf_vacation_ENVDEF', `@sm_vacation_envdef@')
+APPENDDEF(`conf_vacation_LIBS', `@sm_vacation_libs@')
+#
+#------------------------------------------------------------------
+# Build-time selection not handled by autoconf above
+#------------------------------------------------------------------
+# none, for the nonce...
+#
+#------------------------------------------------------------------
+# Global Build time configuration
+#------------------------------------------------------------------
+# compilation/link
+define(`confCC', `@CC@')dnl #Compiler
+define(`confCCOPTS', `')dnl #CC options
+define(`confCCOPTS_SO' `-fPIC')dnl #Shared libraries
+define(`confLD', confCC)dnl #Linker
+define(`confLDOPTS', `')dnl #Linker opts
+define(`confLDOPTS_SO', `-shared -Wl')dnl #linker shared lib
+define(`confLIBDIRS', `')dnl #-L linker flags
+define(`confMTCCOPTS', `')dnl #Multi-thread cc opts
+define(`confMTLDOPTS', `')dnl #Multi-thread ld opts
+define(`confOPTIMIZE', `@CFLAGS@')dnl #Optimization
+#
+# paths, owners, and modes
+# Note: can't use smmsp here, it is dynamically created
+# Note: EBINDIR deserves a better home, suggestions?
+define(`confEBINDIR', `@libexecdir@')dnl #mail.local,smrsh,etc.
+define(`confGBINGRP', `mail')dnl #sgid binary group smmsp
+define(`confGBINMODE', `02755')dnl #sgid binary mode
+define(`confGBINOWN', `root')dnl #sgid binary owner
+define(`confHFDIR', `@sysconfdir@/mail')dnl #helpfile dir
+define(`confHFFILE', `helpfile')dnl #helpfile name
+define(`confINCGRP', `root')dnl #include group
+define(`confINCMODE', `0744')dnl #include mode
+define(`confINCOWN', `root')dnl #include owner
+ifelse(eval(@sm_version_math@ >= 527363), `1',dnl
+`define(`confINCLUDEDIR',`@includedir@')dnl #include target',
+`define(`confINCLUDEDIR',`@includedir@/libmilter')dnl #include target'
+)dnl
+define(`confINST_DEP', `')dnl #submit.cf clientmqueue
+define(`confLIBDIR', `@libdir@/libmilter')dnl #library dir
+define(`confLIBGRP', `root')dnl #library group
+define(`confLIBMODE', `0744')dnl #library mode
+define(`confLIBOWN', `root')dnl #library owner
+define(`confMANROOT', `@mandir@/man')dnl #man root
+define(`confMANROOTMAN',`@mandir@/man')dnl #man root
+define(`confMANGRP', `root')dnl #man group
+define(`confMANMODE', `0744')dnl #man mode
+define(`confMANOWN', `root')dnl #man owner
+define(`confMBINDIR', `@sbindir@')dnl #MTA bindir
+define(`confMBINGRP', `root')dnl #MTA bin grp
+define(`confMBINMODE', `0755')dnl #MTA bin mode
+define(`confMBINOWN', `root')dnl #MTA bin owner
+define(`confMSPQOWN', `mail')dnl #MSP queue owner smmsp
+define(`confMSP_QUEUE_DIR', `/var/spool/mqueue-client')dnl
+define(`confSBINDIR', `@sbindir@')dnl #suid bin dir
+define(`confSBINGRP', `root')dnl #suid bin grp
+define(`confSBINMODE', `04755')dnl #suid bin mode
+define(`confSBINOWN', `root')dnl #suid bin owner
+# Note, STDIR in /var/lib/sendmail... default is /var/spool/mqueue
+define(`confSTDIR', `@localstatedir@/lib/sendmail')dnl #Statistics dir
+define(`confSTFILE', `statistics')dnl #statistics name
+define(`confMSP_STFILE',`sm-client.st')dnl #MSP statistics name
+define(`confSTMODE', `0660')dnl #statistics mode
+define(`confUBINDIR', `@bindir@')dnl #usr bin dir
+define(`confUBINGRP', `mail')dnl #usr bin grp smmsp
+define(`confUBINMODE', `0755')dnl #usr bin mode
+define(`confUBINOWN', `root')dnl #usr bin owner
+#
+# don't provide links, I'll do them myself later
+# sigh... must have something in there or $(make install) croaks -- temp file
+define(`confLINKS', `sendmail-bin')dnl
+define(`confMTA_LINKS')dnl
+#
+# Force rmail installation
+define(`confFORCE_RMAIL')dnl
+#
+# don't install formatted man pages or sendmail.st
+dnl define(`confNO_MAN_INSTALL')dnl
+dnl define(`confNO_MAN_BUILD')dnl
+define(`confINSTALL_RAWMAN')dnl
+define(`confDONT_INSTALL_CATMAN', `')dnl # for 8.12
+define(`confMANDOC', `')dnl # for 8.9.3
+define(`confNROFF', `cat')dnl # for 8.9.3
+define(`confNO_STATISTICS_INSTALL')dnl
+#
+# flags
+#
+# Tests (should be temporary)
+#
diff --git a/debian/build/update_chaos.in b/debian/build/update_chaos.in
new file mode 100644
index 0000000..96e323c
--- /dev/null
+++ b/debian/build/update_chaos.in
@@ -0,0 +1,202 @@
+#!/bin/sh
+#-----------------------------------------------------------------------------
+# $Sendmail: update_chaos,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 2001-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# Debian script to rationalize builds for Sendmail @sm_version@@sm_revision@(@sm_math@)
+#
+# Note: the .in file supports @SM_MINVERS@ - @SM_MAXVERS@, but the generated
+# file is customized to the version noted above.
+#
+#-----------------------------------------------------------------------------
+set -e;
+
+#------------------------------------------------------------------
+# Exit, stage left, even... if not needed (private dir, or >= 8.10.0)
+#------------------------------------------------------------------
+BUILD_TREE='@srcdir@/../../build-tree/sendmail-@sm_version@';
+if [ ! -d ${BUILD_TREE} ]; then
+ exit 0;
+ fi;
+if [ -d ${BUILD_TREE}/devtools/bin ]; then
+ exit 0;
+ fi;
+
+echo "Rationalizing Sendmail-@sm_version@ setup...";
+
+#------------------------------------------------------------------
+# List of subdirectories to work on
+#------------------------------------------------------------------
+SUBDIRS="editmap libmilter mail.local mailstats
+ makemap praliases rmail sendmail smrsh vacation";
+
+#------------------------------------------------------------------
+# Match Sendmail's build directory conventions
+#------------------------------------------------------------------
+os=`uname -s | sed -e 's/\//-/g' -e 's/ //g'`;
+rel=`uname -r | sed -e 's/(/-/g' -e 's/)//g'`;
+arch=`uname -m | sed -e 's/ //g'`;
+OBJ_DIR="obj.${os}.${rel}.${arch}";
+
+#------------------------------------------------------------------
+# Function to escape quotes (to survive subsequent sed)
+#------------------------------------------------------------------
+esq () {
+ result=$(echo "${1}" | sed -e 's?\"?\\\\\\\"?g');
+ };
+
+#------------------------------------------------------------------
+# Prior to 8.10.0, sendmail source was in the src directory
+# Prior to 8.10.0, devtools was called BuildTools
+# Create compatibility links (to look like 8.10.0+)
+#------------------------------------------------------------------
+if [ ! -d ${BUILD_TREE}/sendmail ]; then
+ echo "...Creating \${BUILD_TREE}/sendmail compatibility symlink";
+ ln -sf src ${BUILD_TREE}/sendmail;
+ if [ ! -d ${BUILD_TREE}/devtools ]; then
+ echo "...Creating \${BUILD_TREE}/devtools compatibility symlink";
+ ln -sf BuildTools ${BUILD_TREE}/devtools;
+ fi;
+ fi;
+
+#------------------------------------------------------------------
+# Prior to 8.10.0, objects were in the source directories, not separate
+# Create compatibility links (to look like 8.10.0+)
+#------------------------------------------------------------------
+echo "...Creating ${OBJ_DIR}/<dir> directories";
+mkdir -p ${BUILD_TREE}/${OBJ_DIR};
+for subdir in $SUBDIRS; do
+ if [ -d ${BUILD_TREE}/${subdir} ]; then
+ ln -sf "../${subdir}/${OBJ_DIR}" \
+ ${BUILD_TREE}/${OBJ_DIR}/${subdir};
+ fi;
+ done;
+
+#------------------------------------------------------------------
+# If 8.9.0+, we're done, get the flock outa here...
+#------------------------------------------------------------------
+if [ -e ${BUILD_TREE}/sendmail/Build ]; then
+ echo '...Done.';
+ exit 0;
+ fi;
+
+#------------------------------------------------------------------
+# Prior to 8.9.0, READ_ME was seen in a few places
+# Create compatibility links
+#------------------------------------------------------------------
+echo '...Creating READ_ME compatility symlinks';
+for file in $(find ${BUILD_TREE} -name 'READ_ME'); do
+ ln -sf READ_ME $(echo "${file}" | sed -e 's/READ_ME/README/');
+ done;
+
+#------------------------------------------------------------------
+# Prior to 8.9.0, MAKE was used instead of Build
+# We'll install a small wrapper for the earlier releases
+# Prior to 8.9.0, Only src directory had an obj.* subdirectory
+# Create compatibility links (to look like 8.9.0+)
+#------------------------------------------------------------------
+echo "...Creating <dir>/${OBJ_DIR}";
+for subdir in $SUBDIRS; do
+ if [ -d ${BUILD_TREE}/${subdir} ]; then
+ if [ ! -d ${BUILD_TREE}/${subdir}/Makefiles ]; then
+ mkdir -p ${BUILD_TREE}/${subdir}/${OBJ_DIR};
+ for file in `find ${BUILD_TREE}/${subdir} -type f`; do
+ cp -a $file ${BUILD_TREE}/${subdir}/${OBJ_DIR};
+ done;
+ fi;
+ cp -a debian/build/Build ${BUILD_TREE}/${subdir}/;
+ fi;
+ done;
+#
+#------------------------------------------------------------------
+# Kluge the Makefiles to comply with our file locations.
+#------------------------------------------------------------------
+echo '...Kluging Makefiles';
+for file in mailstats/Makefile.dist \
+ mail.local/Makefile.dist \
+ makemap/Makefile.dist \
+ praliases/Makefile.dist \
+ smrsh/Makefile.dist \
+ src/Makefiles/Makefile.Linux \
+ ; do
+ cp -a ${BUILD_TREE}/${file} ${BUILD_TREE}/${file}.save;
+ #
+ # Set local variables to allow for quoting...
+ esq "@sm_incdirs@";
+ sm_incdirs=$result;
+ esq "@sm_mapdef@";
+ sm_mapdef=$result;
+ esq "@sm_envdef@";
+ sm_envdef=$result;
+ esq "@sm_libs@";
+ sm_libs=$result;
+ #
+ # global
+ sed \
+ -e 's?-I/usr/sww/include??' \
+ -e 's?-I/usr/local/include??' \
+ -e 's?-L/usr/sww/lib??' \
+ -e 's?../src?../../src?g' \
+ -e "s?^INCDIRS=\(.*\)\$?INCDIRS=\1 $sm_incdirs?" \
+ -e "s?^DBMDEF=.*?DBMDEF=$sm_mapdef?" \
+ -e "s?^ENVDEF=\(.*\)\$?ENVDEF=\1 $sm_envdef?" \
+ -e "s?^LIBS=.*?LIBS=$sm_libs?" \
+ ${BUILD_TREE}/${file} > ${BUILD_TREE}/${file}.new;
+ mv ${BUILD_TREE}/${file}.new ${BUILD_TREE}/${file};
+ #
+ # compilation/link
+ sed \
+ -e 's?^O=.*?O=@CFLAGS@?' \
+ -e 's?^LIBDIRS=.*?LIBDIRS=?' \
+ ${BUILD_TREE}/${file} > ${BUILD_TREE}/${file}.new;
+ mv ${BUILD_TREE}/${file}.new ${BUILD_TREE}/${file};
+
+ #
+ # paths, owners, and modes
+ # Note: EBINDIR deserves a better home, suggestions?
+ sed \
+ -e 's?^BINDIR=.*?BINDIR=${DESTDIR}@sbindir@?' \
+ -e 's?^BINMODE=.*?BINMODE=04755?' \
+ -e 's?^BINGRP=.*?BINGRP=mail?' \
+ -e 's?^BINOWN=.*?BINOWN=root?' \
+ -e 's?^HFDIR=.*?HFDIR=${DESTDIR}@sysconfdir@/mail?' \
+ -e 's?^STDIR=.*?STDIR=${DESTDIR}@localstatedir@/lib/sendmail?' \
+ ${BUILD_TREE}/${file} > ${BUILD_TREE}/${file}.new;
+ mv ${BUILD_TREE}/${file}.new ${BUILD_TREE}/${file};
+
+ if [ "${file}" = 'mail.local/Makefile.dist' \
+ -o "${file}" = 'smrsh/Makefile.dist' \
+ ]; then
+ sed \
+ -e 's?^BINDIR=.*?BINDIR=${DESTDIR}@libexecdir@?' \
+ -e 's?^BINMODE=.*?BINMODE=04755?' \
+ -e 's?^BINGRP=.*?BINGRP=mail?' \
+ -e 's?^BINOWN=.*?BINOWN=root?' \
+ ${BUILD_TREE}/${file} > ${BUILD_TREE}/${file}.new;
+ echo 'force-install: install' >> ${BUILD_TREE}/${file}.new;
+ mv ${BUILD_TREE}/${file}.new ${BUILD_TREE}/${file};
+
+ elif [ "${file}" = 'mailstats/Makefile.dist' \
+ -o "${file}" = 'makemap/Makefile.dist' \
+ -o "${file}" = 'praliases/Makefile.dist' \
+ ]; then
+ sed \
+ -e 's?^BINDIR=.*?BINDIR=${DESTDIR}@sbindir@?' \
+ -e 's?^BINMODE=.*?BINMODE=0755?' \
+ -e 's?^BINGRP=.*?BINGRP=mail?' \
+ -e 's?^BINOWN=.*?BINOWN=root?' \
+ ${BUILD_TREE}/${file} > ${BUILD_TREE}/${file}.new;
+ mv ${BUILD_TREE}/${file}.new ${BUILD_TREE}/${file};
+ fi;
+
+ # For most directories, replace Makefile with our updated Makefile.dist
+ if [ "${file}" != 'src/Makefiles/Makefile.Linux' ]; then
+ cp ${BUILD_TREE}/${file} \
+ $(dirname "${BUILD_TREE}/${file}")/${OBJ_DIR}/Makefile;
+ fi;
+ done;
+
+echo '...Done.';
diff --git a/debian/build/version.c b/debian/build/version.c
new file mode 100644
index 0000000..c54b2b6
--- /dev/null
+++ b/debian/build/version.c
@@ -0,0 +1 @@
+char Version[] = "8.12.7";
diff --git a/debian/cf/cf/debproto.mc b/debian/cf/cf/debproto.mc
deleted file mode 100644
index ea20179..0000000
--- a/debian/cf/cf/debproto.mc
+++ /dev/null
@@ -1,42 +0,0 @@
-divert(-1)
-#
-# Copyright (c) 1983 Eric P. Allman
-# 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.
-#
-# 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.
-#
-
-#
-# This file is used to configure sendmail for use with Debian systems.
-#
-
-divert(0)
-VERSIONID(`@(#)sendmail.mc 8.9.3-21 (Debian) 20000309')
-OSTYPE(debian)dnl
diff --git a/debian/cf/debian/autoconf.m4.in b/debian/cf/debian/autoconf.m4.in
new file mode 100644
index 0000000..e9d6430
--- /dev/null
+++ b/debian/cf/debian/autoconf.m4.in
@@ -0,0 +1,59 @@
+divert(-1)dnl
+#-----------------------------------------------------------------------------
+# $Sendmail: autoconf.m4,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 2001-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# m4 autoconf config file for building Sendmail @sm_version@@sm_revision@
+#
+# Note: the .in file supports @SM_MINVERS@ - @SM_MAXVERS@, but the generated
+# file is customized to the version noted above.
+#
+#-----------------------------------------------------------------------------
+#
+divert(0)dnl
+VERSIONID(`$Id: autoconf.m4, v @sm_version@@sm_revision@ @sm_date@ @sm_time@ cowboy Exp $')
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # Export (from autoconf to m4) some items of dubious value
+dnl #---------------------------------------------------------------------
+define(`SM_VERS', `@SM_VERS@')dnl
+define(`SM_DATE', `@SM_DATE@')dnl
+define(`SM_MINVERS', `@SM_MINVERS@')dnl
+define(`SM_MAXVERS', `@SM_MAXVERS@')dnl
+define(`SM_CPYRT', `@SM_CPYRT@')dnl
+define(`sm_date', `@sm_date@')dnl
+define(`sm_time', `@sm_time@')dnl
+define(`sm_utc', `@sm_utc@')dnl
+define(`sm_version', `@sm_version@')dnl
+define(`sm_revision', `@sm_revision@')dnl
+define(`sm_version_v', `@sm_version_v@')dnl
+define(`sm_version_r', `@sm_version_r@')dnl
+define(`sm_version_major', `@sm_version_major@')dnl
+define(`sm_version_minor', `@sm_version_minor@')dnl
+define(`sm_version_beta', `@sm_version_beta@')dnl
+define(`sm_version_math', `@sm_version_math@')dnl
+define(`sm_enable_regex', `@sm_enable_regex@')dnl
+define(`sm_enable_ndbm', `@sm_enable_ndbm@')dnl
+define(`sm_enable_newdb', `@sm_enable_newdb@')dnl
+define(`sm_newdb_lib', `@sm_newdb_lib@')dnl
+define(`sm_enable_nis', `@sm_enable_nis@')dnl
+define(`sm_enable_nisplus', `@sm_enable_nisplus@')dnl
+define(`sm_enable_ldap', `@sm_enable_ldap@')dnl
+define(`sm_ldap_lib', `@sm_ldap_lib@')dnl
+define(`sm_enable_hesiod', `@sm_enable_hesiod@')dnl
+define(`sm_hesiod_parms', `@sm_hesiod_parms@')dnl
+define(`sm_enable_tcpd', `@sm_enable_tcpd@')dnl
+define(`sm_enable_ipv6', `@sm_enable_ipv6@')dnl
+define(`sm_enable_maillock',`@sm_enable_maillock@')dnl
+define(`sm_enable_milter', `@sm_enable_milter@')dnl
+define(`sm_enable_sfio', `@sm_enable_sfio@')dnl
+define(`sm_enable_auth', `@sm_enable_auth@')dnl
+define(`sm_enable_tls', `@sm_enable_tls@')dnl
+define(`sm_enable_shm', `@sm_enable_shm@')dnl
+define(`sm_ffr', `@sm_ffr@')dnl
+define(`sm_m4_ffr', `@sm_m4_ffr@')dnl
+define(`sm_enable_dev', `@sm_enable_dev@')dnl
+define(`sm_enable_doc', `@sm_enable_doc@')dnl
diff --git a/debian/cf/debian/sendmail.mc.in b/debian/cf/debian/sendmail.mc.in
new file mode 100644
index 0000000..c52cadb
--- /dev/null
+++ b/debian/cf/debian/sendmail.mc.in
@@ -0,0 +1,46 @@
+divert(-1)dnl
+#-----------------------------------------------------------------------------
+# $Sendmail: debproto.mc,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# sendmail.mc prototype config file for building Sendmail @sm_version@
+#
+# Note: the .in file supports @SM_MINVERS@ - @SM_MAXVERS@, but the generated
+# file is customized to the version noted above.
+#
+# This file is used to configure Sendmail for use with Debian systems.
+#
+# If you modify this file, you will have to regenerate /etc/mail/sendmail.cf
+# by running this file through the m4 preprocessor via one of the following:
+# * `sendmailconfig`
+# * `make`
+# * `m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf`
+# The first two options are preferred as they will also update other files
+# that depend upon the contents of this file.
+#
+# The best documentation for this .mc file is:
+# /usr/share/doc/sendmail-doc/cf.README.gz
+#
+#-----------------------------------------------------------------------------
+divert(0)dnl
+#
+# Copyright (c) 1998-2002 Richard Nelson. All Rights Reserved.
+#
+# This file is used to configure Sendmail for use with Debian systems.
+#
+define(`_USE_ETC_MAIL_')dnl
+include(`@datadir@/sendmail/cf/m4/cf.m4')dnl
+VERSIONID(`$Id: sendmail.mc, v @sm_version@@sm_revision@ @sm_date@ @sm_time@ cowboy Exp $')
+OSTYPE(`debian')dnl
+DOMAIN(`debian-mta')dnl
+dnl #
+dnl # General defines
+dnl #
+dnl # SAFE_FILE_ENV: [undefined] If set, sendmail will do a chroot()
+dnl # into this directory before writing files.
+dnl # If *all* your user accounts are under /home then use that
+dnl # instead - it will prevent any writes outside of /home !
+dnl # define(`confSAFE_FILE_ENV', `')dnl
diff --git a/debian/cf/debian/starttls.m4.in b/debian/cf/debian/starttls.m4.in
new file mode 100644
index 0000000..d9de9d0
--- /dev/null
+++ b/debian/cf/debian/starttls.m4.in
@@ -0,0 +1,52 @@
+divert(-1)dnl
+#-----------------------------------------------------------------------------
+# $Sendmail: starttls.m4,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 2002-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# starttls.m4 m4 file to support user->MTA, MSP->MTA, and MTA->MTA
+# encryption and/or authentication.
+#
+# To use this file, add this line to sendmail.mc and possibly submit.mc:
+# `include(`@sysconfdir@/mail/tls/starttls.m4')dnl'
+#
+#-----------------------------------------------------------------------------
+#
+divert(0)dnl
+VERSIONID(`$Id: starttls.m4,v @sm_version@@sm_revision@ @sm_date@ @sm_time@ cowboy Exp $')
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # Bring in Autoconf results
+dnl #---------------------------------------------------------------------
+ifdef(`sm_version', `dnl',
+`include(`@datadir@/sendmail/cf/debian/autoconf.m4')dnl')
+dnl #
+dnl # Check to see if inclusion is valid (version >= 8.11.0, tls enabled)
+ifelse(eval(sm_version_math >= 527104), `1', dnl
+`ifelse(sm_enable_tls, `yes', `dnl
+dnl #
+dnl # Do not touch anything above this line...
+dnl #
+dnl # CA directory - CA certs should be herein
+define(`confCACERT_PATH', `@sysconfdir@/ssl/certs')dnl
+dnl #
+dnl # CA file (may be the same as client/server certificate)
+define(`confCACERT', `@sysconfdir@/mail/tls/sendmail-server.crt')dnl
+dnl #
+dnl # Server certificate/key (can be in the same file, and shared w/client)
+dnl # NOTE: The key must *NOT* be encrypted !!!
+define(`confSERVER_CERT', `@sysconfdir@/mail/tls/sendmail-server.crt')dnl
+define(`confSERVER_KEY', `@sysconfdir@/mail/tls/sendmail-common.key')dnl
+dnl #
+dnl # Clien certificate/key (can be in the same file, and shared w/server)
+dnl # NOTE: The key must *NOT* be encrypted !!!
+define(`confCLIENT_CERT', `@sysconfdir@/mail/tls/sendmail-client.crt')dnl
+define(`confCLIENT_KEY', `@sysconfdir@/mail/tls/sendmail-common.key')dnl
+dnl #
+dnl # Optional settings
+dnl define(`confTLS_SRV_OPTIONS', `V')dnl # don't request user certs
+dnl #
+dnl # Do not touch anything below this line...
+)')dnl
diff --git a/debian/cf/debian/submit.mc.in b/debian/cf/debian/submit.mc.in
new file mode 100644
index 0000000..572b638
--- /dev/null
+++ b/debian/cf/debian/submit.mc.in
@@ -0,0 +1,56 @@
+divert(-1)dnl
+#-----------------------------------------------------------------------------
+# $Sendmail: submit.mc,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 2000-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# submit.mc prototype config file for building Sendmail @sm_version@
+#
+# Note: the .in file supports @SM_MINVERS@ - @SM_MAXVERS@, but the generated
+# file is customized to the version noted above.
+#
+# This file is used to configure Sendmail for use with Debian systems.
+#
+# If you modify this file, you will have to regenerate /etc/mail/submit.cf
+# by running this file through the m4 preprocessor via one of the following:
+# * `sendmailconfig`
+# * `make`
+# * `m4 /etc/mail/submit.mc > /etc/mail/submit.cf`
+# The first two options are preferred as they will also update other files
+# that depend upon the contents of this file.
+#
+# The best documentation for this .mc file is:
+# /usr/share/doc/sendmail-doc/cf.README.gz
+#
+#-----------------------------------------------------------------------------
+divert(0)dnl
+#
+# Copyright (c) 2000-2002 Richard Nelson. All Rights Reserved.
+#
+# This file is used to configure Sendmail for use with Debian systems.
+#
+define(`_USE_ETC_MAIL_')dnl
+include(`@datadir@/sendmail/cf/m4/cf.m4')dnl
+VERSIONID(`$Id: submit.mc, v @sm_version@@sm_revision@ @sm_date@ @sm_time@ cowboy Exp $')
+OSTYPE(`debian')dnl
+DOMAIN(`debian-msp')dnl
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # Masquerading information, if needed, should go here
+dnl # You likely will not need this, as the MTA will do it
+dnl #---------------------------------------------------------------------
+dnl MASQUERADE_AS()dnl
+dnl FEATURE(`masquerade_envelope')dnl
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # The real reason we're here: the FEATURE(msp)
+dnl #---------------------------------------------------------------------
+FEATURE(`msp', `[127.0.0.1]', `MSA')dnl
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # Some minor cleanup from FEATURE(msp)
+dnl #---------------------------------------------------------------------
+dnl #
+dnl #---------------------------------------------------------------------
diff --git a/debian/cf/domain/debian-msp.m4.in b/debian/cf/domain/debian-msp.m4.in
new file mode 100644
index 0000000..c3d04d5
--- /dev/null
+++ b/debian/cf/domain/debian-msp.m4.in
@@ -0,0 +1,98 @@
+divert(-1)dnl
+#-----------------------------------------------------------------------------
+# $Sendmail: debian-msp.m4,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# domain(debian-msp) config file for building Sendmail @sm_version@@sm_revision@
+#
+# Note: the .in file supports @SM_MINVERS@ - @SM_MAXVERS@, but the generated
+# file is customized to the version noted above.
+#
+#-----------------------------------------------------------------------------
+#
+divert(0)dnl
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # Bring in Autoconf results
+dnl #---------------------------------------------------------------------
+ifdef(`sm_version', `dnl',
+`include(`@datadir@/sendmail/cf/debian/autoconf.m4')dnl')
+dnl #
+VERSIONID(`$Id: debian-msp.m4, v @sm_version@@sm_revision@ @sm_date@ @sm_time@ cowboy Exp $')
+define(`DEBIAN_MSP')dnl
+dnl #
+dnl # changes made herein *must* be reflected in parse_mc,update_db,debian.m4
+dnl #
+define(`MSP_QUEUE_DIR', `@localstatedir@/spool/mqueue-client')dnl
+define(`STATUS_FILE', `@localstatedir@/lib/sendmail/sm-client.st')dnl
+dnl #
+dnl # Since MSP only delivers to MTA, persistant status isn't needed
+define(`confHOST_STATUS_DIRECTORY', `')dnl
+dnl #
+dnl # For FHS, we use a subdirectory in /var/run (multiple files)
+dnl # For permissions, we use separate MSP/MTA subdirectories
+define(`confPID_FILE', `@localstatedir@/run/sendmail/msp/sendmail.pid')dnl
+define(`confCONTROL_SOCKET_NAME',
+ `@localstatedir@/run/sendmail/msp/smcontrol')dnl
+dnl #
+dnl # flags
+define(`confPROCESS_TITLE_PREFIX', `MSP')dnl
+define(`confCON_EXPENSIVE', `True')dnl
+define(`confNO_RCPT_ACTION', `add-to-undisclosed')dnl
+define(`confRRT_IMPLIES_DSN', `True')dnl
+define(`confSAFE_FILE_ENV', `/')dnl
+define(`confSAFE_QUEUE', `True')dnl
+define(`confQUEUE_FILE_MODE', `0660')dnl
+define(`confTEMP_FILE_MODE', `0600')dnl
+dnl #
+dnl # Provide some 'more reasonable' timeout values
+dnl # See SASL/TLS sections below for more timeout values
+dnl #
+define(`confTO_ICONNECT', `2s')dnl # rfc min= , def=5m
+define(`confTO_MAIL', `2m')dnl # rfc min=5m, def=10m, too long
+define(`confTO_DATAINIT', `2m')dnl # rfc min=2m, def=5m
+define(`confTO_RSET', `1m')dnl # rfc min= , def=5m
+define(`confTO_QUIT', `2m')dnl # rfc min= , def=2m
+define(`confTO_COMMAND', `5m')dnl # rfc min=5m, def=1h
+define(`confTO_IDENT', `5s')dnl # , def=5s, 0=skip
+define(`confTO_HOSTSTATUS',`0')dnl # , def=30m
+dnl #
+dnl # by default, disable Message Submission Agent (8.10.0+)
+ifelse(eval(sm_version_math >= 526848), `1',dnl
+`FEATURE(`no_default_msa')')
+dnl #
+dnl # Mail Submission Program uid/gid
+define(`confRUN_AS_USER', `smmsp')dnl
+define(`confTRUSTED_USER', confRUN_AS_USER)dnl
+dnl #
+dnl # Optional items (should be a subset site.config.m4 used for build)
+dnl # to prevent sendmail error messages
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # SMTP AUTH (SASL) support (sendmail 8.10.0 +)
+dnl # NOTE: we'll us inaddr_any instead of 127.0.0.1 (or not...)
+dnl # Sigh: MSP AUTH doesn't work in -bs mode (/etc/sasldb !o+r)
+dnl #---------------------------------------------------------------------
+ifelse(sm_enable_auth, `yes',dnl
+`define(`confAUTH_MECHANISMS',dnl
+ `GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5 PLAIN LOGIN')dnl'
+`TRUST_AUTH_MECH(`GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5 PLAIN LOGIN')'
+`ifelse(eval(sm_version_math >= 527360), `1',dnl
+`define(`confTO_AUTH', `2m')dnl # , def=10m'
+`define(`confDONT_BLAME_SENDMAIL',dnl
+defn(`confDONT_BLAME_SENDMAIL')`,GroupReadableSASLDBFile,GroupWritableSASLDBFile')dnl')'
+`DAEMON_OPTIONS(`Name=NoMTA, Addr=127.0.0.1, M=EA')dnl'
+)dnl
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # SMTP STARTTLS (OpenSSL) support (sendmail 8.11.0 +)
+dnl #---------------------------------------------------------------------
+ifelse(sm_enable_tls, `yes',dnl
+`ifelse(eval(sm_version_math >= 527360), `1',dnl
+`define(`confTO_STARTTLS', `2m')dnl # , def=10m'
+`define(`confDONT_BLAME_SENDMAIL',dnl
+ defn(`confDONT_BLAME_SENDMAIL')`,GroupReadableKeyFile')dnl')'
+)dnl
diff --git a/debian/cf/domain/debian-mta.m4.in b/debian/cf/domain/debian-mta.m4.in
new file mode 100644
index 0000000..1a82051
--- /dev/null
+++ b/debian/cf/domain/debian-mta.m4.in
@@ -0,0 +1,134 @@
+divert(-1)dnl
+#-----------------------------------------------------------------------------
+# $Sendmail: debian-mta.m4,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# domain(debian-mta) config file for building Sendmail @sm_version@@sm_revision@
+#
+# Note: the .in file supports @SM_MINVERS@ - @SM_MAXVERS@, but the generated
+# file is customized to the version noted above.
+#
+#-----------------------------------------------------------------------------
+#
+divert(0)dnl
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # Bring in Autoconf results
+dnl #---------------------------------------------------------------------
+ifdef(`sm_version', `dnl' ,
+`include(`@datadir@/sendmail/cf/debian/autoconf.m4')dnl')
+dnl #
+VERSIONID(`$Id: debian-mta.m4, v @sm_version@@sm_revision@ @sm_date@ @sm_time@ cowboy Exp $')
+define(`DEBIAN_MTA')dnl
+dnl #
+dnl # changes made herein *must* be reflected in parse_mc,update_db,debian.m4
+dnl #
+define(`STATUS_FILE', `@localstatedir@/lib/sendmail/sendmail.st')dnl
+define(`confHOST_STATUS_DIRECTORY',
+ `@localstatedir@/lib/sendmail/host_status')dnl
+dnl #
+dnl # For FHS, we use a subdirectory in /var/run (multiple files)
+dnl # For permissions, we use separate MSP/MTA subdirectories
+define(`confPID_FILE', `@localstatedir@/run/sendmail/mta/sendmail.pid')dnl
+define(`confCONTROL_SOCKET_NAME',
+ `@localstatedir@/run/sendmail/mta/smcontrol')dnl
+dnl #
+dnl # flags
+define(`confPROCESS_TITLE_PREFIX', `MTA')dnl
+define(`confCON_EXPENSIVE', `True')dnl
+define(`confMAX_DAEMON_CHILDREN', `0')dnl
+define(`confNO_RCPT_ACTION', `add-to-undisclosed')dnl
+define(`confRRT_IMPLIES_DSN', `True')dnl
+define(`confSAFE_FILE_ENV', `/')dnl
+define(`confSAFE_QUEUE', `True')dnl
+define(`confQUEUE_FILE_MODE', `0600')dnl
+define(`confTEMP_FILE_MODE', `0600')dnl
+dnl #
+dnl # Provide some 'more reasonable' timeout values
+dnl # See SASL/TLS sections below for more timeout values
+dnl #
+define(`confTO_ICONNECT', `5s')dnl # rfc min= , def=5m
+define(`confTO_MAIL', `2m')dnl # rfc min=5m, def=10m, too long
+define(`confTO_DATAINIT', `2m')dnl # rfc min=2m, def=5m
+define(`confTO_RSET', `1m')dnl # rfc min= , def=5m
+define(`confTO_QUIT', `2m')dnl # rfc min= , def=2m
+define(`confTO_COMMAND', `5m')dnl # rfc min=5m, def=1h
+define(`confTO_IDENT', `5s')dnl # , def=5s, 0=skip
+dnl #
+dnl # Debian users have group writable directories/files by default (8.9.0+)
+ifelse(eval(sm_version_math >= 526592), `1',dnl
+`define(`confDONT_BLAME_SENDMAIL',dnl
+`AssumeSafeChown,ForwardFileInGroupWritableDirPath,GroupWritableForwardFileSafe,GroupWritableIncludeFileSafe,IncludeFileInGroupWritableDirPath')dnl'
+)dnl
+dnl #
+dnl # Don't warn for non-existant forward files (8.10.0+)
+ifelse(eval(sm_version_math >= 526848), `1',dnl
+`define(`confDONT_BLAME_SENDMAIL',dnl
+ defn(`confDONT_BLAME_SENDMAIL')`,DontWarnForwardFileInUnsafeDirPath')dnl'
+)dnl
+dnl #
+dnl # Allow group-writable include files (8.12.0+)
+ifelse(eval(sm_version_math >= 527360), `1',dnl
+`define(`confDONT_BLAME_SENDMAIL',dnl
+ defn(`confDONT_BLAME_SENDMAIL')`,GroupWritableIncludeFile')dnl'
+)dnl
+dnl #
+dnl # by default, disable Message Submission Agent (8.10.0+)
+dnl # except for 8.12.0+, where its needed for MSA !
+ifelse(eval(sm_version_math >= 526848), `1',dnl
+`ifelse(eval(sm_version_math < 527360), `1',dnl
+`FEATURE(`no_default_msa')',`dnl')')
+dnl #
+dnl # Allow mailq/hoststat to work with both MSP/MTA queues
+ifelse(eval(sm_version_math >= 527360), `1',dnl
+`define(`confQUEUE_FILE_MODE', `0640')dnl'
+`define(`confTEMP_FILE_MODE', `0644')dnl')
+dnl #
+dnl # For security, we default to not letting lusers run the queues
+dnl # If possible, we prevent sendmail -bv from reading things they shouldn't
+dnl #
+define(`confPRIVACY_FLAGS', `restrictqrun')
+ifelse(eval(sm_version_math >= 527360), `1',dnl
+`define(`confPRIVACY_FLAGS',dnl
+ defn(`confPRIVACY_FLAGS')`,restrictexpand')dnl')
+dnl #
+dnl # Provide a more reasonable default for number of queue-runners
+dnl # because many/most? people will not discover this themselves
+dnl # and the sendmail default is one!
+dnl #
+define(`confMAX_RUNNERS_PER_QUEUE', `5')dnl
+dnl #
+dnl # Optional items (should be a subset site.config.m4 used for build)
+dnl # to prevent sendmail error messages
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # SMTP AUTH (SASL) support (sendmail 8.10.0 +)
+dnl # PLAIN/LOGIN needed to support SASL auth via PAM ;(
+dnl # if this bothers you, you allow them only in conjunction w/STARTTLS !
+dnl # for 8.12.0+, add EXTERNAL as an available & trusted mech (w/STARTTLS)
+dnl #---------------------------------------------------------------------
+ifelse(sm_enable_auth, `yes',dnl
+`define(`confAUTH_MECHANISMS',dnl
+`GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5 PLAIN LOGIN')dnl'
+`TRUST_AUTH_MECH(`GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5 PLAIN LOGIN')'
+`ifelse(eval(sm_version_math >= 527360), `1',dnl
+`define(`confAUTH_MECHANISMS',dnl
+`EXTERNAL 'defn(`confAUTH_MECHANISMS'))dnl'
+`TRUST_AUTH_MECH(`EXTERNAL')'
+`define(`confTO_AUTH', `2m')dnl # , def=10m'
+`define(`confDONT_BLAME_SENDMAIL',dnl
+defn(`confDONT_BLAME_SENDMAIL')`,GroupReadableSASLDBFile,GroupWritableSASLDBFile')dnl')'
+)dnl
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # SMTP STARTTLS (OpenSSL) support (sendmail 8.11.0 +)
+dnl #---------------------------------------------------------------------
+ifelse(sm_enable_tls, `yes',dnl
+`ifelse(eval(sm_version_math >= 527360), `1',dnl
+`define(`confTO_STARTTLS', `2m')dnl # , def=10m'
+`define(`confDONT_BLAME_SENDMAIL',dnl
+ defn(`confDONT_BLAME_SENDMAIL')`,GroupReadableKeyFile')dnl')'
+)dnl
diff --git a/debian/cf/feature/dont_masquerade_local.m4 b/debian/cf/feature/dont_masquerade_local.m4
deleted file mode 100644
index 5748721..0000000
--- a/debian/cf/feature/dont_masquerade_local.m4
+++ /dev/null
@@ -1,9 +0,0 @@
-divert(-1)
-#
-# Prevent masquerading of local senders when sending to local recipients
-# used by: mailer/local.m4
-#
-divert(0)
-VERSIONID(`@(#)dont_masquerade_local.m4 1.0 (Debian) 1999-04-22')
-divert(-1)
-define(`_DONT_MASQUERADE_LOCAL_', 1)dnl
diff --git a/debian/cf/feature/dssl.m4 b/debian/cf/feature/dssl.m4
deleted file mode 100644
index 2ed99ee..0000000
--- a/debian/cf/feature/dssl.m4
+++ /dev/null
@@ -1,5 +0,0 @@
-divert(0)
-VERSIONID(`@(#)dssl.m4 1.0 (Debian) 1999-08-03')
-divert(-1)
-FEATURE(rbl,`dssl.imrss.org',` Mail from $&{client_addr}
- rejected - dynamic ip; see http://www.imrss.org/dssl/unblock.html')
diff --git a/debian/cf/feature/imrss.m4 b/debian/cf/feature/imrss.m4
deleted file mode 100644
index c01a992..0000000
--- a/debian/cf/feature/imrss.m4
+++ /dev/null
@@ -1,5 +0,0 @@
-divert(0)
-VERSIONID(`@(#)imrss.m4 1.0 (Debian) 1999-08-03')
-divert(-1)
-FEATURE(rbl,`mr-out.imrss.org',` Mail from $&{client_addr}
- rejected - open relay; see http://www.imrss.org/error.html')
diff --git a/debian/cf/feature/ldap.m4 b/debian/cf/feature/ldap.m4
deleted file mode 100644
index 57ea0e0..0000000
--- a/debian/cf/feature/ldap.m4
+++ /dev/null
@@ -1,13 +0,0 @@
-divert(-1)
-# commentary/copyright
-divert(0)
-VERSIONID(`@(#)ldap.m4 1.0 (Debian) 1999-04-23')
-divert(-1)
-dnl #
-dnl # Mark LDAP in use for subsequent S5 rule
-dnl #
-define(`_LDAP_MAP_', 1)dnl
-LOCAL_CONFIG
-# Define ldap map, arguments come directly from the `FEATURE(ldap, xxx)'
-# This version of ldap.m4 only checks the map in the S5 rule
-Kldap ldapx _ARG_
diff --git a/debian/cf/feature/orbs.m4 b/debian/cf/feature/orbs.m4
deleted file mode 100644
index aec60a4..0000000
--- a/debian/cf/feature/orbs.m4
+++ /dev/null
@@ -1,7 +0,0 @@
-divert(0)
-VERSIONID(`@(#)orbs.m4 2.0 (Debian) 1999-04-22')
-divert(-1)
-dnl define(`_ORBS_', ifelse(_ARG_, `', `orbs.dorkslayers.com', `_ARG_'))dnl
-dnl define(`_ORBS_', ifelse(_ARG_, `', `relays.orbs.org', `_ARG_'))dnl
-FEATURE(rbl,`relays.orbs.org',` Mail from $&{client_addr}
- rejected - open relay; see http://www.orbs.org')
diff --git a/debian/cf/feature/orca.m4 b/debian/cf/feature/orca.m4
deleted file mode 100644
index 4f8e874..0000000
--- a/debian/cf/feature/orca.m4
+++ /dev/null
@@ -1,6 +0,0 @@
-divert(0)
-VERSIONID(`@(#)orca.m4 2.0 (Debian) 1999-04-22')
-divert(-1)
-dnl define(`_ORCA_', ifelse(_ARG_, `', `dul.orca.bc.ca', `_ARG_'))dnl
-FEATURE(rbl,`dul.maps.vix.com',` Mail from $&{client_addr}
- rejected - dul; see http://maps.vix.com')
diff --git a/debian/cf/feature/rhsbl.m4 b/debian/cf/feature/rhsbl.m4
new file mode 100644
index 0000000..857ce58
--- /dev/null
+++ b/debian/cf/feature/rhsbl.m4
@@ -0,0 +1,40 @@
+divert(-1)
+#
+# Copyright (c) 2001 Derek J. Balling
+# All rights reserved.
+#
+# Permission to use granted for all purposes. If modifications are made
+# they are requested to be sent to <dredd@megacity.org> for inclusion in future
+# versions
+#
+# Allows (hopefully) for checking of access.db whitelisting now. This ONLY
+# works on sendmail-8.12.x ... use on any other version may require tinkering
+# by you the downloader.
+#
+divert(0)
+ifdef(`_RHSBL_R_',`dnl',`dnl
+VERSIONID(`$Id: rhsbl.m4,v 1.1 2001/08/27 15:41:15 dredd Exp $')
+define(`_RHSBL_R_',`')
+ifdef(`_DNSBL_R_',`dnl',`dnl
+LOCAL_CONFIG
+# map for DNS based blacklist lookups based on the sender RHS
+Kdnsbl host -T<TMP>')')
+divert(-1)
+define(`_RHSBL_SRV_', `_ARG_')dnl
+define(`_RHSBL_MSG_', `ifelse(len(X`'_ARG2_),`1',`"550 Mail from " $`'&{RHS} " refused by blackhole site '_RHSBL_SRV_`"',`_ARG2_')')dnl
+define(`_RHSBL_MSG_TMP_', `ifelse(_ARG3_,`t',`"451 Temporary lookup failure of " $`'&{RHS} " at '_RHSBL_SRV_`"',`_ARG2_')')dnl
+divert(8)
+LOCAL_RULESETS
+SLocal_check_mail
+# DNS based RHS spam list _RHSBL_SRV_
+R$+ $: <@> $>CanonAddr $&f
+R<@> $*<@$+.> $:<@>$1<@$2.>$|$>SearchList<+ rhs>$|<F:$1@$2><D:$2><>
+R$* $| <$={Accept}> $: OKSOFAR
+R<@> $*<@$+.> $| $* $: <?> $(dnsbl $2._RHSBL_SRV_. $: OK $) $(macro {RHS} $@ $2 $)
+R<@> $* $: OKSOFAR
+R<?>OK $: OKSOFAR
+ifelse(len(X`'_ARG3_),`1',
+`R<?>$+<TMP> $: TMPOK',
+`R<?>$+<TMP> $#error $@ 4.7.1 $: _RHSBL_MSG_TMP_')
+R<?>$+ $#error $@ 5.7.1 $: _RHSBL_MSG_
+divert(-1)
diff --git a/debian/cf/feature/vnet.m4 b/debian/cf/feature/vnet.m4
index 56377f4..6086baf 100644
--- a/debian/cf/feature/vnet.m4
+++ b/debian/cf/feature/vnet.m4
@@ -1,16 +1,38 @@
-PUSHDIVERT(0)
+divert(-1)dnl
+#-----------------------------------------------------------------------------
+# $Sendmail: ./vnet.m4,v 8.12.0 2001/09/24 12:00:00 cowboy Exp $
+#
+# Copyright (c) 2001-2001 Richard Nelson. All Rights Reserved.
+#
+# feature(vnet) config file for building Sendmail
+#
+#-----------------------------------------------------------------------------
+#
+divert(0)dnl
+dnl
+dnl
+dnl
LOCAL_CONFIG
+######################################################################
+### vnet: support .rscs domain and XAGENT
+###
+######################################################################
#
# Support routing of .rscs nodes via XAGENT
#
# Define vnet/rscs node hlq
-CAvnet rscs
-# Note: you'll to define your XAGENT node:
+CAvnet.ibm.com vnet rscs
+#
+# Note: you'll have to define your XAGENT node:
#DAlexvmk.lexington.ibm.com
-dnl #
-dnl #
-dnl #
+dnl
+dnl
+dnl
LOCAL_RULE_3
+######################################################################
+### vnet: support .rscs domain, XAGENT, and Lotus Notes
+###
+######################################################################
#
# Support Lotus Notes and VM TCP/IP MTAs
#
@@ -20,14 +42,16 @@ R$* % ibmuk.rscs < @ $+> $* $: $1 < @ uk.ibm.com > $3
R$* % $-.rscs < @ $+> $* $: $1 < @ $2.rscs > $4
# Now, try the domaintable yet again...
R$* < @ $-.rscs > $* $: $1 < @ $(domaintable $2.rscs $) > $3
-dnl #
-dnl #
-dnl #
+# Finally, allow an override on simply the rscs domain...
+R$* < @ $-.rscs > $* $: $1 < @ $2.$(domaintable rscs $) > $3
+dnl
+dnl
+dnl
LOCAL_NET_CONFIG
-#------------------------------------------------------------------------
-# Handle RSCS/VM messages and messages addressed to sites internal to IBM
-#------------------------------------------------------------------------
-#
+######################################################################
+### vnet: Handle .rscs domain, deliver to *.ibm.com, etc...
+###
+######################################################################
# Skip any local addresses
# (or we'll get a "mail loops back to itself" error
@@ -36,12 +60,11 @@ R$* < @ $=w > $* $@ $1 < @ $2 . > $3 regular local name
# Recipients inside IBM--transfer the mail directly.
-R$* < @ $+.ibm.com > $* $#smtp $@ $2.ibm.com $: $1 < @$2.ibm.com > $3
-R$* < @ $+.ibm.com. > $* $#smtp $@ $2.ibm.com $: $1 < @$2.ibm.com > $3
+R$* < @ $+.ibm.com > $* $#relay $@ $2.ibm.com $: $1 < @$2.ibm.com > $3
+R$* < @ $+.ibm.com. > $* $#relay $@ $2.ibm.com $: $1 < @$2.ibm.com > $3
# Recipients of the form user@node.vnet get rewritten to
-# user@node.RSCS, the message itself is forwarded to the RSCS/VM node
-# specified in $A.
+# user@node.vnet.ibm.com, the message itself is forwarded to
+# the RSCS/VM node specified in $A.
-R$* < @ $-.$=A > $* $#smtp $@ $A $: $1 < @$2.RSCS > $4
-POPDIVERT
+R$* < @ $-.$=A > $* $#relay $@ $A $: $1 < @$2.vnet.ibm.com > $4
diff --git a/debian/cf/hack/debian_auth.m4.in b/debian/cf/hack/debian_auth.m4.in
new file mode 100644
index 0000000..66510b1
--- /dev/null
+++ b/debian/cf/hack/debian_auth.m4.in
@@ -0,0 +1,47 @@
+divert(-1)dnl
+#-----------------------------------------------------------------------------
+# $Sendmail: debian_auth.m4,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 2001-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# debian_trustauth.m4 m4 file for
+# * supporting MSP->MTA and MTA->MTA authentication
+# * supporting the auth= parameter on the mail from: command.
+#
+# This file is an extremely simple example that lets *ALL* trusted users
+# sendmail, daemon, root, uucp, etc. proxy for any user.
+#
+# If you've a better idea, please let me know
+#
+#-----------------------------------------------------------------------------
+divert(0)dnl
+VERSIONID(`$Id: debian_auth.m4,v @sm_version@@sm_revision@ @sm_date@ @sm_time@ cowboy Exp $')
+dnl #
+dnl # MTA as Client authentication - only if authinfo/access_db *NOT* used...
+define(`confDEF_AUTH_INFO', `MAIL_SETTINGS_DIR`'default-auth-info')dnl
+dnl #
+dnl # add (fake) uid 'sendmail' to trusted users - it is used as the id
+dnl # for MSP->MTA, and MTA->MTA proxying.
+ifdef(`confTRUSTED_USERS',
+ `define(`confTRUSTED_USERS',
+ defn(`confTRUSTED_USERS')`,sendmail')',
+ `define(`confTRUSTED_USERS', `sendmail')')dnl
+dnl #
+dnl # Define local rulesets for trust_auth
+LOCAL_RULESETS
+#
+#-----------------------------------------------------------------------------
+# Local_trust_auth: Define who is able to authenticate for whom...
+# The sendmail default is to allow *IFF* authen == author
+# This ruleset also allows trusted users to authenicate as anyone - needed
+# for MSP->MTA and MTA->MTA forwarding of mail from: <...> auth=...
+SLocal_trust_auth
+R$* $: $&{auth_authen} Put authentication id in the workspace
+ifdef(`DEBIAN_DEBUG',dnl
+`R$* $: $(log authtype:$&{auth_type} $) $1
+R$* $: $(log authauthen:$&{auth_authen} $) $1
+R$* $: $(log authauthor:$&{auth_author} $) $1')dnl
+R$=t $@ $#ok Trusted users... Allow trusted users to auth= as anyone
+#-----------------------------------------------------------------------------
diff --git a/debian/cf/hack/msp_nullclient.m4 b/debian/cf/hack/msp_nullclient.m4
new file mode 100644
index 0000000..db9f8cc
--- /dev/null
+++ b/debian/cf/hack/msp_nullclient.m4
@@ -0,0 +1,95 @@
+divert(-1)dnl
+#-----------------------------------------------------------------------------
+# $Sendmail: ./msp_nullclient.m4,v 8.12.0 2001/05/23 14:30:00 cowboy Exp $
+#
+# Copyright (c) 2001-2001 Richard Nelson. All Rights Reserved.
+#
+# msp_nullclient.m4 m4 file for supporting a nullclient in the MSP
+# environment. That is, change the feature(msp) to feature(msp_nullclient)
+# in /etc/mail/submit.mc. An MTA listener is now optional, and you can
+# run with only MSP mode (setgid mail).
+#
+# This file is blatantly cut&pasted from nullclient.m4 and msp.m4 !!!
+#
+# If you've a better idea, please let me know
+#
+#-----------------------------------------------------------------------------
+#
+# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+# 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.
+#
+# 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.
+#
+#
+ifelse(defn(`_ARG_'), `', `errprint(`Hack "msp_nullclient" requires argument')',
+ `define(`_NULL_CLIENT_', _ARG_)')
+
+#
+# This is used only for relaying mail from a client to a hub when
+# that client does absolutely nothing else -- i.e., it is a "null
+# mailer". In this sense, it acts like the "R" option in Sun
+# sendmail.
+#
+
+divert(0)dnl
+VERSIONID(`$Id: msp_nullclient.m4,v 8.12.0 2001/05/23 14:30:00 cowboy Exp $')
+divert(-1)dnl
+
+dnl #
+dnl # This *MUST* be used within the context of MSP
+ifdef(`DEBIAN_MSP', `dnl', `DOMAIN(`debian-msp')')
+dnl #
+dnl # Restrict listening to localhost (to increase security)
+ifelse(defn(`_DPO_'), `',
+`DAEMON_OPTIONS(`Name=NoMTA, Addr=127.0.0.1, M=E')dnl')
+
+dnl #-------------------- Now the Nullclient carp ---------------------------
+undefine(`ALIAS_FILE')
+define(`MAIL_HUB', _NULL_CLIENT_)
+define(`SMART_HOST', _NULL_CLIENT_)
+define(`confFORWARD_PATH', `')
+ifdef(`confFROM_HEADER',, `define(`confFROM_HEADER', `<$g>')')
+dnl #-------------------- Now the MSP carp ----------------------------------
+ifdef(`STATUS_FILE',
+`define(`_F_',
+`define(`_b_', index(STATUS_FILE, `sendmail.st'))ifelse(_b_, `-1', `STATUS_FILE', `substr(STATUS_FILE, 0, _b_)sm-client.st')')
+define(`STATUS_FILE', _F_)
+undefine(`_b_') undefine(`_F_')',
+`define(`STATUS_FILE', `/var/run/sm-client.st')')
+define(`confUSE_MSP', `True')dnl
+define(`confFORWARD_PATH', `')dnl
+define(`confPRIVACY_FLAGS', `goaway,noetrn')dnl
+dnl ---------------------------------------------
+dnl run as this user (even if called by root)
+define(`confRUN_AS_USER', `smmsp')dnl
+define(`confTRUSTED_USER', `confRUN_AS_USER')dnl
+dnl ---------------------------------------------
+dnl This queue directory must have the same group
+dnl as sendmail and it must be group-writable.
+dnl notice: do not test for QUEUE_DIR, it is set in some ostype/*.m4 files
+ifdef(`MSP_QUEUE_DIR',
+`define(`QUEUE_DIR', `MSP_QUEUE_DIR')',
+`define(`QUEUE_DIR', `/var/spool/clientmqueue')')dnl
+dnl ---------------------------------------------
+ifdef(`confPID_FILE', `dnl',
+`define(`confPID_FILE', QUEUE_DIR`/sm-client.pid')')
+define(`confQUEUE_FILE_MODE', `0660')dnl
+FEATURE(`no_default_msa')dnl
+ifelse(defn(`_DPO_'), `',
+`DAEMON_OPTIONS(`Name=NoMTA, Addr=127.0.0.1, M=E')dnl')
+dnl #---------------------- Debian MSP fixup -------------------------------
+dnl define(`confHOST_STATUS_DIRECTORY', `/var/lib/sendmail/host_status')dnl
+define(`confRUN_AS_USER', `mail')dnl
+define(`confTRUSTED_USER', `confRUN_AS_USER')dnl
+dnl #---------------------- back to nullclient carp ------------------------
+define(`_DEF_LOCAL_MAILER_FLAGS', `lsDFM5q')
+MASQUERADE_AS(_NULL_CLIENT_)
+FEATURE(`allmasquerade')
+FEATURE(`masquerade_envelope')
+MAILER(`local')
+MAILER(`smtp')
diff --git a/debian/cf/hack/nodns.m4 b/debian/cf/hack/nodns.m4
index 41216f1..1f3f71e 100644
--- a/debian/cf/hack/nodns.m4
+++ b/debian/cf/hack/nodns.m4
@@ -1,44 +1,17 @@
-divert(-1)
+divert(-1)dnl
+#-----------------------------------------------------------------------------
+# $Sendmail: ./nodns.m4,v 8.12.0 2001/08/24 12:00:00 cowboy Exp $
#
-# Copyright (c) 1983 Eric P. Allman
-# Copyright (c) 1988, 1993
-# The Regents of the University of California. All rights reserved.
+# Copyright (c) 1999-2001 Richard Nelson. 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.
+# hack/nodns.m4 m4 file for omitting DNS queries
#
-# 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.
+# If you've a better idea, please let me know
#
-divert(0)
-VERSIONID(`@(#)nodns.m4 8.1 (Debian) 19991013')
-divert(-1)
-LOCAL_CONFIG
+#-----------------------------------------------------------------------------
+divert(0)dnl
+VERSIONID(`$Id: nodns.m4,v @sm_version@@sm_revision@ @sm_date@ @sm_time@ cowboy Exp $')
undefine(`confBIND_OPTS')dnl
define(`confSERVICE_SWITCH_FILE', `/etc/mail/service.switch-nodns')dnl
-FEATURE(nocanonify)dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
-
-
+FEATURE(nocanonify)dnl
diff --git a/debian/cf/hack/spamtrap.m4 b/debian/cf/hack/spamtrap.m4
new file mode 100644
index 0000000..9acd2c3
--- /dev/null
+++ b/debian/cf/hack/spamtrap.m4
@@ -0,0 +1,62 @@
+divert(-1)dnl
+#-----------------------------------------------------------------------------
+# $Sendmail: ./spamtrap.m4,v 8.12.0 2001/09/24 12:00:00 cowboy Exp $
+#
+# hack(spamtrap) config file for building Sendmail
+#
+# Courtesy of jeff@sdsc.edu (Jeff Makey)
+# via c.m.s posting Sat, 8 Sep 2001 07:44:26 +0000 (UTC)
+#
+# Spamtrap addresses go into the access file like this:
+#
+# To:spamtrap@pandora.orbl.org POISON
+# To:Friend@public.com POISON
+#
+#-----------------------------------------------------------------------------
+#
+divert(0)dnl
+LOCAL_CONFIG
+# provide access to macros as a map
+Kmacro macro
+
+LOCAL_RULESETS
+######################################################################
+### spamtrap: handle spamtrap(POISON) users
+###
+######################################################################
+#
+# This is not only redundant, but fails with feature(`delay_checks')
+#
+#SLocal_check_mail
+# Clear the "poison recipient" indicator macro for this message.
+#R$* $: $(macro {PoisonRecipient} $) $1
+
+SLocal_check_rcpt
+#
+# Spamtrap addresses go into the access file like this:
+# To:spamtrap@pandora.orbl.org POISON
+#
+# Certain recipients are "poison" and cause the
+# message to be rejected for all recipients.
+R$* $: $1 $| $1 create workspace to right of $|
+R$* $| $* <$+> $* $1 $| $3 focus on part in angle brackets
+R$* $| $+ $: $1 $| $>SearchList <!To> $| <E:$2> <>
+R$* $| <POISON> $: $1 $| $(macro {PoisonRecipient} $@ POISON $)
+R$* $| $* $: $1 delete workspace
+
+Scheck_eoh
+R$* $: $&{PoisonRecipient}
+RPOISON $#error $@ 5.7.1 $: 550 Mail sent to spam lists is not accepted here
+
+#
+# With a "To:Friend@public.com POISON" entry in the access file the
+# following ruleset will block certain types of spam too:
+#
+# Certain To headers are sure-fire spam signatures.
+HTo: $>CheckTo
+SCheckTo
+R$+ , $+ $@ $1 , $2 do not try to verify complex addresses
+R$* $: $1 $| $>SearchList <!To> $| <E:$1> <>
+R$* $| <POISON> $#error $@ 5.7.1 $: 550 Mail sent by spamware is not accepted here
+R$* $| $* $: $1 delete lookup result
+
diff --git a/debian/cf/hack/virthost_by_ip.m4.in b/debian/cf/hack/virthost_by_ip.m4.in
new file mode 100644
index 0000000..d304213
--- /dev/null
+++ b/debian/cf/hack/virthost_by_ip.m4.in
@@ -0,0 +1,77 @@
+divert(-1)dnl
+#-----------------------------------------------------------------------------
+# $Sendmail: virthost_by_ip.m4,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 2001-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# hack(virthost_by_ip) config file for building Sendmail @sm_version@@sm_revision@
+# Note: Also check op.{ps,txt} for the 'b' modifier to daemon_options - it
+# extends ip based virtual hosting.
+#
+# Note: the .in file supports @SM_MINVERS@ - @SM_MAXVERS@, but the generated
+# file is customized to the version noted above.
+#
+#-----------------------------------------------------------------------------
+#
+divert(0)dnl
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # Bring in Autoconf results
+dnl #---------------------------------------------------------------------
+ifdef(`sm_version', `dnl',
+`include(`@datadir@/sendmail/cf/debian/autoconf.m4')dnl')
+dnl #
+VERSIONID(`$Id: virthost_by_ip.m4, v @sm_version@@sm_revision@ @sm_date@ @sm_time@ cowboy Exp $')
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # Virtual hosting extensions - Login (greeting message)
+dnl #---------------------------------------------------------------------
+define(`confSMTP_LOGIN_MSG', `$?{if_name}${if_name}$|$j$. Sendmail $v/$Z; $b; (No UCE/UBE) $?{client_addr}logging access from: ${client_name}(${client_resolve})-$_$.')dnl
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # Virtual hosting extensions - Received-by headers (8.12.0 style)
+dnl #---------------------------------------------------------------------
+dnl # 8.7.0+
+ifdef(`_REC_HDR_', `dnl',
+`define(`_REC_HDR_', `$?sfrom $s $.$?_($?s$|from $.$_)')dnl'
+`define(`_REC_END_', `for $u; $|;
+ $.$b')dnl'
+)
+dnl # AUTH(SASL) 8.10.0+
+ifdef(`_REC_AUTH_', `dnl',
+`define(`_REC_AUTH_', `$.$?{auth_type}(authenticated')dnl'
+`define(`_REC_FULL_AUTH_', `$.$?{auth_type}(user=${auth_authen} $?{auth_author}author=${auth_author} $.mech=${auth_type}')dnl'
+)
+dnl # TLS(SSL) 8.11.0+
+ifdef(`_REC_BY_', `dnl',
+`define(`_REC_BY_', `$.by $j ($v/$Z)$?r with $r$. id $i$?{tls_version}')dnl'
+`define(`_REC_TLS_', `(version=${tls_version} cipher=${cipher} bits=${cipher_bits} verify=${verify})$.$?u')dnl'
+)
+dnl # Now, override default settings for virtual hosting
+define(`_REC_BY_', `$.by $?{if_name}${if_name}$|$j$. ($v/$Z)$?r with $r$. id $i$?{tls_version}')dnl
+define(`confRECEIVED_HEADER', `_REC_HDR_
+ _REC_AUTH_$?{auth_ssf} (${auth_ssf} bits)$.)
+ _REC_BY_
+ _REC_TLS_
+ _REC_END_')dnl
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # Virtual hosting extensions - ClientPortOptions (modifier=h)
+dnl # -- Use name of interface for HELO command
+dnl #---------------------------------------------------------------------
+ifelse(eval(sm_version_math >= 526848), `1',dnl
+`ifelse(defn(`_CPO_'), `dnl',
+`CLIENT_OPTIONS(`Modifier=h')dnl')dnl')
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # Virtual hosting extensions - DaemonPortOptions (modifier=b)
+dnl # -- Bind to interface mail was received on
+dnl # I can't do this for you, because each use of DAEMON_OPTIONS will
+dnl # create a new listener !
+dnl #---------------------------------------------------------------------
+dnl ifelse(eval(sm_version_math >= 526848), `1',dnl
+dnl `ifelse(defn(`_DPO_'), `dnl',
+dnl `DAEMON_OPTIONS(`Modifier=b')dnl')dnl')
+
diff --git a/debian/cf/mailer/cyrus21.m4 b/debian/cf/mailer/cyrus21.m4
new file mode 100644
index 0000000..c12dce0
--- /dev/null
+++ b/debian/cf/mailer/cyrus21.m4
@@ -0,0 +1,66 @@
+PUSHDIVERT(-1)
+#
+# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+# 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.
+#
+#
+# This code incorporates code from Carnegie Mellon University, whose
+# copyright notice and conditions of redistribution are as follows:
+#
+#***************************************************************************
+# (C) Copyright 1995 by Carnegie Mellon University
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
+# provided that the above copyright notice appear in all copies and that
+# both that copyright notice and this permission notice appear in
+# supporting documentation, and that the name of CMU not be
+# used in advertising or publicity pertaining to distribution of the
+# software without specific, written prior permission.
+#
+# CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+# CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+# SOFTWARE.
+#
+# Contributed to Berkeley by John Gardiner Myers <jgm+@CMU.EDU>.
+#
+
+errprint(`*** Warning: cyrus21 deprecated in favour of cyrusv2')
+errprint(`*** Please migrate to cyrusv2 ASAP')
+
+ifdef(`CYRUS_MAILER_USER',, `define(`CYRUS_MAILER_USER', `cyrus:mail')')
+define(`_CYRUS_QGRP', `ifelse(defn(`CYRUS_MAILER_QGRP'),`',`', ` Q=CYRUS_MAILER_QGRP,')')dnl
+
+_DEFIFNOT(`CYRUS_MAILER_FLAGS', `AhmXz5@/:|')
+ifdef(`CYRUS_MAILER_PATH',, `define(`CYRUS_MAILER_PATH', `[IPC]')')
+ifdef(`CYRUS_MAILER_ARGS',, `define(`CYRUS_MAILER_ARGS', `FILE /var/run/cyrus/socket/lmtp')')
+
+_DEFIFNOT(`CYRUS_BB_MAILER_FLAGS', `SuX')
+ifdef(`CYRUS_BB_MAILER_PATH',, `define(`CYRUS_BB_MAILER_PATH', `/usr/sbin/cyrdeliver')')
+ifdef(`CYRUS_BB_MAILER_ARGS',, `define(`CYRUS_BB_MAILER_ARGS', `cyrdeliver -m $u')')
+
+POPDIVERT
+
+##################################################
+### Cyrus Mailer specification ###
+##################################################
+
+VERSIONID(`$Id: cyrus21.m4, v8.23.1 2002/04/05 12:36:34 Omniflux Exp $')
+
+Mcyrus, P=CYRUS_MAILER_PATH, F=_MODMF_(CONCAT(`lsDFMnq', CYRUS_MAILER_FLAGS), `CYRUS'), E=\r\n, S=EnvFromL, R=EnvToL/HdrToL,
+ ifdef(`CYRUS_MAILER_MAX', `M=CYRUS_MAILER_MAX, ')U=CYRUS_MAILER_USER, T=DNS/RFC822/X-Unix,_CYRUS_QGRP
+ A=CYRUS_MAILER_ARGS
+
+Mcyrusbb, P=CYRUS_BB_MAILER_PATH, F=_MODMF_(CONCAT(`lsDFMnq1', CYRUS_BB_MAILER_FLAGS), `CYRUS'), S=EnvFromL, R=EnvToL/HdrToL,
+ ifdef(`CYRUS_MAILER_MAX', `M=CYRUS_MAILER_MAX, ')U=CYRUS_MAILER_USER, T=DNS/RFC822/X-Unix,_CYRUS_QGRP
+ A=CYRUS_BB_MAILER_ARGS
diff --git a/debian/cf/ostype/debian.m4 b/debian/cf/ostype/debian.m4
deleted file mode 100644
index ddc04bc..0000000
--- a/debian/cf/ostype/debian.m4
+++ /dev/null
@@ -1,105 +0,0 @@
-divert(-1)
-#
-# Copyright (c) 1983 Eric P. Allman
-# 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.
-#
-# 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)dnl
-VERSIONID(`@(#)debian.m4 8.9.3-21 (Debian) 20000309')
-define(`confCF_VERSION', `Debian 8.9.3-21')dnl
-dnl #
-dnl # changes made herein *must* be reflected in parsemc,updatedb,debian.m4
-dnl #
-dnl # paths
-define(`_USE_ETC_MAIL_', `True')dnl # a little late for some items ;-{
-define(`DATABASE_MAP_TYPE', `hash')dnl # Default
-define(`STATUS_FILE', `/var/lib/sendmail/sendmail.st')dnl
-define(`confHOST_STATUS_DIRECTORY', `/var/lib/sendmail/host_status')dnl
-define(`HELP_FILE', `/usr/share/sendmail/sendmail.hf')dnl
-define(`confCR_FILE', `-o /etc/mail/relay-domains %[^\#]')dnl
-define(`confCT_FILE', `-o /etc/mail/trusted-users %[^\#]')dnl
-define(`confCW_FILE', `-o /etc/mail/local-host-names %[^\#]')dnl
-define(`confUSERDB_SPEC', `/etc/mail/users')dnl
-define(`ALIAS_FILE', `/etc/mail/aliases')dnl
-define(`confSERVICE_SWITCH_FILE', `/etc/mail/service.switch')dnl
-define(`confEBINDIR', `/usr/lib/sm.bin')dnl
-dnl #
-dnl # flags
-define(`confCON_EXPENSIVE', `True')dnl
-define(`confDIAL_DELAY', `45')dnl
-define(`confMAX_DAEMON_CHILDREN', `30')dnl
-define(`confNO_RCPT_ACTION', `add-to-undisclosed')dnl
-define(`confQUEUE_SORT_ORDER', `Host')dnl
-define(`confSAFE_FILE_ENV')dnl
-define(`confSAFE_QUEUE', `True')dnl
-define(`confTEMP_FILE_MODE', `600')dnl
-define(`confTO_ICONNECT', `30s')dnl
-dnl #
-dnl # features
-dnl #
-dnl # mailers
-define(`LOCAL_MAILER_PATH', `/usr/lib/sm.bin/sensible-mda')dnl
-dnl define(`LOCAL_MAILER_FLAGS', `mnru9')dnl
-define(`LOCAL_MAILER_FLAGS', `hnPu90')dnl
-define(`LOCAL_MAILER_ARGS', `sensible-mda $g $u $h ${client_addr}')dnl
-define(`LOCAL_SHELL_FLAGS', `u90')dnl
-define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
-define(`USENET_MAILER_PATH', `/usr/bin/inews')dnl
-#
-# These undocumented features are available in Debian sendmail.
-# O PidFile=/var/run/sendmail.pid
-# O DontProbeInterfaces=False
-# O MaxRecipientsPerMessage=
-# O DeadLetterDrop=False
-# O RrtImpliesDsn=False
-#
-# Sendmail 8.9.1a patch for mime headers to protect the various MUAs:
-# This option causes MIME headers to be truncated to a total of 256
-# characters; no individual field is permitted to exceed 128
-# characters. These values should be safe for the common mail clients
-# that are vulnerable.
-#
-# Note: there is a speed trade here, as the entire message must be scanned
-#O MaxMimeHeaderLength=256/128
-#`define'(`confMAX_MIME_HEADER_LENGTH', `256/128')
-define(`confMAX_MIME_HEADER_LENGTH', `256/128')dnl
-#
-# Sendmail 8.9.3 fix for header based DOS
-# Number of bytes allowed for mail headers, default=32k.
-#O MaxHeadersLength=32768
-#`define'(`confMAX_HEADERS_LENGTH', `32768')
-define(`confMAX_HEADERS_LENGTH', `32768')dnl
-dnl #
-dnl # Debian users have group writable directories/files by default...
-define(`confDONT_BLAME_SENDMAIL', `ClassFileInUnsafeDirPath,ForwardFileInGroupWritableDirPath,GroupWritableAliasFile,GroupWritableForwardFileSafe,GroupWritableIncludeFileSafe,IncludeFileInGroupWritableDirPath,MapInUnsafeDirPath')dnl
-#
-DOMAIN(generic)dnl
-LOCAL_CONFIG
diff --git a/debian/cf/ostype/debian.m4.in b/debian/cf/ostype/debian.m4.in
new file mode 100644
index 0000000..bf48888
--- /dev/null
+++ b/debian/cf/ostype/debian.m4.in
@@ -0,0 +1,110 @@
+divert(-1)dnl
+#-----------------------------------------------------------------------------
+# $Sendmail: debian.m4,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# ostype(debian) config file for building Sendmail @sm_version@@sm_revision@
+#
+# Note: the .in file supports @SM_MINVERS@ - @SM_MAXVERS@, but the generated
+# file is customized to the version noted above.
+#
+#-----------------------------------------------------------------------------
+#
+divert(0)dnl
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # Bring in Autoconf results
+dnl #---------------------------------------------------------------------
+ifdef(`sm_version', `dnl',
+`include(`@datadir@/sendmail/cf/debian/autoconf.m4')dnl')
+dnl #
+VERSIONID(`$Id: debian.m4, v @sm_version@@sm_revision@ @sm_date@ @sm_time@ cowboy Exp $')
+define(`confCF_VERSION', `Debian@sm_revision@')dnl
+dnl #
+dnl # changes made herein *must* be reflected in parse_mc,update_db,debian.m4
+dnl #
+ifdef(`MAIL_SETTINGS_DIR', `dnl',
+ `define(`MAIL_SETTINGS_DIR', `@sysconfdir@/mail/')dnl')
+dnl # support 8.9.3 migration to 8.10.0 naming convention
+dnl # Note: this is too late... needs to be in sendmail.mc - at top
+ifdef(`_USE_ETC_MAIL_', `dnl', `define(`_USE_ETC_MAIL_')dnl')
+dnl #
+dnl # Define default greeting
+define(`confSMTP_LOGIN_MSG', `$j Sendmail $v/$Z; $b; (No UCE/UBE) $?{client_addr}logging access from: ${client_name}(${client_resolve})-$_$.')dnl
+dnl #
+dnl # Keep dead letter drop, it is the last resort home for abused mail
+define(`confDEAD_LETTER_DROP', `@localstatedir@/lib/sendmail/dead.letter')dnl
+dnl #
+dnl # Put status file in other than /etc/mail (sendmail default)
+dnl # Many people run with R/O /etc
+define(`STATUS_FILE', `@localstatedir@/lib/sendmail/sendmail.st')dnl
+define(`confHOST_STATUS_DIRECTORY',
+ `@localstatedir@/lib/sendmail/host_status')dnl
+dnl #
+dnl # Allow scanf extensions for common text files
+define(`confCR_FILE', `-o '`MAIL_SETTINGS_DIR`'relay-domains %[^\#]')dnl
+define(`confCT_FILE', `MAIL_SETTINGS_DIR`'trusted-users %[^\#]')dnl
+define(`confCW_FILE', `MAIL_SETTINGS_DIR`'local-host-names %[^\#]')dnl
+dnl #
+dnl # This *really* needs a better home
+define(`confEBINDIR', `@libexecdir@')dnl
+dnl #
+dnl # add .' to mustquote chars (and match the binary default)
+changequote([, ])dnl
+define([confMUST_QUOTE_CHARS], [.'])dnl
+changequote(`, ')dnl
+dnl #
+dnl # Default in 8.10+, used to be false (iirc), deprecated
+define(`confME_TOO', `True')dnl
+dnl #
+dnl # Set the default user/group for mailers (mail:mail)
+dnl # this should help NIS startup time
+dnl #
+define(`confDEF_USER_ID', `mail:mail')dnl
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # mailer paths and options
+dnl #---------------------------------------------------------------------
+define(`LOCAL_MAILER_PATH', `@libexecdir@/sensible-mda')dnl
+define(`LOCAL_MAILER_ARGS', `sensible-mda $g $u $h ${client_addr}')dnl
+define(`LOCAL_MAILER_FLAGS', `SPhnu9')dnl
+define(`LOCAL_SHELL_FLAGS', `u9')dnl
+define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
+define(`PROCMAIL_MAILER_ARGS', `procmail -m $h $f $u')dnl
+define(`USENET_MAILER_PATH', `/usr/bin/inews')dnl
+dnl #
+dnl # Optional items (should be a subset site.config.m4 used for build)
+dnl # to prevent sendmail error messages
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # IPv6 support (new option for 8.12+)
+dnl # IPv6 causes problems for some DNS servers, work around them
+dnl #---------------------------------------------------------------------
+ifelse(sm_enable_ipv6, `yes',dnl
+`ifelse(eval(sm_version_math >= 527360), `1',dnl
+`define(`confBIND_OPTS', `+WorkAroundBrokenAAAA')dnl')')
+dnl #
+dnl #---------------------------------------------------------------------
+dnl # Milter (8.10.0-8.11.0) built-in with 8.12.0+
+dnl #---------------------------------------------------------------------
+ifelse(sm_enable_milter, `yes',dnl
+`define(`_FFR_MILTER')dnl')
+#
+#-------------------------------------------------------------------------
+#
+# Undocumented features are available in Debian Sendmail @sm_version@@sm_revision@.
+# * none
+#
+# _FFR_ features are available in Debian Sendmail @sm_version@@sm_revision@.
+ifelse(sm_enable_milter, `yes',dnl
+`# * milter')
+# * sm_ffr
+#-------------------------------------------------------------------------
+#
+# These _FFR_ features are for sendmail.mc processing
+#
+@sm_m4_ffr@
+#-------------------------------------------------------------------------
diff --git a/debian/changelog b/debian/changelog
index 485e1be..255a001 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,1043 +1,96 @@
-sendmail (8.9.3-26.1) oldstable-security; urgency=high
+sendmail (8.12.3-7.1) stable-security; urgency=high
* Non-maintainer upload by the Security Team
- * Create temporary files securely
- Report and patches from Paul Szabo <psz@maths.usyd.edu.au>
- [debian/checksendmail/checksendmail.perl,
- contrib/doublebounce.pl,
- contrib/expn.pl]
- (Closes: #173243)
-
- -- Matt Zimmerman <mdz@debian.org> Thu, 24 Apr 2003 12:57:36 -0400
-
-sendmail (8.9.3-26) oldstable-security; urgency=high
-
- * Buffer overflow in parsing routines closes: #186768
- Claus Assmann <ca+announce@sendmail.org> writes:
- > We apologize for releasing this information today (2003-03-29) but
- > we were forced to do so by an e-mail on a public mailing list (that
- > has been sent by an irresponsible individual) which contains
- > information about the security flaw.
- [...]
- > SECURITY: Fix a buffer overflow in address parsing due to
- > a char to int conversion problem which is potentially
- > remotely exploitable. Problem found by Michal Zalewski.
- > Note: an MTA that is not patched might be vulnerable to
- > data that it receives from untrusted sources, which
- > includes DNS.
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Sun, 30 Mar 2003 13:10:00 -0500
-
-sendmail (8.9.3-25) oldstable-security; urgency=high
-
- * -O0 (to get past ARM)
- * Remote exploit (CERT Advisory CA-2003-07)
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 03 Mar 2003 19:50:00 -0500
-
-sendmail (8.9.3-24) oldstable-security; urgency=high
-
- * Remote exploit (CERT Advisory CA-2003-07)
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 03 Mar 2003 18:00:00 -0500
-
-sendmail (8.9.3-23) frozen; urgency=low
-
- * Release manager - All these bugs are capable of stopping an upgrade
- of slink->potato *DEAD* This really needs to be installed !
- * depend upon a recent dpkg to get a fixed start-stop-daemon
- * support nis maps in Makefile, updatedb (closes: #65322)
- . debian/local/parsemc, debian/local/updatedb
- * hamm -> potato upgrade error (closes: #64815)
- . debian/sendmail.postinst
- * Quiet /etc/init.d/sendmail stop (closes: #64631,#63610,#64686)
- and also drop redundant --stop (closes: #64345)
- . debian/sendmail.init.d
- * Debian-specific file to summarize Debian vs Sendmail differences
- . debian/Debian-specific
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 25 May 2000 17:00:00 -0500
-
-sendmail (8.9.3-22) frozen; urgency=high
-
- * Fix unsafe fgets in mail.local, based on the upstream patch for 8.10.1
- Non-maintainer upload by security team (thanks Wichert).
- * sendmail.cf/mailer/cyrus.m4 incompatible with Debian package
- Thanks Manoj Srivastava (closes: bug #63441)
- * revert fix for 55485 because it doesn't really solve the problem:
- the problem specifically noted in the 8.10 cf/README:
-
- NOTICE: It is possible to relay mail through a system which the anti-relay
- rules do not prevent: the case of a system that does use FEATURE(`nouucp',
- `nospecial') (system A) and relays local messages to a mail hub (e.g., via
- LOCAL_RELAY or LUSER_RELAY) (system B). If system B doesn't use
- FEATURE(`nouucp') at all, addresses of the form
- <example.net!user@local.host> would be relayed to <user@example.net>.
- System A doesn't recognize `!' as an address separator and therefore
- forwards it to the mail hub which in turns relays it because it came from
- a trusted local host. So if a mailserver allows UUCP (bang-format)
- addresses, all systems from which it allows relaying should do the same
- or reject those addresses.
-
- The bottom line here is basically that a certain *combination* of nouucp
- and non-nouucp on different hosts can open up for multi-level relaying,
- which of course makes it difficult for a pre-packaged version to do "the
- right thing", given that it can't make assumptions about what type of
- systems it gets installed on. Best is probably to not have it use
- FEATURE(nouucp) in 8.9.3, as this is (of course) the default.
- --Per Hedeland
-
- I've taken the approach of properly warning the user in sendmailconfig
- . debian/local/sendmailconfig (closes: bug#55485)
-
- * Remove --exec parameter from start-stop-daemon --stop as it can prevent
- orderly shutdown of sendmail during postinst (use just --PIDFILE)
- . debian/sendmail.init.d (closes: #60282)
- * Several older bugs got marked as NMU fixed...
- . closes: #24608,#24612,#31138,#32409,#34285,#34405,#34715
- . closes: #34722,#34789,#35548,#36067,#38783,#39021,#41325
- . closes: #42041,#42265,#43241,#44035,#44797
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 08 May 2000 12:00:00 -0500
-
-sendmail (8.9.3-21) frozen; urgency=low
-
- * (RC) _NO_UUCP_ test was backwards in proto.m4, causing relay hole
- for sites that used FEATURE(nouucp)
- . debian/patches/patch.nouucp (closes: #55485)
- * (RC) Sigh, Correct FEATURE(rbl), dns site renamed (closes: #55301)
- . debian/patches/mrbl.p3
- * complete rename of /etc/mail/sendmail.ct to /etc/mail/trusted-users
- . debian/cf/ostype/debian.m4 (closes: #54552)
- . debian/cf/cf/debproto.mc
- * Don't assume make is installed and don't use it in postrm (closes: #57051)
- . also noted as (closes: #59258)
- * Return-Path 53173 duplicate (closes: #58003)
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 09 Mar 2000 14:00:00 -0500
-
-sendmail (8.9.3-20) unstable; urgency=low
-
- * Properly handle sendmail.cf being a soft symbolic link (closes: #51782)
- . debian/sendmail.cron.daily
- * Remove start-as so /etc/init.d/sendmail actually stops ;-0
- . debian/sendmail.init.d
- * add Return-Path: on delivery (closes: #53173)
- . debian/cf/ostype/debian.m4
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Fri, 07 Jan 2000 15:05:00 -0500
-
-sendmail (8.9.3-19) unstable; urgency=low
-
- * don't wait for subordinate processess to finish... they may not
- end for quite a while -- caused 2min delays during ip-up
- . debian/sendmail.init.d
- * don't stop sendmail in prerm unless this is a removal
- . debian/sendmail.prerm
- * patched against local user running sendmail -bi, DoS (closes: #51126)
- * provide default /etc/mail/aliases if none found (closes: #51609)
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Wed, 1 Dec 1999 15:05:00 -0500
-
-sendmail (8.9.3-18) unstable; urgency=low
-
- * no longer stop sendmail in preinst, wait until postinst (closes: #48136)
- . debian/sendmail.{pre,post}inst
- * uucp *does* put rmail in /usr/sbin... (closes: #48496)
- * improve updatedb error message on missing file (closes: #49924)
- . debian/local/updatedb
- * remove /usr/sbin/hoststat - newscache has it also (closes: #49875)
- . debian/rules
- * improve vnet/lotus notes support
- . debian/cf/feature/vnet.m4
- * cleanup dependancies - build and runtime
- . debian/control
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Tue, 16 Nov 1999 14:05:00 -0500
-
-sendmail (8.9.3-17) unstable; urgency=low
-
- * updatedb no longer prompts when an error is seen
- . debian/local/updatedb
- * add vacation to the default list of commands for smrsh
- . debian/rules
- * Conforms to Standards version 3.1.0:
- . debian/control: Added build dependancies.
- . debian/local/site.config.m4.in: Using `-O2 -g -Wall' for CFLAGS.
- * close a window wherein sendmail.cf didn't exist (use cp instead of mv)
- . debian/sendmail.postinst
- * parsemc didn't handle `userdb.db` (closes: #49351)
- . debian/local/parsemc
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 08 Nov 1999 15:05:00 -0500
-
-sendmail (8.9.3-16) unstable; urgency=low
-
- * updatedb failed to create link for /etc/aliases (closes: #48535)
- a mv command just ahead of it died first ;-{
- . debian/local/updatedb
- * permissions on files should be 06x4, not 06x0 (closes: #48509)
- I these execs from my (tightly clamped) system
- . debian/sendmail.postinst
- . debian/local/parsemc
- . debian/local/updatedb
- * postinst failure if run whilst the network is down (closes: #48521)
- Can't tell if messages from m4 are error, informational ;-{
- . debian/sendmail.postinst
- * move mailq back to /usr/bin
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 28 Oct 1999 12:00:00 -0500
-
-sendmail (8.9.3-15) unstable; urgency=low
-
- * source builds still fubar... chmod a+x debian/configure (closes: #48469)
- . debian/rules
- * /etc/ppp/ip-{up,down}.d/sendmail now both use /etc/init.d/sendmail reload
- instead of restart/stop. (closes: #48374)
- . debian/local/ip-{up,down}.d
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Wed, 27 Oct 1999 11:00:00 -0500
-
-sendmail (8.9.3-14) unstable; urgency=low
-
- * use autoconfig for NISPLUS so sendmail builds ok on m68k (closes: #48289)
- . debian/local/site.config.m4.in
- . debian/local/configure.in
- . debian/rules
- * problem with smarthost and sendmailconfig (email report)
- . debian/local/sendmailconfig
- * don't keep persistant host status while the network is down
- . debian/local/ip-down.d
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 25 Oct 1999 15:00:00 -0500
-
-sendmail (8.9.3-13) unstable; urgency=low
-
- * remove basename from parsemc for `force` option (closes: #48106)
- . debian/local/parsemc
- * /etc/mail/Makefile now handles optional databases (closes: #48107)
- . debian/local/parsemc
- * close a previous fixed problem (closes: #47715)
- . fixed -9, was hoping to get more info on possible parse error ...
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Sun, 24 Oct 1999 16:00:00 -0500
-
-sendmail (8.9.3-12) unstable; urgency=low
-
- * remove FEATURE(access_db) from debian.m4 (closes: #47905)
- . debian/cf/ostype/debian.m4
- * redo sensible-mda.8 (closes: #21768)
- . debian/local/sensible-mda.8
- * warn users, who skip sendmailconfig, that they may have problems
- if any files have moved (ie smrsh) (closes: #47936)
- . debian/sendmail.postinst
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 21 Oct 1999 10:30:00 -0500
-
-sendmail (8.9.3-11) unstable; urgency=low
-
- * updatedb dies, preventing configuration (closes: #47827, #47838)
- . debian/local/updatedb
- * a few more updatedb problems (closes: #47887)
- . bad redirection (sigh)
- . make /etc/alias link relative
- - debian/local/updatedb
- * more 8.10 preparedness
- . /etc/mail/sendmail.ct -> /etc/mail/trusted-users
- - debian/local/updatedb
- - debian/local/parsemc
- - debian/local/sendmailconfig
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Wed, 20 Oct 1999 10:30:00 -0500
-sendmail (8.9.3-10) unstable; urgency=low
-
- * switch sense of optional database tests added in -9
- . debian/local/updatedb
- * to mimize load (via #children), change rmail to use -odi
- . debian/patches/patch.rmail
- * Don't replace Makefile if the current one isn't auto generated
- . debian/local/parsemc (closes: #47733)
- * prerm script fails if sendmail isn't running (closes: #47547, #47758)
- . debian/sendmail.{pre,post}{inst,rm}: verify -e
- . debian/sendmail.init.d: add --oknodo to stop
- * remove /usr/bin/rmail link (leaving in /usr/sbin in conformance w/policy)
- . debian/rules
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Tue, 19 Oct 1999 10:00:00 -0500
-
-sendmail (8.9.3-9) unstable; urgency=low
-
- * updated wouldn't generate aliases.db if the file was empty, or only
- contained comments (reported via email)
- . debian/local/updatedb
- * remove peers from provider.m4 in Makefile
- .debian/local/parsemc
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 18 Oct 1999 15:35:00 -0500
-
-sendmail (8.9.3-8) unstable; urgency=low
-
- * sendmailconfig used old location for smrsh
- . debian/local/sendmailconfig (closes: #47713)
- * Makefile missed .m4 extension for provider
- . debian/local/parsemc
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 18 Oct 1999 10:40:00 -0500
-
-sendmail (8.9.3-7) unstable; urgency=low
-
- * control and changelog now agree on who I am
- . debian/control
- * extraneous trailing blank kills awk (but not mawk) ;-{
- . debian/local/parsemc (closes: #47539)
- * improper variable reference in sendmailconfig
- . debian/local/sendmailconfig (closes: #47526)
- * switch order of arguments to procmail
- . debian/local/sensible-mda (closes: #47534)
- * add minimal help information to sensible-mda
- . debian/local/sensible-mda (closes: #47532)
- * parsemc doesn't work under ash, magic is now #!/bin/bash
- . debian/local/parsemc (closes: #47575)
- * bug list cleanup
- . smrsh manpage fixed in 8.9.3-3 (closes: #40024)
- . sendmail/nscd now coexists much better, fixed in 8.9.3-3 (closes: #40363)
- . 8.9.3-3 should've fixed children segfaulting (closes: #45093)
- . No answer to information requests (closes: #40922)
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Sat, 16 Oct 1999 12:00:00 -0500
-
-sendmail (8.9.3-6) unstable; urgency=low
-
- * ************* IMPORTANT ********************
- Please see /usr/share/doc/sendmail/changelog.Debian.gz for
- the 8.9.3-4 changes ! That version had significant changes
- and fixed the following 20 problems (but was only tested by a few):
- closes: #43241,#39021,#31138,#42265,#44035,#38783,#36067,#34715
- closes: #24608,#42041,#41325,#34789,#44797,#34722,#34285,#32409
- closes: #24612,#29420,#35548,#34405
- * Ok, back to our regulary scheduled programming
-
- * add dependancies on sendmail.cf for dialup.m4 and provider.m4
- * create /etc/mail/peers/provider (new conffile)
- * prevent shell expansion in someplace in /etc/init.d/sendmail
- This will allow the new queue checking code to work properly
- * Note that the following are very interdependant:
- . debian/local/parsemc
- . debian/local/updatedb
- . debian/cf/ostype/debian.m4
- * cleanup and extend configuration
- . debian/local/updatedb
- . debian/local/parsemc
- * Don't let /etc/ppp/ip-up.d/sendmail overwrite /etc/mail/provider.m4
- when it is a link - for single provider cases.
- . debian/local/ip-up.d
- * User database is optional !
- . debian/local/parsemc
- * save /etc/mail/sendmail.{mc,cf} to /var/backups
- . debian/sendmail.cron.daily
- . debian/sendmail.postinst
- * Postinst now asks before overwriting /etc/mail/sendmail.cf
- . debian/sendmail.postinst
- * /var/sendmail -> /var/lib/sendmail
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Fri, 15 Oct 1999 14:00:00 -0500
-
-sendmail (8.9.3-5) stable; urgency=low
- * "slink" (stable) version of "potato" (unstable) sendmail-8.9.3-6
- Please see its changelog for further information
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Fri, 15 Oct 1999 14:00:00 -0500
-
-sendmail (8.9.3-4) unstable; urgency=low
-
- * The `back from the dead` release
- Ok... Between glibc 2.1 breaking socksification and IBM having
- severe problems with email... not to mention health & vacation
- problems... I've procrastinated enough ;-{
- Sending the currently complete items out to allow further testing.
- The sendmailconfig rewrite has been held up pending some head bashing
- (my own).
- * Vastly superior postinst/sendmailconfig setup, still more to do
- will move sendmailconfig to debconf ASAP. But the current version:
- . Automagically updates sendmail.cf and any related databases upon
- each new release
- . Creates /etc/mail/Makefile that can be used to updated sendmail.cf
- and related databases anytime
- . Creates/updated databases when sendmailconfig is run, and sendmail.mc
- has changed. (closes: bug#43241)
- . Moves/Renames databases according to FHS and Sendmail suggestions
- . text mailertable -> hash mailertable (closes: bug#39021)
- * Ship plain text faq (email request)
- * Have rmail call sendmail with background delivery instead of queueing.
- Local email will be delivered immediately, and sendmail automatically
- queues everything else anyway (at least with the supersafe option which
- debian provides by default). (closes: bug#31138) - though he wanted
- -odi, and I used -odb
- * Update ip-{up,down}.d/sendmail sample to properly handle dialup hosts!
- the domain name, and Cw are updated based upon the allocated IP.
- The idea comes from, and (closes: bug#42265)
- * /etc/init.d/sendmail now checks for -d /usr/share/sendmail
- instead of /usr/doc/sendmail. This'll prevent NFS and partial
- migration problems (closes: bug#44035)
- * Start on example files (mailertable, etc): please checkout
- /usr/share/doc/sendmail/examples/db-examples and let me know
- what you think -- please contribute other examples !
- * Finally, lintian clean ;-}
- * Standards 3.0.1, Debhelper v2 (with only a few kluges in debian/rules) ;-}
- . debian/rules
- * Don't start sendmail daemon if nullclient, or if smptd is installed
- . debian/sendmail.init.d (partial fix for 35220) and request of smptd
- maintainer
- * add NoRecipienAction = add-to-undisclosed (suggested setting)
- . debian/debian.m4
- * Add mime header patches from c.m.s
- * SPAM:
- -- Add imrss, dssl FEATUREs (see www.imrss.org)
- Done using new rbl support
- -- Drop orca/orbs in favour of mrbl patch from C.A.
- They still work this release, by internally using the new rbl support
- * Make sure FEATURE(local_procmail) comes before MAILER(local)
- This will keep accidents from happening where plussed mail
- gets broken... Helps with 34722 (closes: bug#38783)
- * Add FEATURE(dont_masquerade_local),
- suggested by our fearless leader ;-} (closes: bug#36067)
- . This will prevent local address from being rewritten during local
- delivery. This most likely also fixes 34715 (closes: bug#34715)
- * Enable mail.local -- for its LMTP support, it may become the default
- and then wouldn't require procmail | deliver ! ;-}
- Will not work via sensible-mda, however ;-{
- . use FEATURE(local_lmtp) to enable
- * Enabled NISPLUS for glibc 2.1
- * Finally support /etc/mail/service.switch (ie, /etc/nsswitch.conf)
- This file was never really consulted, as the default name didn't
- match what Debian uses. We can't use the real one because sendmail
- doesn't (for the nonce) support this format.
- Also, corrected HACK(nodns) to use /etc/mail/service.switch-nodns
- and to remove FEATURE(nodns). (closes: bug#24608)
- * Start of LDAP support..
- . support compiled into sendmail for OpenLDAP
- . added FEATURE(ldap,``parms'')dnl
- . minimal testing, will do more - feel free ;-}
- . Will need to wait for next release ;-{
- * Fix smrsh manpage: /usr/adm/sm.bin->/usr/lib/sm.bin (closes: bug#40024)
- * Update to use glibc 2.1, and use its libdb (closes: bug#41325)
- . Previous bugs reported due to libdb2 problems - (closes: bug#34789)
- . also removes problem of specific libdb2 dependancy (closes: bug#44797)
- * sensible-mda updates
- . sensible-mda breaks plussed mail (user+arg@domain) (closes: bug#34722)
- . debian/sensible-mda.c
- . debian/cf/ostype/debian.m4
- * debian cleanup
- . perl5 | perl suggestion
- . remove bashisms from {pre,post}{inst,rm}
- . debian/rules
- . basically a complete rewrite
- . handle Debian patches during build and install
- . remove bashisms
- . debian/sendmail.conffiles
- . remove /etc/aliases as a conffile (reported via IRC)
- . debian/sendmail.postinst
- . yet another rewrite
- . correct "you you" (closes: bug#34285)
- . correct upgrade message with /etc/ -> /etc/mail (closes: bug#32409)
- * Don't automagically create sendmail.st, and henceforth preserve it
- across upgrades if it exists.
- . debian/rules -- rm debian/tmp/var/sendmail/sendmail.st
- . debian/sendmail.postinst -- mv /var/log/sendmail.st /var/sendmail/...
- * Sendmail compliance:
- . Move /etc/mail/sendmail.cw to /etc/mail/local-host-names
- . Move /etc/aliases to /etc/mail/aliases and symlinks the two
- so that current users of /etc/aliases continue to work and
- the databases get built inside /etc/mail instead of /etc/
- * FHS:
- . Move /usr/doc to /usr/share/doc
- . debian/rules
- . Move /usr/man to /usr/share/man
- . debian/local/site.config.m4
- . Move /var/log/sendmail.st to /var/sendmail/sendmail.st
- . debian/sendmail.postinst, debian/debian.m4
- . Move /var/state/sendmail to /var/sendmail/host_status
- . debian/sendmail.postinst, debian/debian.m4
- . Move /usr/tmp/dead.letter to /var/sendmail/dead.letter
- . This means mail is *no longer lost, but put herein*
- . debian/site.config.m4 (closes: bug#24612)
- * Properly fix FHS locations (bug#29420 from 8.9.1-16)
- Sigh... If one puts the define in the wrong place, it doesn't work
- . FHS: Move FEATURE(xxx) databases from /etc/ to /etc/mail/: (#29420)
- bitdomain.m4, domaintable.m4, genericstable.m4, mailertable.m4,
- uucpdomain.m4, virtusertable.m4
- . Partial fix for 35548, except for /etc/aliases (closes: bug#35548)
- * Note that 8.9.3-3 also fixes part of 34405: allowing group writable
- home and .forward... I'm not going to change sendmail's treatment
- of DontBlameSendmail from permanent to temporary - though I think
- there might be a valid case for this! (closes: bug#34405)
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Tue, 04 Oct 1999 17:33:21 -0500
-
-sendmail (8.9.3-3) stable unstable; urgency=low, closes=35357
-
- * group writable home, .forward (closes: bug#35357)
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Sun, 18 Apr 1999 21:00:00 -0500
-
-sendmail (8.9.3-2) unstable; urgency=low, closes=33656 33602 33405
-
- * sendmail.postrm not doing suidunregister (closes: bug#33656)
- Well, actually it tried... it was just in the wrong spot
- * /etc/init.d/sendmail runs even after sendmail removed (closes: bug#33602)
- Since policy calls for all MTAs to supply /usr/sbin/sendmail, and
- /etc/mail/sendmail.cf was only deleted upon purge, I'm following
- the suggestion of checking for /usr/doc/sendmail
- * add purgestat to /usr/doc/sendmail/examples/ip-up.d (closes: bug#33405)
- This will allow all mail to be delivered - this is only an example
- file, however, so you'll have to edit you're /etc/ppp/ip-up.d/sendmail
- file yourself
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 22 Feb 1999 13:14:21 -0500
-
-sendmail (8.9.3-1) frozen unstable; urgency=high, closes=33152 32872
-
- * Refit Debian changes
- . debian/site.config.m4 -- new defines for DOS fix
- . debian/debian.m4 -- new defines for DOS fix, bump version
- . debian/sendmail.postinst -- bump version to coerce sendmailconfig run
- * New upstream version - bugfix only (closes: bug#33152)
- . New version of DOS patch
- . preserve order of MIME headers, correcting PGP signature problems
- * FHS & Debian policy 5.5: move /bin/rmail to /sbin/rmail (closes: bug#32872)
- sigh... This time, create a symlink so both exist
- . debian/rules
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Wed, 10 Feb 1999 13:14:21 -0500
-
-sendmail (8.9.2-4) unstable; urgency=low
-
- * debian/site.config.m4
- . link with -ldb2 (sigh) why did glibc let me get away with
- this obvious error? glibc-2.1 doesn't...
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 25 Jan 1999 15:00:00 -0500
-
-sendmail (8.9.2-3) frozen unstable; urgency=high
-
- * Yet another DOS attack from BugTraq -- patch from sendmail.org
- . debian/site.config.m4 --
- . debian/debian.m4 --
- . src/conf.h --
- . src/collect.c --
- . src/sendmail.h --
- . src/readcf.c --
- . src/conf.c --
- . cf/m4/proto.m4 --
- * Correct orca (ORBS) address to relays.orbs.org
- . debian/orbs.m4 -- relays.orbs.org
- . cf/m4/proto.m4 -- http://www.orbs.org
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 21 Jan 1999 15:00:00 -0500
-
-sendmail (8.9.2-2) frozen unstable; urgency=high
-
- * Re upload to make both frozen and unstable.
- The DOS update and nullclient (open relay) problems are severe
- enough that I, and others, think this should make frozen.
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Wed, 20 Jan 1999 14:00:00 -0500
-
-sendmail (8.9.2-1) unstable; urgency=high, closes=30292
-
- * New upstream source, bug fixes and a DOS fix
- . syslog filling/DOS (#30292)
- . libdb2 (Berkeley DB 2.6.4 API change)
- . upstream inclusion of proto.m4 patches already in Debian
- . upstream fixes for FHS issue wrt /etc/mail
- * Update debproto.m4 for 8.9.2
- * Drop Debian support of nullclient - it turns one into an unchecked relay!
- current nullclients are converted to smarthosts with no loss of function-
- ality.
- . sendmailconfig
- * See changelog for the unreleased 8.9.1-16 changes contained herein
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Tue, 05 Jan 1999 12:00:00 -0500
-sendmail (8.9.1-16) unstable; urgency=low, closes=27355 28410 28931 29420 30447
-
- * Correct HACK(nodns) (#30447)
- * Compile with new libc6 to remove versioned depends (#28931)
- * add feature(orca): Dial User List
- at the request of Paul Haggart <ph@bsfh.org>
- * Correct README.Debian reference (#29613)
- /usr/lib/sendmail.cf -> /usr/share/sendmail.cf
- * Correct include library path for libdb2
- * Update debproto.m4 for 8.9.1a, add proper diversion tags to
- sendmailconfig
- * Add MapInUnsafeDirPath to DontBlameSendmail (#27355)
- so access.db may be in group writable directory
- * FHS: Move FEATURE(xxx) databases from /etc/ to /etc/mail/: (#29420)
- bitdomain.m4, domaintable.m4, genericstable.m4, mailertable.m4,
- uucpdomain.m4, virtusertable.m4
- -- IMPORTANT --
- sendmailconfig can't automagically move all this for you, you'll
- have to move the datasets and any update script by hand
- * make the postinst actually wait for enter (#28410)
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 30 Nov 1998 12:00:00 -0500
-
-sendmail (8.9.1-15) unstable; urgency=high, closes=28410
-
- * The change to libdb2 requires that *all* sendmail databases be
- rebuilt before sendmail restarts. A warning is now issued to
- inform the user of this change. (#28410)
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Fri, 23 Oct 1998 12:00:00 -0500
-
-sendmail (8.9.1-14) unstable; urgency=low, closes=28279
-
- * sendmail: adds multiple Content-Transfer-Encoding headers (#28279)
- patch sent by Miquel van Smoorenburg <miquels@cistron.nl>
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Tue, 20 Oct 1998 18:00:00 -0500
-
-sendmail (8.9.1-13) unstable; urgency=low
-
- * add feature(orbs): Open Relay Blocking System
- at the request of Paul Haggart <ph@bsfh.org>
- * patch for sendmail stalls on 2.0.x kernels
- from Ben Gertzfield <che@debian.org>
- * Build with libdb2 instead of libdb. This chanage is mentioned as being
- important in the sendmail documentation, and has been requested by both
- i386 and sparc folks.
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Tue, 20 Oct 1998 12:00:00 -0500
-
-sendmail (8.9.1-12) unstable; urgency=high, closes=28226
-
- * erf... remove sendmail.real from sendmail.postinst (#28226)
- I have to remember to test on the machine w/o socks as well ;-{
- ('twould be nice to have the source in a neutral CVS repository
- so I could access from home and work)
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Tue, 20 Oct 1998 10:00:00 -0500
-
-sendmail (8.9.1-11) unstable; urgency=high
-
- * Correct /etc/init.d/sendmail
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 19 Oct 1998 11:00:00 -0500
-
-sendmail (8.9.1-10) unstable; urgency=high, closes=28034 27106 26855 27218
-
- * Remove socks wrapper - need a wrapper program, not script as sendmail -F
- doesn't work going from the socks wrapper, the runsocks wrapper, and then
- finally to sendmail (#28034 and also #27106)
- * sendmail wrapper requires bash for exec -a (#26855)
- * sendmail wrapper was suid-root (#27218)
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Sun, 18 Oct 1998 12:00:00 -0500
-
-sendmail (8.9.1-9) unstable; urgency=high, closes=26803
-
- * correct the socks wrapper for non-socks case - I pulled
- the wrong copy (#26803)
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 17 Sep 1998 12:00:00 -0500
+ * Corrected the patch to not use default settings for the sasldb
+ [debian/local/update_auth.in, CAN-2004-0833]
-sendmail (8.9.1-8) unstable; urgency=high, closes=26801
+ -- Martin Schulze <joey@infodrom.org> Mon, 13 Sep 2004 09:07:18 +0200
- * sigh... restore rmail to /usr/bin, even though its presence
- therein is a very longstanding bug (#26801)
+sendmail (8.12.3-7) stable-security; urgency=high
- -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 17 Sep 1998 11:00:00 -0500
-
-sendmail (8.9.1-7) unstable; urgency=high, closes=26610 26399 26106
-
- * Remove dontinitgroups (#26610)
- This change updates debian.m4 so you'll have to run sendmailconfig
- to actually get the update enabled.
- * update /etc/hosts.allow automagically (#26399)
- sendmailconfig checks for sendmail in /etc/hosts.allow and
- adds a leading sendmail: all line if needed
- * sendmailconfig is now tolerant of warnings (#26106)
- * socks5 support - /usr/sbin/sendmail is a wrapper that calls
- /usr/sbin/sendmail.real if needed when runsocks is executable
- * change checksendmail to a+x
- * more cleanup of debian/rules
- * FHS changes:
- move /usr/lib/sendmail.cf/ to /usr/share/sendmail.cf/
- move /usr/lib/sendmail.hf to /usr/share/sendmail/sendmail.hf
- update sendmailconf, debian.m4
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 14 Sep 1998 10:00:00 -0500
-
-sendmail (8.9.1-6) unstable; urgency=high
-
- * Sigh... I will not leave extraneous blanks in a .m4 file
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Wed, 14 Aug 1998 10:00:00 -0500
-
-sendmail (8.9.1-5) unstable; urgency=high, closes=25639
-
- * Apply sendmail 8.9.1a security patch to protect the various MUAs
- This patch updates debian.m4 so you'll have to run sendmailconfig
- to actually get the protection enabled.
- * Apply two proto.m4 patches from Claus:
- - bug wrt overriding the RBL
- - bug wrt prevention of unauthorized relay attempts
- * Remove -Y from sensible-mda's invocation of procmail (#25639)
- * sensible-mda now checks for /etc/procmailrc/<user> and if so,
- calls procmail with the -m option... This allows one to deliver mail
- to pseudo users without having to create entries in /etc/aliases
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 13 Aug 1998 10:00:00 -0500
-
-sendmail (8.9.1-4) unstable; urgency=med, closes=24456
-
- * Correct sendmail.cf path in /usr/sbin/etrn (#24456)
- also in /usr/sbin/checkmail
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Thu, 06 Aug 1998 17:00:00 -0500
-
-sendmail (8.9.1-3) unstable; urgency=high
-
- * Cleanup debian/rules a bit...
- * Correct /bin /sbin problem created with the reinstall of rmail
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Wed, 08 Jun 1998 12:00:00 -0500
-
-sendmail (8.9.1-2) unstable; urgency=high
-
- * change /usr/doc/changelog to be RELEASE_NOTES
- * add rmail back...
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 06 Jun 1998 12:00:00 -0500
-
-sendmail (8.9.1-1) unstable; urgency=low, closes=11132
-
- * new upstream source
- * /etc/init.d/sendmail and runq now support SOCKS5 if updated...
- I personally run socks via /etc/ld.so.preload so that everything
- is automagically socksified.
- * Only add MASQUERADE_AS in sendmailconfig if needed (#11132)
- * Correct define(`confMAX_DAEMON_CHILDREN', `30s')dnl (remove the s)
-
- -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 06 Jun 1998 10:00:00 -0500
-
-sendmail (8.9.0-5) unstable; urgency=high, closes=23870
-
- * gack... when I stopped linking /etc/mail/sendmail.cf, I
- missed the test in /etc/init.d/sendmail. (#23870)
-
- -- Richard Nelson <cowboy@debian.org> Thu, 25 Jun 1998 10:00:00 -0500
-
-sendmail (8.9.0-4) unstable; urgency=high, closes=23551
-
- * Patch collect.c to prevent segfaults in mime8->mime7 (#23774)
- * sensible-mda now ignores non-suid MDAs (#23000)
- * postinst checks for curent release (#23551)
- also - it no longer ln -sf /etc/mail/sendmail.cf /etc/sendmail.cf
- * majordomo wants include files in group writeable dirs
-
- -- Richard Nelson <cowboy@debian.org> Tue, 16 Jun 1998 15:00:00 -0500
-
-sendmail (8.9.0-3) unstable; urgency=low
-
- * Fix copyright file
-
- -- Richard Nelson <cowboy@debian.org> Sat, 13 Jun 1998 23:00:00 -0500
-
-sendmail (8.9.0-2) unstable; urgency=high, closes=23170 23137 23392 23138
-
- * Point smrsh back to /usr/lib/sm.bin (#23170)
- * Document TCP wrapper support in README.Debian (is this enough?) (#23137)
- Also document that one should *really* read RELEASE_NOTES
- * don't preformat man pages (#23392)
- * forgot the /usr/lib/sendmail link (pine,uucp) (#23165)
- * include pre 8.9.0 changelog (#23138)
-
- -- Richard Nelson <cowboy@debian.org> Sat, 13 Jun 1998 12:00:00 -0500
-
-sendmail (8.9.0-1) unstable; urgency=low
-
- * first release of 8.9.0. This drop is very beta in that I've not
- done anything with the control files other than allowing group
- writable directories for .forward. I've also not done anything
- with the rulesets to improve spam control.
-
- Basically, this release is ONLY for those who want to play with
- the new version and are experienced enough to modify it themselves.
-
- I'm thinking of integrating the following into the next release,
- please let me know what you think:
- http://www.unix-ag.uni-hannover.de/soft/check_local/
-
- -- Richard Nelson <cowboy@debian.org> Sat, 23 May 1998 12:00:00 -0500
-
-sendmail (8.8.8-17) frozen; urgency=high, closes=22747
-
- * add MAILER-DAEMON alias (#22747) This is a SEVERE problem
- in that absence of this alias may cause mailing loops upon
- delivery errors.
-
- -- Richard Nelson <cowboy@debian.org> Sat, 23 May 1998 12:00:00 -0500
-
-sendmail (8.8.8-16) unstable frozen; urgency=low, closes=21787 21744
-
- * remove the `m' flag from LOCAL_MAILER_FLAGS (#21787)
- * remove /etc/ppp/ip-{up,down}.d from debian/dirs (#21744)
-
- -- Richard Nelson <cowboy@debian.org> Sun, 03 May 1998 12:00:00 -0500
-
-sendmail (8.8.8-15) unstable frozen; urgency=low, closes=21071
-
- * This time, hoststat and purgestat really are symlinks to sendmail ;-} (#21071)
- * debhelperization start
-
- -- Richard Nelson <cowboy@debian.org> Sun, 19 Apr 1998 12:00:00 -0500
-
-sendmail (8.8.8-14) unstable frozen; urgency=low, closes=20657 20758
-
- * <lart,mode=auto> rewrite desc for 20637 </lart> (#20758)
- * Don't install /etc/ppp/ip-{up,down}.d/sendmail (#20657)
-
- -- Richard Nelson <cowboy@debian.org> Mon, 06 Apr 1998 09:00:00 -0500
-
-sendmail (8.8.8-13) unstable frozen; urgency=low, closes=20637 20335 20189
-
- * Add --pidfile to start of daemon (#20637)
- Allow starting when there are queue processes from prior incarnation
- * Dangling man symlinks (#20335)
- * Local mailer and mixed case users (#20189)
- * Include updated ismx patch (updated rules)
-
- -- Richard Nelson <cowboy@debian.org> Sat, 04 Apr 1998 12:00:00 -0500
-
-sendmail (8.8.8-12) unstable frozen; urgency=low, closes=19972 19971 19081
-
- * lintian bugs
- * /usr/doc/sendmail/checksum.txt has mode 600 (#19972)
- * sensible.mda needs man page (#19971)
- * Change LOCAL_SHELL_FLAGS to stop queueing of local mail (#19081)
-
- -- Richard Nelson <cowboy@debian.org> Sat, 21 Mar 1998 12:00:00 -0500
+ * Don't update sasldb with default settings (thanks Hugo) CAN-2004-0833
-sendmail (8.8.8-11) unstable; urgency=low
+ -- Richard A Nelson (Rick) <cowboy@debian.org> Mon, 06 Sep 2004 12:00:00 -0000
- * Correct package build so both source/binary show up
+sendmail (8.12.3-6.6) stable-security; urgency=high
- - Richard Nelson <cowboy@debian.org> Sun, 8 Mar 1998 16:36:00 -0500
-
-sendmail (8.8.8-10) unstable; urgency=low, closes=16883 19129
-
- * New maintainer
- * Updated to Standards-Version 2.4.0.0.
- * Made -q default to 10 minutes instead of 30.
- * Debian.mc: ct,cw optional, temp_mode, etc.
- * Add /etc/ppp/ip-{up,down}.d/sendmail (#19129)
-
- -- Richard Nelson <cowboy@debian.org> Sun, 8 Mar 1998 12:00:00 -0500
-
-sendmail (8.8.8-9) unstable; urgency=low
-
- * Added examples for other operating systems to cf/ostype, per
- StormCrow's request.
-
- -- Johnie Ingram <johnie@debian.org> Mon, 9 Feb 1998 17:23:54 -0500
-
-sendmail (8.8.8-8) unstable; urgency=low, closes=17454 17809
-
- * Manpage for etrn.8 is no longer executable (#17454).
- * Added checksendmail script from BSDI contrib.
- * Debian releases of 8.8.6 and later include a .dsc file (#17809).
- * Added HACK(rblspam) from Manoj Srivastava (srivasta@debian.org) to
- redirect messages from RBLed wastelands to a user called "spam".
-
- -- Johnie Ingram <johnie@debian.org> Fri, 6 Feb 1998 23:08:55 -0500
-
-sendmail (8.8.8-7) unstable; urgency=low
-
- * The sendmailconfig program no longer forces FEATURE(local_procmail).
-
- -- Johnie Ingram <johnie@debian.org> Wed, 21 Jan 1998 13:30:33 -0500
-
-sendmail (8.8.8-6) unstable; urgency=low, closes=7903 9788 12413 12453 14253 14520 14575 14711 15508 15593 16065 16079
-
- * Added Realtime Black Hole ruleset: HACK(rbl).
- * Includes alternate nsswitch file which does not use DNS, allowing
- run-time deactivation with HACK(nodns) (#12413, #12453, cf. 6495,
- early stage of fix of 16883).
- * Made name of spam control README more obvious by popular request of
- IRC, and corrected "dbm" to "hash" in documentation (#16065).
- * Now determines at runtime which mail delivery agent to invoke
- (#15593), so dependency is restored to "procmail | deliver" (#14253).
- * Corrected location of sendmail.st file (#14575, #15508, #16079).
- * The option of setting the expensive flag in mailer definitions is
- enabled by default, making modem-based setups easier (#9788).
- * Corrected tcpwraper support patch so support is activatable again, and
- disabled by default (#14520, #14711).
- * ETRN and EXPN programs now included, from the contrib dir.
- * A persistent host status directory is defined, so the daemon need not
- reattempt a connect to known-bad hosts during simultaneous queue runs.
- * Enabled tiered connect timeout in queue runs, lessening the effect of
- slow peers delaying the queue runs of mailing lists.
- * Queue runs are now sorted, by host to be connected to.
- * A limit is set on the number of live children to prevent DoS attacks.
- * Outbound connections are now quickly retried once after diald has time
- to react, then queued normally.
- * For speed, initgroups (supplemental group permissions) are disabled by
- default -- this would require a sequential scan of the groups file.
- * Added SHELL=/bin/bash to rules file and increased debhelperization.
- * Closed #13384, corrected by sed fix to sendmailconfig (cf. 14547).
- * Some undocumented features may now be enabled by config files:
- O PidFile=/var/run/sendmail.pid
- O WritableDirectoriesAreFatal=False
- O DontProbeInterfaces=False
- O MaxRecipientPerMessage=
- O DeadLetterDrop=False
- O TcpWrappers=False
- * Undocumented features are documented in /usr/lib/sendmail.cf/ostype/debian.
- * No longer runs dpkg-shlibdeps on shell scripts.
- * Documentation files now preserve original timestamps whenever possible.
- * Closed #7903, apparently not a problem with hamm mailx.
- * All provided DOMAIN() examples are now included.
- * Perl example for converting passwd file to aliases database included.
-
- -- Johnie Ingram <johnie@debian.org> Tue, 20 Jan 1998 23:06:30 -0500
-
-sendmail (8.8.8-5) unstable; urgency=low, closes=16389
-
- * Compiled with the -D_FFR_DONT_PROBE_INTERFACES_OPTION option (#16389).
-
- -- Johnie Ingram <johnie@debian.org> Tue, 30 Dec 1997 16:57:51 -0500
-
-sendmail (8.8.8-4) unstable; urgency=low, closes=15707 15990 16000
-
- * Corrected package md5sum error (#15990, #16000).
- * Removed errant mail delivery agent mail.local (#15707).
-
- -- Johnie Ingram <johnie@debian.org> Wed, 17 Dec 1997 11:54:59 -0500
-
-sendmail (8.8.8-3) unstable; urgency=low
-
- * Tweaked debian/rules to autocompile on debian-powerpc.
-
- -- Johnie Ingram <johnie@debian.org> Tue, 9 Dec 1997 17:56:42 -0500
-
-sendmail (8.8.8-2) unstable; urgency=low, closes=14894 14565 15552 15131 14825 14292 14547
-
- * Init script now defines PIDFILE (#15552, #15131, #14825).
- * Binaries are now stripped (#14894, #14565).
- * Applied patch so sendmail postinst is now reentrant (#14292).
- * Added sed fix to sendmailconfig (#14547).
-
- -- Johnie Ingram <johnie@debian.org> Wed, 3 Dec 1997 18:49:51 -0500
-
-sendmail (8.8.8-1) unstable; urgency=low, closes=12235 13817 13864
-
- * New upstream version.
- * Now includes sendmail FAQ from rtfm.mit.edu (#12235).
- * Added code from David Rocher for compliance with the Standard for
- Console Messages (#13817).
- * No longer depends exclusively on procmail (#13864).
-
- -- Johnie Ingram <johnie@debian.org> Wed, 29 Oct 1997 17:11:50 -0500
-
-sendmail (8.8.7-5) unstable; urgency=low
-
- * Added patch from Miquel van Smoorenburg <miquels@cistron.nl> to enable
- tcpwrap support at runtime (support now disabled by default).
-
- -- Johnie Ingram <johnie@debian.org> Sat, 4 Oct 1997 15:05:03 -0400
-
-sendmail (8.8.7-4) unstable; urgency=low
-
- * Fixed problem with sendmailconfig reported by Scott K. Ellis.
-
- -- Johnie Ingram <johnie@debian.org> Thu, 2 Oct 1997 11:22:12 -0400
-
-sendmail (8.8.7-3) unstable; urgency=low
-
- * No longer depends on deliver (#11655).
- * Updated to Standards-Version 2.3.0.0.
- * Corrected typo in debian/rules which prevented tcpwrapper support from
- working.
-
- -- Johnie Ingram <johnie@debian.org> Wed, 1 Oct 1997 14:02:01 -0400
-
-sendmail (8.8.7-2) unstable; urgency=low
-
- * Fixed bug in yesno() function in sendmailconfig (#12035) which caused
- it to ignore user input in some cases.
- * Added patch for ifmail fidonet mailer support (#12241).
- * Registered sendmail permissions with suidregister.
- * Added patch from Herbert Xu so sendmailconfig will work with ash
- (#12211).
- * Fixed detection of compatible sendmail.cf files.
- * Tweaked packaging to improve multi-architecture, multi-compiler
- support.
-
- -- Johnie Ingram <johnie@debian.org> Sun, 31 Aug 1997 05:00:20 -0400
-
-sendmail (8.8.7-1) unstable; urgency=low
-
- * New upstream bugfix version (pristine source) (#11932).
- * Updated to Standards-Version: 2.2.0.0.
-
- -- Johnie Ingram <johnie@debian.org> Thu, 7 Aug 1997 18:12:23 -0400
+ * Non-maintainer upload by the Security Team
+ * Fix vulnerability in ruleset parsing
+ [debian/patches/8.12/8.12.3/CAN-2003-0681.patch]
-sendmail (8.8.6-4) unstable; urgency=low
+ -- Matt Zimmerman <mdz@debian.org> Wed, 17 Sep 2003 14:34:02 -0400
- * Added spam control hacks by Claus Assmann (#5795).
+sendmail (8.12.3-6.5) stable-security; urgency=high
- -- Johnie Ingram <johnie@debian.org> Sat, 26 Jul 1997 13:54:58 -0400
+ * Non-maintainer upload by the Security Team
+ * Fix vulnerability in parseaddr() which could be used to overwrite memory
+ [debian/patches/8.12/8.12.3/CAN-2003-0694.patch]
-sendmail (8.8.6-3) unstable; urgency=low
+ -- Matt Zimmerman <mdz@debian.org> Tue, 16 Sep 2003 16:28:18 -0400
- * Added binary-arch target to debian/rules (#11400).
+sendmail (8.12.3-6.4) stable-security; urgency=low
- -- Johnie Ingram <johnie@debian.org> Tue, 22 Jul 1997 04:52:54 -0400
+ * Non-maintainer upload by the Security Team
+ * Create temporary files securely
+ Report and patches from Paul Szabo <psz@maths.usyd.edu.au>
+ [debian/checksendmail/checksendmail.perl,
+ contrib/doublebounce.pl,
+ contrib/expn.pl]
+ (Closes: #173243)
+ * Configure with --enable-bind=no and remove build-dep on bind-dev.
+ Linking with libbind broke LDAP support in 8.12.3-5
+ (Closes: #183434)
+ [debian/rules, debian/build/rules.in]
-sendmail (8.8.6-2) unstable; urgency=low
+ -- Matt Zimmerman <mdz@debian.org> Thu, 24 Apr 2003 13:02:08 -0400
- * Added patch to sendmailconfig from Darrin Stalder so it accepts
- procmail as an alternate local delivery agent (#7897, fixing #3752,
- #3753, #3754, #4064, #9074, much of 10860). Go Darrin.
- * No longer requires "deliver" for installation (bug list above).
- * Created a "runq" script at request of Martin "Joey" Schulze (#9268).
- * Enabled default support for limited 7->8 bit MIME autoconversion,
- since this security hole was fixed (#6815, #10491).
- * Edited sendmailconfig to make it more clear that a FQDN is needed
- during setup of /etc/mailname (#10512).
- * Added the mail.local local delivery program (cf. 4064).
- * Corrected name of init script in sendmail(8) manpage from /etc/rc to
- /etc/init.d/sendmail (#9176).
- * Closed #6093, a duplicate of 6495 (sendmail insists on performing DNS
- lookups, bringing the PPP link up unnecessarily). Unfortunately 6495
- is a known bug in the 8.8 series which is not yet fixed.
- * Closed #7843 (incorrect upstream PROCMAIL_MAILER_PATH), since this is
- always redefined by OSTYPE(debian).
- * Closed #5321 -- performance demands that sendmail be run as a daemon.
- * Closed #9550, since package is now in new source format and compliant
- with Standards-Version 2.1.3.3 (cf. 7077, 9845).
- * Closed #5676 (core dump) posted against 8.7.6, which does not apply to
- the versions currently in use in the stable and unstable
- distributions.
- * No longer requires "deliver" for installation (worth repeating).
-
- -- Johnie Ingram <johnie@debian.org> Sun, 20 Jul 1997 01:48:51 -0400
+sendmail (8.12.3-6.3) stable-security; urgency=high
-sendmail (8.8.6-1) unstable; urgency=low
+ * Non-maintainer upload by the Security Team
+ * Corrected the patch to fix a potentially remotely exploitable bug.
- * New maintainer.
- * Converted to new source format (#7077, #9845).
- * Added "debug" target to /etc/init.d/sendmail to dump status to syslog.
- * Modified build makefile to work with bash 2.0, and with libc6 tools.
- * Changed tone of long description and similar blurbs from "complex" to
- "powerful".
- * Added PGP-signed file checksums.
- * Included upstream changelog, created Debian changelog (#7075).
- * Added Debian and GNU to default configuration string.
+ -- Martin Schulze <joey@infodrom.org> Fri, 4 Apr 2003 15:39:21 +0200
- -- Johnie Ingram <johnie@debian.org> Sat, 19 Jul 1997 04:26:45 -0400
+sendmail (8.12.3-6.2) stable-security; urgency=high
-Local variables:
-mode: debian-changelog
-add-log-mailing-address: "cowboy@debian.org"
-End:
+ * Non-maintainer upload by the Security Team
+ * Fixed a buffer overflow in address parsing due to a char to int
+ conversion problem which is potentially remotely exploitable found by
+ Michal Zalewski. (VU#897604 CA-2003-12 CAN-2003-0161,
+ debian/patches/8.12/8.12.3/security.parsaddr)
+ * Force no optimization for arm - buggy compiler...
+
+ -- Martin Schulze <joey@infodrom.org> Tue, 1 Apr 2003 20:58:30 +0200
+
+sendmail (8.12.3-5) stable-security; urgency=urgent
+
+ * Finally, bring a working, installable (and removable) sendmail to
+ Woody !!!
+ * !!! A remote buffer overflow is squashed via upstream fix !!!
+ * The following GRAVE bugs are fixed
+ + sendmailconfig sets sm_path incorrectly (fixed in sid, but not woody)
+ + sendmail_8.12.3-4 cannot install from scratch
+ + sendmailconfig silly checks
+ + sendmailconfig no longer works (due to update_conf location)
+ Closes: #146331, #150179, #153908, #158445
+ * The following Serious Policy Violations
+ + sendmail preinst does not check for /etc/cron.d
+ Closes: #154702
+ * The following Important problems
+ + Lots of syslog messages regarding SSL after upgrade, reinstall fails
+ Closes: #158751
+ * The following Normal problems
+ + sendmailconfig assumes incorrectly location of loadable modules
+ + sendmail: package sendmail can't be removed/replaced
+ + not having STARTTLS configured spams messages to the logs
+ + sendmail: Installation fails to create SSL certificates
+ + sendmail issues in Woody
+ Closes: #160612, #162997, #170625, #169527, #171085, #171407
+ * Included (at no additional charge)
+ + Fix for numeric ids (got several mails on this - HESIOD problem)
+ + Several upstream patches for MX, MSP, SMRSH and improved DNS handling
+ that cleans up potential DOS issues
+
+ -- Richard A Nelson (Rick) <cowboy@debian.org> Tue, 21 Jan 2003 12:00:00 -0500
+
+/* vim:set ai et tw=80 */
diff --git a/debian/checks b/debian/checks
deleted file mode 100644
index 4ad84c8..0000000
--- a/debian/checks
+++ /dev/null
@@ -1,20 +0,0 @@
-
-HFrom: $>CheckFrom
-SCheckFrom
-R$@ $#error $: 553 empty from
-
-HTo:$>CheckTo
-SCheckTo
-R$@ $# error .... some error message ....
-
-Upgrade to 8.9.3, and install the multiple rbl patch from:
- http://www.Sendmail.ORG/~ca/email/patches/mrbl.p3
- http://www.sendmail.org
-Then use
- FEATURE(rbl,`rbl.maps.vix.com',` Mail from $&{client_addr}
- rejected - rbl; see http://maps.vix.com')
- FEATURE(rbl,`dul.maps.vix.com',` Mail from $&{client_addr}
- rejected - dul; see http://maps.vix.com')
- FEATURE(rbl,`relays.orbs.org',` Mail from $&{client_addr}
- rejected - open relay; see http://www.orbs.org')
-
diff --git a/debian/configure b/debian/configure
new file mode 100644
index 0000000..37059e1
--- /dev/null
+++ b/debian/configure
@@ -0,0 +1,8658 @@
+#! /bin/sh
+# From configure.ac Revision: 8.12.7 .
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.53 for Sendmail 8.12.7.
+#
+# Report bugs to <bug/reportbug or sendmail@packages.debian.org>.
+#
+# #
+# # $Sendmail$
+# # from Sendmail: ./configure.ac,v 8.12.7 2003-01-20 15:00:00
+# #
+# cat <<EOF
+#
+# Copyright (c) 1998-2003 Richard Nelson. All Rights Reserved.
+#
+# Generated by Autoconf 2.53 for Sendmail 8.12.7
+#
+# Debian configure script for building Sendmail
+# Note: this file supports Sendmail 8.7.6 - 8.12.7
+# and has been tested on autoconf 2.12, 2.13, 2.50, 2.52, 2.53
+#
+#
+# EOF
+#
+#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# NLS nuisances.
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
+ { $as_unset LANG || test "${LANG+set}" != set; } ||
+ { LANG=C; export LANG; }
+(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
+ { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
+ { LC_ALL=C; export LC_ALL; }
+(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
+ { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
+ { LC_TIME=C; export LC_TIME; }
+(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
+ { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
+ { LC_CTYPE=C; export LC_CTYPE; }
+(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
+ { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
+ { LANGUAGE=C; export LANGUAGE; }
+(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
+ { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
+ { LC_COLLATE=C; export LC_COLLATE; }
+(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
+ { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
+ { LC_NUMERIC=C; export LC_NUMERIC; }
+(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
+ { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
+ { LC_MESSAGES=C; export LC_MESSAGES; }
+
+
+# Name of the executable.
+as_me=`(basename "$0") 2>/dev/null ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conftest.sh
+ echo "exit 0" >>conftest.sh
+ chmod +x conftest.sh
+ if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conftest.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='Sendmail'
+PACKAGE_TARNAME='sendmail'
+PACKAGE_VERSION='8.12.7'
+PACKAGE_STRING='Sendmail 8.12.7'
+PACKAGE_BUGREPORT='bug/reportbug or sendmail@packages.debian.org'
+
+ac_unique_file="./build/rules.in"
+ac_default_prefix=/usr
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures Sendmail 8.12.7 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of Sendmail 8.12.7:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-regex=.........Allow REGEX maps [auto]
+ --enable-ndbm=..........Allow NDBM maps [auto]
+ --enable-newdb=.........Allow NEWDB maps [auto]
+ --enable-nis=...........Allow NIS maps [auto]
+ --enable-nisplus=.......Allow NISPLUS maps [auto]
+ --enable-ldap=..........Allow LDAP maps [auto]
+ --enable-hesiod=........Allow HESIOD maps [auto]
+ --enable-tcpd=..........Allow TCP wrappers [auto]
+ --enable-bind=..........Allow BIND usage [auto]
+ --enable-ipv6=..........Allow IPv6 usage [auto]
+ --enable-maillock=......Allow maillock [auto]
+ --enable-milter=........Allow milter [auto]
+ --enable-sfio=..........Allow SFIO usage [auto]
+ --enable-auth=..........Allow SMTP auth [auto]
+ --enable-tls=...........Allow TLS/SSL [auto]
+ --enable-shm=...........Allow shared memory [auto]
+ --enable-doc=...........Build sendmail-doc pkg
+ --enable-dev=...........Build libmilter-dev pkg
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-buildtree=.......Build directory [.]
+ --with-docdir=..........Document directory [PREFIX/doc]
+ --with-revision=........Package revision ['']
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <bug/reportbug or sendmail@packages.debian.org>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+Sendmail configure 8.12.7
+generated by GNU Autoconf 2.53
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+
+#
+# $Sendmail$
+# from Sendmail: ./configure.ac,v 8.12.7 2003-01-20 15:00:00
+#
+cat <<EOF
+
+ Copyright (c) 1998-2003 Richard Nelson. All Rights Reserved.
+
+ Generated by Autoconf 2.53 for Sendmail 8.12.7
+
+ Debian configure script for building Sendmail
+ Note: this file supports Sendmail 8.7.6 - 8.12.7
+ and has been tested on autoconf 2.12, 2.13, 2.50, 2.52, 2.53
+
+
+EOF
+
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by Sendmail $as_me 8.12.7, which was
+generated by GNU Autoconf 2.53. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell meta-characters.
+ac_configure_args=
+ac_sep=
+for ac_arg
+do
+ case $ac_arg in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n ) continue ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ ac_sep=" " ;;
+ esac
+ # Get rid of the leading space.
+done
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core core.* *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_version='2.53';
+ac_aux_dir=
+for ac_dir in ./build $srcdir/./build; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ./build $srcdir/./build" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in ./build $srcdir/./build" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+
+SM_VERS='8.12.7';
+SM_DATE='2003-01-20 15:00:00';
+SM_MINVERS='8.7.6';
+SM_MAXVERS='8.12.7';
+SM_CPYRT='2003';
+
+
+
+
+
+
+#-------------------------------------------------------------------
+# Determine date/time of build
+#-------------------------------------------------------------------
+#sm_date=[`date --iso-8601=seconds`]; # <== Not valid on older systems !!!
+sm_date=`date +%Y-%m-%dT%H:%M:%S%z`;
+sm_utc=$(expr "$sm_date" : '.*T.*\([+-].*\)');
+sm_time=$(expr "$sm_date" : '.*T\(.*\)[+-]');
+sm_date=$(expr "$sm_date" : '\(.*\)T');
+
+
+#-------------------------------------------------------------------
+# Determine sendmail version
+#-------------------------------------------------------------------
+if test -f ../build-tree/*/sendmail/version.c; then
+ version_file='../build-tree/*/sendmail/version.c';
+ sm_version=`sed -ne "s/char[[:space:]]*Version\[\] = \"\([^\"]*\)\";/\1/p" $version_file`;
+else
+ curr_dir=$(echo `pwd` | sed -e 's/\/debian$//' -);
+ version=$(expr "${curr_dir}" : '.*-\([0-9.].*\)');
+ beta_version=$(expr "${curr_dir}" : '.*+\([0-9.].*\)');
+ if test -z "$beta_version"; then
+ sm_version="$version";
+ else
+ sm_version="$beta_version";
+ fi;
+ fi;
+if test -z "$sm_version"; then
+ version_file='./build/version.c';
+ if test -f $version_file; then
+ sm_version=`sed -ne "s/char[[:space:]]*Version\[\] = \"\([^\"]*\)\";/\1/p" $version_file`;
+ fi;
+ fi;
+
+if test -z "$sm_version"; then
+ { { echo "$as_me:$LINENO: error: could not determine Sendmail version" >&5
+echo "$as_me: error: could not determine Sendmail version" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+PACKAGE_VERSION="${sm_version}";
+PACKAGE_STRING="${PACKAGE_NAME} ${PACKAGE_VERSION}";
+
+#
+# break the version into pieces for easier comparisons
+# v,r = separate components (8.12.0.Beta7 = 8 12)
+# major = 1st two components (8.9.3 -> 8.9)
+# minor = last component (8.9.3 -> 3)
+# beta = suffix for beta version (8.12.0.Beta7 -> 7)
+# math = for numeric (<, >=, etc.) comparisons
+# 8.12.7 = 527367 (8.12 = 527360)
+# 8.11.6 = 527110 (8.11 = 527104)
+# 8.10.2 = 526850 (8.10 = 526848)
+# 8.9.3 = 526595 (8.9 = 526592)
+# 8.8.8 = 526344 (8.8 = 526336)
+# 8.7.6 = 526086 (8.7 = 526080)
+v2i () {
+ sm_version_test=`expr 65536 \* $(expr "$1" : '\([0-9]*\)') + \
+ 256 \* $(expr "$1" : '[0-9]*\.\([0-9]*\)') + \
+ $(expr "$1" : '[0-9]*\.[0-9]*\.\([0-9]*\)')`;
+ #echo "v2i($1)=$sm_version_test";
+ };
+i2v () {
+ val=$1;
+ major=`expr $val / 65536`;
+ val=`expr $val % 65536`;
+ minor=`expr $val / 256`;
+ val=`expr $val % 256`;
+ result="$major.$minor.$val";
+ #echo "i2v($1)=$result";
+ #return $result;
+ };
+sm_version_v=`expr $sm_version : '\([0-9]*\)'`;
+sm_version_r=`expr $sm_version : '[0-9]*\.\([0-9]*\)'`;
+sm_version_major="$sm_version_v.$sm_version_r";
+sm_version_minor=`expr $sm_version : '[0-9]*\.[0-9]*\.\([0-9]*\)'`;
+sm_version_beta=`expr $sm_version : '[0-9]*\.[0-9]*\.[0-9]*\.Beta\([0-9]*\)'`;
+sm_version_math=`expr 65536 \* $sm_version_v \
+ + 256 \* $sm_version_r \
+ + $sm_version_minor`;
+
+
+
+
+#-------------------------------------------------------------------
+# Configuration for Sendmail
+#-------------------------------------------------------------------
+#checks for programs
+#checks for libraries
+#checks for header files
+#checks for typedefs
+#checks for structures
+#checks for compiler characteristics
+#checks for library functions
+#checks for system services
+
+#-------------------------------------------------------------------
+# Initialize variables
+#-------------------------------------------------------------------
+#
+# Initialize variables - value is one of:
+# no: don't even try to include support for
+# yes: require support for
+# auto: support if present, warn if not
+#
+#-------------------------------------------------------------------
+
+# Check whether --with-buildtree or --without-buildtree was given.
+if test "${with_buildtree+set}" = set; then
+ withval="$with_buildtree"
+ buildtree="$withval"
+else
+ docdir='.'
+fi;
+
+# Check whether --with-docdir or --without-docdir was given.
+if test "${with_docdir+set}" = set; then
+ withval="$with_docdir"
+ docdir="$withval"
+else
+ docdir='${prefix}/doc'
+fi;
+
+# Check whether --with-revision or --without-revision was given.
+if test "${with_revision+set}" = set; then
+ withval="$with_revision"
+ sm_revision="$withval"
+else
+ sm_revision=''
+fi;
+# Check whether --enable-regex or --disable-regex was given.
+if test "${enable_regex+set}" = set; then
+ enableval="$enable_regex"
+ sm_enable_regex="$enableval"
+else
+ sm_enable_regex=auto
+fi;
+# Check whether --enable-ndbm or --disable-ndbm was given.
+if test "${enable_ndbm+set}" = set; then
+ enableval="$enable_ndbm"
+ sm_enable_ndbm="$enableval"
+else
+ sm_enable_ndbm=auto
+fi;
+# Check whether --enable-newdb or --disable-newdb was given.
+if test "${enable_newdb+set}" = set; then
+ enableval="$enable_newdb"
+ sm_enable_newdb="$enableval"
+else
+ sm_enable_newdb=auto
+fi;
+# Check whether --enable-nis or --disable-nis was given.
+if test "${enable_nis+set}" = set; then
+ enableval="$enable_nis"
+ sm_enable_nis="$enableval"
+else
+ sm_enable_nis=auto
+fi;
+# Check whether --enable-nisplus or --disable-nisplus was given.
+if test "${enable_nisplus+set}" = set; then
+ enableval="$enable_nisplus"
+ sm_enable_nisplus="$enableval"
+else
+ sm_enable_nisplus=auto
+fi;
+# Check whether --enable-ldap or --disable-ldap was given.
+if test "${enable_ldap+set}" = set; then
+ enableval="$enable_ldap"
+ sm_enable_ldap="$enableval"
+else
+ sm_enable_ldap=auto
+fi;
+# Check whether --enable-hesiod or --disable-hesiod was given.
+if test "${enable_hesiod+set}" = set; then
+ enableval="$enable_hesiod"
+ sm_enable_hesiod="$enableval"
+else
+ sm_enable_hesiod=auto
+fi;
+# Check whether --enable-tcpd or --disable-tcpd was given.
+if test "${enable_tcpd+set}" = set; then
+ enableval="$enable_tcpd"
+ sm_enable_tcpd="$enableval"
+else
+ sm_enable_tcpd=auto
+fi;
+# Check whether --enable-bind or --disable-bind was given.
+if test "${enable_bind+set}" = set; then
+ enableval="$enable_bind"
+ sm_enable_bind="$enableval"
+else
+ sm_enable_bind=auto
+fi;
+# Check whether --enable-ipv6 or --disable-ipv6 was given.
+if test "${enable_ipv6+set}" = set; then
+ enableval="$enable_ipv6"
+ sm_enable_ipv6="$enableval"
+else
+ sm_enable_ipv6=auto
+fi;
+# Check whether --enable-maillock or --disable-maillock was given.
+if test "${enable_maillock+set}" = set; then
+ enableval="$enable_maillock"
+ sm_enable_maillock="$enableval"
+else
+ sm_enable_maillock=auto
+fi;
+# Check whether --enable-milter or --disable-milter was given.
+if test "${enable_milter+set}" = set; then
+ enableval="$enable_milter"
+ sm_enable_milter="$enableval"
+else
+ sm_enable_milter=auto
+fi;
+# Check whether --enable-sfio or --disable-sfio was given.
+if test "${enable_sfio+set}" = set; then
+ enableval="$enable_sfio"
+ sm_enable_sfio="$enableval"
+else
+ sm_enable_sfio=auto
+fi;
+# Check whether --enable-auth or --disable-auth was given.
+if test "${enable_auth+set}" = set; then
+ enableval="$enable_auth"
+ sm_enable_auth="$enableval"
+else
+ sm_enable_auth=auto
+fi;
+# Check whether --enable-tls or --disable-tls was given.
+if test "${enable_tls+set}" = set; then
+ enableval="$enable_tls"
+ sm_enable_tls="$enableval"
+else
+ sm_enable_tls=auto
+fi;
+# Check whether --enable-shm or --disable-shm was given.
+if test "${enable_shm+set}" = set; then
+ enableval="$enable_shm"
+ sm_enable_shm="$enableval"
+else
+ sm_enable_shm=auto
+fi;
+# Check whether --enable-doc or --disable-doc was given.
+if test "${enable_doc+set}" = set; then
+ enableval="$enable_doc"
+ sm_enable_doc="$enableval"
+else
+ sm_enable_doc=auto
+fi;
+# Check whether --enable-dev or --disable-dev was given.
+if test "${enable_dev+set}" = set; then
+ enableval="$enable_dev"
+ sm_enable_dev="$enableval"
+else
+ sm_enable_dev=auto
+fi;
+
+#-------------------------------------------------------------------
+# Resolve variables for sendmail Makefiles and .m4 where
+# exec_prefix=${prefix} will not work...
+#-------------------------------------------------------------------
+#eval PACKAGE_VERSION="${PACKAGE_VERSION}"
+#eval PACKAGE_STRING="${PACKAGE_STRING}"
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+eval prefix="${prefix}";
+eval exec_prefix="${exec_prefix}";
+eval bindir="${bindir}";
+eval sbindir="${sbindir}";
+eval libexecdir="${libexecdir}";
+eval datadir="${datadir}";
+eval sysconfdir="${sysconfdir}";
+eval sharedstatedir="${sharedstatedir}";
+eval localstatedir="${localstatedir}";
+eval libdir="${libdir}";
+eval includedir="${includedir}";
+eval oldincludedir="${oldincludedir}";
+eval infodir="${infodir}";
+eval mandir="${mandir}";
+eval srcdir="${srcdir}";
+
+
+eval buildtree="${buildtree}";
+eval docdir="${docdir}";
+
+#-------------------------------------------------------------------
+# Determine Distribution and version to build for
+#-------------------------------------------------------------------
+sm_dist_name='';
+sm_dist_vers='';
+DEBIAN='';
+DEBIAN_DH='';
+echo "$as_me:$LINENO: checking for Debian" >&5
+echo $ECHO_N "checking for Debian... $ECHO_C" >&6
+if test ! -f /etc/debian_version ; then
+ DEBIAN='no';
+ echo "$as_me:$LINENO: result: \"$DEBIAN\"" >&5
+echo "${ECHO_T}\"$DEBIAN\"" >&6
+else
+ DEBIAN='yes';
+ sm_dist_name='Debian';
+ sm_dist_vers=`cat /etc/debian_version`;
+ # Determine which level of debhelper we're building with
+ DEBIAN_DH='1';
+ if test -x /usr/bin/dh_testversion; then
+ # Must run this test above the debian directory
+ if (cd .. && dh_testversion 4.1.0 2>/dev/null); then
+ DEBIAN_DH='4.1';
+ elif (cd .. && dh_testversion 4.0.0 2>/dev/null); then
+ DEBIAN_DH='4';
+ elif (cd .. && dh_testversion 3.0.0 2>/dev/null); then
+ DEBIAN_DH='3';
+ elif (cd .. && dh_testversion 2.0.40 2>/dev/null); then
+ DEBIAN_DH='2';
+ else
+ DEBIAN_DH='1';
+ fi;
+ fi;
+ if test -x /usr/bin/dpkg-architecture; then
+ eval `dpkg-architecture -s`;
+ fi;
+ sm_build_arch="$DEB_BUILD_ARCH"
+ sm_host_arch="$DEB_HOST_ARCH"
+
+
+
+
+ echo "$as_me:$LINENO: result: $DEBIAN, using debhelper v$DEBIAN_DH" >&5
+echo "${ECHO_T}$DEBIAN, using debhelper v$DEBIAN_DH" >&6
+ fi;
+
+#-------------------------------------------------------------------
+# Announce our presence...
+#-------------------------------------------------------------------
+
+echo ""
+echo "Autoconf ${ac_version} for Sendmail ${sm_version}${sm_revision} \
+on ${sm_dist_name} ${sm_dist_vers} ${sm_build_arch}/${sm_host_arch}.";
+echo ""
+
+#-------------------------------------------------------------------
+# Required programs
+# cc, cpp
+# install
+# egrep
+# std includes
+#-------------------------------------------------------------------
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$as_dir/$ac_word" ${1+"$@"}
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
+ ls a.out conftest 2>/dev/null;
+ ls a.* conftest.* 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
+ a.out ) # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
+echo "$as_me: error: C compiler cannot create executables" >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_declaration
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <assert.h>
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <assert.h>
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+
+#-------------------------------------------------------------------
+# Variables used in site.config.m4.in to set corresponding Build vars
+#-------------------------------------------------------------------
+# Global
+sm_incdirs='';
+sm_mapdef='';
+sm_envdef='';
+sm_libs='';
+# editmap
+sm_editmap_envdef='';
+sm_editmap_libs='';
+# libmilter
+sm_libmilter_envdef='';
+sm_libmilter_libs='';
+# libsm
+sm_libsm_envdef='';
+sm_libsm_libs='';
+# libsmdb
+sm_libsmdb_envdef='';
+sm_libsmdb_libs='';
+# libsmutil
+sm_libsmutil_envdef='';
+sm_libsmutil_libs='';
+# mail.local
+sm_mail_local_envdef='';
+sm_mail_local_libs='';
+# mailstats
+sm_mailstats_envdef='';
+sm_mailstats_libs='';
+# makemap
+sm_makemap_envdef='';
+sm_makemap_libs='';
+# praliases
+sm_praliases_envdef='';
+sm_praliases_libs='';
+# rmail
+sm_rmail_envdef='';
+sm_rmail_libs='';
+# sendmail
+sm_sendmail_envdef='';
+sm_sendmail_libs='';
+# smrsh
+sm_smrsh_envdef='';
+sm_smrsh_libs='';
+# vacation
+sm_vacation_envdef='';
+sm_vacation_libs='';
+
+#-------------------------------------------------------------------
+# Auxilliary variables
+#-------------------------------------------------------------------
+sm_databases='';
+sm_features='';
+sm_badepends='';
+sm_depends='';
+sm_recommends='';
+sm_suggests='';
+sm_newdb_lib='';
+sm_ldap_lib='';
+sm_hesiod_parms='';
+sm_ffr='';
+sm_m4_ffr='';
+
+
+#-------------------------------------------------------------------
+# Override default/specified values
+#-------------------------------------------------------------------
+# Change pid from /var/run to /var/run/sendmail/mta to alleviate clutter
+sm_sendmail_envdef="$sm_sendmail_envdef \
+-D_PATH_SENDMAILPID=\\\"${localstatedir}/run/sendmail/mta/sendmail.pid\\\"";
+# Set paths for smrsh
+sm_smrsh_envdef="$sm_smrsh_envdef \
+-DCMDDIR=\\\"${sysconfdir}/mail/smrsh\\\"";
+sm_smrsh_envdef="$sm_smrsh_envdef -DPATH=\\\"/usr/bin:/bin\\\"";
+#
+# Everything we'll build on has strerror(3)
+sm_libsm_envdef="$sm_libsm_envdef -DHASSTRERROR=1";
+sm_sendmail_envdef="$sm_sendmail_envdef -DHASSTRERROR=1";
+#
+# The next two require a patch to {include/sm,sendmail,src}/conf.h
+# and would give duplicate definition warnings if left herein
+#sm_sendmail_envdef="$sm_sendmail_envdef -DUSESETEUID=1 -DHASGETUSERSHELL=1";
+sm_sendmail_envdef="$sm_sendmail_envdef -DHASFCHMOD=1 -DHASSETRLIMIT=1";
+#
+# flock() doens't work over NFS and there's a rumour of b0rkedness in
+# Linux 2.4.x kernels ;(
+sm_sendmail_envdef="$sm_sendmail_envdef -DHASFLOCK=0";
+#
+# version specific setup
+if test "$sm_version_major" = "8.12"; then
+ sm_sendmail_envdef="$sm_sendmail_envdef -DUSESETEUID=1 -DHASGETUSERSHELL=1";
+ #
+ # Note: There is a problem with both <=2.2.19 and <=2.4.2-acx in
+ # that setitimer() sometimes looses events, this is mentioned
+ # in the man page, but seems to hit even in non-pathologically
+ # heavy loading. So, we revert back to alarm() - which, thusfar
+ # has proven stable.
+ # Note: This actually seems to have been a sendmail issue fixed in 8.12.3
+ sm_libsm_envdef="$sm_libsm_envdef -DSM_CONF_SETITIMER=1";
+ #
+ # Note: this *only* for testing... there is a performance hit
+ #sm_libsm_envdef="$sm_libsm_envdef -DSM_OMIT_BOGUS_WARNINGS";
+ sm_ffr="$sm_ffr -D_FFR_MAX_FORWARD_ENTRIES=1";
+ sm_ffr="$sm_ffr -D_FFR_QUEUEDELAY=1";
+ sm_ffr="$sm_ffr -D_FFR_CONTROL_MSTAT";
+ sm_ffr="$sm_ffr -D_FFR_GROUPREADABLEAUTHINFOFILE";
+ sm_ffr="$sm_ffr -D_FFR_DAEMON_NETUNIX";
+ sm_ffr="$sm_ffr -D_FFR_SHM_STATUS";
+ sm_ffr="$sm_ffr -D_FFR_QUEUE_SCHED_DBG"; # Debugging....%%%%%%%%%%%%
+ sm_ffr="$sm_ffr -D_FFR_RHS";
+ sm_ffr="$sm_ffr -D_FFR_MAIL_MACRO";
+ sm_m4_ffr="$sm_m4_ffr define(\`_FFR_MAIL_MACRO')";
+ sm_ffr="$sm_ffr -D_FFR_NO_PIPE";
+ sm_ffr="$sm_ffr -D_FFR_QUARANTINE";
+ sm_mailstats_envdef="$sm_mailstats_envdef -D_FFR_QUARANTINE";
+ sm_vacation_envdef="$sm_vaction_envdef -D_FFR_RETURN_ADDR";
+elif test "$sm_version_major" = "8.11"; then
+ sm_vacation_envdef="$sm_vaction_envdef -D_FFR_DEBUG=1";
+ sm_vacation_envdef="$sm_vaction_envdef -D_FFR_LISTDB=1";
+ sm_ffr="$sm_ffr -D_FFR_TESTMODE_DROP_PRIVS=1";
+ sm_ffr="$sm_ffr -D_FFR_ADDR_TYPE=1";
+ sm_ffr="$sm_ffr -D_FFR_ARITH=1";
+ sm_ffr="$sm_ffr -D_FFR_QUEUE_FILE_MODE=1";
+ sm_ffr="$sm_ffr -D_FFR_MAX_FORWARD_ENTRIES=1";
+ sm_ffr="$sm_ffr -D_FFR_QUEUEDELAY=1";
+elif test "$sm_version_major" = "8.10"; then
+ sm_ffr="$sm_ffr -D_FFR_ADDR_TYPE=1";
+ sm_ffr="$sm_ffr -D_FFR_ARITH=1";
+ sm_ffr="$sm_ffr -D_FFR_QUEUE_FILE_MODE=1";
+ sm_ffr="$sm_ffr -D_FFR_MAX_FORWARD_ENTRIES=1";
+ sm_ffr="$sm_ffr -D_FFR_QUEUEDELAY=1";
+elif test "$sm_version_major" = "8.9"; then
+ sm_ffr="$sm_ffr -D_FFR_MAX_MIME_HEADER_LENGTH=1";
+ sm_ffr="$sm_ffr -D_FFR_MAX_HEADERS_LENGTH=1";
+ sm_ffr="$sm_ffr -D_FFR_MAXRCPT_OPTION=1";
+ sm_ffr="$sm_ffr -D_FFR_DSN_RRT_OPTION=1";
+ sm_ffr="$sm_ffr -D_FFR_CONTROL_SOCKET=1";
+ sm_ffr="$sm_ffr -D_FFR_TRUSTED_USER=1";
+ sm_ffr="$sm_ffr -D_FFR_MAP_SYSLOG=1";
+ sm_ffr="$sm_ffr -D_DONT_PROBE_INTERFACES_OPTION=1";
+ sm_ffr="$sm_ffr -D_FFR_PIDFILE_OPTION=1";
+ sm_ffr="$sm_ffr -D_FFR_DEADLETTERDROP_OPTION=1";
+ sm_ffr="$sm_ffr -D_FFR_QUEUE_FILE_MODE=1";
+ fi;
+
+# 8.12.5+
+v2i 8.12.5;
+if test $sm_version_math -ge $sm_version_test; then
+ :;
+else
+ sm_mail_local_envdef="$sm_mail_local_envdef \
+-D_PATH_MAILDIR=\\\"${localstatedir}/mail\\\"";
+ sm_rmail_envdef="$sm_rmail_envdef \
+-D_PATH_SENDMAIL=\\\"${sbindir}/sendmail\\\"";
+ sm_vacation_envdef="$sm_vacation_envdef \
+-D_PATH_SENDMAIL=\\\"${sbindir}/sendmail\\\"";
+ fi;
+
+# 8.12.0+
+v2i 8.12.0;
+if test $sm_version_math -ge $sm_version_test; then
+ :;
+else
+ :;
+ fi;
+
+# 8.11.0+
+v2i 8.11.0;
+if test $sm_version_math -ge $sm_version_test; then
+ :;
+else
+ sm_enable_tls=no;
+ fi;
+
+# 8.10.0+
+v2i 8.10.0;
+if test $sm_version_math -ge $sm_version_test; then
+ # SRCROUTE works quite well with glibc 2.1+ (should test for this...)
+ sm_sendmail_envdef="$sm_sendmail_envdef -DIP_SRCROUTE=1";
+ # Allow setting Hostname from $j...
+ sm_ffr="$sm_ffr -D_FFR_RESET_MACRO_GLOBALS";
+ sm_mail_local_envdef="$sm_mail_local_envdef -DCONTENTLENGTH";
+ # Note: the next line is commented to *prevent* mode 660 files in /var/mail
+ #sm_mail_local_envdef="$sm_mail_local_envdef -DMAILGID=8";
+else
+ sm_enable_milter=no;
+ sm_enable_auth=no;
+ sm_enable_ipv6=no;
+ sm_sendmail_envdef="$sm_sendmail_envdef \
+-D_PATH_VARTMP=\\\"${localstatedir}/lib/sendmail\\\"";
+ sm_sendmail_envdef="$sm_sendmail_envdef \
+-D_PATH_SENDMAILCF=\\\"${sysconfdir}/mail/sendmail.cf\\\"";
+ fi;
+
+# 8.9.0+
+v2i 8.9.0;
+if test $sm_version_math -ge $sm_version_test; then
+ :;
+else
+ :;
+ fi;
+
+# 8.8.0+
+v2i 8.8.0;
+if test $sm_version_math -ge $sm_version_test; then
+ :;
+else
+ sm_enable_ldap=no;
+ sm_enable_tcpd=no;
+ fi;
+
+# Shared memory support (on 8.12, but needs a recent kernel)
+# Note: there is a race condition where sometimes sendmail can't
+# use shared memory because the prior pid didn't delete it
+# but we override the linux default for performance reasons
+# (or rather we would, if most users weren't on kernels that
+# don't properly support it - < 2.2.19 or 2.4.1)
+# *ANY* arch still on a 2.2.x; x<19 must *NOT* enable this...
+if test "$sm_enable_shm" != "no"; then
+ v2i 8.12.0;
+ if test $sm_version_math -lt $sm_version_test; then
+ sm_enable_shm=no;
+ fi;
+ if test "arm" = "${sm_host_arch}"; then
+ sm_enable_shm=no;
+ fi;
+ fi;
+if test "$sm_enable_shm" != "no"; then
+ sm_enable_shm=yes;
+ fi;
+
+
+# Milter (_FFR_ on 8.10, 8.11, native on 8.12+)
+if test "$sm_enable_milter" != "no"; then
+ v2i 8.10.0;
+ if test $sm_version_math -ge $sm_version_test; then
+ sm_enable_milter=yes;
+ v2i 8.12.0;
+ if test $sm_version_math -ge $sm_version_test; then
+ sm_sendmail_envdef="$sm_sendmail_envdef -DMILTER";
+ sm_libmilter_envdef="$sm_libmilter_envdef \
+-D_FFR_MILTER_ROOT_UNSAFE";
+ else
+ sm_libmilter_envdef="$sm_libmilter_envdef -D_FFR_MILTER";
+ sm_sendmail_envdef="$sm_sendmail_envdef -D_FFR_MILTER";
+ fi;
+ fi;
+ fi;
+
+
+# SFIO (required for TLS and security layer of SASL on 8.11)
+# We'll let it go through here on any version (to check headers), but
+# issue no messages unless needed...
+if test "$sm_enable_tls" != "no"; then
+ if test $sm_enable_sfio != no; then
+ sm_enable_sfio=auto;
+ elif test $sm_enable_tls = yes; then
+ if test "$sm_version_major" = "8.11"; then
+ { { echo "$as_me:$LINENO: error: SFIO is disabled, but you asked for TLS" >&5
+echo "$as_me: error: SFIO is disabled, but you asked for TLS" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+ elif test $sm_enable_tls = auto; then
+ if test "$sm_version_major" = "8.11"; then
+ { echo "$as_me:$LINENO: WARNING: SFIO is disabled, not trying TLS" >&5
+echo "$as_me: WARNING: SFIO is disabled, not trying TLS" >&2;}
+ fi;
+ fi;
+elif test $sm_enable_sfio != no; then
+ if test "$sm_version_major" = "8.11"; then
+ { echo "$as_me:$LINENO: WARNING: TLS is disabled, no need for SFIO" >&5
+echo "$as_me: WARNING: TLS is disabled, no need for SFIO" >&2;}
+ fi;
+ sm_enable_sfio=no;
+ fi;
+
+#-------------------------------------------------------------------
+# logrotate - not on Debian Slink (2.1)
+#-------------------------------------------------------------------
+if test "${DEBIAN_DH}" != '1'; then
+ sm_suggests="$sm_suggests, logrotate";
+ fi;
+
+#-------------------------------------------------------------------
+#
+# Check for presence of REGEX headers
+#
+sm_have_regex=no;
+if test $sm_enable_regex != no; then
+ # On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in regex.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ sm_have_regex=yes
+
+else
+ sm_have_regex=no
+fi
+
+done
+
+
+ if test $ac_cv_header_regex_h = yes ; then
+ echo "$as_me:$LINENO: checking for regfree" >&5
+echo $ECHO_N "checking for regfree... $ECHO_C" >&6
+if test "${ac_cv_func_regfree+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char regfree (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char regfree ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_regfree) || defined (__stub___regfree)
+choke me
+#else
+f = regfree;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_regfree=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_regfree=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_regfree" >&5
+echo "${ECHO_T}$ac_cv_func_regfree" >&6
+if test $ac_cv_func_regfree = yes; then
+ :
+
+else
+ { { echo "$as_me:$LINENO: error: POSIX regex required." >&5
+echo "$as_me: error: POSIX regex required." >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+ fi;
+
+ if test $sm_have_regex = yes; then
+ sm_databases="$sm_databases, REGEX";
+ sm_mapdef="$sm_mapdef -DMAP_REGEX";
+ elif test $sm_enable_regex = auto; then
+ { echo "$as_me:$LINENO: WARNING: Could not locate REGEX package" >&5
+echo "$as_me: WARNING: Could not locate REGEX package" >&2;}
+ else
+ { { echo "$as_me:$LINENO: error: Could not locate REGEX package" >&5
+echo "$as_me: error: Could not locate REGEX package" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+ fi;
+sm_enable_regex=$sm_have_regex;
+
+#-------------------------------------------------------------------
+#
+# Check for presence of NDBM headers
+#
+sm_have_ndbm=no;
+if test $sm_enable_ndbm != no; then
+
+
+for ac_header in ndbm.h db1/ndbm.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ sm_have_ndbm=yes
+
+else
+ sm_have_ndbm=no
+fi
+
+done
+
+
+ if test $sm_have_ndbm != no; then
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+ #if defined(HAVE_DB1_NDBM_H)
+ #include <db1/ndbm.h>
+ #elif defined(HAVE_NDBM_H)
+ #include <ndbm.h>
+ #endif
+ dbm_pagfno(0);
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "DBM_PAGFNO_NOT_AVAILABLE" >/dev/null 2>&1; then
+ sm_have_ndbm=no
+fi
+rm -f conftest*
+
+
+ if test $sm_have_ndbm = no; then
+ { echo "$as_me:$LINENO: WARNING: DB emulation of ndbm not sufficient, -lndbm ignored" >&5
+echo "$as_me: WARNING: DB emulation of ndbm not sufficient, -lndbm ignored" >&2;}
+ fi;
+ fi;
+
+ if test $sm_have_ndbm != no; then
+ echo "$as_me:$LINENO: checking for main in -lndbm" >&5
+echo $ECHO_N "checking for main in -lndbm... $ECHO_C" >&6
+if test "${ac_cv_lib_ndbm_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lndbm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ndbm_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_ndbm_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ndbm_main" >&5
+echo "${ECHO_T}$ac_cv_lib_ndbm_main" >&6
+if test $ac_cv_lib_ndbm_main = yes; then
+ sm_have_ndmb=yes
+
+else
+ sm_have_ndmb=no
+fi
+
+
+ if test $sm_have_ndbm = no; then
+ { echo "$as_me:$LINENO: WARNING: Could not find -lndbm" >&5
+echo "$as_me: WARNING: Could not find -lndbm" >&2;}
+ fi;
+ fi;
+
+ # only libsmdb and sendmail #include <ndbm.h>, but libsmdb is needed
+ # by most of the other components
+ if test $sm_have_ndbm = yes; then
+ sm_databases="$sm_databases, DBM";
+ sm_mapdef="$sm_mapdef -DNDBM";
+ sm_editmap_libs="$sm_editmap_libs -lndbm";
+ sm_makemap_libs="$sm_makemap_libs -lndbm";
+ sm_praliases_libs="$sm_praliases_libs -lndbm";
+ sm_sendmail_libs="$sm_sendmail_libs -lndbm";
+ sm_vacation_libs="$sm_vacation_libs -lndbm";
+ elif test $sm_enable_ndbm = auto; then
+ { echo "$as_me:$LINENO: WARNING: Could not locate NDBM package" >&5
+echo "$as_me: WARNING: Could not locate NDBM package" >&2;}
+ else
+ { { echo "$as_me:$LINENO: error: Could not locate NDBM package" >&5
+echo "$as_me: error: Could not locate NDBM package" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+ fi;
+sm_enable_ndbm=$sm_have_ndbm;
+
+#-------------------------------------------------------------------
+#
+# Check for presence of NEWDB headers (and determine version)
+#
+sm_have_newdb=no;
+sm_use_185=no;
+sm_newdb_lib=;
+if test $sm_enable_newdb != no; then
+
+
+
+
+
+
+
+
+
+
+for ac_header in db4/db.h db3/db.h db2/db.h db1/db.h db.h \
+ db4/db_185.h db3/db_185.h db2/db_185.h \
+ db1/db_185.h db_185.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_db4_db_h = yes -o \
+ $ac_cv_header_db3_db_h = yes -o \
+ $ac_cv_header_db2_db_h = yes -o \
+ $ac_cv_header_db1_db_h = yes -o \
+ $ac_cv_header_db_h = yes ; then
+ sm_have_newdb=yes;
+ fi;
+
+ if test $sm_have_newdb = yes; then
+ echo "$as_me:$LINENO: checking newdb version" >&5
+echo $ECHO_N "checking newdb version... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+ #if defined(HAVE_DB4_DB_H)
+ #include <db4/db.h>
+ #elif defined(HAVE_DB_H)
+ #include <db.h>
+ #endif
+ #if DB_VERSION_MAJOR >= 4
+ sm_newdb_lib=4
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "sm_newdb_lib=4" >/dev/null 2>&1; then
+ sm_newdb_lib=db-4.0
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+ #if defined(HAVE_DB3_DB_H)
+ #include <db3/db.h>
+ #elif defined(HAVE_DB_H)
+ #include <db.h>
+ #endif
+ #if DB_VERSION_MAJOR >= 3
+ sm_newdb_lib=3
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "sm_newdb_lib=3" >/dev/null 2>&1; then
+ sm_newdb_lib=db3
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+ #if defined(HAVE_DB2_DB_H)
+ #include <db2/db.h>
+ #elif defined(HAVE_DB_H)
+ #include <db.h>
+ #endif
+ #if DB_VERSION_MAJOR >= 2
+ sm_newdb_lib=2
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "sm_newdb_lib=2" >/dev/null 2>&1; then
+ sm_newdb_lib=db2
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+ #if defined(HAVE_DB1_DB_H)
+ #include <db1/db.h>
+ #elif defined(HAVE_DB_H)
+ #include <db.h>
+ #endif
+ #ifndef DB_VERSION_MAJOR
+ #define DB_VERSION_MAJOR 1
+ #endif
+ #if DB_VERSION_MAJOR >= 1
+ sm_newdb_lib=1
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "sm_newdb_lib=1" >/dev/null 2>&1; then
+ sm_newdb_lib=db1
+fi
+rm -f conftest*
+
+
+fi
+rm -f conftest*
+
+
+fi
+rm -f conftest*
+
+
+fi
+rm -f conftest*
+
+ # < 8.10.x can't handle db3+
+ v2i 8.10.0;
+ if test $sm_version_math -lt $sm_version_test; then
+ #if test $ac_cv_header_db3_db_185_h = yes -o \
+ # $ac_cv_header_db_185_h = yes; then
+ # sm_use_185=yes;
+ #else
+ ac_cv_header_db4_db_h=no;
+ ac_cv_header_db3_db_h=no;
+ if test $sm_newdb_lib = db-4.0 -o \
+ $sm_newdb_lib = db3; then
+ if test $ac_cv_header_db2_db_h = yes; then
+ { echo "$as_me:$LINENO: WARNING: <8.10.0 & $sm_newdb_lib: trying db2" >&5
+echo "$as_me: WARNING: <8.10.0 & $sm_newdb_lib: trying db2" >&2;}
+ sm_newdb_lib=db2;
+ else
+ { echo "$as_me:$LINENO: WARNING: <8.10.0 & $sm_newdb_lib: trying db1" >&5
+echo "$as_me: WARNING: <8.10.0 & $sm_newdb_lib: trying db1" >&2;}
+ sm_newdb_lib=db1;
+ fi;
+ fi;
+ # fi;
+ fi;
+ # < 8.9.0 can't handle db2+ ????
+ v2i 8.9.0;
+ if test $sm_version_math -lt $sm_version_test; then
+ ac_cv_header_db4_db_h=no;
+ ac_cv_header_db3_db_h=no;
+ ac_cv_header_db2_db_h=no;
+ if test $sm_newdb_lib = db2; then
+ { echo "$as_me:$LINENO: WARNING: <8.9.0 & $sm_newdb_lib: trying db1" >&5
+echo "$as_me: WARNING: <8.9.0 & $sm_newdb_lib: trying db1" >&2;}
+ sm_newdb_lib=db1;
+ fi;
+ fi;
+ echo "$as_me:$LINENO: result: $sm_newdb_lib" >&5
+echo "${ECHO_T}$sm_newdb_lib" >&6
+ if test "X$sm_newdb_lib" = "X"; then
+ { echo "$as_me:$LINENO: WARNING: NEWDB version unknown, omitting support!" >&5
+echo "$as_me: WARNING: NEWDB version unknown, omitting support!" >&2;}
+ sm_have_newdb=no;
+ fi;
+ fi;
+
+ # Check first for a library matching the db version (-ldb4, etc)
+ # then check to see if -ldb will work
+ if test $sm_have_newdb != no; then
+ sm_old_libs="$LIBS";
+ if test $sm_newdb_lib = db-4.0; then
+ as_ac_Lib=`echo "ac_cv_lib_$sm_newdb_lib''_db_create_4000" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for db_create_4000 in -l$sm_newdb_lib" >&5
+echo $ECHO_N "checking for db_create_4000 in -l$sm_newdb_lib... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$sm_newdb_lib $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char db_create_4000 ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+db_create_4000 ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Lib=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+ :
+else
+
+ echo "$as_me:$LINENO: checking for db_create_4000 in -ldb" >&5
+echo $ECHO_N "checking for db_create_4000 in -ldb... $ECHO_C" >&6
+if test "${ac_cv_lib_db_db_create_4000+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldb $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char db_create_4000 ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+db_create_4000 ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_db_db_create_4000=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_db_db_create_4000=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_db_db_create_4000" >&5
+echo "${ECHO_T}$ac_cv_lib_db_db_create_4000" >&6
+if test $ac_cv_lib_db_db_create_4000 = yes; then
+ sm_newdb_lib='db'
+else
+ sm_have_newdb=no
+fi
+
+fi
+ elif test $sm_newdb_lib = db3; then
+ as_ac_Lib=`echo "ac_cv_lib_$sm_newdb_lib''_db_create" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for db_create in -l$sm_newdb_lib" >&5
+echo $ECHO_N "checking for db_create in -l$sm_newdb_lib... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$sm_newdb_lib $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char db_create ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+db_create ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Lib=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+ :
+else
+
+ echo "$as_me:$LINENO: checking for db_create in -ldb" >&5
+echo $ECHO_N "checking for db_create in -ldb... $ECHO_C" >&6
+if test "${ac_cv_lib_db_db_create+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldb $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char db_create ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+db_create ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_db_db_create=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_db_db_create=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_db_db_create" >&5
+echo "${ECHO_T}$ac_cv_lib_db_db_create" >&6
+if test $ac_cv_lib_db_db_create = yes; then
+ sm_newdb_lib='db'
+else
+ sm_have_newdb=no
+fi
+
+fi
+ elif test $sm_newdb_lib = db2; then
+ as_ac_Lib=`echo "ac_cv_lib_$sm_newdb_lib''_db_open" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for db_open in -l$sm_newdb_lib" >&5
+echo $ECHO_N "checking for db_open in -l$sm_newdb_lib... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$sm_newdb_lib $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char db_open ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+db_open ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Lib=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+ :
+else
+
+ echo "$as_me:$LINENO: checking for db_open in -ldb" >&5
+echo $ECHO_N "checking for db_open in -ldb... $ECHO_C" >&6
+if test "${ac_cv_lib_db_db_open+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldb $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char db_open ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+db_open ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_db_db_open=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_db_db_open=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_db_db_open" >&5
+echo "${ECHO_T}$ac_cv_lib_db_db_open" >&6
+if test $ac_cv_lib_db_db_open = yes; then
+ sm_newdb_lib='db'
+else
+ sm_have_newdb=no
+fi
+
+fi
+ else
+ as_ac_Lib=`echo "ac_cv_lib_$sm_newdb_lib''_dbopen" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for dbopen in -l$sm_newdb_lib" >&5
+echo $ECHO_N "checking for dbopen in -l$sm_newdb_lib... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$sm_newdb_lib $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dbopen ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+dbopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Lib=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+ :
+else
+
+ echo "$as_me:$LINENO: checking for dbopen in -ldb" >&5
+echo $ECHO_N "checking for dbopen in -ldb... $ECHO_C" >&6
+if test "${ac_cv_lib_db_dbopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldb $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dbopen ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+dbopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_db_dbopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_db_dbopen=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_db_dbopen" >&5
+echo "${ECHO_T}$ac_cv_lib_db_dbopen" >&6
+if test $ac_cv_lib_db_dbopen = yes; then
+ sm_newdb_lib='db'
+else
+ sm_have_newdb=no
+fi
+
+fi
+ fi;
+ if test $sm_newdb_lib = db; then
+ as_ac_Lib=`echo "ac_cv_lib_$sm_newdb_lib''_dbopen" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for dbopen in -l$sm_newdb_lib" >&5
+echo $ECHO_N "checking for dbopen in -l$sm_newdb_lib... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$sm_newdb_lib $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dbopen ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+dbopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Lib=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+ :
+else
+
+ echo "$as_me:$LINENO: checking for dbopen in -ldb" >&5
+echo $ECHO_N "checking for dbopen in -ldb... $ECHO_C" >&6
+if test "${ac_cv_lib_db_dbopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldb $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dbopen ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+dbopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_db_dbopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_db_dbopen=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_db_dbopen" >&5
+echo "${ECHO_T}$ac_cv_lib_db_dbopen" >&6
+if test $ac_cv_lib_db_dbopen = yes; then
+ sm_newdb_lib='db'
+else
+ sm_have_newdb=no
+fi
+
+fi
+ fi;
+ LIBS="$sm_old_libs";
+
+ if test $sm_have_newdb != yes; then
+ { echo "$as_me:$LINENO: WARNING: Could not find -l$sm_newdb_lib (or -ldb)" >&5
+echo "$as_me: WARNING: Could not find -l$sm_newdb_lib (or -ldb)" >&2;}
+ fi;
+ fi;
+
+ # only libsmdb and sendmail #include <db.h>, but libsmdb is needed
+ # by most of the other components
+ if test $sm_have_newdb = yes; then
+ if test \( $ac_cv_header_db4_db_h = yes -a $sm_newdb_lib = db-4.0 \) \
+ -o \( $ac_cv_header_db3_db_h = yes -a $sm_newdb_lib = db3 \) \
+ -o \( $ac_cv_header_db2_db_h = yes -a $sm_newdb_lib = db2 \) \
+ -o \( $ac_cv_header_db1_db_h = yes -a $sm_newdb_lib = db1 \); then
+ sm_libsmdb_envdef="$sm_libsmdb_envdef -I/usr/include/$sm_newdb_lib";
+ sm_sendmail_envdef="$sm_sendmail_envdef -I/usr/include/$sm_newdb_lib";
+ fi;
+ if test $sm_use_185 = yes; then
+ :
+ #sm_libsmdb_envdef="$sm_libsmdb_envdef -Ddb.h db_185.h";
+ #sm_sendmail_envdef="$sm_sendmail_envdef -Ddb.h db_185.h";
+ fi;
+ junk=$(echo "${sm_newdb_lib}" | sed -e 's/^db\(-\)\?//');
+ sm_databases="$sm_databases, DB";
+ if test $junk != 1; then
+ sm_badepends="$sm_badepends, libdb${junk}-dev";
+ fi;
+ sm_mapdef="$sm_mapdef -DNEWDB";
+ junk=$(echo "${sm_newdb_lib}" | sed -e 's/^db//');
+ sm_newdb_lib="-ldb${junk}";
+ sm_editmap_libs="$sm_editmap_libs $sm_newdb_lib";
+ sm_makemap_libs="$sm_makemap_libs $sm_newdb_lib";
+ sm_praliases_libs="$sm_praliases_libs $sm_newdb_lib";
+ sm_sendmail_libs="$sm_sendmail_libs $sm_newdb_lib";
+ sm_vacation_libs="$sm_vacation_libs $sm_newdb_lib";
+ elif test $sm_enable_newdb = auto; then
+ { echo "$as_me:$LINENO: WARNING: Could not locate NEWDB (libdb{4,3,2,1,}-dev) package" >&5
+echo "$as_me: WARNING: Could not locate NEWDB (libdb{4,3,2,1,}-dev) package" >&2;}
+ else
+ { { echo "$as_me:$LINENO: error: Could not locate NEWDB (libdb{4,3,2,1,}-dev) package" >&5
+echo "$as_me: error: Could not locate NEWDB (libdb{4,3,2,1,}-dev) package" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+ fi;
+sm_enable_newdb=$sm_have_newdb;
+
+
+#-------------------------------------------------------------------
+#
+# Check for presence of NIS headers
+#
+sm_have_nis=no;
+if test $sm_enable_nis != no; then
+
+for ac_header in rpcsvc/ypclnt.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ sm_have_nis=yes
+
+else
+ sm_have_nis=no
+fi
+
+done
+
+
+ if test $sm_have_nis = yes; then
+ echo "$as_me:$LINENO: checking for main in -lnsl" >&5
+echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_nsl_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
+if test $ac_cv_lib_nsl_main = yes; then
+ sm_have_nis=yes
+
+else
+ sm_have_nis=no
+fi
+
+
+ if test $sm_have_nis != yes; then
+ { echo "$as_me:$LINENO: WARNING: Could not find -lnsl" >&5
+echo "$as_me: WARNING: Could not find -lnsl" >&2;}
+ fi;
+ fi;
+
+ if test $sm_have_nis = yes; then
+ sm_databases="$sm_databases, NIS";
+ sm_mapdef="$sm_mapdef -DNIS";
+ sm_sendmail_libs="$sm_sendmail_libs -lnsl";
+ elif test $sm_enable_nis = auto; then
+ { echo "$as_me:$LINENO: WARNING: Could not locate NIS package" >&5
+echo "$as_me: WARNING: Could not locate NIS package" >&2;}
+ else
+ { { echo "$as_me:$LINENO: error: Could not locate NIS package" >&5
+echo "$as_me: error: Could not locate NIS package" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+ fi;
+sm_enable_nis=$sm_have_nis;
+
+#-------------------------------------------------------------------
+#
+# Check for presence of NISPLUS headers
+#
+sm_have_nisplus=no;
+if test $sm_enable_nisplus != no; then
+
+for ac_header in rpcsvc/nis.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ sm_have_nisplus=yes
+
+else
+ sm_have_nisplus=no
+fi
+
+done
+
+
+ if test $sm_have_nisplus = yes -a \
+ $sm_have_nis = no; then
+ echo "$as_me:$LINENO: checking for main in -lnsl" >&5
+echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_nsl_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
+if test $ac_cv_lib_nsl_main = yes; then
+ sm_have_nis=yes
+
+else
+ sm_have_nis=no
+fi
+
+
+ if test $sm_have_nis != yes; then
+ { echo "$as_me:$LINENO: WARNING: Could not find -lnsl" >&5
+echo "$as_me: WARNING: Could not find -lnsl" >&2;}
+ fi;
+ fi;
+
+ if test $sm_have_nisplus = yes; then
+ sm_databases="$sm_databases, NIS+";
+ sm_mapdef="$sm_mapdef -DNISPLUS";
+ if test $sm_have_nis != yes; then
+ sm_sendmail_libs="$sm_sendmail_libs -lnsl";
+ fi;
+ elif test $sm_enable_nisplus = auto; then
+ { echo "$as_me:$LINENO: WARNING: Could not locate NISPLUS package" >&5
+echo "$as_me: WARNING: Could not locate NISPLUS package" >&2;}
+ else
+ { { echo "$as_me:$LINENO: error: Could not locate NISPLUS package" >&5
+echo "$as_me: error: Could not locate NISPLUS package" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+ fi;
+sm_enable_nisplus=$sm_have_nisplus;
+
+#-------------------------------------------------------------------
+#
+# Check for presence of LDAP headers (support OpenLDAP v2/v1, Umich)
+#
+sm_have_ldap=no;
+sm_have_ldap_init=no;
+sm_have_ldap_memfree=no;
+sm_ldap_inc=;
+sm_ldap_lib=;
+sm_ldap_pkg=;
+if test $sm_enable_ldap != no; then
+
+
+for ac_header in ldap.h umich-ldap/ldap.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ if test $ac_cv_header_ldap_h = yes; then
+ echo "$as_me:$LINENO: checking for main in -lldap" >&5
+echo $ECHO_N "checking for main in -lldap... $ECHO_C" >&6
+if test "${ac_cv_lib_ldap_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lldap -llber $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ldap_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_ldap_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_main" >&5
+echo "${ECHO_T}$ac_cv_lib_ldap_main" >&6
+if test $ac_cv_lib_ldap_main = yes; then
+ sm_have_ldap=yes
+
+else
+ sm_have_ldap=no
+
+fi
+
+ echo "$as_me:$LINENO: checking for ldap_init in -lldap" >&5
+echo $ECHO_N "checking for ldap_init in -lldap... $ECHO_C" >&6
+if test "${ac_cv_lib_ldap_ldap_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lldap -llber $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ldap_init ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ldap_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ldap_ldap_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_ldap_ldap_init=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_init" >&5
+echo "${ECHO_T}$ac_cv_lib_ldap_ldap_init" >&6
+if test $ac_cv_lib_ldap_ldap_init = yes; then
+ sm_have_ldap_init=yes
+
+else
+ sm_have_ldap_init=no
+
+fi
+
+ echo "$as_me:$LINENO: checking for ldap_memfree in -lldap" >&5
+echo $ECHO_N "checking for ldap_memfree in -lldap... $ECHO_C" >&6
+if test "${ac_cv_lib_ldap_ldap_memfree+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lldap -llber $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char ldap_memfree ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ldap_memfree ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ldap_ldap_memfree=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_ldap_ldap_memfree=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_memfree" >&5
+echo "${ECHO_T}$ac_cv_lib_ldap_ldap_memfree" >&6
+if test $ac_cv_lib_ldap_ldap_memfree = yes; then
+ sm_have_ldap_memfree=yes
+
+else
+ sm_have_ldap_memfree=no
+
+fi
+
+
+ if test $sm_have_ldap = yes; then
+ echo "$as_me:$LINENO: checking for main in -llber" >&5
+echo $ECHO_N "checking for main in -llber... $ECHO_C" >&6
+if test "${ac_cv_lib_lber_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-llber $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_lber_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_lber_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_lber_main" >&5
+echo "${ECHO_T}$ac_cv_lib_lber_main" >&6
+if test $ac_cv_lib_lber_main = yes; then
+ sm_have_ldap=yes
+
+else
+ sm_have_ldap=no
+fi
+
+ fi;
+
+ if test $sm_have_ldap = yes; then
+ echo "$as_me:$LINENO: checking for openldap package" >&5
+echo $ECHO_N "checking for openldap package... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+ #if defined(HAVE_LDAP_H)
+ #include <ldap.h>
+ #if defined(LDAP_VERSION3)
+ sm_ldap_version=3
+ #else
+ sm_ldap_version=2
+ #endif
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "sm_ldap_version=3" >/dev/null 2>&1; then
+ sm_ldap_pkg="libldap2-dev"
+
+else
+ sm_ldap_pkg="libopenldap-dev"
+fi
+rm -f conftest*
+
+ echo "$as_me:$LINENO: result: $sm_ldap_pkg" >&5
+echo "${ECHO_T}$sm_ldap_pkg" >&6
+ fi;
+
+ if test $sm_have_ldap = yes; then
+ sm_badepends="$sm_badepends, $sm_ldap_pkg"
+ sm_ldap_lib="-lldap -llber";
+ else
+ { echo "$as_me:$LINENO: WARNING: Could not find OpenLDAP -lldap or -llber" >&5
+echo "$as_me: WARNING: Could not find OpenLDAP -lldap or -llber" >&2;}
+ fi;
+ fi;
+
+ if test "X$ac_cv_header_umich_ldap_ldap_h" = Xyes -a \
+ $sm_have_ldap != yes; then
+ echo "$as_me:$LINENO: checking for main in -lumich_ldap" >&5
+echo $ECHO_N "checking for main in -lumich_ldap... $ECHO_C" >&6
+if test "${ac_cv_lib_umich_ldap_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lumich_ldap -lumich_lber $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_umich_ldap_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_umich_ldap_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_umich_ldap_main" >&5
+echo "${ECHO_T}$ac_cv_lib_umich_ldap_main" >&6
+if test $ac_cv_lib_umich_ldap_main = yes; then
+ sm_have_ldap=yes
+
+else
+ sm_have_ldap=no
+
+fi
+
+
+ if test $sm_have_ldap = yes; then
+ echo "$as_me:$LINENO: checking for main in -lumich_lber" >&5
+echo $ECHO_N "checking for main in -lumich_lber... $ECHO_C" >&6
+if test "${ac_cv_lib_umich_lber_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lumich_lber $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_umich_lber_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_umich_lber_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_umich_lber_main" >&5
+echo "${ECHO_T}$ac_cv_lib_umich_lber_main" >&6
+if test $ac_cv_lib_umich_lber_main = yes; then
+ sm_have_ldap=yes
+
+else
+ sm_have_ldap=no
+fi
+
+ fi;
+
+ if test $sm_have_ldap = yes; then
+ sm_badepends="$sm_badepends, umich-libldap-dev";
+ sm_ldap_inc="-I/usr/include/umich-ldap";
+ sm_ldap_lib="-lumich_ldap -lumich_lber";
+ else
+ { echo "$as_me:$LINENO: WARNING: Could not find UMich -lldap or -llber" >&5
+echo "$as_me: WARNING: Could not find UMich -lldap or -llber" >&2;}
+ fi;
+ fi;
+
+ if test $sm_have_ldap = yes; then
+ #
+ # sendmail/conf.h includes LDAP, so everything does...
+ sm_databases="$sm_databases, LDAP";
+ sm_mapdef="$sm_mapdef -DLDAPMAP";
+ sm_incdirs="$sm_incdirs $sm_ldap_inc";
+ #sm_libs="$sm_libs $sm_ldap_lib";
+ sm_editmap_libs="$sm_editmap_libs $sm_ldap_lib";
+ sm_libsm_libs="$sm_libsm_libs $sm_ldap_lib";
+ sm_mail_local_libs="$sm_mail_local_libs $sm_ldap_lib";
+ sm_mailstats_libs="$sm_mailstats_libs $sm_ldap_lib";
+ sm_makemap_libs="$sm_makemap_libs $sm_ldap_lib";
+ sm_praliases_libs="$sm_praliases_libs $sm_ldap_lib";
+ sm_rmail_libs="$sm_rmail_libs $sm_ldap_lib";
+ sm_sendmail_libs="$sm_sendmail_libs $sm_ldap_lib";
+ sm_smrsh_libs="$sm_smrsh_libs $sm_ldap_lib";
+ sm_vacation_libs="$sm_vacation_libs $sm_ldap_lib";
+ if test $sm_have_ldap_init = yes; then
+ sm_libsm_envdef="$sm_libsm_envdef -DLDAP_REFERRALS";
+ sm_sendmail_envdef="$sm_sendmail_envdef -DLDAP_REFERRALS";
+ sm_libsm_envdef="$sm_libsm_envdef -D_FFR_LDAP_URI";
+ sm_sendmail_envdef="$sm_sendmail_envdef -D_FFR_LDAP_URI";
+ sm_libsm_envdef="$sm_libsm_envdef -D_FFR_LDAP_SETVERSION";
+ sm_sendmail_envdef="$sm_sendmail_envdef -D_FFR_LDAP_SETVERSION";
+ fi;
+ if test $sm_have_ldap_memfree = yes; then
+ sm_libsm_envdef="$sm_libsm_envdef -DSM_CONF_LDAP_MEMFREE";
+ fi;
+ elif test $sm_enable_ldap = auto; then
+ { echo "$as_me:$LINENO: WARNING: Could not locate LDAP (libldap2-dev) package" >&5
+echo "$as_me: WARNING: Could not locate LDAP (libldap2-dev) package" >&2;}
+ else
+ { { echo "$as_me:$LINENO: error: Could not locate LDAP (libldap2-dev) package" >&5
+echo "$as_me: error: Could not locate LDAP (libldap2-dev) package" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+ fi;
+sm_enable_ldap=$sm_have_ldap;
+
+#-------------------------------------------------------------------
+#
+# Check for presence of resolve(and/or bind) headers
+# if found, enable other maps dependant upon resolver libraries
+#
+# Since GLIBC 2.2.1 has mucked with resolv.h, we must build w/bind 8.2.2p7
+# Unfortunately, this will fsck up HESIOD (bind 8.2 only has partial support)
+# It also messed with openLDAP - making it not work ;(
+#
+# We're now using resolv.h - as it seems to be working (w/sendmail changes)
+#
+sm_have_resolve=no;
+sm_have_bind=no;
+resolve_lib='';
+resolve_inc='';
+#if test $sm_enable_resolv != no; then
+
+
+for ac_header in resolv.h bind/resolv.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_resolv_h = yes; then
+ sm_have_resolve=yes;
+ fi;
+ if test $ac_cv_header_bind_resolv_h = yes; then
+ sm_have_bind=yes;
+ fi;
+
+ if test $ac_cv_header_resolv_h = yes; then
+ echo "$as_me:$LINENO: checking for __res_query in -lresolv" >&5
+echo $ECHO_N "checking for __res_query in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv___res_query+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char __res_query ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+__res_query ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_resolv___res_query=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_resolv___res_query=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_query" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv___res_query" >&6
+if test $ac_cv_lib_resolv___res_query = yes; then
+ sm_have_resolve=yes
+
+else
+ echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5
+echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_res_query+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_query ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+res_query ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_resolv_res_query=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_resolv_res_query=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_query" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_res_query" >&6
+if test $ac_cv_lib_resolv_res_query = yes; then
+ sm_have_resolve=yes
+
+else
+ sm_have_resolve=no
+fi
+
+
+fi
+
+
+ if test $sm_have_resolve = yes; then
+ resolve_inc='';
+ resolve_lib='-lresolv';
+ else
+ { echo "$as_me:$LINENO: WARNING: Could not find -lresolv" >&5
+echo "$as_me: WARNING: Could not find -lresolv" >&2;}
+ fi;
+ fi;
+
+ if test $ac_cv_header_bind_resolv_h = yes; then
+ echo "$as_me:$LINENO: checking for __res_query in -lbind" >&5
+echo $ECHO_N "checking for __res_query in -lbind... $ECHO_C" >&6
+if test "${ac_cv_lib_bind___res_query+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbind $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char __res_query ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+__res_query ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_bind___res_query=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_bind___res_query=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_bind___res_query" >&5
+echo "${ECHO_T}$ac_cv_lib_bind___res_query" >&6
+if test $ac_cv_lib_bind___res_query = yes; then
+ sm_have_bind=yes
+
+else
+ sm_have_bind=no
+fi
+
+
+ if test $sm_have_bind = yes; then
+ if test $sm_enable_bind = yes; then
+ sm_badepends="$sm_badepends, bind-dev";
+ resolve_inc='-I/usr/include/bind';
+ resolve_lib='-lbind -lresolv';
+ else
+ sm_have_bind=no;
+ fi;
+ else
+ { echo "$as_me:$LINENO: WARNING: Could not find -lbind (bind-dev)" >&5
+echo "$as_me: WARNING: Could not find -lbind (bind-dev)" >&2;}
+ fi;
+ fi;
+
+ if test $sm_have_resolve = yes; then
+ v2i 8.12.0;
+ if test $sm_version_math -ge $sm_version_test; then
+ sm_databases="$sm_databases, DNS";
+ fi;
+ #sm_incdirs="$sm_incdirs $resolve_inc";
+ #sm_libs="$sm_libs "$resolve_lib";
+ sm_sendmail_envdef="$sm_sendmail_envdef $resolve_inc";
+ sm_sendmail_libs="$sm_sendmail_libs $resolve_lib";
+ else
+ { { echo "$as_me:$LINENO: error: Could not locate RESOLV package" >&5
+echo "$as_me: error: Could not locate RESOLV package" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+# fi;
+sm_enable_bind=$sm_have_bind;
+
+#-------------------------------------------------------------------
+#
+# Check for presence of HESIOD headers
+# Note: if using libhesiod, we should have HES_GETMAILHOST
+# if using libbind, it doesn't have HES_GETMAILHOST ;-{
+#
+sm_have_hesiod=no;
+sm_hesiod_parms='';
+if test $sm_enable_hesiod != no; then
+
+
+for ac_header in hesiod.h bind/hesiod.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_hesiod_h = yes; then
+ sm_have_hesiod=yes;
+ elif test $ac_cv_header_bind_hesiod_h = yes -a \
+ $sm_have_bind = yes; then
+ sm_have_hesiod=yes;
+ fi;
+
+ if test $sm_have_hesiod = yes; then
+ echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
+echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6
+ CPPFLAGS_SAVE="$CPPFLAGS";
+ CPPFLAGS="$resolve_inc";
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+ #include <hesiod.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "hes_getmailhost\(" >/dev/null 2>&1; then
+ sm_hesiod_parms="-DHES_GETMAILHOST"
+fi
+rm -f conftest*
+
+ CPPFLAGS="$CPPFLAGS_SAVE";
+ if test -z "$sm_hesiod_parms"; then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ fi;
+ fi;
+
+ if test $sm_have_hesiod = yes; then
+ sm_databases="$sm_databases, HESIOD";
+ sm_badepends="$sm_badepends, libhesiod-dev";
+ sm_mapdef="$sm_mapdef -DHESIOD";
+ sm_libsmutil_envdef="$sm_libsmutil_envdef $resolve_inc";
+ sm_sendmail_envdef="$sm_sendmail_envdef $sm_hesiod_parms";
+ # Need following if not using bind headers
+ if test -z "$resolve_inc"; then
+ sm_sendmail_libs="$sm_sendmail_libs -lhesiod";
+ fi;
+ elif test $sm_enable_hesiod = auto; then
+ { echo "$as_me:$LINENO: WARNING: Could not locate HESIOD (libhesiod-dev) package" >&5
+echo "$as_me: WARNING: Could not locate HESIOD (libhesiod-dev) package" >&2;}
+ else
+ { { echo "$as_me:$LINENO: error: Could not locate HESIOD (libhesiod-dev) package" >&5
+echo "$as_me: error: Could not locate HESIOD (libhesiod-dev) package" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+ fi;
+sm_enable_hesiod=$sm_have_hesiod;
+
+#-------------------------------------------------------------------
+#
+# Check for presence of TCP Wrapper headers
+#
+sm_have_tcpd=no;
+if test $sm_enable_tcpd != no; then
+
+for ac_header in tcpd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ sm_have_tcpd=yes
+
+else
+ sm_have_tcpd=no
+fi
+
+done
+
+
+ if test $ac_cv_header_tcpd_h = yes ; then
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+ int allow_severity = 0;
+ int deny_severity = 0;
+
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+hosts_access()
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ sm_have_tcpd=yes
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+sm_have_tcpd=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ fi;
+
+ if test $sm_have_tcpd = yes; then
+ echo "$as_me:$LINENO: checking for main in -lwrap" >&5
+echo $ECHO_N "checking for main in -lwrap... $ECHO_C" >&6
+if test "${ac_cv_lib_wrap_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lwrap $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_wrap_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_wrap_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_wrap_main" >&5
+echo "${ECHO_T}$ac_cv_lib_wrap_main" >&6
+if test $ac_cv_lib_wrap_main = yes; then
+ sm_have_tcpd=yes
+
+else
+ sm_have_tcpd=no
+fi
+
+
+ if test $sm_have_tcpd != yes; then
+ { echo "$as_me:$LINENO: WARNING: Could not find -lwrap (libwrap0-dev)" >&5
+echo "$as_me: WARNING: Could not find -lwrap (libwrap0-dev)" >&2;}
+ fi;
+ fi;
+
+ if test $sm_have_tcpd = yes; then
+ sm_features="$sm_features, TCPWrappers";
+ sm_badepends="$sm_badepends, libwrap0-dev";
+ sm_sendmail_envdef="$sm_sendmail_envdef -DTCPWRAPPERS";
+ sm_sendmail_libs="$sm_sendmail_libs -lwrap";
+ elif test $sm_enable_tcpd = auto; then
+ { echo "$as_me:$LINENO: WARNING: TCPD(libwrap0-dev) protection not supported!" >&5
+echo "$as_me: WARNING: TCPD(libwrap0-dev) protection not supported!" >&2;}
+ else
+ { { echo "$as_me:$LINENO: error: TCPD(libwrap0-dev) protection not supported!" >&5
+echo "$as_me: error: TCPD(libwrap0-dev) protection not supported!" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+ fi;
+sm_enable_tcpd=$sm_have_tcpd;
+
+#-------------------------------------------------------------------
+#
+# Check for presence of IPV6 headers
+#
+sm_have_ipv6=no;
+if test $sm_enable_ipv6 != no; then
+
+for ac_header in netinet/ip6.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ sm_have_ipv6=yes
+
+else
+ sm_have_ipv6=no
+fi
+
+done
+
+
+ if test $ac_cv_header_netinet_ip6_h = yes ; then
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+ #include <netdb.h>
+ #if defined(AI_DEFAULT)
+ sm_have_ipv6=yes
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "sm_have_ipv6=yes" >/dev/null 2>&1; then
+ sm_have_ipv6=yes
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+ #include <bind/netdb.h>
+ #if defined(AI_DEFAULT)
+ sm_have_ipv6=yes
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "sm_have_ipv6=yes" >/dev/null 2>&1; then
+ sm_have_ipv6=yes
+fi
+rm -f conftest*
+
+
+fi
+rm -f conftest*
+
+ if test $sm_have_ipv6 = no; then
+ { { echo "$as_me:$LINENO: error: Your level of netdb precludes IPv6 support" >&5
+echo "$as_me: error: Your level of netdb precludes IPv6 support" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+ fi;
+
+ if test $sm_have_ipv6 = yes; then
+
+for ac_func in getaddrinfo
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ sm_have_ipv6=yes
+
+else
+ sm_have_ipv6=no
+fi
+done
+
+ if test $sm_have_ipv6 = no; then
+ { { echo "$as_me:$LINENO: error: IPv6 support requires getaddrinfo" >&5
+echo "$as_me: error: IPv6 support requires getaddrinfo" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+ fi;
+
+ if test $sm_have_ipv6 = yes; then
+ v2i 8.10.0;
+ if test $sm_version_math -ge $sm_version_test; then
+ sm_features="$sm_features, IPv6";
+ sm_sendmail_envdef="$sm_sendmail_envdef -DNETINET6";
+ # Need following if using bind headers
+ if test ! -z "$resolve_inc"; then
+ sm_sendmail_envdef="$sm_sendmail_envdef -DNEEDSGETIPNODE=0";
+ fi;
+ fi;
+ elif test $sm_enable_ipv6 = auto; then
+ { echo "$as_me:$LINENO: WARNING: Could not locate IPv6 package" >&5
+echo "$as_me: WARNING: Could not locate IPv6 package" >&2;}
+ else
+ { { echo "$as_me:$LINENO: error: Could not locate IPv6 package" >&5
+echo "$as_me: error: Could not locate IPv6 package" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+ fi;
+sm_enable_ipv6=$sm_have_ipv6;
+
+#-------------------------------------------------------------------
+#
+# Check for presence of maillock headers
+#
+sm_have_maillock=no;
+if test $sm_enable_maillock != no; then
+
+for ac_header in maillock.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ sm_have_maillock=yes
+
+else
+ sm_have_maillock=no
+fi
+
+done
+
+
+ if test $ac_cv_header_maillock_h = yes ; then
+ echo "$as_me:$LINENO: checking for main in -llockfile" >&5
+echo $ECHO_N "checking for main in -llockfile... $ECHO_C" >&6
+if test "${ac_cv_lib_lockfile_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-llockfile $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_lockfile_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_lockfile_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_main" >&5
+echo "${ECHO_T}$ac_cv_lib_lockfile_main" >&6
+if test $ac_cv_lib_lockfile_main = yes; then
+ sm__have_maillock=yes
+
+else
+ sm_have_maillock=no
+fi
+
+
+ if test $sm_have_maillock != yes; then
+ { echo "$as_me:$LINENO: WARNING: Could not find -llockfile (liblockfile-dev)" >&5
+echo "$as_me: WARNING: Could not find -llockfile (liblockfile-dev)" >&2;}
+ fi;
+ fi;
+
+ if test $sm_have_maillock = yes; then
+ sm_features="$sm_features, LockFile";
+ sm_badepends="$sm_badepends, liblockfile-dev";
+ sm_mail_local_envdef="$sm_mail_local_envdef -DMAILLOCK";
+ sm_mail_local_libs="$sm_mail_local_libs -llockfile";
+ elif test $sm_enable_maillock = auto; then
+ { echo "$as_me:$LINENO: WARNING: Could not locate liblockfile-dev package" >&5
+echo "$as_me: WARNING: Could not locate liblockfile-dev package" >&2;}
+ else
+ { { echo "$as_me:$LINENO: error: Could not locate liblockfile-dev package" >&5
+echo "$as_me: error: Could not locate liblockfile-dev package" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+ fi;
+sm_enable_maillock=$sm_have_maillock;
+
+#-------------------------------------------------------------------
+#
+# Check for presence of SFIO headers
+# Note: required for TLS and security layer of SASL on 8.11)
+# Note: SFIO is *only* used if required, but we allow the checks
+# on any version (for header test) - just issue no messages
+# unless needed
+#
+sm_have_sfio=no;
+if test $sm_enable_sfio != no; then
+ CPPFLAGS_SAVE="$CPPFLAGS";
+ CPPFLAGS="-I/usr/include/sfio"
+
+for ac_header in sfio/stdio.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ sm_have_sfio=yes
+
+else
+ sm_have_sfio=no
+fi
+
+done
+
+ CPPFLAGS="$CPPFLAGS_SAVE";
+
+ if test $ac_cv_header_sfio_stdio_h = yes ; then
+ echo "$as_me:$LINENO: checking for main in -lsfio" >&5
+echo $ECHO_N "checking for main in -lsfio... $ECHO_C" >&6
+if test "${ac_cv_lib_sfio_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsfio $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_sfio_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_sfio_main=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_sfio_main" >&5
+echo "${ECHO_T}$ac_cv_lib_sfio_main" >&6
+if test $ac_cv_lib_sfio_main = yes; then
+ sm_have_sfio=yes
+
+else
+ sm_have_sfio=no
+fi
+
+
+ if test $sm_have_sfio != yes; then
+ { echo "$as_me:$LINENO: WARNING: Could not find -lsfio (sfio-dev)" >&5
+echo "$as_me: WARNING: Could not find -lsfio (sfio-dev)" >&2;}
+ fi;
+ fi;
+
+ # SFIO is only required for TLS/SASL on 8.11, ignore it otherwise
+ # when using it, however, it hits *everything*, put it in the front!
+ if test "$sm_version_major" = "8.11"; then
+ if test $sm_have_sfio = yes; then
+ sm_badepends="$sm_badepends, sfio-dev";
+ sm_incdirs="-I/usr/include/sfio $sm_incdirs";
+ sm_envdef="-DSFIO $sm_envdef";
+ sm_libs="-lsfio $sm_libs";
+ elif test $sm_enable_sfio = auto; then
+ { echo "$as_me:$LINENO: WARNING: SFIO, and therefore TLS not supported!" >&5
+echo "$as_me: WARNING: SFIO, and therefore TLS not supported!" >&2;}
+ else
+ { { echo "$as_me:$LINENO: error: SFIO, and therefore TLS not supported!" >&5
+echo "$as_me: error: SFIO, and therefore TLS not supported!" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+ else
+ sm_have_sfio=no;
+ fi;
+ fi;
+sm_enable_sfio=$sm_have_sfio;
+
+#-------------------------------------------------------------------
+#
+# Check for presence of SASL headers (for SMTP auth)
+#
+sm_have_auth=no;
+sm_auth_lib='?';
+if test $sm_enable_auth != no; then
+
+
+for ac_header in sasl/sasl.h sasl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ if test $ac_cv_header_sasl_sasl_h = yes \
+ -o $ac_cv_header_sasl_h = yes; then
+ sm_have_auth=yes;
+ else
+ sm_have_auth=no;
+ fi;
+
+ if test $sm_have_auth = yes; then
+ echo "$as_me:$LINENO: checking sasl version" >&5
+echo $ECHO_N "checking sasl version... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+ #if defined(HAVE_SASL_SASL_H)
+ #include <sasl/sasl.h>
+ #elif defined(HAVE_SASL_H)
+ #include <sasl.h>
+ #endif
+ #if SASL_VERSION_MAJOR >= 2
+ sm_auth_lib=2
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "sm_auth_lib=2" >/dev/null 2>&1; then
+ sm_auth_lib=2
+else
+ sm_auth_lib=1
+fi
+rm -f conftest*
+
+ echo "$as_me:$LINENO: result: $sm_auth_lib" >&5
+echo "${ECHO_T}$sm_auth_lib" >&6
+ if test "X$sm_auth_lib" = "X"; then
+ { echo "$as_me:$LINENO: WARNING: SASL version unknown, omitting support!" >&5
+echo "$as_me: WARNING: SASL version unknown, omitting support!" >&2;}
+ sm_have_auth=no;
+ fi;
+ fi;
+
+ # < 8.12.4 can't handle saslv2+
+ v2i 8.12.99; # FIXME: need ldap & saslv2 1st !!!
+ if test $sm_version_math -lt $sm_version_test; then
+ if test $sm_auth_lib = 2; then
+ { echo "$as_me:$LINENO: WARNING: <8.12.4 & saslv$sm_auth_lib: trying saslv1" >&5
+echo "$as_me: WARNING: <8.12.4 & saslv$sm_auth_lib: trying saslv1" >&2;}
+ sm_auth_lib=1;
+ fi;
+ fi;
+
+ if test $sm_auth_lib = 2; then
+ junk='sasl2';
+ else
+ junk='sasl';
+ fi;
+
+ as_ac_Lib=`echo "ac_cv_lib_$junk''_sasl_client_init" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for sasl_client_init in -l$junk" >&5
+echo $ECHO_N "checking for sasl_client_init in -l$junk... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$junk $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sasl_client_init ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+sasl_client_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Lib=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+ sm_have_auth=yes
+
+else
+ sm_have_auth=no
+fi
+
+
+ if test $sm_have_auth != yes; then
+ { echo "$as_me:$LINENO: WARNING: Could not find -l${junk} (lib${junk}-dev)" >&5
+echo "$as_me: WARNING: Could not find -l${junk} (lib${junk}-dev)" >&2;}
+ fi;
+
+ if test $sm_have_auth = yes; then
+ sm_features="$sm_features, SMTP AUTH(SASL)";
+ sm_badepends="$sm_badepends, lib${junk}-dev";
+ sm_suggests="$sm_suggests, ${junk}-bin";
+ sm_suggests="$sm_suggests, lib${junk}-modules-plain";
+ sm_suggests="$sm_suggests, lib${junk}-digestmd5-plain";
+ sm_suggests="$sm_suggests | lib${junk}-digestmd5-des";
+ sm_sendmail_envdef="$sm_sendmail_envdef -DSASL";
+ if test $ac_cv_header_sasl_sasl_h = yes; then
+ sm_sendmail_envdef="$sm_sendmail_envdef -I/usr/include/sasl";
+ fi;
+ if test "$sm_version_major" = "8.12"; then
+ :;
+ elif test "$sm_version_major" = "8.11"; then
+ sm_ffr="$sm_ffr -D_FFR_UNSAFE_SASL=1";
+ sm_ffr="$sm_ffr -D_FFR_SASL_OPTS=1";
+ sm_ffr="$sm_ffr -D_FFR_DEFAUTHINFO_MECHS=1";
+ elif test "$sm_version_major" = "8.10"; then
+ sm_ffr="$sm_ffr -D_FFR_UNSAFE_SASL=1";
+ sm_ffr="$sm_ffr -D_FFR_SASL_OPTS=1";
+ sm_ffr="$sm_ffr -D_FFR_DEFAUTHINFO_MECHS=1";
+ fi;
+ sm_sendmail_libs="$sm_sendmail_libs -l${junk}";
+ elif test $sm_enable_auth = auto; then
+ { echo "$as_me:$LINENO: WARNING: SMTP authentication not supported!" >&5
+echo "$as_me: WARNING: SMTP authentication not supported!" >&2;}
+ else
+ { { echo "$as_me:$LINENO: error: SMTP authentication not supported!" >&5
+echo "$as_me: error: SMTP authentication not supported!" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+ fi;
+sm_enable_auth=$sm_have_auth;
+
+
+#-------------------------------------------------------------------
+#
+# Check for presence of SSL headers
+#
+sm_have_tls=no;
+if test $sm_enable_tls != no; then
+
+for ac_header in openssl/ssl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ sm_have_tls=yes
+
+else
+ sm_have_tls=no
+fi
+
+done
+
+
+ if test $ac_cv_header_openssl_ssl_h = yes; then
+ echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
+echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
+if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lssl -lcrypto $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char SSL_library_init ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+SSL_library_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ssl_SSL_library_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_ssl_SSL_library_init=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
+echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
+if test $ac_cv_lib_ssl_SSL_library_init = yes; then
+ sm_have_tls=yes
+
+else
+ sm_have_tls=no
+
+fi
+
+
+ if test $sm_have_tls != yes; then
+ { echo "$as_me:$LINENO: WARNING: Could not find -lssl (libssl-dev)" >&5
+echo "$as_me: WARNING: Could not find -lssl (libssl-dev)" >&2;}
+ fi;
+ fi;
+
+ # SFIO is required for TLS/SSL support on 8.11
+ if test $sm_have_tls = yes; then
+ if test $sm_have_sfio != yes -a \
+ "$sm_version_major" = '8.11'; then
+ { echo "$as_me:$LINENO: WARNING: SFIO is required for SSL privacy protection!" >&5
+echo "$as_me: WARNING: SFIO is required for SSL privacy protection!" >&2;}
+ sm_have_tls=no;
+ fi;
+ fi;
+
+ if test $sm_have_tls = yes; then
+ v2i 8.11.0;
+ if test $sm_version_math -ge $sm_version_test; then
+ sm_features="$sm_features, STARTTLS(SSL)";
+ sm_badepends="$sm_badepends, libssl-dev";
+ sm_suggests="$sm_suggests, openssl";
+ sm_sendmail_envdef="$sm_sendmail_envdef -DSTARTTLS";
+ sm_sendmail_libs="$sm_sendmail_libs -lcrypto -lssl";
+ sm_ffr="$sm_ffr -D_FFR_TLS_1";
+ fi;
+ v2i 8.12.0;
+ if test $sm_version_math -ge $sm_version_test; then
+ sm_ffr="$sm_ffr -D_FFR_SMTP_SSL";
+ fi;
+ elif test $sm_enable_tls = auto; then
+ { echo "$as_me:$LINENO: WARNING: SSL/TLS privacy protection not supported!" >&5
+echo "$as_me: WARNING: SSL/TLS privacy protection not supported!" >&2;}
+ else
+ { { echo "$as_me:$LINENO: error: SSL/TLS privacy protection not supported!" >&5
+echo "$as_me: error: SSL/TLS privacy protection not supported!" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;
+ fi;
+sm_enable_tls=$sm_have_tls;
+
+#-------------------------------------------------------------------
+# Any requisite variable cleanup
+#-------------------------------------------------------------------
+sm_databases=$(echo "${sm_databases}" | sed -e 's/^, //');
+sm_features=$(echo "${sm_features}" | sed -e 's/^, //');
+sm_badepends=$(echo "${sm_badepends}" | sed -e 's/^, //');
+sm_depends=$(echo "${sm_depends}" | sed -e 's/^, //');
+sm_recommends=$(echo "${sm_recommends}" | sed -e 's/^, //');
+sm_suggests=$(echo "${sm_suggests}" | sed -e 's/^, //');
+
+#-------------------------------------------------------------------
+# Add any FFRs to sendmail_ENVDEF
+#-------------------------------------------------------------------
+sm_sendmail_envdef="$sm_sendmail_envdef $sm_ffr";
+
+#-------------------------------------------------------------------
+# Below 8.10.0, there aren't separate variables per component... munge
+# hell yeah, the output is butt-ugly (duplicates, ordering), but too bad!
+# its not like (sane) people will be looking at these files anyway...
+#-------------------------------------------------------------------
+v2i 8.10.0;
+if test $sm_version_math -lt $sm_version_test; then
+ sm_envdef="$sm_envdef $sm_sendmail_envdef";
+ sm_envdef="$sm_envdef $sm_mail_local_envdef";
+ sm_envdef="$sm_envdef $sm_rmail_envdef";
+ sm_envdef="$sm_envdef $sm_smrsh_envdef";
+ sm_libs="$sm_libs $sm_sendmail_libs";
+ sm_libs="$sm_libs $sm_mail_local_libs";
+ fi;
+
+
+#-------------------------------------------------------------------
+# Fini - define configuration files, and commands upon them
+#-------------------------------------------------------------------
+ac_config_files="$ac_config_files ./build/autoconf.mk ./build/autoconf.pl ./build/autoconf.sh ./build/changelog.sh ./build/control.m4 ./build/update_chaos ./build/site.config.m4 ./rules:./build/rules.in ./libmilter-dev.dirs ./libmilter-dev.postrm ./libmilter-dev.preinst ./sendmail-doc.dirs ./sendmail-doc.postrm ./sendmail-doc.preinst ./sendmail.conffiles ./sendmail.cron.daily ./sendmail.dirs ./sendmail.init.d ./sendmail.links ./sendmail.postinst ./sendmail.postrm ./sendmail.preinst ./sendmail.prerm ./sendmail.suid ./cf/debian/autoconf.m4 ./cf/debian/sendmail.mc ./cf/debian/starttls.m4 ./cf/debian/submit.mc ./cf/domain/debian-msp.m4 ./cf/domain/debian-mta.m4 ./cf/hack/debian_auth.m4 ./cf/hack/virthost_by_ip.m4 ./cf/ostype/debian.m4 ./examples/Makefile ./local/Makefile ./local/Parse_mc.pm ./local/parse_mc ./local/sendmailconfig ./local/sendmail ./local/update_auth ./local/update_conf ./local/update_db ./local/update_ldap ./local/update_mc ./local/update_mk ./local/update_smrsh ./local/update_sys ./local/update_tls ./sensible_mda/Makefile ./sensible_mda/sensible-mda.c"
+ac_config_commands="$ac_config_commands default"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overriden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if cmp -s $cache_file confcache; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# NLS nuisances.
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
+ { $as_unset LANG || test "${LANG+set}" != set; } ||
+ { LANG=C; export LANG; }
+(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
+ { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
+ { LC_ALL=C; export LC_ALL; }
+(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
+ { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
+ { LC_TIME=C; export LC_TIME; }
+(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
+ { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
+ { LC_CTYPE=C; export LC_CTYPE; }
+(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
+ { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
+ { LANGUAGE=C; export LANGUAGE; }
+(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
+ { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
+ { LC_COLLATE=C; export LC_COLLATE; }
+(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
+ { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
+ { LC_NUMERIC=C; export LC_NUMERIC; }
+(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
+ { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
+ { LC_MESSAGES=C; export LC_MESSAGES; }
+
+
+# Name of the executable.
+as_me=`(basename "$0") 2>/dev/null ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conftest.sh
+ echo "exit 0" >>conftest.sh
+ chmod +x conftest.sh
+ if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conftest.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by Sendmail $as_me 8.12.7, which was
+generated by GNU Autoconf 2.53. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+Sendmail config.status 8.12.7
+configured by $0, generated by GNU Autoconf 2.53,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ shift
+ set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
+ shift
+ ;;
+ -*);;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_need_defaults=false;;
+ esac
+
+ case $1 in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
+ exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ shift
+ CONFIG_FILES="$CONFIG_FILES $1"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $1"
+ ac_need_defaults=false;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "./build/autoconf.mk" ) CONFIG_FILES="$CONFIG_FILES ./build/autoconf.mk" ;;
+ "./build/autoconf.pl" ) CONFIG_FILES="$CONFIG_FILES ./build/autoconf.pl" ;;
+ "./build/autoconf.sh" ) CONFIG_FILES="$CONFIG_FILES ./build/autoconf.sh" ;;
+ "./build/changelog.sh" ) CONFIG_FILES="$CONFIG_FILES ./build/changelog.sh" ;;
+ "./build/control.m4" ) CONFIG_FILES="$CONFIG_FILES ./build/control.m4" ;;
+ "./build/update_chaos" ) CONFIG_FILES="$CONFIG_FILES ./build/update_chaos" ;;
+ "./build/site.config.m4" ) CONFIG_FILES="$CONFIG_FILES ./build/site.config.m4" ;;
+ "./rules" ) CONFIG_FILES="$CONFIG_FILES ./rules:./build/rules.in" ;;
+ "./libmilter-dev.dirs" ) CONFIG_FILES="$CONFIG_FILES ./libmilter-dev.dirs" ;;
+ "./libmilter-dev.postrm" ) CONFIG_FILES="$CONFIG_FILES ./libmilter-dev.postrm" ;;
+ "./libmilter-dev.preinst" ) CONFIG_FILES="$CONFIG_FILES ./libmilter-dev.preinst" ;;
+ "./sendmail-doc.dirs" ) CONFIG_FILES="$CONFIG_FILES ./sendmail-doc.dirs" ;;
+ "./sendmail-doc.postrm" ) CONFIG_FILES="$CONFIG_FILES ./sendmail-doc.postrm" ;;
+ "./sendmail-doc.preinst" ) CONFIG_FILES="$CONFIG_FILES ./sendmail-doc.preinst" ;;
+ "./sendmail.conffiles" ) CONFIG_FILES="$CONFIG_FILES ./sendmail.conffiles" ;;
+ "./sendmail.cron.daily" ) CONFIG_FILES="$CONFIG_FILES ./sendmail.cron.daily" ;;
+ "./sendmail.dirs" ) CONFIG_FILES="$CONFIG_FILES ./sendmail.dirs" ;;
+ "./sendmail.init.d" ) CONFIG_FILES="$CONFIG_FILES ./sendmail.init.d" ;;
+ "./sendmail.links" ) CONFIG_FILES="$CONFIG_FILES ./sendmail.links" ;;
+ "./sendmail.postinst" ) CONFIG_FILES="$CONFIG_FILES ./sendmail.postinst" ;;
+ "./sendmail.postrm" ) CONFIG_FILES="$CONFIG_FILES ./sendmail.postrm" ;;
+ "./sendmail.preinst" ) CONFIG_FILES="$CONFIG_FILES ./sendmail.preinst" ;;
+ "./sendmail.prerm" ) CONFIG_FILES="$CONFIG_FILES ./sendmail.prerm" ;;
+ "./sendmail.suid" ) CONFIG_FILES="$CONFIG_FILES ./sendmail.suid" ;;
+ "./cf/debian/autoconf.m4" ) CONFIG_FILES="$CONFIG_FILES ./cf/debian/autoconf.m4" ;;
+ "./cf/debian/sendmail.mc" ) CONFIG_FILES="$CONFIG_FILES ./cf/debian/sendmail.mc" ;;
+ "./cf/debian/starttls.m4" ) CONFIG_FILES="$CONFIG_FILES ./cf/debian/starttls.m4" ;;
+ "./cf/debian/submit.mc" ) CONFIG_FILES="$CONFIG_FILES ./cf/debian/submit.mc" ;;
+ "./cf/domain/debian-msp.m4" ) CONFIG_FILES="$CONFIG_FILES ./cf/domain/debian-msp.m4" ;;
+ "./cf/domain/debian-mta.m4" ) CONFIG_FILES="$CONFIG_FILES ./cf/domain/debian-mta.m4" ;;
+ "./cf/hack/debian_auth.m4" ) CONFIG_FILES="$CONFIG_FILES ./cf/hack/debian_auth.m4" ;;
+ "./cf/hack/virthost_by_ip.m4" ) CONFIG_FILES="$CONFIG_FILES ./cf/hack/virthost_by_ip.m4" ;;
+ "./cf/ostype/debian.m4" ) CONFIG_FILES="$CONFIG_FILES ./cf/ostype/debian.m4" ;;
+ "./examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES ./examples/Makefile" ;;
+ "./local/Makefile" ) CONFIG_FILES="$CONFIG_FILES ./local/Makefile" ;;
+ "./local/Parse_mc.pm" ) CONFIG_FILES="$CONFIG_FILES ./local/Parse_mc.pm" ;;
+ "./local/parse_mc" ) CONFIG_FILES="$CONFIG_FILES ./local/parse_mc" ;;
+ "./local/sendmailconfig" ) CONFIG_FILES="$CONFIG_FILES ./local/sendmailconfig" ;;
+ "./local/sendmail" ) CONFIG_FILES="$CONFIG_FILES ./local/sendmail" ;;
+ "./local/update_auth" ) CONFIG_FILES="$CONFIG_FILES ./local/update_auth" ;;
+ "./local/update_conf" ) CONFIG_FILES="$CONFIG_FILES ./local/update_conf" ;;
+ "./local/update_db" ) CONFIG_FILES="$CONFIG_FILES ./local/update_db" ;;
+ "./local/update_ldap" ) CONFIG_FILES="$CONFIG_FILES ./local/update_ldap" ;;
+ "./local/update_mc" ) CONFIG_FILES="$CONFIG_FILES ./local/update_mc" ;;
+ "./local/update_mk" ) CONFIG_FILES="$CONFIG_FILES ./local/update_mk" ;;
+ "./local/update_smrsh" ) CONFIG_FILES="$CONFIG_FILES ./local/update_smrsh" ;;
+ "./local/update_sys" ) CONFIG_FILES="$CONFIG_FILES ./local/update_sys" ;;
+ "./local/update_tls" ) CONFIG_FILES="$CONFIG_FILES ./local/update_tls" ;;
+ "./sensible_mda/Makefile" ) CONFIG_FILES="$CONFIG_FILES ./sensible_mda/Makefile" ;;
+ "./sensible_mda/sensible-mda.c" ) CONFIG_FILES="$CONFIG_FILES ./sensible_mda/sensible-mda.c" ;;
+ "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=$TMPDIR/cs$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@SM_VERS@,$SM_VERS,;t t
+s,@SM_DATE@,$SM_DATE,;t t
+s,@SM_MINVERS@,$SM_MINVERS,;t t
+s,@SM_MAXVERS@,$SM_MAXVERS,;t t
+s,@SM_CPYRT@,$SM_CPYRT,;t t
+s,@sm_date@,$sm_date,;t t
+s,@sm_time@,$sm_time,;t t
+s,@sm_utc@,$sm_utc,;t t
+s,@sm_version@,$sm_version,;t t
+s,@sm_version_v@,$sm_version_v,;t t
+s,@sm_version_r@,$sm_version_r,;t t
+s,@sm_version_major@,$sm_version_major,;t t
+s,@sm_version_minor@,$sm_version_minor,;t t
+s,@sm_version_beta@,$sm_version_beta,;t t
+s,@sm_version_math@,$sm_version_math,;t t
+s,@sm_revision@,$sm_revision,;t t
+s,@buildtree@,$buildtree,;t t
+s,@docdir@,$docdir,;t t
+s,@sm_dist_name@,$sm_dist_name,;t t
+s,@sm_dist_vers@,$sm_dist_vers,;t t
+s,@DEBIAN@,$DEBIAN,;t t
+s,@DEBIAN_DH@,$DEBIAN_DH,;t t
+s,@DEB_BUILD_ARCH@,$DEB_BUILD_ARCH,;t t
+s,@DEB_BUILD_GNU_CPU@,$DEB_BUILD_GNU_CPU,;t t
+s,@DEB_BUILD_GNU_SYSTEM@,$DEB_BUILD_GNU_SYSTEM,;t t
+s,@DEB_BUILD_GNU_TYPE@,$DEB_BUILD_GNU_TYPE,;t t
+s,@DEB_HOST_ARCH@,$DEB_HOST_ARCH,;t t
+s,@DEB_HOST_GNU_CPU@,$DEB_HOST_GNU_CPU,;t t
+s,@DEB_HOST_GNU_SYSTEM@,$DEB_HOST_GNU_SYSTEM,;t t
+s,@DEB_HOST_GNU_TYPE@,$DEB_HOST_GNU_TYPE,;t t
+s,@sm_build_arch@,$sm_build_arch,;t t
+s,@sm_host_arch@,$sm_host_arch,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@CPP@,$CPP,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@sm_incdirs@,$sm_incdirs,;t t
+s,@sm_mapdef@,$sm_mapdef,;t t
+s,@sm_envdef@,$sm_envdef,;t t
+s,@sm_libs@,$sm_libs,;t t
+s,@sm_editmap_envdef@,$sm_editmap_envdef,;t t
+s,@sm_editmap_libs@,$sm_editmap_libs,;t t
+s,@sm_libmilter_envdef@,$sm_libmilter_envdef,;t t
+s,@sm_libmilter_libs@,$sm_libmilter_libs,;t t
+s,@sm_libsm_envdef@,$sm_libsm_envdef,;t t
+s,@sm_libsm_libs@,$sm_libsm_libs,;t t
+s,@sm_libsmdb_envdef@,$sm_libsmdb_envdef,;t t
+s,@sm_libsmdb_libs@,$sm_libsmdb_libs,;t t
+s,@sm_libsmutil_envdef@,$sm_libsmutil_envdef,;t t
+s,@sm_libsmutil_libs@,$sm_libsmutil_libs,;t t
+s,@sm_mail_local_envdef@,$sm_mail_local_envdef,;t t
+s,@sm_mail_local_libs@,$sm_mail_local_libs,;t t
+s,@sm_mailstats_envdef@,$sm_mailstats_envdef,;t t
+s,@sm_mailstats_libs@,$sm_mailstats_libs,;t t
+s,@sm_makemap_envdef@,$sm_makemap_envdef,;t t
+s,@sm_makemap_libs@,$sm_makemap_libs,;t t
+s,@sm_praliases_envdef@,$sm_praliases_envdef,;t t
+s,@sm_praliases_libs@,$sm_praliases_libs,;t t
+s,@sm_rmail_envdef@,$sm_rmail_envdef,;t t
+s,@sm_rmail_libs@,$sm_rmail_libs,;t t
+s,@sm_sendmail_envdef@,$sm_sendmail_envdef,;t t
+s,@sm_sendmail_libs@,$sm_sendmail_libs,;t t
+s,@sm_smrsh_envdef@,$sm_smrsh_envdef,;t t
+s,@sm_smrsh_libs@,$sm_smrsh_libs,;t t
+s,@sm_vacation_envdef@,$sm_vacation_envdef,;t t
+s,@sm_vacation_libs@,$sm_vacation_libs,;t t
+s,@sm_databases@,$sm_databases,;t t
+s,@sm_features@,$sm_features,;t t
+s,@sm_badepends@,$sm_badepends,;t t
+s,@sm_depends@,$sm_depends,;t t
+s,@sm_recommends@,$sm_recommends,;t t
+s,@sm_suggests@,$sm_suggests,;t t
+s,@sm_newdb_lib@,$sm_newdb_lib,;t t
+s,@sm_ldap_lib@,$sm_ldap_lib,;t t
+s,@sm_hesiod_parms@,$sm_hesiod_parms,;t t
+s,@sm_ffr@,$sm_ffr,;t t
+s,@sm_m4_ffr@,$sm_m4_ffr,;t t
+s,@sm_enable_doc@,$sm_enable_doc,;t t
+s,@sm_enable_dev@,$sm_enable_dev,;t t
+s,@sm_enable_shm@,$sm_enable_shm,;t t
+s,@sm_enable_milter@,$sm_enable_milter,;t t
+s,@sm_enable_regex@,$sm_enable_regex,;t t
+s,@sm_enable_ndbm@,$sm_enable_ndbm,;t t
+s,@sm_enable_newdb@,$sm_enable_newdb,;t t
+s,@sm_enable_nis@,$sm_enable_nis,;t t
+s,@sm_enable_nisplus@,$sm_enable_nisplus,;t t
+s,@sm_enable_ldap@,$sm_enable_ldap,;t t
+s,@sm_enable_bind@,$sm_enable_bind,;t t
+s,@sm_enable_hesiod@,$sm_enable_hesiod,;t t
+s,@sm_enable_tcpd@,$sm_enable_tcpd,;t t
+s,@sm_enable_ipv6@,$sm_enable_ipv6,;t t
+s,@sm_enable_maillock@,$sm_enable_maillock,;t t
+s,@sm_enable_sfio@,$sm_enable_sfio,;t t
+s,@sm_enable_auth@,$sm_enable_auth,;t t
+s,@sm_auth_lib@,$sm_auth_lib,;t t
+s,@sm_enable_tls@,$sm_enable_tls,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { case "$ac_dir" in
+ [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+ *) as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+ case $as_mkdir_dir in
+ # Skip DOS drivespec
+ ?:) as_incr_dir=$as_mkdir_dir ;;
+ *)
+ as_incr_dir=$as_incr_dir/$as_mkdir_dir
+ test -d "$as_incr_dir" ||
+ mkdir "$as_incr_dir" ||
+ { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+done; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ default )
+#
+# Update the files just created
+echo 'creating ./changelog';
+chmod ug+x ./build/changelog.sh;
+./build/changelog.sh;
+echo 'creating ./control';
+m4 ./build/control.m4 > ./control;
+echo 'Updating Build setup';
+chmod ug+x ./build/update_chaos;
+(cd ../ && ./debian/build/update_chaos);
+#
+# Make *.{pre,post}{rm,inst} executable
+chmod ug+x ./libmilter-dev.postrm;
+chmod ug+x ./libmilter-dev.preinst;
+chmod ug+x ./sendmail-doc.postrm;
+chmod ug+x ./sendmail-doc.preinst;
+chmod ug+x ./sendmail.cron.daily;
+chmod ug+x ./sendmail.init.d;
+chmod ug+x ./sendmail.postinst;
+chmod ug+x ./sendmail.postrm;
+chmod ug+x ./sendmail.preinst;
+chmod ug+x ./sendmail.prerm;
+#
+# Make rules, */Makefile executable
+chmod ug+x ./rules;
+chmod ug+x ./local/Makefile;
+chmod ug+x ./sensible_mda/Makefile;
+#
+# Make other, misc files executable
+chmod ug+x ./local/Parse_mc.pm;
+chmod ug+x ./local/parse_mc;
+chmod ug+x ./local/sendmailconfig;
+chmod ug+x ./local/sendmail;
+chmod ug+x ./local/update_auth;
+chmod ug+x ./local/update_conf;
+chmod ug+x ./local/update_db;
+chmod ug+x ./local/update_ldap;
+chmod ug+x ./local/update_mc;
+chmod ug+x ./local/update_mk;
+chmod ug+x ./local/update_smrsh;
+chmod ug+x ./local/update_sys;
+chmod ug+x ./local/update_tls;
+ ;;
+ esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff --git a/debian/configure.ac b/debian/configure.ac
new file mode 100644
index 0000000..4bd0a41
--- /dev/null
+++ b/debian/configure.ac
@@ -0,0 +1 @@
+Mon Mar 3 22:36:13 UTC 2003
diff --git a/debian/control b/debian/control
index 61fc5c5..98b25d5 100644
--- a/debian/control
+++ b/debian/control
@@ -1,20 +1,99 @@
Source: sendmail
-Section: mail
Priority: extra
+Section: mail
Maintainer: Richard A Nelson (Rick) <cowboy@debian.org>
-Standards-Version: 3.1.1
+Standards-Version: 3.5.7.0
+Build-Depends-Indep: groff, bsdmainutils
+Build-Depends: m4, patch, debhelper (>= 1.1.17), libdb3-dev, libldap2-dev, libwrap0-dev, liblockfile-dev, libsasl-dev, libssl-dev
Package: sendmail
Architecture: any
-Depends: ${shlibs:Depends}, dpkg (>= 1.4.1.17), m4, awk, procmail | deliver
-Recommends: mail-reader, ${perl:Depends} | perl
-Conflicts: mail-transport-agent, smail, postfix
+Section: mail
+Replaces: mail-transport-agent, sendmail-tls
Provides: mail-transport-agent
-Description: A powerful mail transport agent.
- Sendmail is an alternative mail transport agent (MTA) for
+Conflicts: mail-transport-agent
+Depends: adduser, m4, ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends},
+Recommends:
+Suggests: sendmail-doc (>= ${Source-Version}), mail-reader, procmail | mailagent | maildrop | deliver, make, logcheck, logrotate, sasl-bin, libsasl-modules-plain, libsasl-digestmd5-plain | libsasl-digestmd5-des, openssl
+Description: A powerful, efficient, and scalable Mail Transport Agent
+ Sendmail is an alternative Mail Transport Agent (MTA) for Debian.
+ It is suitable for handling sophisticated mail configurations,
+ although this means that its configuration can also be complex.
+ Fortunately, easy thing can be done easily, and complex things
+ are possible, even if not easily understood ;) Sendmail is the *ONLY*
+ MTA with a Turing complete language to control *ALL* aspects of delivery!
+ .
+ Sendmail provides Security and SPAM/UCE/UBE protection via several means:
+ - STARTTLS(SSL) RFC2487 encryption for mail reception/delivery.
+ - STARTTLS(SSL) authentication (certificate based) for access/relay control.
+ - SMTP AUTH (SASL/PAM) authentication for access/relay control.
+ - ACCESS database (by IP/host) for access/relay control.
+ - Use of varied Realtime Blackhole Lists (RBL) to prevent access.
+ - Integration of LOGCHECK rules to fine-tune logging.
+ - Inboard POSIX Regular Expression processing of *all* headers.
+ - Ability (via MILTER) to scan/change headers *and* body of *ALL* mail
+ A site may utilize zero, one, or more MILTERs.
+ - Reduced SUID exposures by running SGID smmsp/mail where possible.
+ .
+ Sendmail provides Performance and Scalability by:
+ - Allowing multiple queues, with the ability to tune both interval and
+ queue runners on a queue by queue basis.
+ - Providing (a Debian exclusive) an easy to configure means of queue-aging
+ to improve throughput by not continually retrying failed deliveries.
+ - Allowing most all maps/databases to be obtained via LDAP; reducing the
+ number of used databases and simplifying the maintenance of Sendmail.
+ - Reducing the file I/O where possible by buffering files in memory.
+ .
+ Sendmail provides site enhanced site configuration/customization by:
+ - Allowing the listener (usually port 25) to run as a daemon or via INETD.
+ - Allowing the queue runner (mail delivery) to run as a daemon or via CRON.
+ - Automagically updating configuration and databases on upgrades.
+ - Providing a Turing complete language for site customization of mail
+ handling.
+ - Providing a means (MILTER) for a site to scan/change all email - both
+ incoming and outgoing. A site can write their own MILTER, or may use
+ any of those found on internet. To write your own MILTER, you'll need
+ to install the optional milter-dev package.
+ - Providing extensive documentation via the sendmail-doc (optional) package.
+ - Providing an inboard Mail Delivery Agent (MDA) (mail.local), but supporting
+ procmail, mailagent, maildrop, or deliver automatically if installed.
+ Sendmail will also deliver to anythings else (cyrus, etc) if asked to.
+ .
+ Sendmail includes *no* Mail User Agents (MUA), you'll have to
+ pick from the plethora of available MUAs (pine, mutt, vm, etc.)
+ .
+ This package supports REGEX, DB, NIS, NIS+, LDAP, DNS maps,
+ and has enabled TCPWrappers, IPv6, LockFile, SMTP AUTH(SASL), STARTTLS(SSL).
+
+Package: libmilter-dev
+Architecture: any
+Section: devel
+Suggests: sendmail-doc (>= ${Source-Version})
+Description: Sendmail Mail Filter API (Milter)
+ The Sendmail Mail Filter API (Milter) is designed to allow third-party
+ programs access to mail messages as they are being processed in order
+ to filter meta-information(headers) and content.
+ .
+ The Debian Sendmail package is built to support libmilter.
+ .
+ This is the libmilter static library and include files for development.
+ .
+ The documentation on building a Milter is in the sendmail-doc package.
+
+Package: sendmail-doc
+Architecture: all
+Section: doc
+Description: A powerful, efficient, and scalable Mail Transport Agent
+ Sendmail is an alternative Mail Transport Agent (MTA) for
Debian. It is suitable for handling sophisticated mail
configurations, although this means that its configuration
can also be complex.
.
- To deliver mail to local users, sendmail requires either the
- `procmail' or `deliver' package to be installed.
+ Because of the complexity, you may find yourself wanting to peruse
+ the documentation files included herein. The main files are:
+ 1) cf.README.gz -- A reference for all things in sendmail.{mc,cf}
+ 2) op.{ps,txt}.gz -- The care and feeding of Sendmail.
+ 3) faq.txt.gz -- Sendmail FAQ, current as of the package date.
+ .
+ Other files include the references for smrsh and libmilter.
+
diff --git a/debian/sendmail.copyright b/debian/copyright
index b68a73b..d561c8b 100644
--- a/debian/sendmail.copyright
+++ b/debian/copyright
@@ -13,8 +13,8 @@ were obtained from:
SENDMAIL LICENSE
The following license terms and conditions apply, unless a different
-license is obtained from Sendmail, Inc., 1401 Park Avenue, Emeryville, CA
-94608, or by electronic mail at license@sendmail.com.
+license is obtained from Sendmail, Inc., 6425 Christie Ave, Fourth Floor,
+Emeryville, CA 94608, or by electronic mail at license@sendmail.com.
License Terms:
@@ -33,13 +33,8 @@ each of the following conditions is met:
years at the cost of materials and delivery. Such redistributions
must allow further use, modification, and redistribution of the Source
Code under substantially the same terms as this license. For the
- purposes of redistribution "Source Code" means the complete source
- code of sendmail including all modifications.
-
- Other forms of redistribution are allowed only under a separate royalty-
- free agreement permitting such redistribution subject to standard
- commercial terms and conditions. A copy of such agreement may be
- obtained from Sendmail, Inc. at the above address.
+ purposes of redistribution "Source Code" means the complete compilable
+ and linkable source code of sendmail including all modifications.
2. Redistributions of source code must retain the copyright notices as they
appear in each source code file, these license terms, and the
@@ -50,7 +45,7 @@ each of the following conditions is met:
forth as paragraph 6 below, in the documentation and/or other materials
provided with the distribution. For the purposes of binary distribution
the "Copyright Notice" refers to the following language:
- "Copyright (c) 1998 Sendmail, Inc. All rights reserved."
+ "Copyright (c) 1998-2001 Sendmail, Inc. All rights reserved."
4. Neither the name of Sendmail, Inc. nor the University of California nor
the names of their contributors may be used to endorse or promote
@@ -76,12 +71,7 @@ each of the following conditions is met:
disclaimer in the documentation and/or other materials provided
with the distribution.
- (iii) 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."
-
- (iv) Neither the name of the University nor the names of its
+ (iii) 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.
@@ -98,4 +88,4 @@ each of the following conditions is met:
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-(Version 8.6, last updated 6/24/1998)
+$Revision: 8.10 $, Last updated $Date: 2001/02/14 04:39:34 $
diff --git a/debian/examples/Makefile.in b/debian/examples/Makefile.in
new file mode 100644
index 0000000..aef3815
--- /dev/null
+++ b/debian/examples/Makefile.in
@@ -0,0 +1,124 @@
+#!/usr/bin/make -f
+#------------------------------------------------------------------------------
+# vim: syntax=make
+#
+# $Sendmail: Makefile,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# Rules file for Sendmail @sm_version@@sm_revision@(@sm_version_math@)
+# on @sm_dist_name@ @sm_dist_vers@
+# via Debhelper V@DEBIAN_DH@
+#
+# Note: the .in file supports Sendmail @SM_MINVERS@ - @SM_MAXVERS@
+# on Debian slink, potato, woody, testing, sid, ...
+# but the generated file is customized to the version noted above.
+#
+# Richard Nelson <cowboy@debian.org> @sm_date@ @sm_time@ (@sm_utc@)
+#------------------------------------------------------------------------------
+#SHELL=/bin/sh -x
+
+# Include Debian Autoconf settings
+-include ../build/autoconf.mk
+
+ALL_SUBDIRS = . amavis db dialup ldap logcheck milter pam sasl tls
+DATA_SUBDIRS = amavis db ldap pam sasl tls
+SCRIPT_SUBDIRS = dialup
+
+all:
+
+clean:
+ for subdir in ${ALL_SUBDIRS}; do \
+ rm -rf $${subdir}/core $${subdir}/*~; \
+ done;
+
+setup:
+
+build-indep:
+build-arch:
+ #
+ # Debian Local additions / changes
+ #
+ # examples/ldap/sendmail.schema.v2 - conditional
+ #
+ if (grep -qEe "^#LDAP:[[:space:]]*yes" ../build/site.config.m4); then \
+ if [ -e ../../${buildtree}/cf/sendmail.schema ]; then \
+ $(INSTALL_DATA) ../../${buildtree}/cf/sendmail.schema \
+ ldap/sendmail.schema.v2; \
+ fi; \
+ fi;
+
+install-indep: build-indep
+install-arch: build-arch
+ #
+ # Debian Local additions / changes
+ #
+ # ${sysconfdir}/ppp/ip-{up,down}.d - unconditional
+ #
+ $(INSTALL) -d ${sysconfdir}/ppp/ip-up.d;
+ $(INSTALL_SCRIPT) dialup/ip-up.d \
+ ${sysconfdir}/ppp/ip-up.d/sendmail;
+ $(INSTALL) -d ${sysconfdir}/ppp/ip-down.d;
+ $(INSTALL_SCRIPT) dialup/ip-down.d \
+ ${sysconfdir}/ppp/ip-down.d/sendmail;
+ #
+ # ${sysconfdir}/pam.d - unconditional
+ #
+ $(INSTALL) -d ${sysconfdir}/pam.d;
+ $(INSTALL_DATA) pam/* \
+ ${sysconfdir}/pam.d;
+ #
+ # ${sysconfdir}/logcheck - unconditional
+ #
+ (cd logcheck && \
+ for file in $$(find . -type d); do \
+ $(INSTALL) -d ../${sysconfdir}/logcheck/$$file; \
+ done;);
+ for file in $$(find logcheck -type f -name '*sendmail'); do \
+ $(INSTALL_DATA) $$file \
+ ${sysconfdir}/logcheck/$$(echo "$$file" \
+ | sed -e 's?^.*logcheck/??'); \
+ done;
+ #
+ # ${datadir}/sendmail/examples - unconditional
+ #
+ for subdir in ${DATA_SUBDIRS}; do \
+ $(INSTALL) -d ${datadir}/sendmail/examples/$$subdir; \
+ find $$subdir -type f ! -name '*.in' | xargs -ri \
+ $(INSTALL_DATA) '{}' ${datadir}/sendmail/examples/$$subdir; \
+ done;
+ for subdir in ${SCRIPT_SUBDIRS}; do \
+ $(INSTALL) -d ${datadir}/sendmail/examples/$$subdir; \
+ find $$subdir -type f ! -name '*.in' | xargs -ri \
+ $(INSTALL_SCRIPT) '{}' ${datadir}/sendmail/examples/$$subdir; \
+ done;
+ # Can't simply $(INSTALL) logcheck, has subdirs...
+ $(INSTALL) -d ${datadir}/sendmail/examples/logcheck;
+ cp -a logcheck/* \
+ ${datadir}/sendmail/examples/logcheck;
+ #
+ # ${datadir}/sendmail/examples - conditional
+ #
+ if (grep -qEe "^#MILTER:[[:space:]]*yes" ../build/site.config.m4); then \
+ $(INSTALL) -d ${datadir}/sendmail/examples/milter; \
+ $(INSTALL_DATA) milter/* \
+ ${datadir}/sendmail/examples/milter; \
+ chmod a+x \
+ ${datadir}/sendmail/examples/milter/Makefile; \
+ fi;
+
+#-------------
+# Below here is fairly generic really
+
+source diff:
+ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+build: build-indep build-arch
+install: install-indep install-arch
+.PHONY: all
+.PHONY: setup
+.PHONY: clean build build-indep build-arch
+.PHONY: install install-indep install-arch
+.PHONY: source diff
diff --git a/debian/examples/amavis-doc/README b/debian/examples/amavis-doc/README
new file mode 100644
index 0000000..c2e3d86
--- /dev/null
+++ b/debian/examples/amavis-doc/README
@@ -0,0 +1,8 @@
+The files herein are from Jean-Paul Stewart <jps@maxlingua.com>
+
+To add to the sendmail/examples directory:
+ 1) place new amavis-doc.tar.gz in this directory
+ 2) tar -xzf amavis-doc.tar.gz
+ 3) mv amavis-doc/amavis-doc.lyx ./
+ 4) rm ../amavis/*
+ 5) mv amavis-doc/* ../amavis/
diff --git a/debian/examples/amavis-doc/amavis-doc.lyx b/debian/examples/amavis-doc/amavis-doc.lyx
new file mode 100644
index 0000000..180015b
--- /dev/null
+++ b/debian/examples/amavis-doc/amavis-doc.lyx
@@ -0,0 +1,904 @@
+#LyX 1.1 created this file. For more info see http://www.lyx.org/
+\lyxformat 218
+\textclass linuxdoc
+\language english
+\inputencoding default
+\fontscheme default
+\graphics default
+\paperfontsize 10
+\spacing single
+\papersize Default
+\paperpackage a4
+\use_geometry 0
+\use_amsmath 0
+\paperorientation portrait
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\quotes_times 2
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+
+\layout Title
+\added_space_top vfill \added_space_bottom vfill
+How to Install Amavis-milter for Debian Sendmail
+\layout Author
+
+Jean-Paul Stewart <jps@maxlingua.com>
+\layout Date
+
+23.10.2001
+\layout Abstract
+
+This document provides a step-by-step guide to the installation and configuratio
+n of the Amavis antivirus software available from
+\begin_inset LatexCommand \url{http://www.amavis.org/}
+
+\end_inset
+
+ on the Debian GNU/Linux operating system.
+ It has been adapted from the documentation available there.
+ Amavis supports many different methods of implementation.
+ I have chosen to implement Amavis-libmilter as the interface between Amavis
+ and Sendmail.
+ Another option with Amavis + Sendmail, which I am not describing here,
+ involves employing Amavis as a sort of intermediate local delivery agent.
+ Please be advised that this software requires an existing CLI antivirus
+ scanning engine and database.
+ The selection and procurement of such software is not discussed in this
+ document.
+ There is ample information available at the amavis.org site.
+ These installation examples make extensive use of the outstanding Sendmail
+ and libmilter-dev Debian packages maintained by Richard
+\begin_inset Quotes eld
+\end_inset
+
+cowboy
+\begin_inset Quotes erd
+\end_inset
+
+ Nelson.
+ Thanks Cowboy! Thank you Amavis developers!
+\layout Standard
+
+
+\begin_inset LatexCommand \tableofcontents{}
+
+\end_inset
+
+
+\layout Section
+
+Software Dependencies
+\layout Enumerate
+
+At a minimum you need to be running the Debian 3.0 (Woody) distribution from
+
+\begin_inset LatexCommand \url{http://www.debian.org/}
+
+\end_inset
+
+.
+ Older versions of Debian do not provide an adequate sendmail package (they
+ lack the libmilter API).
+\layout Enumerate
+
+Obviously, sendmail needs to be installed on your system.
+\layout Enumerate
+
+As mentioned in the abstract, you will have to obtain your own antiviral
+ engine from an independent vendor.
+\layout Enumerate
+
+The
+\begin_inset Quotes eld
+\end_inset
+
+file
+\begin_inset Quotes erd
+\end_inset
+
+ package.
+\layout Enumerate
+
+The
+\begin_inset Quotes eld
+\end_inset
+
+arc
+\begin_inset Quotes erd
+\end_inset
+
+ utility.
+ It is not available as a Debian package.
+ You can obtain the source code for this program at
+\begin_inset LatexCommand \url{ftp://metalab.unc.edu/pub/Linux/utils/compress/arc521.tar.Z}
+
+\end_inset
+
+.
+
+\layout Enumerate
+
+The
+\begin_inset Quotes eld
+\end_inset
+
+bzip2
+\begin_inset Quotes erd
+\end_inset
+
+ package.
+\layout Enumerate
+
+The
+\begin_inset Quotes eld
+\end_inset
+
+lha
+\begin_inset Quotes erd
+\end_inset
+
+ package.
+\layout Enumerate
+
+The
+\begin_inset Quotes eld
+\end_inset
+
+unarj
+\begin_inset Quotes erd
+\end_inset
+
+ package.
+\layout Enumerate
+
+The
+\begin_inset Quotes eld
+\end_inset
+
+unrar
+\begin_inset Quotes erd
+\end_inset
+
+ package.
+\layout Enumerate
+
+The
+\begin_inset Quotes eld
+\end_inset
+
+zoo
+\begin_inset Quotes erd
+\end_inset
+
+ package.
+\layout Enumerate
+
+You may need to install a few perl modules.
+ The required modules are
+\layout Itemize
+
+IO-stringy
+\layout Itemize
+
+Syslog
+\layout Itemize
+
+MailTools
+\layout Itemize
+
+MIME-Base64
+\layout Itemize
+
+MIME-tools
+\layout Itemize
+
+Convert-UUlib
+\layout Itemize
+
+Convert-TNEF
+\layout Itemize
+
+Compress-Zlib
+\layout Itemize
+
+Archive-Tar
+\layout Itemize
+
+Archive-Zip
+\layout Itemize
+
+libnet
+\layout Section
+
+Installing the Software Dependencies
+\layout Standard
+
+Update your distribution files with the usual:
+\layout Verbatim
+
+apt-get update
+\layout Standard
+
+and install file, bzip2, lha, unarj, unrar, and zoo in one shot with:
+\layout Verbatim
+
+apt-get install file bzip2 lha unarj unrar zoo
+\layout Standard
+
+Install all the perl modules in one shot with:
+\layout Verbatim
+
+apt-get install libio-stringy-perl libunix-syslog-perl libmailtools-perl
+ libmime-base64-perl libmime-perl libconvert-uulib-perl libconvert-tnef-perl
+ libcompress-zlib-perl libarchive-tar-perl libarchive-zip-perl libnet-perl
+\layout Standard
+
+Installing the
+\begin_inset Quotes eld
+\end_inset
+
+arc
+\begin_inset Quotes erd
+\end_inset
+
+ utility is much more of a hassle.
+ Furthermore, it is an unmaintained old MS-DOS port with a non-free license.
+ I will describe what I did to compile it on a Intel platform (suggestions
+ on better ways to do this are appreciated).
+ The next few steps assume that you have the GNU
+\begin_inset Quotes eld
+\end_inset
+
+make
+\begin_inset Quotes erd
+\end_inset
+
+ and
+\begin_inset Quotes eld
+\end_inset
+
+gcc
+\begin_inset Quotes erd
+\end_inset
+
+ packges installed on your system.
+ If this is not the case then try:
+\layout Verbatim
+
+apt-get install make gcc
+\layout Standard
+
+Let's create a temporary directory somewhere so that we can make a mess
+ in it.
+ Since my login is
+\begin_inset Quotes eld
+\end_inset
+
+jps
+\begin_inset Quotes erd
+\end_inset
+
+, I made a directory named
+\begin_inset Quotes eld
+\end_inset
+
+/home/jps/tmp/
+\begin_inset Quotes erd
+\end_inset
+
+.
+ Copy the arc521.tar.Z file into your new temporary diretory and type:
+\layout Verbatim
+
+uncompress arc521.tar.Z; tar xf arc521.tar
+\layout Standard
+
+or something equivalent to uncompress and untar the archive.
+ This will create a bunch of files.
+ We need to delete some lines from the file named
+\begin_inset Quotes eld
+\end_inset
+
+arcdos.c
+\begin_inset Quotes erd
+\end_inset
+
+.
+ It is probably set to be read-only, so type:
+\layout Verbatim
+
+chmod u+w arcdos.c
+\layout Standard
+
+Open arcdos.c for editing and delete (or comment out) lines 35-38 inclusive.
+ (It is the definition of a structure that begins with
+\begin_inset Quotes eld
+\end_inset
+
+struct timeval
+\begin_inset Quotes erd
+\end_inset
+
+ on line 35 and ends with
+\begin_inset Quotes eld
+\end_inset
+
+};
+\begin_inset Quotes erd
+\end_inset
+
+ on line 38).
+ We are done with that, so close the file.
+ Now type:
+\layout Verbatim
+
+make
+\layout Standard
+
+This command WILL FAIL with a bunch of warnings and an error message complaining
+ about
+\begin_inset Quotes eld
+\end_inset
+
+tmclock.o
+\begin_inset Quotes erd
+\end_inset
+
+, but it accomplished some necessary things anyway.
+ Now open the file named
+\begin_inset Quotes eld
+\end_inset
+
+Makefile
+\begin_inset Quotes erd
+\end_inset
+
+ for editing.
+ Go to the line that says
+\begin_inset Quotes eld
+\end_inset
+
+System = -DBSD=1
+\begin_inset Quotes erd
+\end_inset
+
+.
+ It should be on line 31.
+ Change the line so that it says:
+\layout Verbatim
+
+System = -DSYSV=1
+\layout Standard
+
+Close the Makefile and run make again by typing:
+\layout Verbatim
+
+make
+\layout Standard
+
+That should compile the
+\begin_inset Quotes eld
+\end_inset
+
+arc
+\begin_inset Quotes erd
+\end_inset
+
+ utility successfully.
+ You can ignore the warnings about
+\begin_inset Quotes eld
+\end_inset
+
+mktemp
+\begin_inset Quotes erd
+\end_inset
+
+ and
+\begin_inset Quotes eld
+\end_inset
+
+mkstemp
+\begin_inset Quotes erd
+\end_inset
+
+.
+ There should now be an executable program with the name of
+\begin_inset Quotes eld
+\end_inset
+
+arc
+\begin_inset Quotes erd
+\end_inset
+
+ in your temporary directory.
+ As root, copy this file to
+\begin_inset Quotes eld
+\end_inset
+
+/usr/local/bin
+\begin_inset Quotes erd
+\end_inset
+
+ or the usual place where you keep home-cooked binaries.
+ Just make sure that it is in your path.
+ Test this by typing
+\begin_inset Quotes eld
+\end_inset
+
+arc
+\begin_inset Quotes erd
+\end_inset
+
+ and see if the arc usage guide scrolls up your terminal.
+ You can delete all the files in your temporary directory now, but leave
+ the directory itself because we will be using it later.
+ Aren't .deb packages so much easier?
+\layout Section
+
+Example Installation of an Antivirus Scanner
+\layout Standard
+
+I am using a Linux commandline scanner from NAI Associates, Inc.
+ You will have to avail yourself of the documentation at
+\begin_inset LatexCommand \url{http://www.amavis.org/}
+
+\end_inset
+
+ if you don't know where to obtain a scanner.
+ For example, you could place your scanner binary along with its' data files
+ in a directory named
+\begin_inset Quotes eld
+\end_inset
+
+/usr/local/share/av
+\begin_inset Quotes erd
+\end_inset
+
+.
+ Then create a symlink to the binary in the
+\begin_inset Quotes eld
+\end_inset
+
+/usr/local/bin
+\begin_inset Quotes erd
+\end_inset
+
+ directory.
+ This way, the command to execute the scanner is in your path, and the Amavis
+ configure script will find it.
+ For a more advanced configuration (once you have the easy stuff out of
+ the way), take a look at the example start-stop script at the end of this
+ document.
+\layout Section
+
+Obtaining the Libmilter Sourcecode and Libraries
+\layout Standard
+
+In order to be able to build Amavis with the libmilter interface, you need
+ to have the Sendmail's libmilter sourcecode and libraries available.
+ Don't worry, this is very easy with Debian.
+ The following command will dowload everything required to your system:
+\layout Verbatim
+
+apt-get install libmilter-dev
+\layout Section
+
+Obtaining the Amavis Sourcecode
+\layout Subsection
+
+Checking the latest copy out of CVS
+\layout Standard
+
+\begin_float footnote
+\layout Standard
+
+As of October 23, 2001; the CVS copy might not compile.
+ Skip to the next section if you don't want to fool around.
+\end_float
+Now that we have extracted the libmilter files, the next step is to obtain
+ the latest copy of the Amavis sourcecode.
+ We will retrieve this code from the Amavis CVS repository at
+\begin_inset LatexCommand \url{http://sourceforge.net/}
+
+\end_inset
+
+.
+ If you do not already have the CVS package installed on your system, you
+ can obtain it with the command:
+\layout Verbatim
+
+apt-get install cvs
+\layout Verbatim
+
+cvs -d:pserver:anonymous@cvs.amavis.sourceforge.net:/cvsroot/amavis login
+\layout Standard
+
+You will be logging in anonymously, so just press enter at the password
+ prompt.
+ If CVS gives you a hard time about
+\begin_inset Quotes eld
+\end_inset
+
+$HOME/.cvspass
+\begin_inset Quotes erd
+\end_inset
+
+ not existing, then simply type:
+\layout Verbatim
+
+touch $HOME/.cvspass
+\layout Standard
+
+and issue the command once more.
+ With these preliminaries out of the way we can download the actual source
+ with:
+\layout Verbatim
+
+cvs -z3 -d:pserver:anonymous@cvs.amavis.sourceforge.net:/cvsroot/amavis co
+ amavis
+\layout Standard
+
+This will create a subdirectory named
+\begin_inset Quotes eld
+\end_inset
+
+amavis
+\begin_inset Quotes erd
+\end_inset
+
+ in your temporary directory.
+ Please skip to section titled
+\begin_inset Quotes eld
+\end_inset
+
+Building Amavis
+\begin_inset Quotes erd
+\end_inset
+
+.
+\layout Subsection
+
+If the CVS copy blows chunks
+\layout Standard
+
+If you are like me, and the CVS copy died hideously during
+\begin_inset Quotes eld
+\end_inset
+
+./configure
+\begin_inset Quotes erd
+\end_inset
+
+, then download the the
+\begin_inset Quotes eld
+\end_inset
+
+official
+\begin_inset Quotes erd
+\end_inset
+
+ CVS snapshot from
+\begin_inset LatexCommand \url{http://sourceforge.net/projects/amavis/}
+
+\end_inset
+
+.
+ The available version at the time of this writing was
+\begin_inset Quotes eld
+\end_inset
+
+amavisd-snaphot-20010714
+\begin_inset Quotes erd
+\end_inset
+
+.
+ You can dowload this as a tarball.
+ Copy this file into your temporary directory and run:
+\layout Verbatim
+
+tar zxf <filename>
+\layout Standard
+
+That should give you a nice directory of sourcecode.
+\layout Section
+
+Building Amavis
+\layout Standard
+
+Regardless of the method you used to obtain it, please change to your new
+ amavis sourcecode directory and type the following command to build Amavis
+ with libmilter:
+\layout Verbatim
+
+LDFLAGS=
+\begin_inset Quotes erd
+\end_inset
+
+-L/usr/lib/libmilter
+\begin_inset Quotes erd
+\end_inset
+
+ ./configure --with-amavisuser=amavis --prefix=/usr/local --with-runtime-dir=/var
+/local/amavis --enable-milter --with-sendmail-source=/usr/include/libmilter
+\layout Standard
+
+Then simply run make by typing:
+\layout Verbatim
+
+make
+\layout Standard
+
+This will create, among other things, the amavisd perl script and the amavis-mil
+ter binary in your
+\begin_inset Quotes eld
+\end_inset
+
+<amavis-sourcecode-directory>/amavis/
+\begin_inset Quotes erd
+\end_inset
+
+ directory.
+ If the previous steps failed for any reason, go to the section titled
+\begin_inset Quotes eld
+\end_inset
+
+If the CVS copy blows chunks
+\begin_inset Quotes erd
+\end_inset
+
+ and rerun the
+\begin_inset Quotes eld
+\end_inset
+
+Building Amavis
+\begin_inset Quotes erd
+\end_inset
+
+ section from the beginning.
+\layout Section
+
+Installing and Running Amavis
+\layout Standard
+
+Hopefully we passed the correct options to the Amavis configure script so
+ that when we install it, the Debian file system policy won't be violated.
+ That would be bad karma.
+ Create a user named
+\begin_inset Quotes eld
+\end_inset
+
+amavis
+\begin_inset Quotes erd
+\end_inset
+
+ with:
+\layout Verbatim
+
+useradd amavis
+\layout Standard
+
+From the amavis-sourcecode-directory type:
+\layout Verbatim
+
+make install
+\layout Standard
+
+If everythiny worked, the install script should have
+\layout Itemize
+
+copied the amavisd perl script to /usr/local/sbin
+\layout Itemize
+
+copied the amavis-milter binary to /usr/local/sbin
+\layout Itemize
+
+created the /var/local/amavis directory with owner amavis and mode 2700
+ or 0700
+\layout Itemize
+
+created a file named /etc/amavisd.conf
+\layout Standard
+
+Now you will need to create an alias in /etc/aliases or /etc/mail/aliases
+ (or wherever you keep your mail aliases) for the
+\begin_inset Quotes eld
+\end_inset
+
+virusalert
+\begin_inset Quotes erd
+\end_inset
+
+ email address that Amavis will try and send virus reports to.
+ Generally, this should be the system administrator.
+\layout Standard
+
+Don't forget to rebuild the aliases file by issuing:
+\layout Verbatim
+
+newaliases
+\layout Standard
+
+Finally, open up the /etc/mail/sendmail.mc file for editing and insert the
+ following two lines anywhere after the line the begins with
+\begin_inset Quotes eld
+\end_inset
+
+## Custom configurations
+\begin_inset Quotes erd
+\end_inset
+
+ (it is near the bottom):
+\layout Verbatim
+
+define(`_FFR_MILTER', `1')dnl
+\layout Verbatim
+
+INPUT_MAIL_FILTER(`milter-amavis', `S=local:/var/local/amavis/amavis-milter.sock,
+ T=S:10m;R:10m;E:10m')dnl
+\layout Standard
+
+After you close the /etc/mail/sendmail.mc file, start-up amavis-milter and
+ amavisd with the following three commands:
+\layout Verbatim
+
+rm -rf /var/local/amavis/amavis-milter.sock
+\layout Verbatim
+
+nohup /usr/local/sbin/amavis-milter -p /var/local/amavis/amavis-milter.sock
+ &
+\layout Verbatim
+
+/usr/local/sbin/amavisd
+\layout Standard
+
+Now that Amavis is ready and running, you can fire-up your new sendmail
+ configuration with:
+\layout Verbatim
+
+sendmailconfig
+\layout Standard
+
+This command will recreate the /etc/mail/sendmail.cf file from the /etc/mail/send
+mail.mc file and reload the sendmail daemon.
+ An alternate approach is to delete the /etc/mail/sendmail.cf file, run
+\begin_inset Quotes eld
+\end_inset
+
+make
+\begin_inset Quotes erd
+\end_inset
+
+ in the /etc/mail directory, and restart sendmail with
+\begin_inset Quotes eld
+\end_inset
+
+/etc/init.d/sendmail restart
+\begin_inset Quotes erd
+\end_inset
+
+ (or whatever it is that you use).
+\layout Section
+
+An Example Startup script
+\layout Code
+
+#!/bin/sh
+\layout Code
+
+# /etc/init.d/amavis-ramdisk
+\layout Code
+
+# Script to run Amavis from a ram disk.
+\layout Code
+
+\layout Code
+
+# I keep my antiviral scanner and data files on a ramdisk for speed.
+\layout Code
+
+AVDIR="/usr/local/share/av.original"
+\layout Code
+
+RAMDISK="/usr/local/share/av.ramdisk"
+\layout Code
+
+AMAVISBIN="/usr/local/sbin"
+\layout Code
+
+AMAVISSOCK="/var/local/amavis"
+\layout Code
+
+[ -d $AVDIR -a -d $RAMDISK ] || exit 0
+\layout Code
+
+case "$1" in
+\layout Code
+
+start)
+\layout Code
+
+ mke2fs /dev/ram0 > /dev/null 2>&1
+\layout Code
+
+ mount /dev/ram0 $RAMDISK
+\layout Code
+
+ cp $AVDIR/* $RAMDISK
+\layout Code
+
+ if [ -S $AMAVISSOCK/amavis-milter.sock ]; then
+\layout Code
+
+ rm -rf $AMAVISSOCK/amavis-milter.sock
+\layout Code
+
+ fi
+\layout Code
+
+ if [ -S $AMAVISSOCK/amavisd.sock ]; then
+\layout Code
+
+ rm -rf $AMAVISSOCK/amavisd.sock
+\layout Code
+
+ fi
+\layout Code
+
+ nohup $AMAVISBIN/amavis-milter -p $AMAVISSOCK/amavis-milter.sock &
+\layout Code
+
+ $AMAVISBIN/amavisd
+\layout Code
+
+;;
+\layout Code
+
+stop)
+\layout Code
+
+ kill -9 `ps x | grep amavisd | grep -v grep | awk '{print $1}'`2> /dev/null
+\layout Code
+
+ kill -9 `ps x | grep amavis-milter | grep -v grep | awk '{print $1}'`
+ 2> /dev/null
+\layout Code
+
+ # I need to sleep for some reason :(
+\layout Code
+
+ sleep 2umount /dev/ram0
+\layout Code
+
+;;
+\layout Code
+
+*)
+\layout Code
+
+ echo "Usage: /etc/init.d/amavis-ramdisk {start|stop}"
+\layout Code
+
+ exit 1
+\layout Code
+
+;;
+\layout Code
+
+esac
+\layout Code
+
+exit 0
+\layout Standard
+
+Don't forget to update your antivirus data files regularly.
+
+\layout Quote
+
+Send all comments and corrections to <jps@maxlingua.com>.
+ Support free software!
+\the_end
diff --git a/debian/examples/amavis/amavis-doc-1.html b/debian/examples/amavis/amavis-doc-1.html
new file mode 100644
index 0000000..f893635
--- /dev/null
+++ b/debian/examples/amavis/amavis-doc-1.html
@@ -0,0 +1,75 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+ <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.10">
+ <TITLE>How to Install Amavis-milter for Debian Sendmail: Software Dependencies</TITLE>
+ <LINK HREF="amavis-doc-2.html" REL=next>
+
+ <LINK HREF="amavis-doc.html#toc1" REL=contents>
+</HEAD>
+<BODY>
+<A HREF="amavis-doc-2.html">Next</A>
+Previous
+<A HREF="amavis-doc.html#toc1">Contents</A>
+<HR>
+<H2><A NAME="s1">1.</A> <A HREF="amavis-doc.html#toc1">Software Dependencies</A></H2>
+
+<P>
+<OL>
+<LI>At a minimum you need to be running the Debian 3.0 (Woody) distribution
+from
+<A HREF="http://www.debian.org/"></A>
+. Older versions of Debian do not provide an adequate sendmail
+package (they lack the libmilter API).</LI>
+<LI>Obviously, sendmail needs to be installed on your system.</LI>
+<LI>As mentioned in the abstract, you will have to obtain your own
+antiviral engine from an independent vendor.</LI>
+<LI>The "
+file"
+package.</LI>
+<LI>The "
+arc"
+utility. It is not available as a Debian package. You
+can obtain the source code for this program at
+<A HREF="ftp://metalab.unc.edu/pub/Linux/utils/compress/arc521.tar.Z"></A>
+. </LI>
+<LI>The "
+bzip2"
+package.</LI>
+<LI>The "
+lha"
+package.</LI>
+<LI>The "
+unarj"
+package.</LI>
+<LI>The "
+unrar"
+package.</LI>
+<LI>The "
+zoo"
+package.</LI>
+<LI>You may need to install a few perl modules. The required modules
+are</LI>
+</OL>
+</P>
+<P>
+<UL>
+<LI>IO-stringy</LI>
+<LI>Syslog</LI>
+<LI>MailTools</LI>
+<LI>MIME-Base64</LI>
+<LI>MIME-tools</LI>
+<LI>Convert-UUlib</LI>
+<LI>Convert-TNEF</LI>
+<LI>Compress-Zlib</LI>
+<LI>Archive-Tar</LI>
+<LI>Archive-Zip</LI>
+<LI>libnet</LI>
+</UL>
+</P>
+<HR>
+<A HREF="amavis-doc-2.html">Next</A>
+Previous
+<A HREF="amavis-doc.html#toc1">Contents</A>
+</BODY>
+</HTML>
diff --git a/debian/examples/amavis/amavis-doc-2.html b/debian/examples/amavis/amavis-doc-2.html
new file mode 100644
index 0000000..17d2694
--- /dev/null
+++ b/debian/examples/amavis/amavis-doc-2.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+ <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.10">
+ <TITLE>How to Install Amavis-milter for Debian Sendmail: Installing the Software Dependencies</TITLE>
+ <LINK HREF="amavis-doc-3.html" REL=next>
+ <LINK HREF="amavis-doc-1.html" REL=previous>
+ <LINK HREF="amavis-doc.html#toc2" REL=contents>
+</HEAD>
+<BODY>
+<A HREF="amavis-doc-3.html">Next</A>
+<A HREF="amavis-doc-1.html">Previous</A>
+<A HREF="amavis-doc.html#toc2">Contents</A>
+<HR>
+<H2><A NAME="s2">2.</A> <A HREF="amavis-doc.html#toc2">Installing the Software Dependencies</A></H2>
+
+<P>Update your distribution files with the usual:</P>
+<P>
+<PRE>
+apt-get update
+</PRE>
+</P>
+<P>and install file, bzip2, lha, unarj, unrar, and zoo in one shot
+with:</P>
+<P>
+<PRE>
+apt-get install file bzip2 lha unarj unrar zoo
+</PRE>
+</P>
+<P>Install all the perl modules in one shot with:</P>
+<P>
+<PRE>
+apt-get install libio-stringy-perl libunix-syslog-perl libmailtools-perl libmime-base64-perl libmime-perl libconvert-uulib-perl libconvert-tnef-perl libcompress-zlib-perl libarchive-tar-perl libarchive-zip-perl libnet-perl
+</PRE>
+</P>
+<P>Installing the "
+arc"
+utility is much more of a hassle. Furthermore,
+it is an unmaintained old MS-DOS port with a non-free license. I
+will describe what I did to compile it on a Intel platform (suggestions
+on better ways to do this are appreciated). The next few steps assume
+that you have the GNU "
+make"
+and "
+gcc"
+packges installed on your
+system. If this is not the case then try:</P>
+<P>
+<PRE>
+apt-get install make gcc
+</PRE>
+</P>
+<P>Let's create a temporary directory somewhere so that we can make
+a mess in it. Since my login is "
+jps"
+, I made a directory named "
+/home/jps/tmp/"
+.
+Copy the arc521.tar.Z file into your new temporary diretory and type:</P>
+
+<P>
+<PRE>
+uncompress arc521.tar.Z; tar xf arc521.tar
+</PRE>
+</P>
+<P>or something equivalent to uncompress and untar the archive.
+This will create a bunch of files. We need to delete some lines from
+the file named "
+arcdos.c"
+. It is probably set to be read-only, so
+type:</P>
+<P>
+<PRE>
+chmod u+w arcdos.c
+</PRE>
+</P>
+<P>Open arcdos.c for editing and delete (or comment out) lines 35-38
+inclusive. (It is the definition of a structure that begins with
+"
+struct timeval"
+on line 35 and ends with "
+};"
+on line 38).
+We are done with that, so close the file. Now type:</P>
+<P>
+<PRE>
+make
+</PRE>
+</P>
+<P>This command WILL FAIL with a bunch of warnings and an error
+message complaining about "
+tmclock.o"
+, but it accomplished some necessary
+things anyway. Now open the file named "
+Makefile"
+for editing. Go
+to the line that says "
+System = -DBSD=1"
+. It should be on line 31.
+Change the line so that it says:</P>
+<P>
+<PRE>
+System = -DSYSV=1
+</PRE>
+</P>
+<P>Close the Makefile and run make again by typing:</P>
+<P>
+<PRE>
+make
+</PRE>
+</P>
+<P>That should compile the "
+arc"
+utility successfully. You can ignore
+the warnings about "
+mktemp"
+and "
+mkstemp"
+. There should now be an
+executable program with the name of "
+arc"
+in your temporary directory.
+As root, copy this file to "
+/usr/local/bin"
+or the usual place where
+you keep home-cooked binaries. Just make sure that it is in your
+path. Test this by typing "
+arc"
+and see if the arc usage guide scrolls
+up your terminal. You can delete all the files in your temporary
+directory now, but leave the directory itself because we will be
+using it later. Aren't .deb packages so much easier? </P>
+<HR>
+<A HREF="amavis-doc-3.html">Next</A>
+<A HREF="amavis-doc-1.html">Previous</A>
+<A HREF="amavis-doc.html#toc2">Contents</A>
+</BODY>
+</HTML>
diff --git a/debian/examples/amavis/amavis-doc-3.html b/debian/examples/amavis/amavis-doc-3.html
new file mode 100644
index 0000000..eeb89d1
--- /dev/null
+++ b/debian/examples/amavis/amavis-doc-3.html
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+ <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.10">
+ <TITLE>How to Install Amavis-milter for Debian Sendmail: Example Installation of an Antivirus Scanner</TITLE>
+ <LINK HREF="amavis-doc-4.html" REL=next>
+ <LINK HREF="amavis-doc-2.html" REL=previous>
+ <LINK HREF="amavis-doc.html#toc3" REL=contents>
+</HEAD>
+<BODY>
+<A HREF="amavis-doc-4.html">Next</A>
+<A HREF="amavis-doc-2.html">Previous</A>
+<A HREF="amavis-doc.html#toc3">Contents</A>
+<HR>
+<H2><A NAME="s3">3.</A> <A HREF="amavis-doc.html#toc3">Example Installation of an Antivirus Scanner</A></H2>
+
+<P>I am using a Linux commandline scanner from NAI Associates, Inc.
+You will have to avail yourself of the documentation at
+<A HREF="http://www.amavis.org/"></A>
+if you
+don't know where to obtain a scanner. For example, you could place
+your scanner binary along with its' data files in a directory named
+"
+/usr/local/share/av"
+. Then create a symlink to the binary in the
+"
+/usr/local/bin"
+directory. This way, the command to execute the
+scanner is in your path, and the Amavis configure script will find
+it. For a more advanced configuration (once you have the easy stuff
+out of the way), take a look at the example start-stop script at
+the end of this document.</P>
+<HR>
+<A HREF="amavis-doc-4.html">Next</A>
+<A HREF="amavis-doc-2.html">Previous</A>
+<A HREF="amavis-doc.html#toc3">Contents</A>
+</BODY>
+</HTML>
diff --git a/debian/examples/amavis/amavis-doc-4.html b/debian/examples/amavis/amavis-doc-4.html
new file mode 100644
index 0000000..c9e338e
--- /dev/null
+++ b/debian/examples/amavis/amavis-doc-4.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+ <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.10">
+ <TITLE>How to Install Amavis-milter for Debian Sendmail: Obtaining the Libmilter Sourcecode and Libraries</TITLE>
+ <LINK HREF="amavis-doc-5.html" REL=next>
+ <LINK HREF="amavis-doc-3.html" REL=previous>
+ <LINK HREF="amavis-doc.html#toc4" REL=contents>
+</HEAD>
+<BODY>
+<A HREF="amavis-doc-5.html">Next</A>
+<A HREF="amavis-doc-3.html">Previous</A>
+<A HREF="amavis-doc.html#toc4">Contents</A>
+<HR>
+<H2><A NAME="s4">4.</A> <A HREF="amavis-doc.html#toc4">Obtaining the Libmilter Sourcecode and Libraries</A></H2>
+
+<P>In order to be able to build Amavis with the libmilter interface,
+you need to have the Sendmail's libmilter sourcecode and libraries
+available. Don't worry, this is very easy with Debian. The following
+command will dowload everything required to your system:</P>
+<P>
+<PRE>
+apt-get install libmilter-dev
+</PRE>
+</P>
+<HR>
+<A HREF="amavis-doc-5.html">Next</A>
+<A HREF="amavis-doc-3.html">Previous</A>
+<A HREF="amavis-doc.html#toc4">Contents</A>
+</BODY>
+</HTML>
diff --git a/debian/examples/amavis/amavis-doc-5.html b/debian/examples/amavis/amavis-doc-5.html
new file mode 100644
index 0000000..7d5186c
--- /dev/null
+++ b/debian/examples/amavis/amavis-doc-5.html
@@ -0,0 +1,85 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+ <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.10">
+ <TITLE>How to Install Amavis-milter for Debian Sendmail: Obtaining the Amavis Sourcecode</TITLE>
+ <LINK HREF="amavis-doc-6.html" REL=next>
+ <LINK HREF="amavis-doc-4.html" REL=previous>
+ <LINK HREF="amavis-doc.html#toc5" REL=contents>
+</HEAD>
+<BODY>
+<A HREF="amavis-doc-6.html">Next</A>
+<A HREF="amavis-doc-4.html">Previous</A>
+<A HREF="amavis-doc.html#toc5">Contents</A>
+<HR>
+<H2><A NAME="s5">5.</A> <A HREF="amavis-doc.html#toc5">Obtaining the Amavis Sourcecode</A></H2>
+
+<H2><A NAME="ss5.1">5.1</A> <A HREF="amavis-doc.html#toc5.1">Checking the latest copy out of CVS</A>
+</H2>
+
+<P>
+<BLOCKQUOTE>As of October 23, 2001; the CVS copy might not compile. Skip
+to the next section if you don't want to fool around. </BLOCKQUOTE>
+Now that we have extracted the libmilter files, the next step
+is to obtain the latest copy of the Amavis sourcecode. We will retrieve
+this code from the Amavis CVS repository at
+<A HREF="http://sourceforge.net/"></A>
+. If you do not already
+have the CVS package installed on your system, you can obtain it
+with the command:</P>
+<P>
+<PRE>
+apt-get install cvs
+cvs -d:pserver:anonymous@cvs.amavis.sourceforge.net:/cvsroot/amavis login
+</PRE>
+</P>
+<P>You will be logging in anonymously, so just press enter at the
+password prompt. If CVS gives you a hard time about "
+$HOME/.cvspass"</P>
+<P>not existing, then simply type:</P>
+<P>
+<PRE>
+touch $HOME/.cvspass
+</PRE>
+</P>
+<P>and issue the command once more. With these preliminaries out
+of the way we can download the actual source with:</P>
+<P>
+<PRE>
+cvs -z3 -d:pserver:anonymous@cvs.amavis.sourceforge.net:/cvsroot/amavis co amavis
+</PRE>
+</P>
+<P>This will create a subdirectory named "
+amavis"
+in your temporary
+directory. Please skip to section titled "
+Building Amavis"
+.</P>
+<H2><A NAME="ss5.2">5.2</A> <A HREF="amavis-doc.html#toc5.2">If the CVS copy blows chunks</A>
+</H2>
+
+<P>If you are like me, and the CVS copy died hideously during "
+./configure"
+,
+then download the the "
+official"
+CVS snapshot from
+<A HREF="http://sourceforge.net/projects/amavis/"></A>
+. The available
+version at the time of this writing was "
+amavisd-snaphot-20010714"
+.
+You can dowload this as a tarball. Copy this file into your temporary
+directory and run:</P>
+<P>
+<PRE>
+tar zxf &lt;filename&gt;
+</PRE>
+</P>
+<P>That should give you a nice directory of sourcecode.</P>
+<HR>
+<A HREF="amavis-doc-6.html">Next</A>
+<A HREF="amavis-doc-4.html">Previous</A>
+<A HREF="amavis-doc.html#toc5">Contents</A>
+</BODY>
+</HTML>
diff --git a/debian/examples/amavis/amavis-doc-6.html b/debian/examples/amavis/amavis-doc-6.html
new file mode 100644
index 0000000..f3c2041
--- /dev/null
+++ b/debian/examples/amavis/amavis-doc-6.html
@@ -0,0 +1,48 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+ <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.10">
+ <TITLE>How to Install Amavis-milter for Debian Sendmail: Building Amavis</TITLE>
+ <LINK HREF="amavis-doc-7.html" REL=next>
+ <LINK HREF="amavis-doc-5.html" REL=previous>
+ <LINK HREF="amavis-doc.html#toc6" REL=contents>
+</HEAD>
+<BODY>
+<A HREF="amavis-doc-7.html">Next</A>
+<A HREF="amavis-doc-5.html">Previous</A>
+<A HREF="amavis-doc.html#toc6">Contents</A>
+<HR>
+<H2><A NAME="s6">6.</A> <A HREF="amavis-doc.html#toc6">Building Amavis</A></H2>
+
+<P>Regardless of the method you used to obtain it, please change
+to your new amavis sourcecode directory and type the following command
+to build Amavis with libmilter:</P>
+<P>
+<PRE>
+LDFLAGS="
+-L/usr/lib/libmilter"
+ ./configure --with-amavisuser=amavis --prefix=/usr/local --with-runtime-dir=/var/local/amavis --enable-milter --with-sendmail-source=/usr/include/libmilter
+</PRE>
+</P>
+<P>Then simply run make by typing:</P>
+<P>
+<PRE>
+make
+</PRE>
+</P>
+<P>This will create, among other things, the amavisd perl script
+and the amavis-milter binary in your "
+&lt;amavis-sourcecode-directory&gt;/amavis/"</P>
+<P>directory. If the previous steps failed for any reason, go to the
+section titled "
+If the CVS copy blows chunks"
+and rerun the "
+Building
+Amavis"
+section from the beginning.</P>
+<HR>
+<A HREF="amavis-doc-7.html">Next</A>
+<A HREF="amavis-doc-5.html">Previous</A>
+<A HREF="amavis-doc.html#toc6">Contents</A>
+</BODY>
+</HTML>
diff --git a/debian/examples/amavis/amavis-doc-7.html b/debian/examples/amavis/amavis-doc-7.html
new file mode 100644
index 0000000..5997841
--- /dev/null
+++ b/debian/examples/amavis/amavis-doc-7.html
@@ -0,0 +1,96 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+ <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.10">
+ <TITLE>How to Install Amavis-milter for Debian Sendmail: Installing and Running Amavis</TITLE>
+ <LINK HREF="amavis-doc-8.html" REL=next>
+ <LINK HREF="amavis-doc-6.html" REL=previous>
+ <LINK HREF="amavis-doc.html#toc7" REL=contents>
+</HEAD>
+<BODY>
+<A HREF="amavis-doc-8.html">Next</A>
+<A HREF="amavis-doc-6.html">Previous</A>
+<A HREF="amavis-doc.html#toc7">Contents</A>
+<HR>
+<H2><A NAME="s7">7.</A> <A HREF="amavis-doc.html#toc7">Installing and Running Amavis</A></H2>
+
+<P>Hopefully we passed the correct options to the Amavis configure
+script so that when we install it, the Debian file system policy
+won't be violated. That would be bad karma. Create a user named "
+amavis"</P>
+<P>with:</P>
+<P>
+<PRE>
+useradd amavis
+</PRE>
+</P>
+<P>From the amavis-sourcecode-directory type:</P>
+<P>
+<PRE>
+make install
+</PRE>
+</P>
+<P>If everythiny worked, the install script should have</P>
+<P>
+<UL>
+<LI>copied the amavisd perl script to /usr/local/sbin</LI>
+<LI>copied the amavis-milter binary to /usr/local/sbin</LI>
+<LI>created the /var/local/amavis directory with owner amavis and
+mode 2700 or 0700</LI>
+<LI>created a file named /etc/amavisd.conf</LI>
+</UL>
+</P>
+<P>Now you will need to create an alias in /etc/aliases or /etc/mail/aliases
+(or wherever you keep your mail aliases) for the "
+virusalert"
+email
+address that Amavis will try and send virus reports to. Generally,
+this should be the system administrator.</P>
+<P>Don't forget to rebuild the aliases file by issuing:</P>
+<P>
+<PRE>
+newaliases
+</PRE>
+</P>
+<P>Finally, open up the /etc/mail/sendmail.mc file for editing and
+insert the following two lines anywhere after the line the begins
+with "
+## Custom configurations"
+(it is near the bottom):</P>
+<P>
+<PRE>
+define(`_FFR_MILTER', `1')dnl
+INPUT_MAIL_FILTER(`milter-amavis', `S=local:/var/local/amavis/amavis-milter.sock, T=S:10m;R:10m;E:10m')dnl
+</PRE>
+</P>
+<P>After you close the /etc/mail/sendmail.mc file, start-up amavis-milter
+and amavisd with the following three commands:</P>
+<P>
+<PRE>
+rm -rf /var/local/amavis/amavis-milter.sock
+nohup /usr/local/sbin/amavis-milter -p /var/local/amavis/amavis-milter.sock &amp;
+/usr/local/sbin/amavisd
+</PRE>
+</P>
+<P>Now that Amavis is ready and running, you can fire-up your new
+sendmail configuration with:</P>
+<P>
+<PRE>
+sendmailconfig
+</PRE>
+</P>
+<P>This command will recreate the /etc/mail/sendmail.cf file from
+the /etc/mail/sendmail.mc file and reload the sendmail daemon. An
+alternate approach is to delete the /etc/mail/sendmail.cf file, run
+"
+make"
+in the /etc/mail directory, and restart sendmail with "
+/etc/init.d/sendmail
+restart"
+(or whatever it is that you use).</P>
+<HR>
+<A HREF="amavis-doc-8.html">Next</A>
+<A HREF="amavis-doc-6.html">Previous</A>
+<A HREF="amavis-doc.html#toc7">Contents</A>
+</BODY>
+</HTML>
diff --git a/debian/examples/amavis/amavis-doc-8.html b/debian/examples/amavis/amavis-doc-8.html
new file mode 100644
index 0000000..6d36780
--- /dev/null
+++ b/debian/examples/amavis/amavis-doc-8.html
@@ -0,0 +1,72 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+ <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.10">
+ <TITLE>How to Install Amavis-milter for Debian Sendmail: An Example Startup script</TITLE>
+ <LINK HREF="amavis-doc-7.html" REL=previous>
+ <LINK HREF="amavis-doc.html#toc8" REL=contents>
+</HEAD>
+<BODY>
+Next
+<A HREF="amavis-doc-7.html">Previous</A>
+<A HREF="amavis-doc.html#toc8">Contents</A>
+<HR>
+<H2><A NAME="s8">8.</A> <A HREF="amavis-doc.html#toc8">An Example Startup script</A></H2>
+
+<P>
+<HR>
+<PRE>
+#!/bin/sh
+# /etc/init.d/amavis-ramdisk
+# Script to run Amavis from a ram disk.
+
+# I keep my antiviral scanner and data files on a ramdisk for speed.
+AVDIR=&quot;/usr/local/share/av.original&quot;
+RAMDISK=&quot;/usr/local/share/av.ramdisk&quot;
+AMAVISBIN=&quot;/usr/local/sbin&quot;
+AMAVISSOCK=&quot;/var/local/amavis&quot;
+[ -d $AVDIR -a -d $RAMDISK ] || exit 0
+case &quot;$1&quot; in
+start)
+ mke2fs /dev/ram0 &gt; /dev/null 2&gt;&amp;1
+ mount /dev/ram0 $RAMDISK
+ cp $AVDIR/* $RAMDISK
+ if [ -S $AMAVISSOCK/amavis-milter.sock ]; then
+ rm -rf $AMAVISSOCK/amavis-milter.sock
+ fi
+ if [ -S $AMAVISSOCK/amavisd.sock ]; then
+ rm -rf $AMAVISSOCK/amavisd.sock
+ fi
+ nohup $AMAVISBIN/amavis-milter -p $AMAVISSOCK/amavis-milter.sock &amp;
+ $AMAVISBIN/amavisd
+;;
+stop)
+ kill -9 `ps x | grep amavisd | grep -v grep | awk '{print $1}'`2&gt; /dev/null
+ kill -9 `ps x | grep amavis-milter | grep -v grep | awk '{print $1}'` 2&gt; /dev/null
+ # I need to sleep for some reason :(
+ sleep 2umount /dev/ram0
+;;
+*)
+ echo &quot;Usage: /etc/init.d/amavis-ramdisk {start|stop}&quot;
+ exit 1
+;;
+esac
+exit 0
+</PRE>
+<HR>
+</P>
+<P>Don't forget to update your antivirus data files regularly. </P>
+<P>
+<BLOCKQUOTE>
+Send all comments and corrections to &lt;jps@maxlingua.com&gt;.
+Support free software!
+</BLOCKQUOTE>
+</P>
+
+
+<HR>
+Next
+<A HREF="amavis-doc-7.html">Previous</A>
+<A HREF="amavis-doc.html#toc8">Contents</A>
+</BODY>
+</HTML>
diff --git a/debian/examples/amavis/amavis-doc.html b/debian/examples/amavis/amavis-doc.html
new file mode 100644
index 0000000..181738d
--- /dev/null
+++ b/debian/examples/amavis/amavis-doc.html
@@ -0,0 +1,72 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+ <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.10">
+ <TITLE>How to Install Amavis-milter for Debian Sendmail</TITLE>
+ <LINK HREF="amavis-doc-1.html" REL=next>
+
+
+</HEAD>
+<BODY>
+<A HREF="amavis-doc-1.html">Next</A>
+Previous
+Contents
+<HR>
+<H1>How to Install Amavis-milter for Debian Sendmail</H1>
+
+<H2>Jean-Paul Stewart &lt;jps@maxlingua.com&gt;</H2>23.10.2001
+<HR>
+<EM>This document provides a step-by-step guide to the installation
+ and configuration of the Amavis antivirus software available from
+
+<A HREF="http://www.amavis.org/"></A>
+ on the Debian GNU/Linux operating system. It has been adapted from
+ the documentation available there. Amavis supports many different
+ methods of implementation. I have chosen to implement Amavis-libmilter
+ as the interface between Amavis and Sendmail. Another option with
+ Amavis + Sendmail, which I am not describing here, involves employing
+ Amavis as a sort of intermediate local delivery agent. Please be
+ advised that this software requires an existing CLI antivirus scanning
+ engine and database. The selection and procurement of such software
+ is not discussed in this document. There is ample information available
+ at the amavis.org site. These installation examples make extensive
+ use of the outstanding Sendmail and libmilter-dev Debian packages
+ maintained by Richard "
+cowboy"
+ Nelson. Thanks Cowboy! Thank you Amavis
+ developers!</EM>
+<HR>
+<P>
+<H2><A NAME="toc1">1.</A> <A HREF="amavis-doc-1.html">Software Dependencies</A></H2>
+
+<P>
+<H2><A NAME="toc2">2.</A> <A HREF="amavis-doc-2.html">Installing the Software Dependencies</A></H2>
+
+<P>
+<H2><A NAME="toc3">3.</A> <A HREF="amavis-doc-3.html">Example Installation of an Antivirus Scanner</A></H2>
+
+<P>
+<H2><A NAME="toc4">4.</A> <A HREF="amavis-doc-4.html">Obtaining the Libmilter Sourcecode and Libraries</A></H2>
+
+<P>
+<H2><A NAME="toc5">5.</A> <A HREF="amavis-doc-5.html">Obtaining the Amavis Sourcecode</A></H2>
+
+<UL>
+<LI><A NAME="toc5.1">5.1</A> <A HREF="amavis-doc-5.html#ss5.1">Checking the latest copy out of CVS</A>
+<LI><A NAME="toc5.2">5.2</A> <A HREF="amavis-doc-5.html#ss5.2">If the CVS copy blows chunks</A>
+</UL>
+<P>
+<H2><A NAME="toc6">6.</A> <A HREF="amavis-doc-6.html">Building Amavis</A></H2>
+
+<P>
+<H2><A NAME="toc7">7.</A> <A HREF="amavis-doc-7.html">Installing and Running Amavis</A></H2>
+
+<P>
+<H2><A NAME="toc8">8.</A> <A HREF="amavis-doc-8.html">An Example Startup script</A></H2>
+
+<HR>
+<A HREF="amavis-doc-1.html">Next</A>
+Previous
+Contents
+</BODY>
+</HTML>
diff --git a/debian/db-examples/access b/debian/examples/db/access
index 9eea701..9eea701 100644
--- a/debian/db-examples/access
+++ b/debian/examples/db/access
diff --git a/debian/db-examples/aliases b/debian/examples/db/aliases
index 8e99427..8e99427 100644
--- a/debian/db-examples/aliases
+++ b/debian/examples/db/aliases
diff --git a/debian/db-examples/domaintable b/debian/examples/db/domaintable
index 82b3ff7..82b3ff7 100644
--- a/debian/db-examples/domaintable
+++ b/debian/examples/db/domaintable
diff --git a/debian/db-examples/genericstable b/debian/examples/db/genericstable
index 44bf03c..44bf03c 100644
--- a/debian/db-examples/genericstable
+++ b/debian/examples/db/genericstable
diff --git a/debian/db-examples/mailertable b/debian/examples/db/mailertable
index 79d950f..79d950f 100644
--- a/debian/db-examples/mailertable
+++ b/debian/examples/db/mailertable
diff --git a/debian/db-examples/relay-domains b/debian/examples/db/relay-domains
index 393f65d..393f65d 100644
--- a/debian/db-examples/relay-domains
+++ b/debian/examples/db/relay-domains
diff --git a/debian/db-examples/sendmail.cM b/debian/examples/db/sendmail.cM
index 8806f3b..8806f3b 100644
--- a/debian/db-examples/sendmail.cM
+++ b/debian/examples/db/sendmail.cM
diff --git a/debian/db-examples/virtusertable b/debian/examples/db/virtusertable
index 3512635..3512635 100644
--- a/debian/db-examples/virtusertable
+++ b/debian/examples/db/virtusertable
diff --git a/debian/examples/dialup/ip-down.d b/debian/examples/dialup/ip-down.d
new file mode 100644
index 0000000..88e719e
--- /dev/null
+++ b/debian/examples/dialup/ip-down.d
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# This script is called when ppp disconnects from the network.
+#
+# Here is where we'll stop sendmail if needed
+#
+# Written By Richard Nelson <cowboy@debian.org>
+#
+# NOTE: The following lines (without the #) must be in /etc/mail/sendmail.mc:
+# include(`/etc/mail/dialup.m4')dnl
+# include(`/etc/mail/provider.m4')dnl
+#
+# Exit by default, check for validity before commenting out the next line:
+exit 0;
+
+# Purge any latent host status that might cause us to *NOT* send mail
+AM='-Am';
+if [ ! -f /usr/share/sendmail/cf/feature/msp.m4 ]; then
+ AM='';
+ fi;
+sendmail $AM -bH -O Timeout.hoststatus=1s;
+
+# New mail will only be queued
+file="/etc/mail/dialup.m4";
+if [ -f "$file" ]; then
+ cat <<-EOT > $file;
+ LOCAL_CONFIG
+ #------------------------------------------------------------
+ #
+ # Dynamic updates from $0
+ #
+ # NOTE: the following line *MUST* be in /etc/mail/sendmail.mc
+ dnl include(\`/etc/mail/dialup.m4')dnl
+ #
+ # sendmail is to only queue messages until connected again
+ define(\`confDELIVERY_MODE', \`deferred')dnl
+ #
+ # Allow the queue to age without carping every four hours
+ define(\`confTO_QUEUEWARN',\`1d')dnl
+ #
+ # Don't keep host status while the network is down
+ define(\`confHOST_STATUS_DIRECTORY')dnl
+ #------------------------------------------------------------
+ EOT
+ fi;
+
+# Build a new sendmail.cf from sendmail.mc, including our address.
+# NOTE: The following line (without the #) must be in /etc/mail/sendmail.mc:
+# include(`/etc/mail/dialup.m4')
+m4 /etc/mail/sendmail.mc \
+ > /etc/mail/sendmail.cf.pnew;
+chmod 0644 /etc/mail/sendmail.cf.pnew;
+chown mail:mail /etc/mail/sendmail.cf.pnew;
+mv -f /etc/mail/sendmail.cf.pnew /etc/mail/sendmail.cf;
+
+# Stop/reload sendmail daemon as needed
+/etc/init.d/sendmail reload;
diff --git a/debian/examples/dialup/ip-up.d b/debian/examples/dialup/ip-up.d
new file mode 100644
index 0000000..cae3e1f
--- /dev/null
+++ b/debian/examples/dialup/ip-up.d
@@ -0,0 +1,130 @@
+#!/bin/sh
+#
+# This script is called when ppp connects to the network.
+#
+# Here is where we'll start sendmail if needed, and will
+# run the queue in either case.
+#
+# Written By Richard Nelson <cowboy@debian.org>
+#
+# NOTE: The following lines (without the #) must be in /etc/mail/sendmail.mc:
+# include(`/etc/mail/dialup.m4')dnl
+# include(`/etc/mail/provider.m4')dnl
+#
+# ALSO: make sure ipparam is specified somewhere in the ppp options;
+# it will be used as the name of a file in /etc/mail/peers
+#
+# Exit by default, check for validity before commenting out the next line:
+exit 0;
+
+# Define our domain name (from PPP) for sendmail.
+
+# These variables are for the use of the scripts run by run-parts
+#PPP_IFACE="$1";
+#PPP_TTY="$2";
+#PPP_SPEED="$3";
+#PPP_LOCAL="$4";
+#PPP_REMOTE="$5";
+#PPP_IPPARAM="$6";
+
+if [ ! -z "$PPP_LOCAL" ]; then
+ addr=$PPP_LOCAL;
+ provider=$PPP_IPPARAM;
+else
+ addr=$1;
+ provider=$2;
+ fi;
+
+# Determine our fqdn from our ISP
+maxloop=20;
+cntr=0;
+name="";
+until (test ! -z "$name"); do
+ cntr=$(($cntr+1));
+ rev=$(host $addr);
+ name=$(echo "$rev" | grep '^Name:' | awk '{print $2}');
+ if [ -z "$name" ]; then
+ name=${rev##*domain name pointer };
+ name=${name%.};
+ fi;
+ test=$(echo $name | cut -d ' ' -f 1);
+ if [ "$name" != "**" ]; then
+ break;
+ elif (($cntr > $maxloop)); then
+ name='';
+ break;
+ fi;
+ done;
+echo "addr=$addr, name=$name";
+
+file="/etc/mail/dialup.m4";
+#file="dialup.m4";
+if [ ! -z "$name" ]; then
+ cat <<-EOT > $file;
+ LOCAL_CONFIG
+ #------------------------------------------------------------
+ #
+ # Dynamic updates from $0
+ #
+ # NOTE: the following line *MUST* be in /etc/mail/sendmail.mc
+ dnl include(\`/etc/mail/dialup.m4')dnl
+ #
+ # Chose one of the following options:
+ # * Add our true hostname as a Virtual Host (we'll accept
+ # mail for it, but keep our local name for SMTP AUTH, etc)
+ dnl C{VirtHost}$name
+ # * Define our true hostname (from our ISP) becomes \$j
+ dnl define(\`confDOMAIN_NAME', \`$name')dnl
+ #
+ # Make sure we accept mail as this name (for bounces, etc)
+ Cw$name
+ # Add our hostname to class G for genericstable support
+ CG$name
+ #------------------------------------------------------------
+ EOT
+ fi;
+
+# Add smarthost information (if any)... But not if provider.m4 is a link !
+file="/etc/mail/provider.m4";
+#file="provider.m4";
+if [ -f /etc/mail/peers/$provider -a ! -L $file ]; then
+ cat <<-EOT > $file;
+ LOCAL_CONFIG
+ #------------------------------------------------------------
+ #
+ # Dynamic updates from $0
+ #
+ # NOTE: the following line *MUST* be in /etc/mail/sendmail.mc
+ dnl include(\`/etc/mail/provider.m4')dnl
+ #
+ # Provider information from /etc/mail/peers/$provider
+ EOT
+ cat /etc/mail/peers/$provider >> $file;
+ cat <<-EOT >> $file;
+ #------------------------------------------------------------
+ EOT
+ fi;
+#exit 0
+
+# Build a new sendmail.cf from sendmail.mc, including our address.
+# NOTE: The following lines (without the #) must be in /etc/mail/sendmail.mc:
+# include(`/etc/mail/dialup.m4')dnl
+# include(`/etc/mail/provider.m4')dnl
+m4 /etc/mail/sendmail.mc \
+ > /etc/mail/sendmail.cf.pnew;
+chmod 0644 /etc/mail/sendmail.cf.pnew;
+chown mail:mail /etc/mail/sendmail.cf.pnew;
+mv -f /etc/mail/sendmail.cf.pnew /etc/mail/sendmail.cf;
+
+# Purge any latent host status that might cause us to *NOT* send mail
+AM='-Am';
+if [ ! -f /usr/share/sendmail/cf/feature/msp.m4 ]; then
+ AM='';
+ fi;
+sendmail $AM -bH -O Timeout.hoststatus=1s;
+
+# Start/reload sendmail as needed
+/etc/init.d/sendmail reload; # may be up, or down
+
+# Process the sendmail queue (background so as to not defer other ip-up work)
+runq &
diff --git a/debian/examples/ldap/sendmail.schema.v1 b/debian/examples/ldap/sendmail.schema.v1
new file mode 100644
index 0000000..a1cf73e
--- /dev/null
+++ b/debian/examples/ldap/sendmail.schema.v1
@@ -0,0 +1,60 @@
+# Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+# 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.
+#
+# $Id: sendmail.schema,v 8.6 2001/02/14 05:03:22 gshapiro Exp $
+#
+# sendmail specific schemas
+#
+
+attribute sendmailMTAMapName cis
+attribute sendmailMTAMapHost cis
+attribute sendmailMTAMapDescription cis
+
+attribute sendmailMTAMapKey cis
+attribute sendmailMTAMapValue cis
+attribute sendmailMTAMapObjectDescription cis
+
+objectClass sendmailMTAMap
+ requires
+ objectClass,
+ sendmailMTAMapName,
+ sendmailMTAMapHost,
+ allows
+ sendmailMTAMapDescription
+
+objectClass sendmailMTAMapObject
+ requires
+ objectClass,
+ sendmailMTAMapKey,
+ sendmailMTAMapValue
+ allows
+ sendmailMTAMapObjectDescription
+
+#
+# The default aliases LDAP schema is used when the AliasFile option is set
+# to something like:
+#
+# O AliasFile=ldap:
+#
+# That schema is simply:
+#
+
+attribute sendmailMTAAliasHost cis
+attribute sendmailMTAAliasDescription cis
+
+attribute sendmailMTAAliasKey cis
+attribute sendmailMTAAliasValue cis
+
+objectClass sendmailMTAAlias
+ requires
+ objectClass,
+ sendmailMTAAliasHost,
+ sendmailMTAAliasKey,
+ sendmailMTAAliasValue
+ allows
+ sendmailMTAAliasDescription
+
diff --git a/debian/examples/ldap/sendmail.schema.v2 b/debian/examples/ldap/sendmail.schema.v2
new file mode 100644
index 0000000..bab47e8
--- /dev/null
+++ b/debian/examples/ldap/sendmail.schema.v2
@@ -0,0 +1,216 @@
+# Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+# 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.
+#
+# $Id: sendmail.schema,v 8.14 2001/08/31 17:18:18 gshapiro Exp $
+
+# Note that this schema is experimental at this point as it has had little
+# public review. Therefore, it may change in future versions. Feedback
+# via sendmail@sendmail.org is encouraged.
+
+# OID arcs for Sendmail
+# enterprise: 1.3.6.1.4.1
+# sendmail: enterprise.6152
+# sendmail-at: sendmail.3.1
+# sendmail-oc: sendmail.3.2
+
+###########################################################################
+#
+# The Sendmail MTA attributes and objectclass
+#
+###########################################################################
+
+# attribute sendmailMTACluster cis
+attributetype ( 1.3.6.1.4.1.6152.10.3.1.10
+ NAME 'sendmailMTACluster'
+ DESC 'cluster name associated with a set of MTAs'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
+
+# attribute sendmailMTAHost cis
+attributetype ( 1.3.6.1.4.1.6152.10.3.1.11
+ NAME 'sendmailMTAHost'
+ DESC 'host name associated with a MTA cluster'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
+
+#objectClass sendmailMTA
+# requires
+# objectClass
+# allows
+# sendmailMTACluster,
+# sendmailMTAHost,
+# Description
+
+objectclass ( 1.3.6.1.4.1.6152.10.3.2.10
+ NAME 'sendmailMTA'
+ SUP top STRUCTURAL
+ DESC 'Sendmail MTA definition'
+ MAY ( sendmailMTACluster $ sendmailMTAHost $ Description ) )
+
+###########################################################################
+#
+# The Sendmail MTA shared attributes
+#
+###########################################################################
+
+# attribute sendmailMTAKey cis
+attributetype ( 1.3.6.1.4.1.6152.10.3.1.13
+ NAME 'sendmailMTAKey'
+ DESC 'key (left hand side) of an aliases or map entry'
+ EQUALITY caseIgnoreMatch
+ SUBSTR caseIgnoreSubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )
+
+###########################################################################
+#
+# The Sendmail MTA Map attributes and objectclasses
+#
+###########################################################################
+
+# attribute sendmailMTAMapName cis
+attributetype ( 1.3.6.1.4.1.6152.10.3.1.14
+ NAME 'sendmailMTAMapName'
+ DESC 'identifier for the particular map'
+ EQUALITY caseIgnoreMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE )
+
+# attribute sendmailMTAMapValue cis
+attributetype ( 1.3.6.1.4.1.6152.10.3.1.16
+ NAME 'sendmailMTAMapValue'
+ DESC 'value (right hand side) of a map entry'
+ EQUALITY caseIgnoreMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
+
+#objectClass sendmailMTAMap
+# requires
+# objectClass,
+# sendmailMTAMapName,
+# allows
+# sendmailMTACluster,
+# sendmailMTAHost,
+# Description
+
+objectclass ( 1.3.6.1.4.1.6152.10.3.2.11
+ NAME 'sendmailMTAMap'
+ SUP sendmailMTA STRUCTURAL
+ DESC 'Sendmail MTA map definition'
+ MUST sendmailMTAMapName
+ MAY ( sendmailMTACluster $ sendmailMTAHost $ Description ) )
+
+#objectClass sendmailMTAObject
+# requires
+# objectClass,
+# sendmailMTAMapName,
+# sendmailMTAKey,
+# sendmailMTAMapValue,
+# allows
+# sendmailMTACluster,
+# sendmailMTAHost,
+# Description
+
+objectclass ( 1.3.6.1.4.1.6152.10.3.2.12
+ NAME 'sendmailMTAMapObject'
+ SUP sendmailMTAMap STRUCTURAL
+ DESC 'Sendmail MTA map object'
+ MUST ( sendmailMTAMapName $ sendmailMTAKey $ sendmailMTAMapValue )
+ MAY ( sendmailMTACluster $ sendmailMTAHost $ Description ) )
+
+
+###########################################################################
+#
+# The Sendmail MTA Alias attributes and objectclasses
+#
+###########################################################################
+
+# attribute sendmailMTAAliasGrouping cis
+attributetype ( 1.3.6.1.4.1.6152.10.3.1.18
+ NAME 'sendmailMTAAliasGrouping'
+ DESC 'name that identifies a particular aliases grouping'
+ EQUALITY caseIgnoreMatch
+ SUBSTR caseIgnoreSubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
+
+# attribute sendmailMTAAliasValue cis
+attributetype ( 1.3.6.1.4.1.6152.10.3.1.20
+ NAME 'sendmailMTAAliasValue'
+ DESC 'value (right hand side) of an alias'
+ EQUALITY caseIgnoreMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
+
+#objectClass sendmailMTAAlias
+# requires
+# objectClass,
+# allows
+# sendmailMTAAliasGrouping,
+# sendmailMTACluster,
+# sendmailMTAHost,
+# Description
+
+objectclass ( 1.3.6.1.4.1.6152.10.3.2.13
+ NAME 'sendmailMTAAlias'
+ SUP sendmailMTA STRUCTURAL
+ DESC 'Sendmail MTA alias definition'
+ MAY ( sendmailMTAAliasGrouping $
+ sendmailMTACluster $ sendmailMTAHost $ Description ) )
+
+#objectClass sendmailMTAAliasObject
+# requires
+# objectClass,
+# sendmailMTAKey,
+# sendmailMTAAliasValue,
+# allows
+# sendmailMTAAliasGrouping,
+# sendmailMTACluster,
+# sendmailMTAHost,
+# Description
+
+objectclass ( 1.3.6.1.4.1.6152.10.3.2.14
+ NAME 'sendmailMTAAliasObject'
+ SUP sendmailMTAAlias STRUCTURAL
+ DESC 'Sendmail MTA alias object'
+ MUST ( sendmailMTAKey $ sendmailMTAAliasValue )
+ MAY ( sendmailMTAAliasGrouping $
+ sendmailMTACluster $ sendmailMTAHost $ Description ) )
+
+###########################################################################
+#
+# The Sendmail MTA Class attributes and objectclass
+#
+###########################################################################
+
+# attribute sendmailMTAClassName cis
+attributetype ( 1.3.6.1.4.1.6152.10.3.1.22
+ NAME 'sendmailMTAClassName'
+ DESC 'identifier for the class'
+ EQUALITY caseIgnoreMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE )
+
+# attribute sendmailMTAClassValue cis
+attributetype ( 1.3.6.1.4.1.6152.10.3.1.23
+ NAME 'sendmailMTAClassValue'
+ DESC 'member of a class'
+ EQUALITY caseIgnoreMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
+
+#objectClass sendmailMTAClass
+# requires
+# objectClass,
+# sendmailMTAClassName,
+# sendmailMTAClassValue,
+# allows
+# sendmailMTACluster,
+# sendmailMTAHost,
+# Description
+
+objectclass ( 1.3.6.1.4.1.6152.10.3.2.15
+ NAME 'sendmailMTAClass'
+ SUP sendmailMTA STRUCTURAL
+ DESC 'Sendmail MTA class definition'
+ MUST ( sendmailMTAClassName $ sendmailMTAClassValue )
+ MAY ( sendmailMTACluster $ sendmailMTAHost $ Description ) )
diff --git a/debian/examples/logcheck/ignore.d.paranoid/sendmail b/debian/examples/logcheck/ignore.d.paranoid/sendmail
new file mode 100644
index 0000000..e0781dd
--- /dev/null
+++ b/debian/examples/logcheck/ignore.d.paranoid/sendmail
@@ -0,0 +1,21 @@
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: starting daemon
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: restarting
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: rejecting connections on daemon
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: accepting connections again for daemon
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* User unknown
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: alias database .* rebuilt
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* aliases, longest
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: from=
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: split:
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* lost input channel
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* message-id=
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* return to sender
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* stat=
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* timeout waiting
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: Milter add:
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: Milter: data, discard
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: discarded
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: AUTH=
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: (PLAIN|CRAM-MD5|DIGEST-MD5) set secret
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: DIGEST-MD5: failed .* later in exchange
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: STARTTLS=(server|client), .* verify=(OK|NO)
diff --git a/debian/examples/logcheck/ignore.d.server/sendmail b/debian/examples/logcheck/ignore.d.server/sendmail
new file mode 100644
index 0000000..dfc4984
--- /dev/null
+++ b/debian/examples/logcheck/ignore.d.server/sendmail
@@ -0,0 +1,21 @@
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: starting daemon
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: restarting
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: rejecting connections on daemon
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: accepting connections again for daemon
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* User unknown
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: alias database .* rebuilt
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* aliases, longest
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: from=
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: split:
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* lost input channel
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* message-id=
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* return to sender
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* stat=
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* timeout waiting
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: Milter add:
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: Milter: data, discard
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: discarded
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: AUTH=
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: (PLAIN|CRAM-MD5|DIGEST-MD5) set secret
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: DIGEST-MD5: failed .* later in exchange
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: STARTTLS=(server|client), .* verify=(OK|NO)
diff --git a/debian/examples/logcheck/ignore.d.workstation/sendmail b/debian/examples/logcheck/ignore.d.workstation/sendmail
new file mode 100644
index 0000000..2374b71
--- /dev/null
+++ b/debian/examples/logcheck/ignore.d.workstation/sendmail
@@ -0,0 +1,21 @@
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: starting daemon
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: restarting
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: rejecting connections on daemon
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: accepting connections again for daemon
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* User unknown
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: alias database .* rebuilt
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* aliases, longest
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: from=
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: split:
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* lost input channel
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* message-id=
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* return to sender
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* stat=
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* timeout waiting
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: Milter add:
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: Milter: data, discard
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: discarded
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: AUTH=
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: (PLAIN|CRAM-MD5|DIGEST-MD5) set secret
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: DIGEST-MD5: failed .* later in exchange
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: STARTTLS=
diff --git a/debian/examples/logcheck/violations.ignore.d/logcheck-sendmail b/debian/examples/logcheck/violations.ignore.d/logcheck-sendmail
new file mode 100644
index 0000000..9518e7d
--- /dev/null
+++ b/debian/examples/logcheck/violations.ignore.d/logcheck-sendmail
@@ -0,0 +1,12 @@
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: alias database .* rebuilt
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*stat=(Refused|Deferred)
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: gethostbyaddr\(.*\) failed:
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: rejecting connections on daemon
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: DIGEST-MD5: failed .* later in exchange
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=450 4\.7\.1 <[^>]+>... Relaying temporarily denied. Cannot resolve PTR record for [0-9\.]+$
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=451 4\.1\.8 Domain of sender address [^ ]+ does not resolve$
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=550 5\.7\.1 Access denied$
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=550 5\.7\.1 <[^>]+>... Relaying denied. Proper authentication required.$
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=550 5\.7\.1 <[^>]+>... Relaying denied. IP name lookup failed \[[0-9\.]+\]$
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=550 5\.7\.1 <[^>]+>... Relaying denied. IP name lookup possibly forged \[[0-9\.]+\]$
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=553 5\.1\.8 <[^>]+>... Relaying temporarily denied. Cannot resolve PTR record for [0-9\.]+$
diff --git a/debian/examples/logcheck/violations.ignore.d/sendmail b/debian/examples/logcheck/violations.ignore.d/sendmail
new file mode 100644
index 0000000..9518e7d
--- /dev/null
+++ b/debian/examples/logcheck/violations.ignore.d/sendmail
@@ -0,0 +1,12 @@
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: alias database .* rebuilt
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*stat=(Refused|Deferred)
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: gethostbyaddr\(.*\) failed:
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: rejecting connections on daemon
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: DIGEST-MD5: failed .* later in exchange
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=450 4\.7\.1 <[^>]+>... Relaying temporarily denied. Cannot resolve PTR record for [0-9\.]+$
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=451 4\.1\.8 Domain of sender address [^ ]+ does not resolve$
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=550 5\.7\.1 Access denied$
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=550 5\.7\.1 <[^>]+>... Relaying denied. Proper authentication required.$
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=550 5\.7\.1 <[^>]+>... Relaying denied. IP name lookup failed \[[0-9\.]+\]$
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=550 5\.7\.1 <[^>]+>... Relaying denied. IP name lookup possibly forged \[[0-9\.]+\]$
+(sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=553 5\.1\.8 <[^>]+>... Relaying temporarily denied. Cannot resolve PTR record for [0-9\.]+$
diff --git a/debian/examples/milter/Makefile b/debian/examples/milter/Makefile
new file mode 100644
index 0000000..69f5e93
--- /dev/null
+++ b/debian/examples/milter/Makefile
@@ -0,0 +1,25 @@
+#!/usr/bin/make -f
+SHELL= /bin/sh
+
+# Define standard compile/install flags
+CC = gcc
+CFLAGS = -O2 -Wall
+INSTALL = install
+INCLS = -I.
+DEFS =
+CFLAGS += $(DEFS) $(INCLS)
+LDFLAGS =
+LIBS = /usr/lib/libmilter/libmilter.a \
+ /usr/lib/libmilter/libsm.a \
+ -lldap -llber \
+ -lbind \
+ -pthread
+
+all: sample
+
+sample: sample.c
+ @rm -f $@
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $? $(LIBS)
+
+clean:
+ rm -rf sample *~
diff --git a/debian/examples/milter/sample.c b/debian/examples/milter/sample.c
new file mode 100644
index 0000000..4e063ad
--- /dev/null
+++ b/debian/examples/milter/sample.c
@@ -0,0 +1,236 @@
+
+/* A trivial filter that logs all email to a file. */
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sysexits.h>
+#include <unistd.h>
+
+#include "libmilter/mfapi.h"
+#include "strl.h" /*RAN*/
+
+typedef int bool;
+
+#ifndef FALSE
+# define FALSE 0
+#endif /* ! FALSE*/
+#ifndef TRUE
+# define TRUE 1
+#endif /* ! TRUE*/
+
+struct mlfiPriv
+{
+ char *mlfi_fname;
+ FILE *mlfi_fp;
+};
+
+#define MLFIPRIV ((struct mlfiPriv *) smfi_getpriv(ctx))
+
+extern sfsistat mlfi_cleanup(SMFICTX *, bool);
+
+sfsistat
+mlfi_envfrom(ctx, envfrom)
+ SMFICTX *ctx;
+ char **envfrom;
+{
+ struct mlfiPriv *priv;
+ int fd;
+
+ /* allocate some private memory */
+ priv = malloc(sizeof *priv);
+ if (priv == NULL)
+ {
+ /* can't accept this message right now */
+ return SMFIS_TEMPFAIL;
+ }
+ memset(priv, '\0', sizeof *priv);
+
+ /* open a file to store this message */
+ priv->mlfi_fname = strdup("/tmp/msg.XXXXXXXX");
+ if (priv->mlfi_fname == NULL)
+ {
+ free(priv);
+ return SMFIS_TEMPFAIL;
+ }
+ if ((fd = mkstemp(priv->mlfi_fname)) < 0 ||
+ (priv->mlfi_fp = fdopen(fd, "w+")) == NULL)
+ {
+ free(priv->mlfi_fname);
+ free(priv);
+ return SMFIS_TEMPFAIL;
+ }
+
+ /* save the private data */
+ smfi_setpriv(ctx, priv);
+
+ /* continue processing */
+ return SMFIS_CONTINUE;
+}
+
+sfsistat
+mlfi_header(ctx, headerf, headerv)
+ SMFICTX *ctx;
+ char *headerf;
+ char *headerv;
+{
+ /* write the header to the log file */
+ fprintf(MLFIPRIV->mlfi_fp, "%s: %s\r\n", headerf, headerv);
+
+ /* continue processing */
+ return SMFIS_CONTINUE;
+}
+
+sfsistat
+mlfi_eoh(ctx)
+ SMFICTX *ctx;
+{
+ /* output the blank line between the header and the body */
+ fprintf(MLFIPRIV->mlfi_fp, "\r\n");
+
+ /* continue processing */
+ return SMFIS_CONTINUE;
+}
+
+sfsistat
+mlfi_body(ctx, bodyp, bodylen)
+ SMFICTX *ctx;
+ u_char *bodyp;
+ size_t bodylen;
+{
+ /* output body block to log file */
+ if (fwrite(bodyp, bodylen, 1, MLFIPRIV->mlfi_fp) <= 0)
+ {
+ /* write failed */
+ (void) mlfi_cleanup(ctx, FALSE);
+ return SMFIS_TEMPFAIL;
+ }
+
+ /* continue processing */
+ return SMFIS_CONTINUE;
+}
+
+sfsistat
+mlfi_eom(ctx)
+ SMFICTX *ctx;
+{
+ return mlfi_cleanup(ctx, TRUE);
+}
+
+sfsistat
+mlfi_close(ctx)
+ SMFICTX *ctx;
+{
+ return SMFIS_ACCEPT;
+}
+
+sfsistat
+mlfi_abort(ctx)
+ SMFICTX *ctx;
+{
+ return mlfi_cleanup(ctx, FALSE);
+}
+
+sfsistat
+mlfi_cleanup(ctx, ok)
+ SMFICTX *ctx;
+ bool ok;
+{
+ sfsistat rstat = SMFIS_CONTINUE;
+ struct mlfiPriv *priv = MLFIPRIV;
+ char *p;
+ char host[512];
+ char hbuf[1024];
+
+ if (priv == NULL)
+ return rstat;
+
+ /* close the archive file */
+ if (priv->mlfi_fp != NULL && fclose(priv->mlfi_fp) == EOF)
+ {
+ /* failed; we have to wait until later */
+ rstat = SMFIS_TEMPFAIL;
+ (void) unlink(priv->mlfi_fname);
+ }
+ else if (ok)
+ {
+ /* add a header to the message announcing our presence */
+ if (gethostname(host, sizeof host) < 0)
+ strlcpy(host, "localhost", sizeof host);
+ p = strrchr(priv->mlfi_fname, '/');
+ if (p == NULL)
+ p = priv->mlfi_fname;
+ else
+ p++;
+ snprintf(hbuf, sizeof hbuf, "%s@%s", p, host);
+ smfi_addheader(ctx, "X-Archived", hbuf);
+ }
+ else
+ {
+ /* message was aborted -- delete the archive file */
+ (void) unlink(priv->mlfi_fname);
+ }
+
+ /* release private memory */
+ free(priv->mlfi_fname);
+ free(priv);
+ smfi_setpriv(ctx, NULL);
+
+ /* return status */
+ return rstat;
+}
+
+struct smfiDesc smfilter =
+{
+ "SampleFilter", /* filter name */
+ SMFI_VERSION, /* version code -- do not change */
+ SMFIF_ADDHDRS, /* flags */
+ NULL, /* connection info filter */
+ NULL, /* SMTP HELO command filter */
+ mlfi_envfrom, /* envelope sender filter */
+ NULL, /* envelope recipient filter */
+ mlfi_header, /* header filter */
+ mlfi_eoh, /* end of header */
+ mlfi_body, /* body block filter */
+ mlfi_eom, /* end of message */
+ mlfi_abort, /* message aborted */
+ mlfi_close /* connection cleanup */
+};
+
+
+int
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+ int c;
+ const char *args = "p:";
+
+ /* Process command line options */
+ while ((c = getopt(argc, argv, args)) != -1)
+ {
+ switch (c)
+ {
+ case 'p':
+ if (optarg == NULL || *optarg == '\0')
+ {
+ (void) fprintf(stderr, "Illegal conn: %s\n",
+ optarg);
+ exit(EX_USAGE);
+ }
+ (void) smfi_setconn(optarg);
+ break;
+
+ }
+ }
+ if (smfi_register(smfilter) == MI_FAILURE)
+ {
+ fprintf(stderr, "smfi_register failed\n");
+ exit(EX_UNAVAILABLE);
+ }
+ return smfi_main();
+}
+
+/* eof */
+
diff --git a/debian/examples/milter/strl.h b/debian/examples/milter/strl.h
new file mode 100644
index 0000000..f3c8cdb
--- /dev/null
+++ b/debian/examples/milter/strl.h
@@ -0,0 +1,17 @@
+/*-------------------------------------------------------------------*/
+/* strl.h: include file for functions in strl.c */
+/* buried in the bottom of include/sendmail/sendmail.h */
+/* extracted and placed herein. */
+/* */
+/* referenced by: ./sample.c */
+/* defined by: /usr/lib/libmilter/libsm.a */
+/* */
+/* Richard Nelson <cowboy@debian.org> */
+/*-------------------------------------------------------------------*/
+
+#define strlcpy sm_strlcpy
+#define strlcat sm_strlcat
+
+extern size_t sm_strlcpy __P((char *, const char *, size_t));
+extern size_t sm_strlcat __P((char *, const char *, size_t));
+
diff --git a/debian/examples/pam/smtp b/debian/examples/pam/smtp
new file mode 100644
index 0000000..645535c
--- /dev/null
+++ b/debian/examples/pam/smtp
@@ -0,0 +1,14 @@
+#%PAM-1.0
+#------------------------------------------------------------------------
+#
+# /etc/pam.d/smtp
+#
+# Copyright (c) 2000-2001 Richard Nelson. All Rights Reserved.
+# Version: 2.0.0
+# Time-stamp: <2001/05/29 12:00:00 cowboy>
+#
+# PAM configuration file used by SASL to authenticate a PLAIN password.
+#
+#------------------------------------------------------------------------
+#auth sufficient pam_ldap.so
+auth required pam_unix.so nullok try_first_pass
diff --git a/debian/examples/sasl/Sendmail.conf b/debian/examples/sasl/Sendmail.conf
new file mode 100644
index 0000000..b41887b
--- /dev/null
+++ b/debian/examples/sasl/Sendmail.conf
@@ -0,0 +1,18 @@
+#Currently configurable parameters:
+#- srvtab (for KERBEROS_V4): [/etc/srvtab] path
+# where to find the srvtab
+#
+#- pwcheck_method: [PAM] one of {PAM, kerberos_v4, passwd, shadow, sasldb}
+# how to check plaintext passwords.
+#
+#- auto_transition: [false]
+# if true, automatically add secrets to the secret database when
+# PLAIN or check_password is used, so in the future the user can
+# use the more secure mechanisms.
+#
+#*** For a more detailed guide on configuring SASL, please look at
+#doc/sysadmin.html.
+#
+#pwcheck_method: sasldb
+pwcheck_method: PAM
+auto_transition: true
diff --git a/debian/examples/sasl/saslpasswd.conf b/debian/examples/sasl/saslpasswd.conf
new file mode 100644
index 0000000..dfcc7b7
--- /dev/null
+++ b/debian/examples/sasl/saslpasswd.conf
@@ -0,0 +1,17 @@
+#Currently configurable parameters:
+#- srvtab (for KERBEROS_V4): [/etc/srvtab] path
+# where to find the srvtab
+#
+#- pwcheck_method: [PAM] one of {PAM, kerberos_v4, passwd, shadow, sasldb}
+# how to check plaintext passwords.
+#
+#- auto_transition: [false]
+# if true, automatically add secrets to the secret database when
+# PLAIN or check_password is used, so in the future the user can
+# use the more secure mechanisms.
+#
+#*** For a more detailed guide on configuring SASL, please look at
+#doc/sysadmin.html.
+#
+pwcheck_method: sasldb
+auto_transition: true
diff --git a/debian/faq.txt b/debian/faq.txt
index 89504a8..7907d48 100644
--- a/debian/faq.txt
+++ b/debian/faq.txt
@@ -1,33 +1,31 @@
sendmail.org
-
- Sendmail
- Frequently Asked Questions (FAQ)
-
- Last updated September 9, 1999
-
+
+Sendmail
+Frequently Asked Questions (FAQ)
+
+ Last updated March 3, 2003
+
Comments and questions on this FAQ should be directed to
sendmail+faq@sendmail.org.
General questions about sendmail should be directed to
sendmail-questions@sendmail.org.
Bug reports should be directed to sendmail-bugs@sendmail.org.
- Questions and comments about this web site should be directed to
- sendmail-www@sendmail.org.
-
+
If you post a message to comp.mail.sendmail and send it to one of the
above addresses, please clearly indicate so at the top of your
message.
_________________________________________________________________
-
+
Top 5 - the most frequently asked questions about sendmail
1. Local config error: see 4.5
- 2. Y2K: see 4.11
- 3. Relaying denied: see 3.27
- 4. Directory permissions: see 3.33
- 5. Virtual hosting: see 3.7 & 3.28
+ 2. Relaying denied: see 3.27
+ 3. Directory permissions: see 3.33
+ 4. Virtual hosting: see 3.7 & 3.28
+ 5. POP / IMAP: see 4.19
_________________________________________________________________
-
+
Table of Contents
* 0. Plain-text version now available.
@@ -56,12 +54,12 @@ Table of Contents
host?
+ 3.2 How do I rewrite my "From:" lines to read
``First_Last@My.Domain'' or ``Different_Name@My.Domain''?
- + 3.3 Why are you so hostile to using full names for email
- addresses?
+ + 3.3 But what about fully-qualified addresses, such as those
+ from Pine or FEATURE(always_add_domain)?
+ 3.4 So what was the user database feature intended for?
- + 3.5 Where do I find this user database (UserDB) code?
- + 3.6 How do I get the user database to work with Pine or with
- FEATURE(always_add_domain)?
+ + 3.5 Why the hostility toward using full names for email
+ addresses?
+ + 3.6 deprecated
+ 3.7 How do I manage several (virtual) domains?
+ 3.8 There are four UUCP mailers listed in the configuration
files. Which one should I use?
@@ -87,7 +85,7 @@ Table of Contents
+ 3.20 Why can't I get mail to some places, but instead always
get the error "reply: read error from name.of.remote.host"?
+ 3.21 Why doesn't "FEATURE(xxx)" work?
- + 3.22 How do I configure sendmail to not use DNS?
+ + 3.22 How do I configure sendmail not to use DNS?
+ 3.23 How do I get all my queued mail delivered to my Unix box
from my ISP?
+ 3.24 Why do I get the error message unable to write
@@ -108,6 +106,24 @@ Table of Contents
relaxing the DontBlameSendmail option?
+ 3.33 How do I configure my system in general with sendmail
8.9?
+ + 3.34 What does "foo not available for sendmail programs"
+ mean?
+ + 3.35 How do I add a footer/signature to all (outgoing) e-mail
+ messages?
+ + 3.36 What does "Cannot open hash database ... Invalid
+ argument" mean?
+ + 3.37 What does "parse error before `NDBM'" mean?
+ + 3.38 What does "may be forged" mean?
+ + 3.39 How do I send using an alternate port?
+ + 3.40 Why can't I use BerkeleyDB 4.1.x?
+ + 3.41 How do I use CIDR notation in the access map (or other
+ places)?
+ + 3.42 Why isn't CIDR notation directly supported by sendmail?
+ + 3.43 What does "Need to recompile with -DNEWDB for hash
+ support" mean?
+ + 3.44 I disabled sendmail on some machines which don't receive
+ mail, but since upgrading to 8.12 they can't send mail
+ either; why?
* 4. GENERAL SENDMAIL ISSUES
+ 4.1 Should I use a wildcard MX for my domain?
+ 4.2 How can I set up an auto-responder?
@@ -133,6 +149,13 @@ Table of Contents
+ 4.14 How do I queue mail for another domain?
+ 4.15 How do I create attachments with sendmail?
+ 4.16 How do I find sendmail's version number?
+ + 4.17 How do I handle user names with upper-case characters?
+ + 4.18 What does "NOQUEUE: Null connection from ..." mean?
+ + 4.19 How do I configure sendmail for POP/IMAP/... ?
+ + 4.20 How can I automatically copy messages based on sender or
+ recipient addresses?
+ + 4.21 How can I send mail to all users?
+ + 4.22 Why can't I receive external mail?
* 5. VENDOR/OS SPECIFIC SENDMAIL ISSUES
+ 5.1 Sun Microsystems SunOS/Solaris 1.x/2.x
o 5.1.1 How can I solve "line 273: replacement $3 out of
@@ -151,6 +174,18 @@ Table of Contents
o 5.2.2 Why can't I use AIX to get email to some sites?
o 5.2.3 Why can't I get sendmail 8.7.1 to use MX records
with AIX 3.2.5?
+ + 5.3 Linux
+ o 5.3.1 Red Hat
+ # 5.3.1.1 Why do I have so many sendmail problems
+ after configuring sendmail with linuxconf?
+ # 5.3.1.2 I built sendmail.cf from sendmail.mc and it
+ works until the next reboot of the machine. What is
+ going on?
+ # 5.3.1.3 Why can't I receive mail with Red Hat 7.1
+ and later?
+ o 5.3.2 SuSE
+ # 5.3.2.1 Where is the sendmail.mc file on SuSE
+ Linux?
* 6. ADDITIONAL INFORMATION SOURCES (RFC 1807 bibliography format)
+ 6.1 Reference material devoted exclusively to sendmail
+ 6.2 Reference material with chapters or sections on sendmail
@@ -161,14 +196,14 @@ Table of Contents
+ 6.7 Online archives of mailing lists and Usenet newsgroups,
relating to Internet email
* 7. THANKS!
-
- home
+
+ home
sendmail.org 1. COPYRIGHT NOTICE / REDISTRIBUTION REQUIREMENTS
-
- The entire contents of this document are copyright 1997 - 1998 by the
+
+ The entire contents of this document are copyright 1997 - 2000 by the
Sendmail Consortium, all rights reserved.
-
+
This document may be freely distributed for non-profit purposes
(including, but not limited to: posting to mailing lists, Usenet
newsgroups, and world-wide-web pages; inclusion on CD-ROM or other
@@ -178,7 +213,7 @@ Table of Contents
editing, changes, deletions, or additions. Non-profit redistribution
in accordance with these guidelines does not require contact with or
approval from the copyright holder.
-
+
Redistribution of this document for profit without express prior
permission is not allowed. At the very least, expect to provide the
copyright holder a free copy of the product (exactly as it would be
@@ -186,19 +221,19 @@ Table of Contents
the gross revenue from said product and sufficient proof that the
integrity and completeness requirements set for non-profit
distribution will be met.
-
+
In the event that the copyright holder discovers a redistributed
version that is not in compliance with the above requirements, he will
make a good-faith effort to get it corrected or removed, and failing
that, at least note its deprecated status in a new version. Legal
action will likely be taken against redistribution for profit that is
not in compliance with the above requirements.
-
+
sendmail.org
-
+
2. INTRODUCTION / MISCELLANEOUS
-
+
* 2.1 What is this newsgroup?
* 2.2 What is the scope of this FAQ?
* 2.3 Where can I find the latest version of this FAQ?
@@ -218,16 +253,16 @@ Table of Contents
* 2.16 Why won't db 1.85 build on my machine?
* 2.17 What is makemap and where can I get it?
_________________________________________________________________
-
+
Q2.1 -- What is this newsgroup?
Date: May 28, 1996
-
+
The Usenet newsgroup comp.mail.sendmail is dedicated to the discussion
of the program named "sendmail" in all its various forms. It is most
commonly found on computers running a flavor of the Operating System
known as Unix, or derived from Unix.
-
+
This program has been ported to other OSes, but those versions have
typically been ported by a particular vendor and are considered
proprietary. There are many versions of sendmail, but the original
@@ -235,7 +270,7 @@ Q2.1 -- What is this newsgroup?
typically referred to as "Version Eight" or sometimes just "V8". This
is considered by many to be the One True Version. This is also the
version that this FAQ is centered around.
-
+
If you have a question that amounts to "How do I send mail to my
friend?", then you're in the wrong newsgroup. You should first check
with your System or E-Mail Administrator(s), BBS SysOp(s), etc...
@@ -246,7 +281,7 @@ Q2.1 -- What is this newsgroup?
your System or E-Mail Administrator(s), BBS SysOp(s), etc.... If
asking them doesn't do you any good, make sure you read this FAQ and
the other mail-related FAQs at the archive sites listed below.
-
+
If you have a question about another program similar to sendmail
(technically referred to as an "SMTP MTA"), an SMTP Gateway package,
or a LAN email package, then you should see if there is another group
@@ -260,7 +295,7 @@ Q2.1 -- What is this newsgroup?
already addressed in one of the mail-related FAQs or other available
documentation. See the IMC website (more info below) for a good list
of mail-related FAQs.
-
+
If you have a question about an older or vendor-proprietary version of
sendmail, be prepared for a lot of answers that amount to "Get V8".
Version 8 isn't a panacea, but it does solve many problems known to
@@ -268,7 +303,7 @@ Q2.1 -- What is this newsgroup?
make it much easier to administer large or complex sites. In many
cases, it makes at least possible what was previously virtually
impossible, and relatively easy the previously difficult.
-
+
There are, of course, many alternative programs that have sprung up in
an attempt to answer one or another weakness or perceived fault of
sendmail, but so far, none of them have had the kind of success it
@@ -280,11 +315,11 @@ Q2.1 -- What is this newsgroup?
where that sort of thing is acceptable (or even the norm, such as a
comp.mail.advocacy or news:comp.mail.mta.advocacy newsgroup).
_________________________________________________________________
-
+
Subject: Q2.2 -- What is the scope of this FAQ?
Date: April 9, 1997
-
+
This FAQ is strongly centered around version 8 sendmail, for many
reasons. First and foremost, this is the area of most interest on the
part of the maintainers of this FAQ. Secondly, version 8 is where most
@@ -292,106 +327,106 @@ Subject: Q2.2 -- What is the scope of this FAQ?
sendmail is also the best documented of all SMTP MTAs, by virtue of
the book by Bryan Costales (see entry
sendmail-faq//book/ISBN/1-56592-222-0 in Q6.1).
-
+
Other versions of sendmail get mentioned in passing, and some
interesting interactions between version 8 and various OSes is also
covered.
-
+
This FAQ is aimed primarily at the experienced Unix System
Administrator/Postmaster/DNS Domain Administrator. If you're looking
for introductory texts, see the references in Q6.1.
_________________________________________________________________
-
+
Q2.3 -- Where can I find the latest version of this FAQ?
Date: February 20, 1998
-
+
We post changes as they occur to the sendmail FAQ support page at
http://www.sendmail.org/faq/.
_________________________________________________________________
-
+
Q2.4 -- How do I access comp.mail.sendmail by email?
Date: November 24, 1996
-
+
Send email to mxt@dl.ac.uk with the command "sub
comp-news.comp.mail.sendmail full-US-ordered-email-address" as the
body of the message (with your correct address in place of the
"full-US-ordered-email-address", and omitting the double quotes in all
cases of this example).
-
+
E-mail you want posted on comp.mail.sendmail should be sent to
comp-mail-sendmail@dl.ac.uk
_________________________________________________________________
-
+
Q2.5 -- Where can I ask email-related DNS questions?
Date: March 23, 1996
-
+
Depending on how deeply they get into the DNS, they can be asked here.
However, you'll probably be told that you should send them to the
Usenet newsgroup comp.protocols.tcp-ip.domains (DNS in general) or to
the Info-BIND mailing list (if the question is specific to that
program).
_________________________________________________________________
-
+
Q2.6 -- How can I subscribe to these?
Date: June 19, 1997
-
+
For comp.protocols.tcp-ip.domains, you have to be on Usenet. They
don't have a news-to-mail gateway yet (I'm working on this), but they
do have a FAQ.
-
+
Questions from all levels of experience can be found on this newsgroup
(as well as people to answer them), so don't be shy about asking a
question you think may be too simple.
-
+
Some more information from the BIND 8.1 src/README file:
-
+
CAPTION: Kits, Questions, Comments, and Bug Reports
-
+
URL Purpose
ftp.isc.org/isc/bind/src/cur current non-test release
ftp.isc.org/isc/bind/src/testing latest public test kit
_________________________________________________________________
-
+
comp.protocols.dns.bind using BIND
comp.protocols.dns.ops DNS operations in general
comp.protocols.dns.std DNS standards in general
_________________________________________________________________
-
+
bind-users-request@vix.com gw'd to c.p.d.bind
namedroppers-request@internic.net gw'd to c.p.d.std
bind-workers-request@vix.com code warriors only please
_________________________________________________________________
-
+
www.isc.org/bind.html the BIND home page
bind-bugs@isc.org bug reports
_________________________________________________________________
-
+
Q2.7 -- Which version of sendmail should I run?
Date: April 8, 1997
- Updated: October 8, 1998
-
+ Updated: March 7, 2000
+
If you're concerned at all about the security of your machines, you
should make sure you're at least running a recent release of version 8
sendmail (either from your vendor or the public version detailed in
Q2.8).
-
+
Check the CERT Alerts and Summaries to make sure that you're running a
version that is free of known security holes. Just because the
sendmail program provided by your vendor isn't listed doesn't mean
that you're not vulnerable, however. If your particular vendor or
version isn't listed, check with your vendor and on the appropriate
Internet mailing lists and Usenet newsgroups to verify.
-
+
If nothing else, the most recent public version is usually a pretty
good bet, although you should check comp.mail.sendmail to see if
anyone has posted recent comments that haven't yet been folded into a
new release.
-
+
That said, you need to look at what the primary function is for the
machine. If its primary function is to run some CAD/CAM package on the
desk of an engineer, then there's probably not much sense in replacing
@@ -402,24 +437,23 @@ Q2.7 -- Which version of sendmail should I run?
to have all their inbound mail pass through a central Mail eXchanger
(probably the same machine as the central Mail Relay), for the same
reasons.
-
+
If the primary function for a machine is to act as that central Mail
Relay/Mail eXchanger, then we *strongly* recommend the best version of
sendmail you can get, and in our opinion that is the latest release of
version 8. IDA sendmail is also pretty good, but virtually everything
it does, version 8 does better, and version 8 has the additional
advantage of having continued development as well.
-
- If fighting spam is a concern, then by all means upgrade to 8.9.X .
- 8.8.X has some good anti-spam features, but 8.9.X has more features,
- and the anti-spam ones are far easier to configure than those in 8.8.X
- .
-
+
+ If fighting spam is a concern, then by all means upgrade to 8.10.X .
+ 8.9.X has good anti-spam features, but 8.10.X has even more features,
+ and the anti-spam ones are more flexible than those in 8.9.X .
+
However, keep in mind that version 8 still hasn't been ported (so far
as we know) to some of the older (and perhaps more esoteric)
platforms, and if you're stuck using one of them, you may not have
much choice.
-
+
Some vendors have started shipping (or announced that they will soon
ship) version 8 sendmail pre-configured for their machines.
Unfortunately, in most cases this means you get a pre-compiled binary
@@ -427,7 +461,7 @@ Q2.7 -- Which version of sendmail should I run?
else of the "standard" version 8 sendmail installation kit. Silicon
Graphics (SGI) and Hewlett-Packard are known to already be shipping
version 8 sendmail in this fashion.
-
+
Sun Microsystems did the same with SunOS 5.5, 5.5.1 and 5.6, shipping
a version based on 8.6 with their own proprietary config files. Recent
patches for 5.5.1 and 5.6, however, upgrade to a version based on
@@ -435,77 +469,90 @@ Q2.7 -- Which version of sendmail should I run?
importantly, a cf hierarchy is available under /usr/lib/mail/. More
details are available at the Sun migration page.
_________________________________________________________________
-
+
Q2.8 -- What is the latest release of sendmail?
Date: October 24, 1997
- Updated: February 4, 1999
-
+ Updated: March 3, 2003
+
For version 8 sendmail, there are four release trees.
-
+
For those people who, for whatever reason, are unable or unwilling to
- upgrade to version 8.8.z, releases of version 8.6 and 8.7 sendmail are
- still available. As of this writing, the most recent release of
- version 8.6 sendmail is 8.6.13, and the most recent release of version
- 8.7 sendmail is 8.7.6.
-
- For the most recent releases of 8.6 and 8.7 sendmail, there is a
- version number difference between the sendmail program itself and the
- associated configuration files. This is okay. The security-related bug
- fixes that were made only required changes to the sendmail program
- itself and not the configuration files, so only the version number of
- the sendmail program itself was incremented.
-
+ upgrade to version 8.12.x, releases of versions 8.11, 8.10 and 8.9
+ sendmail are still available but are not being updated. The last
+ release of version 8.9 sendmail was 8.9.3; the last release of 8.10
+ was 8.10.2; the last release of 8.11 was 8.11.6 .
+
+ Version 8.12.8 was released on March 3, 2003.
+ Version 8.12.7 was released on December 29, 2002.
+ Version 8.12.6 was released on August 26, 2002.
+ Version 8.12.5 was released on June 25, 2002.
+ Version 8.12.4 was released on June 3, 2002.
+ Version 8.12.3 was released on April 5, 2002.
+ Version 8.12.2 was released on January 13, 2002.
+ Version 8.12.1 was released on October 1, 2001.
+ Version 8.12.0 was released on September 8, 2001.
+ Version 8.11.6 was released on August 20, 2001.
+ Version 8.11.5 was released on July 31, 2001.
+ Version 8.11.4 was released on May 28, 2001.
+ Version 8.11.3 was released on February 27, 2001.
+ Version 8.11.2 was released on December 29, 2000.
+ Version 8.11.1 was released on September 28, 2000.
+ Version 8.11.0 was released on July 19, 2000.
+ Version 8.10.2 was released on June 7, 2000.
+ Version 8.10.1 was released on April 7, 2000.
+ Version 8.10.0 was released on March 7, 2000.
Version 8.9.3 was released on February 4, 1999.
Version 8.9.2 was released on December 31, 1998.
Version 8.9.1 was released on July 2, 1998.
Version 8.9.0 was released on May 20, 1998.
-
+
On machines exposed directly to the Internet, you should either
- already be running sendmail 8.9.3 or plan on upgrading to it in the
- immediate future. 8.9.3 is considered "stable", has security fixes
- included that will not be found in any previous release, and therefore
+ already be running sendmail 8.12.8 or plan on upgrading in the
+ immediate future. 8.12.8 is considered "stable", has fixes included
+ that will not be found in any previous release, and therefore
supercedes all previous releases.
-
+
There is no further support for previous releases of sendmail.
_________________________________________________________________
-
+
Q2.9 -- Where can I find it?
Date: January 21, 1997
-
+ Updated: March 7, 2000
+
By anonymous FTP from ftp.sendmail.org in /pub/sendmail, or (in URL
form) via ftp://ftp.sendmail.org/pub/sendmail/. If you care, there
should be files in this directory that end with the extension ".sig"
which you can check with PGP to make sure that corresponding archives
- haven't been modified. You'll need to have the PGP key of Eric Allman
- on your public keyring to be able to verify these archives with their
- associated .sig files.
-
+ haven't been modified. You'll need to have the PGP signing key of
+ Sendmail.ORG on your public keyring to be able to verify these
+ archives with their associated .sig files.
+
There are no other known official version 8 sendmail mirrors.
-
+
Check the sendmail home page at http://www.sendmail.org/ for
late-breaking updates and other useful information.
-
+
If you want to be notified regarding future updates to sendmail and
other items of potential interest, you may want to subscribe to the
sendmail-announce mailing list. Address your subscription requests to
"majordomo@lists.sendmail.org" with "subscribe sendmail-announce" as
the body of the message.
_________________________________________________________________
-
+
Q2.10 -- What are the differences between Version 8 and other versions?
Date: March 23, 1996
-
+
See doc/changes/changes.{me,ps} in the distribution. See also
RELEASE_NOTES at the top level.
_________________________________________________________________
-
+
Q2.11 -- What's the best platform for running sendmail?
Date: April 8, 1997
-
+
Generally speaking, I adhere to the old axiom that you should choose
what software you want to run first, then choose the platform
(hardware and OS) that best runs this software. By this token, if
@@ -515,26 +562,26 @@ Q2.11 -- What's the best platform for running sendmail?
Intel-based PC's (among other hardware platforms), and this would make
them the most "native" OSes for sendmail. FreeBSD is freely available
by anonymous ftp or on CD-ROM, and BSD/OS is a commercial product.
-
+
However, not everyone has this kind of "luxury". If you're on a
homogeneous network (i.e., completely composed of only one type of
hardware and OS), then you should probably be running the same OS as
the rest of the machines on the network, regardless of the axiom
stated above. You may have other problems, but you should at least be
able to get some local support on the OS for your machine.
-
+
Either way, if the primary function of the machine is to handle
"large" quantities of mail (for whatever value you define "large" to
be), I strongly recommend getting the latest stable release of version
8 sendmail.
-
+
You may be surprised to find that it is easier for you to support only
one version of sendmail across all the various platforms than it is to
try to support multiple versions of sendmail, each unique for their
particular platform. In that case, the easy solution is to put version
8 sendmail everywhere, and not have to worry about vendor-specific
problems with older versions.
-
+
For more information on BSD Unix in general, see the Usenet newsgroups
under comp.unix.bsd, comp.bugs.4bsd, comp.os.386bsd. For more
information on BSD/OS, see the BSD newsgroups mentioned above, or the
@@ -542,54 +589,53 @@ Q2.11 -- What's the best platform for running sendmail?
FreeBSD, see the Usenet newsgroups under news:comp.unix.bsd.freebsd,
or the FreeBSD Home Page at http://www.freebsd.org/.
_________________________________________________________________
-
+
Q2.12 -- What is BIND and where can I get the latest version?
Date: June 24, 1997
-
+
BIND stands for "Berkeley Internet Name Daemon", and is the Internet
de-facto standard program for turning host names into IP addresses.
-
+
The BIND Home Page is at http://www.isc.org/bind.html, which provides
pointers to the most recent release of BIND. In May of 1997, the first
production version of BIND-8 was released. The ISC has deprecated
BIND-4 other than for security related patches. No new features or
portability changes will be added to BIND-4. You should be using
BIND-8.
-
+
Note that there are bugs in older resolver libraries, which can cause
problems getting to large sites (that list more than five IP addresses
for a particular name), or represent a huge security hole as they do
not check the returned data to see if it will fit in the amount of
space pre-allocated for it.
-
+
If at all possible, you should get the most recent "release" version
of BIND and make a serious attempt to integrate it into your
configuration, since virtually all vendor-provided resolver libraries
are woefully out of date.
-
+
Note that since the release of BIND version 8.1, many people building
sendmail have experienced problems compiling and linking with the new
BIND include files and libraries under /usr/local/. A section in our
Compiling Sendmail page explains this.
_________________________________________________________________
-
+
Q2.13 -- What is smrsh and where can I get it?
Date: July 9, 1996
-
- From ftp://info.cert.org/pub/tools/smrsh/README:
-
+ Updated: July 1, 2000
+
smrsh is a restricted shell utility that provides the ability to
specify, through a configuration, an explicit list of executable
programs. When used in conjunction with sendmail, smrsh effectively
limits sendmail's scope of program execution to only those programs
specified in smrsh's configuration.
-
+
smrsh has been written with portability in mind, and uses traditional
Unix library utilities. As such, smrsh should compile on most Unix C
compilers.
-
+
The purpose for restricting the list of programs that can be executed
in this manner is to keep mail messages (either through an alias or
the .forward file in a user's home directory) from being sent to
@@ -597,29 +643,29 @@ Q2.13 -- What is smrsh and where can I get it?
paranoid in checking their input, and can therefore be easily
subverted (this is related to, but different from, the /etc/shells
feature discussed in Q3.11).
-
+
More information regarding the CERT-CC can be found at their web site,
http://www.cert.org. For more information on CERT Alerts and CERT
Summaries, see their advisories and summaries, respectively.
-
- You can find smrsh in the most recent sendmail source archive, as well
- as ftp://info.cert.org/pub/tools/smrsh/. Other very useful programs
- can be found in ftp://info.cert.org/pub/tools/.
+
+ You can find smrsh in the most recent sendmail source archive. Other
+ very useful programs can be found in
+ http://www.cert.org/other_sources/tool_sources.html.
_________________________________________________________________
-
+
Q2.14 -- What is smap and where can I get it?
Date: July 5, 1996
-
+
Smap (and smapd) are tools out of the Trusted Information Systems
(TIS) Firewall Toolkit (fwtk). They were originally written by
firewall expert Marcus Ranum under contract to TIS, and TIS is
- continuing what maintenance there is. The toolkit may be found at
- here. Support questions regarding the toolkit may be sent to
+ continuing what maintenance there is. Here is a link to the toolkit.
+ Support questions regarding the toolkit may be sent to
fwall-support@tis.com, while you may join their mailing list
fwall-users@tis.com by sending electronic mail to
fwall-users-request@tis.com.
-
+
The concept of smap and smapd is that sendmail is a huge, monolithic
setuid root program that is virtually impossible to verify as being
"correct" and free from bugs (historically, sendmail has been rather
@@ -631,25 +677,26 @@ Q2.14 -- What is smap and where can I get it?
design). According to the theory, it is therefore safer and "better"
to run smap and smapd as "wrappers" around sendmail, which would no
longer need to be run setuid root.
-
+
Unfortunately, smap and smapd have a few problems of their own, and
don't appear to have been updated since late March 1996. There have
been conflicting reports of incompatibilities between smapd and
sendmail 8.7.y (both cannot be run on the same machine, although if
you're running sendmail 8.6.x and smap/smapd on the local machine,
people on the outside can still use sendmail 8.7.y to talk to you).
-
+
For further information on smap and smapd, see the documentation that
comes with the TIS Firewall Toolkit.
-
+
For more information on firewalls, see the Firewalls FAQ at
http://www.interhack.net/pubs/fwfaq/
_________________________________________________________________
-
+
Q2.15 -- What is TCP-Wrappers and where can I get it?
Date: April 8, 1997
-
+ Updated: April 2, 2001
+
TCP-Wrappers is another security enhancement package. The theory is
that you take programs being run under inetd (see /etc/inetd.conf) and
before you run the program to do the real work (ftpd, telnetd,
@@ -660,7 +707,7 @@ Q2.15 -- What is TCP-Wrappers and where can I get it?
are attempting to connect to; and either allow known good connections
through thus refusing unknown connections, or accept all connections
except those known to be bad).
-
+
The practice of TCP-Wrappers actually follows the theory quite well.
It is a very useful and important tool in the System Administrator's
Bag of Things To Help You Secure Your Machine From Crackers, Spammers,
@@ -671,23 +718,21 @@ Q2.15 -- What is TCP-Wrappers and where can I get it?
running obviously don't benefit beyond the initial connection that
gets the daemon started (however, see the FTP URL below for other
packages that can help secure RPC and portmapper-based services).
-
+
However, most sendmail installations tend to start up a daemon and
leave it running at all times. If you did run sendmail out of inetd,
you'd lose the benefit of the load average checking code that is
executed only in daemon mode, and for systems that handle a lot of
mail, this is vitally important.
-
- You can get TCP-Wrappers from ftp://ftp.win.tue.nl/pub/security/, a
+
+ You can get TCP-Wrappers from ftp://ftp.porcupine.org/pub/security/, a
site that has a whole host of other useful security tools, such as
securelib, portmap, satan, cops, crack, etc... You can also find
pointers to many other useful security tools at
http://ciac.llnl.gov/ciac/SecurityTools.html, and the COAST Archive at
- http://www.cs.purdue.edu/homes/spaf/hotlists/csec.html is a veritable
- cornucopia of all things security related. The SANS 1996 Network
- Security Roadmap at http://www.sans.org/roadmap/ has much useful
- information and pointers to many other useful resources.
-
+ http://www.cerias.purdue.edu/coast/ is a veritable cornucopia of all
+ things security related.
+
For the adventurous, you can get a source patch for version 8 sendmail
(created for 8.7.6, but, with work, applicable to older releases) that
will take the core TCP-Wrappers code and integrate it into the daemon,
@@ -696,28 +741,28 @@ Q2.15 -- What is TCP-Wrappers and where can I get it?
and is certainly not officially supported by the original author of
sendmail (Eric Allman). This functionality is integrated in a
different fashion into version 8.8.5 sendmail.
-
+
You should be able to find the unsupported patch at
- ftp://ftp.win.tue.nl/pub/security/sendmail-tcpd.patch.
+ ftp://ftp.porcupine.org/pub/security/sendmail-tcpd.patch.
_________________________________________________________________
-
+
Q2.16 -- Why won't db 1.85 build on my machine?
Date: April 8, 1997
Updated: May 20, 1997
URL Updated: July 27, 1999
-
+
As of release 8.9.X of sendmail, db 1.85 is no longer needed, as
support for db 2.X is included (starting with 2.3.16). More details
are given at Q3.25. The rest of this answer only applies if you have
not yet upgraded to 8.9.X .
-
+
The db 1.85 package as available from
http://www.sleepycat.com/register.html provides Irix support up to
Irix 4.05F, but 5.{2,3} need a slightly patched version, as does HP-UX
10.20. Some vendors also provide db standard with their OS (DEC Unix
4.0, for example).
-
+
A tarball incorporating these changes for Irix 5.x is available at
ftp://ftp.his.com/pub/brad/sendmail/irix5.tar.gz. This will extract
into ./db.1.85/PORT/irix.5.2, with a symbolic link created from
@@ -727,12 +772,12 @@ Q2.16 -- Why won't db 1.85 build on my machine?
information on getting the db 1.85 package). An ASCII context diff of
this same patch is at
ftp://ftp.his.com/pub/brad/sendmail/irix4-5.diff.
-
+
A version of db 1.85 that has supposedly been patched to compile under
Irix 6.2 has been made available at
http://reality.sgi.com/ariel/freeware/#db, but I haven't had a chance
to download and check it out yet.
-
+
The context diffs required to get db 1.85 working under HP-UX 10.20
are available at ftp://ftp.his.com/pub/brad/sendmail/hpux.10.20.diff.
A tarball incorporating these changes is available at
@@ -741,14 +786,14 @@ Q2.16 -- Why won't db 1.85 build on my machine?
archive into the same directory where you extracted the db 1.85
archive as available from ftp.cs.berkeley.edu.
_________________________________________________________________
-
+
Q2.17 -- What is makemap and where can I get it?
Date: August 30, 1996
-
+
The program "makemap" is used to build the databases used by version 8
sendmail, for things like the UserDB, mailertables, etc....
-
+
It is distributed as part of the basic operating system from some
vendors, but source code for it is also included at the root level of
the sendmail archive (at least, it is for sendmail 8.6.12 and 8.7.5,
@@ -756,32 +801,31 @@ Q2.17 -- What is makemap and where can I get it?
However, it is not considered a "supported" part of version 8
sendmail. Just like the other source provided in the archive, the
Makefile will likely need some tweaking for your specific site.
-
+
It turns out that Irix 5.3 doesn't appear to have the dbm or ndbm
libraries, but to compile makemap.c, you need to have -DNDBM on the
"DBMDEF=" line (some necessary things are defined only in
/usr/include/ndbm.h). Try just leaving off "-lndbm" from the "LIBS="
line in the Makefile for makemap.
-
+
If you plan on using makemap with db 1.85 on an SGI machine running a
version of Irix later than 4.x, see Q2.16 for some additional steps to
get db 1.85 compiled on your machine.
-
+
sendmail.org
-
+
3. VERSION 8 SPECIFIC ISSUES
-
+
* 3.1 How do I make all my addresses appear to be from a single
host?
* 3.2 How do I rewrite my "From:" lines to read
``First_Last@My.Domain'' or ``Different_Name@My.Domain''?
- * 3.3 Why are you so hostile to using full names for email
- addresses?
+ * 3.3 But what about fully-qualified addresses, such as those from
+ Pine or FEATURE(always_add_domain)?
* 3.4 So what was the user database feature intended for?
- * 3.5 Where do I find this user database (UserDB) code?
- * 3.6 How do I get the user database to work with Pine or with
- FEATURE(always_add_domain)?
+ * 3.5 Why the hostility toward using full names for email addresses?
+ * 3.6 (deprecated)
* 3.7 How do I manage several (virtual) domains?
* 3.8 There are four UUCP mailers listed in the configuration files.
Which one should I use?
@@ -823,61 +867,101 @@ Q2.17 -- What is makemap and where can I get it?
* 3.32 How do I configure majordomo with sendmail 8.9 without
relaxing the DontBlameSendmail option?
* 3.33 How do I configure my system in general with sendmail 8.9?
+ * 3.34 What does "foo not available for sendmail programs" mean?
+ * 3.35 How do I add a footer/signature to all (outgoing) e-mail
+ messages?
+ * 3.36 What does "Cannot open hash database ... Invalid argument"
+ mean?
+ * 3.37 What does "parse error before `NDBM'" mean?
+ * 3.38 What does "may be forged" mean?
+ * 3.39 How do I send using an alternate port?
+ * 3.40 Why can't I use BerkeleyDB 4.1.x?
+ * 3.41 How do I use CIDR notation in the access map (or other
+ places)?
+ * 3.42 Why isn't CIDR notation directly supported by sendmail?
+ * 3.43 What does "Need to recompile with -DNEWDB for hash support"
+ mean?
+ * 3.44 I disabled sendmail on some machines which don't receive
+ mail, but since upgrading to 8.12 they can't send mail either;
+ why?
_________________________________________________________________
-
+
Q3.1 -- How do I make all my addresses appear to be from a single host?
This question is answered in detail at the configuration Masquerading
and Relaying page.
_________________________________________________________________
-
+
Q3.2 -- How do I rewrite my From: lines to read ``First_Last@My.Domain''' or
``Different_Name@My.Domain''?
Date: September 23, 1997
-
- There are a couple of ways of doing this. This describes using the
- "user database" code, discussed in detail at the Using UserDB to Map
- Full Names page. This is still experimental and was intended for a
- different purpose -- however, it does work with a bit of care. It does
- require that you have the Berkeley "db" package installed (it won't
- work with DBM). First, create your input file. This should have lines
- like:
- loginname:mailname DifferentName
- DifferentName:maildrop loginname
-
- Install it in (for example) /etc/userdb. Create the database:
- makemap btree /etc/userdb.db < /etc/userdb
-
- You can then create a config file that uses this. You will have to
- include the following in your .mc file:
- define(confUSERDB_SPEC, /etc/userdb.db)
- FEATURE(notsticky)
- _________________________________________________________________
-
-Q3.3 -- Why are you so hostile to using full names for email addresses?
+ Updated: November 8, 1999
+
+ Use the generics table, as described in steps 6 and 7 of the Virtual
+ Hosting page.
+ _________________________________________________________________
+
+Q3.3 -- But what about fully-qualified addresses, such as those from Pine or
+FEATURE(always_add_domain)?
+
+ Date: July 19, 1996
+ Updated: November 8, 1999
+ Updated: January 25, 2000
+
+ Note: this question used to be "How do I get the user database to work
+ with Pine or with FEATURE(always_add_domain)?" But the user database
+ is no longer the recommended solution for this problem, so the
+ question has been clarified appropriately.
+
+ The proper solution is to use the generics table, as described in
+ steps 6 and 7 of the Virtual Hosting page. The important thing to note
+ is that the host/domain part of the fully-qualified address must be
+ specified via GENERICS_DOMAIN() or GENERICS_DOMAIN_FILE().
+ _________________________________________________________________
+
+Q3.4 -- So what was the user database feature intended for?
+
+ Date: May 12, 1997
+
+ The intent was to have all information for a given user (where the
+ user is the unique login name, not an inherently non-unique full name)
+ in one place. This would include phone numbers, addresses, and so
+ forth. The "maildrop" feature is because Berkeley does not use a
+ centralized mail server (there are a number of reasons for this that
+ are mostly historic), and so we need to know where each user gets his
+ or her mail delivered -- i.e., the mail drop.
+
+ UC Berkeley is (was) in the process of setting up their environment so
+ that mail sent to an unqualified "name" goes to that person's
+ preferred maildrop; mail sent to "name@host" goes to that host. The
+ purpose of "FEATURE(notsticky)" is to cause "name@host" to be looked
+ up in the user database for delivery to the maildrop.
+ _________________________________________________________________
+
+Q3.5 -- Why the hostility toward using full names for email addresses?
Date: May 12, 1997
-
+
Because full names are not unique. For example, the computer community
has two Peter Deutsches. At one time, Bell Labs had two Stephen R.
Bournes with offices a few doors apart. You can create alternative
addresses (e.g., Stephen_R_Bourne_2), but that's even worse -- which
one of them has to have their name desecrated in this way? And you can
bet that one of them will get most of the other person's email.
-
+
So called "full names" are just an attempt to create longer versions
of unique names. Rather that lulling people into a sense of security,
I'd rather that it be clear that these handles are arbitrary. People
should use good user agents that have alias mappings so that they can
attach arbitrary names for their personal use to those with whom they
correspond (such as the MH alias file).
-
+
The problem is even worse outside of America, where non-ASCII
characters (e.g., characters with umlauts or the Norwegian Ø) are used
in names. Since non-ASCII characters cannot be used in the SMTP
envelope or e-mail headers, the full names are mangled anyway.
-
+
Even worse is fuzzy matching in email -- this can make good addresses
turn bad. For example, Eric Allman is currently (to the best of our
knowledge) the only ``Allman'' at Berkeley, so mail sent to
@@ -886,164 +970,93 @@ Q3.3 -- Why are you so hostile to using full names for email addresses?
only Allman at Berkeley for over fifteen years -- to suddenly have
this "good address" bounce mail because it is ambiguous would be a
heinous wrong.
-
+
Directory services should be as fuzzy as possible (within reason, of
course). Mail services should be unique.
_________________________________________________________________
-
-Q3.4 -- So what was the user database feature intended for?
- Date: May 12, 1997
-
- The intent was to have all information for a given user (where the
- user is the unique login name, not an inherently non-unique full name)
- in one place. This would include phone numbers, addresses, and so
- forth. The "maildrop" feature is because Berkeley does not use a
- centralized mail server (there are a number of reasons for this that
- are mostly historic), and so we need to know where each user gets his
- or her mail delivered -- i.e., the mail drop.
-
- UC Berkeley is (was) in the process of setting up their environment so
- that mail sent to an unqualified "name" goes to that person's
- preferred maildrop; mail sent to "name@host" goes to that host. The
- purpose of "FEATURE(notsticky)" is to cause "name@host" to be looked
- up in the user database for delivery to the maildrop.
+Q3.6 -- has been deprecated.
_________________________________________________________________
-
-Q3.5 -- Where do I find this user database (UserDB) code?
-
- Date: October 13, 1997
- URL updated: July 27, 1999
-
- The user database code is part of the Sendmail V8 distribution.
- However, it depends on your installing the db library from the package
- at http://www.sleepycat.com/register.html. If you install this
- library, edit the Makefile to include the right option (-DNEWDB), and
- then make sendmail again, you get a binary which has the database
- features described in the book and the documentation provided in the
- sendmail source archive.
-
- If you're using SGI Irix above 4.x, see Q2.16 for the patches you will
- need to get db 1.85 working on your machine.
- _________________________________________________________________
-
-Q3.6 -- How do I get the user database to work with Pine or with
-FEATURE(always_add_domain)?
- Date: July 19, 1996
-
- The basic incompatibility with Pine and the user database option is in
- how Pine writes From addresses in the header. Most MUAs write the From
- address as "From: user", while Pine, for reasons given in its
- documentation, write the From address as "From: user@FQDN" (FQDN=fully
- qualified domain name). Using the m4 feature macro always_add_domain
- has the same effect. Because of this difference, the user database
- does not rewrite these headers.
-
- One solution to this problem is to make the following change in the
- sendmail.mc file compiled by m4 into your /etc/sendmail.cf (or
- wherever your sendmail.cf file is located) after you have the user
- database option installed and working with other MUAs:
-
- Early in the section(s) where you are setting configuration variables,
- add the following:
- # Define our userdb file for FQDN rewrites
- Kuserdb btree -o /etc/userdb.db
-
- And a bit later, before the "MAILER()" entries, but after other
- configuration options have been set:
- LOCAL_RULE_1
- ########################################################
- ### Local Ruleset 1, rewrite sender header & envelope ##
- ########################################################
- #Thanks to Bjart Kvarme <bjart.kvarme@usit.uio.no>
- S1
- R$- $1 < @ $j . > user => user@lo
-calhost
- R$- < @ $=w . > $* $: $1 < @ $2 . > $3 ?? $1 user@localhost
-?
- R$+ ?? $+ $: $1 ?? $(userdb $2 : mailname $: @ $)
- R$+ ?? @ $@ $1 Not found
- R$+ ?? $+ $>3 $2 Found, rewrite
-
- #NOTE ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^
- # Use Tab Characters Use Tab Characters in these regions
- # to make three columns (the line with "mailname" only has 2 columns).
-
- Now the user database should re-write messages sent with Pine or
- anything else that causes local users to have their address be fully
- qualified (both header and envelope sender will be properly
- re-written). If this still does not work for you, try adding the
- following to either the system-wide pine.conf, pine.conf.fixed, or
- your personal .pinerc:
-
- user-domain=localhost
-
- This has been known to help solve the problem for some people.
-
- However, a more elegant (read: m4-based) solution for version 8
- sendmail users has yet to be created.
- _________________________________________________________________
-
Q3.7 -- How do I manage several (virtual) domains?
This question is answered in detail at the Virtual Hosting page.
_________________________________________________________________
-
+
Q3.8 -- There are four UUCP mailers listed in the configuration files. Which
one should I use?
This question is answered in detail at the configuration Using UUCP
Mailers page.
_________________________________________________________________
-
+
Q3.9 -- How do I fix "undefined symbol inet_aton" and "undefined symbol
_strerror" messages?
This question is answered in detail within the Compiling Sendmail
page.
_________________________________________________________________
-
+
Q3.10 -- How do I solve "collect: I/O error on connection" or "reply: read
error from host.name" errors?
Date: April 8, 1997
- Updated: June 4, 1998
-
- There is nothing wrong. This is just a diagnosis of a condition that
- had not been diagnosed before. If you are getting a lot of these from
- a single host, there is probably some incompatibility between 8.x and
- that host. If you get a lot of them in general, you may have network
- problems that are causing connections to get reset.
-
+ Updated: May 9, 2000
+ Updated: June 8, 2002
+ Updated: March 2, 2003
+
+ If you are just getting occasional such messages, they're probably due
+ to a temporary network problem, or the remote host crashing or
+ otherwise abruptly terminating the connection. If you are getting a
+ lot of these from a single host, there is probably some
+ incompatibility between 8.x and that host (see Q3.12 and Q3.20). If
+ you get a lot of them in general, you may have network problems that
+ are causing connections to get reset.
+
Note that this problem is sometimes caused by incompatible values of
the MTU (Maximum Transmission Unit) size on a SLIP or PPP connection.
Be sure that your MTU size is configured to be the same value as what
your ISP has configured for your connection. If you are still having
problems, then have your ISP configure your MTU size for 1500 (the
maximum value), and you configure your MTU size similarly.
-
- Although it seems like a problem of this sort would affect all of your
- connections, that is not the case. You may encounter this problem with
- only a small number of sites with which you exchange mail, and it may
- even affect only certain size messages.
+
+ Another possibility is that you have a router/firewall filtering out
+ all incoming ICMP messages, while your OS is doing "Path MTU
+ discovery" (e.g. modern TCP/IP stacks do this by default). Path MTU
+ discovery relies on certain ICMP messages being allowed through back
+ to the host originating the traffic - see our tip on Path MTU
+ Discovery and RFC 1191 for the details.
+
+ Lastly, here is part of a post from comp.mail.sendmail about a SCO
+ 7.1.0 specific bug which may produce similar problems.
+
+ Subject: Re: Recipient mail server times out sendmail connection
+ Date: 5 Jun 2002 21:37:02 -0700
+ From: maillist@screamingplants.com (ike)
+
+ I ran a packet sniffer on mail traffic that was causing problems
+ and found that the tcp checksums for large packets were all off by
+ 14. I found out later that there is a network bug in the OS (SCO
+ 7.1.0). After applying a few patches, the problem appears to have
+ been resolved.
_________________________________________________________________
-
+
Q3.11 -- Why can't my users forward their mail to a program?
Date: July 9, 1996
-
+ Updated: November 19, 1999
+
I just upgraded to version 8 sendmail and now when my users try to
forward their mail to a program they get an "illegal shell" or "cannot
mail to programs" message and their mail is not delivered. What's
wrong?
-
+
In order for people to be able to run a program from their .forward
file, version 8 sendmail insists that their shell (that is, the shell
listed for that user in the passwd entry) be a "valid" shell, meaning
a shell listed in /etc/shells. If /etc/shells does not exist, a
default list is used, typically consisting of /bin/sh and /bin/csh.
-
+
This is to support environments that may have NFS-shared directories
mounted on machines on which users do not have login permission. For
example, many people make their file server inaccessible for
@@ -1051,41 +1064,43 @@ Q3.11 -- Why can't my users forward their mail to a program?
their shell on the server is /usr/local/etc/nologin or some such. If
you allowed them to run programs anyway you might as well let them log
in.
-
+
If you are willing to let users run programs from their .forward file
even though they cannot telnet or rsh in (as might be reasonable if
you run smrsh to control the list of programs they can run) then add
the line:
-
+
/SENDMAIL/ANY/SHELL/
-
+
to /etc/shells. This must be typed exactly as indicated, in caps, with
the trailing slash.
-
+
NOTA BENE: DO NOT list /usr/local/etc/nologin in /etc/shells -- this
will open up other security problems.
-
+
IBM AIX does not use /etc/shells -- a list of allowable login shells
is contained, along with many other login parameters, in
/etc/security/login.cfg. You can copy the information in the "shells="
stanza into a /etc/shells on your system so sendmail will have
something to use. Do NOT add "/usr/lib/uucp/uucico" or any other
non-login shell into /etc/shells.
-
+
Also note that there are some weird things that AFS throws into the
mix, and these can keep a program from running or running correctly
out of .forward files or the system-wide aliases.
-
- See also "smrsh" in Q2.13, and "directory permissions" in Q3.33.
+
+ See also "smrsh" in Q2.13 and Q3.34, and "directory permissions" in
+ Q3.33.
_________________________________________________________________
-
+
Q3.12 -- Why do connections to the SMTP port take such a long time?
Date: November 24, 1996
-
+ Updated: August 29, 2001
+
I just upgraded to version 8 sendmail and suddenly connections to the
SMTP port take a long time. What is going wrong?
-
+
It's probably something weird in your TCP implementation that makes
the IDENT code act oddly. On most systems version 8 sendmail tries to
do a ``callback'' to the connecting host to get a validated user name
@@ -1093,23 +1108,23 @@ Q3.12 -- Why do connections to the SMTP port take such a long time?
such a service it will normally fail quickly with "Connection
refused", but certain kinds of packet filters and certain TCP
implementations just time out.
-
+
To test this (pre-8.7.y sendmail), set the IDENT timeout to zero
using:
-
+
define(`confREAD_TIMEOUT',`Ident=0')dnl
-
+
in the .mc file used by m4 to generate your sendmail.cf file.
Alternatively, if you don't use m4, you can put ``OrIdent=0'' in the
configuration file (we recommend the m4 solution, since that makes
maintenance much easier for people who don't understand sendmail
re-write rules, or after you've been away from it for a while). Either
way, this will completely disable all use of the IDENT protocol.
-
+
For version 8.7.y sendmail (and above), you should instead use:
-
+
define(`confTO_IDENT',`0s')dnl
-
+
Another possible problem is that you have your name server and/or
resolver configured improperly. Make sure that all "nameserver"
entries in /etc/resolv.conf point to functional servers. If you are
@@ -1117,50 +1132,53 @@ Q3.12 -- Why do connections to the SMTP port take such a long time?
your root cache are up to date (this file is usually called something
like "/var/namedb/root.cache"; see your /etc/named.boot file to get
your value). Either of these can cause long delays.
+
+ You may also wish to check out our tips on how to set up DNS for your
+ private address space.
_________________________________________________________________
-
+
Q3.13 -- Why do I get "unknown mailer error 5 -- mail: options MUST PRECEDE
recipients" errors?
Date: March 23, 1996
-
+
I just upgraded to version 8 sendmail and suddenly I get errors such
as ``unknown mailer error 5 -- mail: options MUST PRECEDE
recipients.'' What is going wrong?
-
+
You need OSTYPE(systype) in your .mc file, where "systype" is set
correctly for your hardware & OS combination -- otherwise the
configurations use a default that probably disagrees with your local
mail system. See the configuration OSTYPE page for details.
-
+
If this is on a Sun workstation, you might also want to take a look at
the local mailer flags in the Sun-supplied sendmail.cf and compare
them to the local mailer flags generated for your version 8
sendmail.cf. If they differ, you might try changing the V8 flags to
match the Sun flags.
_________________________________________________________________
-
+
Q3.14 -- Why does version 8 sendmail panic my SunOS box?
Date: March 24, 1996
Updated: November 4, 1997
-
+
Sendmail 8.7.y panics SunOS 4.1.3_U1 (at least for 1 <= y <= 3) and
SunOS 4.1.3, and sendmail 8.6.x seems fine on both machines (at least
for 9 <= x <= 12).
-
+
The problem is that a kernel patch is missing, specifically 100584-08
(4.1.3), 102010-05 (4.1.3_U1), or 102517 (4.1.4). This should be
available from your hardware vendor through your support contract or
their online support facilities (including being available on the
SunSolve CD).
_________________________________________________________________
-
+
Q3.15 -- Why does the Unix From line get mysteriously munged when I send to an
alias?
Date: December 3, 1997
-
+
``It's not a bug, it's a feature.'' This happens when you have an
owner-list alias and you send to list. V8 propagates the owner
information into the SMTP envelope sender field (which appears as the
@@ -1177,40 +1195,41 @@ alias?
This will make message sent to list come out as being "From
list-request" instead of "From eric".
_________________________________________________________________
-
+
Q3.16 -- Why doesn't MASQUERADE_AS (or the user database) work for envelope
addresses as well as header addresses?
Date: November 24, 1996
-
+
Believe it or not, this is intentional. The interpretation of the
standards by the version 8 sendmail development group was that this
was an inappropriate rewriting, and that if the rewriting were
incorrect at least the envelope would contain a valid return address.
-
+
If you're using version 8.7.y sendmail (or later), you can use
FEATURE(masquerade_envelope)
in your sendmail.mc file to change this behavior. This is discussed in
greater detail at the configuration Masquerading and Relaying page.
_________________________________________________________________
-
+
Q3.17 -- How do I run version 8 sendmail and support the MAIL11V3 protocol?
Date: March 23, 1996
-
+ URL updated: November 15, 2002
+
Get the reimplementation of the mail11 protocol by Keith Moore from
- ftp://gatekeeper.dec.com/pub/DEC/gwtools/ (with contributions from
- Paul Vixie).
+ ftp://gatekeeper.dec.com/pub/misc/vixie/ (with contributions from Paul
+ Vixie).
_________________________________________________________________
-
+
Q3.18 -- Why do messages disappear from my queue unsent?
Date: March 23, 1996
-
+
When I look in the queue directory I see that qf* files have been
renamed to Qf*, and sendmail doesn't see these. What's wrong?
-
+
If you look closely you should find that the Qf files are owned by
users other than root. Since sendmail runs as root it refuses to
believe information in non-root-owned qf files, and it renames them to
@@ -1220,21 +1239,21 @@ Q3.18 -- Why do messages disappear from my queue unsent?
security problems) and someone is calling sendmail with an "unsafe"
flag, usually a -o flag that sets an option that could compromise
security. When sendmail sees this it gives up setuid root permissions.
-
+
The usual solution is to not use the problematic flags. If you must
use them, you have to write a special queue directory and have them
processed by the same uid that submitted the job in the first place.
_________________________________________________________________
-
+
Q3.19 -- When is sendmail going to support RFC 2047 MIME header encoding?
Date: March 23, 1996
Updated: September 5, 1999
-
+
This is considered to be a MUA issue rather than an MTA issue.
-
+
Quoth Eric Allman:
-
+
The primary reason is that the information necessary to do the
encoding (that is, 8->7 bit) is unknown to the MTA. In specific,
the character set used to encode names in headers is _NOT_
@@ -1246,42 +1265,42 @@ Q3.19 -- When is sendmail going to support RFC 2047 MIME header encoding?
character set; it could even be that the sender was Japanese, the
recipient Russian, and the body encoded in ISO 8859-1. If all I
have are 8-bit characters, I can't choose the charset properly.
-
+
Similarly, when doing 7->8 bit conversions, I don't want to throw
away this information, as it is necessary for proper presentation
to the end user.
_________________________________________________________________
-
+
Q3.20 -- Why can't I get mail to some places, but instead always get the error
"reply: read error from name.of.remote.host"?
Date: January 17, 1997
-
+
This is usually caused by a bug in the remote host's mail server, or
Mail Transport Agent (MTA). The "EHLO" command of ESMTP causes the
remote server to drop the SMTP connection. There are several MTAs that
have this problem, but one of the most common server implementations
can be identified by the "220 All set, fire away" greeting it gives
when you telnet to its SMTP port.
-
+
To work around this problem, you can configure sendmail to use a
mailertable with an entry telling sendmail to use plain SMTP when
talking to that host:
-
+
name.of.remote.host smtp:name.of.remote.host
-
+
Sites which must run a host with this broken SMTP implementation
should do so by having a site running sendmail or some other reliable
(and reasonably modern) SMTP MTA act as an MX server for the problem
host.
-
+
There is also a problem wherein some TCP/IP implementations are
broken, and if any connection attempt to a remote end gets a
"connection refused", then *all* connections to that site will get
closed. Of course, if you try to use the IDENT protocol across a
firewall (at either end), this is highly likely to result in the same
apparent kind of "read error".
-
+
The fix is simple -- on those machines with broken TCP/IP
implementations, do not attempt to use IDENT. When compiling newer
releases of version 8 sendmail, the compiler should automatically
@@ -1291,49 +1310,61 @@ Q3.20 -- Why can't I get mail to some places, but instead always get the error
no longer has this problem, you'll need to go back in and explicitly
configure sendmail for support of IDENT, if you want that feature.
_________________________________________________________________
-
+
Q3.21 -- Why doesn't "FEATURE(xxx)" work?
Date: January 17, 1996
-
+
When creating m4 Master Config (".mc") files for version 8 sendmail,
many FEATURE() macros simply change the definition of internal
variables that are referenced in the MAILER() definitions.
-
+
To make sure that everything works as desired, you need to make sure
that OSTYPE() macros are put at the very beginning of the file,
followed by FEATURE() and HACK() macros, local definitions, and at the
very bottom, the MAILER() definitions. See the configuration
Introduction and Example page for more details.
_________________________________________________________________
-
+
Q3.22 -- How do I configure sendmail not to use DNS?
Date: March 24, 1997
-
+ Updated: April 6, 2000
+ Updated: June 4, 2002
+
In situations where you're behind a firewall, or across a dial-up
line, there are times when you need to make sure that programs (such
as sendmail) do not use the DNS at all.
-
- With version 8.8, you change the service switch file to omit "DNS" and
- use only NIS, files, and other map types as appropriate.
-
- With previous releases of version 8 sendmail, you need to recompile
- the binary and make sure that "NAMED_BIND" is turned off in
- src/conf.h.
-
- Note that you'll need to forward all your outbound mail to another
+
+ With older releases of version 8 sendmail (8.7 and earlier), you
+ needed to recompile the binary and make sure that "NAMED_BIND" was
+ turned off in src/conf.h.
+
+ With versions 8.8 and later, you change the service switch file to
+ omit "DNS" and use only NIS, files, and other map types as
+ appropriate. More information about the service switch file can be
+ found under the ServiceSwitchFile option in §5.6 (Options) of the
+ Installation and Operation Guide and all of §4.9 (Name Server Access).
+
+ And note that you'll need to forward all your outbound mail to another
machine as a "relay" (one that does use DNS, and understands how to
properly use MX records, etc...), otherwise you won't be able to get
mail to any site(s) other than the one(s) you configure in your
- /etc/hosts file (or whatever).
+ /etc/hosts file (or whatever). The use of a smart host is one way to
+ do this; the following in your .mc will do:
+define(`SMART_HOST', `name.of.smart.host')dnl
+
+ Also, starting with 8.9, it may help to include the following in your
+ .mc file:
+FEATURE(`accept_unresolvable_domains')dnl
+FEATURE(`accept_unqualified_senders')dnl
_________________________________________________________________
-
+
Q3.23 -- How do I get all my queued mail delivered to my Unix box from my ISP?
Date: June 6, 1997
Updated: October 8, 1998
-
+
In the contrib directory of the sendmail distribution is a Perl script
called etrn.pl. Assuming you're running sendmail or some other SMTP
MTA on some sort of a Unix host, and your ISP uses version 8.8
@@ -1344,7 +1375,7 @@ Q3.23 -- How do I get all my queued mail delivered to my Unix box from my ISP?
will do the trick. You can learn about Perl at the Perl Language Home
Page. The O'Reilly book is also very helpful.
-
+
If you don't have Perl, something like the following script should do
the trick:
#!/bin/sh
@@ -1357,54 +1388,54 @@ Q3.23 -- How do I get all my queued mail delivered to my Unix box from my ISP?
Note that this is indented for readability, and the real script would
have column position #1 of the file be the first printable character
in each line.
-
+
Of course, you'll have to fill in the appropriate details for
"mail.myisp.com", "mydomain.com", etc....
-
+
If your ISP doesn't use version 8.8 sendmail, you may have to cobble
together alternative solutions. They may have a "ppplogin" script that
is executed every time your machines dials them up, and if so, you may
be able to have them modified this script so as to put a "sendmail
-qRmydomain.com" in it (which is effectively what the "ETRN" command
does, but in a safer fashion).
-
+
Alternatively, they may have a hacked finger daemon, so that you'd put
"finger mydomain.com@theirhost.theirdomain.com" in your script. Or,
they may have some other solution for you. However, only they would be
able to answer what solutions they have available to them.
-
+
Obviously, the easiest and most "standard" solution is to have them
upgrade their system to the most recent stable release of version 8
sendmail. See Q2.8 to find out what exact version this is.
_________________________________________________________________
-
+
Q3.24 -- Why do I get the error message unable to write /etc/mail/sendmail.pid?
Date: August 6, 1997
-
+
sendmail checks if it has write access to the directory in which it
wants to create a file without granting special privileges to 'root'.
To have sendmail run properly, the directories /etc, /etc/mail, and/or
/var/run should be owned by root and be writable by its owner.
_________________________________________________________________
-
+
Q3.25 -- Why can't I compile sendmail with Berkeley DB 2.X?
Date: August 12, 1997
Updated: May 20, 1998
-
+
sendmail 8.8 only supports Berkeley DB 1.85. It will not work with
newer Berkeley DB versions, even in compatibility mode
-
+
Sendmail 8.9, however, does include support for Berkeley DB 2.X,
starting with 2.3.16 .
_________________________________________________________________
-
+
Q3.26 -- What operating systems has Berkeley sendmail been ported to?
Date: December 18, 1997
Updated: September 9, 1999
-
+
Berkeley sendmail 8.9.3 supports most known flavors of UNIX,
including:
386BSD A-UX AIX Altos
@@ -1423,44 +1454,44 @@ maxion uts.systemV
Also, a Windows NT version is available from Sendmail, Inc..
_________________________________________________________________
-
+
Q3.27 -- How do I prevent Relaying Denied errors for my clients?
Date: April 12, 1998
- Last updated: August 9, 1998
-
+ Last updated: June 19, 2000
+
You need to add the fully-qualified host name and/or IP address of
each client to class R, the set of relay-allowed domains. For version
8.8.X, this is typically defined by the file /etc/sendmail.cR ; for
8.9.X, it is typically /etc/mail/relay-domains . Note: if your DNS is
- problematic, you may need to list the IP address in square brackets
- (e.g., [1.2.3.4]) to get the ${client_name} macro to work properly; in
+ problematic, you should list the IP address (e.g., 1.2.3.4); in
general, however, this should not be necessary.
-
+
Once you've updated the appropriate file, SIGHUP your sendmail daemon
and you should be OK.
-
+
Further details are available on our Allowing controlled SMTP relaying
in Sendmail 8.9 page.
_________________________________________________________________
-
+
Q3.28 -- Why isn't virtual hosting working, even after I added a Kvirtuser line
to sendmail.cf?
Date: April 12, 1998
-
+
Just adding the proper Kvirtuser line to sendmail.cf is not enough to
enable the virtual user table feature, a key ingredient for virtual
hosting. You need to use the m4 technique FEATURE(virtusertable);
detailed instructions are provided at our Virtual Hosting with
Sendmail page.
_________________________________________________________________
-
+
Q3.29 -- How can I add a header specifying the actual recipient when having
multiple users in a virtual domain go to a single mailbox?
Date: July 2, 1998
-
+ Updated: June 21, 2002
+
Stuffing multiple user's mail into a single mail box is not a good
method of distributing user mail but if you must do this, the
following solution should allow a tool like fetchmail to separate the
@@ -1471,6 +1502,9 @@ multiple users in a virtual domain go to a single mailbox?
for the domain as follows:
@domain.com domuser+%1
where domuser is the username of the mailbox you will be using.
+ Note that "domuser" must be an actual username, *not* an alias.
+ It may be necessary to append "@localhost", as follows
+@domain.com domuser+%1@localhost
3. Put this in the respective domuser's $HOME/.procmailrc:
DOMAIN=domain.com
ENV_TO=$1
@@ -1485,12 +1519,22 @@ ENV_TO=$1
envelope recipient address when the message is delivered the
normal way via the virtusertable, and UNKNOWN if for some reason
it was sent directly to domuser.
+ You may be tempted to eliminate variable ENV_TO and use $1
+ directly. It won't work, so don't bother.
+ FEATURE(local_procmail) causes sendmail to deliver email to
+ procmail directly. A .forward file is not only unnecessary, it
+ would prevent procmail from setting $1 with the necessary text, so
+ don't use one.
+ You may need to replace formail with /usr/local/bin/formail or
+ some such, depending on whether procmail can find it or not.
+
+ Another possible solution from Andrzej Filip.
_________________________________________________________________
-
+
Q3.30 -- What do I do when Build fails because groff was not found?
Date: September 24, 1998
-
+
You can get groff from ftp://ftp.gnu.org/pub/gnu/. But it's not a big
deal, because:
1. You've already successfully built the sendmail binary to get this
@@ -1498,27 +1542,28 @@ Q3.30 -- What do I do when Build fails because groff was not found?
2. You can just use the preformatted man pages anyway:
% cp *.0 obj*
_________________________________________________________________
-
+
Q3.31 -- What does "class hash not available" mean?
Date: September 24, 1998
-
+
You've built sendmail and/or makemap without NEWDB specified in your
DBMDEF configuration, but you specified the class hash in sendmail.cf
or on a makemap command. The class hash requires NEWDB support, for
which you need the Berkeley database. Please refer to the Database
Definitions section of our Compiling Sendmail web page.
_________________________________________________________________
-
+
Q3.32 -- How do I configure majordomo with sendmail 8.9 without relaxing the
DontBlameSendmail option?
Date: January 26, 1999
-
+ Updated: October 30, 2001
+
We have had some queries about this, as majordomo apparently suggests
some configuration values which sendmail 8.9 does not like. Here is
what one expert suggests:
-
+
The sendmail.cf contains:
O AliasFile=/etc/aliases, /etc/majordomo.aliases
O DontBlameSendmail=Safe
@@ -1558,7 +1603,12 @@ drwxr-xr-x 2 majordom majordom 32768 Jan 26 00:49 /usr/local/lib/majordomo
Now the differences that make this work that may not be the same as
instructed by the majordomo instructions:
1. Put the majordomo.aliases file in /etc, not in the majordomo
- install directory (/usr/local/lib/majordomo).
+ install directory (/usr/local/lib/majordomo). If you can't move
+ the aliases file out of the majordomo directory, you'll need to
+ create the database backing file by hand the first time as root:
+ # touch /usr/local/lib/majordomo/aliases
+ # newaliases -OAliasFile=/usr/local/lib/majordomo/aliases
+
2. Make the permissions on /usr/local/lib/majordomo 0751, not 0775.
3. Make the permissions on /usr/local/lib/majordomo/Log 0664, owned
by majordom, group majordom.
@@ -1568,14 +1618,14 @@ drwxr-xr-x 2 majordom majordom 32768 Jan 26 00:49 /usr/local/lib/majordomo
These permissions/ownership allow majordom to continue to manage
the lists.
_________________________________________________________________
-
+
Q3.33 -- How do I configure my system in general with sendmail 8.9?
Date: May 24, 1999
-
+
The following is taken directly from the DIRECTORY PERMISSIONS section
of the top-level README file in the sendmail distribution.
-
+
Sendmail often gets blamed for many problems that are actually the
result of other problems, such as overly permissive modes on
directories. For this reason, sendmail checks the modes on system
@@ -1600,7 +1650,7 @@ Q3.33 -- How do I configure my system in general with sendmail 8.9?
then the directories listed have inappropriate write permissions and
should be secured to avoid various possible security attacks.
-
+
Beginning with sendmail 8.9, these checks have become more strict to
prevent users from being able to access files they would normally not
be able to read. In particular, .forward and :include: files in unsafe
@@ -1624,23 +1674,273 @@ Q3.33 -- How do I configure my system in general with sendmail 8.9?
The first flag allows the .forward file to be read, the second allows
the items in the file to be marked as safe for file and program
delivery.
-
+
Other files affected by this strengthened security include class files
(i.e. Fw /etc/sendmail.cw), persistent host status files, and the
files specified by the ErrorHeader and HelpFile options. Similar
DontBlameSendmail flags are available for the class, ErrorHeader, and
HelpFile files.
-
+
If you have an unsafe configuration of .forward and :include: files,
you can make it safe by finding all such files, and doing a "chmod
go-w $FILE" on each. Also, do a "chmod go-w $DIR" for each directory
in the file's path.
-
+ _________________________________________________________________
+
+Q3.34 -- What does "foo not available for sendmail programs" mean?
+
+ Date: September 24, 1999
+
+ It means that you are using smrsh, the sendmail restricted shell; see
+ Q2.13 for details on this. To fix this problem, you need to create a
+ sym-link from smrsh's directory for restricted programs to the program
+ foo. The default location of this directory for restricted programs is
+ /usr/adm/sm.bin in the Open Source version, but vendor versions
+ differ. For example, RedHat Linux 6.0 uses /etc/smrsh, and Solaris 8
+ uses /var/adm/sm.bin . If you don't know the directory for your OS,
+ first check the smrsh man page, then if that fails, try:
+ % strings /path/to/smrsh | grep ^/
+
+ where /path/to/smrsh is the P= argument on the Mprog line in
+ sendmail.cf .
+
+ So for example:
+ % cd /usr/adm/sm.bin
+ % ln -s /usr/bin/vacation
+
+ would allow the vacation program to be run from a user's .forward file
+ or an alias which uses the "|program" syntax.
+
+ Finally, if you want to disable use of smrsh, remove the
+ FEATURE(`smrsh') line from the .mc file used to build sendmail.cf; see
+ cf/README for details on this.
+ _________________________________________________________________
+
+Q3.35 -- How do I add a footer/signature to all (outgoing) e-mail messages?
+
+ Date: October 9, 2000
+ Updated: August 1, 2001
+ Updated: May 16, 2002
+ Updated: February 22, 2003
+
+ This is quite complicated. At first sight it might be simple: just
+ "cat" some text (taken from a file or whatever) to the end of an
+ e-mail message passing through sendmail. However, there is a big
+ problem: what about structured e-mail messages, i.e., MIME messages?
+ These can be arbitrarily complex and just "cat"ting a footer to the
+ end of the body can break the MIME structure. (A MIME aware MUA will
+ just not show such a footer, so it's pretty useless in any case.) But
+ signed messages (think: PGP) will break. Another problem is the
+ character set used by the mime part to which the disclaimer is added
+ needs to match the actual character set of the disclaimer itself.
+ Hence, there is no easy solution to this problem!
+
+ If you know enough about MIME and some C programming, then take a look
+ at sendmail 8.11 (or later) and libmilter/README. It now offers the
+ functionality to achieve this goal.
+
+ Some open source milters are capable of adding footers, e.g.
+ MIMEDefang.
+ _________________________________________________________________
+
+Q3.36 -- What does "Cannot open hash database ... Invalid argument" mean?
+
+ Date: January 3, 2001
+ Updated: February 8, 2001
+
+ It's an error returned from the Berkeley DB library. It normally means
+ that the db file was built with a different version of Berkeley DB
+ than the one sendmail is currently using. You need to recompile
+ makemap with the same version of Berkeley DB that sendmail was
+ compiled with, and re-make your maps with that new version of makemap.
+
+ From a typical Unix 'errno' man page:
+
+ 22 EINVAL Invalid argument. Some invalid argument was supplied.
+
+ From the Berkeley DB 2.x 'db_open' man page (1.x 'dbopen' is similar):
+
+EINVAL
+ ...
+
+ There is a mismatch between the version number of file and the
+ software.
+
+ Berkeley DB 3.x uses a special errno value for this - from its
+ 'db_open' man page:
+
+DB_OLD_VERSION
+ The database cannot be opened without being first upgraded.
+
+ Unfortunately this isn't specifically handled by sendmail upto and
+ including 8.11.2, resulting in an error message that says something
+ like "Error -30990" instead of "Invalid argument".
+
+ Here is a table mapping versions of Berkeley DB with the corresponding
+ sendmail versions in which they are supported:
+
+ Berkeley DB Sendmail
+ 0.X - 1.4 (OLD_NEWDB) 8.1 - 8.8.8
+ 1.5 and later 1.X 8.1 and later
+ 2.0.0-2.6.3 8.9.0 and later
+ 2.6.4 and later 2.X 8.9.2 and later
+ 3.0 and later 3.X 8.10.0 and later
+ _________________________________________________________________
+
+Q3.37 -- What does "parse error before `NDBM'" mean?
+
+ Date: April 21, 2001
+
+ This error is generally accompanied by a message indicating which file
+ it occurred in, and which line number of that file, usually:
+ERROR NDBM or NEWDB must be defined.
+
+ You are supposed to read that line, and do something about it.
+
+ Normally, on Linux and the various BSDs, NEWDB is used, whereas on the
+ "commercial" Unix variants (Solaris, HP-UX, possibly others), NDBM is
+ used. Perhaps you failed to install the required libraries when you
+ installed your system.
+
+ Please refer to 3.31 and the Database Definitions section of our
+ Compiling Sendmail web page for further details.
+ _________________________________________________________________
+
+Q3.38 -- What does "may be forged" mean?
+
+ Date: November 12, 2001
+
+ After sendmail does a hostname look-up on the IP address of the
+ connecting client, the IP addresses of that hostname are looked up. If
+ the client IP address does not appear in that list, then the may be
+ forged tag is added.
+ _________________________________________________________________
+
+Q3.39 -- How do I send using an alternate port?
+
+ Date: May 5, 2002
+
+ You can have Sendmail use port 2525 when sending to your domain.
+ define(`SMTP_MAILER_ARGS', `TCP $h 2525')
+
+ or editing .cf directly,
+ A=TCP $h 2525
+
+ will force sendmail to use port 2525. But, this will be for all SMTP
+ connections. To do it only for your domain, use /etc/mail/mailertable,
+ yourdomain.com mysmtp:mail.yourdomain.com
+
+ where 'mysmtp' is an exact duplicate of the 'esmtp' mailer definition,
+ except for the port number in 'A=...'. Of course, change 2525 to
+ whatever alternate port number you wish to use.
+ _________________________________________________________________
+
+Q3.40 -- Why can't I use BerkeleyDB 4.1.x?
+
+ Date: November 15, 2002
+ Updated: December 29, 2002
+
+ SleepyCat changed the API from Berkeley DB 4.0 to 4.1. Hence it is not
+ supported in sendmail 8.12.6. Moreover, the semantics of the open()
+ call have been changed, hence sendmail doesn't work with DB 4.1.x (x
+ <= 24), even if the "obvious" API changes are made.
+
+ However, with the release of Berkeley DB 4.1.25 and sendmail 8.12.7,
+ things should work again with these versions (or greater, when the
+ time comes).
+ _________________________________________________________________
+
+Q3.41 -- How do I use CIDR notation in the access map (or other places)?
+
+ Date: December 3, 2002
+
+ Use contrib/cidrexpand to pre-process the data into a format that is
+ supported by sendmail. For example:
+cidrexpand < access | makemap hash access
+ _________________________________________________________________
+
+Q3.42 -- Why isn't CIDR notation directly supported by sendmail?
+
+ Date: December 3, 2002
+
+ Because it is in general very expensive to do this. Here's an
+ explanation from Per Hedeland:
+
+ And not just more complex, it would have to do many more
+ (comparatively expensive) lookups - there's no way, given (e.g.)
+ the IP address 66.205.192.123, to find the matching
+ "66.205.192.0/19" with a single lookup in a general key/value
+ hashed map. The code would have to look for "66.205.192.123",
+ "66.205.192.122/31", "66.205.192.120/30", "66.205.192.120/29", etc,
+ etc - 14 lookups to find a /19, 32 to establish a non-match.
+
+ which is 8 times more than the available octet boundary lookup.
+
+ I haven't done any measurements, but I wouldn't be surprised if
+ even in the absolute worst case, that your map is 128 times bigger
+ than it "needs" to be, the time for a single lookup won't even
+ double - i.e. you'll lose already on the second lookup.
+ _________________________________________________________________
+
+Q3.43 -- What does "Need to recompile with -DNEWDB for hash support" mean?
+
+ Date: December 24, 2002
+
+ See Q3.31. This is the newer form of the same error message, updated
+ to be more informative and clueful. The actual line of code contains:
+ "%s: Need to recompile with -D%s for %s support\n"
+
+ where the first %s gets replaced by the name of the program (generally
+ makemap), the second %s gets replaced by the name of the macro which
+ needs to be defined (see the Database Definitions section of our
+ Compiling Sendmail web page for the full list), and the third %s gets
+ replaced by the argument to makemap which could not be handled.
+ _________________________________________________________________
+
+Q3.44 -- I disabled sendmail on some machines which don't receive mail, but
+since upgrading to 8.12 they can't send mail either; why?
+
+ Date: January 13, 2003
+
+ 8.12 uses a new paradigm: the binary is no longer setuid-root; to make
+ this work, there are now two queues, a "main" queue and a client-only
+ queue. To match these, there are two config files: one for the main
+ queue (sendmail.cf) and one for the client-only queue (submit.cf).
+ There are also two sendmail processes which need to run: a daemon and
+ a client queue runner. In the default configuration of sendmail, the
+ client queue runner must be able to submit mail to the daemon on the
+ local SMTP port. If the daemon is not listening on the SMTP port, the
+ mail remains in the client-only queue. If you don't want to accept
+ mail from other machines, you should add one or both of the following
+ lines to your .mc file:
+DAEMON_OPTIONS(`NAME=NoMTA4, Family=inet, Addr=127.0.0.1')dnl
+DAEMON_OPTIONS(`NAME=NoMTA6, Family=inet6, Addr=::1')dnl
+
+ If your machine has IPv4 addresses configured, use the first line;
+ likewise, use the second line if it has IPv6 addresses configured, and
+ both if both types of addresses are configured. Then build a new .cf
+ file from your .mc file, install it as /etc/mail/sendmail.cf and start
+ sendmail.
+
+ In some cases, however, it might be better instead to modify
+ submit.mc, to use
+FEATURE(`msp', `smart_host')dnl
+
+ instead of the default
+FEATURE(`msp', `[127.0.0.1]')dnl
+
+ This has the advantage that you don't have to run a daemon on the
+ local host, but a disadvantage of introducing a dependency on the
+ smart_host machine. Which of the two solutions is better for you
+ depends on whether or not your network architecture has such a
+ smart_host, how reliable you deem that smart_host to be, and how
+ inconvenient running a daemon locally would be.
+
sendmail.org
-
+
4. GENERAL SENDMAIL ISSUES
-
+
* 4.1 Should I use a wildcard MX for my domain?
* 4.2 How can I set up an auto-responder?
* 4.3 How can I get sendmail to deliver local mail to $HOME/.mail
@@ -1664,25 +1964,32 @@ Q3.33 -- How do I configure my system in general with sendmail 8.9?
* 4.14 How do I queue mail for another domain?
* 4.15 How do create attachments with sendmail?
* 4.16 How do I find sendmail's version number?
+ * 4.17 How do I handle user names with upper-case characters?
+ * 4.18 What does "NOQUEUE: Null connection from ..." mean?
+ * 4.19 How do I configure sendmail for POP/IMAP/... ?
+ * 4.20 How can I automatically copy messages based on sender or
+ recipient addresses?
+ * 4.21 How can I send mail to all users?
+ * 4.22 Why can't I receive external mail?
_________________________________________________________________
-
+
Q4.1 -- Should I use a wildcard MX for my domain?
Date: July 9, 1996
Updated: November 5, 1997
-
+
If at all possible, no.
-
+
Wildcard MX records have lots of semantic "gotcha"s. For example, they
will match a host "unknown.your.domain" -- if you don't explicitly
test for unknown hosts in your domain, you will get "MX list for
hostname points back to hostname" or "config error: mail loops back to
myself".
-
+
See RFCs 1535, 1536, and 1912 (updates RFC 1537) for more detail and
other related (or common) problems. See also _DNS and BIND_ by Albitz
and Liu.
-
+
They can also cause your system to add your domain to outgoing FQDNs
in a desperate attempt to get the mail to where it's supposed to go,
but because *.your.domain is valid due to the wildcard MX, delivery to
@@ -1690,20 +1997,23 @@ Q4.1 -- Should I use a wildcard MX for my domain?
find yourself in a loop as the domain keeps getting tacked on time
after time after time (the "config error: mail loops back to myself"
problem).
-
+
Wildcard MX records are just a bad idea, plain and simple. They don't
work the way you'd expect, and virtually no one gets them right. Avoid
them at all costs.
_________________________________________________________________
-
+
Q4.2 -- How can I set up an auto-responder?
Date: March 23, 1996
Updated: February 16, 1999
-
+ Updated: July 30, 2002
+
This is a local mailer issue, not a sendmail issue. Depending on what
- you're doing, look at procmail (see Q4.9), ftpmail, or Majordomo.
-
+ you're doing, look at procmail (see Q4.9), ftpmail, Majordomo or of
+ course vacation, which is part of the sendmail (8.10.0 and later)
+ distribution.
+
The latest version of Majordomo can be found at
ftp://ftp.greatcircle.com/pub/majordomo/. It is written in Perl and
requires either Perl 4.036, and appears to run with only minor tweaks
@@ -1713,18 +2023,18 @@ Q4.2 -- How can I set up an auto-responder?
Perl (both 4.x and 5.x) can be found in
http://www.metronet.com/perlinfo/src/. More information about Perl can
be found at http://www.metronet.com/perlinfo/perl5.html
-
+
The latest version of ftpmail can be found at
ftp://src.doc.ic.ac.uk/packages/ftpmail or any comp.sources.misc
archive (volume 37).
_________________________________________________________________
-
+
Subject: Q4.3 -- How can I get sendmail to deliver local mail to $HOME/.mail
instead of into /usr/spool/mail (or /usr/mail)?
Date: July 9, 1996
Updated: January 7, 1999
-
+
Again, this is a local mailer issue, not a sendmail issue. Either
modify your local mailer (source code will be required) or change the
program called in the "local" mailer configuration description to be a
@@ -1732,110 +2042,108 @@ instead of into /usr/spool/mail (or /usr/mail)?
of doing this is procmail (see Q4.9), although there are probably many
others as well.
_________________________________________________________________
-
+
Subject: Q4.4 -- Why does it deliver the mail interactively when I'm trying to
get it to go into queue only mode?
Date: March 23, 1996
-
+ Updated: August 14, 2000
+
Or, I'm trying to use the "don't deliver to expensive mailer" flag,
and it delivers the mail interactively anyway. I can see it does it:
here's the output of "sendmail -v foo@somehost" (or Mail -v or
equivalent).
-
+
The -v flag to sendmail (which is implied by the -v flag to Mail and
other programs in that family) tells sendmail to watch the
transaction. Since you have explicitly asked to see what's going on,
it assumes that you do not want to to auto-queue, and turns that
feature off. Remove the -v flag and use a "tail -f" of the log instead
to see what's going on.
-
+
If you are trying to use the "don't deliver to expensive mailer" flag
- (mailer flag "e"), be sure you also turn on global option "c" --
- otherwise it ignores the mailer flag.
+ (mailer flag "e"), be sure you also turn on global option
+ "HoldExpensive" (whose old one-character name was "c") -- otherwise it
+ ignores the mailer flag.
_________________________________________________________________
-
+
Subject: Q4.5 -- How can I solve "MX list for hostname points back to hostname"
and "config error: mail loops back to myself" messages?
Date: January 17, 1997
- Updated: November 5, 1997
-
+ Updated: May 8, 2000
+ Updated: January 24, 2002
+
I'm getting these error messages:
553 MX list for domain.net points back to relay.domain.net
554 <user@domain.net>... Local configuration error
How can I solve this problem?
-
- You have asked mail to the domain (e.g., domain.net) to be forwarded
- to a specific host (in this case, relay.domain.net) by using an MX
+
+ You have asked mail to a domain (e.g., domain.net) to be forwarded to
+ a specific host (in this case, relay.domain.net) by using an MX
record, but the relay machine doesn't recognize itself as domain.net.
- Add domain.net to /etc/sendmail.cw (if you are using
- FEATURE(use_cw_file)) or add "Cw domain.net" to your configuration
+ Add domain.net to /etc/mail/local-host-names [known as
+ /etc/sendmail.cw prior to version 8.10] (if you are using
+ FEATURE(`use_cw_file')) or add "Cw domain.net" to your configuration
file.
-
+
+ There are a couple of additional cases where you don't actually want
+ local delivery, and thus adding domain.net to class w is not the right
+ fix:
+ * When relay.domain.net should just be acting as a forwarder, e.g. a
+ firewall/gateway box. The proper fix could be to set up a
+ mailertable entry for domain.net.
+ * When relay.domain.net is a secondary (etc.) MX, and the MX
+ mistakenly points to a CNAME or other "non-canonical" name [this
+ gives "config error: mail loops back to me (MX problem?)"]. The
+ proper fix is to point the MX at the actual name, a "work-around"
+ to add the MX target to class w.
+
IMPORTANT: When making changes to your configuration file, be sure you
- kill and restart the sendmail daemon (for ANY change in the
+ kill and restart the sendmail daemon (for any change in the
configuration, not just this one):
- kill `head -1 /etc/sendmail.pid`
- sh -c "`tail -1 /etc/sendmail.pid`"
-
- NOTA BENE: kill -1 does not work with versions prior to 8.7.y!
-
- With version 8.8.z sendmail, if the daemon was started up with a full
- pathname (i.e., "/usr/lib/sendmail -bd -q13m"), then you should be
- able to send it a HUP signal ("kill -1", or more safely, "kill -HUP")
- and have it reload itself (version 8.7.y sendmail cannot do this
- safely, and represents a security risk if it's not replaced with
- version 8.8.3 or later).
- _________________________________________________________________
-
+ kill -HUP `head -1 /var/run/sendmail.pid`
+
+ Note: You can also get this error message (MX loops ...) when two
+ sendmail systems talk to each other, and both have the same value of
+ $j . The best solution is "don't do that."
+ _________________________________________________________________
+
Subject: Q4.6 -- Why does my sendmail process sometimes hang when connecting
over a SLIP/PPP link?
Date: March 23, 1996
-
+
I'm connected to the network via a SLIP/PPP link. Sometimes my
sendmail process hangs (although it looks like part of the message has
been transfered). Everything else works. What's wrong?
-
+
Most likely, the problem isn't sendmail at all, but the low level
network connection. It's important that the MTU (Maximum Transfer
Unit) for the SLIP connection be set properly at both ends. If they
disagree, large packets will be trashed and the connection will hang.
_________________________________________________________________
-
+
Subject: Q4.7 -- How can I summarize the statistics generated by sendmail in
the syslog?
Date: April 9, 1997
Updated: January 4, 1999
-
+ Updated: March 27, 2000
+ Updated: July 13, 2000
+ Updated: May, 2001
+ Updated: August, 2001
+ Updated: November, 2001
+
This question is addressed on pages 445-449 of _sendmail, 2nd Ed_ (see
page 319 of first edition) by Bryan Costales (see entry
sendmail-faq//book/ISBN/1-56592-222-0 in Q6.1).
-
- An updated version of this syslog-stat.pl script (so that it
- understands the log format used in version 8 sendmail) is at
- ftp://ftp.his.com/pub/brad/sendmail/syslog_stats. The updated version
- of ssl has been uploaded to the SMTP Resources Directory (in
- ftp://ftp.is.co.za/networking/mail/tools/), as well as
- ftp://ftp.his.com/pub/brad/sendmail/ssl. There is also another program
- (written by Bryan Beecher) at
- ftp://ftp.his.com/pub/brad/sendmail/smtpstats.
-
- If you're interested in summarizing POP statistics, there is
- ftp://ftp.his.com/pub/brad/sendmail/popstats, also written by Bryan
- Beecher, and popstats.pl, written by Ryan Matteson.
-
+
To see what else is available today, check the Comprehensive Perl
- Archive Network ftp://ftp.funet.fi/pub/languages/perl/CPAN/CPAN or
- ftp://ftp.cis.ufl.edu/pub/perl/CPAN/CPAN for the site nearest you. For
- the scripts themselves, look under CPAN/scripts/mailstuff/ at any CPAN
- site. For more information, see the comp.lang.perl.* FAQs at
- ftp://ftp.cis.ufl.edu:/pub/perl/faq/FAQ or
- ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/comp/lang/perl/.
-
+ Archive Network. For more information, see the comp.lang.perl.* FAQs
+ at ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/comp/lang/perl/.
+
If you're interested in using these kinds of tools to help you do some
near real-time monitoring of your system, you might be interested in
MEWS (Mail Early Warning System). From the README:
@@ -1861,29 +2169,48 @@ the syslog?
If this sounds like something you might be interested in getting more
details about, you can find the MEWS archive at
ftp://ftp.qualcomm.com/pub/people/eamonn/mews.tar.Z.
+
+ Here's an update from Stephane Lentz on June 29, 2000:
+ * anteater - written in C++ (+ STL lib), fast, really promising (you
+ can add modules)
+ * mreport - written in C, works fine on small logs but not with big
+ hubs' log (all data are stored into memory)
+
+ See also John Oliver's sendmail tools page for pointers to several
+ related scripts. (May 25, 2001)
+
+ Brad Knowles's links for popstats, smtpstats and syslog_stats have
+ been revived at a new location. (May 29, 2001)
+
+ Two new links (November 12, 2001):
+ * Counterpane: Log Analysis Resources
+ * LogReport
_________________________________________________________________
-
+
Subject: Q4.8 -- How can I check my sendmail.cf to ensure that it's re-writing
addresses correctly?
- Date: July 9, 1996
-
- The recommended program for this is "checksendmail" by Rob Kolstad.
- Old versions of this are available on various archive sites, but
- currently, the only way to get the most recent version (which has been
- updated to understand version 8.7 long option name syntax, as well as
- now supporting both Perl 4.x and Perl 5.x) is from Rob himself.
-
- The latest archive will be made publicly available (most likely
- through the SMTPRD run by Andras Salamon; see Q6.5, entry
- sendmail-faq//online/index/14) as soon as it is received.
- _________________________________________________________________
-
+ Date: June 3, 2002
+
+ Sendmail's test mode is best for this. See the Sendmail Installation
+ and Operation Guide, § 3.8 (Testing Configuration files); here is a
+ short sample:
+% sendmail -bt -C /path/to/test/sendmail.cf
+ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
+Enter <ruleset> <address>
+> /tryflags hs
+> /try esmtp user@domain.com
+Trying header sender address user@domain.com for mailer esmtp
+...
+> /quit
+%
+ _________________________________________________________________
+
Subject: Q4.9 -- What is procmail, and where can I get it?
Date: April 8, 1997
Updated: February 28, 1999
-
+
The program "procmail" is a replacement for the local mailer
(variously called /bin/mail, /usr/bin/mail, mail.local, rmail,
etc...). It has been ported to run on virtually every Unix-like OS
@@ -1894,13 +2221,13 @@ Subject: Q4.9 -- What is procmail, and where can I get it?
mailers) and very robust. Procmail is also capable of helping you put
a quota on a user's mailbox through the standard Unix quota mechanism
(see Q4.3).
-
+
In short, whatever you've got, you're almost guaranteed that procmail
is better (if nothing else, the author has been able to focus lots of
time and energy into making it the best and fastest tool available,
while most system vendors just throw something together as fast as
they can and move on to the whole rest of the OS).
-
+
However, this only begins to scratch the surface of what procmail is
capable of. It's most important feature is the fact that it gives you
a standard way to create rules (procmail calls them "recipes") to
@@ -1909,22 +2236,22 @@ Subject: Q4.9 -- What is procmail, and where can I get it?
administrator can have in their repertoire. By filtering out or
automatically dealing with 80% of your daily cruft, it lets you spend
more time on the hard 20%.
-
+
Note that recent releases of version 8 sendmail natively support using
procmail as an alternate local mailer (see "FEATURE(local_procmail)"
for version 8.7 and above). They also support procmail as an
additional local mailer, if you're concerned about flat-out replacing
your current local mailer with procmail (see "MAILER(procmail)" in
version 8.7 and above).
-
+
You can also install procmail as a user and run it out of your
.forward file, although this tends to be a bit slower and less
efficient.
-
+
More information about procmail can be found at
http://www.procmail.org/ and the latest version can be found at
ftp://ftp.procmail.org/pub/procmail/.
-
+
Procmail is also the core to a mailing list management package called
"SmartList", so if you've already got procmail, adding SmartList may
be a good option. Some listowners prefer Majordomo, Listserv, or one
@@ -1932,66 +2259,66 @@ Subject: Q4.9 -- What is procmail, and where can I get it?
as well. Your personal tastes will dictate whether you swear by
SmartList or at it.
_________________________________________________________________
-
+
Subject: Q4.10 -- How can I solve "cannot alias non-local names" errors?
Date: March 24, 1997
-
+
I upgraded from my vendor's sendmail to the latest version and now I'm
getting these error messages when I run "newaliases":
- /etc/aliases: line 13: MAILER-DAEMON... cannot alias non-local names
- /etc/aliases: line 14: postmaster... cannot alias non-local names
+/etc/aliases: line 13: MAILER-DAEMON... cannot alias non-local names
+/etc/aliases: line 14: postmaster... cannot alias non-local names
How can I solve this problem?
-
+
Your local mailer doesn't have the "A" flag specified. Edit the Mlocal
line in sendmail.cf and add "A" to the flags listed after "F=".
-
+
Better yet, if you're running a recent version of sendmail that uses
m4 to generate .cf files from .mc files, regenerate your sendmail.cf
and see if that fixes the problem. Remember to install the new
sendmail.cf and restart the sendmail daemon.
_________________________________________________________________
-
+
Subject: Q4.11 -- Is sendmail Year-2000 (Y2K) compliant?
Date: April 24, 1997
Updated: July 7, 1999
-
+
Please refer to the Sendmail Year 2000 Readiness Disclosure page.
_________________________________________________________________
-
+
Subject: Q4.12 -- How can I batch remote mail to be sent using my ISP while
delivering local mail immediately?
Date: October 14, 1997
Updated: February 9, 1999
-
+
First, you need to get sendmail not to use DNS on your local machine
so your host doesn't trying to connect to your ISP for a DNS query.
See Q3.22 for more information.
-
+
You also need to designate a "smart host" or external relay to handle
all mail that you can't deliver locally (this would be your ISP's
mailhost).
-
+
You need to configure it so that the smtp mailer is considered
"expensive" by adding the F=e mailer flag and tell sendmail not to
connect to expensive mailers by default by setting the HoldExpensive
option to True.
-
+
You need to add mydomain.com to the sendmail.cw file or the Cw line in
the sendmail.cf. See Q4.5.
-
+
Finally, you need to run a program periodically to check in with your
ISP and get them to deliver any mail they may have queued for you. See
Q3.23.
_________________________________________________________________
-
+
Subject: Q4.13 -- What does "unknown mailer error 1" mean?
Date: September 24, 1998
-
+
In general, sendmail does not perform final delivery of messages, but
relies on a local delivery agent instead. Such an agent, mail.local,
is provided with the sendmail distribution. Any such agent that
@@ -2001,42 +2328,43 @@ Subject: Q4.13 -- What does "unknown mailer error 1" mean?
78, so 1 would be out of range, and lead to sendmail generating the
above error.
_________________________________________________________________
-
+
Subject: Q4.14 -- How do I queue mail for another domain?
Date: April 28, 1999
-
+ Updated: December 21, 2000
+
Situation: Your system mailserver.my.domain should act as a backup
- mailserver for mailserver.client.domain. The client wants to receive
- mail for the address user@client.domain. This requires:
+ mailserver for mailserver.destination.domain. The client wants to
+ receive mail for the address user@destination.domain. This requires:
1. MX Records:
-client.domain. IN MX 10 mailserver.client.domain.
-client.domain. IN MX 20 mailserver.my.domain.
-mailserver.client.domain. IN MX 10 mailserver.client.domain.
-mailserver.client.domain. IN MX 20 mailserver.my.domain.
+destination.domain. IN MX 10 mailserver.destination.domain.
+destination.domain. IN MX 20 mailserver.my.domain.
+mailserver.destination.domain. IN MX 10 mailserver.destination.domain.
+mailserver.destination.domain. IN MX 20 mailserver.my.domain.
The last two records are there "just in case" (someone forgot
masquerading).
Make sure you use the real names of all systems.
mailserver.my.domain must know its own name, otherwise you'll get
the famous mail loops back to myself error.
Instead of using MX records that point to
- mailserver.client.domain, you can use the FEATURE(mailertable) on
- mailserver.my.domain as explained in cf/README for routing
- e-mails.
+ mailserver.destination.domain, you can use the
+ FEATURE(mailertable) on mailserver.my.domain as explained in
+ cf/README for routing e-mails.
2. On your system: do nothing unless you have anti-relay rules
installed (which you really should have!). In this case, add
- client.domain to the required files (8.9) (or for 8.8). Don't add
- client.domain or mailserver.client.domain to class w on your
- system!
+ destination.domain to the required files (8.9) (or for 8.8). Don't
+ add destination.domain or mailserver.destination.domain to class w
+ on your system!
3. sendmail on your system will try to deliver mail during queue
runs, however, the client may trigger delivery by using the ETRN
command.
_________________________________________________________________
-
+
Subject: Q4.15 -- How do I create attachments with sendmail?
Date: May 26, 1999
-
+
You don't. Sendmail is a mail transfer agent (MTA). Creating e-mail
messages, including adding attachments or signatures, is the function
of a mail user agent (MUA). Some popular MUAs include mutt, elm, exmh,
@@ -2044,50 +2372,176 @@ Subject: Q4.15 -- How do I create attachments with sendmail?
Perl modules, etc.) can also be used to create messages with
attachments.
_________________________________________________________________
-
+
Subject: Q4.16 -- How do I find sendmail's version number?
Date: August 2, 1999
-
+ Updated: July 19, 2000
+ Updated: December 28, 2001
+
To find out which version is actually running, from without, telnet to
the SMTP port (port 25). The daemon usually announces its name and
version number, as in
- thishost% telnet that.host 25
- Trying IP_addr...
- Connected to that.host.
- Escape character is '^]'.
- 220 that.host ESMTP Sendmail 8.9.3/8.9.3; Mon, 2 Aug 1999 11:39:34 -0700
- ^]
- telnet> quit
+thishost% telnet that.host 25
+Trying IP_addr...
+Connected to that.host.
+Escape character is '^]'.
+220 that.host ESMTP Sendmail 8.12.1/8.12.1; Fri, 28 Dec 2001 11:39:34 -0800
+QUIT
To query a binary on your local host, the following command should
display its version number, along with some extra configuration
information, possibly including the configuration version number:
- % echo \$Z | /usr/sbin/sendmail -bt -d0
- Version 8.9.3
- Compiled with: MAP_REGEX LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND
- NETINET NETISO NETUNIX NEWDB QUEUE SCANF SMTP USERDB XDEBUG
-
- ============ SYSTEM IDENTITY (after readcf) ============
- (short domain name) $w = knecht
- (canonical domain name) $j = knecht.sendmail.org
- (subdomain name) $m = sendmail.org
- (node name) $k = knecht.sendmail.org
- ========================================================
-
- ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
- Enter <ruleset> <address>
- > 8.9.3
- %
+% echo \$Z | /usr/sbin/sendmail -bt -d0
+Version 8.12.1
+ Compiled with: MAP_REGEX LOG MATCHGECOS MIME7TO8 MIME8TO7 NAMED_BIND
+ NETINET NETUNIX NEWDB NIS QUEUE SCANF SMTP USERDB XDEBUG
+
+============ SYSTEM IDENTITY (after readcf) ============
+ (short domain name) $w = knecht
+ (canonical domain name) $j = knecht.Sendmail.ORG
+ (subdomain name) $m = Sendmail.ORG
+ (node name) $k = knecht.Sendmail.ORG
+========================================================
+
+ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
+Enter <ruleset> <address>
+> 8.12.1
+%
Adjust the pathname as needed; /usr/lib and /usr/sbin are the most
common locations.
-
+ _________________________________________________________________
+
+Subject: Q4.17 -- How do I handle user names with upper-case characters?
+
+ Date: November 18, 1999
+ Updated: August 8, 2001
+
+ You really shouldn't, because upper case characters in user names are
+ contrary to the Unix tradition. If you do, then e-mail addresses will
+ be case sensitive, so that mail to <USER@your.host> will bounce
+ instead of being delivered to <user@your.host>. As this is contrary to
+ the expectations of many, it is not recommended.
+
+ But if you insist on doing so anyway, and you have version 8.10, put
+ the following in your .mc file:
+MODIFY_MAILER_FLAGS(`LOCAL', `+u')dnl
+
+ If you don't have 8.10, you will need to redefine the
+ LOCAL_MAILER_FLAGS m4 variable, but the initial value varies from OS
+ to OS, so this is yet another reason not to mess with this flag.
+
+ Another hack is the creation of aliases for Uppercase local users in
+ the form:
+# lowercase version to real one
+uppercase: Uppercase
+
+ It will make sendmail deliver messages to uppercase local recipients
+ in a case insensitive manner.
+ _________________________________________________________________
+
+Subject: Q4.18 -- What does "NOQUEUE: Null connection from ..." mean?
+
+ Date: February 24, 2000
+ Updated: March 12, 2000
+
+ An entry like:
+NOQUEUE: Null connection from host.domain [IP.AD.DD.RESS]
+
+ in the logfile means that host.domain connected to your MTA but
+ neither initiated transmission of a message (by issuing the MAIL
+ command), nor used any of the commands that are logged separately
+ (EXPN/VRFY/ETRN). Unless this happens very often, you can ignore this.
+ If it happens very often, it's either someone playing around or it's a
+ network problem.
+
+ Note 1: The significant part of the message isn't the NOQUEUE, but the
+ "Null connection from ...". In particular, NOQUEUE isn't an error
+ indication, but just a "place-holder" when no queue ID has been
+ assigned, typically because message collection hasn't started (yet).
+ It can occur in other messages too, and there too the significant part
+ is what comes after the NOQUEUE.
+
+ Note 2: In 8.10, the text which led to the confusion has been changed
+ to: "... did not issue MAIL/EXPN/VRFY/ETRN during connection to ...".
+ _________________________________________________________________
+
+Subject: Q4.19 -- How do I configure sendmail for POP/IMAP/... ?
+
+ Date: March 12, 2000
+
+ You don't. Sendmail is a mail transfer agent whose primary purpose is
+ to send and receive e-mail (primarily via SMTP). Sendmail does not
+ implement any remote access protocols such as POP or IMAP. But if you
+ want to learn more about these and other (non-sendmail) e-mail related
+ things, please refer to our Other (Non-Sendmail) E-Mail Related Links
+ page.
+ _________________________________________________________________
+
+Subject: Q4.20 -- How can I automatically copy messages based on sender or
+recipient addresses?
+
+ Date: June 30, 2000
+ Updated: February 27, 2001
+ Updated: June 5, 2001
+ Updated: February 13, 2003
+
+ It would require custom programming. You could either write a mail
+ filter using the new Milter API in sendmail 8.10 and later (see
+ libmilter/README) or you could look at some of these other unsupported
+ hints:
+ * Axel Reinhold's logall.c module
+ * Message-Id: <33AA593A.4B701C3F@syntegra.nl>
+ * the procmailrc man page
+
+ Note that no such feature has been added to sendmail. When asked about
+ this one of the sendmail developers said it was "because we still
+ believe a bit in privacy."
+ _________________________________________________________________
+
+Subject: Q4.21 -- How can I send mail to all users?
+
+ Date: December 12, 2000
+
+ There is no magic short-cut for this. But it is not hard to set up:
+ create an aliases entry
+alluser: :include:/etc/mail/allusers
+
+ Don't forget to run 'newaliases'. Then list your users, one per line,
+ in the file '/etc/mail/allusers'. You might be able to do that with
+ awk -F: '$3 > 100 { print $1 }' /etc/passwd > /etc/mail/allusers
+ _________________________________________________________________
+
+Subject: Q4.22 -- Why can't I receive external mail?
+
+ Date: December 4, 2002
+
+ Several vendors have changed the way that sendmail is run. They
+ decided that most people need a client-only version of sendmail. So it
+ is listening only on the localhost interface. Check the system
+ documentation on how to change your .mc file. Here is a partial table
+ of where some vendors ship their sendmail configuration hierarchy:
+
+ sendmail distribution ./cf
+ Solaris /usr/lib/mail
+ Red Hat 6.2 /usr/lib/sendmail-cf
+ Red Hat 7 /usr/share/sendmail-cf
+ Slackware 7.1 /usr/src/sendmail/cf
+
+ But you should check for yourself on your own system. When in doubt,
+ do a find for "proto.m4", then go up the tree one level. When you find
+ the .mc file, look for the string "DAEMON_OPTIONS" and for the comment
+ lines near that string.
+
+ See also 5.3.1.3 for discussion about this problem as it relates
+ specifically to Red Hat 7.1 and later.
+
sendmail.org
-
+
5. VENDOR/OS SPECIFIC SENDMAIL ISSUES
-
+
* 5.1 Sun Microsystems SunOS/Solaris 1.x/2.x
+ 5.1.1 How can I solve "line 273: replacement $3 out of
bounds" errors?
@@ -2105,15 +2559,26 @@ Subject: Q4.16 -- How do I find sendmail's version number?
+ 5.2.2 Why can't I use AIX to get email to some sites?
+ 5.2.3 Why can't I get sendmail 8.7.1 to use MX records with
AIX 3.2.5?
+ * 5.3 Linux
+ + 5.3.1 Red Hat
+ o 5.3.1.1 Why do I have so many sendmail problems after
+ configuring sendmail with linuxconf?
+ o 5.3.1.2 I built sendmail.cf from sendmail.mc and it
+ works until the next reboot of the machine. What is
+ going on?
+ o 5.3.1.3 Why can't I receive mail with Red Hat 7.1 and
+ later?
+ + 5.3.2 SuSE
+ o 5.3.2.1 Where is the sendmail.cf file on SuSe Linux?
_________________________________________________________________
-
+
5.1 -- Sun Microsystems SunOS/Solaris 1.x/2.x
_________________________________________________________________
-
+
Q5.1.1 -- How can I solve "line 273: replacement $3 out of bounds" errors?
-
+
Date: March 23, 1996
-
+
When I use sendmail V8 with a Sun config file I get lines like:
/etc/sendmail.cf: line 273: replacement $3 out of bounds
@@ -2121,7 +2586,7 @@ Subject: Q4.16 -- How do I find sendmail's version number?
R$*<@$%y>$* $1<@$2.LOCAL>$3 user@ether
what does this mean? How do I fix it?
-
+
V8 doesn't recognize the Sun "$%y" syntax, so as far as it is
concerned, there is only a $1 and a $2 (but no $3) in this line. Read
Rick McCarty's paper on "Converting Standard Sun Config Files to
@@ -2129,16 +2594,16 @@ Subject: Q4.16 -- How do I find sendmail's version number?
"converting.sun.configs") in the latest version 8 sendmail
distribution for a full discussion of how to do this.
_________________________________________________________________
-
+
Q5.1.2 -- How can I solve "line 445: bad ruleset 96 (50 max)" errors?
-
+
Date: March 23, 1996
-
+
When I use sendmail V8 on a Sun, I sometimes get lines like:
/etc/sendmail.cf: line 445: bad ruleset 96 (50 max)
what does this mean? How do I fix it?
-
+
You're somehow trying to start up the old Sun sendmail (or
sendmail.mx) with a version 8 sendmail config file, which Sun's
sendmail doesn't like. Check your /etc/rc.local, any procedures that
@@ -2156,39 +2621,39 @@ Subject: Q4.16 -- How do I find sendmail's version number?
Assuming, of course, that you have installed sendmail V8 in
/usr/local/lib/sendmail.v8.
_________________________________________________________________
-
+
Q5.1.3 -- Why does version 8 sendmail (< 8.7.5) sometimes hang under Solaris
2.5?
-
+
Date: May 23, 1996
-
+
In moving from Solaris 2.4 to Solaris 2.5, the kernel changed its name
and is now in /kernel/genunix instead of /kernel/unix, so _PATH_UNIX
in conf.h is pointing to the wrong place.
-
+
If you can't upgrade to the latest release of sendmail 8.8.z, the next
best thing to do is change _PATH_UNIX in conf.h (in the solaris2 part)
to point to the generic interface /dev/ksyms, like so:
# define _PATH_UNIX "/dev/ksyms"
_________________________________________________________________
-
+
Q5.1.4 -- Why can't I use SunOS/Solaris to get email to certain large sites?
-
+
Date: November 24, 1996
-
+
This is most likely a problem in your resolver libraries (DNS,
/etc/hosts, NIS, etc...). Older Sun (and Solaris?) resolver libraries
allocated enough room for only five IP addresses for each host name,
and if any program ever ran across a name with more than five IP
addresses for it, the program would crash.
-
+
For example, this would keep you from getting mail to CompuServe,
since (at the time of this writing) they list eleven IP addresses for
mx1.compuserve.com (one of the named MXes for compuserve.com).
-
+
This will affect you even if you use version 8 sendmail, since it's a
problem in the resolver libraries, and not in sendmail itself.
-
+
You should either get patches to the resolver libraries from Sun, or
the latest version of BIND (see Q2.12) and install their resolver
library routines. Between the two, installing BIND is a bit more work,
@@ -2197,113 +2662,225 @@ Subject: Q4.16 -- How do I find sendmail's version number?
serving the DNS (including support for IPv6 and several other
features), and some very useful utility programs.
_________________________________________________________________
-
+
Q5.1.5 -- Why do I have trouble compiling on Solaris?
-
+
Date: October 20, 1997
-
+
Many people have experienced compilation problems on Solaris, with the
compiler typically complaining about tm_zone or TopFrame. The Solaris
section of our Compiling Sendmail page explains these.
_________________________________________________________________
-
+
Q5.1.6 -- How does 8.X compare to 8.X+Sun?
-
+
Date: August 29, 1998
-
+
With a Vn/Berkeley config file, they're identical. There are a few
minor differences between 8.X with a Vn/Berkeley config file and
8.X+Sun with the same config file, but the V line changed to Vn/Sun.
But most differences are the backwards compatibility hacks needed for
8.X+Sun to support old V1/Sun config files.
-
+
There are three web pages which discuss these in detail: Berkeley
migration (from SMI-8.6 to 8.X), Sun migration (from SMI-8.6 to
8.X+Sun), and Differences (5 sections comparing and contrasting config
files and binaries).
_________________________________________________________________
-
+
5.2 -- IBM AIX
_________________________________________________________________
-
+
Q5.2.1 -- The system resource controller always reports sendmail as
"inoperative". What's wrong?
-
+
Date: July 5, 1996
-
+ Updated: January 30, 2002
+
When I use version 8 sendmail on an IBM RS/6000 running AIX, the
system resource controller always reports sendmail as "inoperative",
even though it's actually running. What's wrong?
-
+
When running as a daemon, sendmail detaches from its parent process,
fooling the SRC into thinking that sendmail has exited. To fix this,
issue the commands:
kill `head -1 /etc/sendmail.pid`
- chssys -s sendmail -f 9 -n 15 -S -a "-d99.100"
- # use "-d0.1" in sendmail 8.6.x
+ chssys -s sendmail -f 9 -n 15 -S -a "-bD"
startsrc -s sendmail -a "-bd -q30m"
# your sendmail args may vary
- Now the SRC should report the correct status of sendmail. If you are
- using version 8.6.x, use "-d0.1" instead of "-d99.100" (the debug
- options changed somewhat in version 8.7). In 8.6.x a side-effect of
- the "-d0.1" option is that a few lines of debug output will be printed
- on the system console every time sendmail starts up.
-
+ Now the SRC should report the correct status of sendmail.
+
For more information, read up on the System Resource Controller, the
lssrc command and the chssys command in the online AIX documentation.
_________________________________________________________________
-
+
Q5.2.2 -- Why can't I use AIX to get email to some sites?
-
+
Date: April 8, 1997
-
+
When I use IBM's sendmail on an IBM RS/6000 running AIX trying to get
to certain sites, it seems that I can get to some of them and not
others. What's wrong?
-
+
There are two possible problems here:
-
+
1) Your version of sendmail is not configured to recognize MX records
in the DNS. Search through your sendmail.cf looking for "OK MX" or "OK
ALL". Older configurations had this line commented out, and this will
cause mail from you to some sites to fail (because those sites have MX
records, but no A records in their DNS for the specific Fully
Qualified Domain Name you're trying to mail to).
-
+
For more information, see the comp.unix.aix FAQ
ftp://rtfm.mit.edu/pub/usenet/news.answers/aix-faq/.
-
+
2) There is a negative caching bug in AIX 3.2.5 with /usr/sbin/named
executables that are less than 103000 bytes long. Ask your IBM
representative to give you PMP 3251, or the most recent patch that
fixes this problem for your particular configuration and version of
the OS.
_________________________________________________________________
-
+
Q5.2.3 -- Why can't I get sendmail 8.7.1 to use MX records with AIX 3.2.5?
-
+
Date: July 5, 1996
-
+
IBM, in their infinite wisdom, provided a header file that would
easily mis-compile. This resulted in the struct{} for the DNS query to
be mis-allocated, and MX processing would barf.
-
+
Fix 1) upgrade to 8.7.5 - this has a code fix for this problem.
-
+
Fix 2) Install the BIND 4.9.4 libraries and include files and tweak
the Makefile.AIX to use them - I *think* these Get It Right (if not,
at least it'll die during compile rather than failing weirdly at
runtime).
-
+
Fix 3) Hack Makefile.AIX to pass a -DBIT_ZERO_ON_LEFT to cause the
headers to use the right #ifdefs.
-
+ _________________________________________________________________
+
+5.3 -- Linux
+ _________________________________________________________________
+
+ 5.3.1 -- Red Hat
+ _________________________________________________________________
+
+ 5.3.1.1 -- Why do I have so many sendmail problems after configuring
+ sendmail with linuxconf?
+
+ Date: June 15, 2000
+ Updated: September 27, 2000
+
+ Do not edit sendmail.cf with linuxconf. This tool and its module
+ "mailconf" are broken and based on very old rulesets from 8.8.7 . You
+ will have many troubles if you do this. First make sure that the
+ sendmail-cf RPM is installed. Then create your own myhost.mc file in
+ /usr/lib/sendmail-cf/cf:
+ % cd /usr/lib/sendmail-cf/cf
+ % cp redhat.mc myhost.mc
+ (Edit myhost.mc)
+ % m4 ../m4/cf.m4 myhost.mc > myhost.cf
+ (Test this new myhost.cf; once it's known good, install it:)
+ (If 8.9.x or earlier:)
+ % cp myhost.cf /etc/sendmail.cf
+ % chown root /etc/sendmail.cf
+ (If 8.10.x or later:)
+ % cp myhost.cf /etc/mail/sendmail.cf
+ % chown root /etc/mail/sendmail.cf
+
+ See /usr/doc/sendmail/README.cf (or just README) for features and
+ detailed instructions how to do this.
+ _________________________________________________________________
+
+ 5.3.1.2 -- I built sendmail.cf from sendmail.mc and it works until the next
+ reboot of the machine. What is going on?
+
+ Date: June 15, 2000
+
+ If you have used linuxconf's module "mailconf" just once, it will
+ rewrite your sendmail.cf on every reboot if it sees that sendmail.cf
+ is changed from linuxconf. The solution is to remove the mailconf
+ module from linuxconf. Turn on linuxconf and go to item
+ Control files and systems > Configure Linuxconf modules
+
+ Scroll down to "Module path -> mailconf" and turn off the button "this
+ module is active", then click "Accept" and "quit" to quit linuxconf.
+
+ This will disable linuxconf's control of sendmail. Build sendmail.cf
+ again from sendmail.mc (see 5.3.1), and restart sendmail.
+ _________________________________________________________________
+
+ 5.3.1.3 -- Why can't I receive mail with Red Hat 7.1 and later?
+
+ Date: May 3, 2001
+ Updated: June 11, 2001
+ Updated: December 4, 2002
+
+ Red Hat, like some other vendors, changed the way that sendmail is
+ run. (See 4.22 for a more general discussion of this problem.) They
+ decided that most people need a client-only version of sendmail. So it
+ is listening only on the localhost interface. Check the RH
+ documentation on how to change that:
+
+ Make sure that you have installed the "sendmail-cf" package on your
+ system -- it should be on your install media.
+
+ Then check the file "sendmail.mc" (probably in "/etc/mail"). Look for
+ the string "DAEMON_OPTIONS" and for the comment lines near that
+ string.
+
+ Also note that Red Hat 7.1 and later build sendmail with tcpwrapper
+ support, and provide a hosts.deny file that rejects all external mail.
+ The sendmail:ALL addition to hosts.allow fixes this.
+ _________________________________________________________________
+
+ 5.3.2 -- SuSE
+ _________________________________________________________________
+
+ 5.3.2.1 -- Where is the sendmail.mc file on SuSE Linux?
+
+ Date: May 5, 2002
+
+ On SuSE Linux systems there is no real sendmail.mc file. This file is
+ generated 'on the fly' by SuSEconfig using several variables in
+ /etc/rc.config and /etc/rc.config.d/sendmail.rc.config (SuSE <= 7.3)
+ or /etc/sysconfig/sendmail (SuSE >= 8.0).
+
+ SuSEconfig executes the script /sbin/conf.d/SuSEconfig.sendmail to a)
+ build a temorary .mc file b) execute m4 to generate /etc/sendmail.cf
+ and c) delete the temporary .mc file afterwards.
+
+ To make customisations you cannot achieve by modifying the variables
+ in the configuration files mentioned above (using YaST or YaST2), you
+ have two options:
+ 1. Use /etc/mail/linux.mc (or /etc/mail/linux.nullclient.mc) as a
+ starting point. Both files contain several helpful comments.
+ 2. To get a .mc file based on your current configuration, modify
+ /sbin/conf.d/SuSEconfig.sendmail to keep the temporary .mc file
+ and execute SuSEconfig afterwards. Then use that copy as starting
+ point.
+
+ In both cases you have to build your /etc/sendmail.cf (note: SuSE
+ still uses /etc not /etc/mail as suggested in the manual) using the m4
+ macroprocessor:
+m4 your.mc.file > /etc/sendmail.cf
+
+ Then reload sendmail with "rcsendmail reload".
+
+ To prevent SuSEconfig from overiding your new sendmail.cf in future
+ runs, set the variable "SENDMAIL_TYPE" in
+ /etc/rc.config.d/sendmail.rc.config to "no" (SuSE Linux <= 7.3). On
+ systems >= 8.0 you probably will have to set an "exit" command atop of
+ the file /sbin/conf.d/SuSEconfig.sendmail to do the same. SuSE 8.0
+ does not know the SENDMAIL_TYPE variable.
+
sendmail.org
-
+
6. ADDITIONAL INFORMATION SOURCES (RFC 1807 bibliography format)
-
+
* 6.1 Reference material devoted exclusively to sendmail
* 6.2 Reference material with chapters or sections on sendmail
* 6.3 Reference material on subjects related to sendmail
@@ -2313,17 +2890,17 @@ Subject: Q4.16 -- How do I find sendmail's version number?
* 6.7 Online archives of mailing lists and Usenet newsgroups,
relating to Internet email
_________________________________________________________________
-
+
Q6 -- Additional information sources
Date: April 8, 1997
- Updated: April 14, 1999
-
+ Updated: July 20, 2002
+
This probably isn't in strict RFC 1807 format, but I'm getting closer.
Unfortunately, the format detailed in RFC 1807 was never intended to
be used in this fashion, so I'm doing a bit of square-peg fitting into
round holes.
-
+
Note that the publisher ids that I've assigned should not be
misconstrued to imply that I have actually published all these
documents, it's just that I need some sort of reasonable entry for the
@@ -2333,51 +2910,48 @@ Q6 -- Additional information sources
entries below make it obvious who the real publishers of the various
documents are.
_________________________________________________________________
-
+
6.1 Reference material devoted exclusively to sendmail
BIB-VERSION:: CS-TR-v2.1
ID:: sendmail-faq//online/reference/1
ENTRY:: March 23, 1996
TYPE:: Reference manual, available online in printable format
- REVISION:: April 8, 1997; Updated "CONTACT" information
+ REVISION:: July 19, 2002
TITLE:: Sendmail Installation and Operation Guide
AUTHOR:: Allman, Eric
- CONTACT:: Eric Allman <eric@Sendmail.ORG>
- DATE:: November 19, 1995
- PAGES:: 69
+ AUTHOR:: Shapiro, Gregory
+ AUTHOR:: Aßmann, Claus
+ CONTACT:: <sendmail-questions@Sendmail.ORG>
+ DATE:: July 20, 2002
+ PAGES:: 100
RETRIEVAL:: Contents of manual is in doc/op/op.ps of sendmail source
archive
- KEYWORD:: version 8.7.5 sendmail
+ KEYWORD:: version 8.12.5 sendmail
LANGUAGE:: English
NOTES:: {g|n}roff "me" macro format version is in doc/op/op.me
See: URL:http://www.sendmail.org/
ABSTRACT::
-
+
The documentation written by Eric Allman himself, comes with the
- sendmail distribution. The file in doc/op/op.me (nroff "me" macro
- format) may have a different number of pages depending on the type of
- device it is printed on, etc....
-
- Eric provides his free consulting in the form of continuing
- development on sendmail, and occasional posts to comp.mail.sendmail.
- Please don't be so rude as to ask him to provide further free
- consulting directly to you. If you (or your company) are willing to
- compensate him for his consulting time, he may be willing to listen.
- At the very least, you should make sure you've exhausted all other
- courses of action before resorting to adding another message to the
- thousands he gets per day.
-
+ sendmail distribution. It is absolutely necessary to have this guide
+ at hand at all times. Section one tells how to do an installation.
+ Section two explains day to day information you should know to run a
+ mail system. Tuning, queue management and features for access control
+ are all documented in this guide. The file in doc/op/op.me (nroff "me"
+ macro format) may have a different number of pages depending on the
+ type of device it is printed on, etc....
+
Check the sendmail home page for late-breaking updates and other
useful information.
-
+
If you want to be notified regarding future updates to sendmail and
other items of potential interest, you may want to subscribe to the
sendmail-announce mailing list. Address your subscription requests to
"majordomo@lists.sendmail.org" with "subscribe sendmail-announce" as
the body of the message.
-
+
END:: sendmail-faq//online/reference/1
BIB-VERSION:: CS-TR-v2.1
ID:: sendmail-faq//book/ISBN/1-56592-222-0
@@ -2402,16 +2976,16 @@ Q6 -- Additional information sources
NOTES:: See: URL:http://www.ora.com/catalog/sendmail2/
ABSTRACT::
-
+
The definitive reference for version 8 sendmail (specifically, version
8.8). If you can have only one book on the subject of sendmail, this
one is it.
-
+
Bryan provides his consulting to the world in the form of his book,
unless you're willing to compensate him for his services as well. Like
Eric, you should make sure you've exhausted all other courses of
action before you spend any of his valuable time.
-
+
END:: sendmail-faq//book/ISBN/1-56592-222-0
BIB-VERSION:: CS-TR-v2.1
ID:: sendmail-faq//book/ISBN/1-55558-127-7
@@ -2434,11 +3008,11 @@ Q6 -- Additional information sources
NOTES:: See: URL:http://www.vix.com/vix/smtap/
ABSTRACT::
-
+
Centers more on IDA sendmail (at least partly because version 8 didn't
exist when they began the book). Written more like a college Sophomore
or Junior level textbook.
-
+
While you'll probably never let the Costales book out of your grubby
little hands (especially if you do much work with version 8 sendmail),
this is a book you'll probably read once or maybe twice, learn some
@@ -2448,17 +3022,17 @@ Q6 -- Additional information sources
especially if you don't want them getting their hands on too much
"dangerous" technical information. Also a *lot* smaller and less
imposing.
-
+
If possible, I recommend getting both, but if you can only get one,
get Costales unless you're going to be working exclusively with IDA
sendmail, in which case Avolio & Vixie will probably be more useful.
-
+
Note that Paul Vixie is extremely busy working on further development
of BIND, the Internet de facto standard program for serving the DNS,
upon which all Internet services depend, mail being only one of them.
Like Eric and Bryan, he's also very busy. Unless you're willing to
compensate him for his services, please let him get real work done.
-
+
END:: sendmail-faq//book/ISBN/1-55558-127-7
BIB-VERSION:: CS-TR-v2.1
ID:: sendmail-faq//book/ISBN/1-56592-278-6
@@ -2483,16 +3057,75 @@ Q6 -- Additional information sources
NOTES:: See: URL:http://www.ora.com/catalog/sendmailqr/
ABSTRACT::
-
+
A companion to the sendmail book. This small guide fits in pocket and
saves you having to carry the thousand page book in your briefcase.
For detail or tutorial information, see the full sendmail book. There
are sections on the config file, databases and configuring with m4.
There are extensive cross-references to the full sendmail book.
-
+
END:: sendmail-faq//book/ISBN/1-56592-278-6
+ BIB-VERSION:: CS-TR-v2.1
+ ID:: sendmail-faq//book/ISBN/0-7821-2737-1
+ ENTRY:: July 19, 2002
+ TYPE:: Reference book, hardcopy
+ TITLE:: Linux Sendmail Administration
+ AUTHOR:: Hunt, Craig
+ CONTACT:: SYBEX, Inc.
+ 1151 Marina Village Parkway
+ Alameda, CA 94501
+ Order on-line: www.sybex.com
+ also: Bookpool.com (www.bookpoolcom)
+ DATE:: February 2001
+ PAGES:: 457
+ LANGUAGE:: English
+
+ ABSTRACT::
+
+ This book is useful whether you run Linux or some other Unix version.
+ It attempts to simplify sendmail by covering only configuration
+ options usually needed, which reduces some complexity for new sendmail
+ administrators. Covered are: using the m4 language to build a sendmail
+ configuration, using sendmail databases such as access maps, testing
+ and debugging and using sendmail authentication techniques. Covers
+ some things not in the Costales book (the "Bat Book") which was last
+ updated for sendmail 8.8.
+
+ END:: sendmail-faq//book/ISBN/0-7821-2737-1
+ END:: sendmail-faq//book/ISBN/0-321-11570-8
+ BIB-VERSION:: CS-TR-v2.1
+ ID:: sendmail-faq//book/ISBN/0-321-11570-8
+ ENTRY:: October 12, 2002
+ REVISION::
+ TYPE:: Reference book, hardcopy
+ TITLE:: sendmail Performance Tuning
+ AUTHOR:: Christenson, Nick
+ CONTACT:: Nick Christenson <npc@acm.org>
+ Addison-Wesley Professional
+ 75 Arlington St., Suite 300
+ Boston, MA 02116 USA
+ Order on the web at:
+ http://www.pearsonptg.com/book_detail/0,3771,0321115708,00.html
+ DATE:: September, 2002
+ PAGES:: 256
+ COPYRIGHT:: Copyright (c) 2003 by Pearson Eduction, Inc., All rights
+ reserved.
+ LANGUAGE:: English
+ NOTES:: See: URL:http://www.jetcafe.org/~npc/book/sendmail/
+
+ ABSTRACT::
+
+ As email traffic continues to increase, system administrators must be
+ able to guarantee that their email servers can deliver reliable
+ performance today and bear larger loads tomorrow. "sendmail
+ Performance Tuning" is a practical guide to building, tuning, and
+ testing email servers based on sendmail to function more efficiently,
+ handle more messages, and resist both accidental and malicious
+ load-related incidents.
+
+ END:: sendmail-faq//book/ISBN/0-321-11570-8
_________________________________________________________________
-
+
6.2 Reference material with chapters or sections on sendmail
BIB-VERSION:: CS-TR-v2.1
@@ -2515,17 +3148,17 @@ Q6 -- Additional information sources
NOTES:: See: URL:http://www.admin.com/
ABSTRACT::
-
+
Still the best hands-on Unix System Administration book around. Covers
far more than just sendmail, but the sixty-four pages (pages 455-518
in the third printing) it does devote are very well written and quite
useful. Also provides a version of Rob Kolstad's checksendmail script
on the accompanying CD-ROM.
-
+
Note that Eric Allman and Marshall Kirk McKusick wrote the Foreword
for the Second Edition. This should give you at least an inkling as to
how essential this book is, even for experienced Unix administrators.
-
+
END:: sendmail-faq//book/ISBN/0-13-151051-7
BIB-VERSION:: CS-TR-v2.1
ID:: sendmail-faq//book/ISBN/0-201-58629=0
@@ -2555,7 +3188,7 @@ Q6 -- Additional information sources
practical/practical.html
ABSTRACT::
-
+
Devotes 50 pages (most of chapter 8) to discussion of sendmail. As far
as TCP/IP networking books go that also happen to discuss sendmail, it
seems well-written and clear (better than I recall Hunt's book being),
@@ -2564,14 +3197,14 @@ Q6 -- Additional information sources
the references, though. The newest sendmail-related reference listed
is dated 1983, ten years before the date on this book and most
certainly wildly out-of-date now.
-
+
There are other books written on the subject of Internetworking with
TCP/IP (most notably Comer), but this particular book seems to have a
unique mix of theory (if perhaps a bit dated) and practical advice.
Other books tend to have lots of one or the other, or split their
theory and nitty-gritty details into separate books in a series (like
Comer).
-
+
Assuming that an update will be coming out soon, it probably deserves
a place on the shelf of most System or Network Administrators, right
next to _Internetworking with TCP/IP_ by Comer, _Managing Internet
@@ -2580,39 +3213,39 @@ Q6 -- Additional information sources
certainly not least, _sendmail_ by Costales. However, it deserves this
place more because of the non-sendmail related material, as opposed to
what sendmail-related material there is.
-
+
END:: sendmail-faq//book/ISBN/0-201-58629-0
BIB-VERSION:: CS-TR-v2.1
ID:: sendmail-faq//book/ISBN/1-56592-322-7
ENTRY:: April 14, 1999
TYPE:: Reference book, hardcopy
- REVISION:: April 8, 1997; updated URL in NOTES section
- TITLE:: TCP/IP Network Administration 2nd Edition
+ REVISION:: July 20, 2002
+ TITLE:: TCP/IP Network Administration 3rd Edition
AUTHOR:: Hunt, Craig
CONTACT:: O'Reilly & Associates, Inc.
- 103 Morris Street, Suite A
+ 1005 Gravenstein Highway North
Sebastapol, CA 95472
- Order by phone: 800-998-9938 (US/Canada inquiries)
- 800-889-8969 (US/Canada credit card orders)
- 707-829-0515 (local/overseas)
- DATE:: January, 1998
- PAGES:: 630
+ Bookstores Carrying O'Reilly Books:
+ www.oreilly.com/sales/bookstores
+ also: Bookpool.com (www.bookpool.com)
+ DATE:: April, 2002
+ PAGES:: 725
LANGUAGE:: English
- NOTES:: See: URL:http://www.ora.com/catalog/tcp2/
+ NOTES:: See: URL:http://www.ora.com/catalog/tcp3/
ABSTRACT::
-
- Chapter 10 is devoted to sendmail. A very good treatment of sendmail
- in 50 pages and less daunting than the Costales book. If you only own
- one, of course make it the Costales book. Appendix E is a 50 page
- sendmail reference which covers compiling sendmail, sendmail options,
- sendmail macros and the sendmail K command. The introductary chapters
- of the book are helpful in understanding the big picture of network
- services.
-
+
+ Chapter 10 consists of 50 pages devoted to sendmail. Appendix E is a
+ 60 page sendmail reference which covers compiling sendmail, m4
+ compiler options, sendmail command line arguments, and sendmail
+ configuration. A very good treatment of sendmail, less daunting and
+ more current than the 2nd edition Costales book. The introductary
+ chapters of the book are also helpful in understanding the big picture
+ of network services.
+
END:: sendmail-faq//book/ISBN/1-56592-322-7
_________________________________________________________________
-
+
6.3 Reference material on subjects related to sendmail
BIB-VERSION:: CS-TR-v2.1
@@ -2636,23 +3269,23 @@ Q6 -- Additional information sources
NOTES:: See: URL:http://www.ora.com/catalog/dns3/
ABSTRACT::
-
+
As definitive as Costales is on sendmail, this book is on the subject
of the Domain Name System (DNS) and the most common server software
for the DNS, namely BIND.
-
+
The third edition deals with the new 8.1.2 version of BIND as well as
the older 4.9 versions. Wherever there is a difference in behavior of
the versions, the book points out which version does what. Anyone
still using the first edition should strongly consider replacing it
now since the new features will be the basis for the next generation
of name servers.
-
+
Since the sending of Internet mail is so very heavily dependent on the
DNS, it obviously also belongs on the shelf of any Postmaster or
System Administrator whose site does Internet email. That means
virtually every administrator of every site on the Internet.
-
+
END:: sendmail-faq//book/ISBN/1-56592-512-2
BIB-VERSION:: CS-TR-v2.1
ID:: sendmail-faq//book/ISBN/1-56592-153-4
@@ -2674,17 +3307,17 @@ Q6 -- Additional information sources
NOTES:: See: URL:http://www.ora.com/catalog/umuucp/
ABSTRACT::
-
+
Replaces _Managing UUCP and Usenet_ by Todino and O'Reilly as the
definitive book for using, installing, and managing UUCP.
-
+
The general assumption with version 8 sendmail is that virtually no
one uses UUCP to send email anymore, but if that assumption isn't true
for you, then you probably need this book.
-
+
END:: sendmail-faq//book/ISBN/1-56592-153-4
_________________________________________________________________
-
+
6.4 World-wide web index/resource pages on sendmail
BIB-VERSION:: CS-TR-v2.1
@@ -2699,9 +3332,9 @@ OTHER_ACCESS:: URL:http://www.sendmail.org/faq/
LANGUAGE:: English
ABSTRACT::
-
+
Support Page for this FAQ.
-
+
END:: sendmail-faq//online/index/10
BIB-VERSION:: CS-TR-v2.1
ID:: sendmail-faq//online/index/17
@@ -2715,10 +3348,10 @@ OTHER_ACCESS:: URL:http://www.sendmail.org/~ca/email/english.html
LANGUAGE:: English
ABSTRACT::
-
+
Most Frequently Asked Questions on comp.mail.sendmail and their
answers. Also has some links to a few other resources.
-
+
END:: sendmail-faq//online/index/17
BIB-VERSION:: CS-TR-v2.1
ID:: sendmail-faq//online/resources/22
@@ -2731,17 +3364,17 @@ OTHER_ACCESS:: URL:http://www.iicons.com/sendmail/index.html
LANGUAGE:: English
ABSTRACT::
-
+
Provides information on how to compile Sendmail and the NEWDB db.1.85
for Solaris 2. Also has a section on which Sun patches update Solaris
2 to BIND 4.9.3.
-
+
Has pointers to some non-Sun/Solaris sendmail resources, especially
including CERT Advisories related to sendmail.
-
+
END:: sendmail-faq//online/index/22
_________________________________________________________________
-
+
6.5 World-wide web index pages and other reference on Internet email in general
BIB-VERSION:: CS-TR-v2.1
@@ -2757,20 +3390,20 @@ OTHER_ACCESS:: URL:http://www.imc.org/
LANGUAGE:: English
ABSTRACT::
-
+
If it has to do with Internet email, you'll probably find it here or a
link to it from here.
-
+
They have or have information on email-related Usenet FAQs, RFCs,
Internet Drafts (documents that are in the process of becoming RFCs),
IETF Working Groups, security standards, and are running a few
email-related mailing lists.
-
+
Tends to be focussed on the standards issues.
-
+
If you care about Internet email, you should make it your duty in life
to check this site frequently.
-
+
END:: sendmail-faq//online/index/12
BIB-VERSION:: CS-TR-v2.1
ID:: sendmail-faq//online/index/13
@@ -2784,16 +3417,16 @@ OTHER_ACCESS:: URL:http://www.worldtalk.com/html/msg_resources/email_ref.html
LANGUAGE:: English
ABSTRACT::
-
+
The most exhaustive index site I know of for Internet email related
documents outside of the Internet Mail Consortium.
-
+
Also has pointers to other organizations that relate to Internet
email, such as the Electronic Messaging Association and the European
Electronic Messaging Association.
-
+
Tends to be focussed on the server and standards issues.
-
+
END:: sendmail-faq//online/index/13
BIB-VERSION:: CS-TR-v2.1
ID:: sendmail-faq//online/index/14
@@ -2808,13 +3441,13 @@ OTHER_ACCESS:: URL:http://www.dns.net/smtprd/
LANGUAGE:: English
ABSTRACT::
-
+
Another good index site, but still very much in the early phases of
gestation. Based very heavily on the DNS Resources Directory, also by
Andras Salamon.
-
+
A well-rounded site, for the amount of material it covers so far.
-
+
END:: sendmail-faq//online/index/14
BIB-VERSION:: CS-TR-v2.1
ID:: sendmail-faq//online/index/15
@@ -2829,17 +3462,17 @@ OTHER_ACCESS:: URL:http://andrew2.andrew.cmu.edu/cyrus/email/email.html
LANGUAGE:: English
ABSTRACT::
-
+
Another good index site, tends to be more focussed on client side and
LAN email packages. Also lists some email services, which no one else
that I've seen appears to have taken the time to catalog.
-
+
Excellent side-by-side feature comparison of various MUAs and their
compliance with various Internet protocols.
-
+
END:: sendmail-faq//online/index/15
_________________________________________________________________
-
+
6.6 Online tutorials for sendmail
BIB-VERSION:: CS-TR-v2.1
@@ -2861,10 +3494,10 @@ OTHER_ACCESS:: URL:http://www.networkcomputing.com/unixworld/tutorial/
NOTES:: UnixWorld Online: Tutorial: Article No. 008
ABSTRACT::
-
+
Good technical introduction. Some useful references. Notably does not
reference this FAQ as a place to get more information.
-
+
END:: sendmail-faq//online/article/9
BIB-VERSION:: CS-TR-v2.1
ID:: sendmail-faq//online/tutorial/16
@@ -2887,9 +3520,9 @@ OTHER_ACCESS:: URL:ftp://ftp.sterling.com/mail/sendmail/uwo-course/
mail/sendmail/uwo-course/sendmail.ps.Z
ABSTRACT::
-
+
Dated. Only here until I find better.
-
+
END:: sendmail-faq//online/tutorial/16
BIB-VERSION:: CS-TR-v2.1
ID:: sendmail-faq//online/tutorial/21
@@ -2907,12 +3540,12 @@ OTHER_ACCESS:: URL:http://www.networkcomputing.com/unixworld/tutorial/
LANGUAGE:: English
ABSTRACT::
-
+
Good introduction on how sendmail re-write rules work.
-
+
END:: sendmail-faq//online/article/21
_________________________________________________________________
-
+
6.7 Online archives of mailing lists and Usenet newsgroups, relating to
Internet email
@@ -2928,15 +3561,15 @@ OTHER_ACCESS:: URL:http://www.dejanews.com
NOTES:: Archives/indexes only Usenet news.
ABSTRACT::
-
+
The first, and still most focussed, Usenet news archive/index site.
Others archive/index news as well as other things, but none that I've
seen do it better.
-
+
Go to "Power Search" then "Query Filter" if you wish to restrict the
newsgroups you search on to something like just comp.mail.sendmail and
not all newsgroups.
-
+
END:: sendmail-faq//online/archive/18
BIB-VERSION:: CS-TR-v2.1
ID:: sendmail-faq//online/archive/19
@@ -2950,34 +3583,34 @@ OTHER_ACCESS:: URL:http://www.altavista.digital.com
NOTES:: Archives/indexes Usenet news and World-wide web pages.
ABSTRACT::
-
+
One of the leading indexes of world-wide web pages, and their
archive/index of Usenet news is obviously secondary.
-
+
END:: sendmail-faq//online/archive/19
BIB-VERSION:: CS-TR-v2.1
ID:: sendmail-faq//online/archive/20
- ENTRY:: March 25, 1996
+ ENTRY:: March 16, 2001
TYPE:: Online Usenet newgroup archive
- REVISION:: April 8, 1997; Additional information based on experience
- TITLE:: InReference
-OTHER_ACCESS:: URL:http://www.reference.com
+ REVISION::
+ TITLE:: Google Advance Search
+OTHER_ACCESS:: URL:http://www.google.com/advanced_search
LANGUAGE:: English
ABSTRACT::
-
- Had promise to be the best Usenet news/publicly accessible mailing
- list index/archive site in the world. The best minds that were working
- on the project have since left, and the difference is visible. You'll
- probably be happier with DejaNews instead.
-
+
+ Google has acquired DejaNews. This is the search tool for news
+ archive. It works very well and you can see a whole thread in one web
+ screen which makes it quick and easy to read responses which follow
+ any question.
+
END:: sendmail-faq//online/archive/20
-
+
sendmail.org 7. THANKS!
-
+
Special thanks to:
-
+
Eric Allman The core of the material here comes from his FAQ for
version 8.6.9 sendmail. I couldn't even have gotten started were it
not for him. And if he hadn't written sendmail, there obviously
@@ -2987,9 +3620,9 @@ OTHER_ACCESS:: URL:http://www.reference.com
this were it not for his help.
Ed Ravin Virtually all the material regarding the use of sendmail on
AIX is his, and most of it has been carried over verbatim.
-
+
Thanks also to:
-
+
Neil Hoggarth, Andras Salamon, Johan Svensson, Christopher X.
Candreva, Bill Wohler, Matthew Wall, Henry W. Farkas, Claus Assmann,
Curt Sampson, Rebecca Lasher, Jim Davis, David Keegel, Betty Lee,
@@ -2998,4 +3631,4 @@ OTHER_ACCESS:: URL:http://www.reference.com
Sill, Dave Wreski, Paul Caloca, Eamonn Coleman, Michael Fuhr, Betty
Lee, Derrell Lipman, Era Eriksson, Richard Troxel, and the readers and
posters of comp.mail.sendmail.
-
+
diff --git a/debian/ida-aliases.m4 b/debian/ida-aliases.m4
deleted file mode 100644
index d5a905b..0000000
--- a/debian/ida-aliases.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-divert(-1)
-
-####################################################################
-## IDA style non-local aliasing.
-##
-## Neil Rickert <rickert@cs.niu.edu>
-##
-####################################################################
-
-divert(0)dnl
-VERSIONID(`$Id: ida-aliases.m4,v 1.1 1999/02/09 00:35:21 rickert Exp $')
-divert(-1)
-
-
-PUSHDIVERT(3)dnl
-### Check aliases for non-local users.
-R$+<@$+> $:$1<@$2><${opMode}> Are we building aliases?
-R$+<@$=w.><$-> $:$1<@$2.> Don't touch local addresses
-R$+<@$+><i> $:$1<@$2><>i
-R$+<@$+><$-> $:$1<@$2><>$(aliases $1@$2 $: $)
-R$+<@$+><>$+ $#local $:$1@$2
-R$+<@$+><>$* $:$1<@$2>
-POPDIVERT
diff --git a/debian/ida-aliases.m4.README b/debian/ida-aliases.m4.README
deleted file mode 100644
index 708a42e..0000000
--- a/debian/ida-aliases.m4.README
+++ /dev/null
@@ -1,168 +0,0 @@
-From rickert@cs.niu.edu Fri Apr 23 12:06:20 1999
-Path: rtpnews.raleigh.ibm.com!newsfeed.btv.ibm.com!news.chips.ibm.com!znr.news.ans.net!abq.news.ans.net!newsjunkie.ans.net!philabs!blanket.mitre.org!newsfeed.berkeley.edu!newsfeed.enteract.com!feed1.news.rcn.net!rcn!howland.erols.net!vixen.cso.uiuc.edu!husk.cso.niu.edu!not-for-mail
-From: rickert@cs.niu.edu (Neil Rickert)
-Newsgroups: comp.os.linux.networking,comp.mail.sendmail
-Subject: Re: using an aliases file for remote addresses
-Date: 23 Apr 1999 07:31:40 -0500
-Organization: Northern Illinois University
-Lines: 153
-Message-ID: <7fpp7c$fpd@ux.cs.niu.edu>
-References: <7fpij9$pmv$1@opera.iinet.net.au>
-NNTP-Posting-Host: ux.cs.niu.edu
-Xref: rtpnews.raleigh.ibm.com comp.os.linux.networking:165108 comp.mail.sendmail:55105
-
-"Chris Severn" <severnx@iinet.net.au> writes:
-
->Is it possible to have a SMTP server which checks the destination addresses
->of email, and redirects certain email addresses (based on the name and
->domain) to a local account, but passes everything else as normal out to the
->internet. I know that the sendmail.cw file can do this for whole domains,
->but I have to differentiate between addresses.
-
- Save the enclosed as 'feature/ida-aliases.m4' under your 'sendmail/cf'
-directory, or wherever you build your 'cf' file. Then use
-FEATURE(ida-aliases)dnl
-in your '.mc' file.
-
-This will allow you to put non-local addresses in your aliases file
-to accomplish what you are trying to do. Note that it might cause
-you problems if you have really long alias expansions (the RHS of
-aliases entries) for non-local aliases. Use :include: files for
-large mailing lists.
-
- ----- cut here ----
-divert(-1)
-
-####################################################################
-## IDA style non-local aliasing.
-##
-## Neil Rickert <rickert@cs.niu.edu>
-##
-####################################################################
-
-divert(0)dnl
-VERSIONID(`$Id: ida-aliases.m4,v 1.1 1999/02/09 00:35:21 rickert Exp $')
-divert(-1)
-
-
-PUSHDIVERT(3)dnl
-### Check aliases for non-local users.
-R$+<@$+> $:$1<@$2><${opMode}> Are we building aliases?
-R$+<@$=w.><$-> $:$1<@$2.> Don't touch local addresses
-R$+<@$+><i> $:$1<@$2><>i
-R$+<@$+><$-> $:$1<@$2><>$(aliases $1@$2 $: $)
-R$+<@$+><>$+ $#local $:$1@$2
-R$+<@$+><>$* $:$1<@$2>
-POPDIVERT
-
- ----- cut here ----
-
->I'm running sendmail on a Redhat 5.1 (soon to be 5.2) distribution on a
->Pentium.
-
->Chris Severn
->--
->Delete the 'x's to remove the spamblock
->Except spammers, for whom my email address is abuse@localhost
-
-
-
->If you're not quite sure what I mean by the short question, then please read
->the long question :
-
->I've got two similar networks.
-
->They have a linux box running POP/SMTP and squid server connected by a modem
->to an ISP, and by ethernet to a local private network of about 20 machines
->(Windoze 95/98 mainly). The clients run Outlook and Internet Explorer.
-
->The two networks aren't connected to each other in any way, except through
->the internet by the modems.
-
->Each of the two linux gateway machines has it's own domain name, lets call
->them mail.host1.com.au and mail.host2.com.au. (These are aliases for the
->machine names host1.com.au and host2.com.au).
-
->Now, that all fine, and everybody has their own email addresses which they
->can use, because they've got their own account on the local linux machine,
->which is set up on the clients as the POP and SMTP servers.
-
->The problem is however, that the two networks belong to different divisions
->of the same company, and now some people are moving from one office to the
->other, but want to keep their existing email addresses.
-
->Hence, someone using host1 now, who has a @mail.host1.com.au email address,
->now wants their mail delivered for collection to host2, but still using
->their @mail.host1.com.au address.
-
->So, the way it's set up at the moment, I've created a new account with the
->same name at host2, and in host1's /etc/aliases I've put the entry
->bill: bill@mail.host2.com.au.
->So, any mail which gets to host1 for bill, gets bounced to bill's address at
->host2, which is where he now collects it from.
-
->That's not really a problem, exept that it creates too much excess network
->traffic - especially as the only link to the internet is via 33.6k modems.
->I've resigned myself to the fact that it can't be helped without adding a
->smarter router at the ISP (and that's not really an option at the moment).
-
->One thing I would like to fix though is when someone at host2 mails to
->bill@mail.host1.com.au (remember - that's his preferred email address, even
->though technically he can be reached at bill@mail.host2.com.au). The mail
->will be put on host2 by SMTP, host2 will send it down the modem line to "the
->internet", and then it will go up another modem line to host1, which will
->look up it's /etc/aliases file, and then redirect the mail back to
->bill@mail.host2.com.au, which means it goes back down that modem line to the
->internet, back up the host2 modem line, and gets put in bills mailbox. So,
->it's just gone through 4 modem links, when it didn't have to go through any.
-
->How do I make the host2 computer know that it shouldn't relay any messages
->for bill@mail.host1.com.au to the internet, but instead just deliver them
->locally to the user bill ?
-
->I've considered (and tried successfully) making host2 think that it is also
->host1 by using the sendmail.cw file, but that creates problems when there is
->the same user name for different people on both hosts. It also means that I
->must get sendmail to pass any mail to names it doesn't recognise to the
->other host (so that legitimate mail to the other host doesn't get kept
->locally due to it thinking it is the other host). This means that
->incorrectly addressed mail can get bounced around too much, using too much
->bandwidth.
-
->So, what I want is to make host2 think that it is host1 for certain
->destination email addresses only. Something like the /etc/aliases file, but
->which acts on mail being passed through, rather than only acting on mail
->destined for that machine. Is there such a thing ?
-
->I've also considered using the sendmail.cw file as already mentioned to make
->host2 think that it's host1 as well. But, this time we don't bounce unknown
->names to the other machine. In host2's /etc/aliases, we just list all the
->legitimate names which exist on host1 (and aren't getting bounced around),
->and send them onto that machine using it's IP address or alternative machine
->name. Addresses which exist on both hosts would be checked in the
->/etc/aliases by the whole email address, rather than just the name.
->Example:
->fred: fred@host1.com.au
->support@mail.host1.com.au: support@host1.com.au
->In this example, fred exists only on host1, and therefore only the name
->requires checking. Support exists on both hosts, so it needs checking for
->the whole address. host1.com.au is a non-aliased address of the host1
->machine.
-
->The problem with this method is that it is complicated to manage - we must
->make sure any new or deleted accounts on host1 are mirrored in host2's
->/etc/aliases file. There is too much chance of error.
-
->So, sorry to be so long, but I'd appreciate suggestions as how to accomplish
->selective aliasing for mail being passed through.
-
->Thanks.
-
->Chris Severn
->--
->Delete the 'x's to remove the spamblock
->Except spammers, for whom my email address is abuse@localhost
-
-
-
-
diff --git a/debian/libmilter-dev.dirs.in b/debian/libmilter-dev.dirs.in
new file mode 100644
index 0000000..2a5f027
--- /dev/null
+++ b/debian/libmilter-dev.dirs.in
@@ -0,0 +1,3 @@
+@includedir@/libmilter
+@libdir@/libmilter
+@docdir@/libmilter-dev
diff --git a/debian/libmilter-dev.postinst b/debian/libmilter-dev.postinst
new file mode 100644
index 0000000..bf0ac2a
--- /dev/null
+++ b/debian/libmilter-dev.postinst
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+#
+# Debian post installation script
+#
+# Install of already installed package:
+# 1) old-prerm upgrade new-version
+# *) new-prerm failed-upgrade old-version
+# *) old-postinst abort-upgrade new-version
+#
+# If a `conflicting' package is being removed at the same time:
+# 1) forall packages depending on conflicting package and --auto-deconfigure
+# deconfigured's-prerm deconfigure \
+# in-favour package-being-installed version \
+# removing conflicting-package version
+# *) deconfigured's-postinst abort-deconfigure \
+# in-favour package-being-installed-but-failed version \
+# removing conflicting-package version
+# 2) To prepare for removal of the conflicting package
+# conflictor's-prerm remove \
+# in-favour package new-version
+# *) conflictor's-postinst abort-remove \
+# in-favour package new-version
+#
+# Configuration of package:
+# postinst configure most-recently-configured-version
+#
+set -e;
+
+PACKAGE=`echo "$(basename $0)" | sed -e 's/\.postinst$//'`;
+
+case "$1" in
+ configure)
+ # continue below
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ exit 0;
+ ;;
+
+ *)
+ echo "$PACKAGE postinst called with unknown argument \`$1'" >&2;
+ exit 1;
+ ;;
+ esac;
+
+#DEBHELPER#
+exit 0;
diff --git a/debian/libmilter-dev.postrm.in b/debian/libmilter-dev.postrm.in
new file mode 100644
index 0000000..eafb8f2
--- /dev/null
+++ b/debian/libmilter-dev.postrm.in
@@ -0,0 +1,53 @@
+#!/bin/sh -e
+#
+# Debian post removal script
+#
+# Install of already installed package:
+# 1) Upgrade of package:
+# new-preinst upgrade old-version
+# *) new-postrm abort-upgrade old-version
+# 2) package had some configuration files from a previous version installed
+# new-preinst install old-version
+# *) new-postrm abort-install old-version
+# 3) Otherwise (i.e., the package was completely purged)
+# new-preinst install
+# *) new-postrm abort-install
+#
+# Removal of a package:
+# 1) prerm remove
+# 2) The package's files are removed (except conffiles).
+# 3) postrm remove
+# 4) All the maintainer scripts except the postrm are removed.
+# 5) The conffiles and any backup files
+# (~-files, #*# files, %-files, .dpkg-{old,new,tmp}, etc.) are removed.
+# 6) postrm purge
+# 7) The package's file list is removed
+#
+set -e;
+
+PACKAGE=`echo "$(basename $0)" | sed -e 's/\.postrm$//'`;
+
+case "$1" in
+ remove)
+ # /usr/share/doc/libmilter-dev is a symlink to /usr/share/doc/sendmail
+ rm -f @docdir@/libmilter-dev 2>/dev/null || true;
+ rmdir @docdir@/sendmail 2>/dev/null || true;
+ ;;
+
+ purge)
+ ;;
+
+ upgrade)
+ ;;
+
+ failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "$PACKAGE postrm called with unknown argument \`$1'" >&2;
+ exit 1;
+ ;;
+ esac;
+
+#DEBHELPER#
+exit 0;
diff --git a/debian/libmilter-dev.preinst.in b/debian/libmilter-dev.preinst.in
new file mode 100644
index 0000000..eda0c38
--- /dev/null
+++ b/debian/libmilter-dev.preinst.in
@@ -0,0 +1,55 @@
+#!/bin/sh -e
+#
+# Debian pre install script
+#
+# Install of already installed package:
+# 1) Upgrade of package:
+# new-preinst upgrade old-version
+# *) new-postrm abort-upgrade old-version
+# 2) package had some configuration files from a previous version installed
+# new-preinst install old-version
+# *) new-postrm abort-install old-version
+# 3) Otherwise (i.e., the package was completely purged)
+# new-preinst install
+# *) new-postrm abort-install
+#
+set -e;
+
+PACKAGE=`echo "$(basename $0)" | sed -e 's/\.preinst$//'`;
+
+case "$1" in
+ install)
+ # DPKG doesn't overwrite directories with symlinks...
+ if [ -d @docdir@/libmilter-dev ]; then
+ rm -rf @docdir@/libmilter-dev;
+ fi;
+ if [ ! -d @docdir@/sendmail ]; then
+ mkdir -p @docdir@/sendmail;
+ chmod a+rx @docdir@/sendmail;
+ fi;
+ ln -sf sendmail @docdir@/libmilter-dev;
+ ;;
+
+ upgrade)
+ # DPKG doesn't overwrite directories with symlinks...
+ if [ -d @docdir@/libmilter-dev ]; then
+ rm -rf @docdir@/libmilter-dev;
+ fi;
+ if [ ! -d @docdir@/sendmail ]; then
+ mkdir -p @docdir@/sendmail;
+ chmod a+rx @docdir@/sendmail;
+ fi;
+ ln -sf sendmail @docdir@/libmilter-dev;
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "$PACKAGE preinst called with unknown argument \`$1'" >&2;
+ exit 1;
+ ;;
+ esac;
+
+#DEBHELPER#
+exit 0;
diff --git a/debian/libmilter-dev.prerm b/debian/libmilter-dev.prerm
new file mode 100644
index 0000000..966dfdd
--- /dev/null
+++ b/debian/libmilter-dev.prerm
@@ -0,0 +1,54 @@
+#!/bin/sh -e
+#
+# Debian pre removal script
+#
+# Install of already installed package:
+# 1) old-prerm upgrade new-version
+# *) new-prerm failed-upgrade old-version
+# *) old-postinst abort-upgrade new-version
+#
+# If a `conflicting' package is being removed at the same time:
+# 1) forall packages depending on conflicting package and --auto-deconfigure
+# deconfigured's-prerm deconfigure \
+# in-favour package-being-installed version \
+# removing conflicting-package version
+# *) deconfigured's-postinst abort-deconfigure \
+# in-favour package-being-installed-but-failed version \
+# removing conflicting-package version
+# 2) To prepare for removal of the conflicting package
+# conflictor's-prerm remove \
+# in-favour package new-version
+# *) conflictor's-postinst abort-remove \
+# in-favour package new-version
+#
+# Removal of a package:
+# 1) prerm remove
+# 2) The package's files are removed (except conffiles).
+# 3) postrm remove
+# 4) All the maintainer scripts except the postrm are removed.
+#
+set -e;
+
+PACKAGE=`echo "$(basename $0)" | sed -e 's/\.prerm$//'`;
+
+case "$1" in
+ remove)
+ ;;
+
+ upgrade)
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ deconfigure)
+ ;;
+
+ *)
+ echo "$PACKAGE prerm called with unknown argument \`$1'" >&2;
+ exit 1;
+ ;;
+ esac;
+
+#DEBHELPER#
+exit 0;
diff --git a/debian/local/Makefile.in b/debian/local/Makefile.in
new file mode 100644
index 0000000..be8f93f
--- /dev/null
+++ b/debian/local/Makefile.in
@@ -0,0 +1,143 @@
+#!/usr/bin/make -f
+#------------------------------------------------------------------------------
+# vim: syntax=make
+#
+# $Sendmail: Makefile,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# Rules file for Sendmail @sm_version@@sm_revision@(@sm_version_math@)
+# on @sm_dist_name@ @sm_dist_vers@
+# via Debhelper V@DEBIAN_DH@
+#
+# Note: the .in file supports Sendmail @SM_MINVERS@ - @SM_MAXVERS@
+# on Debian slink, potato, woody, testing, sid, ...
+# but the generated file is customized to the version noted above.
+#
+# Richard Nelson <cowboy@debian.org> @sm_date@ @sm_time@ (@sm_utc@)
+#------------------------------------------------------------------------------
+#SHELL=/bin/sh -x
+
+# Include Debian Autoconf settings
+-include ../build/autoconf.mk
+
+SCRIPTS := \
+ parse_mc \
+ Parse_mc.pm \
+ sendmailconfig \
+ sendmail \
+ update_auth \
+ update_conf \
+ update_db \
+ update_mc \
+ update_ldap \
+ update_mk \
+ update_notices \
+ update_sendmail \
+ update_smrsh \
+ update_sys \
+ update_tcpd \
+ update_tls \
+
+all: ;
+
+clean:
+ rm -rf core *~ qtool.new;
+
+setup:
+ for file in $${SCRIPTS}; do \
+ chmod ug+x $$file; \
+ done;
+
+build-indep: setup
+build-arch: setup
+
+install-indep: build-indep
+install-arch: build-arch
+ #
+ # Debian Local additions / changes
+ #
+ # ${sysconfdir}/mail - unconditional
+ #
+ $(INSTALL) -d -o mail -g mail ${sysconfdir}/mail/peers;
+ $(INSTALL_DATA) -o mail -g mail provider \
+ ${sysconfdir}/mail/peers/provider;
+ $(INSTALL_DATA) -o mail -g mail service.switch* ${sysconfdir}/mail/;
+ #
+ # ${bindir} - unconditional
+ #
+ $(INSTALL) -d ${bindir};
+ ln -sf ../share/sendmail/sendmail ${bindir}/mailq;
+ #
+ # ${sbindir} - unconditional
+ #
+ $(INSTALL) -d ${sbindir};
+ $(INSTALL) -d ${mandir}/man8;
+ ln -sf ../share/sendmail/sendmail ${sbindir}/mailstats;
+ ln -sf ../share/sendmail/sendmail ${sbindir}/purgestat;
+ ln -sf ../share/sendmail/sendmail ${sbindir}/runq;
+ $(INSTALL_DATA) runq.8 ${mandir}/man8;
+ $(INSTALL_SCRIPT) sendmailconfig ${sbindir};
+ $(INSTALL_DATA) sendmailconfig.8 ${mandir}/man8;
+ #
+ # ${datadir} - conditional
+ #
+ if (grep -qEe "^#LDAP:[[:space:]]*yes" ../build/site.config.m4); then \
+ $(INSTALL_SCRIPT) update_ldap ${datadir}/sendmail; \
+ fi;
+ if (grep -qEe "^#AUTH:[[:space:]]*yes" ../build/site.config.m4); then \
+ $(INSTALL_SCRIPT) update_auth ${datadir}/sendmail; \
+ fi;
+ if (grep -qEe "^#TLS:[[:space:]]*yes" ../build/site.config.m4); then \
+ $(INSTALL_SCRIPT) update_tls ${datadir}/sendmail; \
+ fi;
+ #
+ # ${datadir}/sendmail - unconditional
+ #
+ $(INSTALL) -d ${datadir}/sendmail;
+ $(INSTALL_SCRIPT) parse_mc ${datadir}/sendmail;
+ $(INSTALL_SCRIPT) Parse_mc.pm ${datadir}/sendmail;
+ $(INSTALL_SCRIPT) sendmail ${datadir}/sendmail;
+ $(INSTALL_SCRIPT) update_conf ${datadir}/sendmail;
+ $(INSTALL_SCRIPT) update_db ${datadir}/sendmail;
+ $(INSTALL_SCRIPT) update_mc ${datadir}/sendmail;
+ $(INSTALL_SCRIPT) update_mk ${datadir}/sendmail;
+ $(INSTALL_SCRIPT) update_notices ${datadir}/sendmail;
+ $(INSTALL_SCRIPT) update_sendmail ${datadir}/sendmail;
+ $(INSTALL_SCRIPT) update_smrsh ${datadir}/sendmail;
+ $(INSTALL_SCRIPT) update_sys ${datadir}/sendmail;
+ $(INSTALL_SCRIPT) update_tcpd ${datadir}/sendmail;
+ #
+ # ${datadir}/sendmail - conditional
+ #
+ $(INSTALL) -d ${datadir}/sendmail;
+ if [ ! -f ${datadir}/sendmail/qtool.pl ]; then \
+ sed -e 's?/usr/bin/env perl?/usr/bin/perl?g' \
+ qtool.pl > qtool.new; \
+ $(INSTALL_SCRIPT) qtool.new ${datadir}/sendmail/qtool.pl; \
+ $(INSTALL_DATA) qtool.8 ${mandir}/man8; \
+ fi;
+ #
+ # ${datadir}/sendmail/cf/feature - conditional
+ #
+ $(INSTALL) -d ${datadir}/sendmail/cf/feature;
+ if [ ! -e ${datadir}/sendmail/cf/feature/local_no_masquerade.m4 ]; then \
+ $(INSTALL_DATA) local_no_masquerade.m4 \
+ ${datadir}/sendmail/cf/feature; \
+ fi;
+
+#-------------
+# Below here is fairly generic really
+
+source diff:
+ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+build: build-indep build-arch
+install: install-indep install-arch
+.PHONY: all
+.PHONY: setup
+.PHONY: clean build build-indep build-arch
+.PHONY: install install-indep install-arch
+.PHONY: source diff
diff --git a/debian/local/Parse_mc.pm.in b/debian/local/Parse_mc.pm.in
new file mode 100644
index 0000000..a80b754
--- /dev/null
+++ b/debian/local/Parse_mc.pm.in
@@ -0,0 +1,933 @@
+#!/usr/bin/perl -w
+#------------------------------------------------------------------------
+#
+# $Sendmail: Parse_mc.pm,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Parse Sendmail config for databases
+#
+# Copyright (c) 2001-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# Notes (to all):
+# * for "define(xxx,...)"; "define(xxx," must be on same line, but the
+# rest may be split across multiple lines
+# * assumes makemap dbtype /etc/mail/database < /etc/mail/database
+#
+# Notes (to self):
+# * changes made herein *must* be reflected in
+# parse_mc,update_mk,update_db,debian.m4
+# * userdb can also have multiple databases and then a forward!
+# * Cert support
+# * undefine support
+# * include support (also for OSTYPE, DOMAIN, SITE, etc)
+# * F and K lines
+#
+#------------------------------------------------------------------------
+#
+# Package/Module declaration
+package Parse_mc;
+require Exporter;
+@ISA = qw(Exporter);
+#@EXPORT = qw(read_mc write_dbs read_dbs);
+@EXPORT_OK = qw(read_mc write_dbs read_dbs
+ names_dbs restart_dbs entry_dbs);
+$VERSION = '2.0002';
+#
+# Initialization of the perl environment
+use strict; # be kosher
+#use warnings; # Not needed here
+use Cwd; # provide cwd()
+use Env; # A few environmental references
+use integer; # Peformance
+use Sys::Hostname; # make sure we have a valid hostname
+use Getopt::Long; # parameter handling
+use FileHandle; # I/O
+
+# Version of this program
+#($main::MYNAME = $main::0) =~ s|.*/||;
+#$main::Author = "Richard Nelson";
+#$main::AuthorMail = "cowboy\@debian.org";
+#$main::Version = '$Revision: 2.00 $ ';
+$Parse_mc::program_name = 'Parse_mc.pm';
+$Parse_mc::program_version = '@sm_version@';
+$Parse_mc::program_date = '@sm_date@ @sm_time@ cowboy';
+
+my $interp_pgm = "$^X";
+my $interp_vrm = $];
+$interp_vrm = ("$^V" | '000') if (defined $^V);
+my $current_time = scalar localtime;
+my $user = getlogin || (getpwuid($<))[$[] || "Unknown!!";
+my $hostname = hostname();
+my $directory = getcwd();
+
+$Parse_mc::input_files = "@sysconfdir@/mail/sendmail.mc";
+$Parse_mc::database_file = "@sysconfdir@/mail/databases";
+
+my $debug;
+
+#
+# List of FEATURE()s, and their default file names (in path ${smdb_loc})
+my %smdb_features = (
+ access_db => 'access'
+ ,authinfo => 'authinfo'
+ ,bitdomain => 'bitdomain'
+ ,domaintable => 'domaintable'
+ ,genericstable => 'genericstable'
+ ,mailertable => 'mailertable'
+ ,use_cw_file => 'use_cw_file'
+ ,use_ct_file => 'use_ct_file'
+ ,uucpdomain => 'uudomain'
+ ,virtusertable => 'virtusertable'
+ );
+
+# List of classes, and a flag to note if it is reasonable to parse it
+my %smdb_classes = (
+ '' => 1 # Default, no class
+ ,'-' => 1 # ditto
+ ,bestmx => 0 # Lookup best MX record for host
+ ,btree => 1 # NEWDB
+ ,dbm => 1 # NDBM
+ ,dequote => 0 # Remove quotes
+ ,dnsmap => 0 # DNSMAP
+ ,hash => 1 # NEWDB
+ ,hesiod => 1 # HESIOD
+ ,host => 0 # Internal hostname lookup
+ ,implicit => 0 # Search for alias database
+ ,ldap => 0 # LDAPMAP
+ ,nis => 1 # NIS
+ ,nisplus => 1 # NISPLUS
+ ,null => 0 # Always returns false
+ ,program => 1 # Run an external program
+ ,sequence => 0 # Search a series of maps
+ ,stab => 0 # Internal alias
+ ,switch => 0 # Internal alias auto-build
+ ,text => 1 # Lookup in flat text file
+ ,userdb => 1 # Lookup in userdb
+ ,user => 1 # lookup passwd
+ ,newaliases => 1 # for internal usage (of this script)
+ );
+
+#
+#------------------------------------------------------------------------------
+# Prefill entries based upon Sendmail/Debian defaults
+# Yeah, this is long winded, but it needs to be said...
+#------------------------------------------------------------------------------
+my $smdb_loc = "@sysconfdir@/mail/";
+my $smdb_type = 'hash';
+my %smdb_hash = (
+ 'MAIL_SETTINGS_DIR' =>
+ ['-','-',["${smdb_loc}"],'-']
+ ,'DATABASE_MAP_TYPE' =>
+ ["${smdb_type}",'-',['-'],'-']
+ ,'sendmail.cf' =>
+ ['m4','-',["${smdb_loc}sendmail.mc"],'-']
+
+ ,'ALIAS_FILE' =>
+ ['newaliases','-',["${smdb_loc}aliases"],'-']
+# ,'CANONIFY_DOMAIN_FILE' =>
+# ['-','-',["${smdb_loc}canonify_domains"],'%[^\\#]']
+# ,'EXPOSED_USER_FILE' =>
+# ['-','-',["${smdb_loc}exposed_users"],'%[^\\#]']
+ ,'HELP_FILE' =>
+ ['-','-',["${smdb_loc}helpfile"],'-']
+# ,'GENERICS_DOMAIN_FILE' =>
+# ['-','-',["${smdb_loc}generic-domains"],'%[^\\#]']
+# ,'MASQUERADE_DOMAIN_FILE' =>
+# ['-,'-',["${smdb_loc}masquerade-domains"],'%[^\\#]']
+ ,'MSP_STATUS_FILE' =>
+ ['-','-',["@localstatedir@/lib/sendmail/sm-client.st"],'-']
+ ,'MSP_QUEUE_DIR' =>
+ ['-','-',["@localstatedir@/spool/mqueue-client"],'-']
+ ,'QUEUE_DIR' =>
+ ['-','-',["@localstatedir@/spool/mqueue"],'-']
+# ,'RELAY_DOMAIN_FILE' =>
+# ['-','-',["${smdb_loc}relay-domains"],'%[^\\#]']
+ ,'STATUS_FILE' =>
+ ['-','-',["@localstatedir@/lib/sendmail/sendmail.st"],'-']
+# ,'VIRTUSER_DOMAIN_FILE' =>
+# ['-','-',["${smdb_loc}virtual-domains"],'%[^\\#]']
+
+ ,'confCONTROL_SOCKET_NAME' =>
+ ['-','-',["@localstatedir@/run/sendmail/smcontrol"],'-']
+ ,'confCR_FILE' =>
+ ['-','-o',["${smdb_loc}relay-domains"],'%[^\\#]']
+ ,'confCT_FILE' =>
+ ['-','-',["${smdb_loc}trusted-users"],'%[^\\#]']
+ ,'confCW_FILE' =>
+ ['-','-',["${smdb_loc}local-host-names"],'%[^\\#]']
+ ,'confDEAD_LETTER_DROP' =>
+ ['-','-',["@localstatedir@/lib/sendmail/dead.letter"],'-']
+# ,'confDEF_AUTH_INFO' => # Deprecated, use authinfo rules instead
+# ['-','-',["${smdb_loc}default-auth-info"],'-']
+ ,'confEBINDIR' =>
+ ['-','-',["@libexecdir@"],'-']
+# ,'confERROR_MESSAGE' => # No default
+# ['-','-',["${smdb_loc}error-header"],'-']
+ ,'confHOSTS_FILE' =>
+ ['-','-',["@sysconfdir@/hosts"],'-']
+ ,'confHOST_STATUS_DIRECTORY' =>
+ ['-','-',["@localstatedir@/lib/sendmail/host_status"],'-']
+ ,'confPID_FILE' =>
+ ['-','-',["@localstatedir@/run/sendmail/mta/sendmail.pid"],'-']
+ ,'confSERVICE_SWITCH_FILE' =>
+ ['-','-',["${smdb_loc}service.switch"],'-']
+# ,'confUSERDB_SPEC' =>
+# ['btree','-o',["${smdb_loc}userdb"],'-']
+ );
+#
+#
+# Private entries
+$smdb_hash{'databases'} = ['parse_mc','-',["${smdb_loc}sendmail.mc"],'-'];
+$smdb_hash{'Makefile'} = ['update_mk','-',["${smdb_loc}databases"],'-'];
+$smdb_hash{'crontab'} = ['update_conf','-',["${smdb_loc}sendmail.conf"],'-'];
+#
+# Conditional entries
+if ( -s "${smdb_loc}submit.mc" ) {
+ $smdb_hash{'submit.cf'} = ['m4','-',["${smdb_loc}submit.mc"],'-'];
+ };
+
+#
+# Databases/files that require a sendmail restart when modified:
+my %smdb_restart = (
+ 'EXPOSED_USER_FILE' => 1
+ ,'LOCAL_USER_FILE' => 1
+ ,'CANONIFY_DOMAIN_FILE' => 1
+ ,'GENERICS_DOMAIN_FILE' => 1
+ ,'RELAY_DOMAIN_FILE' => 1
+ ,'VIRTUSER_DOMAIN_FILE' => 1
+ ,'LDAPROUTE_DOMAIN_FILE' => 1
+ ,'LDAPROUTE_EQUIVALENT_FILE' => 1
+ ,'MASQUERADE_DOMAIN_FILE' => 1
+ ,'MASQUERADE_EXCEPTION_FILE' => 1
+ ,'confCR_FILE' => 1
+ ,'use_ct_file' => 1
+ ,'use_cw_file' => 1
+ );
+
+$smdb_restart{'sendmail.cf'} = 1;
+if ( -s "${smdb_loc}submit.mc" ) {
+ $smdb_restart{'submit.cf'} = 1; };
+
+# Variables used in parsing lines
+my $smdb_state_looking = 0;
+my $smdb_state_start = 1;
+my $smdb_state_done = 2;
+my $smdb_state = $smdb_state_looking;
+my $smdb_string = '';
+my @smdb_entry = ();
+my $smdb_name = '';
+my $smdb_class = '';
+my @smdb_file = ();
+my $smdb_flags = '';
+my $smdb_options = '';
+my $smdb_default = '';
+
+#------------------------------------------------------------------------------
+# Finally, some code (almost)
+#------------------------------------------------------------------------------
+1; # return (true);
+
+#
+#------------------------------------------------------------------------------
+# Read *.mc/*.m4 files
+#------------------------------------------------------------------------------
+sub read_mc {
+ my ($input_files) = @_;
+ @ARGV = split(' ', $input_files);
+ if ($#ARGV == -1) {
+ my @files = (
+ '/usr/share/sendmail/cf/ostype/linux.m4'
+ ,'/usr/share/sendmail/cf/ostype/debian.m4'
+ ,'/usr/share/sendmail/cf/domain/debian-mta.m4'
+ ,"@sysconfdir@/mail/sendmail.mc"
+ );
+ foreach my $file ( @files ) {
+ push @ARGV, $file if ( -s $file );
+ };
+ };
+ $input_files = join(' ', @ARGV);
+ $Parse_mc::input_files = $input_files;
+ die "No input files" if ($#ARGV == -1);
+ $debug = $main::debug || '';
+
+ #------------------------------------------------------------------
+ # Main loop, iterate over all input lines
+ #------------------------------------------------------------------
+ line: while (<ARGV>) {
+ next line if /^#/; # skip comments
+ next line if /^$/; # skip empty lines
+ chomp; # drop tailing \n
+ if (s/\\$//) {
+ $_ .= <>;
+ redo unless eof();
+ };
+
+ #--------------------------------------------------------------
+ # Look for default database location
+ # define(MAIL_SETTINGS_DIR, @sysconfdir@/mail/)dnl # comment
+ #--------------------------------------------------------------
+ if (/^\s*`?define\(\s*`?MAIL_SETTINGS_DIR/ ..
+ /[^\)]*\)/) {
+ &parse_string($_, 'define');
+ next line if ($smdb_state != $smdb_state_done);
+
+ &get_flags_name_opts;
+ $smdb_loc = $smdb_file[$[];
+ $smdb_class = '-';
+
+ &put_entry($ARGV, 'define');
+ }
+
+ #--------------------------------------------------------------
+ # Look for default database type
+ # define(DATABASE_MAP_TYPE, hash)dnl # comment
+ #--------------------------------------------------------------
+ elsif (/^\s*define\(\s*`?DATABASE_MAP_TYPE/ ..
+ /[^\)]*\)/) {
+ &parse_string($_, 'define');
+ next line if ($smdb_state != $smdb_state_done);
+
+ &get_flags_name_opts;
+ $smdb_type = $smdb_file[$[];
+ @smdb_file = ( $smdb_loc );
+ $smdb_class = $smdb_type;
+
+ &put_entry($ARGV, 'define');
+ }
+
+ #
+ #--------------------------------------------------------------
+ # Look for define(confUSERDB specifications
+ # define(confUSERDB_SPEC, @sysconfdir@/mail/users.db)dnl # comment
+ #--------------------------------------------------------------
+ elsif (/^\s*`?define\(\s*`?confUSERDB_SPEC/ ..
+ /[^\)]*\)/) {
+ &parse_string($_, 'define');
+ next line if ($smdb_state != $smdb_state_done);
+
+ &get_flags_name_opts;
+ $smdb_flags = '-o';
+ $smdb_class = 'btree';
+
+ &put_entry($ARGV, 'define');
+ }
+
+ #--------------------------------------------------------------
+ # Look for all define(confC._FILE specifications
+ # define(confCR_FILE, -o /etc/mail/relay-domains %[^\#])dnl
+ # define(confCT_FILE, -o /etc/mail/sendmail.ct %[^\#])dnl
+ # define(confCW_FILE, -o /etc/mail/sendmail.cw %[^\#])dnl
+ #--------------------------------------------------------------
+ elsif (/^\s*`?define\(\s*`?confC[RTW]_FILE/ ..
+ /[^\)]*\)/) {
+ &parse_string($_, 'define');
+ next line if ($smdb_state != $smdb_state_done);
+
+ &get_flags_name_opts;
+
+ &put_entry($ARGV, 'define');
+ }
+
+ #--------------------------------------------------------------
+ # Look for all *_FILE( specifications
+ # EXPOSED_USER_FILE(/etc/mail/exposed-users %[^\#])dnl
+ # LOCAL_USER_FILE
+ # CANONIFY_DOMAIN_FILE
+ # GENERICS_DOMAIN_FILE(/etc/mail/generic-domains %[^\#])dnl
+ # RELAY_DOMAIN_FILE(/etc/mail/relay-domains %[^\#])dnl
+ # VIRTUSER_DOMAIN_FILE(/etc/mail/virtual-domains %[^\#])dnl
+ # LDAPROUTE_DOMAIN_FILE
+ # LDAPROUTE_EQUIVALENT_FILE
+ # MASQUERADE_DOMAIN_FILE(/etc/mail/masquerade-domains %[^\#])dnl
+ # MASQUERADE_EXCEPTION_FILE
+ #--------------------------------------------------------------
+ elsif (/^\s*`?((EXPOSED|LOCAL)_USER|(CANONIFY|GENERICS|RELAY|VIRTUSER)_DOMAIN|LDAPROUTE_(DOMAIN|EQUIVALENT)|MASQUERADE_(DOMAIN|EXCEPTION))_FILE\(/ ..
+ /[^\)]*\)/) {
+ &parse_string($_, '(');
+ next line if ($smdb_state != $smdb_state_done);
+
+ &get_flags_name_opts;
+
+ &put_entry($ARGV, '');
+ }
+
+ #
+ #--------------------------------------------------------------
+ # Look for all define(conf* specifications
+ # define(confCONTROL_SOCKET_NAME,/var/run/sendmail/smcontrol)dnl
+ # define(confERROR_MESSAGE, MAIL_SETTINGS_DIRerror-header)dnl
+ # define(confSERVICE_SWITCH_FILE,/etc/mail/service.switch)dnl
+ # define(confPID_FILE, /var/run/sendmail/sendmail.pid)dnl
+ # define(confHOSTS_FILE, /etc/hosts)dnl
+ # define(confDEF_AUTH_INFO, /etc/mail/auth-info)dnl
+ # define(confDEAD_LETTER_DROP,/var/lib/sendmail/dead.letter)dnl
+ # define(confHOST_STATUS_DIRECTORY,/var/lib/sendmail/host_status)dnl
+ #--------------------------------------------------------------
+ elsif (/^\s*`?define\(\s*`?conf(CONTROL_SOCKET_NAME|ERROR_MESSAGE|(SERVICE_SWITCH|PID|HOSTS)_FILE|DEF_AUTH_INFO|DEAD_LETTER_DROP|HOST_STATUS_DIRECTORY)/ ..
+ /[^\)]*\)/) {
+ &parse_string($_, 'define');
+ next line if ($smdb_state != $smdb_state_done);
+
+ &get_flags_name_opts;
+
+ &put_entry($ARGV, 'define');
+ }
+
+ #--------------------------------------------------------------
+ # Look for all define(*_FILE specifications (No options here)
+ # define(ALIAS_FILE, @sysconfdir@/mail/aliases.private,...)dnl
+ # define(HELP_FILE, /etc/mail/helpfile)dnl
+ # define(STATUS_FILE, /var/lib/sendmail/sendmail.st)dnl
+ # define(QUEUE_DIR, /var/spool/mqueue/main*)dnl
+ # define(MSP_QUEUE_DIR, /var/spool/mqueue-client)dnl
+ #--------------------------------------------------------------
+ elsif (/^\s*`?define\(\s*`?((ALIAS|HELP|STATUS)_FILE)|(MSP_)?QUEUE_DIR/ ..
+ /[^\)]*\)/) {
+ &parse_string($_, 'define');
+ next line if ($smdb_state != $smdb_state_done);
+
+ &get_flags_name_opts;
+
+ &put_entry($ARGV, 'define');
+ }
+
+ #--------------------------------------------------------------
+ # Look for all queue definition specifications
+ # define(QUEUE_GROUP, ...)dnl
+ #--------------------------------------------------------------
+ elsif (/^\s*`?QUEUE_GROUP\(/ .. /[^\)]*\)/) {
+ &parse_string($_, '(');
+ next line if ($smdb_state != $smdb_state_done);
+
+ $smdb_string =~ /\s*([\w_]+).*P[^=]*=([^\*,\)]*).*/;
+ $smdb_name = 'QUEUE_GROUP';
+ $smdb_class = '-'; # $1
+ $smdb_flags = '-';
+ @smdb_file = ($2);
+ $smdb_options = '-'; # Pull out other options?
+
+ &put_entry($ARGV, '', 1);
+ }
+
+ #
+ #--------------------------------------------------------------
+ # Locate all non-commented FEATURE macros
+ # FEATURE(name[, [type [flags] file][, ...]...])dnl #comment
+ #--------------------------------------------------------------
+ elsif (/^\s*`?FEATURE\(/ .. /[^\)]*\)/) {
+ &parse_string($_, 'FEATURE');
+ next line if ($smdb_state != $smdb_state_done);
+
+ # ignore non-db features
+ next line if ( ! exists($smdb_features{$smdb_name}) );
+
+ &get_flags_name_opts;
+
+ if ($smdb_name eq 'use_ct_file') {
+ &get_entry('confCT_FILE');
+ }
+ elsif ($smdb_name eq 'use_cw_file') {
+ &get_entry('confCW_FILE');
+ }
+ else {
+ @smdb_file =
+ ("${smdb_loc}$smdb_features{$smdb_name}")
+ if ($smdb_file[$[] eq '-'
+ and $smdb_class ne 'ldap');
+ $smdb_class = $smdb_type
+ if ($smdb_class eq '-');
+ };
+
+ &put_entry($ARGV, 'FEATURE');
+ };
+ };
+ };
+
+#
+#------------------------------------------------------------------------------
+# Write out the accumulated information to a flat database file
+#------------------------------------------------------------------------------
+sub write_dbs {
+ my ($database_file, $input_files) = @_;
+ my $ofh = new FileHandle;
+
+ $database_file = $database_file || $Parse_mc::database_file;
+ $Parse_mc::database_file = $database_file;
+ my $caller = "$main::program_name" if ($main::program_name);
+ $caller .= " $main::program_version" if ($main::program_version);
+ $caller .= " $main::program_date" if ($main::program_date);
+ $debug = $main::debug || '';
+
+ $database_file = '&STDOUT' if ($database_file eq '-');
+ unless ( open($ofh, ">$database_file") ) {
+ warn("Could not open $database_file($!), using STDOUT.\n");
+ open($ofh, ">&STDOUT");
+ };
+ $database_file = '-' if ($database_file eq '&STDOUT');
+
+ print $ofh <<"EOT";
+####################################################################
+##### This file is automatically generated -- edit at your own risk
+#####
+##### Copyright (c) 2000-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#####
+##### file: ${database_file}
+##### generated via: (${interp_pgm} ${interp_vrm})
+##### ${caller}
+##### ${Parse_mc::program_name} ${Parse_mc::program_version} ${Parse_mc::program_date}
+##### by: ${user}\@${hostname}
+##### on: ${current_time}
+##### in: ${directory}
+##### input files:
+EOT
+ foreach my $file ( split(' ', $Parse_mc::input_files) ) {
+ print $ofh <<"EOT";
+##### ${file}
+EOT
+ }
+ print $ofh <<"EOT";
+#####
+##### Used by:
+##### update_{db,mk}
+#####
+##### The following databases are used by Debian Sendmail
+#####
+##### Format:
+##### <df>:<map>:<flags>:<file>:<opts>:
+##### Where:
+##### <df> = define or FEATURE name
+##### <map> = map type (-,text,btree,hash, etc.)
+##### <flags> = map flags (-o for optional, etc.)
+##### <file> = file name
+##### <opts> = map options (%[^\\#] for sprintf, etc.)
+#####
+####################################################################
+EOT
+
+ #
+ # delete unneeded elements
+ #delete $smdb_hash{"MAIL_SETTINGS_DIR"};
+ #delete $smdb_hash{"DATABASE_MAP_TYPE"};
+ #delete $smdb_hash{"confCT_FILE"};
+ #delete $smdb_hash{"confCW_FILE"};
+
+ # print define(/FEATURE(/xxx( items
+ foreach $smdb_name (sort keys %smdb_hash) {
+ &get_entry($smdb_name);
+ foreach my $file ( @smdb_file ) {
+ print $ofh join(':',
+ $smdb_name
+ ,$smdb_class
+ ,$smdb_flags
+ ,$file
+ ,$smdb_options
+ ,''
+ ), "\n";
+ };
+ };
+
+ close($ofh);
+ if ($database_file eq "@sysconfdir@/mail/databases") {
+ chown '0', '0', "$database_file";
+ chmod 0644, "$database_file";
+ };
+ };
+
+#
+#------------------------------------------------------------------------------
+# Read in the accumulated information from a flat database file
+#------------------------------------------------------------------------------
+sub read_dbs {
+ my ($database_file, $input_files) = @_;
+ my $ifh = new FileHandle;
+ my $name = '';
+ my @entry;
+
+ $database_file = $database_file || $Parse_mc::database_file;
+ $Parse_mc::database_file = $database_file;
+ $debug = $main::debug || '';
+
+ unless ( open($ifh, "<$database_file") ) {
+ warn("Could not open $database_file($!), creating it.\n");
+ &read_mc($input_files);
+ &write_dbs($database_file, $input_files);
+ # At this point, we have the data, don't need to re-read it...
+ return;
+ };
+
+ #------------------------------------------------------------------
+ # Main loop, iterate over all input lines
+ #------------------------------------------------------------------
+ line: while (<$ifh>) {
+ next line if /^#/; # skip comments
+ next line if /^$/; # skip empty lines
+ chomp; # drop tailing \n
+
+ @entry = split(':', $_);
+
+ # Accumulate file names and enter when complete
+ if ($name eq $entry[$[]) {
+ push @smdb_file, $entry[3];
+ }
+ else {
+ if ($name ne '') {
+ &put_entry('', '');
+ };
+ $name = $entry[$[];
+ $smdb_name = $entry[$[];
+ $smdb_class = $entry[1];
+ $smdb_flags = $entry[2];
+ @smdb_file = $entry[3];
+ $smdb_options = $entry[4];
+ };
+ };
+
+ # enter any remaining data
+ if ($name ne '') {
+ &put_entry('', '');
+ };
+
+ close($ifh);
+ };
+
+#
+#------------------------------------------------------------------------------
+# Obtain the list of names in smdb_hash (in an ordered manor)
+#------------------------------------------------------------------------------
+sub names_dbs {
+
+ # We need a partial ordering here (psuedo dependancies)
+ my @names;
+ my %dbs = ();
+ foreach my $entry ('databases', 'Makefile', 'crontab', 'QUEUE_GROUP',
+ 'sendmail.cf', 'submit.cf') {
+ if (exists($smdb_hash{$entry})) {
+ $dbs{$entry} = '';
+ push @names, $entry;
+ };
+ };
+
+ # Now, add any remaining databases to the list (except aliases)
+ foreach my $entry (sort keys %smdb_hash) {
+ next if ($entry eq 'ALIAS_FILE');
+ push @names, $entry
+ if (! exists($dbs{$entry}));
+ $dbs{$entry} = '';
+ };
+
+ # Finally, add aliases...
+ my $entry = 'ALIAS_FILE';
+ if (exists($smdb_hash{$entry})) {
+ push @names, $entry
+ if (! exists($dbs{$entry}));
+ $dbs{$entry} = '';
+ };
+
+ return(@names);
+ };
+
+#------------------------------------------------------------------------------
+# Obtain the list of names that require a sendmail restart
+#------------------------------------------------------------------------------
+sub restart_dbs {
+ return(keys %smdb_restart);
+ };
+
+#------------------------------------------------------------------------------
+# Obtain an individual database entry (returning a copy)
+#------------------------------------------------------------------------------
+sub entry_dbs {
+ my ($name) = @_;
+ $smdb_name = $name;
+ &get_entry($smdb_name);
+
+ # Return a local copy - so they can't change *MY* data...
+ my @entry = @smdb_entry;
+ return (@entry);
+ };
+
+#
+#------------------------------------------------------------------------------
+# Save the results of the database entry and reset the state
+#------------------------------------------------------------------------------
+sub put_entry {
+ my ($file, $type, $multi_file) = @_;
+
+ # Create entry record from data pieces/parts
+ if ($multi_file and exists($smdb_hash{$smdb_name})) {
+ @smdb_entry = @{$smdb_hash{$smdb_name}};
+ }
+ else {
+ @smdb_entry = ('-', '-', [], '-');
+ };
+ $smdb_entry[$[] = $smdb_class;
+ $smdb_entry[1] = $smdb_flags;
+ push @{$smdb_entry[2]}, @smdb_file;
+ $smdb_entry[3] = $smdb_options;
+
+ # Save lastmost entry
+ @{$smdb_hash{$smdb_name}} = @smdb_entry;
+
+ # Minimal debugging
+ if ($debug) {
+ print STDERR "PUT: ";
+ if ($type ne '') { print STDERR "$type($smdb_name)" }
+ else { print STDERR "$smdb_name()" };
+ print STDERR " => ", join(':'
+ , $smdb_class
+ , join(',', @{$smdb_entry[2]})
+ , $smdb_options
+ , ''
+ ), "\n";
+ };
+
+ # reset state
+ $smdb_state = $smdb_state_looking;
+ };
+
+#
+#------------------------------------------------------------------------------
+# Retrieve a database entry
+#------------------------------------------------------------------------------
+sub get_entry {
+ my ($name) = @_;
+
+ if (exists($smdb_hash{$name}) ) {
+ @smdb_entry = @{$smdb_hash{$name}};
+ }
+ else {
+ @smdb_entry = ('-', '-', ['-'], '-');
+ };
+
+ $smdb_class = $smdb_entry[$[];
+ $smdb_flags = $smdb_entry[1];
+ @smdb_file = @{$smdb_entry[2]};
+ $smdb_options = $smdb_entry[3];
+
+ # Minimal debugging
+ if ($debug) {
+ print STDERR "GET: ",
+ "$name",
+ " => ", join(':'
+ , $smdb_class
+ , join(',', @{$smdb_entry[2]})
+ , $smdb_options
+ , ''
+ ), "\n";
+ };
+
+ };
+
+#
+#------------------------------------------------------------------------------
+# This function does most of the work in parsing a series of lines to
+# construct a database entry - it manages the state machine and assorted
+# global variables
+#------------------------------------------------------------------------------
+sub parse_string {
+ my ($str, $type) = @_;
+ my $count = -1;
+ my @entry = '';
+ my $pending_state = 0;
+
+ # Strip trailing '?\)(dnl)?.*$ from string
+ if ($str =~ /\s*'?\s*\)/) {
+ $str =~ s/\s*'?\s*\)\s*(dnl)?.*$//;
+ $pending_state = $smdb_state_done;
+ };
+
+ # Strip trailing 'dnl .*' from string
+ if ($str =~ /dnl(\s+.*)?$/) {
+ $str =~ s/dnl(\s+.*)?$//;
+ };
+
+ # Strip leading `?define\(\s*`? from string
+ if (($type eq 'define') and
+ ($str =~ /^\s*`?define\(/)) {
+ $str =~ s/^\s*`?define\(\s*`?//;
+ $str =~ s/,/ /;
+ $smdb_state = $pending_state || $smdb_state_start;
+ $smdb_string = '';
+ $count = (@entry = split(' ', $str));
+ ($smdb_name = $entry[$[]) =~ tr/'//d;
+ shift(@entry);
+ $str = join(' ', @entry);
+ }
+
+ # Strip leading `?FEATURE\(\s*`? from string
+ elsif (($type eq 'FEATURE') and
+ ($str =~ /^\s*`?FEATURE\(/)) {
+ $str =~ s/^\s*`?FEATURE\(\s*`?//;
+ $str =~ s/,/ /;
+ $smdb_state = $pending_state || $smdb_state_start;
+ $smdb_string = '';
+ $count = (@entry = split(' ', $str));
+ ($smdb_name = $entry[$[]) =~ tr/'//d;
+ shift(@entry);
+ $str = join(' ', @entry);
+ }
+
+ # Strip leading `?[\w_]+\(\s*`? from string
+ elsif (($type eq '(') and
+ ($str =~ /^\s*`?[\w_]+\(/)) {
+ $str =~ s/\(/ /;
+ $smdb_state = $pending_state || $smdb_state_start;
+ $smdb_string = '';
+ $count = (@entry = split(' ', $str));
+ ($smdb_name = $entry[$[]) =~ tr/'//d;
+ shift(@entry);
+ $str = join(' ', @entry);
+ }
+ else {
+ $smdb_state = $pending_state || $smdb_state;
+ };
+
+ #
+ # Strip quotes (` and ') from string
+ $str =~ tr/`'//d;
+
+ # FEATURE( is the only one allowed to have only one argument
+ if ($type ne 'FEATURE' and $count == 1) {
+ $str = '';
+ };
+
+ # Change imbedded MAIL_SETTINGS_DIR to $smdb_loc
+ if ($smdb_name ne 'MAIL_SETTINGS_DIR') {
+ $str =~ s/MAIL_SETTINGS_DIR/$smdb_loc/g
+ };
+
+ # Change imbedded DATABASE_MAP_TYPE to $smdb_type
+ if ($smdb_name ne 'DATABASE_MAP_TYPE') {
+ $str =~ s/DATABASE_MAP_TYPE/$smdb_type/g
+ };
+
+ # concatentate this string with any prior information
+ $smdb_string .= ' ' . $str unless($smdb_state == $smdb_state_looking);
+
+ # Return
+ return;
+ };
+
+#
+#------------------------------------------------------------------------------
+# This function parses a line into flags (-o, etc.), name, options
+#------------------------------------------------------------------------------
+sub get_flags_name_opts {
+ my @entry;
+ my $class = '';
+ my $rest = '';
+ my $multi_names = 0;
+
+ $smdb_class = '';
+ $smdb_flags = '';
+ @smdb_file = ();
+ $smdb_options = '';
+
+ @entry = split(' ', $smdb_string);
+
+ # Pull off any leading flags (including database type/class)
+ # Class specification: "[mapkey]@mapclass:mapspec"
+ # RELAY_DOMAIN_FILE(`@LDAP')dnl
+ # VIRTUSER_DOMAIN_FILE(`@ldap:-k
+ # (&(objectClass=virtHosts)(host=*)) -v host')dnl
+ # FEATURE(`genericstable', `LDAP')dnl
+ # FEATURE(`genericstable', `nis:realnames.by2mail')dnl
+ # define(`ALIAS_FILE', `ldap:')dnl
+ # define(`ALIAS_FILE', `ldap:-k
+ # (&(objectClass=mailGroup)(mail=%0)) -v mgrpRFC822MailMember')dnl
+ # but only if there are flags *and* a name...
+ if (@entry) {
+ ($class = lc($entry[$[])) =~ s/:.*//;
+ ($rest = $entry[$[]) =~ s/.*://;
+ $rest = '' if (lc($rest) eq 'ldap');
+ if ($class =~ /^.*@/) {
+ $class =~ s/^.*@//;
+ if (exists($smdb_classes{$class})) {
+ $smdb_class = $class;
+ shift (@entry);
+ };
+ }
+ elsif (exists($smdb_classes{$class})) {
+ $smdb_class = $class;
+ $rest = '' if ($rest eq $class);
+ shift (@entry);
+ @entry = split(' ', join(' ',$rest,@entry) );
+ $#entry = -1 if ($smdb_class eq 'ldap');
+ };
+ FLAG_LOOP: while (@entry) {
+ if (substr($entry[$[], 0, 1) eq '-') {
+ if ($smdb_flags eq '') {
+ $smdb_flags = $entry[$[];
+ }
+ else {
+ $smdb_flags .= ' ' . $entry[$[];
+ };
+ shift (@entry);
+ }
+ else {
+ last FLAG_LOOP;
+ };
+ };
+ };
+#print STDERR "$class($rest) ::= ",scalar @entry,join(' ','',@entry,''),"\n";
+ $smdb_flags = $smdb_flags || '-';
+ $smdb_class = $smdb_class || '-';
+
+ #
+ # A few special cases...
+ if ($smdb_name eq 'ALIAS_FILE' and $smdb_class eq '-') {
+ $smdb_class = 'newaliases';
+ @entry = (join('',@entry));
+ $multi_names = 1;
+ }
+ elsif ($smdb_name eq 'confUSERDB_SPEC') {
+ @entry = (join('',@entry));
+ $multi_names = 1;
+ };
+
+ # Handle multi-files specially
+ if ( $multi_names == 1 ) {
+ @smdb_file = split(',', $entry[$[]);
+ $smdb_options = '-';
+ }
+ else {
+ # Whats left should be a filename (or somesuch) and options
+ if (@entry >= 1) { # file name, possible options if /,/
+ if ($smdb_classes{$smdb_class} != 1) {
+ @smdb_file = '-';
+ }
+ else {
+ @smdb_file = $entry[$[];
+ shift(@entry);
+ };
+ if (@entry >= 1) {
+ $entry[$[] =~ s/^,//;
+ foreach my $ndx ($[ .. $#entry) {
+ $smdb_options .= ' '
+ if ($ndx != 0
+ and substr($entry[$ndx], 0, 1) ne ',');
+ $smdb_options .= $entry[$ndx];
+ }
+ }
+ $#entry = -1;
+ };
+
+ # Check for possible options caught in the filename slot
+ if (@smdb_file >= 1 and index($smdb_file[$[], ',') != -1) {
+ @entry = split(/,/, $smdb_file[$[]);
+ @smdb_file = ( $entry[$[] );
+ if (@entry >= 2) {
+ $smdb_options = join('', @entry[1..$#entry],
+ $smdb_options);
+ $#entry = -1;
+ };
+ };
+ $smdb_file[$[] = $smdb_file[$[] || '-';
+ $smdb_file[$[] =~ s/\.db//;
+ $smdb_options = $smdb_options || '-';
+ };
+
+ # Return
+ return;
+ };
+
+__END__
diff --git a/debian/local/configure b/debian/local/configure
deleted file mode 100644
index 648e260..0000000
--- a/debian/local/configure
+++ /dev/null
@@ -1,903 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
- # If the previous option needs an argument, assign it.
- if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
- ac_prev=
- continue
- fi
-
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
-
- # Accept the important Cygnus configure options, so we can diagnose typos.
-
- case "$ac_option" in
-
- -bindir | --bindir | --bindi | --bind | --bin | --bi)
- ac_prev=bindir ;;
- -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
-
- -build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
- -build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
-
- -cache-file | --cache-file | --cache-fil | --cache-fi \
- | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
- ac_prev=cache_file ;;
- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
- | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
-
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
- ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
- datadir="$ac_optarg" ;;
-
- -disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
-
- -enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
-
- -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
- | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
- | --exec | --exe | --ex)
- ac_prev=exec_prefix ;;
- -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
- | --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
-
- -gas | --gas | --ga | --g)
- # Obsolete; use --with-gas.
- with_gas=yes ;;
-
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
-
- -host | --host | --hos | --ho)
- ac_prev=host ;;
- -host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
-
- -includedir | --includedir | --includedi | --included | --include \
- | --includ | --inclu | --incl | --inc)
- ac_prev=includedir ;;
- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
- | --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
-
- -infodir | --infodir | --infodi | --infod | --info | --inf)
- ac_prev=infodir ;;
- -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
-
- -libdir | --libdir | --libdi | --libd)
- ac_prev=libdir ;;
- -libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
-
- -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
- | --libexe | --libex | --libe)
- ac_prev=libexecdir ;;
- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
- | --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
-
- -localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
- ac_prev=localstatedir ;;
- -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
-
- -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
- ac_prev=mandir ;;
- -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
-
- -nfp | --nfp | --nf)
- # Obsolete; use --without-fp.
- with_fp=no ;;
-
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
- no_create=yes ;;
-
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- no_recursion=yes ;;
-
- -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
- | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
- | --oldin | --oldi | --old | --ol | --o)
- ac_prev=oldincludedir ;;
- -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
- | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
-
- -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
- ac_prev=prefix ;;
- -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
-
- -program-prefix | --program-prefix | --program-prefi | --program-pref \
- | --program-pre | --program-pr | --program-p)
- ac_prev=program_prefix ;;
- -program-prefix=* | --program-prefix=* | --program-prefi=* \
- | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
-
- -program-suffix | --program-suffix | --program-suffi | --program-suff \
- | --program-suf | --program-su | --program-s)
- ac_prev=program_suffix ;;
- -program-suffix=* | --program-suffix=* | --program-suffi=* \
- | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
-
- -program-transform-name | --program-transform-name \
- | --program-transform-nam | --program-transform-na \
- | --program-transform-n | --program-transform- \
- | --program-transform | --program-transfor \
- | --program-transfo | --program-transf \
- | --program-trans | --program-tran \
- | --progr-tra | --program-tr | --program-t)
- ac_prev=program_transform_name ;;
- -program-transform-name=* | --program-transform-name=* \
- | --program-transform-nam=* | --program-transform-na=* \
- | --program-transform-n=* | --program-transform-=* \
- | --program-transform=* | --program-transfor=* \
- | --program-transfo=* | --program-transf=* \
- | --program-trans=* | --program-tran=* \
- | --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
-
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
- | --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
-
- -sharedstatedir | --sharedstatedir | --sharedstatedi \
- | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
- | --sharedst | --shareds | --shared | --share | --shar \
- | --sha | --sh)
- ac_prev=sharedstatedir ;;
- -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
- | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
- | --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
-
- -site | --site | --sit)
- ac_prev=site ;;
- -site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
-
- -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
- ac_prev=srcdir ;;
- -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
-
- -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
- | --syscon | --sysco | --sysc | --sys | --sy)
- ac_prev=sysconfdir ;;
- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
- | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
-
- -target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
- -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
-
- -v | -verbose | --verbose | --verbos | --verbo | --verb)
- verbose=yes ;;
-
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
-
- -with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
- *) ac_optarg=yes ;;
- esac
- eval "with_${ac_package}='$ac_optarg'" ;;
-
- -without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
- # Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
-
- --x)
- # Obsolete; use --with-x.
- with_x=yes ;;
-
- -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
- | --x-incl | --x-inc | --x-in | --x-i)
- ac_prev=x_includes ;;
- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
- | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
-
- -x-libraries | --x-libraries | --x-librarie | --x-librari \
- | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
- ac_prev=x_libraries ;;
- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
- | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
-
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
- ;;
-
- *)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
- ;;
-
- esac
-done
-
-if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
- esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=configure.in
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
- ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
- srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
- srcdir=..
- fi
-else
- ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
- else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
- . "$ac_site_file"
- fi
-done
-
-if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
-else
- echo "creating cache $cache_file"
- > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-#
-# Check for presence if NISPLUS headers
-#
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:530: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 545 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 562 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 579 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-for ac_hdr in rpcsvc/nis.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:613: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 618 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-
-
-# Fini - update site.config.m4 for sendmail build
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "site.config.m4" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CPP@%$CPP%g
-s%@ac_cv_header_rpcsvc_nis_h@%$ac_cv_header_rpcsvc_nis_h%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"site.config.m4"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
-
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
-
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
-
-
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
- esac
-
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/debian/local/configure.in b/debian/local/configure.in
deleted file mode 100644
index 7099c2b..0000000
--- a/debian/local/configure.in
+++ /dev/null
@@ -1,10 +0,0 @@
-AC_INIT(configure.in)
-
-#
-# Check for presence if NISPLUS headers
-#
-AC_CHECK_HEADERS(rpcsvc/nis.h)
-AC_SUBST(ac_cv_header_rpcsvc_nis_h)
-
-# Fini - update site.config.m4 for sendmail build
-AC_OUTPUT(site.config.m4)
diff --git a/debian/local/el33t.h b/debian/local/el33t.h
deleted file mode 100644
index ce7bf94..0000000
--- a/debian/local/el33t.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#define _FFR_DSN_RRT_OPTION 1
-#define _FFR_PIDFILE_OPTION 1
-#define _FFR_WRITABLE_DIRECTORIES_ARE_FATAL_OPTION 1
-#define _FFR_DONT_PROBE_INTERFACES_OPTION 1
-#define _FFR_MAXRCPT_OPTION 1
-#define _FFR_DEADLETTERDROP_OPTION 1
diff --git a/debian/local/ip-down.d b/debian/local/ip-down.d
deleted file mode 100644
index 1881437..0000000
--- a/debian/local/ip-down.d
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-#
-# This script is called when ppp disconnects from the network.
-#
-# Here is where we'll stop sendmail if needed
-#
-# Written By Richard Nelson <cowboy@debian.org>
-#
-# NOTE: The following lines (without the #) must be in /etc/mail/sendmail.mc:
-# include(`/etc/mail/dialup.m4')dnl
-# include(`/etc/mail/provider.m4')dnl
-#
-# Exit by default, check for validity before commenting out the next line:
-exit 0
-
-# New mail will only be queued
-file="/etc/mail/dialup.m4"
-if [ -f "$file" ]; then
- echo "LOCAL_CONFIG" >> $file
- echo "#------------------------------------------------------------" >> $file
- echo "#" > $file
- echo "# Dynamic updates from $0" >> $file
- echo "#" >> $file
- echo "# sendmail is to only queue messages until connected again" >> $file
- echo "define(\`confDELIVERY_MODE', \`deferred')dnl" >> $file
- echo "# Allow the queue to age without carping every four hours" >> $file
- echo "define(\`confTO_QUEUEWARN',\`1d')dnl" >> $file
- echo "# Don't keep host status while the network is down" >> $file
- echo "define(\`confHOST_STATUS_DIRECTORY')dnl" >> $file
- echo "#------------------------------------------------------------" >> $file
- fi
-
-# Build a new sendmail.cf from sendmail.mc, including our address.
-# NOTE: The following line (without the #) must be in /etc/mail/sendmail.mc:
-# include(`/etc/mail/dialup.m4')
-m4 /usr/share/sendmail/sendmail.cf/m4/cf.m4 /etc/mail/sendmail.mc \
- >/etc/mail/sendmail.cf.pnew
-chmod 0640 /etc/mail/sendmail.cf.pnew
-chown root.mail /etc/mail/sendmail.cf.pnew
-mv -f /etc/mail/sendmail.cf.pnew /etc/mail/sendmail.cf
-
-# Stop/reload sendmail daemon as needed
-/etc/init.d/sendmail reload
diff --git a/debian/local/ip-up.d b/debian/local/ip-up.d
deleted file mode 100644
index 9053a4e..0000000
--- a/debian/local/ip-up.d
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/bin/sh
-#
-# This script is called when ppp connects to the network.
-#
-# Here is where we'll start sendmail if needed, and will
-# run the queue in either case.
-#
-# Written By Richard Nelson <cowboy@debian.org>
-#
-# NOTE: The following lines (without the #) must be in /etc/mail/sendmail.mc:
-# include(`/etc/mail/dialup.m4')dnl
-# include(`/etc/mail/provider.m4')dnl
-#
-# ALSO: make sure ipparam is specified somewhere in the ppp options;
-# it will be used as the name of a file in /etc/mail/peers
-#
-# Exit by default, check for validity before commenting out the next line:
-exit 0
-
-# Define our domain name (from PPP) for sendmail.
-
-# These variables are for the use of the scripts run by run-parts
-#PPP_IFACE="$1"
-#PPP_TTY="$2"
-#PPP_SPEED="$3"
-#PPP_LOCAL="$4"
-#PPP_REMOTE="$5"
-#PPP_IPPARAM="$6"
-
-if [ ! -z "$PPP_LOCAL" ]; then
- addr=$PPP_LOCAL
- provider=$PPP_IPPARAM
-else
- addr=$1
- provider=$2
- fi
-
-# Determine our fqdn from our ISP
-maxloop=20
-cntr=0
-name=""
-until (test ! -z "$name"); do
- cntr=$(($cntr+1))
- name=$(nslookup $addr | grep '^Name:' | awk '{print $2}')
- test=$(echo $name | cut -d ' ' -f 1)
- if [ "$name" != "**" ]; then
- break
- elif (($cntr > $maxloop)); then
- name=""
- break
- fi
- done
-
-if [ ! -z "$name" ]; then
- file="/etc/mail/dialup.m4"
- echo "LOCAL_CONFIG" >> $file
- echo "#------------------------------------------------------------" >> $file
- echo "#" > $file
- echo "# Dynamic updates from $0" >> $file
- echo "#" >> $file
- echo "# Define our true hostname (from our ISP) becomes \$j" >> $file
- echo "define(\`confDOMAIN_NAME', \`$name')dnl" >> $file
- echo "# Make sure we accept mail as this name (for bounces, etc)" >> $file
- echo "Cw$name" >> $file
- echo "# Add our hostname to class G for genericstable support" >> $file
- echo "CG$name" >> $file
- echo "#------------------------------------------------------------" >> $file
- fi
-
-# Add smarthost information (if any)... But not if provider.m4 is a link !
-if [ -f /etc/mail/peers/$provider -a ! -L /etc/mail/provider.m4 ]; then
- file="/etc/mail/provider.m4"
- echo "LOCAL_CONFIG" >> $file
- echo "#------------------------------------------------------------" >> $file
- echo "#" > $file
- echo "# Dynamic updates from $0" >> $file
- echo "#" >> $file
- echo "# Provider information from /etc/mail/peers/$provider" >> $file
- cat /etc/mail/peers/$provider >> $file
- echo "#------------------------------------------------------------" >> $file
- fi
-
-# Build a new sendmail.cf from sendmail.mc, including our address.
-# NOTE: The following lines (without the #) must be in /etc/mail/sendmail.mc:
-# include(`/etc/mail/dialup.m4')dnl
-# include(`/etc/mail/provider.m4')dnl
-m4 /usr/share/sendmail/sendmail.cf/m4/cf.m4 /etc/mail/sendmail.mc \
- >/etc/mail/sendmail.cf.pnew
-chmod 0640 /etc/mail/sendmail.cf.pnew
-chown root.mail /etc/mail/sendmail.cf.pnew
-mv -f /etc/mail/sendmail.cf.pnew /etc/mail/sendmail.cf
-
-# Purge any latent host status that might cause us to *NOT* send mail
-purgestat
-
-# Start/reload sendmail as needed
-/etc/init.d/sendmail reload # may be up, or down
-
-# Process the sendmail queue (background so as to not defer other ip-up work)
-runq &
diff --git a/debian/local/local_no_masquerade.m4 b/debian/local/local_no_masquerade.m4
new file mode 100644
index 0000000..5c8a693
--- /dev/null
+++ b/debian/local/local_no_masquerade.m4
@@ -0,0 +1,25 @@
+divert(-1)
+#-----------------------------------------------------------------------------
+# $Sendmail: ./local_no_masquerade,v 8.9.3 1999/10/20 12:00:00 cowboy Exp $
+#
+# Copyright (c) 1999-2001 Richard Nelson. All Rights Reserved.
+#
+# feature(local_no_masquerade) config file for building Sendmail
+#
+# Prevent masquerading of local senders when sending to local recipients
+# used by: mailer/local.m4
+#
+# Note: I originally called this `dont_masquerade_local', but have since
+# changed the name to correspond with what Sendmail 8.12.0 supports.
+# The local patches to cf/mailer/local.m4 remain unaltered.
+#
+#-----------------------------------------------------------------------------
+#
+divert(0)
+VERSIONID(`@(#)local_no_masquerade.m4 1.0 (Debian) 1999-10-20')
+divert(-1)
+
+ifdef(`_MAILER_local_',
+ `errprint(`*** FEATURE(local_no_masquerade) must occur before MAILER(local)')')dnl
+
+define(`_DONT_MASQUERADE_LOCAL_', 1)dnl
diff --git a/debian/local/parse_mc.in b/debian/local/parse_mc.in
new file mode 100644
index 0000000..569e355
--- /dev/null
+++ b/debian/local/parse_mc.in
@@ -0,0 +1,86 @@
+#!/usr/bin/perl -w
+#------------------------------------------------------------------------
+#
+# $Sendmail: parse_mc,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Parse Sendmail config for databases
+#
+# Copyright 2000-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# Notes (to all):
+# * for "define(xxx,...)"; "define(xxx," must be on same line, but the
+# rest may be split across multiple lines
+# * assumes makemap dbtype /etc/mail/database < /etc/mail/database
+#
+# Notes (to self):
+# *
+#
+#------------------------------------------------------------------------
+# My first perl program (from my first awk program ;-})
+#
+# Initialization of the perl environment
+use strict; # be kosher
+use Env; # A few environmental references
+use integer; # Peformance
+use Getopt::Long; # parameter handling
+
+# Local libraries - for Debian Sendmail Perl helper functions
+# BEGIN { $main::my_path = substr($0,$[,rindex($0,'/')) };
+use lib ('.', substr($0,$[,rindex($0,'/')), "@datadir@/sendmail");
+require Parse_mc;
+
+# Version of this program
+#($main::MYNAME = $main::0) =~ s|.*/||;
+#$main::Author = "Richard Nelson";
+#$main::AuthorMail = "cowboy\@debian.org";
+#$main::Version = '$Revision: 2.00 $ ';
+$main::program_name = $0;
+$main::program_version = '@sm_version@';
+$main::program_date = '@sm_date@ @sm_time@ cowboy';
+$main::debug = 0;
+
+#
+#------------------------------------------------------------------------------
+# Finally, some code (almost)
+#------------------------------------------------------------------------------
+#
+# Argument handling...
+$main::opt_help='';
+$main::opt_output_file='';
+$main::opt_input_file='';
+$main::opt_debug='';
+my @options = qw(
+ help|h
+ output-file|output_file|o:s
+ input-file|input_file|i:s@
+ debug!
+ );
+my $result = GetOptions(@options);
+if ( ! $result ) {
+ die "Terminating due to parameter error";
+ };
+if ( $main::opt_help ) {
+ warn "$main::program_name $main::program_version $main::program_date\n";
+ warn "$0 \n";
+ warn " -help\n" if $main::opt_help;
+ warn " -debug\n" if $main::opt_debug;
+ warn " -o $main::opt_output_file\n" if $main::opt_output_file;
+ warn " -i $main::opt_input_file\n" if $main::opt_input_file;
+ exit 0;
+ };
+
+${Parse_mc::database_file} = $main::opt_output_file
+ if $main::opt_output_file;
+my $input_files = join(' ', @main::opt_input_file);
+# $main::debug is used in parse_mc !
+$main::debug = $main::opt_debug || $main::debug;
+
+# Let them know wtf is going on...
+print STDOUT "Creating ${Parse_mc::database_file}...\n";
+
+# Read the mc/m4 files
+&Parse_mc::read_mc($input_files);
+
+# Write out the textual representation
+&Parse_mc::write_dbs('', $input_files);
+
diff --git a/debian/local/parsemc b/debian/local/parsemc
deleted file mode 100644
index 81a180e..0000000
--- a/debian/local/parsemc
+++ /dev/null
@@ -1,608 +0,0 @@
-#!/bin/bash
-#
-# Parse Sendmail config for databases
-#
-# Copyright (c) 1999, Richard Nelson <cowboy@debian.org>.
-# Time-stamp: <1999/05/19 10:00:00 cowboy>
-#
-# Notes (to all):
-# * assumes makemap dbtype /etc/mail/database < /etc/mail/database
-# * Does *not* run with sh=ash (no echo -e support)
-#
-# Notes (to self):
-# * changes made herein *must* be reflected in parsemc,updatedb,debian.m4
-# * remember to change gawk to awk before release (gawk is more anal)
-# * multiple db options not supported
-# * chmod/chown of secondary alias databases not being done - no harm...
-# * userdb can also have multiple databases and then a forward!
-# * need sendmail stop/start
-#
-# List of db features
-db_features="access_db bitdomain domaintable genericstable \
- mailertable uucpdomain virtusertable use_cw_file use_ct_file";
-export db_features;
-# kluge for userdb, cr, ct, and cw files support
-db_files="confCR_FILE confUSERDB_SPEC ALIAS_FILE";
-db_files="sendmail.mc $db_features $db_files";
-export db_files;
-#
-# Variables for documentation
-date=$(date)
-export date
-user=$USER
-export user
-hostname=$(hostname)
-export hostname
-script=$0
-export script
-directory=$(pwd)
-export directory
-
-#------------------------------------------------------------------------
-# My first awk program ;-}
-pattern='BEGIN { \
- # List of db features, split into an array \
- str = ENVIRON["db_features"]; \
- split(str, db_features); \
- str = ENVIRON["db_files"]; \
- split(str, db_files); \
- # Prefill entries based upon sendmail/debian defaults \
- str = "sendmail.mc m4 - /etc/mail/sendmail.mc -"; \
- split(str, entry); \
- dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
- str = "MAIL_SETTINGS_DIR /etc/mail/ - - -"; \
- split(str, entry); \
- db_loc=entry[2]; \
- dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
- str = "DATABASE_MAP_TYPE hash - - -"; \
- split(str, entry); \
- db_type=entry[2]; \
- dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
- str = "confUSERDB_SPEC btree -o /etc/mail/users -"; \
- split(str, entry); \
- dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
- str = "confCR_FILE - -o /etc/mail/relay-domains %[^\#]"; \
- split(str, entry); \
- dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
- str = "confCT_FILE - -o /etc/mail/trusted-users %[^\#]"; \
- split(str, entry); \
- dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
- str = "confCW_FILE - -o /etc/mail/local-host-names %[^\#]"; \
- split(str, entry); \
- dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
- str = "ALIAS_FILE newaliases - /etc/mail/aliases -"; \
- split(str, entry); \
- dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
- }; \
- # Look for default database location \
- # define(MAIL_SETTINGS_DIR, /etc/mail/)dnl # comment \
- /^[:space:]*define\([:space:]*`?MAIL_SETTINGS_DIR/ { \
- str = $0; \
- # Strip garbage from string \
- sub(/define\(/, "", str); \
- sub(/\)(dnl)?.*/, "", str); \
- sub(/\,/, "", str); \
- gsub(/`/, "", str); \
- gsub(/'"'"'/, "", str); \
- split(str, entry); \
- entry[5] = "-"; \
- entry[4] = "-"; \
- entry[3] = "-"; \
- db_loc=entry[2]; \
- # Save lastmost entry \
- dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
- } \
- # Look for default database type \
- # define(DATABASE_MAP_TYPE, hash)dnl # comment \
- /^[:space:]*define\([:space:]*`?DATABASE_MAP_TYPE/ { \
- str = $0; \
- # Strip garbage from string \
- sub(/define\(/, "", str); \
- sub(/\)(dnl)?.*/, "", str); \
- sub(/\,/, "", str); \
- gsub(/`/, "", str); \
- gsub(/'"'"'/, "", str); \
- split(str, entry); \
- entry[5] = "-"; \
- entry[4] = "-"; \
- entry[3] = "-"; \
- db_type=entry[2]; \
- # Save lastmost entry \
- dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
- } \
- # Look for userdb specification \
- # define(confUSERDB_SPEC, /etc/mail/users.db)dnl # comment \
- /^[:space:]*define\([:space:]*`?confUSERDB_SPEC/ { \
- str = $0; \
- # Strip garbage from string \
- sub(/define\(/, "", str); \
- sub(/\)(dnl)?.*/, "", str); \
- sub(/\,/, "", str); \
- gsub(/`/, "", str); \
- gsub(/'"'"'/, "", str); \
- split(str, entry); \
- entry[5] = "-"; \
- entry[4] = entry[2]; \
- entry[3] = "-o"; \
- entry[2] = "btree"; \
- # Save lastmost entry \
- sub(/\.db/, "", entry[4]); \
- dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
- } \
- # Look for all confC?_FILE specifications \
- # define(confCR_FILE, -o /etc/mail/relay-domains %[^\#])dnl \
- # define(confCT_FILE, -o /etc/mail/sendmail.ct %[^\#])dnl \
- # define(confCW_FILE, -o /etc/mail/sendmail.cw %[^\#])dnl \
- /^[:space:]*define\([:space:]*`?confC[RTW]_FILE/ { \
- str = $0; \
- # Strip garbage from string \
- sub(/define\(/, "", str); \
- sub(/\)(dnl)?.*/, "", str); \
- sub(/\,/, "", str); \
- gsub(/`/, "", str); \
- gsub(/'"'"'/, "", str); \
- split(str, entry); \
- # Default elided info - format: \
- # name [ [opts] file [opts] ] \
- if (entry[2] == "-o") { \
- entry[5] = entry[4]; \
- entry[4] = entry[3]; \
- entry[3] = entry[2]; \
- } \
- else { \
- entry[5] = entry[3]; \
- entry[4] = entry[2]; \
- entry[3] = "-"; \
- entry[2] = "-"; \
- } \
- # Save lastmost entry \
- dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
- } \
- # Look for all ALIAS_FILE specifications \
- #define(ALIAS_FILE, /etc/mail/aliases.private,/etc/mail/aliases)dnl \
- /^[:space:]*define\([:space:]*`?ALIAS_FILE/ { \
- str = $0; \
- # Strip garbage from string \
- sub(/define\(/, "", str); \
- sub(/\)(dnl)?.*/, "", str); \
- gsub(/ /, "", str); \
- sub(/\,/, " ", str); \
- gsub(/`/, "", str); \
- gsub(/'"'"'/, "", str); \
- split(str, entry); \
- entry[5] = "-"; \
- entry[4] = entry[2]; \
- entry[3] = "-"; \
- entry[2] = "newaliases"; \
- # Save lastmost entry \
- dbs[entry[1]] = entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
- } \
- # Locate all non-commented FEATURE macros \
- # FEATURE(name[, type [flags] file])dnl #comment \
- /^[:space:]*FEATURE\(.*\)/ { \
- str = $0; \
- # Strip garbage from string \
- sub(/FEATURE\(/, "", str); \
- sub(/\)(dnl)?.*/, "", str); \
- if (index(str, ",") != 0) { \
- sub(/\,/, "", str); \
- gsub(/`/, "", str); \
- gsub(/'"'"'/, "", str); \
- }; \
- split(str, entry); \
- # Ignore non-db features \
- for (x in db_features) { \
- if (entry[1] == db_features[x]) { \
- # Default elided info - format: \
- # name [type [opts] file] \
- if (entry[2] == "") { \
- entry[5] = "-"; \
- entry[4] = db_loc""entry[1]; \
- entry[3] = "-o"; \
- entry[2] = db_type; \
- if (entry[1] == "use_ct_file" || \
- entry[1] == "use_cw_file") { \
- if (entry[1] == "use_ct_file") \
- str = entry[1]":"dbs["confCT_FILE"]; \
- else \
- str = entry[1]":"dbs["confCW_FILE"]; \
- split(str, entry, ":"); \
- } \
- else if (entry[1] == "access_db") \
- entry[4] = db_loc"access"; \
- else if (entry[1] == "uucpdomain") \
- entry[4] = db_loc"uudomain"; \
- } \
- else if (entry[3] == "") { \
- entry[5] = "-"; \
- entry[4] = entry[2]; \
- entry[3] = "-"; \
- entry[2] = db_type; \
- } \
- else if (entry[4] == "") { \
- entry[5] = "-"; \
- entry[4] = entry[3]; \
- entry[3] = "-"; \
- }; \
- # Save lastmost entry \
- sub(/\.db/, "", entry[4]); \
- dbs[entry[1]]=entry[2]":"entry[3]":"entry[4]":"entry[5]":"; \
- }; \
- }; \
- }; \
- END { \
- # Print the found features \
- date = ENVIRON["date"]; \
- user = ENVIRON["user"]; \
- hostname = ENVIRON["hostname"]; \
- script = ENVIRON["script"]; \
- directory = ENVIRON["directory"]; \
- print "####################################################################"; \
- print "##### This file is automatically generated -- edit at your own risk"; \
- print "#####"; \
- print "##### file: /etc/mail/databases"; \
- print "##### generated via: "script; \
- print "##### by: "user"@"hostname; \
- print "##### on: "date; \
- print "##### in: "directory; \
- print "#####"; \
- print "##### The following databases are used by sendmail"; \
- print "#####"; \
- print "####################################################################"; \
- # delete unneeded elements \
- #delete dbs["MAIL_SETTINGS_DIR"]; \
- #delete dbs["DATABASE_MAP_TYPE"]; \
- #delete dbs["confCT_FILE"]; \
- #delete dbs["confCW_FILE"]; \
- for (x in dbs) \
- if (x != "ALIAS_FILE" && \
- x != "confUSERDB_SPEC") { \
- print x":"dbs[x]; \
- } \
- else { \
- split(x":"dbs[x], entry, ":"); \
- pfx = entry[1]":"entry[2]":"entry[3]; \
- str = entry[4]; \
- sfx = entry[5]":"; \
- sub(/\,/, " ", str); \
- split(str, entry); \
- for (y in entry) \
- print pfx":"entry[y]":"sfx; \
- } \
- }; \
- ';
-
-#------------------------------------------------------------------------
-# Make sure not using text mailertable (it doesn't work)
-if (grep -q "^[[:space:]]*FEATURE(mailertable, \`text /etc/mail/mailertable')dnl" /etc/mail/sendmail.mc); then
- sed "s?FEATURE(mailertable, \`text /etc/mail/mailertable')dnl?FEATURE(mailertable)dnl?g" \
- /etc/mail/sendmail.mc > /etc/mail/sendmail.mc.new
- chown root.mail /etc/mail/sendmail.mc.new
- chmod 0664 /etc/mail/sendmail.mc.new
- mv /etc/mail/sendmail.mc.new /etc/mail/sendmail.mc
- fi;
-
-#------------------------------------------------------------------------
-# parse /etc/mail/sendmail.mc
-echo "Scanning /etc/mail/sendmail.mc"
-awk -- "$pattern" /etc/mail/sendmail.mc > /etc/mail/databases; \
-chown root.mail /etc/mail/databases
-chmod 0664 /etc/mail/databases
-#cat /etc/mail/databases
-#exit 0
-
-#------------------------------------------------------------------------
-# check for extant, non automagically generated Makefile and abort if found
-CFGFILE="/etc/mail/Makefile"
-HEADER="##### This file is automatically generated -- edit at your own risk"
-if [ -s $CFGFILE ]; then
- if ! head -3 $CFGFILE | grep -q "^$HEADER" ; then
- echo "Error: the current $CFGFILE is not automatically generated."
- if [ "$1" != "force" ]; then
- echo "Use \"$0 force\" to force (re)generation."
- exit 1
- else
- echo "force specified, (re)generating file anyway."
- fi;
- fi;
-
- fi;
-
-#------------------------------------------------------------------------
-echo -n "Creating /etc/mail/Makefile"
-makefile="/etc/mail/Makefile.new "
-cat <<EOT > $makefile
-#!/usr/bin/make -f
-####################################################################
-##### This file is automatically generated -- edit at your own risk
-#####
-##### file: /etc/mail/Makefile
-##### generated via: $script
-##### by: $user@$hostname
-##### on: $date
-##### in: $directory
-#####
-##### Makefile for Sendmail databases
-#####
-####################################################################
-SHELL=/bin/sh
-
-# flag used to ensure only one newaliases command is run
-newaliases_run=0
-
-#
-# all, the default target will update everything
-#
-all: \\
-EOT
-echo -n "."
-#
-# create all target
-#
-cnt=0
-for file in $db_files; do
- line=$(egrep -e "^[[:space:]]*$file" /etc/mail/databases);
- while ([ "$line" != "" ]); do
- str=$(echo "$line" | cut -d "
-" -f 1)
- line=$(echo "$line" | cut -d "
-" -f 2)
- # Strip line back into four pieces: feature, type, opts, name
- dbfeat=$(echo "$str" | cut -d ":" -f 1)
- dbtype=$(echo "$str" | cut -d ":" -f 2)
- dbopts=$(echo "$str" | cut -d ":" -f 3)
- dbname=$(echo "$str" | cut -d ":" -f 4)
- dbregx=$(echo "$str" | cut -d ":" -f 5)
- if [ $(dirname "$dbname") = "/etc/mail" ]; then
- dbsname=$(basename "$dbname")
- else
- dbsname="$dbname"
- fi;
- if [ "$dbtype" != "-" ]; then
- cnt=`expr $cnt + 1`;
- if [ $cnt -ne 1 ]; then
- echo -e " \\" >> $makefile
- fi;
- if [ "$dbtype" = "m4" ]; then
- echo -ne "\tsendmail.cf" >> $makefile
- else
- echo -ne "\t$dbsname.db" >> $makefile
- fi;
- fi;
- done;
- done;
-
-#------------------------------------------------------------------------
-cat <<EOT >> $makefile
-
-#
-# clean target, remove sendmail.cf and databases
-#
-clean:
-EOT
-echo -n "."
-for file in $db_files; do
- line=$(egrep -e "^[[:space:]]*$file" /etc/mail/databases);
- while ([ "$line" != "" ]); do
- str=$(echo "$line" | cut -d "
-" -f 1)
- line=$(echo "$line" | cut -d "
-" -f 2)
-
- # Strip line back into four pieces: feature, type, opts, name
- dbfeat=$(echo "$str" | cut -d ":" -f 1)
- dbtype=$(echo "$str" | cut -d ":" -f 2)
- dbopts=$(echo "$str" | cut -d ":" -f 3)
- dbname=$(echo "$str" | cut -d ":" -f 4)
- dbregx=$(echo "$str" | cut -d ":" -f 5)
- if [ $(dirname "$dbname") = "/etc/mail" ]; then
- dbsname=$(basename "$dbname")
- else
- dbsname="$dbname"
- fi;
- if [ "$dbtype" != "-" ]; then
- if [ "$dbtype" = "m4" ]; then
- echo -e "\trm -f sendmail.cf" >> $makefile
- else
- echo -e "\trm -f $dbsname.db" >> $makefile
- fi;
- fi;
- done;
- done;
-
-#------------------------------------------------------------------------
-cat <<EOT >> $makefile
-
-#
-# Individual targets
-#
-EOT
-echo -n "."
-cnt=0
-for file in $db_files; do
- line=$(egrep -e "^[[:space:]]*$file" /etc/mail/databases);
- while ([ "$line" != "" ]); do
- str=$(echo "$line" | cut -d "
-" -f 1)
- line=$(echo "$line" | cut -d "
-" -f 2)
-
- # Strip line back into four pieces: feature, type, opts, name
- dbfeat=$(echo "$str" | cut -d ":" -f 1)
- dbtype=$(echo "$str" | cut -d ":" -f 2)
- dbopts=$(echo "$str" | cut -d ":" -f 3)
- dbname=$(echo "$str" | cut -d ":" -f 4)
- dbregx=$(echo "$str" | cut -d ":" -f 5)
- if [ $(dirname "$dbname") = "/etc/mail" ]; then
- dbsname=$(basename "$dbname")
- else
- dbsname="$dbname"
- fi;
- if [ "$dbtype" != "-" ]; then
- cnt=`expr $cnt + 1`;
- if [ $cnt -ne 1 ]; then
- echo -e " " >> $makefile
- fi;
- if [ "$dbtype" = "m4" ]; then
- echo -ne "sendmail.cf:\t$dbsname" >> $makefile
- echo -e " dialup.m4 provider.m4" >> $makefile
- else
- echo -e "$dbsname.db:\t$dbsname" >> $makefile
- fi;
- pad="\t"
- sfx=""
- if [ "$dbopts" = "-o" ]; then
- pad="\t\t"
- sfx="; \\"
- echo -e "\trm -f $dbname.db" >> $makefile
- echo -e "\tif [ -s $dbname ] && \\" >> $makefile
- echo -e "\t " \
- "egrep -qe \"^[[:space:]]*[^\$$\#]\"" \
- "$dbname; then \\" \
- >> $makefile
- fi;
- case "$dbtype" in
- btree)
- echo -e $pad"makemap -d $dbtype" \
- "$dbname.db < $dbname"$sfx >> $makefile
- echo -e $pad"chown root.mail $dbname.db"$sfx \
- >> $makefile
- echo -e $pad"chmod 0664 $dbname.db"$sfx \
- >> $makefile
- ;;
- dbm | btree | hash)
- echo -e $pad"makemap $dbtype" \
- "$dbname.db < $dbname"$sfx >> $makefile
- echo -e $pad"chown root.mail $dbname.db"$sfx \
- >> $makefile
- echo -e $pad"chmod 0664 $dbname.db"$sfx \
- >> $makefile
- ;;
- text)
- true;
- ;;
- newaliases)
- echo -ne $pad"if [ \$(newaliases_run)" \
- >> $makefile
- echo -e " -eq 0 ]; then \\" \
- >> $makefile
- echo -e $pad"\tnewaliases_run=1; \\" \
- >> $makefile
- echo -e $pad"\tnewaliases; \\" >> $makefile
- echo -e $pad"\tfi" >> $makefile
- echo -e $pad"chown root.mail $dbname.db" \
- >> $makefile
- echo -e $pad"chmod 0664 $dbname.db" \
- >> $makefile
- ;;
- m4)
- cat <<EOT >> $makefile
- echo "Generating /etc/mail/sendmail.cf ..."
- m4 \\
- /usr/share/sendmail/sendmail.cf/m4/cf.m4 \\
- /etc/mail/sendmail.mc \\
- > /etc/mail/sendmail.cf.new \\
- 2> /etc/mail/sendmail.cf.errors
- chown root.mail /etc/mail/sendmail.cf.new
- chmod 0644 /etc/mail/sendmail.cf.new
- if [ ! -s /etc/mail/sendmail.cf.errors ]; then \\
- rm /etc/mail/sendmail.cf.errors; \\
- else \\
- cat /etc/mail/sendmail.cf.errors; \\
- echo ""; \\
- fi;
- # Can't tell if the errors are fatal or not ;-{
- mv -f /etc/mail/sendmail.cf.new /etc/mail/sendmail.cf;
-EOT
- ;;
- *)
- echo -e $pad"# $dbtype map not done herein" \
- >> $makefile
- ;;
- esac
- if [ "$dbopts" = "-o" ]; then
- echo -e "\t\tfi;" >> $makefile
- fi;
- fi;
- done;
- done;
-
-cat <<EOT >> $makefile
-#
-# Optional targets... Will be touched if they don't exist.
-#
-EOT
-echo -n "."
-cnt=0
-for file in $db_files; do
- line=$(egrep -e "^[[:space:]]*$file" /etc/mail/databases);
- while ([ "$line" != "" ]); do
- str=$(echo "$line" | cut -d "
-" -f 1)
- line=$(echo "$line" | cut -d "
-" -f 2)
-
- # Strip line back into four pieces: feature, type, opts, name
- dbfeat=$(echo "$str" | cut -d ":" -f 1)
- dbtype=$(echo "$str" | cut -d ":" -f 2)
- dbopts=$(echo "$str" | cut -d ":" -f 3)
- dbname=$(echo "$str" | cut -d ":" -f 4)
- dbregx=$(echo "$str" | cut -d ":" -f 5)
- if [ $(dirname "$dbname") = "/etc/mail" ]; then
- dbsname=$(basename "$dbname")
- else
- dbsname="$dbname"
- fi;
-
- if [ "$dbopts" = "-o" ]; then
- cnt=`expr $cnt + 1`;
- if [ $cnt -ne 1 ]; then
- echo -e " " >> $makefile
- fi;
- echo -e "$dbsname:" >>$makefile
- echo -e "\ttouch $dbname" >>$makefile
- echo -e "\tchmod 0664 $dbname" >>$makefile
- echo -e "\tchown root.mail $dbname" >>$makefile
- fi;
-
- done;
- done;
-
-cat <<EOT >> $makefile
-
-#
-# A few special targets that may not exists...
-#
-
-# dialup.m4 - created/updated by /etc/ppp/ip-up.d/sendmail
-# used to provide the true, hopefully resolvable
-# hostname (from the ISP nameservers)
-#
-# To activate, put this in /etc/mail/sendmail.mc:
-# include(\`/etc/mail/dialup.m4')dnl
-dialup.m4:
- touch /etc/mail/dialup.m4
- chmod 0664 /etc/mail/dialup.m4
- chown root.mail /etc/mail/dialup.m4
-
-# provider.m4 - created by the user, or /etc/ppp/ip-up.d/sendmail
-# used to provide ISP information (masquerade_as, etc.)
-# If its a link, it will *not* be overwritten
-#
-# To activate, put this in /etc/mail/sendmail.mc:
-# include(\`/etc/mail/provider.m4')dnl
-provider.m4:
- touch /etc/mail/provider.m4
- chmod 0664 /etc/mail/provider.m4
- chown root.mail /etc/mail/provider.m4
-
-EOT
-echo -n "."
-
-echo " done."
-
-#------------------------------------------------------------------------
-chown root.mail $makefile
-chmod 0770 $makefile
-mv $makefile /etc/mail/Makefile
-exit 0
diff --git a/debian/local/provider b/debian/local/provider
index 2a5bfa4..b9bc496 100644
--- a/debian/local/provider
+++ b/debian/local/provider
@@ -6,5 +6,5 @@
# This is what I use when connecting to mindspring.com:
# remove the leading dnl to activate
LOCAL_CONFIG
-dnldefine(`SMART_HOST', `mail.mindspring.com.')dnl
-dnlMASQUERADE_AS(mindspring.com)dnl
+dnl define(`SMART_HOST', `mail.mindspring.com.')dnl
+dnl MASQUERADE_AS(mindspring.com)dnl
diff --git a/debian/local/qtool.8 b/debian/local/qtool.8
new file mode 100644
index 0000000..e40644d
--- /dev/null
+++ b/debian/local/qtool.8
@@ -0,0 +1,213 @@
+.\" Copyright (c) 1999 Sendmail, Inc. and its suppliers.
+.\" 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.
+.\"
+.\"
+.\" $Id: qtool.8,v 8.12 2000/12/15 19:53:35 gshapiro Exp $
+.\"
+.TH QTOOL 8 "$Date: 2000/12/15 19:53:35 $"
+.SH NAME
+qtool
+\- manipulate sendmail queues
+.SH SYNOPSIS
+.B qtool.pl
+.RB [options]
+target_directory source [source ...]
+.PP
+.B qtool.pl [-d|-b]
+.RB [options]
+source [source ...]
+.SH DESCRIPTION
+.B Qtool
+moves the queue files used by sendmail between queues. It uses the same
+locking mechanism as sendmail so can be safely used while sendmail is
+running.
+.PP
+With no options,
+.B qtool
+will move any queue files as specified by \fIsource\fP into
+\fItarget_directory\fP. \fISource\fP can be either an individual
+queue control file, a queue file id, or a queue directory.
+.PP
+If the -d option is specified, qtool will delete the messages specified by
+source instead of moving them.
+.PP
+If the -b option is specified, the selected messages will be bounced by
+running sendmail with the -OTimeout.queuereturn=now option.
+.SS Options
+.TP
+\fB\-b\fP
+Bounce all of the messages specified by source. The messages will be bounced
+immediately. No attempt will be made to deliver the messages.
+.TP
+\fB\-C\fP configfile
+Specify the sendmail config file.
+Defaults to /etc/mail/sendmail.cf.
+.TP
+\fB\-d\fP
+Delete all of the messages specified by source.
+.TP
+\fB\-e\fP \fIperl_expression\fP
+Evalute \fIperl_expression\fP for each queue file as specified
+by \fIsource\fP. If \fIperl_expression\fP evaluates to true, then that
+queue file is moved. See below for more detail on \fIperl_expression\fP.
+.TP
+\fB\-s\fP \fIseconds\fP
+Move only the queue files specified by \fIsource\fP that have a
+modification time older than \fIseconds\fP.
+.SS Perl Expressions
+You can use any valid perl expression. Inside the expression you have
+access to a hash that contains many of the fields in the control file as
+well as some other data about that queued message. The hash is called
+\fI%msg\fP. If a field has multiple values (e.g. 'Recipient'), it will be
+returned as an array, otherwise it will be returned as a scalar. Through
+\fI%msg\fP, you can access the following variables:
+.TP
+\fBauth\fP
+AUTH= parameter.
+.TP
+\fBbody_type\fP
+Body type (\fB8BITMIME\fP, \fB7BIT\fP, or undefined).
+.TP
+\fBbody_last_mod_time\fP
+The last time the body was modified since the epoch in seconds.
+.TP
+\fBbody_size\fP
+The size of the body file in bytes.
+.TP
+\fBcharset\fP
+Character set (for future use).
+.TP
+\fBcontent-length\fP
+Content-Length: header value (Solaris sendmail only).
+.TP
+\fBcontrolling_user\fP
+The controlling user.
+.TP
+\fBcontrol_last_mod_time\fP
+The last time the body was modified since the epoch in seconds.
+.TP
+\fBcontrol_size\fP
+The size of the control file in bytes.
+.TP
+\fBcreation_time\fP
+The time when the control file was created.
+.TP
+\fBdata_file_name\fP
+The data file name (deprecated).
+.TP
+\fBenvid\fP
+Original envelope id form ESMTP.
+.TP
+\fBerror_recipient\fP
+The error recipient (deprecated).
+.TP
+\fBflags\fP
+Array of characters that can be the following values:
+.PD 0
+.RS +8
+.TP 8
+w
+warning message has been sent
+.TP 8
+r
+This is an error respone or DSN
+.TP 8
+8
+has 8 bit data in body
+.TP 8
+b
+delete Bcc: headers
+.TP 8
+d
+envelope has DSN RET= parameter
+.TP 8
+n
+don't return body
+.PD
+.RE
+.TP
+\fBheaders\fP
+This is a Perl hash where the keys are rfc822 field names and the values
+are rfc822 field values. If a field has only one value it will be returned
+as a string. If a field has more than one value (e.g. 'Received') it will
+be returned as a list of strings.
+.TP
+\fBinode_number\fP
+The inode number for the data (body) file.
+.TP
+\fBnext_delivery_time\fP
+Earliest time of next delivery attempt.
+.TP
+\fBnum_delivery_attempts\fP
+Number of delivery attempts that have been made.
+.TP
+\fBmacro\fP
+Defined macro.
+.TP
+\fBmessage\fP
+Envelope status message.
+.TP
+\fBoriginal_recipient\fP
+Original recipient (ORCPT= parameter).
+.TP
+\fBpriority\fP
+Adjusted priority of message.
+.TP
+\fBrecipient\fP
+Array of character flags followed by colon and recipient name. Flags:
+.PD 0
+.RS +8
+.TP 8
+N
+Has NOTIFY= parameter.
+.TP 8
+S
+Success DSN requested.
+.TP 8
+F
+Failure DSN requested.
+.TP 8
+D
+Delay DSN requested.
+.TP 8
+P
+Primary address (not the result of alias/forward expansion).
+.PD
+.RE
+.TP
+\fBsender\fP
+Sender
+.TP
+\fBversion\fP
+Version of control file.
+.SH EXAMPLES
+.TP
+\fBqtool.pl q2 q1\fP
+Moves all of the queue files in queue q1 to queue q2.
+.TP
+\fBqtool.pl q2 q1/d6CLQh100847\fP
+Moves the message with id d6CLQh100847 in queue q1 to queue q2.
+.TP
+\fBqtool.pl q2 q1/qfd6CLQh100847\fP
+Moves the message with id d6CLQh100847 in queue q1 to queue q2.
+.TP
+\fBqtool.pl -e '$msg{num_delivery_attempts} == 3' /q2 /q1\fP
+Moves all of the queue files that have had three attempted deliveries from
+queue q1 to queue q2.
+.SH BUGS
+In sendmail 8.12, it is possible for a message's qf and df files
+to be stored in different queues.
+In this situation, you must give qtool the pathname of the qf file,
+not of the df file.
+To be safe, never feed qtool the pathname of a df file.
+.SH SEE ALSO
+sendmail(8)
+.SH HISTORY
+The
+.B qtool
+command appeared in
+sendmail 8.10.
diff --git a/debian/local/qtool.pl b/debian/local/qtool.pl
new file mode 100644
index 0000000..aa25fb2
--- /dev/null
+++ b/debian/local/qtool.pl
@@ -0,0 +1,1234 @@
+#!/usr/bin/env perl
+##
+## Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+## All rights reserved.
+##
+## $Id: qtool.pl,v 8.20 2000/12/05 16:10:07 dmoen Exp $
+##
+use strict;
+use File::Basename;
+use File::Copy;
+use File::Spec;
+use Fcntl qw(:flock :DEFAULT);
+use Getopt::Std;
+
+##
+## QTOOL
+## This program is for moving files between sendmail queues. It is
+## pretty similar to just moving the files manually, but it locks the files
+## the same way sendmail does to prevent problems.
+##
+## The syntax is the reverse of mv (ie. the target argument comes
+## first). This lets you pick the files you want to move using find and
+## xargs.
+##
+## Since you cannot delete queues while sendmail is running, QTOOL
+## assumes that when you specify a directory as a source, you mean that you
+## want all of the queue files within that directory moved, not the
+## directory itself.
+##
+## There is a mechanism for adding conditionals for moving the files.
+## Just create an Object with a check_move(source, dest) method and add it
+## to the $conditions object. See the handling of the '-s' option for an
+## example.
+##
+
+##
+## OPTION NOTES
+##
+## The -e option:
+## The -e option takes any valid perl expression and evaluates it
+## using the eval() function. Inside the expression the variable
+## '$msg' is bound to the ControlFile object for the current source
+## queue message. This lets you check for any value in the message
+## headers or the control file. Here's an example:
+##
+## ./qtool.pl -e '$msg->{num_delivery_attempts} >= 2' /q1 /q2
+##
+## This would move any queue files whose number of delivery attempts
+## is greater than or equal to 2 from the queue 'q2' to the queue 'q1'.
+##
+## See the function ControlFile::parse for a list of available
+## variables.
+##
+
+my %opts;
+my %sources;
+my $dst_name;
+my $destination;
+my $source_name;
+my $source;
+my $result;
+my $action;
+my $new_condition;
+my $conditions = new Compound();
+
+Getopt::Std::getopts('bC:de:s:', \%opts);
+
+sub move_action
+{
+ my $source = shift;
+ my $destination = shift;
+
+ $result = $destination->add($source);
+ if ($result)
+ {
+ print("$result.\n");
+ }
+}
+
+sub delete_action
+{
+ my $source = shift;
+
+ return $source->delete();
+}
+
+sub bounce_action
+{
+ my $source = shift;
+
+ return $source->bounce();
+}
+
+$action = \&move_action;
+if (defined $opts{d})
+{
+ $action = \&delete_action;
+}
+elsif (defined $opts{b})
+{
+ $action = \&bounce_action;
+}
+
+if (defined $opts{s})
+{
+ $new_condition = new OlderThan($opts{s});
+ $conditions->add($new_condition);
+}
+
+if (defined $opts{e})
+{
+ $new_condition = new Eval($opts{e});
+ $conditions->add($new_condition);
+}
+
+if ($action == \&move_action)
+{
+ $dst_name = shift(@ARGV);
+ if (!-d $dst_name)
+ {
+ print("The destination '$dst_name' must be an existing " .
+ "directory.\n");
+ usage();
+ exit;
+ }
+ $destination = new Queue($dst_name);
+}
+
+# determine queue_root by reading config file
+my $queue_root;
+{
+ my $config_file = "/etc/mail/sendmail.cf";
+ if (defined $opts{C})
+ {
+ $config_file = $opts{C};
+ }
+
+ my $line;
+ open(CONFIG_FILE, $config_file) or die "$config_file: $!";
+ while ($line = <CONFIG_FILE>)
+ {
+ chomp $line;
+ if ($line =~ m/^O QueueDirectory=(.*)/)
+ {
+ $queue_root = $1;
+ if ($queue_root =~ m/(.*)\/[^\/]+\*$/)
+ {
+ $queue_root = $1;
+ }
+ last;
+ }
+ }
+ close(CONFIG_FILE);
+ if (!defined $queue_root)
+ {
+ die "QueueDirectory option not defined in $config_file";
+ }
+}
+
+while (@ARGV)
+{
+ $source_name = shift(@ARGV);
+ $result = add_source(\%sources, $source_name);
+ if ($result)
+ {
+ print("$result.\n");
+ exit;
+ }
+}
+
+if (keys(%sources) == 0)
+{
+ exit;
+}
+
+while (($source_name, $source) = each(%sources))
+{
+ $result = $conditions->check_move($source, $destination);
+ if ($result)
+ {
+ $result = &{$action}($source, $destination);
+ if ($result)
+ {
+ print("$result\n");
+ }
+ }
+}
+
+sub usage
+{
+ print("Usage: $0 [options] directory source ...\n");
+ print(" $0 [-d|-b] source ...\n");
+ print("options:\n");
+ print(" -b Bounce the messages specified by source.\n");
+ print(" -C configfile Specify sendmail config file.\n");
+ print(" -d Delete the messages specified by source.\n");
+ print(" -e [perl expression] Move only messages for which perl expression returns true.\n");
+ print(" -s [seconds] Move only messages whose qf file is older than seconds.\n");
+}
+
+##
+## ADD_SOURCE -- Adds a source to the source hash.
+##
+## Determines whether source is a file, directory, or id. Then it
+## creates a QueuedMessage or Queue for that source and adds it to the
+## list.
+##
+## Parameters:
+## sources -- A hash that contains all of the sources.
+## source_name -- The name of the source to add
+##
+## Returns:
+## error_string -- Undef if ok. Error string otherwise.
+##
+## Notes:
+## If a new source comes in with the same ID as a previous
+## source, the previous source gets overwritten in the sources
+## hash. This lets the user specify things like * and it still
+## works nicely.
+##
+
+sub add_source
+{
+ my $sources = shift;
+ my $source_name = shift;
+ my $source_base_name;
+ my $source_dir_name;
+ my $data_dir_name;
+ my $source_id;
+ my $source_prefix;
+ my $queued_message;
+ my $queue;
+ my $result;
+
+ ($source_base_name, $source_dir_name) = File::Basename::fileparse($source_name);
+ $data_dir_name = $source_dir_name;
+
+ $source_prefix = substr($source_base_name, 0, 2);
+ if (!-d $source_name && $source_prefix ne 'qf' &&
+ $source_prefix ne 'df')
+ {
+ $source_base_name = "qf$source_base_name";
+ $source_name = File::Spec->catfile("$source_dir_name",
+ "$source_base_name");
+ }
+ $source_id = substr($source_base_name, 2);
+
+ if (!-e $source_name)
+ {
+ $source_name = File::Spec->catfile("$source_dir_name", "qf",
+ "qf$source_id");
+ if (!-e $source_name)
+ {
+ return "'$source_name' does not exist";
+ }
+ $data_dir_name = File::Spec->catfile("$source_dir_name", "df");
+ if (!-d $data_dir_name)
+ {
+ $data_dir_name = $source_dir_name;
+ }
+ $source_dir_name = File::Spec->catfile("$source_dir_name",
+ "qf");
+ }
+
+ if (-f $source_name)
+ {
+ $queued_message = new QueuedMessage($source_dir_name,
+ $source_id,
+ $data_dir_name);
+ $sources->{$source_id} = $queued_message;
+ return undef;
+ }
+
+ if (!-d $source_name)
+ {
+ return "'$source_name' is not a plain file or a directory";
+ }
+
+ $queue = new Queue($source_name);
+ $result = $queue->read();
+ if ($result)
+ {
+ return $result;
+ }
+
+ while (($source_id, $queued_message) = each(%{$queue->{files}}))
+ {
+ $sources->{$source_id} = $queued_message;
+ }
+
+ return undef;
+}
+
+##
+## LOCK_FILE -- Opens and then locks a file.
+##
+## Opens a file for read/write and uses flock to obtain a lock on the
+## file. The flock is Perl's flock which defaults to flock on systems
+## that support it. On systems without flock it falls back to fcntl
+## locking.
+##
+## Parameters:
+## file_name -- The name of the file to open and lock.
+##
+## Returns:
+## (file_handle, error_string) -- If everything works then
+## file_handle is a reference to a file handle and
+## error_string is undef. If there is a problem then
+## file_handle is undef and error_string is a string
+## explaining the problem.
+##
+
+sub lock_file
+{
+ my $file_name = shift;
+ my $result;
+
+ $result = sysopen(FILE_TO_LOCK, $file_name, Fcntl::O_RDWR);
+ if (!$result)
+ {
+ return (undef, "Unable to open '$file_name': $!");
+ }
+
+ $result = flock(FILE_TO_LOCK, Fcntl::LOCK_EX | Fcntl::LOCK_NB);
+ if (!$result)
+ {
+ return (undef, "Could not obtain lock on '$file_name': $!");
+ }
+
+ return (\*FILE_TO_LOCK, undef);
+}
+
+##
+## UNLOCK_FILE -- Unlocks a file.
+##
+## Unlocks a file using Perl's flock.
+##
+## Parameters:
+## file -- A file handle.
+##
+## Returns:
+## error_string -- If undef then no problem. Otherwise it is a
+## string that explains problem.
+##
+
+sub unlock_file
+{
+ my $file = shift;
+ my $result;
+
+ $result = flock($file, Fcntl::LOCK_UN);
+ if (!$result)
+ {
+ return "Unlock failed on '$result': $!";
+ }
+
+ return undef;
+}
+
+##
+## MOVE_FILE -- Moves a file.
+##
+## Moves a file.
+##
+## Parameters:
+## src_name -- The name of the file to be move.
+## dst_nome -- The name of the place to move it to.
+##
+## Returns:
+## error_string -- If undef then no problem. Otherwise it is a
+## string that explains problem.
+##
+
+sub move_file
+{
+ my $src_name = shift;
+ my $dst_name = shift;
+ my $result;
+
+ $result = File::Copy::move($src_name, $dst_name);
+ if (!$result)
+ {
+ return "File move from '$src_name' to '$dst_name' failed: $!";
+ }
+
+ return undef;
+}
+
+
+##
+## CONTROL_FILE - Represents a sendmail queue control file.
+##
+## This object represents represents a sendmail queue control file.
+## It can parse and lock its file.
+##
+
+
+package ControlFile;
+
+sub new
+{
+ my $this = shift;
+ my $class = ref($this) || $this;
+ my $self = {};
+ bless $self, $class;
+ $self->initialize(@_);
+ return $self;
+}
+
+sub initialize
+{
+ my $self = shift;
+ my $queue_dir = shift;
+ $self->{id} = shift;
+
+ $self->{file_name} = $queue_dir . '/qf' . $self->{id};
+ $self->{headers} = {};
+}
+
+##
+## PARSE - Parses the control file.
+##
+## Parses the control file. It just sticks each entry into a hash.
+## If a key has more than one entry, then it points to a list of
+## entries.
+##
+
+sub parse
+{
+ my $self = shift;
+ if ($self->{parsed})
+ {
+ return;
+ }
+ my %parse_table =
+ (
+ 'A' => 'auth',
+ 'B' => 'body_type',
+ 'C' => 'controlling_user',
+ 'D' => 'data_file_name',
+ 'd' => 'data_file_directory',
+ 'E' => 'error_recipient',
+ 'F' => 'flags',
+ 'H' => 'parse_header',
+ 'I' => 'inode_number',
+ 'K' => 'next_delivery_time',
+ 'L' => 'content-length',
+ 'M' => 'message',
+ 'N' => 'num_delivery_attempts',
+ 'P' => 'priority',
+ 'Q' => 'original_recipient',
+ 'R' => 'recipient',
+ 'S' => 'sender',
+ 'T' => 'creation_time',
+ 'V' => 'version',
+ 'X' => 'charset',
+ 'Z' => 'envid',
+ '$' => 'macro'
+ );
+ my $line;
+ my $line_type;
+ my $line_value;
+ my $member_name;
+ my $member;
+ my $last_type;
+
+ open(CONTROL_FILE, "$self->{file_name}");
+ while ($line = <CONTROL_FILE>)
+ {
+ $line_type = substr($line, 0, 1);
+ if ($line_type eq "\t" && $last_type eq 'H')
+ {
+ $line_type = 'H';
+ $line_value = $line;
+ }
+ else
+ {
+ $line_value = substr($line, 1);
+ }
+ $member_name = $parse_table{$line_type};
+ $last_type = $line_type;
+ if (!$member_name)
+ {
+ $member_name = 'unknown';
+ }
+ if ($self->can($member_name))
+ {
+ $self->$member_name($line_value);
+ }
+ $member = $self->{$member_name};
+ if (!$member)
+ {
+ $self->{$member_name} = $line_value;
+ next;
+ }
+ if (ref($member) eq 'ARRAY')
+ {
+ push(@{$member}, $line_value);
+ next;
+ }
+ $self->{$member_name} = [$member, $line_value];
+ }
+ close(CONTROL_FILE);
+
+ $self->{parsed} = 1;
+}
+
+sub parse_header
+{
+ my $self = shift;
+ my $line = shift;
+ my $headers = $self->{headers};
+ my $last_header = $self->{last_header};
+ my $header_name;
+ my $header_value;
+ my $first_char;
+
+ $first_char = substr($line, 0, 1);
+ if ($first_char eq "?")
+ {
+ $line = substr($line, 3);
+ }
+ elsif ($first_char eq "\t")
+ {
+ if (ref($headers->{$last_header}) eq 'ARRAY')
+ {
+ $headers->{$last_header}[-1] =
+ $headers->{$last_header}[-1] . $line;
+ }
+ else
+ {
+ $headers->{$last_header} = $headers->{$last_header} .
+ $line;
+ }
+ return;
+ }
+ ($header_name, $header_value) = split(/:/, $line, 2);
+ $self->{last_header} = $header_name;
+ if (exists $headers->{$header_name})
+ {
+ $headers->{$header_name} = [$headers->{$header_name},
+ $header_value];
+ }
+ else
+ {
+ $headers->{$header_name} = $header_value;
+ }
+}
+
+sub is_locked
+{
+ my $self = shift;
+
+ return (defined $self->{lock_handle});
+}
+
+sub lock
+{
+ my $self = shift;
+ my $lock_handle;
+ my $result;
+
+ if ($self->is_locked())
+ {
+ # Already locked
+ return undef;
+ }
+
+ ($lock_handle, $result) = ::lock_file($self->{file_name});
+ if (!$lock_handle)
+ {
+ return $result;
+ }
+
+ $self->{lock_handle} = $lock_handle;
+
+ return undef;
+}
+
+sub unlock
+{
+ my $self = shift;
+ my $result;
+
+ if (!$self->is_locked())
+ {
+ # Not locked
+ return undef;
+ }
+
+ $result = ::unlock_file($self->{lock_handle});
+
+ $self->{lock_handle} = undef;
+
+ return $result;
+}
+
+sub do_stat
+{
+ my $self = shift;
+ my $result;
+ my @result;
+
+ $result = open(QUEUE_FILE, $self->{file_name});
+ if (!$result)
+ {
+ return "Unable to open '$self->{file_name}': $!";
+ }
+ @result = stat(QUEUE_FILE);
+ if (!@result)
+ {
+ return "Unable to stat '$self->{file_name}': $!";
+ }
+ $self->{control_size} = $result[7];
+ $self->{control_last_mod_time} = $result[9];
+}
+
+sub DESTROY
+{
+ my $self = shift;
+
+ $self->unlock();
+}
+
+sub delete
+{
+ my $self = shift;
+ my $result;
+
+ $result = unlink($self->{file_name});
+ if (!$result)
+ {
+ return "Unable to delete $self->{file_name}: $!";
+ }
+ return undef;
+}
+
+
+##
+## DATA_FILE - Represents a sendmail queue data file.
+##
+## This object represents represents a sendmail queue data file.
+## It is really just a place-holder.
+##
+
+package DataFile;
+
+sub new
+{
+ my $this = shift;
+ my $class = ref($this) || $this;
+ my $self = {};
+ bless $self, $class;
+ $self->initialize(@_);
+ return $self;
+}
+
+sub initialize
+{
+ my $self = shift;
+ my $data_dir = shift;
+ $self->{id} = shift;
+ my $control_file = shift;
+
+ $self->{file_name} = $data_dir . '/df' . $self->{id};
+ return if -e $self->{file_name};
+ $control_file->parse();
+ return if !defined $control_file->{data_file_directory};
+ $data_dir = $queue_root . '/' . $control_file->{data_file_directory};
+ chomp $data_dir;
+ if (-d ($data_dir . '/df'))
+ {
+ $data_dir .= '/df';
+ }
+ $self->{file_name} = $data_dir . '/df' . $self->{id};
+}
+
+sub do_stat
+{
+ my $self = shift;
+ my $result;
+ my @result;
+
+ $result = open(QUEUE_FILE, $self->{file_name});
+ if (!$result)
+ {
+ return "Unable to open '$self->{file_name}': $!";
+ }
+ @result = stat(QUEUE_FILE);
+ if (!@result)
+ {
+ return "Unable to stat '$self->{file_name}': $!";
+ }
+ $self->{body_size} = $result[7];
+ $self->{body_last_mod_time} = $result[9];
+}
+
+sub delete
+{
+ my $self = shift;
+ my $result;
+
+ $result = unlink($self->{file_name});
+ if (!$result)
+ {
+ return "Unable to delete $self->{file_name}: $!";
+ }
+ return undef;
+}
+
+
+##
+## QUEUED_MESSAGE - Represents a queued sendmail message.
+##
+## This keeps track of the files that make up a queued sendmail
+## message.
+## Currently it has 'control_file' and 'data_file' as members.
+##
+## You can tie it to a fetch only hash using tie. You need to
+## pass a reference to a QueuedMessage as the third argument
+## to tie.
+##
+
+package QueuedMessage;
+
+sub new
+{
+ my $this = shift;
+ my $class = ref($this) || $this;
+ my $self = {};
+ bless $self, $class;
+ $self->initialize(@_);
+ return $self;
+}
+
+sub initialize
+{
+ my $self = shift;
+ my $queue_dir = shift;
+ my $id = shift;
+ my $data_dir = shift;
+
+ $self->{id} = $id;
+ $self->{control_file} = new ControlFile($queue_dir, $id);
+ if (!$data_dir)
+ {
+ $data_dir = $queue_dir;
+ }
+ $self->{data_file} = new DataFile($data_dir, $id, $self->{control_file});
+}
+
+sub last_modified_time
+{
+ my $self = shift;
+ my @result;
+ @result = stat($self->{data_file}->{file_name});
+ return $result[9];
+}
+
+sub TIEHASH
+{
+ my $this = shift;
+ my $class = ref($this) || $this;
+ my $self = shift;
+ return $self;
+}
+
+sub FETCH
+{
+ my $self = shift;
+ my $key = shift;
+
+ if (exists $self->{control_file}->{$key})
+ {
+ return $self->{control_file}->{$key};
+ }
+ if (exists $self->{data_file}->{$key})
+ {
+ return $self->{data_file}->{$key};
+ }
+
+ return undef;
+}
+
+sub lock
+{
+ my $self = shift;
+
+ return $self->{control_file}->lock();
+}
+
+sub unlock
+{
+ my $self = shift;
+
+ return $self->{control_file}->unlock();
+}
+
+sub move
+{
+ my $self = shift;
+ my $destination = shift;
+ my $df_dest;
+ my $qf_dest;
+ my $result;
+
+ $result = $self->lock();
+ if ($result)
+ {
+ return $result;
+ }
+
+ $qf_dest = File::Spec->catfile($destination, "qf");
+ if (-d $qf_dest)
+ {
+ $df_dest = File::Spec->catfile($destination, "df");
+ if (!-d $df_dest)
+ {
+ $df_dest = $destination;
+ }
+ }
+ else
+ {
+ $qf_dest = $destination;
+ $df_dest = $destination;
+ }
+
+ if (-e File::Spec->catfile($qf_dest, "qf$self->{id}"))
+ {
+ $result = "There is already a queued message with id '$self->{id}' in '$destination'";
+ }
+
+ if (!$result)
+ {
+ $result = ::move_file($self->{data_file}->{file_name},
+ $df_dest);
+ }
+
+ if (!$result)
+ {
+ $result = ::move_file($self->{control_file}->{file_name},
+ $qf_dest);
+ }
+
+ $self->unlock();
+
+ return $result;
+}
+
+sub parse
+{
+ my $self = shift;
+
+ return $self->{control_file}->parse();
+}
+
+sub do_stat
+{
+ my $self = shift;
+
+ $self->{control_file}->do_stat();
+ $self->{data_file}->do_stat();
+}
+
+sub setup_vars
+{
+ my $self = shift;
+
+ $self->parse();
+ $self->do_stat();
+}
+
+sub delete
+{
+ my $self = shift;
+ my $result;
+
+ $result = $self->{control_file}->delete();
+ if ($result)
+ {
+ return $result;
+ }
+ $result = $self->{data_file}->delete();
+ if ($result)
+ {
+ return $result;
+ }
+
+ return undef;
+}
+
+sub bounce
+{
+ my $self = shift;
+ my $command;
+
+ $command = "sendmail -qI$self->{id} -O Timeout.queuereturn=now";
+# print("$command\n");
+ system($command);
+}
+
+##
+## QUEUE - Represents a queued sendmail queue.
+##
+## This manages all of the messages in a queue.
+##
+
+package Queue;
+
+sub new
+{
+ my $this = shift;
+ my $class = ref($this) || $this;
+ my $self = {};
+ bless $self, $class;
+ $self->initialize(@_);
+ return $self;
+}
+
+sub initialize
+{
+ my $self = shift;
+
+ $self->{queue_dir} = shift;
+ $self->{files} = {};
+}
+
+##
+## READ - Loads the queue with all of the objects that reside in it.
+##
+## This reads the queue's directory and creates QueuedMessage objects
+## for every file in the queue that starts with 'qf'.
+##
+
+sub read
+{
+ my $self = shift;
+ my @control_files;
+ my $queued_message;
+ my $file_name;
+ my $id;
+ my $result;
+ my $control_dir;
+ my $data_dir;
+
+ $control_dir = File::Spec->catfile($self->{queue_dir}, 'qf');
+
+ if (-e $control_dir)
+ {
+ $data_dir = File::Spec->catfile($self->{queue_dir}, 'df');
+ if (!-e $data_dir)
+ {
+ $data_dir = $self->{queue_dir};
+ }
+ }
+ else
+ {
+ $data_dir = $self->{queue_dir};
+ $control_dir = $self->{queue_dir};
+ }
+
+ $result = opendir(QUEUE_DIR, $control_dir);
+ if (!$result)
+ {
+ return "Unable to open directory '$control_dir'";
+ }
+
+ @control_files = grep { /^qf.*/ && -f "$control_dir/$_" } readdir(QUEUE_DIR);
+ closedir(QUEUE_DIR);
+ foreach $file_name (@control_files)
+ {
+ $id = substr($file_name, 2);
+ $queued_message = new QueuedMessage($control_dir, $id,
+ $data_dir);
+ $self->{files}->{$id} = $queued_message;
+ }
+
+ return undef;
+}
+
+
+##
+## ADD_QUEUED_MESSAGE - Adds a QueuedMessage to this Queue.
+##
+## Adds the QueuedMessage object to the hash and moves the files
+## associated with the QueuedMessage to this Queue's directory.
+##
+
+sub add_queued_message
+{
+ my $self = shift;
+ my $queued_message = shift;
+ my $result;
+
+ $result = $queued_message->move($self->{queue_dir});
+ if ($result)
+ {
+ return $result;
+ }
+
+ $self->{files}->{$queued_message->{id}} = $queued_message;
+
+ return $result;
+}
+
+##
+## ADD_QUEUE - Adds another Queue's QueuedMessages to this Queue.
+##
+## Adds all of the QueuedMessage objects in the passed in queue
+## to this queue.
+##
+
+sub add_queue
+{
+ my $self = shift;
+ my $queue = shift;
+ my $id;
+ my $queued_message;
+ my $result;
+
+ while (($id, $queued_message) = each %{$queue->{files}})
+ {
+ $result = $self->add_queued_message($queued_message);
+ if ($result)
+ {
+ print("$result.\n");
+ }
+ }
+}
+
+##
+## ADD - Adds an item to this queue.
+##
+## Adds either a Queue or a QueuedMessage to this Queue.
+##
+
+sub add
+{
+ my $self = shift;
+ my $source = shift;
+ my $type_name;
+ my $result;
+
+ $type_name = ref($source);
+
+ if ($type_name eq "QueuedMessage")
+ {
+ return $self->add_queued_message($source);
+ }
+
+ if ($type_name eq "Queue")
+ {
+ return $self->add_queue($source);
+ }
+
+ return "Queue does not know how to add a '$type_name'"
+}
+
+sub delete
+{
+ my $self = shift;
+ my $id;
+ my $queued_message;
+
+ while (($id, $queued_message) = each %{$self->{files}})
+ {
+ $result = $queued_message->delete();
+ if ($result)
+ {
+ print("$result.\n");
+ }
+ }
+}
+
+sub bounce
+{
+ my $self = shift;
+ my $id;
+ my $queued_message;
+
+ while (($id, $queued_message) = each %{$self->{files}})
+ {
+ $result = $queued_message->bounce();
+ if ($result)
+ {
+ print("$result.\n");
+ }
+ }
+}
+
+##
+## Condition Class
+##
+## This next section is for any class that has an interface called
+## check_move(source, dest). Each class represents some condition to
+## check for to determine whether we should move the file from
+## source to dest.
+##
+
+
+##
+## OlderThan
+##
+## This Condition Class checks the modification time of the
+## source file and returns true if the file's modification time is
+## older than the number of seconds the class was initialzed with.
+##
+
+package OlderThan;
+
+sub new
+{
+ my $this = shift;
+ my $class = ref($this) || $this;
+ my $self = {};
+ bless $self, $class;
+ $self->initialize(@_);
+ return $self;
+}
+
+sub initialize
+{
+ my $self = shift;
+
+ $self->{age_in_seconds} = shift;
+}
+
+sub check_move
+{
+ my $self = shift;
+ my $source = shift;
+
+ if ((time() - $source->last_modified_time()) > $self->{age_in_seconds})
+ {
+ return 1;
+ }
+
+ return 0;
+}
+
+##
+## Compound
+##
+## Takes a list of Move Condition Classes. Check_move returns true
+## if every Condition Class in the list's check_move function returns
+## true.
+##
+
+package Compound;
+
+sub new
+{
+ my $this = shift;
+ my $class = ref($this) || $this;
+ my $self = {};
+ bless $self, $class;
+ $self->initialize(@_);
+ return $self;
+}
+
+sub initialize
+{
+ my $self = shift;
+
+ $self->{condition_list} = [];
+}
+
+sub add
+{
+ my $self = shift;
+ my $new_condition = shift;
+
+ push(@{$self->{condition_list}}, $new_condition);
+}
+
+sub check_move
+{
+ my $self = shift;
+ my $source = shift;
+ my $dest = shift;
+ my $condition;
+ my $result;
+
+ foreach $condition (@{$self->{condition_list}})
+ {
+ if (!$condition->check_move($source, $dest))
+ {
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
+##
+## Eval
+##
+## Takes a perl expression and evaluates it. The ControlFile object
+## for the source QueuedMessage is avaliable through the name '$msg'.
+##
+
+package Eval;
+
+sub new
+{
+ my $this = shift;
+ my $class = ref($this) || $this;
+ my $self = {};
+ bless $self, $class;
+ $self->initialize(@_);
+ return $self;
+}
+
+sub initialize
+{
+ my $self = shift;
+
+ $self->{expression} = shift;
+}
+
+sub check_move
+{
+ my $self = shift;
+ my $source = shift;
+ my $dest = shift;
+ my $result;
+ my %msg;
+
+ $source->setup_vars();
+ tie(%msg, 'QueuedMessage', $source);
+ $result = eval($self->{expression});
+
+ return $result;
+}
diff --git a/debian/local/runq b/debian/local/runq
deleted file mode 100644
index a62522c..0000000
--- a/debian/local/runq
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-usage="Usage: $0 [OPTION]...
-Run the sendmail queue (sendmail -q)
-
- --help display this help and exit
- --version output version information and exit
-
-Report bugs to submit@bugs.debian.org"
-
-case $# in
- 1 )
- case "z${1}" in
- z--help )
- echo "$usage"; exit 0 ;;
- z--version )
- echo -n "runq (Debian GNU/Linux) 1.00. ";
- echo "Copyright (c) 1997 Johnie Ingram. >= GNU GPL 2."
- exit 0 ;;
- * ) ;;
- esac
- ;;
- * ) ;;
-esac
-
-COMMAND=/usr/sbin/sendmail
-exec $COMMAND -q $*
diff --git a/debian/local/runq.1 b/debian/local/runq.8
index 99f97a9..2e639e4 100644
--- a/debian/local/runq.1
+++ b/debian/local/runq.8
@@ -1,4 +1,4 @@
-.TH TRUE 1 "1997 July 20" "Debian Distribution" \" -*- nroff -*-
+.TH RUNQ 8 "2000 August 29" "Debian Distribution" \" -*- nroff -*-
.SH NAME
runq \- run the sendmail queue
.SH SYNOPSIS
diff --git a/debian/local/sendmail.in b/debian/local/sendmail.in
new file mode 100644
index 0000000..f1dcb61
--- /dev/null
+++ b/debian/local/sendmail.in
@@ -0,0 +1,1121 @@
+#!/bin/sh -e
+#-----------------------------------------------------------------------------
+# $Sendmail: sm_helper.sh,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# Debian helper function script for Debian Sendmail
+# Note: this file supports @SM_MINVERS@ - @SM_MAXVERS@
+#
+# Notes (to all):
+# *
+#
+# Notes (to self):
+# * clean_queues fubar, esp wrt MSP
+#
+#-----------------------------------------------------------------------------
+#
+set -e;
+
+#------------------------------------------------------------------------------
+# Parameters for the sendmail daemon
+# Do *NOT* touch these lines, instead, edit /etc/mail/sendmail.conf
+# The _PARMS lines are listed in precedence order
+#------------------------------------------------------------------------------
+Get_Parameters () {
+
+ # Main configuration parameters in /etc/mail/sendmail.conf
+ DAEMON_MODE='Daemon';
+ DAEMON_PARMS='';
+ QUEUE_MODE="$DAEMON_MODE";
+ QUEUE_INTERVAL='10';
+ QUEUE_PARMS='';
+ MSP_MODE="$QUEUE_MODE";
+ MSP_INTERVAL="$QUEUE_INTERVAL";
+ MSP_PARMS="$QUEUE_PARMS";
+ MISC_PARMS='';
+ CRON_PARMS='';
+
+ # Secondary (non-documented) parameters in /etc/mail/sendmail.conf
+ # Caveat Emptor: change these at your own risk - they impact several
+ # disjoint pieces parts...
+ SENDMAIL_ROOT='@localstatedir@/run/sendmail';
+ MTA_DAEMON='@sbindir@/sendmail';
+ MTA_COMMAND='@sbindir@/sendmail';
+ MTA_A='-Am';
+ MTAL_L='-L sm-mta';
+ MTAL_L_QUEUE='-L sm-mta-queue';
+ MTAL_L_RUNQ='-L sm-mta-runq';
+ MTA_ROOT="${SENDMAIL_ROOT}/mta";
+ MTAL_PIDFILE="${MTA_ROOT}/sendmail.pid";
+ MTAQ_L='-L sm-que';
+ MTAQ_L_RUNQ='-L sm-que-runq';
+ MTAQ_PIDFILE="${MTA_ROOT}/queue.pid";
+ MSP_DAEMON='@sbindir@/sendmail';
+ MSP_COMMAND='@sbindir@/sendmail';
+ MSP_A='-Ac';
+ MSP_L='-L sm-msp';
+ MSP_L_QUEUE='-L sm-msp-queue';
+ MSP_ROOT="${SENDMAIL_ROOT}/msp";
+ MSP_PIDFILE="${MSP_ROOT}/sendmail.pid";
+
+ # Pull in any user modified variables
+ if [ -f @sysconfdir@/mail/sendmail.conf ]; then
+ . @sysconfdir@/mail/sendmail.conf;
+ fi;
+
+ # Sanitize some keyword entries
+ DAEMON_MODE=$(echo "$DAEMON_MODE" | tr '[:upper:]' '[:lower:]');
+ QUEUE_MODE=$(echo "$QUEUE_MODE" | tr '[:upper:]' '[:lower:]');
+ MSP_MODE=$(echo "$MSP_MODE" | tr '[:upper:]' '[:lower:]');
+
+ # These can't be user customized
+ SM_Get_Parameters='yes';
+ PATH='/bin:/usr/bin:/sbin:/usr/sbin';
+ STAMP_DIR="${SENDMAIL_ROOT}/stampdir";
+ START_MTAL_CMD="start-stop-daemon \
+ --pidfile $MTAL_PIDFILE \
+ --exec $MTA_DAEMON \
+ --startas $MTA_COMMAND \
+ --start";
+ STOP_MTAL_CMD="start-stop-daemon \
+ --pidfile $MTAL_PIDFILE \
+ --stop";
+ SIGNAL_MTAL_CMD="start-stop-daemon \
+ --pidfile $MTAL_PIDFILE \
+ --stop";
+ START_MTAQ_CMD="start-stop-daemon \
+ --pidfile $MTAQ_PIDFILE \
+ --make-pidfile \
+ --exec $MTA_DAEMON \
+ --startas $MTA_COMMAND \
+ --start";
+ STOP_MTAQ_CMD="start-stop-daemon \
+ --pidfile $MTAQ_PIDFILE \
+ --stop";
+ SIGNAL_MTAQ_CMD="start-stop-daemon \
+ --pidfile $MTAQ_PIDFILE \
+ --stop";
+ START_MSP_CMD="start-stop-daemon \
+ --pidfile $MSP_PIDFILE \
+ --make-pidfile \
+ --exec $MSP_DAEMON \
+ --startas $MSP_COMMAND \
+ --chuid smmsp \
+ --start";
+ STOP_MSP_CMD="start-stop-daemon \
+ --pidfile $MSP_PIDFILE \
+ --stop";
+ SIGNAL_MSP_CMD="start-stop-daemon \
+ --pidfile $MSP_PIDFILE \
+ --stop";
+ NAME='sendmail';
+ FLAGS='defaults 50';
+
+ # Support for coexistance with smtpd package
+ SMTPD='/usr/sbin/smtpd';
+
+ # See if we can share the listener and queue-runner daemon:
+ # * Both must be in daemon mode
+ # * They must have the same (possibly empty) parameters
+ if [ "$DAEMON_MODE" = "daemon" \
+ -a "$QUEUE_MODE" = "daemon" \
+ -a "$DAEMON_PARMS" = "$QUEUE_PARMS" ]; then
+ SPLIT_DAEMON=0;
+ else
+ SPLIT_DAEMON=1;
+ fi;
+
+ # Version dependant support:
+ # 8.12.0+ M{TA,MSP}_A
+ if [ ! -f @datadir@/sendmail/cf/feature/msp.m4 ]; then
+ MTA_A='';
+ MTAL_L='';
+ MTAL_L_QUEUE='';
+ MSP_A='';
+ MSP_L='';
+ MSP_L_QUEUE='';
+ fi;
+ };
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# enhanced sendmail startup
+#------------------------------------------------------------------------------
+start_mta () {
+ #
+ # Make sure @localstatedir@/run/sendmail/ exists
+ check_dirs;
+ #
+ # If already running, don't start it...
+ if is_running mta; then
+ echo 'MTA is already running.';
+ return;
+ fi;
+ #
+ # Check if we're going to run a daemon (and how many):
+ daemon_check;
+ #
+ # Mark restarted for communication betwixt here and /etc/mail/Makefile
+ touch $STAMP_DIR/reload;
+ #
+ # Allow Unix (local) connections betwixt MSP/MTA:
+ touch $MTA_ROOT/smsocket;
+ #
+ # We can only afford to clean the MTA queues if running daemon mode,
+ # otherwise, there is a chance that a cronjob might still be using
+ # the queue... Thats also why we don't clean the MSP queues herein.
+ clean_queues;
+ #
+ # cd to a safe place to stash core files...
+ cd $MTA_ROOT;
+ $START_MTAL_CMD -- $MTAL_PARMS &
+ #
+ # Update permissions on smsocket
+ sleep 2;
+ chown root:root $MTA_ROOT/smsocket;
+ chmod 0666 $MTA_ROOT/smsocket;
+ #
+ # Check for split daemon mode (separate listener/queue runner)
+ if [ "$SPLIT_DAEMON" -eq 1 ]; then
+ $START_MTAQ_CMD -- $MTAQ_PARMS &
+ fi;
+ #
+ # if running split service, run the client queues (just to make sure)
+ if check_msp; then
+ $MSP_COMMAND -q $MSP_A $MSP_L_QUEUE $MSP_PARMS $MISC_PARMS;
+ fi;
+ };
+
+start_msp () {
+ #
+ # Make sure @localstatedir@/run/sendmail/ exists
+ check_dirs;
+ #
+ # If already running, don't start it...
+ if is_running msp; then
+ echo 'MSP is already running.';
+ return;
+ fi;
+ #
+ # Check to see if MSP mode is indeed available
+ if ! check_msp; then
+ return;
+ fi;
+ #
+ # Check if we're going to run a daemon:
+ if [ "$MSP_MODE" != 'daemon' ]; then
+ return;
+ fi;
+ #
+ # We can only afford to clean the MSP queues if running daemon mode,
+ # otherwise, there is a chance that a cronjob might still be using
+ # the queue... Thats also why we don't clean the MTA queues herein.
+ #clean_queues /var/spool/mqueue-client;
+ #
+ # cd to a safe place to stash core files...
+ cd $MSP_ROOT;
+ $START_MSP_CMD -- \
+ $MSP_A $MSP_L -q${MSP_INTERVAL}m $MSP_PARMS $MISC_PARMS &
+ };
+
+start_sendmail () {
+ start_mta;
+ if check_msp; then
+ start_msp;
+ fi;
+ };
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# enhanced sendmail reload
+#------------------------------------------------------------------------------
+reload_mta () {
+ #
+ # Make sure @localstatedir@/run/sendmail/ exists
+ check_dirs;
+ #
+ # reload (signal -HUP) is *much* better/faster than stop/start
+ #
+ # Mark restarted for communication betwixt here and /etc/mail/Makefile
+ touch $STAMP_DIR/reload;
+ #
+ # If not running, just start it...
+ if ! is_running mta; then
+ start_mta;
+ fi;
+ #
+ # Is running, must signal it...
+ $SIGNAL_MTAL_CMD --signal HUP --oknodo --quiet || true;
+ sleep 2;
+ chown root:root $MTA_ROOT/smsocket;
+ chmod 0666 $MTA_ROOT/smsocket;
+ #
+ # Check for split daemon mode (separate listener/queue runner)
+ if [ "$SPLIT_DAEMON" -eq 1 ]; then
+ $SIGNAL_MTAQ_CMD --signal HUP --oknodo --quiet || true;
+ fi;
+ };
+
+reload_msp () {
+ #
+ # Make sure @localstatedir@/run/sendmail/ exists
+ check_dirs;
+ #
+ # reload (signal -HUP) is *much* better/faster than stop/start
+ #
+ # If not running, just start it...
+ if ! is_running msp; then
+ start_msp;
+ fi;
+ #
+ # Is running, must signal it...
+ $SIGNAL_MSP_CMD --signal HUP --oknodo --quiet || true;
+ };
+
+reload_sendmail () {
+ reload_mta;
+ if check_msp; then
+ reload_msp;
+ fi;
+ };
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# enhanced sendmail shutdown
+#------------------------------------------------------------------------------
+stop_mta () {
+ local cnt;
+ stopped=0;
+ #
+ # Make sure @localstatedir@/run/sendmail/ exists
+ check_dirs;
+ #
+ # If not running, don't stop it...
+ if ! is_running mta; then
+ return;
+ fi;
+ #
+ # Is running, must stop it...
+ $STOP_MTAL_CMD --signal TERM --quiet --oknodo > /dev/null;
+ #
+ # Now we have to wait until sendmail has _really_ stopped.
+ #
+ sleep 2;
+ if $STOP_MTAL_CMD --signal TERM --quiet > /dev/null; then
+ echo -n 'Waiting .';
+ cnt=0;
+ while $STOP_MTAL_CMD --signal TERM --quiet > /dev/null; do
+ cnt=`expr $cnt + 1`;
+ if [ $cnt -gt 60 ]; then
+ #
+ # Waited 120 seconds now. Fail.
+ #
+ echo -n ' Failed ';
+ stopped=1;
+ break;
+ fi;
+ sleep 2;
+ echo -n '.';
+ done;
+ echo -n ' Done ';
+ fi;
+ # Remove pidfile iff stopped
+ if ! $STOP_MTAL_CMD --signal TERM --quiet > /dev/null; then
+ rm -f "$MTAL_PIDFILE";
+ fi
+ };
+
+stop_queue () {
+ local cnt;
+ stopped=0;
+ #
+ # Make sure @localstatedir@/run/sendmail/ exists
+ check_dirs;
+ #
+ # If not running, don't stop it...
+ if ! is_running queue; then
+ return;
+ fi;
+ #
+ # Is running, must stop it...
+ $STOP_MTAQ_CMD --signal TERM --quiet --oknodo > /dev/null;
+ #
+ # Now we have to wait until sendmail has _really_ stopped.
+ #
+ sleep 2;
+ if $STOP_MTAQ_CMD --signal TERM --quiet > /dev/null; then
+ echo -n 'Waiting .';
+ cnt=0;
+ while $STOP_MTAQ_CMD --signal TERM --quiet > /dev/null; do
+ cnt=`expr $cnt + 1`;
+ if [ $cnt -gt 60 ]; then
+ #
+ # Waited 120 seconds now. Fail.
+ #
+ echo -n ' Failed ';
+ stopped=1;
+ break;
+ fi;
+ sleep 2;
+ echo -n '.';
+ done;
+ echo -n ' Done ';
+ fi;
+ # Remove pidfile iff stopped
+ if ! $STOP_MTAQ_CMD --signal TERM --quiet > /dev/null; then
+ rm -f "$MTAQ_PIDFILE";
+ fi
+ };
+
+stop_msp () {
+ local cnt;
+ stopped=0;
+ #
+ # Make sure @localstatedir@/run/sendmail/ exists
+ check_dirs;
+ #
+ # If not running, don't stop it...
+ if ! is_running msp; then
+ return;
+ fi;
+ #
+ # Is running, must stop it...
+ $STOP_MSP_CMD --signal TERM --quiet --oknodo > /dev/null;
+ #
+ # Now we have to wait until sendmail has _really_ stopped.
+ #
+ sleep 2;
+ if $STOP_MSP_CMD --signal TERM --quiet > /dev/null; then
+ echo -n 'Waiting .';
+ cnt=0;
+ while $STOP_MSP_CMD --signal TERM --quiet > /dev/null; do
+ cnt=`expr $cnt + 1`;
+ if [ $cnt -gt 60 ]; then
+ #
+ # Waited 120 seconds now. Fail.
+ #
+ echo -n ' Failed ';
+ stopped=1;
+ break;
+ fi;
+ sleep 2;
+ echo -n '.';
+ done;
+ echo -n ' Done ';
+ fi;
+ # Remove pidfile iff stopped
+ if ! $STOP_MSP_CMD --signal TERM --quiet > /dev/null; then
+ rm -f "$MSP_PIDFILE";
+ fi;
+ };
+
+stop_sendmail () {
+ if check_msp; then
+ stop_msp;
+ fi;
+ stop_mta;
+ stop_queue;
+ };
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# Check to see if sendmail is running
+#------------------------------------------------------------------------------
+is_running () {
+ local result;
+ result=1;
+ #
+ # Make sure @localstatedir@/run/sendmail/ exists
+ check_dirs;
+ #
+ # Determine proper pidfile to check
+ PIDFILE=$(echo "$1" | tr '[:upper:]' '[:lower:]');
+ case $PIDFILE in
+ mta)
+ PIDFILE="$MTAL_PIDFILE";
+ ;;
+ queue)
+ PIDFILE="$MTAQ_PIDFILE";
+ ;;
+ msp)
+ PIDFILE="$MSP_PIDFILE";
+ ;;
+ *)
+ PIDFILE="$1";
+ ;;
+ esac;
+ #
+ # If no pidfile, not running
+ # Extract pid/command and see if still running
+ # Remove pidfile if app didn't
+ if [ -s $PIDFILE ]; then
+ PID=`head -n 1 $PIDFILE 2>/dev/null`;
+ COMMAND=`tail -n 1 $PIDFILE`;
+ if [ ! -z "`ps --no-heading $PID`" ]; then
+ result=0;
+ else
+ rm -f $PIDFILE;
+ fi;
+ fi;
+ return $result;
+ };
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# Check to see if running split service (MTA, MSP)
+# Must be at 8.12.0+ for this support
+#------------------------------------------------------------------------------
+check_msp () {
+ local result;
+ result=1;
+ if [ ! -f @datadir@/sendmail/cf/feature/msp.m4 ]; then
+ result=1;
+ elif [ -s @sysconfdir@/mail/submit.cf \
+ -a -s @sysconfdir@/mail/submit.mc ]; then
+ if grep -qEe "^[[:space:]]*\`?FEATURE\([[:space:]]*\`?msp" \
+ @sysconfdir@/mail/submit.mc; then
+ result=0;
+ fi;
+ fi;
+ return $result;
+ };
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# Miscellaneous sendmail command support for MSP/MTA split
+# mailstats, mailq, runq
+#------------------------------------------------------------------------------
+newaliases () {
+ #
+ # Obtain parameters IFF needed
+ if [ -z "$SM_Get_Parameters" ]; then
+ Get_Parameters;
+ fi;
+ #
+ $MTA_COMMAND $MTA_A -bi $*;
+ };
+
+hoststat () {
+ #
+ # Obtain parameters IFF needed
+ if [ -z "$SM_Get_Parameters" ]; then
+ Get_Parameters;
+ fi;
+ #
+ $MTA_COMMAND $MTA_A -bh $*;
+ };
+
+purgestat () {
+ local parms;
+ parms=$(echo "$1" | tr '[:upper:]' '[:lower:]');
+ case $parms in
+ n*) # Now
+ parms='-O Timeout.hoststatus=1s';
+ shift;
+ ;;
+ *)
+ parms='';
+ ;;
+ esac;
+ #
+ # Obtain parameters IFF needed
+ if [ -z "$SM_Get_Parameters" ]; then
+ Get_Parameters;
+ fi;
+ #
+ $MTA_COMMAND $MTA_A -bH $parms $*;
+ };
+
+mailstats () {
+ #
+ # Obtain parameters IFF needed
+ if [ -z "$SM_Get_Parameters" ]; then
+ Get_Parameters;
+ fi;
+ #
+ #if running split service, show the client status first
+ if check_msp; then
+ echo 'MSP statistics...';
+ #check if we have a status file for the MSP
+ statusfile=$(grep -Ee '^O StatusFile=/.*' \
+ @sysconfdir@/mail/submit.cf | cut -d= -f2);
+ if [ -n $statusfile ]; then
+ @libexecdir@/mailstats -C \
+ @sysconfdir@/mail/submit.cf $* || true;
+ fi;
+ echo 'MTA statistics...';
+ fi;
+ #check if we have a status file for the MTA
+ statusfile=$(grep -Ee '^O StatusFile=/.*' \
+ @sysconfdir@/mail/sendmail.cf | cut -d= -f2);
+ if [ -n $statusfile ]; then
+ @libexecdir@/mailstats $* || true;
+ fi;
+ };
+
+mailq () {
+ #
+ # Obtain parameters IFF needed
+ if [ -z "$SM_Get_Parameters" ]; then
+ Get_Parameters;
+ fi;
+ #
+ # if running split service, show the client queues first
+ if check_msp; then
+ echo 'MSP Queue status...';
+ #
+ # Check to see if shared memory is in use (8.12.0+)
+ if grep -qEe "^[[:space:]]*\`?define\(\`?confSHAREDMEMORYKEY'?[[:space:]]*,[[:space:]]*\`?0*[1-9]+[0-9]*'?[[:space:]]*\)" \
+ @sysconfdir@/mail/submit.mc; then
+ $MSP_COMMAND -bP || true;
+ fi;
+ $MSP_COMMAND -bp $MSP_A $MISC_PARMS $* || true;
+ echo 'MTA Queue status...';
+ fi;
+ #
+ # Check to see if shared memory is in use (8.12.0+)
+ if grep -qEe "^[[:space:]]*\`?define\(\`?confSHAREDMEMORYKEY'?[[:space:]]*,[[:space:]]*\`?0*[1-9]+[0-9]*'?[[:space:]]*\)" \
+ @sysconfdir@/mail/sendmail.mc; then
+ $MTA_COMMAND -bP || true;
+ fi;
+ $MTA_COMMAND -bp $MTA_A $MISC_PARMS $* || true;
+ };
+
+runq () {
+ #
+ # Obtain parameters IFF needed
+ if [ -z "$SM_Get_Parameters" ]; then
+ Get_Parameters;
+ fi;
+ #
+ # if running split service, run the client queues first
+ if check_msp; then
+ echo 'Running the MSP queue...';
+ $MSP_COMMAND -q $MSP_A \
+ $MSP_L_QUEUE $MSP_PARMS $MISC_PARMS $* || true;
+ echo 'Running the MTA queues...';
+ fi;
+ if [ "$SPLIT_DAEMON" -eq 0 ]; then
+ $MTA_COMMAND -q $MTA_A \
+ $MTAL_L_RUNQ $QUEUE_PARMS $MISC_PARMS $* || true;
+ else
+ $MTA_COMMAND -q $MTA_A \
+ $MTAQ_L_RUNQ $QUEUE_PARMS $MISC_PARMS $* || true;
+ fi;
+ };
+
+control () {
+ #
+ # Obtain parameters IFF needed
+ if [ -z "$SM_Get_Parameters" ]; then
+ Get_Parameters;
+ fi;
+ local parms;
+ parms="$*";
+ if [ -z "$parms" ]; then
+ parms='help';
+ fi;
+ if is_running mta; then
+ @datadir@/sendmail/smcontrol.pl $parms;
+ else
+ echo 'MTA: is not running';
+ fi;
+ };
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# Print status of running job(s)
+#------------------------------------------------------------------------------
+status () {
+ #
+ # Make sure @localstatedir@/run/sendmail/ exists
+ check_dirs;
+ #
+ # Obtain parameters IFF needed
+ if [ -z "$SM_Get_Parameters" ]; then
+ Get_Parameters;
+ fi;
+ #
+ # if running split service, check the client status first
+ if check_msp; then
+ if is_running msp; then
+ echo "MSP: $PID $COMMAND";
+ ps -fwp $PID;
+ if [ -S ${MSP_ROOT}/smcontrol ]; then
+ @datadir@/sendmail/smcontrol.pl \
+ -f ${MSP_ROOT}/smcontrol status;
+ fi;
+ elif [ $MSP_MODE = 'cron' ]; then
+ echo 'MSP: is run via cron';
+ elif [ $MSP_MODE = 'none' ]; then
+ echo 'MSP: is disabled';
+ else
+ echo 'MSP: is not running';
+ fi;
+ fi;
+ #
+ # Check MTA listener
+ if is_running mta; then
+ echo "MTA: $PID $COMMAND";
+ ps -fwp $PID;
+ if [ -S ${MTA_ROOT}/smcontrol ]; then
+ @datadir@/sendmail/smcontrol.pl status;
+ fi;
+ elif [ $DAEMON_MODE = 'inetd' ]; then
+ echo 'MTA: is run via inetd';
+ elif [ $DAEMON_MODE = 'none' ]; then
+ echo 'MTA: is disabled';
+ else
+ echo 'MTA: is not running';
+ fi;
+ #
+ # Check for split daemon mode (separate listener/queue runner)
+ if [ "$SPLIT_DAEMON" -eq 0 ]; then
+ echo "QUE: Same as MTA";
+ elif is_running queue; then
+ echo "QUE: $PID $COMMAND";
+ ps -fwp $PID;
+ elif [ $QUEUE_MODE = 'cron' ]; then
+ echo 'QUE: is run via cron';
+ elif [ $QUEUE_MODE = 'none' ]; then
+ echo 'QUE: is disabled';
+ else
+ echo 'QUE: is not running';
+ fi;
+ };
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# Cronjob handling
+#------------------------------------------------------------------------------
+cron_mta () {
+ #
+ # Make sure @localstatedir@/run/sendmail/ exists
+ check_dirs;
+ #
+ # Obtain parameters IFF needed
+ if [ -z "$SM_Get_Parameters" ]; then
+ Get_Parameters;
+ fi;
+ #
+ # If cron not needed, don't do queue running (though it wouldn't hurt)
+ if [ $QUEUE_MODE = 'cron' ]; then
+ #
+ # If running a split (MTA/MSP) setup, we need to make sure that
+ # messages not immediately accepted by the MTA get delivered.
+ # Only run the MSP queue if MSP_MODE=none
+ if check_msp; then
+ if [ $MSP_MODE = 'none' ]; then
+ # Make sure only *ONE* cronjob at a time
+ if [ ! -f $STAMP_DIR/cron_msp ]; then
+ touch $STAMP_DIR/cron_msp;
+ #clean_queues /var/spool/mqueue-client;
+ $MSP_COMMAND -q $MSP_A $MSP_L_QUEUE \
+ $MSP_PARMS $MISC_PARMS \
+ $CRON_PARMS || true;
+ rm -f $STAMP_DIR/cron_msp;
+ fi;
+ fi;
+ fi;
+
+ # Make sure only *ONE* cronjob at a time
+ if [ ! -f $STAMP_DIR/cron_mta ]; then
+ touch $STAMP_DIR/cron_mta;
+ $MTA_COMMAND -q $MTA_A $MTAL_L_QUEUE \
+ $QUEUE_PARMS $MISC_PARMS $CRON_PARMS || true;
+ rm -f $STAMP_DIR/cron_mta;
+ fi;
+ fi;
+ };
+
+cron_msp () {
+ #
+ # Make sure @localstatedir@/run/sendmail/ exists
+ check_dirs;
+ #
+ # Obtain parameters IFF needed
+ if [ -z "$SM_Get_Parameters" ]; then
+ Get_Parameters;
+ fi;
+ #
+ # If cron not needed, don't do queue running (though it wouldn't hurt)
+ if [ $MSP_MODE = 'cron' ]; then
+ #
+ # If running a split (MTA/MSP) setup, we need to make sure that
+ # messages not immediately accepted by the MTA get delivered.
+ if check_msp; then
+ # Make sure only *ONE* cronjob at a time
+ if [ ! -f $STAMP_DIR/cron_msp ]; then
+ touch $STAMP_DIR/cron_msp;
+ #clean_queues /var/spool/mqueue-client;
+ $MSP_COMMAND -q $MSP_A $MSP_L_QUEUE \
+ $MSP_PARMS $MISC_PARMS \
+ $CRON_PARMS || true;
+ rm -f $STAMP_DIR/cron_msp;
+ fi;
+ fi;
+ fi;
+ };
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# Determine how to run sendmail mta daemon
+# * No daemon
+# * As listener
+# * As queue runner
+# * As both listener and queue runner
+#------------------------------------------------------------------------------
+daemon_check () {
+ local run_daemon;
+ #
+ # Skip daemon run for the following:
+ # * sendmail hasn't been configured
+ # * smptd, a firewall frontend for sendmail, is installed
+ # * DAEMON_MODE = (none | inet) & QUEUE_MODE = (none | cron)
+ if [ ! -s @sysconfdir@/mail/sendmail.cf ] || \
+ [ ! -s @sysconfdir@/mail/sendmail.mc ]; then
+ echo 'sendmail has not been configured, not started.';
+ echo 'To configure sendmail, type sendmailconfig';
+ exit 1;
+ elif [ -x $SMTPD ]; then
+ echo 'sendmail mta daemon not needed, not started.';
+ exit 0;
+ fi;
+
+ MTAL_PARMS="$MTA_A $MTAL_L";
+ MTAQ_PARMS="$MTA_A $MTAQ_L";
+ run_daemon=3;
+
+ case "$DAEMON_MODE" in
+ none* | \
+ inetd*)
+ run_daemon=`expr $run_daemon - 1`;
+ ;;
+
+ daemon* | \
+ *)
+ MTAL_PARMS="$MTAL_PARMS -bd $DAEMON_PARMS";
+ ;;
+ esac;
+
+ case "$QUEUE_MODE" in
+ none* | \
+ cron*)
+ run_daemon=`expr $run_daemon - 1`;
+ ;;
+
+ daemon* | \
+ *)
+ # Check for split daemon mode (separate listener/queue runner)
+ if [ $SPLIT_DAEMON -eq 0 ]; then
+ MTAL_PARMS="$MTAL_PARMS -q${QUEUE_INTERVAL}m";
+ MTAL_PARMS="$MTAL_PARMS $QUEUE_PARMS";
+ else
+ MTAQ_PARMS="$MTAQ_PARMS -q${QUEUE_INTERVAL}m";
+ MTAQ_PARMS="$MTAQ_PARMS $QUEUE_PARMS";
+ fi;
+ ;;
+ esac;
+
+ # Add any miscellanous (ie debugging) parameters
+ MTAL_PARMS="$MTAL_PARMS $MISC_PARMS";
+ MTAQ_PARMS="$MTAQ_PARMS $MISC_PARMS";
+
+ # Add PidFile override for MTA queue runner
+ MTAQ_PARMS="$MTAQ_PARMS -O PidFile=$MTAQ_PIDFILE";
+
+ if [ $run_daemon -lt 2 ]; then
+ echo 'sendmail listen/queue daemon not desired.';
+ exit 0;
+ fi;
+ };
+#------------------------------------------------------------------------------
+
+
+#------------------------------------------------------------------------------
+# Clean sendmail queues (somewhat): does *not* support split qf/df/xf dirs.
+# NOTE: This whole thing sucks with queue-groups, need to redo it!!!
+# NOTE: Check for race conditions betwixt this code and queue-runners
+#------------------------------------------------------------------------------
+clean_queues () {
+ local QUEUE_ROOT QUEUE QUIET
+ # Obtain queue root directory
+ if [ -z "$1" ]; then
+ QUEUE_ROOT=/var/spool/mqueue
+ QUEUE=/var/spool/mqueue
+ QUIET=''
+ else
+ QUEUE_ROOT="$1"
+ QUEUE="$1"
+ QUIET='1'
+ fi
+ # remove lock files left because of kill/crash
+ # rm -f $QUEUE/[lnx]f* doesn't work with a plethora of files ;-(
+ for i in A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \
+ a b c d e f g h i j k l m n o p q r s t u v w x y z; do
+ rm -f $QUEUE/[lnx]f${i}*
+ done
+ # remove zero length qf files
+ #for qffile in $QUEUE/qf*; do
+ for qffile in $(find $QUEUE_ROOT -type f -name 'qf*'); do
+ if [ -r "$qffile" -a ! -s "$qffile" ]; then
+ if [ ! -z "$QUIET" ]; then
+ echo -n "<zero: $qffile> "; fi
+ rm -f "$qffile"
+ fi
+ done
+ # rename tf files to be qf if the qf does not exist
+ for tffile in $QUEUE/tf*; do
+ qffile=`echo "$tffile" | sed 's/t/q/'`
+ if [ -r "$tffile" -a ! -f "$qffile" ]; then
+ if [ ! -z "$QUIET" ]; then
+ echo -n "<recovering: $tffile> "; fi
+ mv "$tffile" "$qffile"
+ elif [ -f "$tffile" ]; then
+ echo -n "<extra: $tffile> "
+ rm -f "$tffile"
+ fi
+ done
+ # remove df files with no corresponding qf files
+ for dffile in $QUEUE/df*; do
+ qffile=`echo "$dffile" | sed 's/d/q/'`
+ if [ -r "$dffile" -a ! -f "$qffile" ]; then
+ if [ ! -s "$dffile" ]; then
+ rm -f "$dffile"
+ else
+ if [ ! -z "$QUIET" ]; then
+ echo -n "<incomplete: $dffile> "; fi
+ mv "$dffile" `echo $dffile | sed 's/d/D/'`
+ fi
+ fi
+ done
+ # announce files that have been saved during disaster recovery
+ for xffile in $QUEUE/[A-Z]f*; do
+ if [ -f "$xffile" ]; then
+ if [ ! -z "$QUIET" ]; then
+ echo -n "<panic: $xffile> "; fi
+ fi
+ done
+ }
+#------------------------------------------------------------------------------
+
+#------------------------------------------------------------------------------
+# check_dirs: Make sure @localstatedir@/run/sendmail/{mta,msp,stampdir} exist
+#------------------------------------------------------------------------------
+check_dirs () {
+ if [ ! -d "${SENDMAIL_ROOT}" ]; then
+ mkdir -p "${SENDMAIL_ROOT}";
+ chown root:smmsp "${SENDMAIL_ROOT}";
+ chmod 02750 "${SENDMAIL_ROOT}";
+ fi;
+ if [ ! -d "${MTA_ROOT}" ]; then
+ mkdir -p "${MTA_ROOT}";
+ chown root:smmsp "${MTA_ROOT}";
+ chmod 02750 "${MTA_ROOT}";
+ fi;
+ if [ ! -d "${MSP_ROOT}" ]; then
+ mkdir -p "${MSP_ROOT}";
+ chown smmsp:smmsp "${MSP_ROOT}";
+ chmod 02770 "${MSP_ROOT}";
+ fi;
+ if [ ! -d "${STAMP_DIR}" ]; then
+ mkdir -p "${STAMP_DIR}";
+ chown root:smmsp "${STAMP_DIR}";
+ chmod 02770 "${STAMP_DIR}";
+ fi;
+ }
+
+
+#------------------------------------------------------------------------------
+# Handle being called via an alias
+#------------------------------------------------------------------------------
+case $(basename $0) in
+ newaliases)
+ newaliases $*;
+ exit $?;
+ ;;
+ hoststat)
+ hoststat $*;
+ exit $?;
+ ;;
+ purgestat)
+ purgestat $*;
+ exit $?;
+ ;;
+ mailstats)
+ mailstats $*;
+ exit $?;
+ ;;
+ mailq)
+ mailq $*;
+ exit $?;
+ ;;
+ runq)
+ runq $*;
+ exit $?;
+ ;;
+ control|smcontrol)
+ control $*;
+ exit $?;
+ ;;
+ *)
+ ;;
+ esac;
+
+#------------------------------------------------------------------------------
+# Handle being called via /etc/init.d/sendmail or directly
+#------------------------------------------------------------------------------
+
+# Some requisite initialization
+Get_Parameters;
+
+# Ok, why are we here...
+case "$1" in
+
+ #-----------------------------------------------------------------------
+ # Debian required/optional targets:
+ #-----------------------------------------------------------------------
+ start)
+ echo -n 'Starting Mail Transport Agent: sendmail';
+ start_sendmail;
+ echo '.'
+ ;;
+
+ stop|force-stop)
+ echo -n 'Stopping Mail Transport Agent: sendmail';
+ stop_sendmail;
+ echo '.'
+ ;;
+
+ restart)
+ echo -n 'Restarting Transport Agent: sendmail';
+ # reload is equivalent (but faster) than stop/start !
+ reload_sendmail;
+ echo '.';
+ ;;
+
+ restart-if-running)
+ if ! is_running mta && ! is_running msp; then
+ echo 'Mail Transport Agent: sendmail is not running';
+ else
+ $0 restart;
+ fi;
+ ;;
+
+ reload|force-reload)
+ echo -n 'Reloading Mail Transport Agent configuration: sendmail';
+ reload_sendmail;
+ echo '.';
+ ;;
+
+ #-----------------------------------------------------------------------
+ # Local targets (sendmail commands/aliases) for MSP/MTA split support
+ # These targets will pass along any provided parameters
+ #-----------------------------------------------------------------------
+ newaliases)
+ shift;
+ newaliases $*;
+ ;;
+
+ hoststat)
+ shift;
+ hoststat $*;
+ ;;
+
+ purgestat)
+ shift;
+ purgestat $*;
+ ;;
+
+ mailstats)
+ shift;
+ mailstats $*;
+ ;;
+
+ mailq)
+ shift;
+ mailq $*;
+ ;;
+
+ runq)
+ shift;
+ runq $*;
+ ;;
+
+ control|smcontrol)
+ shift;
+ control $*;
+ ;;
+
+ #-----------------------------------------------------------------------
+ # Local targets for extended support/debugging
+ #-----------------------------------------------------------------------
+ status)
+ shift;
+ status $*;
+ ;;
+
+ debug)
+ #
+ # If not running, can't debug
+ if is_running msp; then
+ echo -n 'Dumping MSP state...';
+ $SIGNAL_MSP_CMD --signal USR1;
+ echo 'done.';
+ fi;
+ if is_running mta; then
+ echo -n 'Dumping MTA state...';
+ $SIGNAL_MTAL_CMD --signal USR1;
+ echo 'done.';
+ fi;
+ ;;
+
+ clean|clean_que*|clean-que*)
+ #
+ # If running, don't clean the queues...
+ if is_running mta; then
+ echo 'MTA is running, queue cleaning ill advised...';
+ else
+ echo -n 'Cleaning up the queues...';
+ clean_queues;
+ echo 'done.';
+ fi;
+ ;;
+
+ #-----------------------------------------------------------------------
+ # Local targets for cronjob support
+ #-----------------------------------------------------------------------
+ cron-msp)
+ cron_msp;
+ ;;
+
+ cron-mta)
+ cron_mta;
+ ;;
+
+ #-----------------------------------------------------------------------
+ # Default target - bitch and moan
+ #-----------------------------------------------------------------------
+ *)
+ echo "Invalid command <$1>";
+ echo "Usage: $0 <command>";
+ echo ' Where <command> is one of the following';
+ echo ' start|stop|restart|restart-if-running';
+ echo ' reload|force-reload';
+ echo ' newaliases|hoststat|purgestat|mailstats|mailq|runq|control';
+ echo ' status|debug|clean';
+ exit 1;
+ ;;
+ esac;
+
+exit 0;
diff --git a/debian/local/sendmailconfig b/debian/local/sendmailconfig.in
index 96e6c88..1c2cf1e 100644
--- a/debian/local/sendmailconfig
+++ b/debian/local/sendmailconfig.in
@@ -1,137 +1,147 @@
-#!/bin/sh
+#!/bin/sh -e
+#-----------------------------------------------------------------------------
+# $Sendmail: sendmailconfig,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
#
# Interactively configure Sendmail for Debian
#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
# Robert Leslie <rob@mars.org>,
# Rick Nelson <cowboy@debian.org>
+#
+#-----------------------------------------------------------------------------
+set -e;
+
+PATH='/usr/sbin:/usr/bin:/sbin:/bin';
+SENDMAIL_MC="@sysconfdir@/mail/sendmail.mc";
+SUBMIT_MC="@sysconfdir@/mail/submit.mc";
+
+# Path to other sendmail helpers
+if [ -x ./update_sendmail ]; then
+ sm_path='.';
+elif [ -x $(dirname $0)/update_sendmail ]; then
+ sm_path=$(dirname $0);
+else
+ sm_path=@datadir@/sendmail;
+ fi;
-PATH="/usr/sbin:/usr/bin:/sbin:/bin"
-FILE="/etc/mail/sendmail.mc"
-#FILE="/u/src/sendmail/sendmail.mc"
-
-set +e
-reload="yes"
-umask 022
+set +e;
+reload="yes";
+umask 022;
#------------------------------------------------------------------------------
-while [ $# -gt 0 ]
-do
+while [ $# -gt 0 ]; do
case "$1" in
- --no-reload)
- reload=""
- shift
- ;;
-
- *)
- echo "Usage: $0 [--no-reload]" >&2
- exit 1
- ;;
- esac
-done
+ --no-reload)
+ reload="";
+ shift;
+ ;;
+
+ *)
+ echo "Usage: $0 [--no-reload]" >&2;
+ exit 1;
+ ;;
+ esac;
+ done;
#------------------------------------------------------------------------------
descrip() {
- echo ""
- echo "$1"
- echo "$1" | sed -e 's/./-/g'
- cat -
- echo ""
-}
+ echo '';
+ echo "$1";
+ echo "$1" | sed -e 's/./-/g';
+ cat -;
+ echo '';
+ };
yesno() {
- local N="N" Y="Y"
- local q="$1" def=$(eval "echo -n \$$2")
+ local N='N' Y='Y';
+ local q="$1" def=$(eval "echo -n \$$2");
- while :
- do
- echo -n "$q? [$def] "
- read REPLY
- REPLY=$(echo -n "$REPLY" | sed -e "s/^\ *//" -e "s/^\t*//")
- test -n "$REPLY" || REPLY="$def"
+ while :; do
+ echo -n "$q? [$def] ";
+ read REPLY;
+ REPLY=$(echo -n "$REPLY" | sed -e "s/^\ *//" -e "s/^\t*//");
+ test -n "$REPLY" || REPLY="$def";
case "$REPLY" in
[Yy]*)
- echo yes > /dev/null
- eval "$2=\"Y\""
- return 0
- ;;
-
+ echo yes > /dev/null;
+ eval "$2=\"Y\"";
+ return 0;
+ ;;
[Nn]*)
- echo no > /dev/null
- eval "$2=\"N\""
- return 1
- ;;
- esac
- done
-}
+ echo no > /dev/null;
+ eval "$2=\"N\"";
+ return 1;
+ ;;
+ esac;
+ done;
+ };
input() {
- local q="$1" def=$(eval "echo -n \$$2")
+ local q="$1" def=$(eval "echo -n \$$2");
- echo -n "$q? [$def] "
+ echo -n "$q? [$def] ";
read REPLY
- REPLY=$(echo "$REPLY" | sed -e 's/^[ ]*//' -e 's/[ ]*$//' | cat)
- test -n "$REPLY" || REPLY="$def"
+ REPLY=$(echo "$REPLY" | sed -e 's/^[ ]*//' -e 's/[ ]*$//' | cat);
+ test -n "$REPLY" || REPLY="$def";
- if [ NONE = "$3" ]; then
- test NONE != "$REPLY" || REPLY=""
- fi
+ if [ "NONE" = "$3" ]; then
+ case "$REPLY" in
+ [NnOoNnEe])
+ REPLY='';
+ ;;
+ esac;
+ fi;
- eval "$2=\"$REPLY\""
-}
+ eval "$2=\"$REPLY\"";
+ };
testconfig() {
- CONFIG=$(grep "$1" $FILE 2>/dev/null)
-}
-
-testwrap() {
- WRAP=$(grep "^[^#:]*sendmail[^:]*[:]" /etc/hosts.allow 2>/dev/null)
-}
-
-updatewrap() {
- echo "Updating /etc/hosts.allow, adding \"sendmail: all\"."
- echo "sendmail: all" | cat - /etc/hosts.allow >/etc/hosts.allow.new
- mv -f /etc/hosts.allow.new /etc/hosts.allow
- if [ -e /etc/init.d/netbase ]; then
- /etc/init.d/netbase reload >/dev/null
- else
- /etc/init.d/inetd reload >/dev/null
- fi
-}
+ CONFIG=$(grep -Ee "^[[:space:]]*$1" $SENDMAIL_MC 2>/dev/null);
+ };
makecf() {
- echo "Updating sendmail databases ..."
- /usr/share/sendmail/updatedb
-
- testwrap
- if [ "$WRAP" = "" ]; then
- updatewrap
- fi
-
- if [ "$reload" ] && \
- yesno "Reload the running sendmail now with the new configuration" Y
- then
- echo "Reloading sendmail ..."
- /etc/init.d/sendmail reload >/dev/null
- fi
+ if [ -x $sm_path/update_sendmail ]; then
+ echo "Updating sendmail environment ...";
+ $sm_path/update_sendmail || true;
+ fi;
+
+ if [ "$reload" ] && \
+ yesno \
+ "Reload the running sendmail now with the new configuration" Y
+ then
+ echo "Reloading sendmail ...";
+ @sysconfdir@/init.d/sendmail reload >/dev/null;
+ fi;
}
#------------------------------------------------------------------------------
-if [ -f $FILE ]; then
- if yesno "Configure sendmail with the existing /etc/mail/sendmail.mc" Y
+if [ -f $SENDMAIL_MC ]; then
+ if yesno "Configure sendmail with the existing @sysconfdir@/mail/sendmail.conf" Y
+ then
+ if ! $sm_path/update_conf; then
+ echo "Correct @sysconfdir@/mail/sendmail.conf before continuing.";
+ exit 1;
+ fi;
+ else
+ echo "Edit @sysconfdir@/mail/sendmail.conf and reissue $0.";
+ exit 0;
+ fi;
+ if yesno "Configure sendmail with the existing $SENDMAIL_MC" Y
then
- makecf
- exit 0
- fi
-fi
+ makecf;
+ exit 0;
+ fi;
+ fi;
###############################################################################
-exec 3>$FILE.new
-trap "rm -f $FILE.new" 0
+exec 3>$SENDMAIL_MC.new;
+trap "rm -f $SENDMAIL_MC.new" 0;
###############################################################################
@@ -141,11 +151,13 @@ system. Default values are determined either by your existing configuration
or from common usage.
EOT
-echo -n "Press [ENTER] "
-read REPLY
+echo -n "Press [ENTER] ";
+read REPLY;
-cat /usr/share/sendmail/sendmail.cf/cf/debproto.mc >&3
-echo "LOCAL_CONFIG" >&3
+cat @datadir@/sendmail/cf/debian/sendmail.mc >&3;
+cp -a @datadir@/sendmail/cf/debian/submit.mc \
+ $SUBMIT_MC.new;
+echo "LOCAL_CONFIG" >&3;
###############################################################################
@@ -156,50 +168,35 @@ name will be used by other programs besides sendmail; it should be the single,
full domain name (FQDN) from which mail will appear to originate.
EOT
-mailname=$(cat /etc/mailname 2>/dev/null || hostname --fqdn)
-input "Mail name" mailname
+mailname=$(cat @sysconfdir@/mailname 2>/dev/null || hostname --fqdn);
+input "Mail name" mailname;
-echo "$mailname" >/etc/mailname
+echo "$mailname" >@sysconfdir@/mailname;
###############################################################################
-#descrip "Null Client" <<EOT
-#A special configuration known as the "null client" can be created for this
-#host if all mail should be forwarded to a central hub via a local SMTP-based
-#network. This may be a suitable configuration if you want to forward all of
-#your mail to your local Internet service provider (ISP) for delivery.
-#
-#To enable this option, give the name of the host to which all mail should be
-#forwarded. Otherwise leave the option empty or answer \`NONE' to disable it.
-#EOT
+descrip "Null Client" <<EOT
+A special configuration known as the "null client" can be created for this
+host if all mail should be forwarded to a central hub via a local SMTP-based
+network. This may be a suitable configuration if you want to forward all of
+your mail to your local Internet service provider (ISP) for delivery.
+
+To enable this option, give the name of the host to which all mail should be
+forwarded. Otherwise leave the option empty to disable it.
+To remove a prior name, use \`NONE'.
+EOT
nullclient=""
-! testconfig "FEATURE(nullclient" ||
- nullclient=$(echo -n "$CONFIG" | sed -e 's/[^,]*, *\([^)]*\).*/\1/')
-#
-#input "Null client forward host" nullclient NONE
-#
-#test -z "$nullclient" || echo "FEATURE(nullclient, $nullclient)dnl" >&3
-
-if [ -n "$nullclient" ]; then
- echo " "
- echo " *** IMPORTANT *** "
- echo " "
- echo "You are using a nullclient setup. This is ill advised as it"
- echo "makes your machine an open relay: If you ever connect to the"
- echo "internet, anyone can forge mail and send it through your machine"
- echo "to anyone else on the internet! - not a pretty picture."
- echo " "
- echo "I will convert this into a Smart Host config for you. A Smart Host"
- echo "setup is a superset of nullclient - you lose nothing, but gain local"
- echo "delivery without kluges, and, of course you're no longer an open relay"
- echo " "
- echo "You will need to accept your nullclient hostname below, when asked"
- echo "for a smart host."
- echo " "
- echo "Press <Enter> to continue"
- read yn
- fi
+! testconfig "FEATURE\(\`?nullclient" ||
+ nullclient=$(echo -n "$CONFIG" | sed -e 's/[^,]*, *\([^)]*\).*/\1/');
+
+input "Null client forward host" nullclient "" NONE;
+
+if [ ! -z "$nullclient" ]; then
+ echo "FEATURE(\`nullclient', $nullclient)dnl" >&3;
+ fi;
+
+if [ -z "$nullclient" ]; then
###############################################################################
descrip "Smart Host" <<EOT
@@ -209,25 +206,26 @@ most likely what you want if you have a dialup link, or sit behind a firewall.
To enable this option, give the name of the host to which all non-local mail
should be forwarded. Otherwise leave the option empty.
+To remove a prior name, use \`NONE'.
EOT
-smarthost=""
-if [ -n "$nullclient" ]; then
- smarthost="$nullclient"
- fi
-! testconfig "define(\`SMART_HOST'" ||
- smarthost=$(echo -n "$CONFIG" | sed -e 's/[^:]*:*\([^)]*\).*/\1/')
-input "Smart Host:" smarthost ""
-
-test -z "$smarthost" || echo "define(\`SMART_HOST', \`$smarthost')dnl" >&3
-if [ -n "$nullclient" -a ! -z "$smarthost" ]; then
- echo "undefine(\`ALIAS_FILE')dnl" >&3
- echo "define(\`confFORWARD_PATH', \`')dnl" >&3
- echo "define(\`MAIL_HUB', \`$smarthost')dnl" >&3
- echo "MASQUERADE_AS(\`$smarthost')dnl" >&3
- echo "FEATURE(\`allmasquerade')dnl" >&3
- echo "FEATURE(\`masquerade_envelope')dnl" >&3
- fi
+smarthost="";
+#if [ -n "$nullclient" ]; then
+# smarthost="$nullclient"
+# fi
+! testconfig "define\(\`?SMART_HOST" ||
+ smarthost=$(echo -n "$CONFIG" | sed -e 's/[^:]*:*\([^)]*\).*/\1/');
+input "Smart Host:" smarthost "" NONE;
+
+test -z "$smarthost" || echo "define(\`SMART_HOST', \`$smarthost')dnl" >&3;
+#if [ -n "$nullclient" -a ! -z "$smarthost" ]; then
+# echo "undefine(\`ALIAS_FILE')dnl" >&3
+# echo "define(\`confFORWARD_PATH', \`')dnl" >&3
+# echo "define(\`MAIL_HUB', \`$smarthost')dnl" >&3
+# echo "MASQUERADE_AS(\`$smarthost')dnl" >&3
+# echo "FEATURE(\`allmasquerade')dnl" >&3
+# echo "FEATURE(\`masquerade_envelope')dnl" >&3
+# fi
###############################################################################
descrip "Address Canonification" <<EOT
@@ -246,16 +244,11 @@ rather than this host.
EOT
-nocanonify="N"
-! testconfig "FEATURE(nocanonify)" || nocanonify="Y"
-
-! yesno "Disable address canonification" nocanonify ||
- echo "FEATURE(nocanonify)dnl" >&3
-
-###############################################################################
+nocanonify="N";
+! testconfig "FEATURE\(\`?nocanonify" || nocanonify="Y";
-if [ -z "$nullclient" ]
-then
+! yesno "Disable address canonification" nocanonify || \
+ echo "FEATURE(\`nocanonify')dnl" >&3;
###############################################################################
@@ -265,13 +258,12 @@ SMTP mailer. Even if you don't plan to exchange mail with other computers,
it is still a good idea to enable this so local programs can use it.
EOT
-smtp="Y"
-if [ -f $FILE ]
-then
- testconfig "MAILER(smtp)" || smtp="N"
-fi
+smtp="Y";
+if [ -f $SENDMAIL_MC ]; then
+ testconfig "MAILER\(\`?smtp" || smtp="N";
+fi;
-yesno "Enable the SMTP mailer" smtp || true
+yesno "Enable the SMTP mailer" smtp || true;
###############################################################################
@@ -280,14 +272,13 @@ If you want mail envelopes (as well as mail headers) to appear to come from
\`$mailname', you can enable this option.
EOT
-masqenvelope="Y"
-if [ -f $FILE ]
-then
- testconfig "FEATURE(masquerade_envelope)" || masqenvelope="N"
-fi
+masqenvelope="Y";
+if [ -f $SENDMAIL_MC ]; then
+ testconfig "FEATURE\(\`?masquerade_envelope" || masqenvelope="N";
+fi;
-! yesno "Masquerade envelopes" masqenvelope ||
- echo "FEATURE(masquerade_envelope)dnl" >&3
+! yesno "Masquerade envelopes" masqenvelope || \
+ echo "FEATURE(\`masquerade_envelope')dnl" >&3;
###############################################################################
@@ -303,11 +294,23 @@ the ENTIRE namespace of \`$mailname' supersets all the
local entries. If in doubt, it is safe to leave this option disabled.
EOT
-allmasquerade="N"
-! testconfig "FEATURE(allmasquerade)" || allmasquerade="Y"
+allmasquerade="N";
+! testconfig "FEATURE\(\`?allmasquerade" || allmasquerade="Y";
-! yesno "All masquerade" allmasquerade ||
- echo "FEATURE(allmasquerade)dnl" >&3
+! yesno "All masquerade" allmasquerade || \
+ echo "FEATURE(\`allmasquerade')dnl" >&3;
+
+###############################################################################
+
+descrip "Dont masquerade mail to local users" <<EOT
+Send mail to local recipients without masquerading.
+EOT
+
+local_no_masquerade="N";
+! testconfig "FEATURE\(\`?local_no_masquerade" || local_no_masquerade="Y";
+
+! yesno "Dont masquerade local" local_no_masquerade ||
+ echo "FEATURE(\`local_no_masquerade')dnl" >&3;
###############################################################################
@@ -316,11 +319,11 @@ If enabled, the local host domain is included even on locally delivered mail.
Normally it is not added unless it is already present.
EOT
-alwaysdomain="N"
-! testconfig "FEATURE(always_add_domain)" || alwaysdomain="Y"
+alwaysdomain="N";
+! testconfig "FEATURE\(\`?always_add_domain" || alwaysdomain="Y";
-! yesno "Always add domain" alwaysdomain ||
- echo "FEATURE(always_add_domain)dnl" >&3
+! yesno "Always add domain" alwaysdomain || \
+ echo "FEATURE(\`always_add_domain')dnl" >&3;
###############################################################################
@@ -332,14 +335,15 @@ generally requires that) mail for \`$mailname' is MXed
to another host. If in doubt, it is safe to leave this option enabled.
EOT
-acceptmailname="Y"
-if [ -f $FILE ]
-then
- testconfig "^Cw.*$mailname" || acceptmailname="N"
-fi
+acceptmailname="Y";
+if [ -f $SENDMAIL_MC ]; then
+ testconfig "^Cw.*$mailname" || acceptmailname="N";
+fi;
-yesno "Accept mail for \`$mailname'" acceptmailname || true
-test "N" = "$acceptmailname" || echo "Cw$mailname" >&3
+yesno "Accept mail for \`$mailname'" acceptmailname || true;
+test "N" = "$acceptmailname" || \
+ echo "LOCAL_CONFIG
+Cw$mailname" >&3;
###############################################################################
@@ -347,30 +351,27 @@ descrip "Alternate Names" <<EOT
In addition to the canonical mail name \`$mailname', you can
add any number of additional alternate names to recognize for receiving mail.
If other hosts are MXed to you for local mail, this is where you should list
-them. This list is saved into the file /etc/mail/sendmail.cw so it can be
-changed later as needed.
+them. This list is saved into the file @sysconfdir@/mail/local-host-names
+so it can be changed later as needed.
To answer this question, separate each alternate name with a space, or answer
\`NONE' to eliminate all alternate names.
EOT
-if [ -f /etc/mail/local-host-names ]; then
- cw_file="/etc/mail/local-host-names"
-else
- cw_file="/etc/mail/sendmail.cw"
- fi
+cw_file="@sysconfdir@/mail/local-host-names";
altnames=$(cat "$cw_file" 2>/dev/null | tr -s '\n \t' ' ' |
- sed -e 's/^ *//' -e 's/ *$//')
-input "Alternate names" altnames NONE
+ sed -e 's/^ *//' -e 's/ *$//');
+input "Alternate names" altnames NONE;
-if [ -n "$altnames" ]
-then
- echo "$altnames" | tr -s ' \t' '\n' >$cw_file
+if [ -n "$altnames" ]; then
+ echo "$altnames" | tr -s ' \t' '\n' >$cw_file;
else
- cat /dev/null >$cw_file
-fi
+ echo "localhost" >$cw_file;
+fi;
+ chown root:smmsp $cw_file;
+ chmod 0644 $cw_file;
-echo "FEATURE(use_cw_file)dnl" >&3
+echo "FEATURE(\`use_cw_file')dnl" >&3;
###############################################################################
@@ -380,30 +381,27 @@ using the -f option without generating a warning message. If you have
software such as Majordomo installed, you will want to include the usernames
from such software here. Note that "root", "daemon", and "uucp" are included
automatically and do not need to be specified. This list is saved into the
-file /etc/mail/sendmail.ct so it can be changed later as needed.
+file @sysconfdir@/mail/trusted-users so it can be changed later as needed.
To answer this question, separate each username with a space, or answer
\`NONE' to eliminate all usernames.
EOT
-if [ -f /etc/mail/trusted-users ]; then
- ct_file="/etc/mail/trusted-users"
-else
- ct_file="/etc/mail/sendmail.ct"
- fi
-
+ct_file="@sysconfdir@/mail/trusted-users";
trusted=$(cat "$ct_file" 2>/dev/null | tr -s '\n \t' ' ' |
- sed -e 's/^ *//' -e 's/ *$//')
-input "Trusted users" trusted NONE
+ sed -e 's/^ *//' -e 's/ *$//');
+input "Trusted users" trusted NONE;
-if [ -n "$trusted" ]
-then
- echo "$trusted" | tr -s ' \t' '\n' >$ct_file
+if [ -n "$trusted" ]; then
+ echo "$trusted" | tr -s ' \t' '\n' >$ct_file;
+ chown root:smmsp $ct_file;
+ chmod 0644 $ct_file;
else
- cat /dev/null >$ct_file
-fi
+ cat /dev/null >$ct_file;
+fi;
-echo "FEATURE(use_ct_file)dnl" >&3
+echo "FEATURE(\`use_ct_file')dnl" >&3;
+echo "FEATURE(\`use_ct_file')dnl" >> $SUBMIT_MC.new;
###############################################################################
@@ -413,10 +411,11 @@ If enabled, this feature will allow you to alias old names to
an error but indicating the recipient's new address.
EOT
-redirect="N"
-! testconfig "FEATURE(redirect)" || redirect="Y"
+redirect="N";
+! testconfig "FEATURE\(\`?redirect" || redirect="Y";
-! yesno "Enable redirect option" redirect || echo "FEATURE(redirect)dnl" >&3
+! yesno "Enable redirect option" redirect || \
+ echo "FEATURE(\`redirect')dnl" >&3;
###############################################################################
@@ -425,18 +424,21 @@ Sendmail can be configured to be smart about UUCP addresses, or it can do
nothing special with UUCP addresses at all. If you care about UUCP, you will
need to do some additional configuration, perhaps outside of this script.
-*** NOTE *** If you use a smart host, it is important that you say "Yes"
+*** NOTE *** If you use a smart host or do any kind of forwarding (ie
+LUSER_RELAY and LOCAL_RELAY), it is important that you say "Yes"
here to prevent a multi-level relay hole - unless you know for *SURE* that
your smart-host does not deal with UUCP addresses.
+
+(Be safe and just say Y)
EOT
-uucp="N"
-if [ -f $FILE ]
-then
- testconfig "FEATURE(nouucp)" || uucp="Y"
-fi
+uucp="Y";
+if [ -f $SENDMAIL_MC ]; then
+ testconfig "FEATURE\(\`?nouucp" || uucp="Y";
+fi;
-yesno "Enable UUCP addressing" uucp || echo "FEATURE(nouucp)dnl" >&3
+yesno "Enable UUCP addressing" uucp || \
+ echo "FEATURE(\`nouucp', \`reject')dnl" >&3;
###############################################################################
@@ -449,10 +451,11 @@ a distinct domain-wide namespace. If in doubt, it is safe to leave this
option disabled.
EOT
-sticky="N"
-! testconfig "FEATURE(stickyhost)" || sticky="Y"
+sticky="N";
+! testconfig "FEATURE\(\`?stickyhost" || sticky="Y";
-! yesno "Enable sticky host option" sticky || echo "FEATURE(stickyhost)dnl" >&3
+! yesno "Enable sticky host option" sticky || \
+ echo "FEATURE(\`stickyhost')dnl" >&3;
###############################################################################
@@ -461,15 +464,16 @@ If you are directly connected to the Internet and have access to a domain
name server, you should enable this option.
EOT
-dns="Y"
-! testconfig "FEATURE(nodns)" || dns="N"
+dns="Y";
+! testconfig "FEATURE\(\`?nodns" || dns="N";
+! testconfig "HACK\(\`?nodns" || dns="N";
-yesno "Enable DNS" dns || echo "FEATURE(nodns)dnl" >&3
+yesno "Enable DNS" dns || \
+ echo "HACK(\`nodns')dnl" >&3;
###############################################################################
-if [ Y = "$dns" ]
-then
+if [ Y = "$dns" ]; then
###############################################################################
@@ -482,30 +486,30 @@ MX records. If you have a wildcard MX record that matches your domain, you
cannot use this feature.
EOT
-bestmxlocal="N"
-! testconfig "FEATURE(bestmx_is_local)" || bestmxlocal="Y"
+bestmxlocal="N";
+! testconfig "FEATURE\(\`?bestmx_is_local" || bestmxlocal="Y";
-! yesno "Assume best MX is local" bestmxlocal ||
- echo "FEATURE(bestmx_is_local)dnl" >&3
+! yesno "Assume best MX is local" bestmxlocal || \
+ echo "FEATURE(\`bestmx_is_local')dnl" >&3;
###############################################################################
-fi # finished DNS configuration
+fi; # finished DNS configuration
###############################################################################
descrip "Mailertable" <<EOT
If enabled, this option causes sendmail to read mail routing rules from
-the text file /etc/mail/mailertable. This is needed for unusual mailers like
-ifmail and fax programs.
-More information is in /usr/share/doc/sendmail/op.txt.gz.
+the text file @sysconfdir@/mail/mailertable. This is needed for unusual mailers like
+ifmail and fax programs.
+More information is in @docdir@/sendmail-doc/op/op.txt.gz.
EOT
-mailertable="N"
-! testconfig "FEATURE(mailertable" || mailertable="Y"
+mailertable="N";
+! testconfig "FEATURE\(\`?mailertable" || mailertable="Y";
-! yesno "Enable the mailertable feature" mailertable ||
- echo "FEATURE(mailertable)dnl" >&3
+! yesno "Enable the mailertable feature" mailertable || \
+ echo "FEATURE(\`mailertable')dnl" >&3;
###############################################################################
@@ -517,11 +521,11 @@ in a special directory can be run. If you enable this option, please carefully
read the smrsh(8) man page for further information.
EOT
-smrsh="N"
-! testconfig "FEATURE(smrsh" || smrsh="Y"
+smrsh="Y";
+! testconfig "FEATURE\(\'?smrsh" || smrsh="Y";
-! yesno "Use the Sendmail Restricted Shell (smrsh)" smrsh ||
- echo "FEATURE(smrsh, \`/usr/lib/sm.bin/smrsh')dnl" >&3
+! yesno "Use the Sendmail Restricted Shell (smrsh)" smrsh || \
+ echo "FEATURE(\`smrsh', \`@libexecdir@/smrsh')dnl" >&3;
###############################################################################
@@ -531,14 +535,14 @@ Usually this is \`MAILER-DAEMON' but it would not be unreasonable to change
it to something such as \`postmaster'.
EOT
-daemon="MAILER-DAEMON"
-! testconfig "confMAILER_NAME" ||
- daemon=$(echo -n "$CONFIG" | sed -e 's/[^,]*, *`\([^'"'"']*\).*/\1/')
+daemon="MAILER-DAEMON";
+! testconfig "define\(\`?confMAILER_NAME" ||
+ daemon=$(echo -n "$CONFIG" | sed -e 's/[^,]*, *`\([^'"'"']*\).*/\1/');
-input "Mailer name" daemon
+input "Mailer name" daemon;
test "MAILER-DAEMON" = "$daemon" ||
- echo "define(\`confMAILER_NAME', \`$daemon')dnl" >&3
+ echo "define(\`confMAILER_NAME', \`$daemon')dnl" >&3;
###############################################################################
@@ -547,11 +551,11 @@ Sendmail normally excludes the sender address from group expansion. Enabling
this option will cause the sender to be included.
EOT
-metoo="N"
-! testconfig "confME_TOO.*True" || metoo="Y"
+metoo="N";
+! testconfig "define\(\`?confME_TOO.*True" || metoo="Y";
! yesno "Enable me too option" metoo ||
- echo "define(\`confME_TOO', True)dnl" >&3
+ echo "define(\`confME_TOO', True)dnl" >&3;
###############################################################################
@@ -566,68 +570,79 @@ notifications are sent. Sendmail's defaults are 4 hours and 5 days (4h/5d),
respectively, but many people feel warnings after only 4 hours are premature.
EOT
-qw="4h"
-! testconfig "confTO_QUEUEWARN" ||
- qw=$(echo -n "$CONFIG" | sed -e 's/[^,]*, *`\([^'"'"']*\).*/\1/')
+qw="4h";
+! testconfig "define\(\`?confTO_QUEUEWARN" ||
+ qw=$(echo -n "$CONFIG" | sed -e 's/[^,]*, *`\([^'"'"']*\).*/\1/');
-qr="5d"
-! testconfig "confTO_QUEUERETURN" ||
- qr=$(echo -n "$CONFIG" | sed -e 's/[^,]*, *`\([^'"'"']*\).*/\1/')
+qr="5d";
+! testconfig "define\(\`?confTO_QUEUERETURN" ||
+ qr=$(echo -n "$CONFIG" | sed -e 's/[^,]*, *`\([^'"'"']*\).*/\1/');
-timeouts="$qw/$qr"
+timeouts="$qw/$qr";
-input "Message timeouts" timeouts
+input "Message timeouts" timeouts;
-qw=$(expr "$timeouts" : '\([^/]*\)/')
-qr=$(expr "$timeouts" : '[^/]*/\(.*\)')
+qw=$(expr "$timeouts" : '\([^/]*\)/');
+qr=$(expr "$timeouts" : '[^/]*/\(.*\)');
-test "4h" = "$qw" || echo "define(\`confTO_QUEUEWARN', \`$qw')dnl" >&3
-test "5d" = "$qr" || echo "define(\`confTO_QUEUERETURN', \`$qr')dnl" >&3
+test "4h" = "$qw" || echo "define(\`confTO_QUEUEWARN', \`$qw')dnl" >&3;
+test "5d" = "$qr" || echo "define(\`confTO_QUEUERETURN', \`$qr')dnl" >&3;
+
+###############################################################################
+# Support dialup configuration
+cat <<-EOT >&3
+dnl #
+dnl # Dialup/LAN connection overrides
+dnl #
+include(\`@sysconfdir@/mail/dialup.m4')dnl
+include(\`@sysconfdir@/mail/provider.m4')dnl
+dnl #
+EOT
###############################################################################
echo "MAILER_DEFINITIONS" >&3
echo "MAILER(local)dnl" >&3
-test "N" = "$smtp" || echo "MAILER(smtp)dnl" >&3
+test "N" = "$smtp" || echo "MAILER(smtp)dnl" >&3;
###############################################################################
if [ -e /etc/ifmail/config ] && \
- [ -e /usr/share/sendmail/sendmail.cf/mailer/ifmail.m4 ];
+ [ -e @datadir@/sendmail/cf/mailer/ifmail.m4 ];
then
- echo "MAILER(ifmail)dnl" >&3
-fi
+ echo "MAILER(ifmail)dnl" >&3;
+fi;
###############################################################################
-fi # finished non-"null client" configuration
+fi; # finished non-"null client" configuration
###############################################################################
-echo "" >&3
-echo "LOCAL_CONFIG" >&3
-if [ -z $nullclient ]; then
- echo "MASQUERADE_AS($mailname)dnl" >&3
- fi
+echo "" >&3;
+echo "LOCAL_CONFIG" >&3;
+#if [ -z $nullclient ]; then
+# echo "MASQUERADE_AS($mailname)dnl" >&3
+# fi
-if [ -f $FILE ]; then
- sed -n -e '/^## Custom/,$p' $FILE >&3
+if [ -f $SENDMAIL_MC ]; then
+ sed -n -e '/^## Custom/,$p' $SENDMAIL_MC >&3;
else
- echo "## Custom configurations below (will be preserved)" >&3
-fi
+ echo "## Custom configurations below (will be preserved)" >&3;
+fi;
descrip "Configuration Complete" <<EOT
Advanced configuration, such as alternate mailers, the use of mailertables,
Bitnet domains, and UUCP domains can be accomplished by manually editing the
-/etc/mail/sendmail.mc configuration file and rerunning
-\`$0' to generate the appropriate /etc/mail/sendmail.cf
-file. (Local changes made at the end of /etc/mail/sendmail.mc will be
-preserved by \`$0'.)
+$SENDMAIL_MC configuration file and rerunning
+\`$0' to generate the appropriate @sysconfdir@/mail/sendmail.cf
+file. (Local changes made at the end of $SENDMAIL_MC
+will be preserved by \`$0'.)
The m4 library files for sendmail configuration are kept in the
-/usr/share/sendmail/sendmail.cf directory. You may wish to review the
-documentation in /usr/share/doc/sendmail to assist in further customization.
+@datadir@/sendmail/cf directory. You may wish to review the
+documentation in @docdir@/sendmail to assist in further customization.
You may wish to customize your alias database; see the aliases(5) man page
for information on the format and use of the /etc/aliases file.
@@ -635,16 +650,22 @@ EOT
###############################################################################
-exec 3>&-
-
-if [ -f $FILE ]
-then
- echo "Saving old /etc/mail/sendmail.mc as /etc/mail/sendmail.mc.old ..."
- mv -f $FILE $FILE.old
-fi
-
-mv -f $FILE.new $FILE
-trap 0
-
-makecf
-exit 0
+exec 3>&-;
+
+if [ -f $SENDMAIL_MC ];then
+ echo "Saving old $SENDMAIL_MC as $SENDMAIL_MC.old ...";
+ mv -f $SENDMAIL_MC $SENDMAIL_MC.old;
+ fi;
+
+chown root:smmsp $SENDMAIL_MC.new;
+chmod 0644 $SENDMAIL_MC.new;
+mv -f $SENDMAIL_MC.new $SENDMAIL_MC;
+if [ ! -f @datadir@/sendmail/cf/feature/msp.m4 ]; then
+ chown root:smmsp $SUBMIT_MC.new;
+ chmod 0644 $SUBMIT_MC.new;
+ mv -f $SUBMIT_MC.new $SUBMIT_MC;
+ fi;
+trap 0;
+
+makecf;
+exit 0;
diff --git a/debian/local/sensible-mda.c b/debian/local/sensible-mda.c
deleted file mode 100644
index d42b0cb..0000000
--- a/debian/local/sensible-mda.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * sensible-mda.c
- * Copyright (c) 1998, Johnie Ingram.
- * Copyright (c) 1998, Richard Nelson <cowboy@debian.org>.
- * Time-stamp: <1998/08/13 10:00:00 cowboy>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <pwd.h>
-#include <sys/types.h>
-
-// TODO: declare -x TCPREMOTEIP="$3"
-
-#define PROCMAIL "/usr/bin/procmail"
-#define DELIVER "/usr/bin/deliver"
-#define PROCMAILRCS "/etc/procmailrcs/"
-
-static void help(void);
-static unsigned char program[64];
-
-static struct stat MDA_stat;
-static struct stat procmailrc_stat;
-static int done = 1;
-static struct passwd* passwd_entry;
-
-int
-main (int argc, char *argv[])
-{
-
- char *procmailrc;
-
- /*----------------------------------------------------------------*/
- /* Parse input to determine to whom to speak and who we are... */
- /* Must have at least three parameters unless first is ?,-?,/?. */
- /*----------------------------------------------------------------*/
- (void) strcpy(program, argv[0]);
- if (argc >= 2 &&
- (strcmp(argv[1],"?") == 0 || strcmp(argv[1],"-?") == 0 ||
- strcmp(argv[1],"/?") == 0 || strcmp(argv[1],"\\?") == 0 ||
- strcmp(argv[1],"-h") == 0 || strcmp(argv[1],"--help") == 0)) {
- help();
- return (0);
- }
- if (argc < 3) {
- (void)printf("%s - Required parameters elided.\n",program);
- help();
- return (0);
- }
-
-
- if (!stat(PROCMAIL, &MDA_stat)) {
- if (MDA_stat.st_mode & S_ISUID) {
- procmailrc=malloc(strlen(PROCMAILRCS)+strlen(argv[2])+1);
- sprintf(procmailrc,"%s%s",PROCMAILRCS,argv[2]);
- passwd_entry=getpwnam(argv[2]);
- /*
- * If argv[2] is a valid user &
- * /etc/procmailrcs/argv[2] exists & is owned by argv[2]
- */
- if (passwd_entry &&
- !stat(procmailrc, &procmailrc_stat) &&
- procmailrc_stat.st_uid==passwd_entry->pw_uid) {
- done = 0;
- execl (PROCMAIL, PROCMAIL, "-t",
- "-f", argv[1], "-m", procmailrc, "-a", argv[3], NULL);
- } else {
- done = 0;
- execl (PROCMAIL, PROCMAIL, "-t",
- "-f", argv[1], "-a", argv[3], "-d", argv[2], NULL);
- }
- }
- else
- fprintf(stderr, "Ack!?! %s is not setuid!\n", PROCMAIL);
- }
-
- if (done && !stat(DELIVER, &MDA_stat)) {
- if (MDA_stat.st_mode & S_ISUID) {
- done = 0;
- execl (DELIVER, DELIVER, "-r", argv[1], argv[2], NULL);
- }
- else
- fprintf(stderr, "Ack!?! %s is not setuid!\n", DELIVER);
- }
-
- fprintf (stderr, "Huh? Neither %s nor %s was found (or was suid)!\n",
- PROCMAIL, DELIVER);
-
- return (75);
-}
-
-
-/*-------------------------------------------------------------------*/
-/* Help... */
-/*-------------------------------------------------------------------*/
-static void help(void)
-{
- (void)printf("\n%s - Help information.\n"
- "%s: sendmail MTA->MDA wrapper, supporting these MDAs:\n"
- "\tprocmail, deliver\n"
- "\n"
- "Syntax: %s from to\n"
- ,program, program, program
- );
- return;
-}
-
diff --git a/debian/local/site.config.m4.in b/debian/local/site.config.m4.in
deleted file mode 100644
index b2eab3e..0000000
--- a/debian/local/site.config.m4.in
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Debian site config file for building sendmail
-#
-# src
-APPENDDEF(`confENVDEF', `-DTCPWRAPPERS=1')dnl
-APPENDDEF(`confENVDEF', `-D_PATH_VARTMP=\"/var/lib/sendmail/\"')dnl
-APPENDDEF(`confENVDEF', `-DPICKY_HELO_CHECK')dnl
-APPENDDEF(`confENVDEF', `-D_PATH_SENDMAILCF=\"/etc/mail/sendmail.cf\"')dnl
-# src - mime header size (pine, etc. exploit)
-APPENDDEF(`confENVDEF', `-D_FFR_MAX_MIME_HEADER_LENGTH=1')dnl
-# src - header length DOS
-APPENDDEF(`confENVDEF', `-D_FFR_MAX_HEADERS_LENGTH=1')
-# src - For Future Reference... undocumented niceties
-dnl APPENDDEF(`confENVDEF', `-include ../../debian/el33t.h')dnl
-APPENDDEF(`confENVDEF', `-D_FFR_DSN_RRT_OPTION=1')dnl
-APPENDDEF(`confENVDEF', `-D_FFR_PIDFILE_OPTION=1')dnl
-APPENDDEF(`confENVDEF', `-D_FFR_DEADLETTERDROP_OPTION=1')dnl
-#
-# smrsh
-APPENDDEF(`confENVDEF', `-DCMDDIR=\"/usr/lib/sm.bin\"')dnl
-APPENDDEF(`confENVDEF', `-DPATH=\"/usr/bin:/bin\"')dnl
-#
-# rmail
-APPENDDEF(`confENVDEF', `-D_PATH_SENDMAIL=\"/usr/sbin/sendmail\"')dnl
-#
-# compilation
-define(`confCC', `gcc')dnl
-define(`confOPTIMIZE', `-O0 -g -Wall')dnl
-#
-# Database maps, based upon presence of NISPLUS from autoconf
-define(`ac_cv_header_rpcsvc_nis_h', `@ac_cv_header_rpcsvc_nis_h@')dnl
-ifelse(ac_cv_header_rpcsvc_nis_h, `yes',
- `define(`confMAPDEF', `-DNEWDB -DMAP_REGEX -DNIS -DNISPLUS')',
- `define(`confMAPDEF', `-DNEWDB -DMAP_REGEX -DNIS')'
- )dnl
-#
-# paths, owners, and modes
-define(`confEBINDIR', `/usr/lib/sm.bin')dnl #mail.local,smrsh,etc.
-define(`confHDIR', `/usr/lib')dnl
-define(`confHFDIR', `/usr/share/sendmail')dnl
-define(`confMANROOT', `/usr/share/man/man')dnl
-define(`confMANOWN', `root')dnl
-define(`confMANGRP', `root')dnl
-define(`confMANMODE', `0744')dnl
-define(`confMBINDIR', `/usr/sbin')dnl #MTA dir
-define(`confSBINDIR', `/usr/sbin')dnl #root dir
-define(`confSBINOWN', `root')dnl
-define(`confSBINGRP', `mail')dnl
-define(`confSBINMODE', `07555')dnl
-define(`confSTDIR', `/var/lib/sendmail')dnl
-define(`confUBINDIR', `/usr/bin')dnl #usr dir
-define(`confUBINOWN', `root')dnl
-define(`confUBINGRP', `mail')dnl
-define(`confUBINMODE', `0755')dnl
-#
-# don't install man pages
-define(`confNO_MAN_INSTALL', `true')dnl
-#
-# flags
diff --git a/debian/socks_wrapper b/debian/local/socks_wrapper
index ad89379..ad89379 100644
--- a/debian/socks_wrapper
+++ b/debian/local/socks_wrapper
diff --git a/debian/local/update_auth.in b/debian/local/update_auth.in
new file mode 100644
index 0000000..558c8b1
--- /dev/null
+++ b/debian/local/update_auth.in
@@ -0,0 +1,250 @@
+#!/bin/sh -e
+#-----------------------------------------------------------------------------
+#
+# $Sendmail: update_auth,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Sendmail support for SMTP AUTH (SASL)
+#
+# Copyright (c) 2000-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# Notes:
+#
+#-----------------------------------------------------------------------------
+set -e;
+
+NEW=0;
+DEFAULT=0;
+HOSTNAME=`hostname -s`;
+HOSTFQDN=`hostname -f`;
+DOMAINNAME=`hostname -d`;
+SMUID=sendmail;
+SMAID=sendmail;
+SMPWD=sendmailpwd;
+SMRLM=$HOSTNAME.$DOMAINNAME;
+
+# Check if SASL is installed
+if [ -d /usr/lib/sasl2 -a @sm_version_math@ -ge 527364 ]; then
+ SASLDBLISTUSERS='/usr/sbin/sasldblistusers2';
+ SASLPASSWD='/usr/sbin/saslpasswd2';
+ SASLLIB='/usr/lib/sasl2';
+ SASLSO='2';
+ SASLDB='/etc/sasldb2';
+ SASL_BIN='sasl2-bin';
+ echo " SASL V2 not supported for the nonce, checking for SASL V1";
+ fi;
+if [ -d /usr/lib/sasl ]; then
+ SASLDBLISTUSERS='/usr/sbin/sasldblistusers';
+ SASLPASSWD='/usr/sbin/saslpasswd';
+ SASLLIB='/usr/lib/sasl';
+ SASLSO='1';
+ SASLDB='/etc/sasldb';
+ SASL_BIN='sasl-bin';
+else
+ cat <<-EOT
+
+ SASL not installed, not configuring sendmail support.
+
+ To install sasl, get sasl-bin, libsasl-modules-plain,
+ libsasl-digestmd5-plain or libsasl-digestmd5-des.
+
+ To enable sendmail SASL support at a later date, invoke "$0"
+
+ EOT
+ exit 0;
+ fi;
+
+# Check for sasl-bin (wherein resides saslpasswd)
+if [ ! -x ${SASLPASSWD} ]; then
+ cat <<-EOT
+ ${SASL_BIN} not installed, not configuring sendmail support.
+
+ To enable sendmail SASL support at a later date, invoke "$0"
+
+ EOT
+ exit 0;
+ fi;
+#echo " ";
+#echo "Creating/Updating SASL information";
+
+# See if we need to rename an existing SASL info file
+if [ -f @sysconfdir@/mail/auth-info -a \
+ ! -f @sysconfdir@/mail/default-auth-info ]; then
+ mv @sysconfdir@/mail/auth-info \
+ @sysconfdir@/mail/default-auth-info;
+ fi;
+
+# Create Default SASL auth information
+if [ ! -f @sysconfdir@/mail/default-auth-info ]; then
+ cat <<-EOT > @sysconfdir@/mail/default-auth-info
+ $SMUID
+ $SMAID
+ $SMPWD
+ $SMRLM
+ EOT
+
+# Use exisisting SASL auth information
+else
+ SMUID=$(head -n1 @sysconfdir@/mail/default-auth-info);
+ SMAID=$(head -n2 @sysconfdir@/mail/default-auth-info | tail -n1 -);
+ SMPWD=$(head -n3 @sysconfdir@/mail/default-auth-info | tail -n1 -);
+ SMRLM=$(head -n4 @sysconfdir@/mail/default-auth-info | tail -n1 -);
+ fi;
+
+# Check for default settings, used in later test
+if [ "$SMUID" = 'sendmail' ] \
+&& [ "$SMAID" = 'sendmail' ] \
+&& [ "$SMPWD" = 'sendmailpwd' ]; then
+ DEFAULT=1;
+ fi;
+
+# Create any missing SASL configuration files
+if [ -d ${SASLLIB} ]; then
+ # SASL password configuration
+ if [ ! -f ${SASLLIB}/saslpasswd.conf ]; then
+ NEW=1;
+ cp @datadir@/sendmail/examples/sasl/saslpasswd.conf \
+ ${SASLLIB}/saslpasswd.conf;
+ fi;
+ chown root:root ${SASLLIB}/saslpasswd.conf;
+ chmod 0640 ${SASLLIB}/saslpasswd.conf;
+
+ # Sendmail SASL configuration
+ if [ ! -L ${SASLLIB}/Sendmail.conf ]; then
+ if [ -f ${SASLLIB}/Sendmail.conf ]; then
+ mv ${SASLLIB}/Sendmail.conf @sysconfdir@/mail/sasl/Sendmail.conf;
+ fi;
+ ln -sf @sysconfdir@/mail/sasl/Sendmail.conf \
+ ${SASLLIB}/Sendmail.conf;
+ fi;
+
+ # Make sure libraries are properly installed...
+ ( cd ${SASLLIB} && \
+ if [ -L libanonymous.so.${SASLSO} -a ! -L libanonymous.so ]; then \
+ ln -s libanonymous.so.${SASLSO} libanonymous.so; \
+ fi; \
+ if [ -L libcrammd5.so.${SASLSO} -a ! -L libcrammd5.so ]; then \
+ ln -s libcrammd5.so.${SASLSO} libcrammd5.so; \
+ fi; \
+ if [ -L libdigestmd5.so.${SASLSO} -a ! -L libdigestmd5.so ]; then \
+ ln -s libdigestmd5.so.${SASLSO} libdigestmd5.so; \
+ fi; \
+ if [ -L libdigestmd5.so.0 -a ! -L libdigestmd5.so ]; then \
+ ln -s libdigestmd5.so.0 libdigestmd5.so; \
+ fi; \
+ if [ -L libgssapiv2.so.${SASLSO} -a ! -L libgssapiv2.so ]; then \
+ ln -s libgssapiv2.so.${SASLSO} libgssapiv2.so; \
+ fi; \
+ if [ -L liblogin.so.${SASLSO} -a ! -L liblogin.so ]; then \
+ ln -s liblogin.so.${SASLSO} liblogin.so; \
+ fi; \
+ if [ -L liblogin.so.0 -a ! -L liblogin.so ]; then \
+ ln -s liblogin.so.0 liblogin.so; \
+ fi; \
+ if [ -L libplain.so.${SASLSO} -a ! -L libplain.so ]; then \
+ ln -s libplain.so.${SASLSO} libplain.so; \
+ fi; )
+ fi;
+
+# Create/update sendmail SASL files
+if [ ! -f @sysconfdir@/mail/sasl/Sendmail.conf ]; then
+ NEW=1;
+ cp @datadir@/sendmail/examples/sasl/Sendmail.conf \
+ @sysconfdir@/mail/sasl/Sendmail.conf;
+ fi;
+chown root:smmsp @sysconfdir@/mail/sasl/Sendmail.conf;
+chmod 0640 @sysconfdir@/mail/sasl/Sendmail.conf;
+
+# Recommend PAM for sendmail authorization
+if ! grep -qEe "^[[:space:]]*pwcheck_method:[[:space:]]*PAM" \
+ ${SASLLIB}/Sendmail.conf; then
+ cat <<-EOT
+
+ It is *strongly* recommended that you use PAM as the authentication
+ method for sendmail via SASL. Doing so will allow *all* your shell
+ users (those with an /etc/passwd entry) to automagically authenticate
+ themselves when using a MUA with SASL support turned on.
+
+ Do you wish to use PAM (Y|n)?
+ EOT
+ read yn;
+ yn=$(echo -n "$yn" | sed -e "s/^\ *//" -e "s/^\t*//");
+ test -n "$yn" || yn="Y";
+ case "$yn" in
+ [Yy]*)
+ if grep -qEe '^[[:space:]]*pwcheck_method:' \
+ @sysconfdir@/mail/sasl/Sendmail.conf; then
+ sed -e \
+ 's?^[[:space:]]*pwcheck_method:.*$?pwcheck_method: PAM?' \
+ @sysconfdir@/mail/sasl/Sendmail.conf \
+ > @sysconfdir@/mail/sasl/Sendmail.conf.new;
+ else
+ echo 'pwcheck_method: PAM' \
+ | cat @sysconfdir@/mail/sasl/Sendmail.conf - \
+ > @sysconfdir@/mail/sasl/Sendmail.conf.new;
+ fi;
+ if [ -f @sysconfdir@/mail/sasl/Sendmail.conf.new ]; then
+ chown root:smmsp @sysconfdir@/mail/sasl/Sendmail.conf.new;
+ chmod 0644 @sysconfdir@/mail/sasl/Sendmail.conf.new;
+ mv @sysconfdir@/mail/sasl/Sendmail.conf.new \
+ @sysconfdir@/mail/sasl/Sendmail.conf;
+ fi;
+ ;;
+ esac;
+ fi;
+
+# Make sure default-auth-info is secure
+if [ -f @sysconfdir@/mail/default-auth-info ]; then
+ chown root:smmsp @sysconfdir@/mail/default-auth-info;
+ chmod 0640 @sysconfdir@/mail/default-auth-info;
+ fi;
+
+# Create skeleton file, the saslpasswd command will get a failure ;-{
+if [ ! -f ${SASLDB} ]; then
+ NEW=1;
+ if [ -x ${SASLPASSWD} ]; then
+ ${SASLDBLISTUSERS} 1>/dev/null 2>&1 || true;
+ echo "$SMPWD" | ${SASLPASSWD} -p -c -u $SMRLM $SMAID \
+ 1>/dev/null 2>&1 || true;
+ chown root:smmsp ${SASLDB};
+ chmod 0660 ${SASLDB};
+ else
+ echo "*** You do not have the sasl-bin package installed!";
+ echo "*** Please install it and rerun $0";
+ echo "*** Sendmail can't use SASL until this is done...";
+ fi;
+ fi;
+
+# Set SMTP auth password
+if [ -x ${SASLPASSWD} ]; then
+ if [ $DEFAULT = 0 ]; then
+ echo "$SMPWD" | ${SASLPASSWD} -p -c -u $SMRLM $SMAID || true;
+ else
+ ${SASLPASSWD} -d -u $SMRLM $SMAID 1>/dev/null 2>&1 || true;
+ fi;
+ fi;
+
+# For sendmail, /etc/sasldb must be 0600 or (0640/0660 w/dontblamesendmail)
+if [ -f ${SASLDB} ]; then
+ find ${SASLDB} -gid 0 -print | xargs -r chown root:smmsp;
+ find ${SASLDB} -gid 8 -print | xargs -r chown root:smmsp;
+ find ${SASLDB} -group smmsp -print | xargs -r chmod g+rw;
+ chmod g-x,o-rwx ${SASLDB};
+ fi;
+
+# Tell them about the new wizbang features...
+if [ $NEW -eq 1 ]; then
+ cat <<-EOT
+
+ SASL is now minimally setup, there are a few ways to handle users:
+ *) Allow only shell users (default)
+ You're all set, nothing else to do !
+ *) Allow users other than shell
+ Add users via /usr/sbin/saslpasswd and make sure that the
+ realm you used matches what your users specify in their
+ netscape/outlook/mutt/etc profiles.
+
+ If you need to authorize sendmail as a sender, also update
+ @sysconfdir@/mail/default-auth-info and rerun $0.
+
+ EOT
+ fi;
diff --git a/debian/local/update_conf.in b/debian/local/update_conf.in
new file mode 100644
index 0000000..330a97a
--- /dev/null
+++ b/debian/local/update_conf.in
@@ -0,0 +1,1140 @@
+#!/usr/bin/perl -w
+#------------------------------------------------------------------------
+#
+# $Sendmail: update_conf,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Parse and update /etc/mail/sendmail.conf and reflect its values in
+# /etc/cron.d/sendmail and /etc/inetd.conf.
+#
+# Copyright (c) 2001-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+#------------------------------------------------------------------------
+#
+use strict; # be kosher
+use Cwd; # provide cwd()
+use Env; # A few environmental references
+use integer; # Peformance
+use Sys::Hostname; # make sure we have a valid hostname
+use Getopt::Long; # parameter handling
+use FileHandle; # I/O
+
+# Local libraries - for Debian Sendmail Perl helper functions
+# BEGIN { $main::my_path = substr($0,$[,rindex($0,'/')) };
+use lib ('.', substr($0,$[,rindex($0,'/')), "@datadir@/sendmail");
+require Parse_mc;
+
+$main::program_name = $0; #'update_conf';
+$main::program_version = '@sm_version@';
+$main::program_date = '@sm_date@ @sm_time@ cowboy';
+my $interp_pgm = "$^X";
+my $interp_vrm = $];
+$interp_vrm = ("$^V" | '000') if (defined $^V);
+my $current_time = scalar localtime;
+my $user = getlogin || (getpwuid($<))[0] || "Unknown!!";
+my $hostname = hostname();
+my $directory = cwd();
+
+my $conffile = "@sysconfdir@/mail/sendmail.conf";
+my $output_file = '';
+my $ofh = new FileHandle;
+my $debug = 0;
+my $result;
+
+#
+#------------------------------------------------------------------------------
+# Global variables
+#------------------------------------------------------------------------------
+my %parm_def;
+my %parameter;
+my %parm_kw;
+my %parm_bool;
+my %parm_deprecated;
+my %parm_hidden;
+
+#
+#------------------------------------------------------------------------------
+# Finally, some code (almost)
+#------------------------------------------------------------------------------
+
+#
+# Argument handling...
+$main::opt_help='';
+$main::opt_output_file='';
+$main::opt_input_file='';
+$main::opt_debug='';
+my @options = qw(
+ help|h
+ output-file|output_file|o:s
+ input-file|input_file|i:s
+ debug!
+ );
+$result = GetOptions(@options);
+if ( ! $result ) {
+ die "Terminating due to parameter error";
+ };
+if ( $main::opt_help ) {
+ warn "$main::program_name $main::program_version $main::program_date\n";
+ warn "$0 \n";
+ warn " -help\n" if $main::opt_help;
+ warn " -debug\n" if $main::opt_debug;
+ warn " -o $main::opt_output_file\n" if $main::opt_output_file;
+ warn " -i $main::opt_input_file\n" if $main::opt_input_file;
+ exit 0;
+ };
+
+$output_file = $main::opt_output_file if ($main::opt_output_file);
+my $input_file = $main::opt_input_file || $conffile;
+# $main::debug is used in Parse_mc !
+$main::debug = $main::opt_debug || '';
+$debug = $main::debug;
+
+# Obtain default values
+&set_defaults;
+
+# Update defaults according to current environment
+&update_defaults;
+
+# Read /etc/mail/sendmail.conf (if extant)
+&read_config;
+
+# Make sure things are kosher
+my $ok = &validate_config;
+if (! $ok) {
+ die "Terminating due to configuration error.";
+ };
+
+# [Re]write /etc/mail/sendmail.config
+&write_config;
+if ( $output_file eq '' ) {
+ chown '0', '0', $conffile;
+ chmod 0644, $conffile;
+ };
+
+# Reflect settings in /etc/cron.d/sendmail
+&write_crontab;
+if ( $output_file eq '' ) {
+ chown '0', '0', "@sysconfdir@/cron.d/sendmail";
+ chmod 0644, "@sysconfdir@/cron.d/sendmail";
+ };
+
+# Reflect settings in /etc/inetd.conf
+&update_inetd;
+
+# Create/Delete files
+&update_files;
+
+exit (0);
+
+#
+#------------------------------------------------------------------------
+# Set global values
+#------------------------------------------------------------------------
+sub set_defaults {
+
+ %parm_def = (
+ 'DAEMON_MODE' => 'Daemon'
+ ,'DAEMON_PARMS' => ''
+ ,'DAEMON_HOSTSTATS' => 'No'
+ ,'DAEMON_MAILSTATS' => 'No'
+ ,'QUEUE_MODE' => '${DAEMON_MODE}'
+ ,'QUEUE_INTERVAL' => '10'
+ ,'QUEUE_PARMS' => ''
+ ,'MSP_MODE' => 'Cron'
+ ,'MSP_INTERVAL' => '${QUEUE_INTERVAL}'
+ ,'MSP_PARMS' => '${QUEUE_PARMS}'
+ ,'MSP_MAILSTATS' => '${DAEMON_MAILSTATS}'
+ ,'MISC_PARMS' => ''
+ ,'CRON_MAILTO' => 'root'
+ ,'CRON_PARMS' => ''
+ ,'AGE_DATA' => ''
+ );
+
+ %parameter = %parm_def;
+
+ %parm_kw = (
+ 'DAEMON_MODE' => ['daemon', 'inetd']
+ ,'QUEUE_MODE' => ['daemon', 'cron']
+ ,'MSP_MODE' => ['daemon', 'cron', 'none']
+ );
+
+ %parm_bool = (
+ 'DAEMON_HOSTSTATS' => 1
+ ,'DAEMON_MAILSTATS' => 1
+ ,'MSP_MAILSTATS' => 1
+ );
+
+ %parm_deprecated = (
+ 'DAEMON_STATS' => 'DAEMON_MAILSTATS'
+ ,'MSP_STATS' => 'MSP_MAILSTATS'
+ );
+
+ %parm_hidden = (
+ 'prefix' => 1
+ ,'exec_prefix' => 1
+ ,'bindir' => 1
+ ,'sbindir' => 1
+ ,'libexecdir' => 1
+ ,'datadir' => 1
+ ,'sysconfdir' => 1
+ ,'sharedstatedir' => 1
+ ,'localstatedir' => 1
+ ,'libdir' => 1
+ ,'MTA_DAEMON' => 1
+ ,'MTA_COMMAND' => 1
+ ,'MTA_L' => 1
+ ,'MTA_L_QUEUE' => 1
+ ,'MTA_ROOT' => 1
+ ,'MTA_PIDFILE' => 1
+ ,'MSP_DAEMON' => 1
+ ,'MSP_COMMAND' => 1
+ ,'MSP_L' => 1
+ ,'MSP_L_QUEUE' => 1
+ ,'MSP_ROOT' => 1
+ ,'MSP_PIDFILE' => 1
+ );
+
+ };
+
+#
+#------------------------------------------------------------------------
+# Update default settings according to current environment
+#------------------------------------------------------------------------
+sub update_defaults {
+ my ($class, $flags, $files, $options);
+ my ($ok, $stats);
+ my $file;
+
+ # Obtain entry for HOST_STATUS_DIRECTORY
+ ($class, $flags, $files, $options) =
+ &Parse_mc::entry_dbs('confHOST_STATUS_DIRECTORY');
+ $file = @{$files}[0];
+ if ( $file ne '-' and -d $file ) {
+ $parameter{'DAEMON_HOSTSTATS'} = 'Yes';
+ }
+ else {
+ $parameter{'DAEMON_HOSTSTATS'} = 'No';
+ };
+
+ # Obtain entry for STATUS_FILE
+ ($class, $flags, $files, $options) =
+ &Parse_mc::entry_dbs('STATUS_FILE');
+ $file = @{$files}[0];
+ if ( $file ne '-' and -e $file ) {
+ $parameter{'DAEMON_MAILSTATS'} = 'Yes';
+ }
+ else {
+ $parameter{'DAEMON_MAILSTATS'} = 'No';
+ };
+
+ # Obtain entry for MSP_STATUS_FILE
+ ($class, $flags, $files, $options) =
+ &Parse_mc::entry_dbs('MSP_STATUS_FILE');
+ $file = @{$files}[0];
+ if ( $file ne '-' and -e $file ) {
+ $parameter{'MSP_MAILSTATS'} = 'Yes';
+ }
+ else {
+ $parameter{'MSP_MAILSTATS'} = 'No';
+ };
+
+ };
+
+#
+#------------------------------------------------------------------------
+# Obtain parameter name
+#------------------------------------------------------------------------
+sub get_name {
+ my ($name, $quiet) = @_;
+
+ # Handle deprecated/renamed variables
+ if ( exists($parm_deprecated{$name}) ) {
+ print STDERR "$name is deprecated."
+ if ($debug and ! $quiet);
+ if ( $parm_deprecated{$name} ) {
+ print STDERR " Please use $parm_deprecated{$name} instead.\n"
+ if ($debug and ! $quiet);
+ $name = $parm_deprecated{$name};
+ }
+ else {
+ print STDERR " It will be ignored.\n"
+ if ($debug and ! $quiet);
+ };
+ };
+
+ return $name;
+ };
+#
+#------------------------------------------------------------------------
+# Obtain value directly, or indirectly
+#------------------------------------------------------------------------
+sub get_value {
+ my ($name) = get_name(@_, '');
+ my $value = $parameter{$name};
+
+ my $tval = $value;
+ $tval =~ s/^\s*//;
+ my $ok = 1;
+ my $default = 0;
+
+ # Dereference loop... keep original value if we get any errors...
+ Dereference:;
+ if ($tval =~ /^\$/) {
+ my @ref_stack = ($name);
+ my %ref_hash = ($name => 1);
+ while ($tval =~ /^\$/ and $ok) {
+ my $start = 1;
+ my $del = 1;
+ my $char = substr($tval, 1, 1);
+ if ( $char eq '{' or $char eq '(' ) {
+ $start += 1; $del += 2;
+ };
+ my $ref = get_name(substr($tval, $start,
+ length($tval)-$del), '');
+ push @ref_stack, $ref;
+ if (exists($ref_hash{$ref})) {
+ print STDERR "Go directly to jail; do not pass go, ",
+ "do not collect \$200\n";
+ print STDERR " Reference loop: ",
+ join('->', @ref_stack, '...'),"\n";
+ $ok = 0;
+ }
+ else {
+ $ref_hash{$ref} = 1;
+ if (lc $ref eq 'default') {
+ $tval = $parm_def{$name};
+ print STDERR
+ "Setting $name to default value: ",
+ "$parm_def{$name}.\n"
+ if ($debug);
+ }
+ elsif (exists($parameter{$ref})) {
+ $tval = $parameter{$ref};
+ print STDERR
+ "Setting $name to value of $ref: $tval.\n"
+ if ($debug);
+ }
+ else {
+ print STDERR
+ "Can't deference $ref, doesn't exist.\n";
+ $ok = 0;
+ };
+ };
+ };
+ };
+
+ if ( $ok ) {
+ # Check keyword parms for valid values
+ if (exists $parm_kw{$name}) {
+ my @ltval = split(/\s/,$tval);
+ my $ltval = lc @ltval[$[];
+ my $found = "";
+ foreach my $value (@{$parm_kw{$name}}) {
+ if ($value eq $ltval) {
+ $found = 1; $tval = $ltval; };
+ };
+ if ( ! $found ) {
+ $default += 1;
+ if ( $default > 1 ) {
+ print STDERR
+ "Can't resolve $name, value=$value.\n";
+ $ok = 0;
+ }
+ else {
+ print STDERR "Illegal value($tval) for $name.\n",
+ " Valid values are: ",
+ join(', ', @{$parm_kw{$name}}),
+ "\n",
+ " Set to default: $parm_def{$name}.\n";
+ $tval = $parm_def{$name};
+ goto Dereference;
+ };
+ };
+ }
+
+ # Check boolean parms for valid values
+ elsif (exists $parm_bool{$name}) {
+ my @ltval = split(/\s/,$tval);
+ my $ltval = lc @ltval[$[];
+ $ltval =~ s/^[ty1].*/1/;
+ $ltval =~ s/^[fn0].*/0/;
+ if ($ltval eq '0' or $ltval eq '1') {
+ $tval = $ltval; }
+ else {
+ $default += 1;
+ if ( $default > 1 ) {
+ print STDERR
+ "Can't resolve $name, value=$value.\n";
+ $ok = 0;
+ }
+ else {
+ print STDERR "Illegal value($tval) for $name.\n",
+ " Valid values are: T[rue],Y[es],1,",
+ " F[alse],N[o],0\n",
+ " Set to default: $parm_def{$name}.\n";
+ $tval = $parm_def{$name};
+ goto Dereference;
+ };
+ };
+ };
+ };
+
+ $value = $tval if $ok;
+
+ print STDERR "get_value : $name => $value\n"
+ if ($debug);
+
+ return ($ok, $value);
+ };
+
+#
+#------------------------------------------------------------------------
+# Check for nullclient mode in /etc/mail/sendmail.mc
+#------------------------------------------------------------------------
+sub check_nullclient {
+ my $nullclient = 0;
+ my $in_file = "@sysconfdir@/mail/sendmail.mc";
+ if ( -r $in_file ) {
+ my $ifh;
+ unless ( open($ifh, "<$in_file") ) {
+ warn("Could not open $in_file($!), ignoring it.\n");
+ };
+
+ line: while (<$ifh>) {
+ next line if /^$/; # skip empty lines
+ next line if /^#/; # skip comments
+ next line if /^dnl /; # skip comments
+ chomp; # drop tailing \n
+
+ if (/^\s*FEATURE\(\s*`?nullclient/) {
+ $nullclient = 1;
+ last line;
+ };
+ };
+ };
+ return $nullclient;
+ };
+
+#
+#------------------------------------------------------------------------
+# Read input configuration file (if no input, just use defaults)
+#------------------------------------------------------------------------
+sub read_config {
+ @ARGV = split(' ', $input_file);
+ return if (! -r $input_file);
+
+ my $savename = '';
+ my $parmname = '';
+ my $parmval = '';
+ my $parmref = '';
+ my $defname = '';
+ my $defval = '';
+ my $tmpval = '';
+
+ print STDOUT "Reading configuration from ", join(',',@ARGV), ".\n";
+
+ line: while (<ARGV>) {
+ next line if /^$/; # skip empty lines
+ chomp; # drop tailing \n
+ if (s/\\$//) {
+ $_ .= <>;
+ redo unless eof();
+ };
+
+ # check commented lines for default parameter values
+ # a bit of a kluge, but it works out nicely
+ if (/^#\s*([\w_]+)="([^"]*)"/) {
+ $defname = get_name($1, 1);
+ $defval = $2;
+ print STDERR "Default: $defname => $defval.\n"
+ if ($debug);
+ next line;
+ };
+ # Skip any comments
+ next line if /^#/; # skip comments
+
+ # Process assignment statements
+ if (/^\s*([\w_]+)="([^"]*)"/) {
+ $savename = $1;
+ $parmname = get_name($savename, '');
+ $parmval = $2;
+ print STDERR "Value : $savename => $parmval.\n"
+ if ($debug);
+
+ # Do we know about this parameter?
+ # NOTE: keep, even if we don't know about it to prevent
+ # problems with up/down grades (not loose anything)
+ if ( ! exists($parm_def{$parmname}) and
+ ! exists($parm_hidden{$parmname}) ) {
+ print STDERR "$parmname is a user defined parameter.\n"
+ if ($debug);
+ };
+
+ # Note if value is default, if so, we'll change it to
+ # the current default - maybe counterintuitive, oh well
+ # it does help with migration
+ if ($parmname eq $defname and $parmval eq $defval) {
+ print STDERR "$parmname is the default value: $defval.\n"
+ if ($debug);
+ $parmval = $parm_def{$parmname};
+ };
+
+ # Finally, assign value
+ if ($savename eq $parmname) {
+ $parameter{$parmname} = $parmval;
+ }
+ else {
+ $parameter{$savename} = $parmval;
+ };
+ };
+ };
+ };
+
+#
+#------------------------------------------------------------------------
+# Validate current configuration
+#------------------------------------------------------------------------
+sub validate_config {
+
+ my $valid = 1;
+
+ print STDOUT "Validating configuration.\n";
+
+ # Really, we only care about the some of the variables - those
+ # that have defaults... the rest, well, so what !
+ foreach my $val (sort keys %parm_def) {
+ my ($ok, $value) = &get_value($val, 1);
+ if (! $ok) { $valid = 0; };
+ };
+
+ if (! $valid ) {
+ print STDERR "\nOne or more errors were encountered!\n\n";
+ };
+
+ return ($valid);
+ };
+
+#
+#------------------------------------------------------------------------
+# Write updated configuration file
+#------------------------------------------------------------------------
+sub write_config {
+ my $out_file = $output_file || $conffile;
+ print STDOUT "Writing configuration to $out_file.\n";
+ $out_file = '&STDOUT' if ($out_file eq '-');
+ unless ( open($ofh, ">$out_file") ) {
+ warn("Could not open $out_file($!), using STDOUT\n");
+ open($ofh, ">&STDOUT");
+ };
+ $out_file = '-' if ($out_file eq '&STDOUT');
+
+# print $ofh <<"EOT";
+####################################################################
+##### This file is automagically generated -- edit at your own risk
+#####
+##### file: ${out_file}
+##### generated via: (${interp_pgm} ${interp_vrm})
+##### ${main::program_name}
+##### version: ${main::program_version} ${main::program_date}
+##### by: ${user}\@${hostname}
+##### on: ${current_time}
+##### in: ${directory}
+##### input files:
+#EOT
+# foreach my $file ( split(' ', $input_file) ) {
+# print $ofh <<"EOT";
+##### ${file}
+#EOT
+# };
+# print $ofh <<"EOT";
+#####
+####################################################################
+ print $ofh <<"EOT";
+#------------------------------------------------------------------------------
+#
+# $out_file
+#
+# Copyright (c) 2001-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+# Version: ${main::program_version}
+# Time-stamp: <${main::program_date}>
+#
+# Parameter file for sendmail (sourced by /usr/share/sendmail/sendmail)
+# Make all changes herein, instead of altering /etc/init.d/sendmail.
+#
+# After making changes here, you'll need to run /usr/sbin/sendmailconfig
+# or ${main::program_name} to have the changes take effect -
+# If you change DAEMON_MODE, QUEUE_MODE, or QUEUE_INTERVAL, you'll also
+# need to run /etc/init.d/sendmail restart.
+#
+# Changes made herein will be kept across upgrades - except for comments!
+# Some comment lines have special significance ...
+#
+# **** **** **** **** DO NOT EDIT THE COMMENTS **** **** **** ****
+#
+# Supported parameters (and defaults) are listed herein.
+#
+# Notes:
+# * This setup allows sendmail to run in several modes:
+# - listener and queue runner..DAEMON_MODE="daemon".QUEUE_MODE="daemon"
+# - listener only..............DAEMON_MODE="daemon".QUEUE_MODE="none"
+# - queue runner only..........DAEMON_MODE="none"...QUEUE_MODE="daemon"
+# - *NOTHING* ?!?..............DAEMON_MODE="none"...QUEUE_MODE="none"
+#
+# * You can also run the listener from inetd:
+# - listener and queue runner..DAEMON_MODE="inetd"..QUEUE_MODE="daemon"
+# - listener only..............DAEMON_MODE="inetd"..QUEUE_MODE="none"
+#
+# * You can also run the queue runner from cron:
+# - listener and queue runner..DAEMON_MODE="....."..QUEUE_MODE="cron"
+# - queue runner only..........DAEMON_MODE="none"...QUEUE_MODE="cron"
+#
+# * _PARMS entries herein are shown in precedence order, any later _PARMS
+# field will, if applicable, override any previous _PARMS fields.
+#
+# * Values *MUST* be surrounded with double quotes ("), single quotes
+# will *NOT* work !
+#
+#------------------------------------------------------------------------------
+# SMTP Listener Configuration
+#
+# DAEMON_MODE="$parm_def{'DAEMON_MODE'}"; Keyword SMTP listener
+# daemon: Run as standalone daemon
+# inetd: Run from inet supervisor (forks for each mail)
+# none: No listener (ie, nullclient/smarthost)
+#
+# NOTE: for the nonce, DAEMON_MODE="none" is *NOT* supported !!!
+#
+DAEMON_MODE="$parameter{'DAEMON_MODE'}";
+#
+# DAEMON_PARMS="$parm_def{'DAEMON_PARMS'}"; String Listener parms
+# Any parameters here will be ignored when run from cron.
+# Note that MISC_PARMS and CRON_PARMS, if applicable, will override
+# anything declared herein.
+#
+DAEMON_PARMS="$parameter{'DAEMON_PARMS'}";
+#
+# DAEMON_HOSTSTATS="$parm_def{'DAEMON_HOSTSTATS'}"; Boolean Listener stats
+# This parameter determines whether or not host stats are collected
+# and available for the \`hoststat\` command to display. There will
+# be a (minor) performance hit, as files will be created/updated for each
+# sendmail delivery attempt. The files are fixed in size, and small,
+# but there can be many of them.
+#
+DAEMON_HOSTSTATS="$parameter{'DAEMON_HOSTSTATS'}";
+#
+# DAEMON_MAILSTATS="$parm_def{'DAEMON_MAILSTATS'}"; Boolean Listener stats
+# This parameter determines whether or not mailer stats are collected
+# and available for the \`mailstats\` command to display. There will
+# be a (minor) performance hit, as this file will be updated for each
+# item coming into, or out of, sendmail. The file is fixed in size,
+# and small, so there's no need to rotate it.
+#
+DAEMON_MAILSTATS="$parameter{'DAEMON_MAILSTATS'}";
+#
+#------------------------------------------------------------------------------
+# SMTP MTA Queue Runner Configuration
+#
+# QUEUE_MODE="$parm_def{'QUEUE_MODE'}"; Keyword SMTP queue runner
+# daemon: Run as standalone daemon
+# cron: Run from crontab
+# none: No queue runner (ie, nullclient/smarthost)
+#
+# NOTE: for the nonce, QUEUE_MODE="none" is *NOT* supported !!!
+#
+QUEUE_MODE="$parameter{'QUEUE_MODE'}";
+#
+# QUEUE_INTERVAL="$parm_def{'QUEUE_INTERVAL'}"; Integer in minutes
+# Interval at which to run the MTA queues. What interval should you use?
+# The amount of time that is acceptable before retrying delivery on
+# mail that couldn't be delivered in one run, or how long an item can
+# set in the queue before having the first delivery attempt done.
+#
+QUEUE_INTERVAL="$parameter{'QUEUE_INTERVAL'}";
+#
+# QUEUE_PARMS="$parm_def{'QUEUE_PARMS'}"; String queue parameters
+# Any parameters here are also used when run from cron.
+# Note that MISC_PARMS and CRON_PARMS, if applicable, will override
+# anything declared herein.
+#
+QUEUE_PARMS="$parameter{'QUEUE_PARMS'}";
+#
+#------------------------------------------------------------------------------
+# SMTP - MSP Queue Runner Configuration
+#
+# MSP_MODE="$parm_def{'MSP_MODE'}"; Keyword MSP queue runner mode
+# daemon: Run as standalone daemon
+# cron: Run from crontab
+# none: No queue runner (ie, nullclient/smarthost)
+#
+# NOTE: If QUEUE_MODE="cron" & MSP_MODE="none", the MSP queue will
+# be run as part of the MTA queue running process.
+#
+MSP_MODE="$parameter{'MSP_MODE'}";
+#
+# MSP_INTERVAL="$parm_def{'MSP_INTERVAL'}"; Integer in minutes
+# Interval at which to run the MSP queues. What interval should you use?
+# The amount of time that is acceptable before retrying delivery on
+# mail that couldn't be accepted by the MTA, and was therefore left
+# in the message submission queue. Probably should be the same as the
+# whats used in QUEUE_INTERVAL.
+#
+MSP_INTERVAL="$parameter{'MSP_INTERVAL'}";
+#
+# MSP_PARMS="$parm_def{'MSP_PARMS'}"; String queue parameters
+# Any parameters here are also used when run from cron.
+# Note that MISC_PARMS and CRON_PARMS, if applicable, will override
+# anything declared herein.
+#
+MSP_PARMS="$parameter{'MSP_PARMS'}";
+#
+# MSP_MAILSTATS="$parm_def{'MSP_MAILSTATS'}"; Boolean Listener stats
+# This parameter determines whether or not mailer stats are collected
+# and available for the \`mailstats\` command to display. There will
+# be a (minor) performance hit, as this file will be updated for each
+# item coming into, or out of, sendmail. The file is fixed in size,
+# and small, so there's no need to rotate it.
+#
+MSP_MAILSTATS="$parameter{'MSP_MAILSTATS'}";
+#
+#------------------------------------------------------------------------------
+# Miscellaneous Confguration
+#
+# MISC_PARMS="$parm_def{'MISC_PARMS'}"; String miscellaneous parameters
+# Miscellaneous parameters - applied to any sendmail invocation.
+# Any parameters here are also used when run from cron.
+# Applied after {DAEMON,QUEUE}_PARMS, and can therefore override them
+# if need be (in which case why did use them?)
+# Note that CRON_PARMS, if applicable, will override anything
+# declared herein.
+#
+# Here is where'd you setup and debugging or special parms that you
+# want shared betwixt the possibly separate listener/queue-runner
+# processes.
+#
+MISC_PARMS="$parameter{'MISC_PARMS'}";
+#
+#------------------------------------------------------------------------------
+# Cron Job Configuration
+#
+# CRON_MAILTO="$parm_def{'CRON_MAILTO'}"; String cronjob output
+# Recipient of *rare* cronjob output. Some cronjobs will be running
+# under user `mail`, so any problems encountered would probably be missed
+# so define a user who actually (hopefully) checks email now and again.
+#
+CRON_MAILTO="$parameter{'CRON_MAILTO'}";
+#
+# CRON_PARMS="$parm_def{'CRON_PARMS'}"; String cron specific parmeters
+# Cron parameters - applied *only* when sendmail queue running is done
+# via a cronjob. Applied after QUEUE_PARMS and MISC_PARMS, and can
+# therefore override them if need be.
+#
+CRON_PARMS="$parameter{'CRON_PARMS'}";
+#
+#------------------------------------------------------------------------------
+# Queue Aging Configuration
+#
+# Why would you want to age your queues? On every queue-run interval,
+# sendmail will try *every* file in the queue... If a site is down
+# for a while, considerable time can be wasted each interval in retrying
+# it. The scheme supported allows aging by time, and can move the older
+# files to another (less frequently run queue), thereby reducing overal
+# system impact - and providing better mail throughput.
+#
+# Note that this support is completely separate from QUEUE_MODE=cron,
+# you can age queues even if you're running QUEUE_MODE=daemon.
+#
+# There are four parts to the queue aging support, and these parts
+# may be repeated, to operate on multiple queues.
+#
+# 1. Interval at which to age the queues (in minutes).
+# What interval should you use? Roughly twice the normal queue
+# interval, so that messages are tried twice in each successively
+# slower queue.
+#
+# 2. Criteria (optional and defaults to interval). This is the
+# specification of which files to move. It defaults moving
+# files whose age in the queues exceeds the interval.
+# This field, if specified can be very complex - supporting
+# aging by just about anything! see qtool(8) for details.
+#
+# 3. To queue. This is the queue to which files will be moved.
+# It may be fully qualified, or relative to /var/spool/mqueue.
+#
+# 4. From queue. This is the queue from which files will be moved.
+# It may be fully qualified, or relative to /var/spool/mqueue.
+#
+# Samples:
+# AGE_DATA="[['25', '', 'hourly', 'main']]";
+# Every 25 minutes, move any file older than 25 minutes from
+# /var/spool/mqueue/main to /var/spool/mqueue/hourly
+#
+# AGE_DATA="[['25', '', 'hourly', 'main'],\\
+# ['125', '', 'daily', 'hourly']]";
+# Same as the above, but also move files from the hourly queue
+# to the daily queue after 125 minutes in the hourly queue.
+#
+# AGE_DATA="[['25',\\
+# '-e \\'\$msg{message}[0] == /Deferred: 452 4.2.2 Over quota/\\'',\\
+# 'overquota', 'main']]";
+# Every 25 minutes, move all files deferred because of quota
+# violations from /var/spool/mqueue/main to
+# /var/spool/mqueue/overquota where they can be processed on
+# a different interval, or by some other means.
+#
+# If the above samples suggest Perl arrays, well, they are...
+#
+# AGE_DATA="$parm_def{'AGE_DATA'}"; Perl array Queue aging data
+#
+EOT
+ my ($ok, $var) = &get_value('AGE_DATA');
+ my $tmpval = eval $var;
+ if ($@) {
+ warn $@;
+ }
+ else {
+ $var = $tmpval;
+ };
+ if (not defined $var) {
+ print $ofh 'AGE_DATA="";',"\n";
+ }
+ elsif (not ref $var) {
+ print $ofh 'AGE_DATA="',$var,'";',"\n";
+ }
+ elsif (@{$var} == 0) {
+ print $ofh 'AGE_DATA="";',"\n";
+ }
+ else {
+ print $ofh 'AGE_DATA="[\\',"\n";
+ foreach my $entry (@{$var}) {
+ foreach my $ndx ($[ .. $#{@{$entry}}) {
+ @{$entry}[$ndx] =~ s/'/\\'/g;
+ };
+ print $ofh "['",join("', '",@{$entry}),"'],\\\n";
+ };
+ print $ofh ']";',"\n";
+ };
+ print $ofh <<"EOT";
+#
+#------------------------------------------------------------------------------
+# Hidden variables (the blood be upon your hands)
+#
+EOT
+ foreach my $key (sort keys %parm_hidden) {
+ my ($ok, $value);
+ # Don't evaluate value, just stuff it...
+ next if ( ! $parameter{$key} );
+ ($ok, $value) = (1, $parameter{$key});
+ print $ofh "$key=",'"',$value,'";',"\n";
+ };
+ print $ofh <<"EOT";
+#
+#------------------------------------------------------------------------------
+# Deprecated variables (kept for reference)
+#
+EOT
+ foreach my $key (sort keys %parm_deprecated) {
+ my ($ok, $value);
+ # Don't evaluate value, just stuff it...
+ if ( $parm_deprecated{$key} ) {
+ ($ok, $value) = (1, join('','${', $parm_deprecated{$key}, '}'));
+ }
+ elsif ( $parameter{$key} ) {
+ ($ok, $value) = (1, $parameter{$key});
+ };
+ print $ofh "$key=",'"',$value,'";',"\n";
+ };
+ print $ofh <<"EOT";
+#
+#------------------------------------------------------------------------------
+# Unknown variables (kept for reference)
+#
+EOT
+ foreach my $key (sort keys %parameter) {
+ if (! exists($parm_def{$key}) and
+ ! exists($parm_deprecated{$key})) {
+ # Don't evaluate value, just stuff it...
+ my ($ok, $value) = (1, $parameter{$key});
+ print $ofh "$key=",'"',$value,'";',"\n";
+ };
+ };
+ print $ofh <<"EOT";
+#------------------------------------------------------------------------------
+#
+
+EOT
+
+ close($ofh);
+ };
+
+#
+#------------------------------------------------------------------------
+# Write updated cron file
+#------------------------------------------------------------------------
+sub write_crontab {
+ my $var;
+ my $interval = '';
+ my $test = "test -x @datadir@/sendmail/sendmail";
+ my $command = '';
+ my $ok = '';
+ my $mailto = '';
+ my $mmode = '';
+ my $qmode = '';
+ my $msp_line = '';
+ my $mta_line = '';
+ my $age_line = '';
+
+ ($ok, $mailto) = &get_value('CRON_MAILTO');
+ if ( ! $ok ) {
+ return;
+ };
+
+ my $out_file = $output_file || "@sysconfdir@/cron.d/sendmail";
+ print STDOUT "Writing $out_file.\n";
+ $out_file = '&STDOUT' if ($out_file eq '-');
+ unless ( open($ofh, ">$out_file") ) {
+ warn("Could not open $out_file($!), using STDOUT\n");
+ open($ofh, ">&STDOUT");
+ };
+ $out_file = '-' if ($out_file eq '&STDOUT');
+
+ print $ofh <<"EOT";
+####################################################################
+##### This file is automagically generated -- edit at your own risk
+#####
+##### file: ${out_file}
+##### generated via: (${interp_pgm} ${interp_vrm})
+##### ${main::program_name}
+##### version: ${main::program_version} ${main::program_date}
+##### by: ${user}\@${hostname}
+##### on: ${current_time}
+##### in: ${directory}
+##### input files:
+EOT
+ foreach my $file ( split(' ', $input_file) ) {
+ print $ofh <<"EOT";
+##### ${file}
+EOT
+ };
+ print $ofh <<"EOT";
+#####
+####################################################################
+#------------------------------------------------------------------------------
+#
+# $out_file
+#
+# Copyright (c) 2001-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+# Version: ${main::program_version}
+# Time-stamp: <${main::program_date}>
+#
+# Sendmail crontab - Call sendmail at various times to do the following:
+# 1) Age queues - move undelivered mail to a slower queue
+# 2) Retry any mail queued by the message submission process
+# 3) run the queues (deliver mail) if a standalone daemon is not desired
+#
+# Each processes is independant and guided by /etc/mail/sendmail.conf and
+# {sendmail,submit}.mc files.
+#
+# There isn't anything here that should need touching.
+#
+# Any requisite queue/misc parameters must be set in /etc/mail/sendmail.conf
+# and reflected herein via /usr/sbin/sendmailconfig (or more directly via
+# ${main::program_name}).
+#
+#------------------------------------------------------------------------------
+#
+# use default path, shell, home
+#SHELL=/bin/sh
+#PATH=
+#HOME=
+# send mail to this user, as `mail/smmsp` isn't real.
+MAILTO=$mailto
+#
+# format of entries:
+# m h dom mon dow user command
+#
+#------------------------------------------------------------------------------
+# Every so often, give sendmail a chance to run the MSP queues.
+#
+EOT
+ ($ok, $interval) = &get_value('MSP_INTERVAL');
+ $interval = join('', '*/', $interval);
+ $command = "$test && @datadir@/sendmail/sendmail cron-msp";
+ ($ok, $mmode) = &get_value('MSP_MODE');
+ ($ok, $qmode) = &get_value('QUEUE_MODE');
+ if ($mmode eq 'cron'
+ #or ($mmode eq 'none' and $qmode eq 'cron')
+ ) {
+ $msp_line =
+ "$interval * * * *\t\tsmmsp\t$command";
+ }
+ else {
+ $msp_line =
+ "#$interval * * * *\t\tsmmsp\t$command";
+ };
+ print $ofh "$msp_line\n";
+
+ print $ofh <<"EOT";
+#
+#------------------------------------------------------------------------------
+# Every so often, give sendmail a chance to run the MTA queues.
+# Will also run MSP queues if enabled
+#
+EOT
+ ($ok, $interval) = &get_value('QUEUE_INTERVAL');
+ $interval = join('','*/',$interval);
+ $command = "$test && @datadir@/sendmail/sendmail cron-mta";
+ if ($qmode eq 'cron') {
+ $mta_line =
+ "$interval * * * *\t\troot\t$command";
+ }
+ else {
+ $mta_line =
+ "#$interval * * * *\t\troot\t$command";
+ };
+ print $ofh "$mta_line\n";
+
+ print $ofh <<"EOT";
+#
+#------------------------------------------------------------------------------
+# Every so often, give sendmail a chance to age the queues.
+#
+EOT
+ ($ok, $var) = &get_value('AGE_DATA');
+ my $tmpval = eval $var;
+ if ($@) {
+ warn $@;
+ }
+ else {
+ $var = $tmpval;
+ };
+ if (not ref $var) {
+ print $ofh "# No queue aging\n";
+ }
+ elsif (@{$var} == 0) {
+ print $ofh "# No queue aging\n";
+ }
+ else {
+ foreach my $entry (@{$var}) {
+ $interval = "*/@$entry[0]";
+ my $criteria = @$entry[1] || join('','-s ',60*@$entry[0]);
+ my $to = @$entry[2];
+ my $from = @$entry[3];
+ $command = "$test && @datadir@/sendmail/qtool.pl";
+ $from = "@localstatedir@/spool/mqueue/$from"
+ if ($from !~ /^\//);
+ $to = "@localstatedir@/spool/mqueue/$to"
+ if ($to !~ /^\//);
+ $age_line =
+ "$interval * * * *\t\troot\t$command $criteria $to $from";
+ print $ofh "$age_line >/dev/null\n";
+ };
+ };
+ print $ofh <<"EOT";
+#
+EOT
+
+ close($ofh);
+ };
+
+#
+#------------------------------------------------------------------------
+# Update /etc/inetd.conf file
+#------------------------------------------------------------------------
+sub update_inetd {
+
+ # Don't try to write if we're debugging
+ if ($output_file ne '') {
+ return;
+ };
+
+ my ($ok, $mode) = &get_value('DAEMON_MODE');
+ if ( $ok ) {
+ if ( $mode eq 'inetd' ) {
+ system 'update-inetd --group MAIL --enable smtp,smtps,587'
+ }
+ else {
+ system 'update-inetd --group MAIL --disable smtp,smtps,587'
+ };
+ };
+
+ };
+
+#
+#------------------------------------------------------------------------
+# Update mail statistics information (create/delete files)
+#------------------------------------------------------------------------
+sub update_files {
+
+ # Don't try to write if we're debugging
+ if ($output_file ne '') {
+ return;
+ };
+
+ my ($class, $flags, $files, $options);
+ my ($ok, $stats);
+ my $file;
+
+ #
+ # Read the mc/m4 files
+ &Parse_mc::read_dbs('', '');
+
+ # Obtain entry for HOST_STATUS_DIRECTORY
+ ($class, $flags, $files, $options) =
+ &Parse_mc::entry_dbs('confHOST_STATUS_DIRECTORY');
+ $file = @{$files}[0];
+ ($ok, $stats) = &get_value('DAEMON_HOSTSTATS');
+ if ( $ok and $file ne '-' ) {
+ if ( $stats and ! -d $file) {
+ print STDOUT "Enabling HOST statistics file($file).\n";
+ system "mkdir ${file}";
+ my $gid = getgrnam('smmsp');
+ chown '0', $gid, $file;
+ chmod 02750, $file;
+ }
+ elsif ( ! $stats and -d $file ) {
+ print STDOUT "Disabling HOST statistics file($file).\n";
+ system "rm -rf ${file}";
+ };
+ };
+
+ # Obtain entry for STATUS_FILE
+ ($class, $flags, $files, $options) =
+ &Parse_mc::entry_dbs('STATUS_FILE');
+ $file = @{$files}[0];
+ ($ok, $stats) = &get_value('DAEMON_MAILSTATS');
+ if ( $ok and $file ne '-' ) {
+ if ( $stats and ! -e $file) {
+ print STDOUT "Enabling MTA statistics file($file).\n";
+ open 'STATS', ">$file";
+ close 'STATS';
+ my $gid = getgrnam('smmsp');
+ chown '0', $gid, $file;
+ chmod 0640, $file;
+ }
+ elsif ( ! $stats and -e $file ) {
+ print STDOUT "Disabling MTA statistics file($file).\n";
+ unlink $file;
+ };
+ };
+
+ # Obtain entry for MSP_STATUS_FILE
+ ($class, $flags, $files, $options) =
+ &Parse_mc::entry_dbs('MSP_STATUS_FILE');
+ $file = @{$files}[0];
+ ($ok, $stats) = &get_value('MSP_MAILSTATS');
+ if ( $ok and $file ne '-') {
+ if ( $stats and ! -e $file ) {
+ print STDOUT "Enabling MSP statistics file($file).\n";
+ open 'STATS', ">$file";
+ close 'STATS';
+ my $gid = getgrnam('smmsp');
+ chown '0', $gid, $file;
+ chmod 0660, $file;
+ }
+ elsif ( ! $stats and -e $file ) {
+ print STDOUT "Disabling MSP statistics file($file).\n";
+ unlink $file;
+ };
+ };
+
+ };
+
diff --git a/debian/local/update_db.in b/debian/local/update_db.in
new file mode 100644
index 0000000..72ee337
--- /dev/null
+++ b/debian/local/update_db.in
@@ -0,0 +1,591 @@
+#!/bin/sh -e
+#-----------------------------------------------------------------------------
+#
+# $Sendmail: update_db,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Update Sendmail databases for Debian
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# Notes (to all):
+# * assumes makemap dbtype /etc/mail/database < /etc/mail/database
+#
+# Notes (to self):
+# * changes made herein *must* be reflected in
+# parse_mc,update_mk,update_db,debian.m4
+# * multiple db options not supported
+# * userdb can also have multiple databases and then a forward!
+# * need sendmail stop/start
+#
+#-----------------------------------------------------------------------------
+set -e;
+
+# List of db files/features/etc
+db_files="databases Makefile crontab QUEUE_GROUP sendmail.cf submit.cf \
+ confCR_FILE confCT_FILE confCW_FILE confUSERDB_SPEC \
+ access_db authinfo bitdomain domaintable \
+ genericstable mailertable uucpdomain \
+ use_cw_file use_ct_file virtusertable ALIAS_FILE";
+
+# Path to other sendmail helpers
+if [ -x ./update_sendmail ]; then
+ sm_path='.';
+elif [ -x $(dirname $0)/update_sendmail ]; then
+ sm_path=$(dirname $0);
+else
+ sm_path=@datadir@/sendmail;
+ fi;
+
+# control amount of output
+verbosity=0;
+
+# flag used to ensure only one newaliases command is run
+newaliases_run=0;
+
+# flag used to indicate a dataset has been moved, may need another update
+changed=0;
+
+# max return code
+max_rc=0;
+missing_rqd=0;
+missing_opt=0;
+missing_cre=0;
+m4_errors=0;
+
+#-------------------------------------------------------------
+# Initial update of sendmail.mc/databases
+#-------------------------------------------------------------
+initial () {
+ if [ $verbosity -gt 1 ]; then
+ echo "initial()";
+ fi;
+ # Sigh... I wish this was in Perl...
+ $sm_path/parse_mc || true;
+ };
+
+#-------------------------------------------------------------
+# Handle found databases
+#-------------------------------------------------------------
+is_found () {
+ if [ $verbosity -gt 1 ]; then
+ echo "is_found: $dbfeat - $dbname";
+ fi;
+ process=1;
+
+ case "$dbfeat" in
+ ALIAS_FILE)
+ if [ -f @sysconfdir@/mail/aliases -a ! -f /etc/aliases ]; then
+ echo "Moving @sysconfdir@/mail/aliases to /etc/aliases";
+ mv @sysconfdir@/mail/aliases /etc/aliases;
+ ln -sf ../aliases @sysconfdir@/mail/aliases;
+ fi;
+ ;;
+ submit.cf)
+ if [ ! -f @datadir@/sendmail/cf/feature/msp.m4 ]; then
+ rm -f @sysconfdir@/mail/submit.cf 2>/dev/null;
+ rm -f @sysconfdir@/mail/submit.cf.errors 2>/dev/null;
+ process=0;
+ fi;
+ ;;
+ *)
+ ;;
+ esac;
+ };
+
+#-------------------------------------------------------------
+# Handle missing databases:
+# moving /etc/xxx to /etc/mail/xxx
+# rename /etc/mail/xxx to /etc/mail/yyy
+#-------------------------------------------------------------
+move_file () {
+ if [ -f $1 ]; then
+ if [ ! -L $1 ]; then
+ echo "Moving $1 to $dbname.";
+ mv $1 $dbname;
+ chown root:smmsp $dbname;
+ chmod 0644 $dbname;
+ if [ -f $1.db ]; then
+ mv -f /etc/$1.db $dbname.db;
+ fi;
+ if [ -f $1.pag ]; then
+ mv -f /etc/$1.pag $dbname.pag;
+ fi;
+ if [ -f $1.dir ]; then
+ mv -f /etc/$1.dir $dbname.dir;
+ fi;
+ changed=1;
+ process=1;
+ else
+ echo "$1 is a link, move it to $dbname";
+ if [ "$dbopts" = "-o" ]; then
+ missing_opt=`expr $missing_opt + 1`;
+ else
+ missing_rqd=`expr $missing_rqd + 1`;
+ fi;
+ fi;
+ true;
+ else
+ false;
+ fi;
+ };
+
+rename_file () {
+ if [ -f @sysconfdir@/mail/$1 ]; then
+ echo "Renaming @sysconfdir@/mail/$1 to $dbname.";
+ mv @sysconfdir@/mail/$1 $dbname;
+ chown root:smmsp $dbname;
+ chmod 0644 $dbname;
+ changed=1;
+ process=1;
+ true;
+ else
+ false;
+ fi;
+ };
+
+is_not_found () {
+ if [ $verbosity -gt 1 ]; then
+ echo "is_not_found: $dbfeat - $dbname";
+ fi;
+
+ case "$dbfeat" in
+ databases|Makefile)
+ :;
+ ;;
+ use_cw_file|confCW_FILE)
+ if move_file /etc/local-host-names; then
+ :;
+ elif rename_file sendmail.cw; then
+ :;
+ elif move_file /etc/sendmail.cw; then
+ :;
+ else
+ missing_cre=`expr $missing_cre + 1`;
+ echo "Warning: $dbfeat source" \
+ "file not found: $dbname";
+ echo " it was created";
+ echo "localhost" > $dbname;
+ echo `hostname -f` >> $dbname;
+ chown root:smmsp $dbname;
+ chmod 0644 $dbname;
+ fi;
+ ;;
+ use_ct_file|confCT_FILE)
+ if move_file /etc/trusted-users; then
+ :;
+ elif rename_file sendmail.ct; then
+ :;
+ elif move_file /etc/sendmail.ct; then
+ :;
+ else
+ missing_cre=`expr $missing_cre + 1`;
+ echo "Warning: $dbfeat source" \
+ "file not found: $dbname";
+ echo " it was created";
+ touch $dbname;
+ chown root:smmsp $dbname;
+ chmod 0644 $dbname;
+ fi;
+ ;;
+ HELP_FILE)
+ if move_file /etc/sendmail.hf; then
+ :;
+ elif rename_file sendmail.hf; then
+ :;
+ else
+ echo "Error: $dbfeat source file not found: $dbname";
+ missing_rqd=`expr $missing_rqd + 1`;
+ process=0;
+ fi;
+ ;;
+ ALIAS_FILE)
+ if [ -e /etc/$dbsname ]; then
+ echo "Linking /etc/$dbsname to $dbname";
+ ln -sf ../$dbsname $dbname;
+ if [ -f /etc/$dbsname.db ]; then
+ mv /etc/$dbsname.db @sysconfdir@/mail;
+ fi;
+ if [ -f /etc/$dbsname.pag ]; then
+ mv /etc/$dbsname.pag @sysconfdir@/mail;
+ fi;
+ if [ -f /etc/$dbsname.dir ]; then
+ mv /etc/$dbsname.dir @sysconfdir@/mail;
+ fi;
+ elif [ "$dbopts" = "-o" ]; then
+ echo "Informational: $dbfeat source" \
+ "file not found: $dbname";
+ missing_opt=`expr $missing_opt + 1`;
+ process=0;
+ else
+ echo "Error: $dbfeat source file not found: $dbname";
+ missing_rqd=`expr $missing_rqd + 1`;
+ process=0;
+ fi;
+ ;;
+ *.cf)
+ mcfile=$(echo "$dbsname" | sed -e 's/\..*//')
+ if move_file /etc/$dbsname; then
+ if [ -f @sysconfdir@/${mcfile}.cf ]; then
+ mv -f @sysconfdir@/${mcfile}.cf @sysconfdir@/mail/;
+ fi;
+ elif [ "$mcfile" = "sendmail" ]; then
+ cp @datadir@/sendmail/cf/debian/sendmail.mc \
+ $dbname;
+ chown root:smmsp $dbname;
+ chmod 0644 $dbname;
+ elif [ "$mcfile" = "submit" ]; then
+ cp @datadir@/sendmail/cf/debian/submit.mc \
+ $dbname;
+ chown root:smmsp $dbname;
+ chmod 0644 $dbname;
+ elif [ "$dbopts" = "-o" ]; then
+ echo "Informational: $dbfeat source" \
+ "file not found: $dbname";
+ missing_opt=`expr $missing_opt + 1`;
+ process=0;
+ else
+ echo "Error: $dbfeat source file not found: $dbname";
+ missing_rqd=`expr $missing_rqd + 1`;
+ process=0;
+ fi;
+ ;;
+ QUEUE_GROUP)
+ echo "Warning: $dbfeat source" \
+ "file not found: $dbname";
+ echo " it was created";
+ mkdir -p $dbname;
+ chown root:smmsp $dbname;
+ chmod 02750 $dbname;
+ ;;
+ crontab)
+ if [ -x $sm_path/update_conf ]; then
+ $sm_path/update_conf;
+ fi;
+ ;;
+ *)
+ if move_file /etc/$dbsname; then
+ :;
+ elif [ "$dbopts" = "-o" ]; then
+ :;
+ else
+ missing_cre=`expr $missing_cre + 1`;
+ echo "Warning: $dbfeat source" \
+ "file not found: $dbname";
+ echo " it was created";
+ touch $dbname;
+ chown root:smmsp $dbname;
+ chmod 0644 $dbname;
+ fi;
+ ;;
+ esac;
+ };
+
+#-------------------------------------------------------------
+# Handle empty databases
+#-------------------------------------------------------------
+is_empty () {
+ if [ $verbosity -gt 1 ]; then
+ echo "is_empty: $dbfeat - $dbname";
+ fi;
+ if [ $process -eq 1 ]; then
+ if [ "$dbtype" != "-" ]; then
+ rm -f $dbname.db;
+ rm -f $dbname.pag;
+ rm -f $dbname.dir;
+ fi;
+ case "$dbfeat" in
+ databases|Makefile)
+ :;
+ ;;
+ *)
+ echo "Informational: $dbfeat file empty: $dbname";
+ if [ "$dbopts" = "-o" ]; then
+ process=0;
+ fi;
+ ;;
+ esac;
+ fi;
+ };
+
+#-------------------------------------------------------------
+# Handle no data (exists, but is only comments) databases
+#-------------------------------------------------------------
+is_comments () {
+ if [ $verbosity -gt 1 ]; then
+ echo "is_comments: $dbfeat - $dbname";
+ fi;
+ if [ $process -eq 1 -a -s "$dbname" ]; then
+ if [ "$dbtype" != "-" ]; then
+ rm -f $dbname.db;
+ rm -f $dbname.pag;
+ rm -f $dbname.dir;
+ fi;
+ case "$dbfeat" in
+ databases|Makefile)
+ :;
+ ;;
+ *)
+ echo "Informational: $dbfeat no data: $dbname";
+ if [ "$dbopts" = "-o" ]; then
+ process=0;
+ fi;
+ ;;
+ esac;
+ fi;
+ };
+
+#-------------------------------------------------------------
+# Handle normal databases (exists, has data)
+#-------------------------------------------------------------
+is_normal () {
+ if [ $verbosity -gt 1 ]; then
+ echo "is_normal: $dbfeat - $dbname";
+ fi;
+
+ # Make sure sensitive databases are *not* generally readable
+ if [ "$dbsname" = "authinfo" \
+ -o "$dbsname" = "access" ]; then
+ chmod go-rwx $dbname;
+ fi;
+
+ if [ $process -eq 1 -a $max_rc -eq 0 ]; then
+ case "$dbtype" in
+ '-'|text|ldap)
+ :;
+ ;;
+ parse_mc)
+ $sm_path/parse_mc || true;
+ ;;
+ update_conf)
+ $sm_path/update_conf || true;
+ ;;
+ update_mk)
+ $sm_path/update_mk || true;
+ ;;
+ btree)
+ echo "Updating $dbname...";
+ @sbindir@/makemap -d $dbtype $dbname.new.db < $dbname;
+ chown root:smmsp $dbname.new.db;
+ chmod 0644 $dbname.new.db;
+ mv -f $dbname.new.db $dbname.db;
+ ;;
+ dbm | btree | hash)
+ echo "Updating $dbname...";
+ @sbindir@/makemap $dbtype $dbname.new.db < $dbname;
+ chown root:smmsp $dbname.new.db;
+ if [ "$dbsname" = "authinfo" \
+ -o "$dbsname" = "access" ]; then
+ chmod 0640 $dbname.new.db;
+ else
+ chmod 0644 $dbname.new.db;
+ fi;
+ mv -f $dbname.new.db $dbname.db;
+ ;;
+ newaliases)
+ echo "Updating $dbname...";
+ if [ $newaliases_run -eq 0 ]; then
+ newaliases_run=1;
+ @sbindir@/sendmail -bi || true;
+ fi;
+ if [ -f $dbname.db ]; then
+ chown root:smmsp $dbname.db;
+ chmod 0644 $dbname.db;
+ fi;
+ ;;
+ m4)
+ mcfile=$(echo "$dbsname" | sed -e 's/\..*//');
+ echo "Creating @sysconfdir@/mail/${mcfile}.cf...";
+ rm -f @sysconfdir@/mail/${mcfile}.cf.errors;
+ m4 @sysconfdir@/mail/${mcfile}.mc \
+ > @sysconfdir@/mail/${mcfile}.cf.new \
+ 2> @sysconfdir@/mail/${mcfile}.cf.errors || true;
+ chown root:smmsp @sysconfdir@/mail/${mcfile}.cf.new;
+ chmod 0644 @sysconfdir@/mail/${mcfile}.cf.new;
+ if [ ! -s @sysconfdir@/mail/${mcfile}.cf.errors ]; then
+ rm -f @sysconfdir@/mail/${mcfile}.cf.errors;
+ else
+ chown root:smmsp @sysconfdir@/mail/${mcfile}.cf.errors;
+ cat @sysconfdir@/mail/${mcfile}.cf.errors;
+ echo " ";
+ m4_errors=1;
+ fi;
+ # Can't tell if the errors are fatal or not ;-{
+ mv -f @sysconfdir@/mail/${mcfile}.cf.new \
+ @sysconfdir@/mail/${mcfile}.cf;
+ ;;
+ *)
+ echo "$dbtype map not done herein";
+ ;;
+ esac;
+ fi;
+ };
+
+#-------------------------------------------------------------
+# Handle completion
+#-------------------------------------------------------------
+final () {
+ if [ $verbosity -gt 1 ]; then
+ echo "final()";
+ fi;
+ };
+
+
+# status report if not for single database
+if [ -z "$1" ]; then
+ echo "Checking {sendmail,submit}.mc and related databases...";
+else
+ db_files="$1";
+ fi;
+
+initial;
+
+for file in $db_files; do \
+ line=$(grep -Ee "^[[:space:]]*$file" \
+ @sysconfdir@/mail/databases || true);
+ while ([ "$line" != "" ]); do
+ str=$(echo "$line" | cut -d "
+" -f 1);
+ line=$(echo "$line" | cut -d "
+" -f 2-);
+
+ # Strip line back into four pieces: feature, type, opts, name
+ dbfeat=$(echo "$str" | cut -d ":" -f 1);
+ dbtype=$(echo "$str" | cut -d ":" -f 2);
+ dbopts=$(echo "$str" | cut -d ":" -f 3);
+ dbname=$(echo "$str" | cut -d ":" -f 4);
+ dbregx=$(echo "$str" | cut -d ":" -f 5);
+ if [ $(dirname "$dbname") = "@sysconfdir@/mail" ]; then
+ dbsname=$(basename "$dbname");
+ elif [ $(dirname "$dbname") = "@sysconfdir@" ]; then
+ dbsname=$(basename "$dbname");
+ else
+ dbsname="$dbname";
+ fi;
+ if [ "$dbopts" = "-" ]; then
+ dbopts="";
+ fi;
+ if [ "$dbregx" = "-" ]; then
+ dbregx="";
+ fi;
+
+ # Check to see if we're doing one, or all
+ if [ ! -z "$1" ]; then
+ if [ "$1" = "$dbfeat" -o \
+ "$1" = "$dbname" -o \
+ "$1" = "$dbsname" ]; then
+ :;
+ else
+ continue;
+ fi;
+ fi;
+
+ # Check for special database types
+ case "$dbtype" in
+ ldap)
+ if [ $verbosity -gt 0 ]; then
+ echo "Skipping $dbname...";
+ fi;
+ continue
+ ;;
+ *)
+ ;;
+ esac;
+
+ # Kluge for aliases...
+ if [ "$dbname" = "ldap" ]; then
+ continue;
+ fi;
+
+ process=1;
+ if [ $verbosity -gt 0 ]; then
+ echo "Processing $dbname...";
+ fi;
+
+ # Check for database existance
+ if [ -f "$dbname" -o -d "$dbname" ]; then
+ is_found;
+ else
+ is_not_found;
+ fi;
+
+ # Skip the rest for directories
+ if [ ! -d "$dbname" ]; then
+
+ # Check for something in database
+ if [ ! -s "$dbname" ]; then
+ is_empty;
+ fi;
+
+ # Check for real data (not just comments)
+ if [ $process -eq 1 ]; then
+ if ! grep -qEe "^[[:space:]]*[^$\#]" $dbname; then
+ is_comments;
+ fi;
+ fi;
+
+ # Finally, assume a normal file...
+ is_normal;
+ fi;
+
+ done;
+ done;
+
+final;
+
+# Final notices...
+if [ $changed -ne 0 ]; then
+ echo " ";
+ echo "Informational: Some changes were made to file locations";
+ echo " Make sure sendmail.cf is rebuilt";
+ if [ $max_rc -lt 1 ]; then
+ max_rc=1;
+ fi;
+ fi;
+if [ $missing_opt -ne 0 ]; then
+ echo " ";
+ echo "Informational: $missing_opt optional database(s) sources";
+ echo " were not found, please investigate.";
+ fi;
+if [ $missing_cre -ne 0 ]; then
+ echo " ";
+ echo "Warning: $missing_cre database(s) sources";
+ echo " were not found, (but were created)";
+ echo " please investigate.";
+ fi;
+if [ $missing_rqd -ne 0 ]; then
+ echo " ";
+ echo "Error: $missing_rqd required database(s) sources";
+ echo " were not found, correct this before starting sendmail!";
+ if [ $max_rc -lt 2 ]; then
+ max_rc=2;
+ fi;
+ fi;
+if [ $missing_opt -ne 0 -o $missing_rqd -ne 0 ]; then
+ echo " ";
+ echo "$0 assumes that databases, and their source datasets";
+ echo "have the same base name (not counting the .db). If this is not";
+ echo "true, $0 can not rebuild your databases to make sure";
+ echo "they will work with the newer sendmail. You will have to do this";
+ echo "yourself - before starting sendmail.";
+ echo " ";
+ fi;
+if [ $m4_errors -ne 0 ]; then
+ echo " ";
+ echo "Warning: These messages were issued while creating sendmail.cf";
+ echo " make sure they are benign before starting sendmail!";
+ echo " ";
+ if [ -f @sysconfdir@/mail/sendmail.cf.errors ]; then
+ echo "Errors in generating sendmail.cf";
+ cat @sysconfdir@/mail/sendmail.cf.errors;
+ fi;
+ if [ -f @sysconfdir@/mail/submit.cf.errors ]; then
+ echo "Errors in generating submit.cf";
+ cat @sysconfdir@/mail/submit.cf.errors;
+ fi;
+ echo " "
+ if [ $max_rc -lt 2 ]; then
+ max_rc=2;
+ fi;
+ fi;
+exit $max_rc;
+
diff --git a/debian/local/update_ldap.in b/debian/local/update_ldap.in
new file mode 100644
index 0000000..5daca95
--- /dev/null
+++ b/debian/local/update_ldap.in
@@ -0,0 +1,118 @@
+#!/bin/sh -e
+#-----------------------------------------------------------------------------
+#
+# $Sendmail: update_ldap,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Sendmail support for LDAP
+#
+# Copyright (c) 2000-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# Notes: supports local umich-ldap and openldap v1/v2 servers
+#
+#-----------------------------------------------------------------------------
+set -e
+
+#
+# Flag to determine if this is an install or update
+NEW=0;
+
+#
+# Flag to determine if any local LDAP server was found
+FOUND=0;
+
+#
+# Path to LDAP server schema directory
+LDAP_PATH=;
+SCHEMA_PATH=;
+SCHEMA_NAME=;
+LDAP_VERSION=;
+
+install_schema () {
+#
+# Install sendmail.schema in the appropriate place
+#
+if [ ! -z "$SCHEMA_PATH" ]; then
+ if [ -f "${LDAP_PATH}/slapd.conf" ]; then
+ FOUND=1;
+ if [ ! -e "${SCHEMA_PATH}/sendmail.schema" ]; then
+ NEW=1;
+ fi;
+ cp -p @datadir@/sendmail/examples/ldap/$SCHEMA_NAME \
+ $SCHEMA_PATH/sendmail.schema;
+ chmod 0644 $SCHEMA_PATH/sendmail.schema;
+ chown root:root $SCHEMA_PATH/sendmail.schema;
+ fi;
+ fi;
+ };
+
+#
+# Check if OpenLDAP (2.0.x) is installed
+if [ -d /etc/ldap ]; then
+ LDAP_VERSION="$LDAP_VERSION OpenLDAP V2";
+ LDAP_PATH='/etc/ldap';
+ SCHEMA_PATH="${LDAP_PATH}/schema";
+ SCHEMA_NAME=sendmail.schema.v2;
+ install_schema;
+ fi;
+
+#
+# Check if OpenLDAP (1.x.x) is installed
+if [ -d /etc/openldap ]; then
+ LDAP_VERSION="$LDAP_VERSION OpenLDAP V1";
+ LDAP_PATH='/etc/openldap';
+ SCHEMA_PATH="${LDAP_PATH}";
+ SCHEMA_NAME=sendmail.schema.v1;
+ install_schema;
+ fi;
+
+#
+# Check if UMich-LDAP (3.3) is installed
+if [ -d /etc/umich-ldap ]; then
+ LDAP_VERSION="$LDAP_VERSION UMich-LDAP V3";
+ LDAP_PATH='/etc/umich-ldap';
+ SCHEMA_PATH="${LDAP_PATH}";
+ SCHEMA_NAME=sendmail.schema.v1;
+ install_schema;
+ fi;
+
+#
+# Tell them about the new wizbang features...
+if [ $NEW -eq 0 ]; then
+ :;
+else
+ echo " ";
+ echo "Creating/Updating $LDAP_VERSION information...";
+ echo " ";
+ echo "$SCHEMA_PATH/sendmail.schema has been installed";
+ fi;
+
+if [ $FOUND -eq 0 -a $NEW -eq 1 ]; then
+ cat <<-EOT
+
+ No local LDAP server was located (tried openldap v2/v1, umich-ldap).
+
+ If you wish to use sendmail and LDAP, you'll need to make sure your
+ server has the requisite schema setup.
+
+ You can find the schema (old and new) in the following places:
+ * $SCHEMA_PATH/sendmail.schema for the version of LDAP you
+ currently have installed (if any)
+ * @datadir@/sendmail/examples/ldap/sendmail.schema.<v>
+ where <v> is
+ <v1> for older schema (sendmail.{o,a}t.conf) format
+ <v2> for newer schema (sendmail.schema) format
+
+ If you later install a local LDAP server, be sure to re-run $0.
+ EOT
+elif [ $FOUND -eq 1 -a $NEW -eq 1 ]; then
+ cat <<-EOT
+
+ You have a local $LDAP_VERSION server! Depending upon how (and if)
+ you wish to use LDAP with sendmail, you'll want to check your
+ slapd.conf file and possibly include these files:
+ * $SCHEMA_PATH/sendmail.schema <- alias and other map support
+ * $SCHEMA_PATH/misc.schema <- OpenLDAP V2 ldap-mail-routing
+
+ If you later change your local LDAP server, be sure to re-run $0.
+ EOT
+ fi;
diff --git a/debian/local/update_mc.in b/debian/local/update_mc.in
new file mode 100644
index 0000000..b157b6a
--- /dev/null
+++ b/debian/local/update_mc.in
@@ -0,0 +1,212 @@
+#!/bin/sh -e
+#-----------------------------------------------------------------------------
+#
+# $Sendmail: update_mc,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Update Sendmail databases for Debian
+#
+# Copyright (c) 2000-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# Notes (to all):
+# * assumes makemap dbtype /etc/mail/database < /etc/mail/database
+#
+# Notes (to self):
+# * changes made herein *must* be reflected in
+# parse_mc,update_mk,update_db,debian.m4
+#
+#-----------------------------------------------------------------------------
+set -e;
+
+changed=0;
+
+#-----------------------------------------------------------------------------
+# Move sendmail.{mc,cf} from /etc/ to /etc/mail
+if [ ! -f @sysconfdir@/mail/sendmail.mc ]; then
+ if [ -f /etc/sendmail.mc ]; then
+ echo "Moving /etc/sendmail.* to /etc/mail/";
+ mv /etc/sendmail.mc @sysconfdir@/mail/sendmail.mc;
+ chown root:smmsp @sysconfdir@/mail/sendmail.mc;
+ chmod 0644 @sysconfdir@/mail/sendmail.mc;
+ changed=1;
+ fi;
+ if [ -f /etc/sendmail.cf ]; then
+ mv /etc/sendmail.cf @sysconfdir@/mail/sendmail.cf;
+ chown root:smmsp @sysconfdir@/mail/sendmail.cf;
+ chmod 0644 @sysconfdir@/mail/sendmail.cf;
+ changed=1;
+ fi;
+ fi;
+
+#-----------------------------------------------------------------------------
+# Install prototype submit.mc
+if [ ! -f @sysconfdir@/mail/submit.mc ]; then
+ cp -p @datadir@/sendmail/cf/debian/submit.mc \
+ @sysconfdir@/mail/submit.mc;
+ chown root:smmsp @sysconfdir@/mail/submit.mc;
+ chmod 0644 @sysconfdir@/mail/submit.mc;
+ fi;
+
+#-----------------------------------------------------------------------------
+# Make sure dialup support m4 files are extant
+if [ ! -f @sysconfdir@/mail/dialup.m4 ]; then
+ touch @sysconfdir@/mail/dialup.m4;
+ chown root:smmsp @sysconfdir@/mail/dialup.m4;
+ chmod 0640 @sysconfdir@/mail/dialup.m4;
+ fi;
+if [ ! -f @sysconfdir@/mail/provider.m4 ]; then
+ touch @sysconfdir@/mail/provider.m4;
+ chown root:smmsp @sysconfdir@/mail/provider.m4;
+ chmod 0640 @sysconfdir@/mail/provider.m4;
+ fi;
+
+#-----------------------------------------------------------------------------
+# Make sure not using text mailertable (it doesn't work)
+if (grep -qEe "^[[:space:]]*FEATURE\(\`?mailertable'?, \`text /etc/mail/mailertable'\)" @sysconfdir@/mail/sendmail.mc); then
+ changed=1;
+ echo "Correcting FEATURE(mailertable) in /etc/mail/sendmail.mc";
+ sed -e "s=^\([[:space:]]*\)\(\`\?\)FEATURE(\`\?mailertable'\?, \`text /etc/mail/mailertable')\(dnl\)\?=\1\2FEATURE(\`mailertable')dnl=g" \
+ @sysconfdir@/mail/sendmail.mc > @sysconfdir@/mail/sendmail.mc.new;
+ chown root:smmsp @sysconfdir@/mail/sendmail.mc.new;
+ chmod 0644 @sysconfdir@/mail/sendmail.mc.new;
+ mv @sysconfdir@/mail/sendmail.mc.new @sysconfdir@/mail/sendmail.mc;
+ fi;
+
+#-----------------------------------------------------------------------------
+# Make sure smrsh points to the correct location
+if (grep -qEe "^[[:space:]]*\`?FEATURE\(\`?smrsh'?[[:space:]]*,.*\)" \
+ @sysconfdir@/mail/sendmail.mc); then
+ changed=1;
+ echo "Correcting FEATURE(smrsh) in /etc/mail/sendmail.mc";
+ sed -e "s=\([[:space:]]*\)\(\`\?\)FEATURE(\`\?smrsh'\?[[:space:]]*,.*)\(dnl\)\?=\1\2FEATURE(\`smrsh')dnl=g" \
+ @sysconfdir@/mail/sendmail.mc > @sysconfdir@/mail/sendmail.mc.new;
+ chown root:smmsp @sysconfdir@/mail/sendmail.mc.new;
+ chmod 0644 @sysconfdir@/mail/sendmail.mc.new;
+ mv @sysconfdir@/mail/sendmail.mc.new @sysconfdir@/mail/sendmail.mc;
+ fi;
+
+#-----------------------------------------------------------------------------
+# Convert FEATURE(nouucp) to FEATURE(nouucp,reject)
+if (grep -qEe "^[[:space:]]*\`?FEATURE\(\`?nouucp'?\)" \
+ @sysconfdir@/mail/sendmail.mc); then
+ changed=1;
+ echo "Correcting FEATURE(nouucp) in /etc/mail/sendmail.mc";
+ sed -e "s=^\([[:space:]]*\)\(\`\?\)FEATURE(\`\?nouucp'\?)\(dnl\)\?=\1\2FEATURE(\`nouucp', \`reject')dnl=g" \
+ @sysconfdir@/mail/sendmail.mc > @sysconfdir@/mail/sendmail.mc.new;
+ chown root:smmsp @sysconfdir@/mail/sendmail.mc.new;
+ chmod 0644 @sysconfdir@/mail/sendmail.mc.new;
+ mv @sysconfdir@/mail/sendmail.mc.new @sysconfdir@/mail/sendmail.mc;
+ fi;
+
+#-----------------------------------------------------------------------------
+# Convert FEATURE(rbl) to FEATURE(dnsbl,rbl.maps.vix.com)
+if (grep -qEe "^[[:space:]]*\`?FEATURE\(\`?rbl'?\)" \
+ @sysconfdir@/mail/sendmail.mc); then
+ changed=1;
+ echo "Correcting FEATURE(rbl) in /etc/mail/sendmail.mc";
+ sed -e "s=^\([[:space:]]*\)\(\`\?\)FEATURE(\`\?rbl'\?)\(dnl\)\?=\1\2FEATURE(\`dnsbl', \`rbl.maps.vix.com')dnl=g" \
+ @sysconfdir@/mail/sendmail.mc > @sysconfdir@/mail/sendmail.mc.new;
+ chown root:smmsp @sysconfdir@/mail/sendmail.mc.new;
+ chmod 0644 @sysconfdir@/mail/sendmail.mc.new;
+ mv @sysconfdir@/mail/sendmail.mc.new @sysconfdir@/mail/sendmail.mc;
+ fi;
+
+#-----------------------------------------------------------------------------
+# Convert FEATURE(dont_masquerade_local) to FEATURE(local_no_masquerade)
+if [ -e @datadir@/sendmail/cf/feature/local_no_masquerade.m4 ]; then
+ if (grep -qEe "^[[:space:]]*\`?FEATURE\(\`?dont_masquerade_local'?\)" \
+ @sysconfdir@/mail/sendmail.mc); then
+ changed=1;
+ echo "Correcting FEATURE(dont_masquerade_local) in /etc/mail/sendmail.mc";
+ sed -e "s=^\([[:space:]]*\)\(\`\?\)FEATURE(\`\?dont_masquerade_local'\?)\(dnl\)\?=\1\2FEATURE(\`local_no_masquerade')dnl=g" \
+ @sysconfdir@/mail/sendmail.mc > @sysconfdir@/mail/sendmail.mc.new;
+ chown root:smmsp @sysconfdir@/mail/sendmail.mc.new;
+ chmod 0644 @sysconfdir@/mail/sendmail.mc.new;
+ mv @sysconfdir@/mail/sendmail.mc.new @sysconfdir@/mail/sendmail.mc;
+ fi;
+ fi;
+
+#-----------------------------------------------------------------------------
+# Convert FEATURE(access_db,...) to FEATURE(access_db)
+if (grep -qEe "^[[:space:]]*\`?FEATURE\(\`?access_db'?[[:space:]]*,.*\)" \
+ @sysconfdir@/mail/sendmail.mc); then
+ changed=1;
+ sed -e "s=^\([[:space:]]*\)\(\`\?\)FEATURE(\`\?access_db'\?[[:space:]]*,[[:space:]]*\`\?hash[[:space:]]*\(-o\)\?[[:space:]]*/etc/mail/access.db'\?[[:space:]]*)\(dnl\)\?=\1\2FEATURE(\`access_db')dnl=g" \
+ @sysconfdir@/mail/sendmail.mc > @sysconfdir@/mail/sendmail.mc.new;
+ chown root:smmsp @sysconfdir@/mail/sendmail.mc.new;
+ chmod 0644 @sysconfdir@/mail/sendmail.mc.new;
+ mv @sysconfdir@/mail/sendmail.mc.new @sysconfdir@/mail/sendmail.mc;
+ fi;
+
+#-----------------------------------------------------------------------------
+# change include(/usr/share/sendmail/sendmail.cf/m4/cf.m4)
+if (grep -qEe "^[[:space:]]*\`?include\(\`?@datadir@/sendmail/sendmail.cf/m4/cf.m4'?\)" \
+ @sysconfdir@/mail/sendmail.mc); then
+ sed -e "s=sendmail/sendmail.cf=sendmail/cf=g" \
+ @sysconfdir@/mail/sendmail.mc > @sysconfdir@/mail/sendmail.mc.new;
+ chown root:smmsp @sysconfdir@/mail/sendmail.mc.new;
+ chmod 0644 @sysconfdir@/mail/sendmail.mc.new;
+ mv @sysconfdir@/mail/sendmail.mc.new @sysconfdir@/mail/sendmail.mc;
+ sed -e "s=sendmail/sendmail.cf=sendmail/cf=g" \
+ @sysconfdir@/mail/submit.mc > @sysconfdir@/mail/submit.mc.new;
+ chown root:smmsp @sysconfdir@/mail/submit.mc.new;
+ chmod 0644 @sysconfdir@/mail/submit.mc.new;
+ mv @sysconfdir@/mail/submit.mc.new @sysconfdir@/mail/submit.mc;
+ fi;
+
+#-----------------------------------------------------------------------------
+# Add include(/usr/share/sendmail/cf/m4/cf.m4)
+if (grep -qEe "^[[:space:]]*\`?include\(\`?@datadir@/sendmail/cf/m4/cf.m4'?\)" \
+ @sysconfdir@/mail/sendmail.mc); then
+ true;
+else
+ changed=1;
+ echo "Adding include(.../cf.m4) to /etc/mail/sendmail.mc";
+ sed -e "s=^\([[:space:]]*\)\(\`\?\)VERSIONID(=\1\2include(\`@datadir@/sendmail/cf/m4/cf.m4')dnl\\
+\1\2VERSIONID(=" \
+ @sysconfdir@/mail/sendmail.mc > @sysconfdir@/mail/sendmail.mc.new;
+ chown root:smmsp @sysconfdir@/mail/sendmail.mc.new;
+ chmod 0644 @sysconfdir@/mail/sendmail.mc.new;
+ mv @sysconfdir@/mail/sendmail.mc.new @sysconfdir@/mail/sendmail.mc;
+ fi;
+
+#-----------------------------------------------------------------------------
+# Add define(`_USE_ETC_MAIL_')dnl
+if (grep -qEe "^[[:space:]]*\`?define\(\`?_USE_ETC_MAIL_" \
+ @sysconfdir@/mail/sendmail.mc); then
+ true;
+else
+ changed=1;
+ sed -e "s=^\([[:space:]]*\)\(\`\?\)include(\`\?@datadir@/sendmail/cf/m4/cf.m4'\?)\(dnl\)\?=\1\2define(\`_USE_ETC_MAIL_')dnl\\
+include(\`@datadir@/sendmail/cf/m4/cf.m4')dnl=" \
+ @sysconfdir@/mail/sendmail.mc > @sysconfdir@/mail/sendmail.mc.new;
+ chown root:smmsp @sysconfdir@/mail/sendmail.mc.new;
+ chmod 0644 @sysconfdir@/mail/sendmail.mc.new;
+ mv @sysconfdir@/mail/sendmail.mc.new @sysconfdir@/mail/sendmail.mc;
+ fi;
+
+#-----------------------------------------------------------------------------
+# Add DOMAIN(debian-mta)
+if (grep -qEe "^[[:space:]]*\`?DOMAIN\(\`?debian-mta'?\)" \
+ @sysconfdir@/mail/sendmail.mc); then
+ true;
+else
+ changed=1;
+ echo "Adding DOMAIN(debian-mta) to /etc/mail/sendmail.mc";
+ sed -e "s=^\([[:space:]]*\)\(\`\?\)OSTYPE(\`\?debian'\?)\(dnl\)\?=\1\2OSTYPE(\`debian')dnl\\
+\1\2DOMAIN(\`debian-mta')dnl=" \
+ @sysconfdir@/mail/sendmail.mc > @sysconfdir@/mail/sendmail.mc.new;
+ chown root:smmsp @sysconfdir@/mail/sendmail.mc.new;
+ chmod 0644 @sysconfdir@/mail/sendmail.mc.new;
+ mv /etc/mail/sendmail.mc.new /etc/mail/sendmail.mc
+ fi;
+
+#-----------------------------------------------------------------------------
+# Cleanup submit.mc
+sed -e "/^define(\`\?confRUN_AS_USER.*$/d" \
+ -e "/^define(\`\?confTRUSTED_USER.*$/d" \
+ @sysconfdir@/mail/submit.mc > @sysconfdir@/mail/submit.mc.new;
+ chown root:smmsp @sysconfdir@/mail/submit.mc.new;
+ chmod 0644 @sysconfdir@/mail/submit.mc.new;
+ mv /etc/mail/submit.mc.new /etc/mail/submit.mc
+
+exit $changed;
diff --git a/debian/local/update_mk.in b/debian/local/update_mk.in
new file mode 100644
index 0000000..02376ec
--- /dev/null
+++ b/debian/local/update_mk.in
@@ -0,0 +1,661 @@
+#!/usr/bin/perl -w
+#------------------------------------------------------------------------
+#
+# $Sendmail: update_mk,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Create /etc/mail/Makefile for Debian Sendmail databases
+#
+# Copyright 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# Notes (to all):
+# *
+#
+# Notes (to self):
+# * Should actually put data in some files (local-host-names, etc)
+#
+#------------------------------------------------------------------------
+#
+# Initialization of the perl environment
+use strict; # be kosher
+use Cwd; # provide cwd()
+use Env; # A few environmental references
+use integer; # Peformance
+use Sys::Hostname; # make sure we have a valid hostname
+use Getopt::Long; # parameter handling
+
+# Local libraries - for Debian Sendmail Perl helper functions
+# BEGIN { $main::my_path = substr($0,$[,rindex($0,'/')) };
+use lib ('.', substr($0,$[,rindex($0,'/')), "@datadir@/sendmail");
+require Parse_mc;
+
+# Version of this program
+#($main::MYNAME = $main::0) =~ s|.*/||;
+#$main::Author = "Richard Nelson";
+#$main::AuthorMail = "cowboy\@debian.org";
+#$main::Version = '$Revision: 2.00 $ ';
+$main::program_name = $0;
+$main::program_version = '@sm_version@';
+$main::program_date = '@sm_date@ @sm_time@ cowboy';
+$main::debug = 0;
+
+my $interp_pgm = "$^X";
+my $interp_vrm = $];
+$interp_vrm = ("$^V" | '000') if (defined $^V);
+my $current_time = scalar localtime;
+my $user = getlogin || (getpwuid($<))[0] || "Unknown!!";
+my $hostname = hostname();
+my $directory = getcwd();
+
+my $Makefile_def = "@sysconfdir@/mail/Makefile";
+# List of database entries that will be created if not found
+my %created_dbs;
+my @created_dbs;
+# A few files (like exposed-users) can be listed >1 times !
+my %created_files = ();
+my $reload_stamp = "@localstatedir@/run/sendmail/stampdir/reload";
+
+#
+#------------------------------------------------------------------------------
+# Finally, some code (almost)
+#------------------------------------------------------------------------------
+#
+# Argument handling...
+$main::opt_help='';
+$main::opt_output_file='';
+$main::opt_input_file='';
+$main::opt_debug='';
+my @options = qw(
+ help|h
+ output-file|output_file|o:s
+ input-file|input_file|i:s
+ debug!
+ );
+my $result = GetOptions(@options);
+if ( ! $result ) {
+ die "Terminating due to parameter error";
+ };
+if ( $main::opt_help ) {
+ warn "$main::program_name $main::program_version $main::program_date\n";
+ warn "$0 \n";
+ warn " -help\n" if $main::opt_help;
+ warn " -debug\n" if $main::opt_debug;
+ warn " -o $main::opt_output_file\n" if $main::opt_output_file;
+ warn " -i $main::opt_input_file\n" if $main::opt_input_file;
+ exit 0;
+ };
+
+my $Makefile = $main::opt_output_file || $Makefile_def;
+${Parse_mc::database_file} = $main::opt_input_file
+ if $main::opt_input_file;
+# $main::debug is used in Parse_mc !
+$main::debug = $main::opt_debug || $main::debug;
+
+# Let them know wtf is going on...
+print STDOUT "Creating ${Makefile}...\n";
+
+# Read the mc/m4 files
+&Parse_mc::read_dbs($Parse_mc::database_file, '');
+
+# Determine names with which we shall work
+my @databases = &get_names();
+
+# Write out the textual representation
+&write_make;
+
+#
+#------------------------------------------------------------------------------
+# Obtain list of candidate databases from sendmail.mc
+#------------------------------------------------------------------------------
+sub get_names {
+ my @names;
+
+ # Database types we know how to handle
+ my %make_types = (
+ 'btree' => 1
+ ,'dbm' => 1
+ ,'hash' => 1
+ ,'m4' => 1
+ ,'newaliases' => 1
+ ,'parse_mc' => 1
+ ,'update_conf' => 1
+ ,'update_mk' => 1
+ ,'QUEUE_GROUP' => 1
+ );
+
+ # Add any qualified databases to the list
+ foreach my $entry (&Parse_mc::names_dbs()) {
+ my ($class, $flags, $files, $options) =
+ &Parse_mc::entry_dbs($entry);
+ if ( (exists($make_types{$entry}) or
+ exists($make_types{$class}))
+ and @{$files}[0] ne '-'
+ and ! exists($created_dbs{$entry})) {
+ push @names, $entry;
+ push @created_dbs, $entry;
+ $created_dbs{$entry} = '';
+ };
+ };
+
+ return @names;
+ };
+
+#
+#------------------------------------------------------------------------------
+# Create Makefile
+#------------------------------------------------------------------------------
+sub write_make {
+ my $ofh = new FileHandle;
+
+ $Makefile = '&STDOUT' if ($Makefile eq '-');
+ unless ( open($ofh, ">$Makefile") ) {
+ warn("Could not open $Makefile($!), using STDOUT.\n");
+ open($ofh, ">&STDOUT");
+ };
+ $Makefile = '-' if ($Makefile eq '&STDOUT');
+
+ &write_header($ofh);
+ &write_target_clean($ofh);
+ &write_target_restart($ofh);
+ &write_target_sendmail($ofh);
+ &write_targets($ofh);
+ &write_files($ofh);
+ &write_footer($ofh);
+
+ close $ofh;
+ if ($Makefile eq $Makefile_def) {
+ my $gid = getgrnam('smmsp');
+ chown '0', $gid, $Makefile;
+ chmod 0754, $Makefile;
+ };
+ };
+
+#
+#------------------------------------------------------------------------------
+# Write Makefile header
+#------------------------------------------------------------------------------
+sub write_header {
+ my ($ofh) = @_;
+
+ print $ofh <<"EOT";
+#!/usr/bin/make -f
+####################################################################
+##### This file is automagically generated -- edit at your own risk
+#####
+##### Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#####
+##### file: ${Makefile} Makefile for Sendmail databases
+##### generated via: (${interp_pgm} ${interp_vrm})
+##### ${main::program_name}
+##### version: ${main::program_version} ${main::program_date}
+##### by: ${user}\@${hostname}
+##### on: ${current_time}
+##### in: ${directory}
+##### input files: ${Parse_mc::database_file}
+#####
+##### Usage:
+##### 1) Make all targets upto date - use one of the following:
+##### A) \`(cd @sysconfdir@/mail && make)\`
+##### B) \`make -f ${Makefile}\`
+##### C) \`${Makefile}\`
+##### 2) Force update of <target> - Add <target> to one of the
+##### prior commands ie, \`${Makefile} access\`. Most
+##### any reasonable <target> value is accepted.
+#####
+####################################################################
+SHELL=/bin/sh
+
+.SUFFIXES:
+.PRECIOUS: $Makefile
+
+#
+# all, the default target, will update everything
+#
+.PHONY: all
+all: sendmail $reload_stamp
+EOT
+ };
+
+#
+#------------------------------------------------------------------------------
+# Write Makefile 'CLEAN' target
+#------------------------------------------------------------------------------
+sub write_target_clean {
+ my ($ofh) = @_;
+ my @names;
+
+ %created_files = ();
+ foreach my $entry (@databases) {
+ next if ($entry eq 'QUEUE_GROUP' or $entry eq 'Makefile');
+ my ($class, $flags, $files, $options) =
+ &Parse_mc::entry_dbs($entry);
+ foreach my $file (@{$files}) {
+ next if ( $file eq '-'
+ or exists($created_files{$file}) );
+ $created_files{$file} = '';
+ my $dbname;
+ if ($class eq 'parse_mc' or $class eq 'update_mk'
+ or $class eq 'm4') {
+ $dbname = "@sysconfdir@/mail/$entry";
+ }
+ elsif ($class eq 'update_conf') {
+ $dbname = "@sysconfdir@/cron.d/sendmail";
+ }
+ elsif ($class eq 'btree' or $class eq 'hash'
+ or $class eq 'newaliases') {
+ $dbname = "$file.db";
+ }
+ else {
+ $dbname = $file;
+ };
+ push @names, $dbname;
+ };
+ };
+
+ print $ofh <<"EOT";
+
+#
+# clean target, remove {sendmail,submit}.cf and generated databases
+#
+EOT
+ print $ofh
+ ".PHONY: clean\n",
+ "clean: FORCE\n",
+ "\trm -f ",join(";\n\trm -f ", @names),";\n";
+ };
+
+#
+#------------------------------------------------------------------------------
+# Write Makefile 'RESTART' target
+#------------------------------------------------------------------------------
+sub write_target_restart {
+ my ($ofh) = @_;
+ my $file;
+
+ print $ofh <<"EOT";
+
+#
+# restart target, check to see if sendmail needs to be restarted
+#
+.PHONY: noreload norestart
+noreload norestart: FORCE
+ \@touch $reload_stamp;
+
+.PHONY: reload restart
+reload restart: FORCE
+ \@rm -f $reload_stamp;
+ \@\$(MAKE) -sf $Makefile $reload_stamp;
+
+EOT
+
+ # Spew secondary target of actual restart
+ %created_files = ();
+ my @right;
+ foreach my $entry (sort &Parse_mc::restart_dbs()) {
+ if (! exists($created_dbs{$entry})) {
+ push @created_dbs, $entry;
+ $created_dbs{$entry} = '';
+ };
+ my ($class, $flags, $files, $options) =
+ &Parse_mc::entry_dbs($entry);
+ foreach my $file (@{$files}) {
+ next if ( $file eq '-'
+ or exists($created_files{$file}) );
+ $created_files{$file} = '';
+ my $dbname = $file;
+ $dbname =~ s/\.mc$/\.cf/;
+ push @right, "$dbname";
+ };
+ };
+
+ print $ofh "$reload_stamp: \\\n\t",
+ join(" \\\n\t", @right), "\n",
+ "\t\@if [ ! -f \$\@ ]; then \\\n",
+ "\t\techo 'A forced reload...'; \\\n",
+ "\telse \\\n",
+ "\t\techo 'The following file(s) have changed:'; \\\n",
+ "\t\techo ' \$?'; \\\n",
+ "\t\tfi;\n",
+ "\t\@echo '** ** You should issue ",
+ "\`@sysconfdir@/init.d/sendmail reload\` ** **';\n";
+ };
+
+#
+#------------------------------------------------------------------------------
+# Write Sendmail dependancies
+#------------------------------------------------------------------------------
+sub write_target_sendmail {
+ my ($ofh) = @_;
+
+ print $ofh <<"EOT";
+
+#
+# sendmail targets, depend upon *ALL* relevant files/databases
+#
+.PHONY: sendmail
+sendmail: sendmail_files sendmail_dbs
+
+EOT
+ my (@smfiles, @smdbs);
+
+ %created_files = ();
+ foreach my $entry (@created_dbs) {
+ my ($class, $flags, $files, $options) =
+ &Parse_mc::entry_dbs($entry);
+ foreach my $file (@{$files}) {
+ next if $file eq '-';
+ next if $file eq 'ldap'; # ALIAS hack
+ if ($class eq 'parse_mc' or $class eq 'update_mk'
+ or $class eq 'm4') {
+ push @smfiles, "$file"
+ if (!exists($created_files{$file}));
+ $created_files{$file} = '';
+ push @smdbs, "@sysconfdir@/mail/$entry";
+ }
+ elsif ($class eq 'update_conf') {
+ push @smdbs, "@sysconfdir@/cron.d/sendmail";
+ }
+ elsif ($class eq 'btree' or $class eq 'hash'
+ or $class eq 'newaliases') {
+ push @smfiles, "$file"
+ if (!exists($created_files{$file}));
+ $created_files{$file} = '';
+ push @smdbs, "$file.db";
+ }
+ else {
+ push @smfiles, "$file"
+ if (!exists($created_files{$file}));
+ $created_files{$file} = '';
+ };
+ };
+ };
+
+ print $ofh ".PHONY: sendmail_files\n",
+ "sendmail_files: \\\n\t",
+ join(" \\\n\t", @smfiles), "\n\n";
+ print $ofh ".PHONY: sendmail_dbs\n",
+ "sendmail_dbs: \\\n\t",
+ join(" \\\n\t", @smdbs), "\n";
+ };
+
+#
+#------------------------------------------------------------------------------
+# Write Makefile individual targets
+#------------------------------------------------------------------------------
+sub write_targets {
+ my ($ofh) = @_;
+ my $file;
+
+ print $ofh <<"EOT";
+
+#
+# Individual database targets
+#
+
+#
+# Default db type is hash (Must be in /etc/mail, or
+# fully qualify the dataset for this target to work)
+#
+%.db: % FORCE
+ \@echo 'Updating \$\@...';
+ \@@sbindir@/makemap hash \$\@.new.db < \$<;
+ \@chown root:smmsp \$\@.new.db;
+ \@chmod 0644 \$\@.new.db
+ \@mv -f \$\@.new.db \$\@;
+EOT
+
+ # Spew primary target of <target>
+ foreach my $entry (@databases) {
+ my ($class, $flags, $files, $options) =
+ &Parse_mc::entry_dbs($entry);
+ my @names;
+ my $left = '';
+ my $right = '';
+ my $sleft = '';
+ my $dbname = '';
+ print $ofh "\n";
+
+ # Create short name(s) for database entries
+ $sleft .= "$entry ";
+ if ($class eq 'newaliases' or $class eq 'parse_mc'
+ or $class eq 'update_mk' or $class eq 'update_conf') {
+ $sleft = 'makefile make ' if ($class eq 'update_mk');
+ $sleft .= 'cron ' if ($class eq 'update_conf');
+ $sleft .= "$class ";
+ };
+
+ foreach my $file (@{$files}) {
+ next if $file eq '-';
+ next if $file eq 'ldap'; # ALIAS hack
+ if ($entry eq 'QUEUE_GROUP') {
+ $dbname = '';
+ $left = $entry;
+ }
+ elsif ($class eq 'parse_mc' or $class eq 'update_mk'
+ or $class eq 'm4') {
+ $dbname = "@sysconfdir@/mail/$entry";
+ }
+ elsif ($class eq 'update_conf') {
+ $dbname = "@sysconfdir@/cron.d/sendmail";
+ }
+ elsif ($class eq 'btree' or $class eq 'hash'
+ or $class eq 'newaliases') {
+ $dbname = "$file.db";
+ }
+ else {
+ $dbname = $file;
+ };
+ $left .= "$dbname ";
+ $right .= " $file";
+
+ # Create short name(s) for database entries
+ if ($class ne 'parse_mc' and $class ne 'update_mk'
+ and $class ne 'update_conf'
+ and $entry ne 'QUEUE_GROUP'
+ ) {
+ my $dbsname = "$dbname";
+ $dbsname =~ s/\/etc\/mail\///;
+ $sleft .= "$dbsname " if ($entry ne $dbsname);
+ if ($file ne $dbname) {
+ $dbsname =~ s/\.db//;
+ $sleft .= "$dbsname " if ($entry ne $dbsname);
+ };
+ };
+ };
+
+ # Spew out a phony entry suitable for FORCE
+ print $ofh '.PHONY: ', $sleft, "\n";
+ print $ofh $sleft,':', $right, " FORCE\n"
+ if ($entry ne 'QUEUE_GROUP');
+ if ($class eq 'update_mk') {
+ print $ofh "\t\@touch $right;\n",
+ "\t\@\$(MAKE) -sf $Makefile $left;\n";
+ }
+ elsif ($entry ne 'QUEUE_GROUP') {
+ print $ofh "\t\@rm -f $left;\n",
+ "\t\@\$(MAKE) -sf $Makefile $left;\n";
+ };
+
+ #
+ # Spew out the whole enchilada for this database
+ # Hidden dependancies (need to parse includes)
+ $right .= join(''," @sysconfdir@/mail/dialup.m4",
+ " @sysconfdir@/mail/provider.m4")
+ if ($entry eq 'sendmail.cf');
+ print $ofh $left, ':', $right, "\n";
+ next if ($entry eq 'QUEUE_GROUP');
+ print $ofh "\t\@echo 'Updating $entry ...';\n";
+ print $ofh "\t\@@sbindir@/sendmail -bi || true;\n"
+ if ($class eq 'newaliases');
+ print $ofh "\t\@@datadir@/sendmail/parse_mc || true;\n"
+ if ($class eq 'parse_mc');
+ print $ofh "\t\@@datadir@/sendmail/update_mk || true;\n"
+ if ($class eq 'update_mk');
+ print $ofh "\t\@@datadir@/sendmail/update_conf || true;\n"
+ if ($class eq 'update_conf');
+ foreach my $file (@{$files}) {
+ next if ( $file eq 'ldap' ); # ALIAS hack
+ my $dbname = $file;
+ my $newname = $file;
+ my $mode = '0644';
+ $mode = '0640' if ($entry eq 'authinfo'
+ or $entry eq 'access_db');
+ $mode = '0644' if ($class eq 'm4');
+ $mode = '0754' if ($class eq 'update_mk');
+ $mode = '02750' if ($entry eq 'QUEUE_GROUP');
+ if ($class eq 'btree' or $class eq 'hash') {
+ $dbname .= '.db';
+ $newname .= '.new.db';
+ if (index($flags, '-o') == -1) {
+ print $ofh "\t\@@sbindir@/makemap $class $newname \\\n",
+ "\t\t< $file;\n",
+ "\t\@chown root:smmsp $newname;\n",
+ "\t\@chmod $mode $newname;\n",
+ "\t\@mv -f $newname $dbname;\n";
+ }
+ else {
+ print $ofh
+ "\t\@if [ -s $file ]; then \\\n",
+ "\t\t@sbindir@/makemap $class $newname \\\n",
+ "\t\t\t< $file;\\\n",
+ "\t\tchown root:smmsp $newname;\\\n",
+ "\t\tchmod $mode $newname;\\\n",
+ "\t\tmv -f $newname $dbname;\\\n",
+ "\t\tfi;\n";
+ };
+ }
+ elsif ($class eq 'newaliases') {
+ $newname .= '.db';
+ print $ofh "\t\@if [ -f $newname ]; then \\\n",
+ "\t\tchown root:smmsp $newname; \\\n",
+ "\t\tchmod $mode $newname; \\\n",
+ "\t\tfi;\n";
+ }
+ elsif ($class eq 'parse_mc' or $class eq 'update_mk') {
+ $newname = "@sysconfdir@/mail/$entry";
+ print $ofh "\t\@chown root:smmsp $newname;\n",
+ "\t\@chmod $mode $newname;\n";
+ }
+ elsif ($class eq 'm4') {
+ $dbname =~ s/\.mc$/\.cf/;
+ $newname =~ s/\.mc$/\.cf\.new/;
+ my $lead = "\t";
+ my $leadh = "\t\@";
+ my $lead2 = "\t\t";
+ my $trail = "";
+ if ($entry eq 'submit.cf') {
+ $lead = "\t\t";
+ $leadh = "\t\t";
+ $lead2 = "\t\t\t";
+ $trail = "\\";
+ };
+ print $ofh
+ "\t\@rm -f ${dbname}.errors\n";
+ print $ofh
+ "\t\@if [ -f @datadir@/sendmail/cf/feature/msp.m4 ]; ",
+ "then \\\n" if ($entry eq 'submit.cf');
+ print $ofh
+ "${leadh}m4 $file > $newname \\\n",
+ "${lead2}2> ${dbname}.errors || true; $trail\n",
+ "${leadh}chown root:smmsp $newname; $trail\n",
+ "${leadh}chmod $mode $newname; $trail\n",
+ "${leadh}mv -f $newname $dbname; $trail\n",
+ "${leadh}if [ -s ${dbname}.errors ]; then \\\n",
+ "${lead2}chown root:smmsp ${dbname}.errors; \\\n",
+ "${lead2}cat ${dbname}.errors; \\\n",
+ "${lead}else \\\n",
+ "${lead2}rm -f ${dbname}.errors; \\\n",
+ "${lead2}fi; $trail\n";
+ print $ofh
+ "${lead}fi;\n" if ($entry eq 'submit.cf');
+ };
+ };
+ };
+ };
+
+#
+#------------------------------------------------------------------------------
+# Write Makefile file targets (create any missing files)
+#------------------------------------------------------------------------------
+sub write_files {
+ my ($ofh) = @_;
+
+ print $ofh <<"EOT";
+
+#
+# Individual file targets - create any requisite files
+#
+EOT
+
+ %created_files = ();
+ foreach my $entry (@created_dbs) {
+ my ($class, $flags, $files, $options) =
+ &Parse_mc::entry_dbs($entry);
+
+ # These are done above...
+ next if ($entry eq 'databases'
+ or $entry eq 'Makefile');
+
+ foreach my $file (@{$files}) {
+ next if ( $file eq '-'
+ or exists($created_files{$file}) );
+ $created_files{$file} = '';
+ my $mode = '0644';
+ $mode = '0640' if ($entry eq 'authinfo'
+ or $entry eq 'access_db');
+ $mode = '0644' if ($class eq 'm4');
+ $mode = '0754' if ($class eq 'update_mk');
+ $mode = '02750' if ($entry eq 'QUEUE_GROUP');
+ print $ofh "\n$file:\n",
+ "\t\@echo 'Creating $file';\n";
+ if ($entry eq 'QUEUE_GROUP') {
+ print $ofh "\t\@install -d",
+ " -o root -g smmsp -m $mode $file;\n",
+ "\t\@chown root:smmsp $file;\n",
+ "\t\@chmod $mode $file;\n";
+ }
+ elsif ($entry eq 'sendmail.cf') {
+ print $ofh "\t\@@sbindir@/sendmailconfig",
+ " --no-reload;\n";
+ }
+ elsif ($entry eq 'submit.cf') {
+ print $ofh "\t\@cp @datadir@/sendmail/",
+ "cf/debian/submit.mc \\\n",
+ "\t\t$file;\n",
+ "\t\@chown root:smmsp $file;\n",
+ "\t\@chmod $mode $file;\n";
+ }
+ elsif ($entry eq 'crontab') {
+ print $ofh "\t\@@datadir@/sendmail/update_conf;\n";
+ }
+ # FIXME: come back and create real data
+ # where needed (local-host-names, etc)
+ elsif (index($flags, '-o') == -1) {
+ print $ofh "\t\@touch $file;\n",
+ "\t\@chown root:smmsp $file;\n",
+ "\t\@chmod $mode $file;\n";
+ }
+ elsif (index($flags, '-o') != -1) {
+ print $ofh "\t# Optional file...\n";
+ };
+ };
+ };
+ };
+
+#
+#------------------------------------------------------------------------------
+# Write Makefile footer
+#------------------------------------------------------------------------------
+sub write_footer {
+ my ($ofh) = @_;
+
+print $ofh <<"EOT";
+
+#
+# FORCE target, allow one to override dependancies
+#
+.PHONY: FORCE
+FORCE: ;
+
+EOT
+ };
+
diff --git a/debian/local/update_notices b/debian/local/update_notices
new file mode 100644
index 0000000..522c1ef
--- /dev/null
+++ b/debian/local/update_notices
@@ -0,0 +1,177 @@
+#!/bin/sh
+#-----------------------------------------------------------------------------
+#
+# Update Notices for Debian Sendmail
+#
+# Copyright (c) 2001-2002 Richard Nelson. All Rights Reserved.
+# Time-stamp: <2001/08/15 15:00:00 cowboy>
+#
+# Notes (to all):
+# *
+#
+# Notes (to self):
+# *
+#
+#-----------------------------------------------------------------------------
+set -e;
+notices=0;
+version=$1;
+export LANG=C; # for the comparison of mail version...
+
+#-----------------------------------------------------------------------------
+# Notice Item
+#-----------------------------------------------------------------------------
+Notice_Item () {
+ if [ $notices -eq "0" ]; then
+ if [ -z $version ]; then
+ echo '
+*** WELCOME ***.................*** WELCOME ***.................*** WELCOME ***
+';
+ else
+ echo '
+*** IMPORTANT ***..............*** IMPORTANT ***..............*** IMPORTANT ***
+';
+ fi;
+ fi;
+ notices=`expr $notices + 1`;
+ echo '';
+ echo "${notices}: .....................................................";
+ cat -;
+ };
+
+#-----------------------------------------------------------------------------
+if [ -z "$version" ]; then
+ Notice_Item <<-EOT;
+ Sendmail is a powerful MTA, and you may find the sendmail-doc package
+ useful in the configuration phase. You should find even the few files
+ in /usr/share/doc/sendmail useful - they note recent Sendmail and Debian
+ changes, along with information on the features present in this package.
+ EOT
+ fi;
+
+#-----------------------------------------------------------------------------
+if test ! -z "$version" && \
+ (dpkg --compare-versions "$version" lt "00.00.00-00"); then
+ Notice_Item <<-EOT;
+ EOT
+ fi;
+
+#-----------------------------------------------------------------------------
+if test ! -z "$version" && \
+ (dpkg --compare-versions "$version" lt "8.12.6-5"); then
+ Notice_Item <<-EOT;
+
+ The group smmsp may have been created within the user, not
+ system range. To correct this issue, the group will be deleted
+ and recreated.
+
+ For this to work, you will need to let sendmailconfig run, or
+ manually run /usr/share/sendmail/update_sendmail immediately
+ after saying 'no' to the sendmailconfig questions.
+ EOT
+ fi;
+
+#-----------------------------------------------------------------------------
+if test ! -z "$version" && \
+ (dpkg --compare-versions "$version" lt "8.12.2-1"); then
+ Notice_Item <<-EOT;
+ smrsh functionality has moved from /usr/lib/sm.bin to /etc/mail/smrsh.
+
+ Sendmail will populate the directory with some of the more common MDAs
+ (procmail,maildrop,deliver,etc.) that are installed, but doesn't know
+ about listserver type programs (majordomo, mailman, etc.) So you'll
+ need to place links to those binaries in /etc/mail/smrsh.
+
+ Also, if you add a new MDA, you'll need to rerun sendmailconfig to
+ make sure the MDA is available for smrsh processing!
+ EOT
+ Notice_Item <<-EOT;
+ Sendmail has changed to use the standard uid/gid smmsp for the MSP.
+ If you've not changed queue directories, you'll be all set.
+
+ However, if you've moved queue directories, you'll need to make sure
+ that all of them are 0750 root:smmsp
+ EOT
+ fi;
+
+#-----------------------------------------------------------------------------
+if test ! -z "$version" && \
+ (dpkg --compare-versions "$version" lt "8.12.0-1"); then
+ Notice_Item <<-EOT;
+ The automatic virtual-host changes have been removed because
+ they caused problems for some people...
+
+ If you need to do ip based virtual hosting, add HACK(\`virthost_by_ip')dnl
+ to your sendmail.mc and read /usr/share/doc/sendmail/op/op.{ps,txt}.gz
+ for the 'b' modifier to DAEMON_OPTIONS.
+ EOT
+ Notice_Item <<-EOT;
+ If you'd like to support MSP->MTA and/or MTA->MTA authentication, you
+ can get a good start by using HACK(\`debian_auth')dnl.
+ EOT
+ Notice_Item <<-EOT;
+ The commands 'mailq' and 'hoststat' are now useable by normal users.
+ EOT
+ Notice_Item <<-EOT;
+ Sendmail now defaults to being uid=mail (instead of daemon) when
+ calling the MDA to deliver mail. This means that if you have files
+ that are written to by the MDA, they need to be writable by uid=mail!
+ EOT
+ fi;
+
+#-----------------------------------------------------------------------------
+if test ! -z "$version" && \
+ (dpkg --compare-versions "$version" lt "8.11.6+8.12.0.Beta19-1"); then
+ Notice_Item <<-EOT;
+ You can now control the collection of host statistics via settings in
+ /etc/mail/sendmail.conf, please edit the file to your needs.
+ EOT
+ fi;
+
+#-----------------------------------------------------------------------------
+if test ! -z "$version" && \
+ (dpkg --compare-versions "$version" lt "8.11.5+8.12.0.Beta17-1"); then
+ Notice_Item <<-EOT;
+ You can now control the collection of mailer statistics via settings in
+ /etc/mail/sendmail.conf, please edit the file to your needs.
+ EOT
+ fi;
+
+#-----------------------------------------------------------------------------
+if test ! -z "$version" && \
+ (dpkg --compare-versions "$version" lt "8.11.3+8.12.0.Beta7-4"); then
+ Notice_Item <<-EOT;
+ Sendmail has extended control over queue management, and these changes
+ can cause a performance drop if you don't change your local
+ configuration.
+
+ Old:
+ MaxDaemonChildren controlled number of listener *and* queue runners
+
+ Sendmail would fork as many children as needed to run the queues
+
+ New:
+ MaxDaemonChildren still works as a total limit
+ MaxQueueChildren limits *only* the number of total queue runners
+ MaxRunnersPerQueue limits the number of runners per individual
+ queue (in 8.11+, you can have multiple queues) -- *AND* you
+ can override this global limit on per queue basis!
+ MaxQueueRunSize limits the number of messages processed per queue run
+
+ Sendmail only forks upto MaxRunnersPerQueue for each queue per run
+
+ The gotcha here is that MaxRunnersPerQueue defaults to one !
+
+ I've changed the default MaxRunnersPerQueue to 5, so deliveries aren't
+ single threaded, but you may want to have more or less than 5.
+ EOT
+ fi;
+
+#-----------------------------------------------------------------------------
+if [ "$notices" -ne "0" ]; then
+ echo '';
+ echo -n 'Press [ENTER] to continue';
+ read yn;
+ fi;
+#-----------------------------------------------------------------------------
+
diff --git a/debian/local/update_sendmail b/debian/local/update_sendmail
new file mode 100644
index 0000000..e7c5fe1
--- /dev/null
+++ b/debian/local/update_sendmail
@@ -0,0 +1,77 @@
+#!/bin/sh -e
+#-----------------------------------------------------------------------------
+#
+# Update Sendmail environment for Debian
+#
+# Copyright (c) 2001-2001 Richard Nelson. All Rights Reserved.
+# Time-stamp: <2001/01/17 10:00:00 cowboy>
+#
+# Notes (to all):
+# *
+#
+# Notes (to self):
+# *
+#
+#-----------------------------------------------------------------------------
+set -e;
+
+# Path to other sendmail helpers
+sm_path=$(dirname $0);
+
+# control amount of output
+verbosity=0;
+
+# flag used to indicate a dataset has been moved, may need another update
+changed=0;
+
+#-------------------------------------------------------------
+# Make sure the system is setup
+if [ -x $sm_path/update_sys ]; then
+ $sm_path/update_sys || changed=1;
+ fi;
+
+#-------------------------------------------------------------
+# update smrsh/sensible-mda information if possible
+if [ -x $sm_path/update_smrsh ]; then
+ $sm_path/update_smrsh || true;
+ fi;
+
+#-------------------------------------------------------------
+# update LDAP information if possible
+if [ -x $sm_path/update_ldap ]; then
+ $sm_path/update_ldap || true;
+ fi;
+
+#-------------------------------------------------------------
+# update SMTP AUTH (SASL) information if possible
+if [ -x $sm_path/update_auth ]; then
+ $sm_path/update_auth || true;
+ fi;
+
+#-------------------------------------------------------------
+# update TLS(SSL) information if possible
+if [ -x $sm_path/update_tls ]; then
+ $sm_path/update_tls || true;
+ fi;
+
+#-------------------------------------------------------------
+# Check and update (if needed) /etc/hosts.allow
+if [ -x $sm_path/update_tcpd ]; then
+ $sm_path/update_tcpd || true;
+ fi;
+
+#-------------------------------------------------------------
+# Perform some [safe] updates to an existing sendmail.mc to make
+# sure it is compatible with the current executables.
+if [ -x $sm_path/update_mc ]; then
+ $sm_path/update_mc || changed=1;
+ fi;
+
+#-------------------------------------------------------------
+# Make sure the databases are in the expected locations
+if [ -x $sm_path/update_db ]; then
+ $sm_path/update_db || changed=1;
+ fi;
+
+#-------------------------------------------------------------
+exit $changed
diff --git a/debian/local/update_smrsh.in b/debian/local/update_smrsh.in
new file mode 100644
index 0000000..8a27d6d
--- /dev/null
+++ b/debian/local/update_smrsh.in
@@ -0,0 +1,73 @@
+#!/bin/sh -e
+#-----------------------------------------------------------------------------
+#
+# $Sendmail: update_smrsh,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Update MDA programs used by Sendmail for Debian
+#
+# Copyright (c) 2002-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# Notes (to all):
+# * The entries in /etc/mail/smrsh are used by the feature(smrsh) and
+# sensible-mda.
+#
+# Notes (to self):
+# *
+#
+#-----------------------------------------------------------------------------
+set -e;
+
+# flag used to indicate a dataset has been moved, may need another update
+changed=0;
+new=1;
+
+def_progs="\
+ @libexecdir@/mail.local \
+ @libexecdir@/sensible-mda \
+ /usr/bin/vacation \
+ /usr/bin/procmail \
+ /usr/bin/maildrop \
+ /usr/bin/deliver \
+ ";
+
+echo " ";
+echo "Checking for installed MDAs...";
+
+#------------------------------------------------------------------------------
+# /etc/mail/smrsh is where the links to MDAs and authorized forwarding progs
+if [ ! -e @sysconfdir@/mail/smrsh ]; then
+ changed=1;
+ new=1;
+ fi;
+chown root:root @sysconfdir@/mail/smrsh;
+chmod 02755 @sysconfdir@/mail/smrsh;
+
+#------------------------------------------------------------------------------
+# Iterate over the default list of programs and create any missing items
+for file in $def_progs; do
+ ppath=$(dirname "$file");
+ pname=$(basename "$file");
+
+ # the file doesn't exist, see if we can remove its link
+ if [ ! -e $file ]; then
+
+ # let have there own version eh?
+ if [ -e @sysconfdir@/mail/smrsh/$pname ]; then
+ true;
+
+ # no, if its a danglink symlink, drop it
+ elif [ -L @sysconfdir@/mail/smrsh/$pname ]; then
+ echo "Removing link for no longer extant program ($pname)";
+ rm @sysconfdir@/mail/smrsh/$pname;
+ fi;
+
+ # the file exists, see if we need to add its link
+ elif [ ! -e @sysconfdir@/mail/smrsh/$pname ]; then
+ echo "Adding link for newly extant program ($pname)";
+ ln -sf $file @sysconfdir@/mail/smrsh/$pname;
+ changed=1;
+ fi;
+ done;
+
+#------------------------------------------------------------------------------
+exit $changed;
diff --git a/debian/local/update_sys.in b/debian/local/update_sys.in
new file mode 100644
index 0000000..89cad19
--- /dev/null
+++ b/debian/local/update_sys.in
@@ -0,0 +1,282 @@
+#!/bin/sh
+#-----------------------------------------------------------------------------
+#
+# $Sendmail: update_sys,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Update system files used by Sendmail for Debian
+#
+# Copyright (c) 2001-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# Notes (to all):
+# * Several directories/files have their permissions forced...
+# This is done to allow the MSP/MTA split
+# * This exec runs 'set +e' to ignore errors!!! this is done to
+# support those running NFS (or similiar) systems, where the
+# chmod/chown may fail - If this happens, you'll need to update
+# those items by hand !
+#
+# Notes (to self):
+# *
+#
+#-----------------------------------------------------------------------------
+set +e;
+
+# flag used to indicate a dataset has been moved, may need another update
+changed=0;
+
+#------------------------------------------------------------------------------
+# Create any needed directories, and move any prior data to its new home
+
+#------------------------------------------------------------------------------
+# /etc/aliases should exist, though not owned by sendmail, we'll create one
+if [ ! -e @sysconfdir@/aliases ]; then
+ changed=1;
+ if [ -f @datadir@/doc/sendmail/examples/db/aliases ]; then
+ echo "Creating @sysconfdir@/aliases (not found)";
+ cp @datadir@/sendmail/examples/db/aliases \
+ @sysconfdir@/aliases;
+ else
+ touch @sysconfdir@/aliases;
+ fi;
+ chown root:root @sysconfdir@/aliases;
+ chmod 0644 @sysconfdir@/aliases;
+ fi;
+
+#------------------------------------------------------------------------------
+# /var/mail is the FHS user mail location, /var/spool/mail is older
+# Note: we set the sticky bit to prevent a sgid exploit from erasing files
+if [ ! -e @localstatedir@/mail ]; then
+ changed=1;
+ if [ -L @localstatedir@/spool/mail ]; then
+ ln -sf spool/mail @localstatedir@/mail;
+ elif [ -d @localstatedir@/spool/mail ]; then
+ mv @localstatedir@/spool/mail @localstatedir@/mail;
+ chown root:root @localstatedir@/mail;
+ chmod 03775 @localstatedir@/mail;
+ else
+ mkdir @localstatedir@/mail;
+ chown root:root @localstatedir@/mail;
+ chmod 03775 @localstatedir@/mail;
+ fi;
+ fi;
+#
+# Make sure the sticky bit is set in pre-existing directories
+if [ -d @localstatedir@/mail -a ! -k @localstatedir@/mail ]; then
+ chmod a+t @localstatedir@/mail;
+ fi;
+if [ -d @localstatedir@/spool/mail -a ! -k @localstatedir@/spool/mail ]; then
+ chmod a+t @localstatedir@/spool/mail;
+ fi;
+if [ ! -d @localstatedir@/spool/mail -a ! -L @localstatedir@/spool/mail ]; then
+ ln -sf ../mail @localstatedir@/spool/mail;
+ #mkdir @localstatedir@/spool/mail;
+ #chown root:root @localstatedir@/spool/mail;
+ #chmod 03775 @localstatedir@/spool/mail;
+ fi;
+
+#------------------------------------------------------------------------------
+# /etc/mail is where the Sendmail config files live
+if [ ! -d @sysconfdir@/mail ]; then
+ changed=1;
+ mkdir @sysconfdir@/mail;
+ fi;
+chown root:smmsp @sysconfdir@/mail;
+chmod 02755 @sysconfdir@/mail;
+#
+# With the MSP/MTA split, we don't want any g=w files or directories
+# to save us from potential sgid attacks
+find @sysconfdir@/mail -perm +g=w \( -type f -o -type d \) -print \
+ | xargs -r chmod g-w,o-w;
+
+#------------------------------------------------------------------------------
+# /var/run/sendmail is where we store pid files, control sockets, stamps, etc
+if [ ! -d @localstatedir@/run/sendmail ]; then
+ changed=1;
+ mkdir @localstatedir@/run/sendmail;
+ fi;
+chown root:smmsp @localstatedir@/run/sendmail;
+chmod 02750 @localstatedir@/run/sendmail;
+if [ ! -d @localstatedir@/run/sendmail/mta ]; then
+ mkdir @localstatedir@/run/sendmail/mta;
+ fi;
+chown root:smmsp @localstatedir@/run/sendmail/mta;
+chmod 02750 @localstatedir@/run/sendmail/mta;
+if [ ! -d @localstatedir@/run/sendmail/msp ]; then
+ mkdir @localstatedir@/run/sendmail/msp;
+ fi;
+chown smmsp:smmsp @localstatedir@/run/sendmail/msp;
+chmod 02770 @localstatedir@/run/sendmail/msp;
+if [ ! -d @localstatedir@/run/sendmail/stampdir ]; then
+ mkdir @localstatedir@/run/sendmail/stampdir;
+ fi;
+chown root:smmsp @localstatedir@/run/sendmail/stampdir;
+chmod 02770 @localstatedir@/run/sendmail/stampdir;
+#
+# Remove older files
+rm -f /var/run/sendmail.pid;
+rm -f /var/run/sendmail/sendmail.pid;
+rm -f /var/run/sendmail/smcontrol;
+
+#------------------------------------------------------------------------------
+# /var/lib/sendmail is where we stuff host status and sendmail.st
+# instead of the mail queue and /etc/ (respectively)
+if [ ! -d @localstatedir@/lib/sendmail ]; then
+ changed=1;
+ mkdir @localstatedir@/lib/sendmail;
+ fi;
+chown root:smmsp @localstatedir@/lib/sendmail;
+chmod 02750 @localstatedir@/lib/sendmail;
+if [ -d /var/state/sendmail/host_status ]; then
+ changed=1;
+ echo "Moving /var/state/sendmail/host_status to /var/lib/sendmail/";
+ mv -f /var/state/sendmail/host_status \
+ @localstatedir@/lib/sendmail/host_status;
+ fi;
+if [ -d /var/sendmail/host_status ]; then
+ changed=1;
+ echo "Moving /var/sendmail/host_status to /var/lib/sendmail/";
+ mv -f /var/sendmail/host_status \
+ @localstatedir@/lib/sendmail/host_status;
+ fi;
+if [ ! -d @localstatedir@/lib/sendmail/host_status ]; then
+ mkdir @localstatedir@/lib/sendmail/host_status;
+ fi;
+chown root:smmsp @localstatedir@/lib/sendmail/host_status;
+chmod 02750 @localstatedir@/lib/sendmail/host_status;
+find @localstatedir@/lib/sendmail/host_status -type d -print \
+ | xargs -r chown root:smmsp;
+find @localstatedir@/lib/sendmail/host_status -type d -print \
+ | xargs -r chmod 02750;
+#
+# if sendmail.st doesn't exist, don't create it !
+if [ -f /var/log/sendmail.st ]; then
+ changed=1;
+ echo "Moving /var/log/sendmail.st to /var/lib/sendmail/";
+ mv /var/log/sendmail.st \
+ @localstatedir@/lib/sendmail/sendmail.st;
+ fi;
+if [ -f /var/sendmail/sendmail.st ]; then
+ changed=1;
+ echo "Moving /var/sendmail/sendmail.st to /var/lib/sendmail/";
+ mv /var/sendmail/sendmail.st \
+ @localstatedir@/lib/sendmail/sendmail.st;
+ fi;
+if [ -f @localstatedir@/lib/sendmail/sendmail.st ]; then
+ chown root:smmsp @localstatedir@/lib/sendmail/sendmail.st;
+ chmod 0640 @localstatedir@/lib/sendmail/sendmail.st;
+ if [ ! -f @localstatedir@/lib/sendmail/sm-client.st ]; then
+ touch @localstatedir@/lib/sendmail/sm-client.st;
+ fi;
+ fi;
+if [ -f @localstatedir@/lib/sendmail/sm-client.st ]; then
+ chown smmsp:smmsp @localstatedir@/lib/sendmail/sm-client.st;
+ chmod 0660 @localstatedir@/lib/sendmail/sm-client.st;
+ fi;
+if [ ! -f @localstatedir@/lib/sendmail/dead.letter ]; then
+ touch @localstatedir@/lib/sendmail/dead.letter;
+ fi;
+chown root:smmsp @localstatedir@/lib/sendmail/dead.letter;
+chmod 0660 @localstatedir@/lib/sendmail/dead.letter;
+#
+# Remove older files
+rm -rf /var/sendmail;
+rm -rf /var/state/sendmail;
+
+#------------------------------------------------------------------------------
+# /var/spool/mqueue is the MTA mail queue directory
+if [ ! -d @localstatedir@/spool/mqueue ]; then
+ changed=1;
+ mkdir @localstatedir@/spool/mqueue;
+ fi;
+chown root:smmsp @localstatedir@/spool/mqueue;
+chmod 02750 @localstatedir@/spool/mqueue;
+#
+# With the MSP/MTA split, we *DO* need g=r, gid=smmsp queue directories and
+# files mailq to work...
+find @localstatedir@/spool/mqueue -print \
+ | xargs -r chown root:smmsp;
+find @localstatedir@/spool/mqueue -type d -print \
+ | xargs -r chmod g+rxs-w,o-rwx;
+find @localstatedir@/spool/mqueue -type f -print \
+ | xargs -r chmod g+r-wx,o-rwx;
+
+#------------------------------------------------------------------------------
+# /var/spool/mqueue-client is the MSP mail queue directory
+if [ ! -d @localstatedir@/spool/mqueue-client ]; then
+ mkdir @localstatedir@/spool/mqueue-client;
+ fi;
+chown smmsp:smmsp @localstatedir@/spool/mqueue-client;
+chmod 02770 @localstatedir@/spool/mqueue-client;
+find @localstatedir@/spool/mqueue-client -perm +o=r -print \
+ | xargs -r chmod o-rwx;
+
+#------------------------------------------------------------------------------
+# /var/log/mail is where we keep our log crap (via syslog)
+# Try to fixup syslog, syslog-ng, etc...
+if [ ! -d @localstatedir@/log/mail -a \
+ ! -f /var/log/mail ]; then
+ echo "Moving /var/log/mail.* to /var/log/mail/mail.*";
+ echo "You will need to adjust any log reading scripts accordingly";
+ mkdir @localstatedir@/log/mail;
+ chown root:smmsp @localstatedir@/log/mail;
+ chmod 02770 @localstatedir@/log/mail;
+ mv -f /var/log/mail.log @localstatedir@/log/mail/ \
+ 1>/dev/null 2>&1;
+ mv -f /var/log/mail.log.[0-9]* @localstatedir@/log/mail/ \
+ 1>/dev/null 2>&1;
+ mv -f /var/log/mail.err @localstatedir@/log/mail/\
+ 1>/dev/null 2>&1;
+ mv -f /var/log/mail.err.[0-9]* @localstatedir@/log/mail/ \
+ 1>/dev/null 2>&1;
+ mv -f /var/log/mail.info @localstatedir@/log/mail/ \
+ 1>/dev/null 2>&1;
+ mv -f /var/log/mail.info.[0-9]* @localstatedir@/log/mail/ \
+ 1>/dev/null 2>&1;
+ mv -f /var/log/mail.warn @localstatedir@/log/mail/ \
+ 1>/dev/null 2>&1;
+ mv -f /var/log/mail.warn.[0-9]* @localstatedir@/log/mail/ \
+ 1>/dev/null 2>&1;
+ # Create link for compatility with logscan package
+ ln -sf @localstatedir@/log/mail/mail.log /var/log/mail.log;
+ fi;
+#
+# Support for sysklogd package
+if [ -f /etc/syslog.conf ]; then
+ sed -e "s?/var/log/mail.log?@localstatedir@/log/mail/mail.log?g" \
+ -e "s?/var/log/mail.err?@localstatedir@/log/mail/mail.err?g" \
+ -e "s?/var/log/mail.info?@localstatedir@/log/mail/mail.info?g" \
+ -e "s?/var/log/mail.warn?@localstatedir@/log/mail/mail.warn?g" \
+ /etc/syslog.conf > /etc/syslog.conf.new;
+ chown root:root /etc/syslog.conf.new;
+ chmod 0644 /etc/syslog.conf.new;
+ mv /etc/syslog.conf.new /etc/syslog.conf;
+ /etc/init.d/sysklogd reload;
+ fi;
+#
+# Support for syslog-ng package
+if [ -f /etc/syslog-ng/syslog-ng.conf ]; then
+ sed -e "s?/var/log/mail.log?@localstatedir@/log/mail/mail.log?g" \
+ -e "s?/var/log/mail.err?@localstatedir@/log/mail/mail.err?g" \
+ -e "s?/var/log/mail.info?@localstatedir@/log/mail/mail.info?g" \
+ -e "s?/var/log/mail.warn?@localstatedir@/log/mail/mail.warn?g" \
+ /etc/syslog-ng/syslog-ng.conf > \
+ /etc/syslog-ng/syslog-ng.conf.new;
+ chown root:root /etc/syslog-ng/syslog-ng.conf.new;
+ chmod 0644 /etc/syslog-ng/syslog-ng.conf.new;
+ mv /etc/syslog-ng/syslog-ng.conf.new \
+ /etc/syslog-ng/syslog-ng.conf;
+ /etc/init.d/syslog-ng reload;
+ if [ -f /etc/logrotate.d/syslog-ng ]; then
+ sed -e '/\/var\/log\/mail\..*/{:a;N;/}\n/!ba;d;}' \
+ /etc/logrotate.d/syslog-ng > \
+ /etc/logrotate.d/syslog-ng.new;
+ chown root:root /etc/logrotate.d/syslog-ng.new;
+ chmod 0644 /etc/logrotate.d/syslog-ng.new;
+ mv /etc/logrotate.d/syslog-ng.new \
+ /etc/logrotate.d/syslog-ng;
+ true;
+ fi;
+ fi;
+
+#------------------------------------------------------------------------------
+exit $changed;
diff --git a/debian/local/update_tcpd b/debian/local/update_tcpd
new file mode 100644
index 0000000..e3b430a
--- /dev/null
+++ b/debian/local/update_tcpd
@@ -0,0 +1,53 @@
+#!/bin/sh -e
+#-----------------------------------------------------------------------------
+#
+# Update TCPD environment (TCP Wrappers) for sendmail
+#
+# Copyright (c) 2001-2001 Richard Nelson. All Rights Reserved.
+# Time-stamp: <2001/01/17 10:00:00 cowboy>
+#
+# Notes (to all):
+#
+# Notes (to self):
+#
+#-----------------------------------------------------------------------------
+set -e
+
+#------------------------------------------------------------------------------
+# Check to see if sendmail is mentioned in /etc/hosts.allow
+# Note: This check is far from perfect - it requires sendmail and : be
+# on the same line. If you've got a better approach, I'd love to
+# see it (Maybe awk/perl)!
+
+if grep -qEe "^[^#:]*sendmail[^:]*[:]" /etc/hosts.allow 2>/dev/null; then
+ need_tcpd=0
+else
+ need_tcpd=1
+ fi
+
+if [ ! -e /etc/hosts.allow ]; then
+ need_tcpd=0
+ fi
+
+if [ $need_tcpd -eq 1 ]; then
+ cat <<-EOT
+
+ Updating /etc/hosts.allow, adding "sendmail: all".
+
+ Please edit /etc/hosts.allow and check the rules location to
+ make sure your security measures have not been overridden -
+ it is common to move the sendmail:all line to the *end* of
+ the file, so your more selective rules take precedence.
+EOT
+
+ echo "sendmail: all" | cat - /etc/hosts.allow >/etc/hosts.allow.new
+ mv -f /etc/hosts.allow.new /etc/hosts.allow
+
+ if [ -e /etc/init.d/netbase ]; then
+ /etc/init.d/netbase reload >/dev/null
+ elif [ -e /etc/init.d/inetd ]; then
+ /etc/init.d/inetd reload >/dev/null
+ fi
+ fi
+
+exit 0
diff --git a/debian/local/update_tls.in b/debian/local/update_tls.in
new file mode 100644
index 0000000..7d833fe
--- /dev/null
+++ b/debian/local/update_tls.in
@@ -0,0 +1,305 @@
+#!/bin/sh -e
+#-----------------------------------------------------------------------------
+#
+# $Sendmail: update_tls,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Sendmail support for TLS
+#
+# Copyright (c) 2000-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# Notes:
+#
+#-----------------------------------------------------------------------------
+set -e;
+
+#------------------------------------------------------------------------------
+# Local variables
+#---------------------------------------------------------------------------
+HOSTNAME=`hostname -s`;
+DOMAINNAME=`hostname -d`;
+SSL_FQDN=`hostname -f`;
+SSL_EMAIL="admin@${SSL_FQDN}";
+export SSL_FQDN SSL_EMAIL;
+PROGRAM='sendmail';
+CERT_DIR="@sysconfdir@/ssl/certs";
+COM_PRM="@sysconfdir@/mail/tls/$PROGRAM-common.prm";
+COM_KEY="@sysconfdir@/mail/tls/$PROGRAM-common.key";
+MTA_CFG="@sysconfdir@/mail/tls/$PROGRAM-server.cfg";
+MTA_CSR="@sysconfdir@/mail/tls/$PROGRAM-server.csr";
+MTA_CRT="@sysconfdir@/mail/tls/$PROGRAM-server.crt";
+MSP_CFG="@sysconfdir@/mail/tls/$PROGRAM-client.cfg";
+MSP_CSR="@sysconfdir@/mail/tls/$PROGRAM-client.csr";
+MSP_CRT="@sysconfdir@/mail/tls/$PROGRAM-client.crt";
+NEW=0;
+REFD=0;
+
+#---------------------------------------------------------------------------
+# create_config: Function to create openssl configuration file
+#---------------------------------------------------------------------------
+create_config () {
+cat >$MTA_CFG <<EOT
+[ ca ]
+default_days = 365
+x509_extensions = X509v3
+[ req ]
+default_bits = 1024
+distinguished_name = req_DN
+[ req_DN ]
+countryName = "1. Country Name (2 letter code)"
+countryName_min = 2
+countryName_max = 2
+countryName_default =
+stateOrProvinceName = "2. State or Province Name (full name) "
+stateOrProvinceName_default =
+localityName = "3. Locality Name (eg, city) "
+localityName_default =
+0.organizationName = "4. Organization Name (eg, company) "
+0.organizationName_default = Sendmail
+organizationalUnitName = "5. Organizational Unit Name (eg, section) "
+organizationalUnitName_default = Sendmail Server
+commonName = "6. Common Name (MUST==FQDN) "
+commonName_max = 64
+commonName_default = \$ENV::SSL_FQDN
+emailAddress = "7. Email Address (eg, name@FQDN)"
+emailAddress_max = 40
+emailAddress_default = \$ENV::SSL_EMAIL
+[ x509v3 ]
+subjectAltName = email:copy
+issuerAltName = issuer:copy
+basicConstraints = CA:false
+nsComment = "Sendmail generated custom certificate"
+nsCertType = server
+nsSslServerName = \$ENV::SSL_FQDN
+subjectKeyIdentifier=hash
+authorityKeyIdentifier=keyid,issuer:always
+EOT
+};
+
+
+#---------------------------------------------------------------------------
+# Check if OpenSSL is installed
+if [ ! -d "$CERT_DIR" ]; then
+ cat <<-EOT
+
+ OpenSSL is not installed, will not configure sendmail support for it.
+
+ to install openssl, get openssl.
+
+ To enable sendmail TLS support at a later date, invoke "$0"
+
+ EOT
+ exit 0;
+ fi;
+
+echo ' ';
+echo 'Creating/Updating SSL(for TLS) information';
+
+
+#---------------------------------------------------------------------------
+# Process arguments
+#---------------------------------------------------------------------------
+case "$1" in
+ [Nn][Ee][Ww]*)
+ echo 'Removing any pre-existing sendmail certificates.';
+ if [ -x @bindir@/openssl ]; then
+ if [ -f $MTA_CRT ]; then
+ LINK="$CERT_DIR/"$(openssl x509 -noout -hash < $MTA_CRT)".0";
+ rm -f $LINK 2>/dev/null;
+ fi;
+ if [ -f $MSP_CRT ]; then
+ LINK="$CERT_DIR/"$(openssl x509 -noout -hash < $MSP_CRT)".0";
+ rm -f $LINK 2>/dev/null;
+ fi;
+ fi;
+ rm -f $MTA_CSR $MTA_CRT 2>/dev/null;
+ rm -f $MSP_CSR $MSP_CRT 2>/dev/null;
+ rm -f $COM_PRM $COM_KEY 2>/dev/null;
+ ;;
+ esac
+
+#---------------------------------------------------------------------------
+# Make sure sendmail.mc points to proper /etc/mail/tls/starttls.m4
+if [ -f @sysconfdir@/mail/sendmail.mc ]; then
+ if (grep -qEe "^[[:space:]]*include\(\`?@sysconfdir@/mail/starttls.m4" \
+ @sysconfdir@/mail/sendmail.mc); then
+ sed -e "s=^\([[:space:]]*\)\(\`\?\)include(\`\?@sysconfdir@/mail/starttls.m4'\?)\(dnl\)\?=\1\2include(\`@sysconfdir@/mail/tls/starttls.m4')dnl=g" \
+ @sysconfdir@/mail/sendmail.mc > @sysconfdir@/mail/sendmail.mc.new;
+ chown root:smmsp @sysconfdir@/mail/sendmail.mc.new;
+ chmod 0644 @sysconfdir@/mail/sendmail.mc.new;
+ mv @sysconfdir@/mail/sendmail.mc.new @sysconfdir@/mail/sendmail.mc;
+ fi;
+ fi;
+if [ -f @sysconfdir@/mail/submit.mc ]; then
+ if (grep -qEe "^[[:space:]]*include\(\`?@sysconfdir@/mail/starttls.m4" \
+ @sysconfdir@/mail/submit.mc); then
+ sed -e "s=^\([[:space:]]*\)\(\`\?\)include(\`\?@sysconfdir@/mail/starttls.m4'\?)\(dnl\)\?=\1\2include(\`@sysconfdir@/mail/tls/starttls.m4')dnl=g" \
+ @sysconfdir@/mail/submit.mc > @sysconfdir@/mail/submit.mc.new;
+ chown root:smmsp @sysconfdir@/mail/submit.mc.new;
+ chmod 0644 @sysconfdir@/mail/submit.mc.new;
+ mv @sysconfdir@/mail/submit.mc.new @sysconfdir@/mail/submit.mc;
+ fi;
+ fi;
+
+#---------------------------------------------------------------------------
+# check for references to starttls.m4 in sendmail.mc
+if [ -f @sysconfdir@/mail/sendmail.mc ]; then
+ if grep -qEe "^[[:space:]]*include\(\`?@sysconfdir@/mail/tls/starttls.m4" \
+ @sysconfdir@/mail/sendmail.mc; then
+ REFD=1;
+ fi;
+ fi;
+
+#---------------------------------------------------------------------------
+# Make sure prototype /etc/mail/tls/starttls.m4 exists
+if [ -L @sysconfdir@/mail/starttls.m4 ]; then
+ rm @sysconfdir@/mail/starttls.m4;
+ fi;
+if [ -f @sysconfdir@/mail/starttls.m4 ]; then
+ mv @sysconfdir@/mail/starttls.m4 @sysconfdir@/mail/tls/starttls.m4;
+ fi;
+if [ ! -f @sysconfdir@/mail/tls/starttls.m4 ]; then
+ NEW=1;
+ cp -a @datadir@/sendmail/cf/debian/starttls.m4 \
+ @sysconfdir@/mail/tls/starttls.m4;
+ echo ' ';
+ echo 'Created template file @sysconfdir@/mail/tls/starttls.m4';
+ echo 'Edit this file if you wish to change the default tls setup.';
+ fi;
+
+#---------------------------------------------------------------------------
+# check for SSL
+if [ -d "$CERT_DIR" ]; then
+ if [ -f $MTA_CRT -a -f $MSP_CRT ]; then
+ echo 'You already have sendmail certificates';
+ echo ' ';
+ chown root:smmsp $COM_KEY;
+ chown root:smmsp $MTA_CRT;
+ chown root:smmsp $MSP_CRT;
+ else
+ if [ -x @bindir@/openssl ]; then
+ yn="Y";
+ else
+ cat <<-EOT
+ $PROGRAM needs openssl (not installed) to create a
+ certificate to validate users
+
+ If you don't need a certificate, say No
+ If you want a certificate, install openssl and say Yes
+
+ Do you wish to create a certificate?
+ EOT
+ read yn;
+ yn=$(echo -n "$yn" | sed -e "s/^\ *//" -e "s/^\t*//");
+ test -n "$yn" || yn="N";
+ fi;
+
+ # Create new (self-signed) certificate
+ case "$yn" in
+ [Yy]*)
+ echo "Creating SSL certificates for sendmail.";
+ # Create prompt file
+ if [ ! -f @sysconfdir@/mail/tls/no_prompt ]; then
+ cat >@sysconfdir@/mail/tls/no_prompt <<-EOT
+
+
+
+
+
+
+
+ EOT
+ fi;
+
+ # Create config files
+ if [ ! -f $MTA_CFG ]; then
+ create_config;
+ chmod 0600 $MTA_CFG;
+ fi;
+ if [ ! -f $MSP_CFG ]; then
+ sed -e "s/Sendmail Server/Sendmail Client/" \
+ $MTA_CFG > $MSP_CFG;
+ chmod 0600 $MSP_CFG;
+ fi;
+ # Create shared DSA/DH password parameters
+ # Skip this for now...
+ if [ ! -f $COM_PRM ]; then
+ #openssl dsaparam 1024 -out $COM_PRM;
+ #openssl dhparam -dsaparam -in $COM_PRM >> $COM_PRM;
+ touch $COM_PRM;
+ chmod 0600 $COM_PRM;
+ fi;
+ # Create shared DSA/RSA key (RSA preferred for browser support)
+ if [ ! -f $COM_KEY ]; then
+ openssl genrsa -out $COM_KEY 1024;
+ #openssl gendsa -out $COM_KEY $COM_PRM;
+ chown root:smmsp $COM_KEY;
+ chmod 0640 $COM_KEY;
+ fi;
+ # sendmail requires that CN=fqdn
+ # Prompts: 1) Country Name (2 letter code)
+ # 2) State or Province Name
+ # 3) Locality Name (eg, city)
+ # 4) Organization Name (eg, company)
+ # 5) Organizational Unit Name (eg, section)
+ # 6) Common Name (eg, YOUR name)
+ # 7) Email Address
+ if [ ! -f $MTA_CRT ]; then
+ openssl req -new -config $MTA_CFG -key $COM_KEY \
+ -out $MTA_CSR \
+ <@sysconfdir@/mail/tls/no_prompt >/dev/null 2>&1;
+ chmod 0600 $MTA_CSR;
+ openssl x509 -req -extfile $MTA_CFG \
+ -signkey $COM_KEY -in $MTA_CSR \
+ -out $MTA_CRT -days 365 \
+ >/dev/null 2>&1;
+ chown root:smmsp $MTA_CRT;
+ chmod 0644 $MTA_CRT;
+ fi;
+ if [ ! -f $MSP_CRT ]; then
+ openssl req -new -config $MSP_CFG -key $COM_KEY \
+ -out $MSP_CSR \
+ <@sysconfdir@/mail/tls/no_prompt >/dev/null 2>&1;
+ chmod 0600 $MSP_CSR;
+ openssl x509 -req -extfile $MSP_CFG \
+ -signkey $COM_KEY -in $MSP_CSR \
+ -out $MSP_CRT -days 365 \
+ >/dev/null 2>&1;
+ chown root:smmsp $MSP_CRT;
+ chmod 0644 $MSP_CRT;
+ fi;
+ esac;
+ fi;
+
+ # Create hash link for new certificate (must do msp last!)
+ if [ -f $MTA_CRT ]; then
+ LINK="$CERT_DIR/"$(openssl x509 -noout -hash < $MTA_CRT)".0";
+ if [ ! -f $LINK ]; then
+ ln -sf $MTA_CRT $LINK;
+ fi;
+ fi;
+ if [ -f $MSP_CRT ]; then
+ LINK="$CERT_DIR/"$(openssl x509 -noout -hash < $MSP_CRT)".0";
+ if [ ! -f $LINK ]; then
+ ln -sf $MSP_CRT $LINK;
+ fi;
+ fi;
+ fi;
+
+if [ $REFD -eq 0 ]; then
+ cat <<-EOT
+
+ *** *** *** WARNING *** WARNING *** WARNING *** WARNING *** *** ***
+
+ Everything you need to support STARTTLS (encrypted mail transmission
+ and user authentication via certificates) is installed and configured
+ but *IS* not being used.
+
+ To enable sendmail to use STARTTLS, you need to:
+ 1) Add this line to @sysconfdir@/mail/sendmail.mc and optionally
+ to @sysconfdir@/mail/submit.mc:
+ include(\`@sysconfdir@/mail/tls/starttls.m4')dnl
+ 2) Run sendmailconfig
+ 3) Restart sendmail
+
+ EOT
+ fi;
diff --git a/debian/local/updatedb b/debian/local/updatedb
deleted file mode 100644
index 389af5a..0000000
--- a/debian/local/updatedb
+++ /dev/null
@@ -1,481 +0,0 @@
-#!/bin/sh -e
-#
-# Update Sendmail databases for Debian
-#
-# Copyright (c) 1999, Richard Nelson <cowboy@debian.org>.
-# Time-stamp: <1999/05/19 10:00:00 cowboy>
-#
-# Notes (to all):
-# * assumes makemap dbtype /etc/mail/database < /etc/mail/database
-#
-# Notes (to self):
-# * changes made herein *must* be reflected in parsemc,updatedb,debian.m4
-# * multiple db options not supported
-# * userdb can also have multiple databases and then a forward!
-# * need sendmail stop/start
-#
-set -e
-
-# List of db features
-db_features="access_db bitdomain domaintable genericstable \
- mailertable uucpdomain virtusertable use_ct_file use_cw_file";
-export db_features;
-# kluge for userdb, cr,ct,and cw files support
-db_files="confCR_FILE confUSERDB_SPEC ALIAS_FILE";
-db_files="sendmail.mc $db_features $db_files";
-export db_files;
-
-# control amount of output
-verbosity=0;
-
-# flag used to ensure only one newaliases command is run
-newaliases_run=0;
-
-# flag used to indicate a dataset has been moved, may need another update
-changed=0;
-
-# max return code
-max_rc=0;
-missing_rqd=0;
-missing_opt=0;
-m4_errors=0;
-
-#-------------------------------------------------------------
-# Initial update of sendmail.mc/databases
-#-------------------------------------------------------------
-initial () {
- if [ $verbosity -gt 1 ]; then
- echo "initial()";
- fi;
-
- # Make sure not using text mailertable (it doesn't work)
- if (grep -q "^[[:space:]]*FEATURE(mailertable, \`text /etc/mail/mailertable')dnl" /etc/mail/sendmail.mc); then
- sed "s?FEATURE(mailertable, \`text /etc/mail/mailertable')dnl?FEATURE(mailertable)dnl?g" \
- /etc/mail/sendmail.mc > /etc/mail/sendmail.mc.new
- chown root.mail /etc/mail/sendmail.mc.new
- chmod 0664 /etc/mail/sendmail.mc.new
- mv /etc/mail/sendmail.mc.new /etc/mail/sendmail.mc
- fi;
-
- # Make sure the data file is current using the version of
- # parsemc that corresponds to this version of updatedb
- $(dirname $0)/parsemc || true
- }
-
-#-------------------------------------------------------------
-# Handle found databases
-#-------------------------------------------------------------
-is_found () {
- if [ $verbosity -gt 1 ]; then
- echo "is_found()";
- fi;
- process=1;
-
- case "$dbfeat" in
- ALIAS_FILE)
- if [ ! -f /etc/aliases -a -f /etc/mail/aliases ]; then
- echo "Linking /etc/aliases to /etc/mail/aliases"
- ln -sf mail/aliases /etc/aliases
- fi
- ;;
- esac
- }
-
-#-------------------------------------------------------------
-# Handle missing databases:
-# moving /etc/xxx to /etc/mail/xxx
-# rename /etc/mail/xxx to /etc/mail/yyy
-#-------------------------------------------------------------
-is_not_found () {
- if [ $verbosity -gt 1 ]; then
- echo "is_not_found()";
- fi;
- process=0;
-
- case "$dbfeat" in
- use_cw_file)
- if [ -f /etc/local-host-names ]; then
- if [ ! -L /etc/local-host-names ]; then
- echo "Moving /etc/local-host-names to /etc/mail/."
- mv /etc/local-host-names /etc/mail/
- process=1;
- else
- echo "/etc/local-host-names is a link," \
- "move it to /etc/mail/local-host-names"
- missing_rqd=`expr $missing_rqd + 1`;
- fi;
- elif [ -f /etc/mail/sendmail.cw ]; then
- echo "Renaming sendmail.cw to local-host-names."
- mv /etc/mail/sendmail.cw /etc/mail/local-host-names
- process=1;
- elif [ -f /etc/sendmail.cw ]; then
- if [ ! -L /etc/sendmail.cw ]; then
- echo "Moving /etc/sendmail.cw to /etc/mail/"
- mv /etc/sendmail.cw /etc/mail/local-host-names
- process=1;
- else
- echo "/etc/sendmail.cw is a link," \
- "move it to /etc/mail/local-host-names"
- missing_rqd=`expr $missing_rqd + 1`;
- fi
- elif [ "$dbopts" = "-o" ]; then
- echo "Informational: $dbfeat source" \
- "file not found: $dbname"
- missing_opt=`expr $missing_opt + 1`;
- else
- echo "Error: $dbfeat source file not found: $dbname"
- missing_rqd=`expr $missing_rqd + 1`;
- fi
- ;;
- use_ct_file)
- if [ -f /etc/trusted-users ]; then
- if [ ! -L /etc/trusted-users ]; then
- echo "Moving /etc/trusted-users to /etc/mail/."
- mv /etc/trusted-users /etc/mail/
- process=1;
- else
- echo "/etc/trusted-users is a link," \
- "move it to /etc/mail/trusted-users"
- missing_rqd=`expr $missing_rqd + 1`;
- fi;
- elif [ -f /etc/mail/sendmail.ct ]; then
- echo "Renaming sendmail.ct to trusted-users."
- mv /etc/mail/sendmail.ct /etc/mail/trusted-users
- process=1;
- elif [ -f /etc/sendmail.ct ]; then
- if [ ! -L /etc/sendmail.ct ]; then
- echo "Moving /etc/sendmail.ct to /etc/mail/"
- mv /etc/sendmail.ct /etc/mail/trusted-users
- process=1;
- else
- echo "/etc/sendmail.ct is a link," \
- "move it to /etc/mail/trusted-users"
- missing_rqd=`expr $missing_rqd + 1`;
- fi
- elif [ "$dbopts" = "-o" ]; then
- echo "Informational: $dbfeat source" \
- "file not found: $dbname"
- missing_opt=`expr $missing_opt + 1`;
- else
- echo "Error: $dbfeat source file not found: $dbname"
- missing_rqd=`expr $missing_rqd + 1`;
- fi
- ;;
- ALIAS_FILE)
- if [ -f /etc/$dbsname ]; then
- if [ ! -L /etc/$dbsname ]; then
- echo "Moving /etc/aliases to /etc/mail/aliases "
- echo "and linking /etc/aliases to /etc/mail/aliases"
- echo "This preserves current function/abilities"
- mv -f /etc/$dbsname /etc/mail/
- ln -sf mail/aliases /etc/aliases
- #ln -sf /etc/mail/aliases /etc/aliases
- if [ -f /etc/$dbsname.db ]; then
- mv -f /etc/$dbsname.db /etc/mail/
- fi
- if [ -f /etc/$dbsname.pag ]; then
- mv -f /etc/$dbsname.pag /etc/mail/
- fi
- if [ -f /etc/$dbsname.dir ]; then
- mv -f /etc/$dbsname.dir /etc/mail/
- fi
- process=1;
- changed=1;
- else
- echo "/etc/$dbsname is a link, move it to $dbname"
- missing_rqd=`expr $missing_rqd + 1`;
- fi;
- elif [ "$dbopts" = "-o" ]; then
- echo "Informational: $dbfeat source" \
- "file not found: $dbname"
- missing_opt=`expr $missing_opt + 1`;
- else
- echo "Error: $dbfeat source file not found: $dbname"
- missing_rqd=`expr $missing_rqd + 1`;
- fi;
- ;;
- m4)
- if [ -f /etc/$dbsname ]; then
- if [ ! -L /etc/$dbsname ]; then
- echo "Moving /etc/sendmail.{mc,cf} to /etc/mail/";
- mv -f /etc/sendmail.mc /etc/mail/
- if [ -f /etc/sendmail.cf ]; then
- mv -f /etc/sendmail.cf /etc/mail/
- fi
- process=1;
- else
- echo "/etc/$dbsname is a link, move it to $dbname"
- missing_rqd=`expr $missing_rqd + 1`;
- fi;
- elif [ "$dbopts" = "-o" ]; then
- echo "Informational: $dbfeat source" \
- "file not found: $dbname"
- missing_opt=`expr $missing_opt + 1`;
- else
- echo "Error: $dbfeat source file not found: $dbname"
- missing_rqd=`expr $missing_rqd + 1`;
- fi;
- ;;
- *)
- if [ -f /etc/$dbsname ]; then
- if [ ! -L /etc/$dbsname ]; then
- echo "Moving /etc/$dbsname{,.*} to $dbname";
- mv -f /etc/$dbsname /etc/mail/
- if [ -f /etc/$dbsname.db ]; then
- mv -f /etc/$dbsname.db /etc/mail/
- fi
- if [ -f /etc/$dbsname.pag ]; then
- mv -f /etc/$dbsname.pag /etc/mail/
- fi
- if [ -f /etc/$dbsname.dir ]; then
- mv -f /etc/$dbsname.dir /etc/mail/
- fi
- process=1;
- else
- echo "/etc/$dbsname is a link, move it to $dbname"
- missing_rqd=`expr $missing_rqd + 1`;
- fi;
- elif [ "$dbopts" = "-o" ]; then
- echo "Informational: $dbfeat source" \
- "file not found: $dbname"
- missing_opt=`expr $missing_opt + 1`;
- else
- echo "Error: $dbfeat source file not found: $dbname"
- missing_rqd=`expr $missing_rqd + 1`;
- fi;
- ;;
- esac
- }
-
-#-------------------------------------------------------------
-# Handle empty databases
-#-------------------------------------------------------------
-is_empty () {
- if [ $verbosity -gt 1 ]; then
- echo "is_empty()";
- fi;
- if [ $process -eq 1 ]; then
- if [ "$dbtype" != "-" ]; then
- rm -f $dbname.db
- rm -f $dbname.pag
- rm -f $dbname.dir
- fi
- case "$dbfeat" in
- *)
- echo "Informational: $dbfeat file empty: $dbname"
- if [ "$dbopts" = "-o" ]; then
- process=0;
- fi;
- ;;
- esac
- fi
- }
-
-#-------------------------------------------------------------
-# Handle no data (exists, but is only comments) databases
-#-------------------------------------------------------------
-is_comments () {
- if [ $verbosity -gt 1 ]; then
- echo "is_comments()";
- fi;
- if [ $process -eq 1 ]; then
- if [ "$dbtype" != "-" ]; then
- rm -f $dbname.db
- rm -f $dbname.pag
- rm -f $dbname.dir
- fi
- case "$dbfeat" in
- *)
- echo "Informational: $dbfeat no data: $dbname"
- if [ "$dbopts" = "-o" ]; then
- process=0;
- fi;
- ;;
- esac
- fi
- }
-
-#-------------------------------------------------------------
-# Handle normal databases (exists, has data)
-#-------------------------------------------------------------
-is_normal () {
- if [ $verbosity -gt 1 ]; then
- echo "is_normal()";
- fi;
- if [ $process -eq 1 -a $max_rc -eq 0 ]; then
- if [ "$dbtype" != "-" ]; then
- case "$dbtype" in
- btree)
- makemap -d $dbtype $dbname.db < $dbname
- chown root.mail $dbname.db
- chmod 0664 $dbname.db
- ;;
- dbm | btree | hash)
- makemap $dbtype $dbname.db < $dbname
- chown root.mail $dbname.db
- chmod 0664 $dbname.db
- ;;
- text)
- true;
- ;;
- newaliases)
- if [ $newaliases_run -eq 0 -o \
- $changed -eq 1 ]; then
- newaliases_run=1
- newaliases
- fi
- chown root.mail $dbname.db
- chmod 0664 $dbname.db
- ;;
- m4)
- echo "Generating /etc/mail/sendmail.cf ..."
- m4 \
- /usr/share/sendmail/sendmail.cf/m4/cf.m4 \
- /etc/mail/sendmail.mc \
- > /etc/mail/sendmail.cf.new \
- 2> /etc/mail/sendmail.cf.errors
- chown root.mail /etc/mail/sendmail.cf.new
- chmod 0644 /etc/mail/sendmail.cf.new
- if [ ! -s /etc/mail/sendmail.cf.errors ]; then
- rm /etc/mail/sendmail.cf.errors;
- else
- cat /etc/mail/sendmail.cf.errors;
- echo " ";
- m4_errors=1;
- fi;
- # Can't tell if the errors are fatal or not ;-{
- mv -f /etc/mail/sendmail.cf.new \
- /etc/mail/sendmail.cf
- ;;
- *)
- echo "$dbtype map not done herein"
- ;;
- esac
- fi;
- fi;
- }
-
-#-------------------------------------------------------------
-# Handle completion
-#-------------------------------------------------------------
-final () {
- if [ $verbosity -gt 1 ]; then
- echo "final()";
- fi;
- }
-
-
-# status report if not for single database
-if [ -z "$1" ]; then
- echo "Checking sendmail.cf and databases."
- fi;
-
-initial
-
-for file in $db_files; do \
- line=$(egrep -e "^[[:space:]]*$file" /etc/mail/databases || true);
- while ([ "$line" != "" ]); do
- str=$(echo "$line" | cut -d "
-" -f 1)
- line=$(echo "$line" | cut -d "
-" -f 2)
-
- # Strip line back into four pieces: feature, type, opts, name
- dbfeat=$(echo "$str" | cut -d ":" -f 1)
- dbtype=$(echo "$str" | cut -d ":" -f 2)
- dbopts=$(echo "$str" | cut -d ":" -f 3)
- dbname=$(echo "$str" | cut -d ":" -f 4)
- dbregx=$(echo "$str" | cut -d ":" -f 5)
- if [ $(dirname "$dbname") = "/etc/mail" ]; then
- dbsname=$(basename "$dbname")
- elif [ $(dirname "$dbname") = "/etc/" ]; then
- dbsname=$(basename "$dbname")
- else
- dbsname="$dbname"
- fi;
- if [ "$dbopts" = "-" ]; then
- dbopts="";
- fi;
- if [ "$dbregx" = "-" ]; then
- dbregx="";
- fi;
-
- # Check to see if we're doing one, or all
- if [ ! -z "$1" ]; then
- if [ "$1" = "$dbfeat" -o \
- "$1" = "$dbname" -o \
- "$1" = "$dbsname" ]; then
- true;
- else
- continue;
- fi;
- fi;
-
- changed=0;
- if [ $verbosity -gt 0 ]; then
- echo "Processing $dbname...";
- fi;
-
-
- # Check for database existance
- if [ -f "$dbname" ]; then
- is_found
- else
- is_not_found
- fi;
-
- # Check for something in database
- if [ ! -s "$dbname" ]; then
- is_empty
- fi;
-
- # Check for real data (not just comments)
- if [ $process -eq 1 ]; then
- if ! egrep -q -e "^[[:space:]]*[^$\#]" $dbname; then
- is_comments
- fi;
- fi;
-
- # Finally, assume a normal file...
- is_normal
-
- done;
- done;
-
-final
-
-# Final notices...
-if [ $missing_opt -ne 0 ]; then
- echo " "
- echo "Informational: $missing_opt optional database(s) sources"
- echo " were not found, please investigate."
- fi;
-if [ $missing_rqd -ne 0 ]; then
- echo " "
- echo "Error: $missing_rqd required database(s) sources"
- echo " were not found, correct this before starting sendmail!"
- if [ $max_rc -lt 2 ]; then
- max_rc=2;
- fi;
- fi;
-if [ $missing_opt -ne 0 -o $missing_rqd -ne 0 ]; then
- echo " "
- echo "$0 assumes that databases, and their source datasets"
- echo "have the same base name (not counting the .db). If this is not"
- echo "true, $0 can not rebuild your databases to make sure"
- echo "they will work with the newer sendmail. You will have to do this"
- echo "yourself - before starting sendmail."
- echo " "
- fi;
-if [ $m4_errors -ne 0 ]; then
- echo " "
- echo "Warning: These messages were issued while creating sendmail.cf"
- echo " make sure they are benign before starting sendmail!"
- echo " "
- cat /etc/mail/sendmail.cf.errors;
- echo " "
- if [ $max_rc -lt 2 ]; then
- max_rc=2;
- fi;
- fi;
-exit $max_rc
diff --git a/debian/notes b/debian/notes
deleted file mode 100644
index 5fe8ab8..0000000
--- a/debian/notes
+++ /dev/null
@@ -1,8 +0,0 @@
-* debhelper v2:
- * sendmail.prerm
- * rules (dh_movefiles, dh_installinit, dh_perl)
-* make sure text map is changed to hash for mailertable
-* make use of scanf(3) patterns:
- Fc file %^[\#]
-dpkg-source -x, dpkg-buildpackage -B -rsudo and then fetch the changes file, pgp-ing and ready, the flag -B is important to the binary-indep section of the debian/rules file --- thats all
-*haggie!koptein@ppp014asc.fho-emden.de* powerpc builds all packages with an auto-builder (wanna-build), but it is currently broken with an db error
diff --git a/debian/patches/8.12/8.12.3/CAN-2003-0681.patch b/debian/patches/8.12/8.12.3/CAN-2003-0681.patch
new file mode 100644
index 0000000..de31a60
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/CAN-2003-0681.patch
@@ -0,0 +1,87 @@
+Index: parseaddr.c
+===================================================================
+RCS file: /cvs/sendmail/parseaddr.c,v
+retrieving revision 8.359.2.6
+diff -u -r8.359.2.6 parseaddr.c
+--- parseaddr.c 27 Mar 2003 02:39:53 -0000 8.359.2.6
++++ sendmail-8.12.3/sendmail/parseaddr.c 30 Mar 2003 16:41:50 -0000
+@@ -1000,6 +1008,8 @@
+ }
+ if (pvp == NULL)
+ return EX_USAGE;
++ if (maxatom <= 0)
++ return EX_USAGE;
+
+ /*
+ ** Run through the list of rewrite rules, applying
+@@ -1866,6 +1880,7 @@
+ register ENVELOPE *e;
+ {
+ bool tempfail = false;
++ int maxatom;
+ struct mailer **mp;
+ register struct mailer *m;
+ register char *p;
+@@ -1880,6 +1895,7 @@
+ printav(tv);
+ }
+
++ maxatom = MAXATOM;
+ if (a == NULL)
+ a = (ADDRESS *) sm_rpool_malloc_x(e->e_rpool, sizeof *a);
+ memset((char *) a, '\0', sizeof *a);
+@@ -1919,14 +1935,22 @@
+ return a;
+ }
+ mname = *++tv;
++ --maxatom;
+
+ /* extract host and user portions */
+ if (*++tv != NULL && (**tv & 0377) == CANONHOST)
++ {
+ hostp = ++tv;
++ --maxatom;
++ }
+ else
+ hostp = NULL;
++ --maxatom;
+ while (*tv != NULL && (**tv & 0377) != CANONUSER)
++ {
+ tv++;
++ --maxatom;
++ }
+ if (*tv == NULL)
+ {
+ syserr("554 5.3.5 buildaddr: no user");
+@@ -1937,6 +1961,7 @@
+ else if (hostp != NULL)
+ cataddr(hostp, tv - 1, hbuf, sizeof hbuf, '\0');
+ cataddr(++tv, NULL, ubuf, sizeof ubuf, ' ');
++ --maxatom;
+
+ /* save away the host name */
+ if (sm_strcasecmp(mname, "error") == 0)
+@@ -2041,6 +2066,7 @@
+ {
+ p++;
+ tv++;
++ --maxatom;
+ a->q_flags |= QNOTREMOTE;
+ }
+
+@@ -2071,11 +2097,11 @@
+ !bitset(RF_SENDERADDR|RF_HEADERADDR, flags))
+ {
+ /* sender addresses done later */
+- (void) REWRITE(tv, 2, e);
++ (void) rewrite(tv, 2, 0, e, maxatom);
+ if (m->m_re_rwset > 0)
+- (void) REWRITE(tv, m->m_re_rwset, e);
++ (void) rewrite(tv, m->m_re_rwset, 0, e, maxatom);
+ }
+- (void) REWRITE(tv, 4, e);
++ (void) rewrite(tv, 4, 0, e, maxatom);
+
+ /* save the result for the command line/RCPT argument */
+ cataddr(tv, NULL, ubuf, sizeof ubuf, '\0');
+
diff --git a/debian/patches/8.12/8.12.3/CAN-2003-0694.patch b/debian/patches/8.12/8.12.3/CAN-2003-0694.patch
new file mode 100644
index 0000000..bdba504
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/CAN-2003-0694.patch
@@ -0,0 +1,15 @@
+diff -ru build-tree.orig/sendmail-8.12.3/sendmail/parseaddr.c build-tree/sendmail-8.12.3/sendmail/parseaddr.c
+--- build-tree.orig/sendmail-8.12.3/sendmail/parseaddr.c 2003-09-17 10:43:53.000000000 -0400
++++ sendmail-8.12.3/sendmail/parseaddr.c 2003-09-17 10:45:06.000000000 -0400
+@@ -700,7 +700,11 @@
+ addr[MAXNAME] = '\0';
+ returnnull:
+ if (delimptr != NULL)
++ {
++ if (p > addr)
++ p--;
+ *delimptr = p;
++ }
+ CurEnv->e_to = saveto;
+ return NULL;
+ }
diff --git a/debian/patches/8.12/8.12.3/bf.c.8.51 b/debian/patches/8.12/8.12.3/bf.c.8.51
new file mode 100644
index 0000000..fec8d59
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/bf.c.8.51
@@ -0,0 +1,30 @@
+Index: sendmail/bf.c
+diff -u sendmail/bf.c:8.51 sendmail/bf.c:8.52
+--- sendmail/bf.c:8.51 Mon Mar 4 13:51:25 2002
++++ ./sendmail-8.12.3/sendmail/bf.c Thu Apr 11 14:00:15 2002
+@@ -202,12 +202,24 @@
+ ** any value of errno specified by sm_io_setinfo()
+ */
+
++#ifdef __STDC__
++/*
++** XXX This is a temporary hack since MODE_T on HP-UX 10.x is short.
++** If we use K&R here, the compiler will complain about
++** Inconsistent parameter list declaration
++** due to the change from short to int.
++*/
++
+ SM_FILE_T *
++bfopen(char *filename, MODE_T fmode, size_t bsize, long flags)
++#else /* __STDC__ */
++SM_FILE_T *
+ bfopen(filename, fmode, bsize, flags)
+ char *filename;
+ MODE_T fmode;
+ size_t bsize;
+ long flags;
++#endif /* __STDC__ */
+ {
+ MODE_T omask;
+ SM_FILE_T SM_IO_SET_TYPE(vector, BF_FILE_TYPE, sm_bfopen, sm_bfclose,
+
diff --git a/debian/patches/8.12/8.12.3/domain.c.8.181 b/debian/patches/8.12/8.12.3/domain.c.8.181
new file mode 100644
index 0000000..da6a59f
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/domain.c.8.181
@@ -0,0 +1,16 @@
+Index: domain.c
+===================================================================
+RCS file: /cvs/sendmail/domain.c,v
+retrieving revision 8.181
+diff -u -r8.181 domain.c
+--- domain.c 2002/05/24 23:48:42 8.181
++++ ./sendmail-8.12.3/sendmail/domain.c 2002/06/27 15:45:27
+@@ -737,7 +737,7 @@
+ #endif /* _FFR_BESTMX_BETTER_TRUNCATION */
+
+ _res.options &= ~(RES_DNSRCH|RES_DEFNAMES);
+- nmx = getmxrr(name, mxhosts, NULL, false, statp, true, NULL);
++ nmx = getmxrr(name, mxhosts, NULL, false, statp, false, NULL);
+ _res.options = saveopts;
+ if (nmx <= 0)
+ return NULL;
diff --git a/debian/patches/8.12/8.12.3/dpatch.001 b/debian/patches/8.12/8.12.3/dpatch.001
new file mode 100644
index 0000000..972c1c2
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/dpatch.001
@@ -0,0 +1,50 @@
+# Remove -Y from procmail arguements
+#
+# To apply this patch:
+# STEP 1: Chdir to the source directory.
+# STEP 2: Run the 'applypatch' program with this patch file as input.
+#
+# If you do not have 'applypatch', it is part of the 'makepatch' package
+# that you can fetch from the Comprehensive Perl Archive Network:
+# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
+# In the above URL, 'x' should be 2 or higher.
+#
+# To apply this patch without the use of 'applypatch':
+# STEP 1: Chdir to the source directory.
+# STEP 2: Run the 'patch' program with this file as input.
+#
+#### End of Preamble ####
+
+#### Patch data follows ####
+diff -c 'cf/feature/local_procmail.m4' 'debian/patches/local_procmail.m4'
+Index: ./cf/feature/local_procmail.m4
+Prereq: 8.21
+*** sendmail-8.12.3/cf/feature/local_procmail.m4 Sat Nov 20 15:26:21 1999
+--- ./debian/patches/local_procmail.m4 Sat Nov 20 15:39:46 1999
+***************
+*** 27,32 ****
+ `/usr/local/bin/procmail'),
+ _ARG_))
+ define(`LOCAL_MAILER_ARGS',
+! ifelse(len(X`'_ARG2_), `1', `procmail -Y -a $h -d $u', _ARG2_))
+ define(`LOCAL_MAILER_FLAGS',
+ ifelse(len(X`'_ARG3_), `1', `SPfhn9', _ARG3_))
+--- 27,32 ----
+ `/usr/local/bin/procmail'),
+ _ARG_))
+ define(`LOCAL_MAILER_ARGS',
+! ifelse(len(X`'_ARG2_), `1', `procmail -a $h -d $u', _ARG2_))
+ define(`LOCAL_MAILER_FLAGS',
+ ifelse(len(X`'_ARG3_), `1', `SPfhn9', _ARG3_))
+#### End of Patch data ####
+
+#### ApplyPatch data follows ####
+# Data version : 1.0
+# Date generated : Sat Nov 20 15:39:47 1999
+# Generated by : makepatch 2.00
+# Recurse directories : Yes
+# p 'cf/feature/local_procmail.m4' 941
+#### End of ApplyPatch data ####
+
+#### End of Patch kit [created: Sat Nov 20 15:39:47 1999] ####
+#### Checksum: 49 1730 1445 ####
diff --git a/debian/patches/cf.mailer.cyrus.m4 b/debian/patches/8.12/8.12.3/dpatch.002
index 85f7632..6f569d9 100644
--- a/debian/patches/cf.mailer.cyrus.m4
+++ b/debian/patches/8.12/8.12.3/dpatch.002
@@ -1,17 +1,18 @@
---- ./cf/mailer/cyrus.m4 Tue May 2 14:40:24 2000
+--- sendmail-8.12.3/cf/mailer/cyrus.m4 Tue May 2 14:40:24 2000
+++ ./debian/patches/cf/mailer/cyrus.m4 Tue May 2 14:41:21 2000
-@@ -35,11 +35,11 @@
+@@ -36,12 +36,12 @@
#
- ifdef(`CYRUS_MAILER_FLAGS',, `define(`CYRUS_MAILER_FLAGS', `A5@/:|')')
+ _DEFIFNOT(`CYRUS_MAILER_FLAGS', `Ah5@/:|')
-ifdef(`CYRUS_MAILER_PATH',, `define(`CYRUS_MAILER_PATH', /usr/cyrus/bin/deliver)')
-ifdef(`CYRUS_MAILER_ARGS',, `define(`CYRUS_MAILER_ARGS', `deliver -e -m $h -- $u')')
+ifdef(`CYRUS_MAILER_PATH',, `define(`CYRUS_MAILER_PATH', /usr/sbin/cyrdeliver)')
+ifdef(`CYRUS_MAILER_ARGS',, `define(`CYRUS_MAILER_ARGS', `cyrdeliver -e -m $h -- $u')')
ifdef(`CYRUS_MAILER_USER',, `define(`CYRUS_MAILER_USER', `cyrus:mail')')
- ifdef(`CYRUS_BB_MAILER_FLAGS',, `define(`CYRUS_BB_MAILER_FLAGS', `')')
+ _DEFIFNOT(`CYRUS_BB_MAILER_FLAGS', `u')
-ifdef(`CYRUS_BB_MAILER_ARGS',, `define(`CYRUS_BB_MAILER_ARGS', `deliver -e -m $u')')
+ifdef(`CYRUS_BB_MAILER_ARGS',, `define(`CYRUS_BB_MAILER_ARGS', `cyrdeliver -e -m $u')')
+ define(`_CYRUS_QGRP', `ifelse(defn(`CYRUS_MAILER_QGRP'),`',`', ` Q=CYRUS_MAILER_QGRP,')')dnl
POPDIVERT
diff --git a/debian/patches/patch.rmail b/debian/patches/8.12/8.12.3/dpatch.003
index c42593d..511d2b0 100644
--- a/debian/patches/patch.rmail
+++ b/debian/patches/8.12/8.12.3/dpatch.003
@@ -1,4 +1,4 @@
-# Allow background delivery of mail, instead of queueing
+# Change sendmail call -obq to -obi
#
# To apply this patch:
# STEP 1: Chdir to the source directory.
@@ -16,25 +16,25 @@
#### End of Preamble ####
#### Patch data follows ####
-diff -c '../../rmail/rmail.c' 'rmail.c'
-Index: ./../../rmail/rmail.c
-Prereq: 8.18
-*** ./../../rmail/rmail.c Tue Dec 29 12:43:05 1998
---- ./rmail.c Mon Sep 13 10:47:12 1999
+diff -c 'rmail/rmail.c' 'debian/patches/rmail.c'
+Index: ./rmail/rmail.c
+Prereq: 8.61
+*** sendmail-8.12.3/rmail/rmail.c Sat Sep 16 18:20:25 2000
+--- ./debian/patches/rmail.c Thu Sep 28 17:00:59 2000
***************
-*** 273,279 ****
- i = 0;
+*** 318,324 ****
args[i++] = _PATH_SENDMAIL; /* Build sendmail's argument list. */
+ args[i++] = "-G"; /* relay submission */
args[i++] = "-oee"; /* No errors, just status. */
! args[i++] = "-odq"; /* Queue it, don't try to deliver. */
args[i++] = "-oi"; /* Ignore '.' on a line by itself. */
/* set from system and protocol used */
---- 273,279 ----
- i = 0;
+--- 318,324 ----
args[i++] = _PATH_SENDMAIL; /* Build sendmail's argument list. */
+ args[i++] = "-G"; /* relay submission */
args[i++] = "-oee"; /* No errors, just status. */
-! args[i++] = "-odi"; /* deliver in the foreground. */
+! args[i++] = "-odi"; /* deliver in the foreground. */
args[i++] = "-oi"; /* Ignore '.' on a line by itself. */
/* set from system and protocol used */
@@ -42,11 +42,11 @@ Prereq: 8.18
#### ApplyPatch data follows ####
# Data version : 1.0
-# Date generated : Mon Sep 13 10:47:49 1999
+# Date generated : Thu Sep 28 17:01:04 2000
# Generated by : makepatch 2.00
# Recurse directories : Yes
-# p '../../rmail/rmail.c' 10101
+# p './build-tree/sendmail-8.11.1/rmail/rmail.c' 12072
#### End of ApplyPatch data ####
-#### End of Patch kit [created: Mon Sep 13 10:47:49 1999] ####
-#### Checksum: 51 1826 6572 ####
+#### End of Patch kit [created: Thu Sep 28 17:01:04 2000] ####
+#### Checksum: 51 2010 21691 ####
diff --git a/debian/patches/8.12/8.12.3/dpatch.004 b/debian/patches/8.12/8.12.3/dpatch.004
new file mode 100644
index 0000000..867a195
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/dpatch.004
@@ -0,0 +1,52 @@
+# Make control socket mode 0660
+#
+# To apply this patch:
+# STEP 1: Chdir to the source directory.
+# STEP 2: Run the 'applypatch' program with this patch file as input.
+#
+# If you do not have 'applypatch', it is part of the 'makepatch' package
+# that you can fetch from the Comprehensive Perl Archive Network:
+# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
+# In the above URL, 'x' should be 2 or higher.
+#
+# To apply this patch without the use of 'applypatch':
+# STEP 1: Chdir to the source directory.
+# STEP 2: Run the 'patch' program with this file as input.
+#
+#### End of Preamble ####
+
+#### Patch data follows ####
+diff -c 'sendmail/control.c' 'debian/patches/control.c'
+Index: ./sendmail/control.c
+Prereq: 8.118
+*** sendmail-8.12.3/sendmail/control.c Sat Nov 20 15:26:23 1999
+--- ./debian/patches/control.c Sat Nov 20 15:39:52 1999
+***************
+*** 92,98 ****
+ }
+ }
+
+! if (chmod(ControlSocketName, S_IRUSR|S_IWUSR) < 0)
+ {
+ save_errno = errno;
+ closecontrolsocket(TRUE);
+--- 92,98 ----
+ }
+ }
+
+! if (chmod(ControlSocketName, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) < 0)
+ {
+ save_errno = errno;
+ closecontrolsocket(TRUE);
+#### End of Patch data ####
+
+#### ApplyPatch data follows ####
+# Data version : 1.0
+# Date generated : Sat Nov 20 15:39:53 1999
+# Generated by : makepatch 2.00
+# Recurse directories : Yes
+# p 'sendmail/control.c' 6165
+#### End of ApplyPatch data ####
+
+#### End of Patch kit [created: Sat Nov 20 15:39:53 1999] ####
+#### Checksum: 51 1497 50060 ####
diff --git a/debian/patches/8.12/8.12.3/dpatch.005 b/debian/patches/8.12/8.12.3/dpatch.005
new file mode 100644
index 0000000..c4ba0c5
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/dpatch.005
@@ -0,0 +1,54 @@
+# /usr/bin/faxmail, !/usr/local/bin/faxmail
+#
+# To apply this patch:
+# STEP 1: Chdir to the source directory.
+# STEP 2: Run the 'applypatch' program with this patch file as input.
+#
+# If you do not have 'applypatch', it is part of the 'makepatch' package
+# that you can fetch from the Comprehensive Perl Archive Network:
+# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
+# In the above URL, 'x' should be 2 or higher.
+#
+# To apply this patch without the use of 'applypatch':
+# STEP 1: Chdir to the source directory.
+# STEP 2: Run the 'patch' program with this file as input.
+#
+#### End of Preamble ####
+
+#### Patch data follows ####
+diff -c './cf/mailer/fax.m4' 'fax.m4'
+Index: ./cf/mailer/fax.m4
+Prereq: 8.16
+*** sendmail-8.12.3/cf/mailer/fax.m4 Mon Oct 18 02:35:28 1999
+--- ./fax.m4 Wed Jan 3 14:26:13 2001
+***************
+*** 19,26 ****
+ ifdef(`FAX_MAILER_ARGS',,
+ `define(`FAX_MAILER_ARGS', faxmail -d $u@$h $f)')
+ ifdef(`FAX_MAILER_PATH',,
+! `define(`FAX_MAILER_PATH', /usr/local/bin/faxmail)')
+ ifdef(`FAX_MAILER_MAX',,
+ `define(`FAX_MAILER_MAX', 100000)')
+ define(`_FAX_QGRP', `ifelse(defn(`FAX_MAILER_QGRP'),`',`', ` Q=FAX_MAILER_QGRP,')')dnl
+ POPDIVERT
+--- 19,26 ----
+ ifdef(`FAX_MAILER_ARGS',,
+ `define(`FAX_MAILER_ARGS', faxmail -d $u@$h $f)')
+ ifdef(`FAX_MAILER_PATH',,
+! `define(`FAX_MAILER_PATH', /usr/bin/faxmail)')
+ ifdef(`FAX_MAILER_MAX',,
+ `define(`FAX_MAILER_MAX', 100000)')
+ define(`_FAX_QGRP', `ifelse(defn(`FAX_MAILER_QGRP'),`',`', ` Q=FAX_MAILER_QGRP,')')dnl
+ POPDIVERT
+#### End of Patch data ####
+
+#### ApplyPatch data follows ####
+# Data version : 1.0
+# Date generated : Wed Jan 3 14:27:33 2001
+# Generated by : makepatch 2.00
+# Recurse directories : Yes
+# p '../../build-tree/sendmail-8.11.2/cf/mailer/fax.m4' 1062
+#### End of ApplyPatch data ####
+
+#### End of Patch kit [created: Wed Jan 3 14:27:33 2001] ####
+#### Checksum: 51 1807 4852 ####
diff --git a/debian/patches/8.12/8.12.3/dsa-doublebounce.patch b/debian/patches/8.12/8.12.3/dsa-doublebounce.patch
new file mode 100644
index 0000000..f920d0a
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/dsa-doublebounce.patch
@@ -0,0 +1,20 @@
+diff -u doublebounce.pl.old doublebounce.pl
+--- doublebounce.pl.old Sun Feb 7 05:44:09 1999
++++ ./sendmail-8.12.3/contrib/doublebounce.pl Mon Apr 14 08:46:02 2003
+@@ -26,6 +26,7 @@
+
+
+ use Socket;
++use Fcntl;
+
+ # look for debug flag
+ #
+@@ -45,7 +46,7 @@
+ # I thought about reading it into a buffer here, but some messages
+ # are 10+Mb so a buffer may not be a good idea
+ #
+-if (! open(MSG, "+> $tmp")) {
++if (! sysopen(MSG, "$tmp", O_RDWR|O_CREAT|O_EXCL, 0600)) {
+ # can't open temp file -- send message to local postmaster
+ # open(MAIL, "| /usr/sbin/sendmail -oeq postmaster");
+ print MAIL <STDIN>;
diff --git a/debian/patches/8.12/8.12.3/dsa-expn.patch b/debian/patches/8.12/8.12.3/dsa-expn.patch
new file mode 100644
index 0000000..c24bfaa
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/dsa-expn.patch
@@ -0,0 +1,20 @@
+diff -u expn.old expn
+--- expn.old Sat Apr 5 00:07:36 2003
++++ ./sendmail-8.12.3/contrib/expn.pl Mon Apr 14 08:37:41 2003
+@@ -8,6 +8,7 @@
+
+ use 5.001;
+ use IO::Socket;
++use Fcntl;
+
+ # system requirements:
+ # must have 'nslookup' and 'hostname' programs.
+@@ -999,7 +1000,7 @@
+ }
+
+ $0 = "$av0 - nslookup of $server";
+- open(T,">/tmp/expn$$") || die "open > /tmp/expn$$: $!\n";
++ sysopen(T,"/tmp/expn$$",O_RDWR|O_CREAT|O_EXCL,0600) || die "open > /tmp/expn$$: $!\n";
+ print T "set querytype=MX\n";
+ print T "$server\n";
+ close(T);
diff --git a/debian/patches/8.12/8.12.3/main.c.8.876 b/debian/patches/8.12/8.12.3/main.c.8.876
new file mode 100644
index 0000000..9be7994
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/main.c.8.876
@@ -0,0 +1,17 @@
+Index: main.c
+===================================================================
+RCS file: /cvs/sendmail/main.c,v
+retrieving revision 8.876
+diff -u -r8.876 main.c
+--- ./sendmail-8.12.3/sendmail/main.c 2002/02/27 23:49:52 8.876
++++ main.c 2002/04/10 23:59:28
+@@ -726,6 +726,8 @@
+ (void) sm_signal(SIGPIPE, SIG_IGN);
+ OldUmask = umask(022);
+ FullName = getextenv("NAME");
++ if (FullName != NULL)
++ FullName = newstr(FullName);
+
+ /*
+ ** Initialize name server if it is going to be used.
+
diff --git a/debian/patches/8.12/8.12.3/maxseq.patch b/debian/patches/8.12/8.12.3/maxseq.patch
new file mode 100644
index 0000000..3b2009b
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/maxseq.patch
@@ -0,0 +1,51 @@
+# This is a patch for conf.h to update it to conf.h.new
+#
+# To apply this patch:
+# STEP 1: Chdir to the source directory.
+# STEP 2: Run the 'applypatch' program with this patch file as input.
+#
+# If you do not have 'applypatch', it is part of the 'makepatch' package
+# that you can fetch from the Comprehensive Perl Archive Network:
+# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
+# In the above URL, 'x' should be 2 or higher.
+#
+# To apply this patch without the use of 'applypatch':
+# STEP 1: Chdir to the source directory.
+# STEP 2: Run the 'patch' program with this file as input.
+#
+#### End of Preamble ####
+
+#### Patch data follows ####
+diff -c 'conf.h' 'conf.h.new'
+Index: ./conf.h
+Prereq: 8.560
+*** ./sendmail-8.12.3/sendmail/conf.h Fri Sep 21 19:01:46 2001
+--- ./conf.h.new Wed Oct 10 09:24:41 2001
+***************
+*** 71,76 ****
+ #define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */
+ #define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */
+! #define MAXMAPSTACK 12 /* max # of stacked or sequenced maps */
+ #if MILTER
+ # define MAXFILTERS 25 /* max # of milter filters */
+ # define MAXFILTERMACROS 50 /* max # of macros per milter cmd */
+--- 71,76 ----
+ #define MEMCHUNKSIZE 1024 /* chunk size for memory allocation */
+ #define MAXUSERENVIRON 100 /* max envars saved, must be >= 3 */
+! #define MAXMAPSTACK 128 /* max # of stacked or sequenced maps */
+ #if MILTER
+ # define MAXFILTERS 25 /* max # of milter filters */
+ # define MAXFILTERMACROS 50 /* max # of macros per milter cmd */
+#### End of Patch data ####
+
+#### ApplyPatch data follows ####
+# Data version : 1.0
+# Date generated : Wed Oct 10 09:25:12 2001
+# Generated by : makepatch 2.00_03
+# Recurse directories : Yes
+# p 'conf.h' 6809
+#### End of ApplyPatch data ####
+
+#### End of Patch kit [created: Wed Oct 10 09:25:12 2001] ####
+#### Patch checksum: 34 1333 28813 ####
+#### Checksum: 52 2010 19538 ####
diff --git a/debian/patches/8.12/8.12.3/patch.milter.replbody b/debian/patches/8.12/8.12.3/patch.milter.replbody
new file mode 100644
index 0000000..6321210
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/patch.milter.replbody
@@ -0,0 +1,63 @@
+Index: sendmail/bf.c
+diff -u sendmail/bf.c:8.52 sendmail/bf.c:8.53
+--- sendmail/bf.c:8.52 Thu Apr 11 14:00:15 2002
++++ ./sendmail-8.12.3/sendmail/bf.c Sat Apr 13 20:55:07 2002
+@@ -795,11 +795,12 @@
+ errno = EINVAL;
+ return -1;
+ #else /* NOFTRUNCATE */
++ if (lseek(bfp->bf_disk_fd, 0, SEEK_SET) < 0)
++ return -1;
+ return ftruncate(bfp->bf_disk_fd, 0);
+ #endif /* NOFTRUNCATE */
+ }
+- else
+- return 0;
++ return 0;
+ }
+
+ /*
+
+------------------------------------
+Index: sendmail/milter.c
+diff -u sendmail/milter.c:8.195 sendmail/milter.c:8.196
+--- sendmail/milter.c:8.195 Thu Apr 11 10:30:29 2002
++++ ./sendmail-8.12.3/sendmail/milter.c Sat Apr 13 20:55:07 2002
+@@ -2903,8 +2903,6 @@
+ {
+ int err;
+
+-# if NOFTRUNCATE
+- /* XXX: Not much we can do except rewind it */
+ err = sm_io_error(e->e_dfp);
+ (void) sm_io_flush(e->e_dfp, SM_TIME_DEFAULT);
+
+@@ -2920,16 +2918,26 @@
+ /* errno is set implicitly by fseek() before return */
+ err = sm_io_seek(e->e_dfp, SM_TIME_DEFAULT,
+ 0, SEEK_SET);
++ if (err < 0)
++ {
++ MILTER_DF_ERROR("milter_replbody: sm_io_seek %s: %s");
++ return -1;
++ }
++# if NOFTRUNCATE
++ /* XXX: Not much we can do except rewind it */
++ errno = EINVAL;
++ MILTER_DF_ERROR("milter_replbody: ftruncate not available on this platform (%s:%s)");
++ return -1;
+ # else /* NOFTRUNCATE */
+ err = ftruncate(sm_io_getinfo(e->e_dfp,
+ SM_IO_WHAT_FD, NULL),
+ 0);
+-# endif /* NOFTRUNCATE */
+ if (err < 0)
+ {
+ MILTER_DF_ERROR("milter_replbody: sm_io ftruncate %s: %s");
+ return -1;
+ }
++# endif /* NOFTRUNCATE */
+ }
+
+ if (prevsize > e->e_msgsize)
+
diff --git a/debian/patches/8.12/8.12.3/proto.m4.8.646 b/debian/patches/8.12/8.12.3/proto.m4.8.646
new file mode 100644
index 0000000..395cbb0
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/proto.m4.8.646
@@ -0,0 +1,11 @@
+--- proto.m4- Thu Nov 14 17:01:56 2002
++++ ./sendmail-8.12.3/cf/m4/proto.m4 Thu Nov 14 17:02:19 2002
+@@ -2228,7 +2228,7 @@
+ dnl ${client_resolve} should be OK, so go ahead
+ R$* $: <@> $&{client_name}
+ dnl should not be necessary since it has been done for client_addr already
+-R<@> $@ RELAY
++#R<@> $@ RELAY
+ dnl workspace: <@> ${client_name} (not empty)
+ # pass to name server to make hostname canonical
+ R<@> $* $=P $:<?> $1 $2
diff --git a/debian/patches/8.12/8.12.3/proto.m4.8.649.2.13 b/debian/patches/8.12/8.12.3/proto.m4.8.649.2.13
new file mode 100644
index 0000000..2c3a283
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/proto.m4.8.649.2.13
@@ -0,0 +1,18 @@
+Index: proto.m4
+===================================================================
+RCS file: /cvs/cf/m4/proto.m4,v
+retrieving revision 8.649.2.12
+retrieving revision 8.649.2.13
+diff -u -r8.649.2.12 -r8.649.2.13
+--- proto.m4 3 Dec 2002 16:48:37 -0000 8.649.2.12
++++ ./sendmail-8.12.3/cf/m4/proto.m4 4 Dec 2002 00:12:18 -0000 8.649.2.13
+@@ -1761,6 +1761,9 @@
+ dnl workspace: {client_name} $| {client_addr}
+ R$+ $| $+ $: $>D < $1 > <?> <+ Connect> < $2 >
+ dnl workspace: <result-of-lookup> <{client_addr}>
++dnl OR $| $+ if client_name is empty
++R $| $+ $: $>A < $1 > <?> <+ Connect> <> empty client_name
++dnl workspace: <result-of-lookup> <{client_addr}>
+ R<?> <$+> $: $>A < $1 > <?> <+ Connect> <> no: another lookup
+ dnl workspace: <result-of-lookup> (<>|<{client_addr}>)
+ R<?> <$*> $: OK found nothing
diff --git a/debian/patches/8.12/8.12.3/recipient.c.8.330.2.1 b/debian/patches/8.12/8.12.3/recipient.c.8.330.2.1
new file mode 100644
index 0000000..10516b0
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/recipient.c.8.330.2.1
@@ -0,0 +1,17 @@
+Index: recipient.c
+===================================================================
+RCS file: /cvs/sendmail/recipient.c,v
+retrieving revision 8.330
+retrieving revision 8.330.2.1
+diff -u -r8.330 -r8.330.2.1
+--- ./sendmail-8.12.3/sendmail/recipient.c 29 May 2002 18:20:03 -0000 8.330
++++ recipient.c 27 Aug 2002 20:21:02 -0000 8.330.2.1
+@@ -679,7 +679,7 @@
+ ** the current recipient is marked expensive.
+ */
+
+- if (WILL_BE_QUEUED(e->e_sendmode) ||
++ if (UseMSP || WILL_BE_QUEUED(e->e_sendmode) ||
+ (!bitset(EF_SPLIT, e->e_flags) && e->e_ntries == 0 &&
+ FastSplit > 0))
+ sortfn = sorthost;
diff --git a/debian/patches/8.12/8.12.3/security.parsaddr b/debian/patches/8.12/8.12.3/security.parsaddr
new file mode 100644
index 0000000..90daf45
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/security.parsaddr
@@ -0,0 +1,58 @@
+diff -u -Nur --exclude CVS sendmail-8.12.3.orig/sendmail/parseaddr.c sendmail-8.12.3/sendmail/parseaddr.c
+--- sendmail-8.12.3.orig/sendmail/parseaddr.c 2003-04-01 20:52:13.000000000 +0200
++++ sendmail-8.12.3/sendmail/parseaddr.c 2003-04-04 15:59:07.000000000 +0200
+@@ -608,7 +608,7 @@
+ };
+
+
+-#define NOCHAR -1 /* signal nothing in lookahead token */
++#define NOCHAR (-1) /* signal nothing in lookahead token */
+
+ char **
+ prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab)
+@@ -694,6 +694,7 @@
+ /* see if there is room */
+ if (q >= &pvpbuf[pvpbsize - 5])
+ {
++ addrtoolong:
+ usrerr("553 5.1.1 Address too long");
+ if (strlen(addr) > MAXNAME)
+ addr[MAXNAME] = '\0';
+@@ -705,11 +706,15 @@
+ }
+
+ /* squirrel it away */
++#if !ALLOW_255
++ if ((char) c == (char) -1 && !tTd(82, 101))
++ c &= 0x7f;
++#endif /* !ALLOW_255 */
+ *q++ = c;
+ }
+
+ /* read a new input character */
+- c = *p++;
++ c = (unsigned char)*p++;
+ if (c == '\0')
+ {
+ /* diagnose and patch up bad syntax */
+@@ -764,6 +769,9 @@
+ }
+ else if (c != '!' || state == QST)
+ {
++ /* see if there is room */
++ if (q >= &pvpbuf[pvpbsize - 5])
++ goto addrtoolong;
+ *q++ = '\\';
+ continue;
+ }
+@@ -849,6 +857,10 @@
+ /* new token */
+ if (tok != q)
+ {
++ /* see if there is room */
++ if (q >= &pvpbuf[pvpbsize - 5])
++ goto addrtoolong;
++
+ *q++ = '\0';
+ if (tTd(22, 36))
+ {
diff --git a/debian/patches/sendmail.8.9.3.security.cr.patch b/debian/patches/8.12/8.12.3/sendmail.8.12.security.cr.patch
index 394ddf6..0e62081 100644
--- a/debian/patches/sendmail.8.9.3.security.cr.patch
+++ b/debian/patches/8.12/8.12.3/sendmail.8.12.security.cr.patch
@@ -1,25 +1,17 @@
-Index: headers.c
-===================================================================
-RCS file: /cvs/sendmail/headers.c,v
-retrieving revision 8.139
-retrieving revision 8.139.2.1
-diff -u -w -r8.139 -r8.139.2.1
---- src/headers.c 7 Feb 1999 07:26:37 -0000 8.139
-+++ src/headers.c 20 Jan 2003 18:51:34 -0000 8.139.2.1
-@@ -501,9 +501,10 @@
+--- sendmail/headers.c 13 Jan 2003 19:30:28 -0000 8.266.4.3
++++ ./sendmail-8.12.3/sendmail/headers.c 16 Jan 2003 23:31:17 -0000
+@@ -676,8 +676,8 @@
+ if (buf[0] != '\0')
{
if (bitset(H_FROM, h->h_flags))
- {
-- extern char *crackaddr __P((char *));
-+ extern char *crackaddr __P((char *, ENVELOPE *));
-
-- expand(crackaddr(buf), buf, sizeof buf, e);
-+ expand(crackaddr(buf, e), buf,
-+ sizeof buf, e);
- }
- h->h_value = newstr(buf);
+- expand(crackaddr(buf), buf, sizeof buf,
+- e);
++ expand(crackaddr(buf, e),
++ buf, sizeof buf, e);
+ h->h_value = sm_rpool_strdup_x(e->e_rpool, buf);
h->h_flags &= ~H_DEFAULT;
-@@ -803,7 +804,11 @@
+ }
+@@ -998,7 +998,11 @@
** it and replaces it with "$g". The parse is totally ad hoc
** and isn't even guaranteed to leave something syntactically
** identical to what it started with. However, it does leave
@@ -32,7 +24,7 @@ diff -u -w -r8.139 -r8.139.2.1
**
** This algorithm has been cleaned up to handle a wider range
** of cases -- notably quoted and backslash escaped strings.
-@@ -812,6 +817,7 @@
+@@ -1007,6 +1011,7 @@
**
** Parameters:
** addr -- the address to be cracked.
@@ -40,7 +32,7 @@ diff -u -w -r8.139 -r8.139.2.1
**
** Returns:
** a pointer to the new version.
-@@ -824,28 +830,50 @@
+@@ -1019,28 +1024,50 @@
** be copied if it is to be reused.
*/
@@ -80,10 +72,10 @@ diff -u -w -r8.139 -r8.139.2.1
- bool qmode;
- bool realqmode;
- bool skipping;
-- bool putgmac = FALSE;
-- bool quoteit = FALSE;
-- bool gotangle = FALSE;
-- bool gotcolon = FALSE;
+- bool putgmac = false;
+- bool quoteit = false;
+- bool gotangle = false;
+- bool gotcolon = false;
+ int cmtlev; /* comment level in input string */
+ int realcmtlev; /* comment level in output string */
+ int anglelev; /* angle level in input string */
@@ -92,10 +84,10 @@ diff -u -w -r8.139 -r8.139.2.1
+ bool addangle; /* put closing angle in output */
+ bool qmode; /* quoting in original string? */
+ bool realqmode; /* quoting in output string? */
-+ bool putgmac = FALSE; /* already wrote $g */
-+ bool quoteit = FALSE; /* need to quote next character */
-+ bool gotangle = FALSE; /* found first '<' */
-+ bool gotcolon = FALSE; /* found a ':' */
++ bool putgmac = false; /* already wrote $g */
++ bool quoteit = false; /* need to quote next character */
++ bool gotangle = false; /* found first '<' */
++ bool gotcolon = false; /* found a ':' */
register char *bp;
char *buflim;
char *bufhead;
@@ -104,7 +96,7 @@ diff -u -w -r8.139 -r8.139.2.1
static char buf[MAXNAME + 1];
if (tTd(33, 1))
-@@ -860,25 +888,22 @@
+@@ -1055,25 +1082,22 @@
** adjusted later if we find them.
*/
@@ -115,8 +107,8 @@ diff -u -w -r8.139 -r8.139.2.1
- copylev = anglelev = realanglelev = cmtlev = realcmtlev = 0;
+ copylev = anglelev = cmtlev = realcmtlev = 0;
bracklev = 0;
-- qmode = realqmode = FALSE;
-+ qmode = realqmode = addangle = FALSE;
+- qmode = realqmode = false;
++ qmode = realqmode = addangle = false;
while ((c = *p++) != '\0')
{
@@ -137,7 +129,7 @@ diff -u -w -r8.139 -r8.139.2.1
/* check for backslash escapes */
if (c == '\\')
-@@ -893,8 +918,8 @@
+@@ -1088,8 +1112,8 @@
p--;
goto putg;
}
@@ -148,7 +140,7 @@ diff -u -w -r8.139 -r8.139.2.1
goto putg;
}
-@@ -902,8 +927,14 @@
+@@ -1097,8 +1121,14 @@
if (c == '"' && cmtlev <= 0)
{
qmode = !qmode;
@@ -164,7 +156,7 @@ diff -u -w -r8.139 -r8.139.2.1
continue;
}
if (qmode)
-@@ -915,15 +946,15 @@
+@@ -1110,15 +1140,15 @@
cmtlev++;
/* allow space for closing paren */
@@ -183,7 +175,7 @@ diff -u -w -r8.139 -r8.139.2.1
}
}
}
-@@ -933,7 +964,7 @@
+@@ -1128,7 +1158,7 @@
{
cmtlev--;
copylev--;
@@ -192,7 +184,7 @@ diff -u -w -r8.139 -r8.139.2.1
{
realcmtlev--;
buflim++;
-@@ -944,7 +975,7 @@
+@@ -1139,7 +1169,7 @@
else if (c == ')')
{
/* syntax error: unmatched ) */
@@ -201,7 +193,7 @@ diff -u -w -r8.139 -r8.139.2.1
bp--;
}
-@@ -962,7 +993,7 @@
+@@ -1157,7 +1187,7 @@
/*
** Check for DECnet phase IV ``::'' (host::user)
@@ -210,10 +202,10 @@ diff -u -w -r8.139 -r8.139.2.1
** covers ``user@DEC:.tay.myhost'' and
** ``DEC:.tay.myhost::user'' syntaxes (bletch).
*/
-@@ -971,10 +1002,10 @@
+@@ -1166,10 +1196,10 @@
{
if (cmtlev <= 0 && !qmode)
- quoteit = TRUE;
+ quoteit = true;
- if (copylev > 0 && !skipping)
+ if (copylev > 0)
{
@@ -224,7 +216,7 @@ diff -u -w -r8.139 -r8.139.2.1
}
p++;
goto putg;
-@@ -985,41 +1016,43 @@
+@@ -1180,41 +1210,43 @@
bp = bufhead;
if (quoteit)
{
@@ -243,11 +235,11 @@ diff -u -w -r8.139 -r8.139.2.1
{
c = *q++;
- if (bp < buflim)
-- {
- if (quoteit && c == '"')
++ if (quoteit && c == '"')
+ {
+- if (quoteit && c == '"')
- *bp++ = '\\';
- *bp++ = c;
-+ {
+ SM_APPEND_CHAR('\\');
+ SM_APPEND_CHAR(c);
}
@@ -280,9 +272,9 @@ diff -u -w -r8.139 -r8.139.2.1
+ p++;
+ }
copylev = 0;
- putgmac = quoteit = FALSE;
+ putgmac = quoteit = false;
bufhead = bp;
-@@ -1028,10 +1061,7 @@
+@@ -1223,10 +1255,7 @@
}
if (c == ';' && copylev <= 0 && !ColonOkInAddr)
@@ -294,7 +286,7 @@ diff -u -w -r8.139 -r8.139.2.1
/* check for characters that may have to be quoted */
if (strchr(MustQuoteChars, c) != NULL)
-@@ -1059,42 +1089,45 @@
+@@ -1254,42 +1283,45 @@
/* oops -- have to change our mind */
anglelev = 1;
@@ -304,7 +296,7 @@ diff -u -w -r8.139 -r8.139.2.1
+ {
+ if (!addangle)
+ buflim--;
-+ addangle = TRUE;
++ addangle = true;
+ }
bp = bufhead;
@@ -325,11 +317,11 @@ diff -u -w -r8.139 -r8.139.2.1
{
c = *q++;
- if (bp < buflim)
-- {
- if (quoteit && c == '"')
++ if (quoteit && c == '"')
+ {
+- if (quoteit && c == '"')
- *bp++ = '\\';
- *bp++ = c;
-+ {
+ SM_APPEND_CHAR('\\');
+ SM_APPEND_CHAR(c);
}
@@ -353,8 +345,8 @@ diff -u -w -r8.139 -r8.139.2.1
+ SM_APPEND_CHAR(c);
}
copylev = 0;
- putgmac = quoteit = FALSE;
-@@ -1106,13 +1139,14 @@
+ putgmac = quoteit = false;
+@@ -1301,13 +1333,14 @@
if (anglelev > 0)
{
anglelev--;
@@ -362,9 +354,10 @@ diff -u -w -r8.139 -r8.139.2.1
+ if (SM_HAVE_ROOM)
{
- realanglelev--;
+- buflim++;
+ if (addangle)
- buflim++;
-+ addangle = FALSE;
++ buflim++;
++ addangle = false;
}
}
- else if (!skipping)
@@ -372,7 +365,7 @@ diff -u -w -r8.139 -r8.139.2.1
{
/* syntax error: unmatched > */
if (copylev > 0)
-@@ -1121,7 +1155,7 @@
+@@ -1316,7 +1349,7 @@
continue;
}
if (copylev++ <= 0)
@@ -381,7 +374,7 @@ diff -u -w -r8.139 -r8.139.2.1
continue;
}
-@@ -1129,30 +1163,42 @@
+@@ -1324,30 +1357,42 @@
putg:
if (copylev <= 0 && !putgmac)
{
@@ -393,7 +386,7 @@ diff -u -w -r8.139 -r8.139.2.1
+ SM_APPEND_CHAR(' ');
+ SM_APPEND_CHAR(MACROEXPAND);
+ SM_APPEND_CHAR('g');
- putgmac = TRUE;
+ putgmac = true;
}
}
@@ -411,7 +404,7 @@ diff -u -w -r8.139 -r8.139.2.1
+ *bp = '\0';
+ if (bp < bufend)
+ goto success;
-
++
+ returng:
+ /* String too long, punt */
+ buf[0] = '<';
@@ -421,62 +414,32 @@ diff -u -w -r8.139 -r8.139.2.1
+ buf[4]= '\0';
+ sm_syslog(LOG_ALERT, e->e_id,
+ "Dropped invalid comments from header address");
-+
+
+ success:
if (tTd(33, 1))
{
- printf("crackaddr=>`");
+ sm_dprintf("crackaddr=>`");
xputs(buf);
- printf("'\n");
+ sm_dprintf("'\n");
}
-
- return (buf);
+ return buf;
}
- /*
-Index: main.c
-===================================================================
-RCS file: /cvs/sendmail/main.c,v
-retrieving revision 8.326
-retrieving revision 8.326.2.2
-diff -u -w -r8.326 -r8.326.2.2
---- src/main.c 7 Feb 1999 07:43:59 -0000 8.326
-+++ src/main.c 20 Jan 2003 18:51:34 -0000 8.326.2.2
-@@ -2349,7 +2349,7 @@
- static int tryflags = RF_COPYNONE;
- char exbuf[MAXLINE];
- extern bool invalidaddr __P((char *, char *));
-- extern char *crackaddr __P((char *));
-+ extern char *crackaddr __P((char *, ENVELOPE *));
- extern void dump_class __P((STAB *, int));
- extern void translate_dollars __P((char *));
- extern void help __P((char *));
-@@ -2671,7 +2671,7 @@
- printf("Usage: /parse address\n");
+ /*
+--- sendmail/main.c 8 Jan 2003 23:09:59 -0000 8.887.2.17
++++ ./sendmail-8.12.3/sendmail/main.c 14 Jan 2003 02:38:58 -0000
+@@ -4423,7 +4423,7 @@
+ "Usage: /parse address\n");
return;
}
- q = crackaddr(p);
+ q = crackaddr(p, e);
- printf("Cracked address = ");
+ (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT,
+ "Cracked address = ");
xputs(q);
- printf("\nParsing %s %s address\n",
-Index: parseaddr.c
-===================================================================
-RCS file: /cvs/sendmail/parseaddr.c,v
-retrieving revision 8.159
-retrieving revision 8.159.2.1
-diff -u -w -r8.159 -r8.159.2.1
---- src/parseaddr.c 7 Feb 1999 07:26:40 -0000 8.159
-+++ src/parseaddr.c 20 Jan 2003 18:51:35 -0000 8.159.2.1
-@@ -2053,7 +2053,7 @@
- static char buf[MAXNAME + 1];
- char lbuf[MAXNAME + 1];
- char pvpbuf[PSBUFSIZE];
-- extern char *crackaddr __P((char *));
-+ extern char *crackaddr __P((char *, ENVELOPE *));
-
- if (tTd(12, 1))
- printf("remotename(%s)\n", name);
-@@ -2076,7 +2076,7 @@
+--- sendmail/parseaddr.c 26 Sep 2002 23:03:39 -0000 8.359.2.3
++++ ./sendmail-8.12.3/sendmail/parseaddr.c 14 Jan 2003 02:38:58 -0000
+@@ -2509,7 +2509,7 @@
if (bitset(RF_CANONICAL, flags) || bitnset(M_NOCOMMENT, m->m_flags))
fancy = "\201g";
else
@@ -485,3 +448,15 @@ diff -u -w -r8.159 -r8.159.2.1
/*
** Turn the name into canonical form.
+--- sendmail/sendmail.h 12 Dec 2002 22:46:35 -0000 8.919.2.15
++++ ./sendmail-8.12.3/sendmail/sendmail.h 14 Jan 2003 02:38:58 -0000
+@@ -394,7 +394,7 @@
+
+ /* functions */
+ extern void cataddr __P((char **, char **, char *, int, int));
+-extern char *crackaddr __P((char *));
++extern char *crackaddr __P((char *, ENVELOPE *));
+ extern bool emptyaddr __P((ADDRESS *));
+ extern ADDRESS *getctladdr __P((ADDRESS *));
+ extern int include __P((char *, bool, ADDRESS *, ADDRESS **, int, ENVELOPE *));
+
diff --git a/debian/patches/8.12/8.12.3/smrsh-20020924.patch b/debian/patches/8.12/8.12.3/smrsh-20020924.patch
new file mode 100644
index 0000000..d9f4c93
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/smrsh-20020924.patch
@@ -0,0 +1,63 @@
+Index: smrsh.c
+===================================================================
+RCS file: /cvs/smrsh/smrsh.c,v
+retrieving revision 8.58
+diff -u -r8.58 smrsh.c
+--- ./sendmail-8.12.3/smrsh/smrsh.c 25 May 2002 02:41:31 -0000 8.58
++++ smrsh.c 24 Sep 2002 23:58:16 -0000
+@@ -57,6 +57,8 @@
+ #include <sm/limits.h>
+ #include <sm/string.h>
+ #include <sys/file.h>
++#include <sys/types.h>
++#include <sys/stat.h>
+ #include <string.h>
+ #include <ctype.h>
+ #include <errno.h>
+@@ -145,6 +147,7 @@
+ char *newenv[2];
+ char pathbuf[1000];
+ char specialbuf[32];
++ struct stat st;
+
+ #ifndef DEBUG
+ # ifndef LOG_MAIL
+@@ -302,6 +305,38 @@
+ (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT,
+ "Trying %s\n", cmdbuf);
+ #endif /* DEBUG */
++ if (stat(cmdbuf, &st) < 0)
++ {
++ /* can't stat it */
++ (void) sm_io_fprintf(smioerr, SM_TIME_DEFAULT,
++ "%s: %s not available for sendmail programs (stat failed)\n",
++ prg, cmd);
++ if (p != NULL)
++ *p = ' ';
++#ifndef DEBUG
++ syslog(LOG_CRIT, "uid %d: attempt to use %s (stat failed)",
++ (int) getuid(), cmd);
++#endif /* ! DEBUG */
++ exit(EX_UNAVAILABLE);
++ }
++ if (!S_ISREG(st.st_mode)
++#ifdef S_ISLNK
++ && !S_ISLNK(st.st_mode)
++#endif /* S_ISLNK */
++ )
++ {
++ /* can't stat it */
++ (void) sm_io_fprintf(smioerr, SM_TIME_DEFAULT,
++ "%s: %s not available for sendmail programs (not a file)\n",
++ prg, cmd);
++ if (p != NULL)
++ *p = ' ';
++#ifndef DEBUG
++ syslog(LOG_CRIT, "uid %d: attempt to use %s (not a file)",
++ (int) getuid(), cmd);
++#endif /* ! DEBUG */
++ exit(EX_UNAVAILABLE);
++ }
+ if (access(cmdbuf, X_OK) < 0)
+ {
+ /* oops.... crack attack possiblity */
diff --git a/debian/patches/8.12/8.12.3/socks.patch b/debian/patches/8.12/8.12.3/socks.patch
new file mode 100644
index 0000000..61b3046
--- /dev/null
+++ b/debian/patches/8.12/8.12.3/socks.patch
@@ -0,0 +1,50 @@
+# This is a patch for conf.c to update it to conf.c.new
+#
+# To apply this patch:
+# STEP 1: Chdir to the source directory.
+# STEP 2: Run the 'applypatch' program with this patch file as input.
+#
+# If you do not have 'applypatch', it is part of the 'makepatch' package
+# that you can fetch from the Comprehensive Perl Archive Network:
+# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
+# In the above URL, 'x' should be 2 or higher.
+#
+# To apply this patch without the use of 'applypatch':
+# STEP 1: Chdir to the source directory.
+# STEP 2: Run the 'patch' program with this file as input.
+#
+#### End of Preamble ####
+
+#### Patch data follows ####
+diff -c 'conf.c' 'conf.c.new'
+Index: ./conf.c
+Prereq: 8.961
+*** ./sendmail-8.12.3/sendmail/conf.c Thu May 17 14:19:41 2001
+--- ./sendmail/conf.c.new Wed May 23 13:01:15 2001
+***************
+*** 3760,3765 ****
+--- 3760,3770 ----
+ vendor_post_defaults(e)
+ ENVELOPE *e;
+ {
++ char *p;
++ if ((p = getenv("LD_PRELOAD")))
++ setuserenv("LD_PRELOAD", p);
++ if ((p = getenv("LD_LIBRARY_PATH")))
++ setuserenv("LD_LIBRARY_PATH", p);
+ #ifdef __QNX__
+ char *p;
+
+#### End of Patch data ####
+
+#### ApplyPatch data follows ####
+# Data version : 1.0
+# Date generated : Wed May 23 13:02:56 2001
+# Generated by : makepatch 2.00_03
+# Recurse directories : Yes
+# p 'conf.c' 130464
+#### End of ApplyPatch data ####
+
+#### End of Patch kit [created: Wed May 23 13:02:56 2001] ####
+#### Patch checksum: 30 772 52154 ####
+#### Checksum: 48 1448 42818 ####
diff --git a/debian/patches/Makefile b/debian/patches/Makefile
deleted file mode 100644
index 847f7a9..0000000
--- a/debian/patches/Makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
-#
-# This file is also based upon prior sendmail makefiles
-#
-# Richard Nelson <cowboy@debian.org>
-
-
-#-------------
-create:
- diff -cr ../../cf/m4/proto.m4 proto.m4 > patch.ldap.m4 || /bin/true
- #diff -cr ../../cf/mailer/local.m4 local.m4 > patch.dont_masquerade_local || /bin/true
- #diff -cr ../../cf/feature/local_procmail.m4 local_procmail.m4 > patch.local_procmail || /bin/true
- #diff -cr ../../src/conf.h conf.h > patch.IP_SRCROUTE || /bin/true
- #diff -cr ../../src/daemon.c daemon.c >> patch.IP_SRCROUTE || /bin/true
-
-patch:
- patch -p1 --version-control=never -l < debian/patches/mime-patch
- patch -p5 --version-control=never < debian/patches/mrbl.p3
- patch -p3 --version-control=never < debian/patches/patch.local_procmail
- patch -p2 --version-control=never < debian/patches/patch.IP_SRCROUTE
- patch -p2 --version-control=never < debian/patches/patch.dont_masquerade_local
- patch -p2 --version-control=never < debian/patches/patch.ldap.m4
- cd src && patch -p0 --version-control=never < ../debian/patches/patch.ldap.src
- cd rmail && patch -p0 --version-control=never < ../debian/patches/patch.rmail
- cd src && patch -p0 --version-control=never < ../debian/patches/patch.DOS
- patch -p0 --version-control=never -l < debian/patches/cf.mailer.cyrus.m4
- patch -p0 --version-control=never -l < debian/patches/patch.mail.local
- patch -p0 --version-control=never -l < debian/patches/sendmail.8.9.3.security.cr.patch
- patch -p1 --version-control=never -l < debian/patches/prescan.8.9.3.patch
-
-
-unpatch:
- patch -R -p1 --version-control=never -l < debian/patches/mime-patch
- patch -R -p5 --version-control=never < debian/patches/mrbl.p3
- patch -R -p3 --version-control=never < debian/patches/patch.local_procmail
- patch -R -p2 --version-control=never < debian/patches/patch.IP_SRCROUTE
- patch -R -p2 --version-control=never < debian/patches/patch.dont_masquerade_local
- patch -R -p2 --version-control=never < debian/patches/patch.ldap.m4
- cd src && patch -R -p0 --version-control=never < ../debian/patches/patch.ldap.src
- cd rmail && patch -R -p0 --version-control=never < ../debian/patches/patch.rmail
- cd src && patch -R -p0 --version-control=never < ../debian/patches/patch.DOS
- patch -R -p0 --version-control=never -l < debian/patches/cf.mailer.cyrus.m4
- patch -R -p0 --version-control=never -l < debian/patches/patch.mail.local
- patch -R -p0 --version-control=never -l < debian/patches/sendmail.8.9.3.security.cr.patch
- patch -R -p1 --version-control=never -l < debian/patches/prescan.8.9.3.patch
-
-#-------------
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
diff --git a/debian/patches/align.893.p1 b/debian/patches/align.893.p1
deleted file mode 100644
index ff6add3..0000000
--- a/debian/patches/align.893.p1
+++ /dev/null
@@ -1,17 +0,0 @@
---- ./src/main.c.ORIG Sun Jan 10 00:31:13 1999
-+++ sendmail-8.9.3/src/main.c Sat Oct 30 04:29:25 1999
-@@ -528,10 +528,12 @@
- {
- for (i = 0; hp->h_addr_list[i] != NULL; i++)
- {
-+ struct in_addr ia;
- char ipbuf[103];
-
-+ bcopy(hp->h_addr_list[i], &ia, INADDRSZ);
- snprintf(ipbuf, sizeof ipbuf, "[%.100s]",
-- inet_ntoa(*((struct in_addr *) hp->h_addr_list[i])));
-+ inet_ntoa(ia));
- if (tTd(0, 4))
- printf("\ta.k.a.: %s\n", ipbuf);
- setclass('w', ipbuf);
-
diff --git a/debian/patches/contrib/etrn.patch01 b/debian/patches/contrib/etrn.patch01
new file mode 100644
index 0000000..616c748
--- /dev/null
+++ b/debian/patches/contrib/etrn.patch01
@@ -0,0 +1,42 @@
+--- sendmail-8.12.5/contrib/etrn.pl.mwe Tue Jul 9 11:17:50 2002
++++ sendmail-8.12.5/contrib/etrn.pl Tue Jul 9 11:33:13 2002
+@@ -81,12 +81,13 @@
+ while (<CF>){
+ if (/^Fw.*$/){ # look for a line starting with "Fw"
+ $cwfile = $_;
+- chop($cwfile);
+- $optional = /^Fw-o/;
+- $cwfile =~ s,^Fw[^/]*,,; # extract the file name
+-
++ chomp($cwfile);
++ ($optional,$cwfile,$comment_delim) = /^Fw(-o)?\s*(\S*)\s*(?:\s%(.*))?$/;
++ if (!$comment_delim) $comment_delim = '[^#]';
++ $comment_delim =~ s/[\\](.)/$1/g; # unescape
+ if (-r $cwfile) {
+- push (@cwfiles, $cwfile);
++ push (@cwfiles, {'file' => $cwfile, 'nocomment' => $comment_delim});
++
+ } else {
+ die "$cwfile is not readable" unless $optional;
+ }
+@@ -103,16 +104,16 @@
+
+ for $cwfile (@cwfiles) {
+ $0 = "$av0 - reading $cwfile";
+- if (open(CW, "<$cwfile")){
++ if (open(CW, "<$cwfile->{'file'}")){
+ while (<CW>){
+- next if /^\#/;
++ next unless /^$cwfile->{'nocomment'}/;
+ $thishost = $_;
+- chop($thishost);
++ chomp($thishost);
+ push(@hosts, $thishost) unless $thishost =~ $hostname;
+ }
+ close(CW);
+ } else {
+- die "open $cwfile: $!";
++ die "open $cwfile->{'file'}: $!";
+ }
+ }
+ }
diff --git a/debian/patches/mime-patch b/debian/patches/mime-patch
deleted file mode 100644
index cf939b2..0000000
--- a/debian/patches/mime-patch
+++ /dev/null
@@ -1,62 +0,0 @@
-*** sendmail-8.9.3/src/mime.c.ORIG Tue Jan 19 01:35:11 1999
---- sendmail-8.9.3/src/mime.c Sat Mar 13 01:39:15 1999
-***************
-*** 443,449 ****
- {
- /* no encoding necessary */
- if (cte != NULL &&
-! bitset(MCIF_INMIME, mci->mci_flags) &&
- !bitset(M87F_NO8TO7, flags))
- {
- /*
---- 443,450 ----
- {
- /* no encoding necessary */
- if (cte != NULL &&
-! bitset(MCIF_CVT8TO7|MCIF_CVT7TO8|MCIF_INMIME,
-! mci->mci_flags) &&
- !bitset(M87F_NO8TO7, flags))
- {
- /*
-*** sendmail-8.9.3/src/headers.c.ORIG Tue Jan 26 15:54:50 1999
---- sendmail-8.9.3/src/headers.c Tue Mar 16 20:43:31 1999
-***************
-*** 1369,1375 ****
-
- /*
- ** If we are converting this to a MIME message, add the
-! ** MIME headers.
- */
-
- #if MIME8TO7
---- 1369,1375 ----
-
- /*
- ** If we are converting this to a MIME message, add the
-! ** MIME headers (but not in MIME mode!).
- */
-
- #if MIME8TO7
-***************
-*** 1377,1386 ****
- bitset(EF_HAS8BIT, e->e_flags) &&
- !bitset(EF_DONT_MIME, e->e_flags) &&
- !bitnset(M_8BITS, mci->mci_mailer->m_flags) &&
-! !bitset(MCIF_CVT8TO7|MCIF_CVT7TO8, mci->mci_flags))
- {
-! if (hvalue("MIME-Version", e->e_header) == NULL)
-! putline("MIME-Version: 1.0", mci);
- if (hvalue("Content-Type", e->e_header) == NULL)
- {
- snprintf(obuf, sizeof obuf,
---- 1377,1386 ----
- bitset(EF_HAS8BIT, e->e_flags) &&
- !bitset(EF_DONT_MIME, e->e_flags) &&
- !bitnset(M_8BITS, mci->mci_mailer->m_flags) &&
-! !bitset(MCIF_CVT8TO7|MCIF_CVT7TO8|MCIF_INMIME, mci->mci_flags) &&
-! hvalue("MIME-Version", e->e_header) == NULL)
- {
-! putline("MIME-Version: 1.0", mci);
- if (hvalue("Content-Type", e->e_header) == NULL)
- {
- snprintf(obuf, sizeof obuf,
diff --git a/debian/patches/mime-patch.README b/debian/patches/mime-patch.README
deleted file mode 100644
index e73635b..0000000
--- a/debian/patches/mime-patch.README
+++ /dev/null
@@ -1,31 +0,0 @@
-From: per@erix.ericsson.se (Per Hedeland)
-Newsgroups: news.software.nntp,comp.mail.sendmail
-Subject: Re: Duplicate "Content-Transfer-Encoding" header
-Date: 13 Apr 1999 01:21:51 GMT
-Organization: Ericsson Utvecklings AB, Stockholm, Sweden
-Lines: 61
-Message-ID: <7eu67f$p6b$1@news.du.etx.ericsson.se>
-References: <7et2k9$rk8$1@niobium.hgmp.mrc.ac.uk>
-NNTP-Posting-Host: super.du.etx.ericsson.se
-NNTP-Posting-User: per
-X-Newsreader: trn 4.0-test69 (20 September 1998)
-Xref: news.cistron.nl news.software.nntp:47781 comp.mail.sendmail:68808
-
-In article <7et2k9$rk8$1@niobium.hgmp.mrc.ac.uk> ggibbs@hgmp.mrc.ac.uk
-(Geoff Gibbs) writes:
->I have a mail/news gateway running, using the mailpost/news2mail
->software which comes with INN 2.2.
->It is being fed from sendmail 8.9.1a
->
->I am seeing the error message :-
->
->post failed Duplicate "Content-Transfer-Encoding" header
-
-Upgrade to sendmail 8.9.3 + the patch below. Of course the duplicate
-header may have been introduced *before* the message arrived at *your*
-sendmail, in which case this won't help - but at least your sendmail
-won't be the cause.
-
---Per Hedeland
-per@erix.ericsson.se
-
diff --git a/debian/patches/mrbl.p3 b/debian/patches/mrbl.p3
deleted file mode 100644
index f73d239..0000000
--- a/debian/patches/mrbl.p3
+++ /dev/null
@@ -1,168 +0,0 @@
-diff -cr ./feature/rbl.m4 /home/ca/smi/sendmail/cf/feature/rbl.m4
-*** ./feature/rbl.m4 Tue Dec 29 09:42:13 1998
---- /home/ca/smi/sendmail/cf/feature/rbl.m4 Sat Feb 20 13:58:31 1999
-***************
-*** 1,6 ****
- 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
---- 1,7 ----
- divert(-1)
- #
-! # Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
-! # 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
-***************
-*** 9,15 ****
- #
-
- divert(0)
-! VERSIONID(`@(#)rbl.m4 8.8 (Berkeley) 5/19/1998')
- divert(-1)
-!
-! define(`_RBL_', ifelse(_ARG_, `', `rbl.maps.vix.com', `_ARG_'))dnl
---- 10,24 ----
- #
-
- divert(0)
-! ifdef(`_RBL_R_',`dnl',`dnl
-! VERSIONID(`$Id: rbl.m4,v 8.12 1999/02/20 21:58:31 ca Exp $')')
- divert(-1)
-! define(`_RBL_SRV_',ifelse(_ARG_,`',`rbl.maps.vix.com',_ARG_))dnl
-! define(`_RBL_MSG_',ifelse(_ARG2_,`',`"Mail from " $`'&{client_addr} " refused by blackhole site '_RBL_SRV_`"',_ARG2_))dnl
-! define(`_RBL_R_',defn(`_RBL_R_')
-! `
-! # DNS based IP address spam list '_RBL_SRV_`
-! R$`'* $`': $`'&{client_addr}
-! R$`'-.$`'-.$`'-.$`'- $`': <?> $`'(host $`'4.$`'3.$`'2.$`'1.'_RBL_SRV_`. $`': OK $`')
-! R<?>OK $`': OKSOFAR
-! R<?>$`'+ $`'#error $`'@ 5.7.1 $`': '_RBL_MSG_)
-diff -cr ./m4/cfhead.m4 /home/ca/smi/sendmail/cf/m4/cfhead.m4
-*** ./m4/cfhead.m4 Tue Dec 29 09:42:08 1998
---- /home/ca/smi/sendmail/cf/m4/cfhead.m4 Sat Feb 20 13:58:32 1999
-***************
-*** 1,5 ****
- #
-! # 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.
---- 1,6 ----
- #
-! # Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
-! # 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.
-***************
-*** 40,51 ****
- define(`__OSTYPE__', $1)
- define(`_ARG_', $2)
- include(_CF_DIR_`'ostype/$1.m4)POPDIVERT`'')
- define(`MAILER',
- `ifdef(`_MAILER_$1_', `dnl`'',
- `define(`_MAILER_$1_', `')PUSHDIVERT(7)include(_CF_DIR_`'mailer/$1.m4)POPDIVERT`'')')
-! define(`DOMAIN', `PUSHDIVERT(-1)define(`_ARG_', $2)include(_CF_DIR_`'domain/$1.m4)POPDIVERT`'')
-! define(`FEATURE', `PUSHDIVERT(-1)define(`_ARG_', $2)include(_CF_DIR_`'feature/$1.m4)POPDIVERT`'')
-! define(`HACK', `PUSHDIVERT(-1)define(`_ARG_', $2)include(_CF_DIR_`'hack/$1.m4)POPDIVERT`'')
- define(`VERSIONID', ``##### $1 #####'')
- define(`LOCAL_RULE_0', `divert(3)')
- define(`LOCAL_RULE_1',
---- 41,73 ----
- define(`__OSTYPE__', $1)
- define(`_ARG_', $2)
- include(_CF_DIR_`'ostype/$1.m4)POPDIVERT`'')
-+ ## new FEATUREs
-+ define(`_RBL_R_',`')
-+ ## access to further arguments in FEATURE/HACK
-+ define(`_ACC_ARG_1_',`$1')
-+ define(`_ACC_ARG_2_',`$2')
-+ define(`_ACC_ARG_3_',`$3')
-+ define(`_ACC_ARG_4_',`$4')
-+ define(`_ACC_ARG_5_',`$5')
-+ define(`_ACC_ARG_6_',`$6')
-+ define(`_ACC_ARG_7_',`$7')
-+ define(`_ACC_ARG_8_',`$8')
-+ define(`_ACC_ARG_9_',`$9')
-+ define(`_ARG1_',`_ACC_ARG_1_(_ARGS_)')
-+ define(`_ARG2_',`_ACC_ARG_2_(_ARGS_)')
-+ define(`_ARG3_',`_ACC_ARG_3_(_ARGS_)')
-+ define(`_ARG4_',`_ACC_ARG_4_(_ARGS_)')
-+ define(`_ARG5_',`_ACC_ARG_5_(_ARGS_)')
-+ define(`_ARG6_',`_ACC_ARG_6_(_ARGS_)')
-+ define(`_ARG7_',`_ACC_ARG_7_(_ARGS_)')
-+ define(`_ARG8_',`_ACC_ARG_8_(_ARGS_)')
-+ define(`_ARG9_',`_ACC_ARG_9_(_ARGS_)')
- define(`MAILER',
- `ifdef(`_MAILER_$1_', `dnl`'',
- `define(`_MAILER_$1_', `')PUSHDIVERT(7)include(_CF_DIR_`'mailer/$1.m4)POPDIVERT`'')')
-! define(`DOMAIN', `PUSHDIVERT(-1)define(`_ARG_', `$2')include(_CF_DIR_`'domain/$1.m4)POPDIVERT`'')
-! define(`FEATURE', `PUSHDIVERT(-1)define(`_ARG_', `$2')define(`_ARGS_', `shift($@)')include(_CF_DIR_`'feature/$1.m4)POPDIVERT`'')
-! define(`HACK', `PUSHDIVERT(-1)define(`_ARG_', `$2')define(`_ARGS_', `shift($@)')include(_CF_DIR_`'hack/$1.m4)POPDIVERT`'')
- define(`VERSIONID', ``##### $1 #####'')
- define(`LOCAL_RULE_0', `divert(3)')
- define(`LOCAL_RULE_1',
-diff -cr ./m4/proto.m4 /home/ca/smi/sendmail/cf/m4/proto.m4
-*** ./m4/proto.m4 Tue Feb 2 15:21:30 1999
---- /home/ca/smi/sendmail/cf/m4/proto.m4 Sat Feb 20 13:58:33 1999
-***************
-*** 1,6 ****
- divert(-1)
- #
-! # 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.
---- 1,7 ----
- divert(-1)
- #
-! # Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
-! # 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.
-***************
-*** 12,18 ****
- #
- divert(0)
-
-! VERSIONID(`@(#)proto.m4 8.243 (Berkeley) 2/2/1999')
-
- MAILER(local)dnl
-
---- 13,19 ----
- #
- divert(0)
-
-! VERSIONID(`$Id: proto.m4,v 8.247 1999/02/20 21:58:33 ca Exp $')
-
- MAILER(local)dnl
-
-***************
-*** 1108,1120 ****
- R<DISCARD> $* $#discard $: discard
- R<$+> $* $#error $@ 5.7.1 $: $1', `dnl')
-
-! ifdef(`_RBL_', `dnl
-! # 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 by blackhole site _RBL_"',
-! `dnl')
-
- ######################################################################
- ### check_mail -- check SMTP ``MAIL FROM:'' command argument
---- 1109,1115 ----
- R<DISCARD> $* $#discard $: discard
- R<$+> $* $#error $@ 5.7.1 $: $1', `dnl')
-
-! _RBL_R_
-
- ######################################################################
- ### check_mail -- check SMTP ``MAIL FROM:'' command argument
diff --git a/debian/patches/mrbl.p3.README b/debian/patches/mrbl.p3.README
deleted file mode 100644
index 313795c..0000000
--- a/debian/patches/mrbl.p3.README
+++ /dev/null
@@ -1,12 +0,0 @@
-
-Upgrade to 8.9.3, and install the multiple rbl patch from:
- http://www.Sendmail.ORG/~ca/email/patches/mrbl.p3
- http://www.sendmail.org
-Then use
- FEATURE(rbl,`rbl.maps.vix.com',` Mail from $&{client_addr}
- rejected - rbl; see http://maps.vix.com')
- FEATURE(rbl,`dul.maps.vix.com',` Mail from $&{client_addr}
- rejected - dul; see http://maps.vix.com')
- FEATURE(rbl,`relays.orbs.org',` Mail from $&{client_addr}
- rejected - open relay; see http://www.orbs.org')
-
diff --git a/debian/patches/patch.DOS b/debian/patches/patch.DOS
deleted file mode 100644
index 7b595b9..0000000
--- a/debian/patches/patch.DOS
+++ /dev/null
@@ -1,21 +0,0 @@
---- main.c~orig Sat Jan 9 15:31:13 1999
-+++ main.c Wed Nov 17 19:04:44 1999
-@@ -984,6 +984,18 @@
- usrerr("Permission denied");
- finis(FALSE, EX_USAGE);
- }
-+ if (OpMode == MD_INITALIAS &&
-+ RealUid != 0 &&
-+ RealUid != TrustedUid &&
-+ !wordinclass(RealUserName, 't'))
-+ {
-+ if (LogLevel > 1)
-+ sm_syslog(LOG_ALERT, NOQID,
-+ "user %d attempted to rebuild the alias map",
-+ RealUid);
-+ usrerr("Permission denied");
-+ finis(FALSE, EX_USAGE);
-+ }
-
- if (MeToo)
- BlankEnvelope.e_flags |= EF_METOO;
diff --git a/debian/patches/patch.IP_SRCROUTE b/debian/patches/patch.IP_SRCROUTE
deleted file mode 100644
index 84b7ee8..0000000
--- a/debian/patches/patch.IP_SRCROUTE
+++ /dev/null
@@ -1,94 +0,0 @@
-*** ../../src/conf.h Mon Apr 12 15:12:30 1999
---- conf.h Thu Apr 8 15:35:20 1999
-***************
-*** 1284,1290 ****
- # define ERRLIST_PREDEFINED /* don't declare sys_errlist */
- # define GIDSET_T gid_t /* from <linux/types.h> */
- # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */
-! # define IP_SRCROUTE 0 /* linux <= 1.2.8 doesn't support IP_OPTIONS */
- # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */
- # ifndef HASFLOCK
- # include <linux/version.h>
---- 1284,1290 ----
- # define ERRLIST_PREDEFINED /* don't declare sys_errlist */
- # define GIDSET_T gid_t /* from <linux/types.h> */
- # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */
-! # define IP_SRCROUTE 1 /* linux <= 1.2.8 doesn't support IP_OPTIONS */
- # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */
- # ifndef HASFLOCK
- # include <linux/version.h>
-*** ../../src/daemon.c Mon Apr 12 15:12:30 1999
---- daemon.c Mon Apr 12 15:37:50 1999
-***************
-*** 42,48 ****
- # if IP_SRCROUTE
- # include <netinet/in_systm.h>
- # include <netinet/ip.h>
-! # include <netinet/ip_var.h>
- # endif
-
- /*
---- 42,50 ----
- # if IP_SRCROUTE
- # include <netinet/in_systm.h>
- # include <netinet/ip.h>
-! # ifndef __linux__
-! # include <netinet/ip_var.h>
-! # endif
- # endif
-
- /*
-***************
-*** 1570,1584 ****
- u_char *o;
- int l;
- struct in_addr addr;
- struct ipoption ipopt;
-!
- ipoptlen = sizeof ipopt;
- if (getsockopt(fd, IPPROTO_IP, IP_OPTIONS,
- (char *) &ipopt, &ipoptlen) < 0)
- goto noipsr;
- if (ipoptlen == 0)
- goto noipsr;
- o = (u_char *) ipopt.ipopt_list;
- while (o != NULL && o < (u_char *) &ipopt + ipoptlen)
- {
- switch (*o)
---- 1572,1593 ----
- u_char *o;
- int l;
- struct in_addr addr;
-+ # ifndef __linux__
- struct ipoption ipopt;
-! # else
-! struct ip_options ipopt;
-! # endif
- ipoptlen = sizeof ipopt;
- if (getsockopt(fd, IPPROTO_IP, IP_OPTIONS,
- (char *) &ipopt, &ipoptlen) < 0)
- goto noipsr;
- if (ipoptlen == 0)
- goto noipsr;
-+ # ifndef __linux__
- o = (u_char *) ipopt.ipopt_list;
-+ # else
-+ o = (u_char *) ipopt.__data;
-+ # endif
- while (o != NULL && o < (u_char *) &ipopt + ipoptlen)
- {
- switch (*o)
-***************
-*** 1609,1615 ****
---- 1618,1628 ----
- snprintf(p, SPACELEFT(hbuf, p), " [%s@%.*s",
- *o == IPOPT_SSRR ? "!" : "",
- l > 240 ? 120 : l / 2,
-+ # ifndef __linux__
- inet_ntoa(GET_IPOPT_DST(ipopt.ipopt_dst)));
-+ # else
-+ ipopt.faddr);
-+ # endif
- i = strlen(p);
- p += i;
- l -= strlen(p);
diff --git a/debian/patches/patch.dont_masquerade_local b/debian/patches/patch.dont_masquerade_local
deleted file mode 100644
index f4484b9..0000000
--- a/debian/patches/patch.dont_masquerade_local
+++ /dev/null
@@ -1,39 +0,0 @@
-diff -cr ../../cf/mailer/local.m4 local.m4
-*** ../../cf/mailer/local.m4 Thu Apr 22 18:23:05 1999
---- local.m4 Thu Apr 22 18:40:37 1999
-***************
-*** 39,45 ****
- 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
---- 39,46 ----
- R<@> $n errors to mailer-daemon
- R@ <@ $*> $n temporarily bypass Sun bogosity
- R$+ $: $>50 $1 add local domain if needed
-! ifdef(`_DONT_MASQUERADE_LOCAL_', `dnl', `dnl
-! R$* $: $>94 $1 do masquerading')
-
- #
- # Envelope recipient rewriting
-***************
-*** 54,60 ****
- 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
---- 55,62 ----
- R<@> $n errors to mailer-daemon
- R@ <@ $*> $n temporarily bypass Sun bogosity
- R$+ $: $>50 $1 add local domain if needed
-! ifdef(`_DONT_MASQUERADE_LOCAL_', `dnl', `dnl
-! R$* $: $>93 $1 do masquerading')
-
- #
- # Header recipient rewriting
diff --git a/debian/patches/patch.ldap.m4 b/debian/patches/patch.ldap.m4
deleted file mode 100644
index 823bc13..0000000
--- a/debian/patches/patch.ldap.m4
+++ /dev/null
@@ -1,17 +0,0 @@
-*** ../../cf/m4/proto.m4 Thu Apr 22 18:23:04 1999
---- proto.m4 Fri Apr 23 11:41:47 1999
-***************
-*** 870,875 ****
---- 870,881 ----
- R< $* . > $+ $: < $1 > $2 strip extra dot',
- `dnl')
-
-+ ifdef(`_LDAP_MAP_', `dnl
-+ # Now attempt to lookup in ldap (ldap map)
-+ R< $L > $+ $: < $L > $( ldap $1 $) look up user
-+ R< $* > $+ @ $+ $: < $3 > $2 Rewrite if forward',
-+ `dnl')
-+
- # see if we have a relay or a hub
- R< > $+ $: < $H > $1 try hub
- R< > $+ $: < $R > $1 try relay
diff --git a/debian/patches/patch.ldap.src b/debian/patches/patch.ldap.src
deleted file mode 100644
index 4b4a4df..0000000
--- a/debian/patches/patch.ldap.src
+++ /dev/null
@@ -1,377 +0,0 @@
-Index: ldap_map.h
-===================================================================
-RCS file: /usr/local/src/cvsroot/sendmail.8.9/src/ldap_map.h,v
-retrieving revision 1.1.1.8
-retrieving revision 1.9
-diff -u -r1.1.1.8 -r1.9
---- ldap_map.h 1999/02/15 19:35:30 1.1.1.8
-+++ ldap_map.h 1999/02/15 20:04:06 1.9
-@@ -37,8 +37,8 @@
- /* args for ldap_bind_s */
- LDAP *ld;
- char *binddn;
-- char *passwd;
-- int method;
-+ char *secret;
-+ int method;
-
- /* args for ldap_search_st */
- char *base;
-@@ -55,13 +55,32 @@
- #define DEFAULT_LDAP_MAP_PORT LDAP_PORT
- #define DEFAULT_LDAP_MAP_SCOPE LDAP_SCOPE_SUBTREE
- #define DEFAULT_LDAP_MAP_BINDDN NULL
--#define DEFAULT_LDAP_MAP_PASSWD NULL
-+#define DEFAULT_LDAP_MAP_SECRET NULL
- #define DEFAULT_LDAP_MAP_METHOD LDAP_AUTH_SIMPLE
- #define DEFAULT_LDAP_MAP_TIMELIMIT 5
- #define DEFAULT_LDAP_MAP_DEREF LDAP_DEREF_NEVER
- #define DEFAULT_LDAP_MAP_SIZELIMIT 0
- #define DEFAULT_LDAP_MAP_ATTRSONLY 0
- #define LDAP_MAP_MAX_FILTER 1024
-+
-+/* authentication methods available */
-+
-+#define LDAP_MAP_AUTH_METHOD_MAX 3
-+#define LDAP_MAP_MAX_PASSWD 256
-+
-+char *ldap_map_auth_methods[] = {
-+ "LDAP_AUTH_NONE",
-+ "LDAP_AUTH_SIMPLE",
-+ "LDAP_AUTH_KRBV4"
-+} ;
-+
-+int ldap_map_auth_methods_code[LDAP_MAP_AUTH_METHOD_MAX] = {
-+ LDAP_AUTH_NONE,
-+ LDAP_AUTH_SIMPLE,
-+ LDAP_AUTH_KRBV4
-+} ;
-+
-+
- #ifdef LDAP_REFERRALS
- # define DEFAULT_LDAP_MAP_LDAP_OPTIONS LDAP_OPT_REFERRALS
- #else /* LDAP_REFERRALS */
-Index: map.c
-===================================================================
-RCS file: /usr/local/src/cvsroot/sendmail.8.9/src/map.c,v
-retrieving revision 1.1.1.11
-retrieving revision 1.20
-diff -u -r1.1.1.11 -r1.20
---- map.c 1999/02/15 19:35:31 1.1.1.11
-+++ map.c 1999/03/30 21:22:41 1.20
-@@ -2621,6 +2621,10 @@
- #endif
- return FALSE;
- }
-+ /* We could call aliaswait here, but it only adds extra
-+ code to the ldap map lookup. The aliaswait "@:@" convention
-+ does not make much sense in the ldap tcp-based model.
-+ */
- return TRUE;
- }
-
-@@ -2647,7 +2651,7 @@
- LDAP_MAP_STRUCT *lmap;
- LDAP *ld;
- register EVENT *ev = NULL;
--
-+ register int bind_result;
- if (tTd(38, 2))
- printf("ldap_map_start(%s)\n", map->map_mname);
-
-@@ -2713,12 +2717,12 @@
- lmap->ld = ld;
- return TRUE;
- #else
-- if (ldap_bind_s(ld, lmap->binddn,lmap->passwd,lmap->method) != LDAP_SUCCESS)
-+ if (ldap_bind_s(ld, lmap->binddn,lmap->secret,lmap->method) != LDAP_SUCCESS)
- {
- if (!bitset(MF_OPTIONAL, map->map_mflags))
- {
-- syserr("421 Cannot bind to map %s in ldap server %s",
-- map->map_mname, lmap->ldaphost);
-+ syserr("421 Cannot bind to map %s in ldap server %s, %s",
-+ map->map_mname, lmap->ldaphost,ldap_err2string(bind_result));
- }
- }
- else
-@@ -2727,7 +2731,6 @@
- lmap->ld = ld;
- return TRUE;
- }
--
- return FALSE;
- #endif
- }
-@@ -2811,13 +2814,13 @@
- {
- LDAP_MAP_STRUCT *lmap = NULL;
- LDAPMessage *entry;
-- char *vp;
-+ char *vp,*vp_tmp;
- auto int vsize;
- char keybuf[MAXNAME + 1];
- char filter[LDAP_MAP_MAX_FILTER + 1];
- char **attr_values = NULL;
-- char *result;
-- int name_len;
-+ char *result,*tmp;
-+ int name_len,val_count,i;
- char *fp, *p, *q;
-
- if (tTd(38, 20))
-@@ -2899,39 +2902,88 @@
- }
- }
-
-+ result = NULL;
-+ *statp = EX_NOTFOUND;
-+
- entry = ldap_first_entry(lmap->ld,lmap->res);
- if (entry == NULL)
- {
-- result = NULL;
-- *statp = EX_NOTFOUND;
- goto quick_exit;
- }
-
-- /* Need to build the args for map_rewrite here */
-- attr_values = ldap_get_values(lmap->ld,entry,lmap->attr[0]);
-- if (attr_values == NULL)
-- {
-- /* bad things happened */
-- result = NULL;
-- *statp = EX_NOTFOUND;
-- goto quick_exit;
-+ vp = NULL ;
-+
-+ /* Cycle through all entries. */
-+ do {
-+ /* Need to build the args for map_rewrite here */
-+ attr_values = ldap_get_values(lmap->ld,entry,lmap->attr[0]);
-+ if (attr_values != NULL )
-+ {
-+ *statp = EX_OK;
-+
-+ /*
-+ * If there is more that one munge then into
-+ * a comma sep string
-+ */
-+ val_count = ldap_count_values(attr_values) ;
-+ /* count size */
-+ vsize = 0 ;
-+ for( i = 0 ; i < val_count && attr_values[i] != NULL ; i++ ) {
-+ vsize += strlen(attr_values[i]) + strlen(", ") ;
-+ }
-+ vp_tmp = (char * ) malloc(vsize) ;
-+ if ( vp_tmp != NULL )
-+ {
-+ /* first */
-+ snprintf(vp_tmp,vsize,"%s",attr_values[0]) ;
-+ tmp = vp_tmp + strlen(vp_tmp);
-+ /*rest */
-+ for( i = 1 ; i < (val_count ) && attr_values[i] != NULL ; i++ ) {
-+ snprintf(tmp,(vsize - strlen(vp_tmp)),", %s",attr_values[i]) ;
-+ tmp = vp_tmp + strlen(vp_tmp) ;
-+ }
-+
-+ } else {
-+ /* Report memory error */
-+ if (!bitset(MF_OPTIONAL, map->map_mflags))
-+ {
-+ syserr("Out of memory in ldap_map_lookup");
-+ }
-+ }
-+ }
-+ if ( vp == NULL )
-+ {
-+ vp = vp_tmp ;
-+ } else {
-+ vsize = strlen(vp) + strlen(vp_tmp) + strlen(", ") + 1 ;
-+ tmp = ( char *) malloc( vsize ) ;
-+ snprintf(tmp,vsize,"%s, %s",vp,vp_tmp) ;
-+ /* Free things in correct order. */
-+ free ( vp_tmp) ; /* vsize malloc above */
-+ vp_tmp = vp ; /* tmp malloc from previous loop */
-+ vp = tmp ;
-+ free ( vp_tmp ) ;
-+ }
-+ ldap_value_free(attr_values);
-+ attr_values = NULL ;
-+
-+ } while ( (entry = ldap_next_entry( lmap->ld, entry ) ) != NULL ) ;
-+
-+ if ( *statp == EX_OK ) {
-+
-+ vsize = strlen(vp);
-+
-+ if (LogLevel > 9)
-+ sm_syslog(LOG_INFO, CurEnv->e_id,
-+ "ldap %.100s => %s",
-+ name, vp);
-+ if (bitset(MF_MATCHONLY, map->map_mflags))
-+ result = map_rewrite(map, name, strlen(name), NULL);
-+ else
-+ result = map_rewrite(map, vp, vsize, av);
-+ free(vp) ;
-+
- }
--
-- *statp = EX_OK;
--
-- /* If there is more that one use the first */
-- vp = attr_values[0];
-- vsize = strlen(vp);
--
-- if (LogLevel > 9)
-- sm_syslog(LOG_INFO, CurEnv->e_id,
-- "ldap %.100s => %s",
-- name, vp);
-- if (bitset(MF_MATCHONLY, map->map_mflags))
-- result = map_rewrite(map, name, strlen(name), NULL);
-- else
-- result = map_rewrite(map, vp, vsize, av);
--
- quick_exit:
- if (attr_values != NULL)
- ldap_value_free(attr_values);
-@@ -2982,8 +3034,12 @@
- char *args;
- {
- register char *p = args;
-- register int done;
-+ register int done,i;
- LDAP_MAP_STRUCT *lmap;
-+ static char m_tmp[MAXPATHLEN+LDAP_MAP_MAX_PASSWD];
-+ FILE * sfd ;
-+ int sff = SFF_OPENASROOT|SFF_ROOTOK|SFF_NOWLINK|SFF_NOWWFILES|SFF_NOGWFILES;
-+ char *tmp ;
-
- /* We need to alloc an LDAP_MAP_STRUCT struct */
- lmap = (LDAP_MAP_STRUCT *) xalloc(sizeof(LDAP_MAP_STRUCT));
-@@ -3002,7 +3058,8 @@
-
- /* Default char ptrs to NULL */
- lmap->binddn = NULL;
-- lmap->passwd = NULL;
-+
-+ lmap->secret = NULL;
- lmap->base = NULL;
- lmap->ldaphost = NULL;
-
-@@ -3088,7 +3145,9 @@
- break;
-
- case 's': /* search scope */
-- if (strncasecmp(++p, "base", 4) == 0)
-+ while (isascii(*++p) && isspace(*p))
-+ continue;
-+ if (strncasecmp(p, "base", 4) == 0)
- {
- lmap->scope = LDAP_SCOPE_BASE;
- }
-@@ -3142,7 +3201,36 @@
- lmap->timelimit = atoi(p);
- lmap->timeout.tv_sec = lmap->timelimit;
- break;
--
-+ case 'D': /* Dn to bind to server as */
-+ while (isascii(*++p) && isspace(*p))
-+ continue;
-+ lmap->binddn = p;
-+ break;
-+ case 'M': /* Method for binding */
-+ while (isascii(*++p) && isspace(*p))
-+ continue;
-+ /* Need to map ascii method to int here */
-+ tmp = p ;
-+ /* Argh, can't use ldap_map_dequote here */
-+ if ( *tmp == '"' ) {
-+ while ( isascii(*++tmp) && isspace(*tmp))
-+ continue;
-+ }
-+ for(i = 0 ; i < LDAP_MAP_AUTH_METHOD_MAX ; i++ ) {
-+ if ( strncmp(tmp,ldap_map_auth_methods[i],strlen(ldap_map_auth_methods[i])) == 0 ) {
-+ lmap->method = ldap_map_auth_methods_code[i] ;
-+ }
-+ }
-+
-+ break ;
-+ /* This is a string that is dependent on the
-+ * method used defined above.
-+ */
-+ case 'S': /* Secret for binding */
-+ while (isascii(*++p) && isspace(*p))
-+ continue;
-+ lmap->secret = p ;
-+ break ;
- }
-
- /* need to account for quoted strings here arggg... */
-@@ -3189,16 +3277,60 @@
- return FALSE;
- }
-
-- if (lmap->binddn != NULL)
-- lmap->binddn = newstr(ldap_map_dequote(lmap->binddn));
-+ if (lmap->binddn != NULL) {
-+ lmap->binddn = newstr(ldap_map_dequote(lmap->binddn));
-+
-+ if ( lmap->secret != NULL ) {
-+ /* need to use method to map secret to passwd string */
-+ switch(lmap->method)
-+ {
-+
-+ case LDAP_AUTH_NONE: /* Do nothing */
-+ break;
-+ case LDAP_AUTH_SIMPLE: /* Secret is the name of a file with
-+ the first line as the pwd. */
-+
-+
-+ sfd = safefopen(ldap_map_dequote(lmap->secret),O_RDONLY,0,sff);
-+ if ( sfd == NULL )
-+ {
-+ syserr("LDAP map: cannot open secret %s",ldap_map_dequote(lmap->secret));
-+ return FALSE ;
-+ } else
-+ {
-+ lmap->secret = sfgets(m_tmp,LDAP_MAP_MAX_PASSWD,sfd,0,"ldap_map_parseargs") ;
-+ fclose(sfd) ;
-+ if ( lmap->secret != NULL )
-+ {
-+ /* chomp newline */
-+ if (m_tmp[strlen(m_tmp)-1] == '\n')
-+ m_tmp[strlen(m_tmp)-1] = '\0';
-+
-+ lmap->secret = newstr(m_tmp) ;
-+ }
-+ }
-+ break ;
-+ case LDAP_AUTH_KRBV4: /* Secret is where the tgt file
-+ is stashed */
-+ /* We could be paranoid here.. */
-+ snprintf(m_tmp,MAXPATHLEN+LDAP_MAP_MAX_PASSWD,"KRBTKFILE=%s",ldap_map_dequote(lmap->secret));
-+ putenv(m_tmp);
-+ lmap->secret = NULL ;
-+ break ;
-+ default : /* Should NEVER get here */
-+ syserr("LDAP map: Garbage in lmap method" ) ;
-+ return FALSE ;
-+ break ;
-+ } /* end switch */
-+ }
-+ }
- else
- lmap->binddn = DEFAULT_LDAP_MAP_BINDDN;
--
-
-- if (lmap->passwd != NULL)
-- lmap->passwd = newstr(ldap_map_dequote(lmap->passwd));
-+ if (lmap->secret != NULL)
-+ lmap->secret = newstr(ldap_map_dequote(lmap->secret));
- else
-- lmap->passwd = DEFAULT_LDAP_MAP_PASSWD;
-+ lmap->secret = DEFAULT_LDAP_MAP_SECRET;
-
- if (lmap->base != NULL)
- lmap->base = newstr(ldap_map_dequote(lmap->base));
diff --git a/debian/patches/patch.local_procmail b/debian/patches/patch.local_procmail
deleted file mode 100644
index df6ea83..0000000
--- a/debian/patches/patch.local_procmail
+++ /dev/null
@@ -1,68 +0,0 @@
-# Make sure FEATURE(local_procmail) comes before MAILER(local)
-#
-# To apply this patch:
-# STEP 1: Chdir to the source directory.
-# STEP 2: Run the 'applypatch' program with this patch file as input.
-#
-# If you do not have 'applypatch', it is part of the 'makepatch' package
-# that you can fetch from the Comprehensive Perl Archive Network:
-# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
-# In the above URL, 'x' should be 2 or higher.
-#
-# To apply this patch without the use of 'applypatch':
-# STEP 1: Chdir to the source directory.
-# STEP 2: Run the 'patch' program with this file as input.
-#
-#### End of Preamble ####
-
-#### Patch data follows ####
-diff -c '../../cf/feature/local_procmail.m4' 'local_procmail.m4'
-Index: ./../../cf/feature/local_procmail.m4
-*** ./../../cf/feature/local_procmail.m4 Mon Jul 19 15:45:59 1999
---- ./local_procmail.m4 Mon Jul 19 15:46:56 1999
-***************
-*** 12,20 ****
- #
-
- divert(0)
-! VERSIONID(`@(#)local_procmail.m4 8.11 (Berkeley) 5/19/1998')
- divert(-1)
-
- define(`LOCAL_MAILER_PATH',
- ifelse(_ARG_, `',
- ifdef(`PROCMAIL_MAILER_PATH',
---- 12,22 ----
- #
-
- divert(0)
-! VERSIONID(`@(#)local_procmail.m4 8.13 (Debian) 7/19/1999')
- divert(-1)
-
-+ ifdef(`_MAILER_local_',
-+ `errprint(`*** FEATURE(local_procmail) must occur before MAILER(local)')')dnl
- define(`LOCAL_MAILER_PATH',
- ifelse(_ARG_, `',
- ifdef(`PROCMAIL_MAILER_PATH',
-***************
-*** 22,25 ****
- `/usr/local/bin/procmail'),
- _ARG_))
- define(`LOCAL_MAILER_FLAGS', `SPfhn9')
-! define(`LOCAL_MAILER_ARGS', `procmail -Y -a $h -d $u')
---- 24,27 ----
- `/usr/local/bin/procmail'),
- _ARG_))
- define(`LOCAL_MAILER_FLAGS', `SPfhn9')
-! define(`LOCAL_MAILER_ARGS', `procmail -a $h -d $u')
-#### End of Patch data ####
-
-#### ApplyPatch data follows ####
-# Data version : 1.0
-# Date generated : Mon Jul 19 15:59:28 1999
-# Generated by : makepatch 2.00
-# Recurse directories : Yes
-# p '../../cf/feature/local_procmail.m4' 715
-#### End of ApplyPatch data ####
-
-#### End of Patch kit [created: Mon Jul 19 15:59:28 1999] ####
-#### Checksum: 68 2121 26700 ####
diff --git a/debian/patches/patch.mail.local b/debian/patches/patch.mail.local
deleted file mode 100644
index d0c8b0d..0000000
--- a/debian/patches/patch.mail.local
+++ /dev/null
@@ -1,68 +0,0 @@
-diff -wur ./mail.local/mail.local.c ./debian/patches/mail.local/mail.local.c
---- ./mail.local/mail.local.c Tue Dec 29 18:42:53 1998
-+++ ./debian/patches/mail.local/mail.local.c Sun May 7 17:30:14 2000
-@@ -593,6 +593,7 @@
- FILE *fp = NULL;
- time_t tval;
- int fd, eline;
-+ int prevfl, fl = 1;
- char line[2048];
- char tmpbuf[sizeof _PATH_LOCTMP + 1];
-
-@@ -620,12 +621,13 @@
- for (eline = 1; fgets(line, sizeof(line), stdin);) {
- size_t line_len = strlen(line);
-
-+ prevfl=fl;
- if (line_len >= 2 &&
- line[line_len - 2] == '\r' &&
- line[line_len - 1] == '\n') {
- strcpy(line + line_len - 2, "\n");
- }
-- if (lmtprcpts && line[0] == '.') {
-+ if (prevfl && lmtprcpts && line[0] == '.') {
- char *src = line + 1, *dest = line;
-
- if (line[1] == '\n')
-@@ -634,7 +636,39 @@
- *dest++ = *src++;
- *dest = '\0';
- }
-- if (line[0] == '\n')
-+
-+ fl=0;
-+ if (line_len > 0)
-+ {
-+ if (line[line_len - 1] == '\n')
-+ {
-+ if (line_len >= 2 &&
-+ line[line_len - 2] == '\r')
-+ {
-+ line[line_len - 2] = '\n';
-+ line[line_len - 1] = '\0';
-+ line_len--;
-+ }
-+ fl = 1;
-+ }
-+ else if (line[line_len - 1] == '\r')
-+ {
-+ int peek;
-+ /* Did we just miss the CRLF? */
-+ peek = fgetc(stdin);
-+ if (peek == '\n')
-+ {
-+ line[line_len - 1] = '\n';
-+ fl = 1;
-+ }
-+ else
-+ (void) ungetc(peek, stdin);
-+ }
-+ }
-+ else
-+ fl = 1;
-+
-+ if (prevfl && line[0] == '\n')
- eline = 1;
- else {
- if (eline && line[0] == 'F' &&
-
diff --git a/debian/patches/patches.index b/debian/patches/patches.index
new file mode 100644
index 0000000..7b45ffb
--- /dev/null
+++ b/debian/patches/patches.index
@@ -0,0 +1,16 @@
+The following Debian specific patches have been applied:
+
+ *) dpatch.001 cf/feature/local_procmail.m4
+ Remove -Y from procmail arguements
+
+ *) dpatch.002 cf/mailer/cyrus.m4
+ Support cyrus-deliver MDA (Thanks Manoj Srivastava)
+
+ *) dpatch.003 rmail/rmail.c
+ Change sendmail call -obq to -obi
+
+ *) dpatch.004 sendmail/control.c
+ Make control socket mode 0660
+
+ *) dpatch.005 cf/mailer/fax.m4
+ /usr/bin/faxmail, !/usr/local/bin/faxmail
diff --git a/debian/patches/prescan.8.9.3.patch b/debian/patches/prescan.8.9.3.patch
deleted file mode 100644
index 03bb80c..0000000
--- a/debian/patches/prescan.8.9.3.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-Index: conf.c
-===================================================================
-RCS file: /cvs/sendmail/conf.c,v
-retrieving revision 8.456
-retrieving revision 8.456.2.2
-diff -c -r8.456 -r8.456.2.2
-*** sendmail-8.9.3/src/conf.c 7 Feb 1999 07:26:35 -0000 8.456
---- conf.c 28 Mar 2003 06:03:22 -0000 8.456.2.2
-***************
-*** 286,291 ****
---- 286,293 ----
- DontLockReadFiles = TRUE;
- DoubleBounceAddr = "postmaster";
- MaxHeadersLength = MAXHDRSLEN;
-+ MaxMimeHeaderLength = MAXLINE;
-+ MaxMimeFieldLength = MaxMimeHeaderLength / 2;
- snprintf(buf, sizeof buf, "%s%sdead.letter",
- _PATH_VARTMP,
- _PATH_VARTMP[sizeof _PATH_VARTMP - 2] == '/' ? "" : "/");
-Index: parseaddr.c
-===================================================================
-RCS file: /cvs/sendmail/parseaddr.c,v
-retrieving revision 8.159
-retrieving revision 8.159.2.3
-diff -c -r8.159 -r8.159.2.3
-*** sendmail-8.9.3/src/parseaddr.c 7 Feb 1999 07:26:40 -0000 8.159
---- parseaddr.c 27 Mar 2003 19:42:23 -0000 8.159.2.3
-***************
-*** 403,409 ****
- };
-
-
-! # define NOCHAR -1 /* signal nothing in lookahead token */
-
- char **
- prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab)
---- 403,409 ----
- };
-
-
-! # define NOCHAR (-1) /* signal nothing in lookahead token */
-
- char **
- prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab)
-***************
-*** 486,491 ****
---- 486,492 ----
- /* see if there is room */
- if (q >= &pvpbuf[pvpbsize - 5])
- {
-+ addrtoolong:
- usrerr("553 Address too long");
- if (strlen(addr) > (SIZE_T) MAXNAME)
- addr[MAXNAME] = '\0';
-***************
-*** 497,507 ****
- }
-
- /* squirrel it away */
- *q++ = c;
- }
-
- /* read a new input character */
-! c = *p++;
- if (c == '\0')
- {
- /* diagnose and patch up bad syntax */
---- 498,512 ----
- }
-
- /* squirrel it away */
-+ #if !ALLOW_255
-+ if ((char) c == (char) -1 && !tTd(82, 101))
-+ c &= 0x7f;
-+ #endif /* !ALLOW_255 */
- *q++ = c;
- }
-
- /* read a new input character */
-! c = (*p++) & 0x00ff;
- if (c == '\0')
- {
- /* diagnose and patch up bad syntax */
-***************
-*** 556,561 ****
---- 561,569 ----
- }
- else if (c != '!' || state == QST)
- {
-+ /* see if there is room */
-+ if (q >= &pvpbuf[pvpbsize - 5])
-+ goto addrtoolong;
- *q++ = '\\';
- continue;
- }
-***************
-*** 637,642 ****
---- 645,653 ----
- /* new token */
- if (tok != q)
- {
-+ /* see if there is room */
-+ if (q >= &pvpbuf[pvpbsize - 5])
-+ goto addrtoolong;
- *q++ = '\0';
- if (tTd(22, 36))
- {
-Index: version.c
-===================================================================
-*** sendmail-8.9.3/src/version.c Thu Feb 4 16:38:46 1999
---- version.c Wed Mar 19 16:33:35 2003
-***************
-*** 14,17 ****
- static char sccsid[] = "@(#)version.c 8.9.3.1 (Berkeley) 2/4/1999";
- #endif /* not lint */
-
-! char Version[] = "8.9.3";
---- 14,17 ----
- static char sccsid[] = "@(#)version.c 8.9.3.1 (Berkeley) 2/4/1999";
- #endif /* not lint */
-
-! char Version[] = "8.9.3p2";
diff --git a/debian/patches/proto.m4.8.9.3 b/debian/patches/proto.m4.8.9.3
deleted file mode 100644
index fec4494..0000000
--- a/debian/patches/proto.m4.8.9.3
+++ /dev/null
@@ -1,13 +0,0 @@
-*** ./sendmail-8.9.3/cf/m4/proto.m4 Tue Feb 2 15:21:30 1999
---- proto.m4.n Tue Dec 3 15:32:38 2002
-***************
-*** 1100,1105 ****
---- 1100,1107 ----
-
- ifdef(`ACCESS_TABLE', `dnl
- R$+ $| $+ $: $>LookUpDomain < $1 > <?> < $2 >
-+ # empty client_name
-+ R $| $+ $: $>LookUpAddress < $1 > <?> < $1 >
- R<?> < $+ > $: $>LookUpAddress < $1 > <?> < $1 >
- R<?> < $+ > $: $1
- R<OK> < $* > $@ OK
diff --git a/debian/patches/src.conf.h.linux b/debian/patches/src.conf.h.linux
deleted file mode 100644
index 745cbce..0000000
--- a/debian/patches/src.conf.h.linux
+++ /dev/null
@@ -1,54 +0,0 @@
-diff -c './src/conf.h' 'conf.h'
-Index: ./src/conf.h
-Prereq: 8.385
-*** sendmail-8.9.3/src/conf.h Wed Jul 25 12:23:19 2001
---- ./src/conf.h Tue Jul 31 16:33:50 2001
-***************
-*** 1274,1280 ****
-
- #ifdef __linux__
- # define BSD 1 /* include BSD defines */
-! # define USESETEUID 0 /* Have it due to POSIX, but doesn't work */
- # define NEEDGETOPT 1 /* need a replacement for getopt(3) */
- # define HASUNAME 1 /* use System V uname(2) system call */
- # define HASUNSETENV 1 /* has unsetenv(3) call */
---- 1274,1280 ----
-
- #ifdef __linux__
- # define BSD 1 /* include BSD defines */
-! # define USESETEUID 1 /* Have it due to POSIX, but doesn't work */
- # define NEEDGETOPT 1 /* need a replacement for getopt(3) */
- # define HASUNAME 1 /* use System V uname(2) system call */
- # define HASUNSETENV 1 /* has unsetenv(3) call */
-***************
-*** 1283,1289 ****
- # endif
- # define ERRLIST_PREDEFINED /* don't declare sys_errlist */
- # define GIDSET_T gid_t /* from <linux/types.h> */
-! # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */
- # define IP_SRCROUTE 0 /* linux <= 1.2.8 doesn't support IP_OPTIONS */
- # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */
- # ifndef HASFLOCK
---- 1283,1289 ----
- # endif
- # define ERRLIST_PREDEFINED /* don't declare sys_errlist */
- # define GIDSET_T gid_t /* from <linux/types.h> */
-! # define HASGETUSERSHELL 1 /* getusershell(3) broken in Slackware 2.0 */
- # define IP_SRCROUTE 0 /* linux <= 1.2.8 doesn't support IP_OPTIONS */
- # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */
- # ifndef HASFLOCK
-***************
-*** 1307,1312 ****
---- 1307,1318 ----
- # endif
- # include <sys/sysmacros.h>
- # undef atol /* wounded in <stdlib.h> */
-+ # if !defined(KERNEL_VERSION) /* not defined in 2.0.x kernel series */
-+ # define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
-+ # endif /* !defined(KERNEL_VERSION) */
-+ # if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,36))
-+ # define HASFCHMOD 1 /* fchmod(2) */
-+ # endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,36)) */
- #endif
-
-
diff --git a/debian/patches/util.c.893.patch b/debian/patches/util.c.893.patch
deleted file mode 100644
index fb71fcd..0000000
--- a/debian/patches/util.c.893.patch
+++ /dev/null
@@ -1,48 +0,0 @@
---- ./src/util.c.orig Fri Jan 22 07:18:40 1999
-+++ sendmail-8.9.3/src/util.c Thu Apr 29 02:34:21 1999
-@@ -2086,6 +2086,8 @@
- ProcListVec = npv;
- }
- ProcListVec[i].proc_pid = pid;
-+ if (ProcListVec[i].proc_task != NULL)
-+ free(ProcListVec[i].proc_task);
- ProcListVec[i].proc_task = newstr(task);
-
- /* if process adding itself, it's not a child */
-@@ -2142,11 +2144,6 @@
- if (ProcListVec[i].proc_pid == pid)
- {
- ProcListVec[i].proc_pid = NO_PID;
-- if (ProcListVec[i].proc_task != NULL)
-- {
-- free(ProcListVec[i].proc_task);
-- ProcListVec[i].proc_task = NULL;
-- }
- break;
- }
- }
-@@ -2172,11 +2169,6 @@
- for (i = 1; i < ProcListSize; i++)
- {
- ProcListVec[i].proc_pid = NO_PID;
-- if (ProcListVec[i].proc_task != NULL)
-- {
-- free(ProcListVec[i].proc_task);
-- ProcListVec[i].proc_task = NULL;
-- }
- }
- CurChildren = 0;
- }
-@@ -2207,11 +2199,6 @@
- "proc_list_probe: lost pid %d",
- (int) ProcListVec[i].proc_pid);
- ProcListVec[i].proc_pid = NO_PID;
-- if (ProcListVec[i].proc_task != NULL)
-- {
-- free(ProcListVec[i].proc_task);
-- ProcListVec[i].proc_task = NULL;
-- }
- CurChildren--;
- }
- }
-
diff --git a/debian/proto.m4 b/debian/proto.m4
deleted file mode 100644
index 863b42c..0000000
--- a/debian/proto.m4
+++ /dev/null
@@ -1,1329 +0,0 @@
-divert(-1)
-#
-# 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.
-#
-#
-divert(0)
-
-VERSIONID(`@(#)proto.m4 8.243 (Berkeley) 2/2/1999')
-
-MAILER(local)dnl
-
-# level 8 config file format
-V8/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley')
-divert(-1)
-
-# do some sanity checking
-ifdef(`__OSTYPE__',,
- `errprint(`*** ERROR: No system type defined (use OSTYPE macro)')')
-
-# pick our default mailers
-ifdef(`confSMTP_MAILER',, `define(`confSMTP_MAILER', `esmtp')')
-ifdef(`confLOCAL_MAILER',, `define(`confLOCAL_MAILER', `local')')
-ifdef(`confRELAY_MAILER',,
- `define(`confRELAY_MAILER',
- `ifdef(`_MAILER_smtp_', `relay',
- `ifdef(`_MAILER_uucp', `uucp-new', `unknown')')')')
-ifdef(`confUUCP_MAILER',, `define(`confUUCP_MAILER', `uucp-old')')
-define(`_SMTP_', `confSMTP_MAILER')dnl for readability only
-define(`_LOCAL_', `confLOCAL_MAILER')dnl for readability only
-define(`_RELAY_', `confRELAY_MAILER')dnl for readability only
-define(`_UUCP_', `confUUCP_MAILER')dnl for readability only
-
-# set our default hashed database type
-ifdef(`DATABASE_MAP_TYPE',, `define(`DATABASE_MAP_TYPE', `hash')')
-
-# back compatibility with old config files
-ifdef(`confDEF_GROUP_ID',
- `errprint(`*** confDEF_GROUP_ID is obsolete.')
- errprint(` Use confDEF_USER_ID with a colon in the value instead.')')
-ifdef(`confREAD_TIMEOUT',
- `errprint(`*** confREAD_TIMEOUT is obsolete.')
- errprint(` Use individual confTO_<timeout> parameters instead.')')
-ifdef(`confMESSAGE_TIMEOUT',
- `define(`_ARG_', index(confMESSAGE_TIMEOUT, /))
- ifelse(_ARG_, -1,
- `define(`confTO_QUEUERETURN', confMESSAGE_TIMEOUT)',
- `define(`confTO_QUEUERETURN',
- substr(confMESSAGE_TIMEOUT, 0, _ARG_))
- define(`confTO_QUEUEWARN',
- substr(confMESSAGE_TIMEOUT, eval(_ARG_+1)))')')
-ifdef(`confMIN_FREE_BLOCKS', `ifelse(index(confMIN_FREE_BLOCKS, /), -1,,
- `errprint(`*** compound confMIN_FREE_BLOCKS is obsolete.')
- errprint(` Use confMAX_MESSAGE_SIZE for the second part of the value.')')')
-
-# clean option definitions below....
-define(`_OPTION', `ifdef(`$2', `O $1=$2', `#O $1`'ifelse($3, `',, `=$3')')')dnl
-
-divert(0)dnl
-
-# override file safeties - setting this option compromises system security
-# need to set this now for the sake of class files
-_OPTION(DontBlameSendmail, `confDONT_BLAME_SENDMAIL', safe)
-
-##################
-# local info #
-##################
-
-Cwlocalhost
-ifdef(`USE_CW_FILE',
-`# file containing names of hosts for which we receive email
-Fw`'confCW_FILE',
- `dnl')
-
-# my official domain name
-# ... `define' this only if sendmail cannot automatically determine your domain
-ifdef(`confDOMAIN_NAME', `Dj`'confDOMAIN_NAME', `#Dj$w.Foo.COM')
-
-ifdef(`_NULL_CLIENT_ONLY_', `divert(-1)')dnl
-
-CP.
-
-ifdef(`UUCP_RELAY',
-`# UUCP relay host
-DY`'UUCP_RELAY
-CPUUCP
-
-')dnl
-ifdef(`BITNET_RELAY',
-`# BITNET relay host
-DB`'BITNET_RELAY
-CPBITNET
-
-')dnl
-ifdef(`DECNET_RELAY',
-`define(`_USE_DECNET_SYNTAX_', 1)dnl
-# DECnet relay host
-DC`'DECNET_RELAY
-CPDECNET
-
-')dnl
-ifdef(`FAX_RELAY',
-`# FAX relay host
-DF`'FAX_RELAY
-CPFAX
-
-')dnl
-# "Smart" relay host (may be null)
-DS`'ifdef(`SMART_HOST', SMART_HOST)
-
-ifdef(`LUSER_RELAY', `dnl
-# place to which unknown users should be forwarded
-Kuser user -m -a<>
-DL`'LUSER_RELAY',
-`dnl')
-
-# operators that cannot be in local usernames (i.e., network indicators)
-CO @ % ifdef(`_NO_UUCP_', `', `!')
-
-# a class with just dot (for identifying canonical names)
-C..
-
-# a class with just a left bracket (for identifying domain literals)
-C[[
-
-ifdef(`MAILER_TABLE', `dnl
-# Mailer table (overriding domains)
-Kmailertable MAILER_TABLE',
-`dnl')
-
-ifdef(`DOMAIN_TABLE', `dnl
-# Domain table (adding domains)
-Kdomaintable DOMAIN_TABLE',
-`dnl')
-
-ifdef(`GENERICS_TABLE', `dnl
-# Generics table (mapping outgoing addresses)
-Kgenerics GENERICS_TABLE',
-`dnl')
-
-ifdef(`UUDOMAIN_TABLE', `dnl
-# UUCP domain table
-Kuudomain UUDOMAIN_TABLE',
-`dnl')
-
-ifdef(`BITDOMAIN_TABLE', `dnl
-# BITNET mapping table
-Kbitdomain BITDOMAIN_TABLE',
-`dnl')
-
-ifdef(`VIRTUSER_TABLE', `dnl
-# Virtual user table (maps incoming users)
-Kvirtuser VIRTUSER_TABLE',
-`dnl')
-
-ifdef(`ACCESS_TABLE', `dnl
-# Access list database (for spam stomping)
-Kaccess ACCESS_TABLE',
-`dnl')
-
-ifdef(`_RELAY_MX_SERVED_', `dnl
-# MX map (to allow relaying to hosts that we MX for)
-Kmxserved bestmx -z: -T<TEMP>',
-`dnl')
-
-ifdef(`_ACCEPT_UNRESOLVABLE_DOMAINS_',`dnl',`dnl
-# Resolve map (to check if a host exists in check_mail)
-Kresolve host -a<OK> -T<TEMP>')
-
-ifdef(`confCR_FILE', `dnl
-# Hosts that will permit relaying ($=R)
-FR`'confCR_FILE',
-`dnl')
-
-# who I send unqualified names to (null means deliver locally)
-DR`'ifdef(`LOCAL_RELAY', LOCAL_RELAY)
-
-# who gets all local email traffic ($R has precedence for unqualified names)
-DH`'ifdef(`MAIL_HUB', MAIL_HUB)
-
-# dequoting map
-Kdequote dequote
-
-divert(0)dnl # end of nullclient diversion
-# class E: names that should be exposed as from this host, even if we masquerade
-ifdef(`_NULL_CLIENT_ONLY_', `#',
-`# 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
-undivert(5)dnl
-
-# who I masquerade as (null for no masquerading) (see also $=M)
-DM`'ifdef(`MASQUERADE_NAME', MASQUERADE_NAME)
-
-# my name for error messages
-ifdef(`confMAILER_NAME', `Dn`'confMAILER_NAME', `#DnMAILER-DAEMON')
-
-undivert(6)dnl
-include(_CF_DIR_`m4/version.m4')
-
-###############
-# Options #
-###############
-
-# strip message body to 7 bits on input?
-_OPTION(SevenBitInput, `confSEVEN_BIT_INPUT')
-
-# 8-bit data handling
-_OPTION(EightBitMode, `confEIGHT_BIT_HANDLING', adaptive)
-
-ifdef(`_NULL_CLIENT_ONLY_', `dnl', `
-# wait for alias file rebuild (default units: minutes)
-_OPTION(AliasWait, `confALIAS_WAIT', 5m)
-
-# location of alias file
-_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)
-
-# maximum message size
-_OPTION(MaxMessageSize, `confMAX_MESSAGE_SIZE', 1000000)
-
-# substitution for space (blank) characters
-_OPTION(BlankSub, `confBLANK_SUB', _)
-
-# avoid connecting to "expensive" mailers on initial submission?
-_OPTION(HoldExpensive, `confCON_EXPENSIVE')
-
-# checkpoint queue runs after every N successful deliveries
-_OPTION(CheckpointInterval, `confCHECKPOINT_INTERVAL', 10)
-
-# default delivery mode
-_OPTION(DeliveryMode, `confDELIVERY_MODE', background)
-
-# automatically rebuild the alias database?
-_OPTION(AutoRebuildAliases, `confAUTO_REBUILD')
-
-# error message header/file
-_OPTION(ErrorHeader, `confERROR_MESSAGE', ifdef(`_USE_ETC_MAIL_', /etc/mail/error-header, /etc/sendmail.oE))
-
-# error mode
-_OPTION(ErrorMode, `confERROR_MODE', print)
-
-# save Unix-style "From_" lines at top of header?
-_OPTION(SaveFromLine, `confSAVE_FROM_LINES')
-
-# temporary file mode
-_OPTION(TempFileMode, `confTEMP_FILE_MODE', 0600)
-
-# match recipients against GECOS field?
-_OPTION(MatchGECOS, `confMATCH_GECOS')
-
-# maximum hop count
-_OPTION(MaxHopCount, `confMAX_HOP', 17)
-
-# location of help file
-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')
-
-# name resolver options
-_OPTION(ResolverOptions, `confBIND_OPTS', +AAONLY)
-
-# deliver MIME-encapsulated error messages?
-_OPTION(SendMimeErrors, `confMIME_FORMAT_ERRORS')
-
-# Forward file search path
-_OPTION(ForwardPath, `confFORWARD_PATH', /var/forward/$u:$z/.forward.$w:$z/.forward)
-
-# open connection cache size
-_OPTION(ConnectionCacheSize, `confMCI_CACHE_SIZE', 2)
-
-# open connection cache timeout
-_OPTION(ConnectionCacheTimeout, `confMCI_CACHE_TIMEOUT', 5m)
-
-# persistent host status directory
-_OPTION(HostStatusDirectory, `confHOST_STATUS_DIRECTORY', .hoststat)
-
-# single thread deliveries (requires HostStatusDirectory)?
-_OPTION(SingleThreadDelivery, `confSINGLE_THREAD_DELIVERY')
-
-# use Errors-To: header?
-_OPTION(UseErrorsTo, `confUSE_ERRORS_TO')
-
-# log level
-_OPTION(LogLevel, `confLOG_LEVEL', 10)
-
-# send to me too, even in an alias expansion?
-_OPTION(MeToo, `confME_TOO')
-
-# verify RHS in newaliases?
-_OPTION(CheckAliases, `confCHECK_ALIASES')
-
-# default messages to old style headers if no special punctuation?
-_OPTION(OldStyleHeaders, `confOLD_STYLE_HEADERS')
-
-# SMTP daemon options
-_OPTION(DaemonPortOptions, `confDAEMON_OPTIONS', Port=esmtp)
-
-# privacy flags
-_OPTION(PrivacyOptions, `confPRIVACY_FLAGS', authwarnings)
-
-# who (if anyone) should get extra copies of error messages
-_OPTION(PostMasterCopy, `confCOPY_ERRORS_TO', Postmaster)
-
-# slope of queue-only function
-_OPTION(QueueFactor, `confQUEUE_FACTOR', 600000)
-
-# queue directory
-O QueueDirectory=ifdef(`QUEUE_DIR', QUEUE_DIR, /var/spool/mqueue)
-
-# timeouts (many of these)
-_OPTION(Timeout.initial, `confTO_INITIAL', 5m)
-_OPTION(Timeout.connect, `confTO_CONNECT', 5m)
-_OPTION(Timeout.iconnect, `confTO_ICONNECT', 5m)
-_OPTION(Timeout.helo, `confTO_HELO', 5m)
-_OPTION(Timeout.mail, `confTO_MAIL', 10m)
-_OPTION(Timeout.rcpt, `confTO_RCPT', 1h)
-_OPTION(Timeout.datainit, `confTO_DATAINIT', 5m)
-_OPTION(Timeout.datablock, `confTO_DATABLOCK', 1h)
-_OPTION(Timeout.datafinal, `confTO_DATAFINAL', 1h)
-_OPTION(Timeout.rset, `confTO_RSET', 5m)
-_OPTION(Timeout.quit, `confTO_QUIT', 2m)
-_OPTION(Timeout.misc, `confTO_MISC', 2m)
-_OPTION(Timeout.command, `confTO_COMMAND', 1h)
-_OPTION(Timeout.ident, `confTO_IDENT', 30s)
-_OPTION(Timeout.fileopen, `confTO_FILEOPEN', 60s)
-_OPTION(Timeout.queuereturn, `confTO_QUEUERETURN', 5d)
-_OPTION(Timeout.queuereturn.normal, `confTO_QUEUERETURN_NORMAL', 5d)
-_OPTION(Timeout.queuereturn.urgent, `confTO_QUEUERETURN_URGENT', 2d)
-_OPTION(Timeout.queuereturn.non-urgent, `confTO_QUEUERETURN_NONURGENT', 7d)
-_OPTION(Timeout.queuewarn, `confTO_QUEUEWARN', 4h)
-_OPTION(Timeout.queuewarn.normal, `confTO_QUEUEWARN_NORMAL', 4h)
-_OPTION(Timeout.queuewarn.urgent, `confTO_QUEUEWARN_URGENT', 1h)
-_OPTION(Timeout.queuewarn.non-urgent, `confTO_QUEUEWARN_NONURGENT', 12h)
-_OPTION(Timeout.hoststatus, `confTO_HOSTSTATUS', 30m)
-
-# should we not prune routes in route-addr syntax addresses?
-_OPTION(DontPruneRoutes, `confDONT_PRUNE_ROUTES')
-
-# queue up everything before forking?
-_OPTION(SuperSafe, `confSAFE_QUEUE')
-
-# status file
-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
-# if defined but null, use TZ envariable passed in
-# if defined and non-null, use that info
-ifelse(confTIME_ZONE, `USE_SYSTEM', `#O TimeZoneSpec=',
- confTIME_ZONE, `USE_TZ', `O TimeZoneSpec=',
- `O TimeZoneSpec=confTIME_ZONE')
-
-# default UID (can be username or userid:groupid)
-_OPTION(DefaultUser, `confDEF_USER_ID', mailnull)
-
-# list of locations of user database file (null means no lookup)
-_OPTION(UserDatabaseSpec, `confUSERDB_SPEC', ifdef(`_USE_ETC_MAIL_', /etc/mail/userdb, /etc/userdb))
-
-# fallback MX host
-_OPTION(FallbackMXhost, `confFALLBACK_MX', fall.back.host.net)
-
-# if we are the best MX host for a site, try it directly instead of config err
-_OPTION(TryNullMXList, `confTRY_NULL_MX_LIST')
-
-# load average at which we just queue messages
-_OPTION(QueueLA, `confQUEUE_LA', 8)
-
-# load average at which we refuse connections
-_OPTION(RefuseLA, `confREFUSE_LA', 12)
-
-# maximum number of children we allow at one time
-_OPTION(MaxDaemonChildren, `confMAX_DAEMON_CHILDREN', 12)
-
-# maximum number of new connections per second
-_OPTION(ConnectionRateThrottle, `confCONNECTION_RATE_THROTTLE', 3)
-
-# work recipient factor
-_OPTION(RecipientFactor, `confWORK_RECIPIENT_FACTOR', 30000)
-
-# deliver each queued job in a separate process?
-_OPTION(ForkEachJob, `confSEPARATE_PROC')
-
-# work class factor
-_OPTION(ClassFactor, `confWORK_CLASS_FACTOR', 1800)
-
-# work time factor
-_OPTION(RetryFactor, `confWORK_TIME_FACTOR', 90000)
-
-# shall we sort the queue by hostname first?
-_OPTION(QueueSortOrder, `confQUEUE_SORT_ORDER', priority)
-
-# minimum time in queue before retry
-_OPTION(MinQueueAge, `confMIN_QUEUE_AGE', 30m)
-
-# default character set
-_OPTION(DefaultCharSet, `confDEF_CHAR_SET', iso-8859-1)
-
-# service switch file (ignored on Solaris, Ultrix, OSF/1, others)
-_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)
-
-# dialup line delay on connection failure
-_OPTION(DialDelay, `confDIAL_DELAY', 10s)
-
-# action to take if there are no recipients in the message
-_OPTION(NoRecipientAction, `confNO_RCPT_ACTION', add-to-undisclosed)
-
-# chrooted environment for writing to files
-_OPTION(SafeFileEnvironment, `confSAFE_FILE_ENV', /arch)
-
-# are colons OK in addresses?
-_OPTION(ColonOkInAddr, `confCOLON_OK_IN_ADDR')
-
-# how many jobs can you process in the queue?
-_OPTION(MaxQueueRunSize, `confMAX_QUEUE_RUN_SIZE', 10000)
-
-# shall I avoid expanding CNAMEs (violates protocols)?
-_OPTION(DontExpandCnames, `confDONT_EXPAND_CNAMES')
-
-# SMTP initial login message (old $e macro)
-_OPTION(SmtpGreetingMessage, `confSMTP_LOGIN_MSG')
-
-# UNIX initial From header format (old $l macro)
-_OPTION(UnixFromLine, `confFROM_LINE')
-
-# From: lines that have embedded newlines are unwrapped onto one line
-_OPTION(SingleLineFromHeader, `confSINGLE_LINE_FROM_HEADER', False)
-
-# Allow HELO SMTP command that does not `include' a host name
-_OPTION(AllowBogusHELO, `confALLOW_BOGUS_HELO', False)
-
-# Characters to be quoted in a full name phrase (@,;:\()[] are automatic)
-_OPTION(MustQuoteChars, `confMUST_QUOTE_CHARS', .)
-
-# delimiter (operator) characters (old $o macro)
-_OPTION(OperatorChars, `confOPERATORS')
-
-# shall I avoid calling initgroups(3) because of high NIS costs?
-_OPTION(DontInitGroups, `confDONT_INIT_GROUPS')
-
-# are group-writable `:include:' and .forward files (un)trustworthy?
-_OPTION(UnsafeGroupWrites, `confUNSAFE_GROUP_WRITES')
-
-# where do errors that occur when sending errors get sent?
-_OPTION(DoubleBounceAddress, `confDOUBLE_BOUNCE_ADDRESS', postmaster)
-
-# what user id do we assume for the majority of the processing?
-_OPTION(RunAsUser, `confRUN_AS_USER', sendmail)
-
-# maximum number of recipients per SMTP envelope
-_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
-')
-ifdef(`confMAX_HEADERS_LENGTH',
-`# Maximum length of the sum of all headers
-O MaxHeadersLength=confMAX_HEADERS_LENGTH
-')
-
-###########################
-# Message precedences #
-###########################
-
-Pfirst-class=0
-Pspecial-delivery=100
-Plist=-30
-Pbulk=-60
-Pjunk=-100
-
-#####################
-# Trusted users #
-#####################
-
-# this is equivalent to setting class "t"
-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')
-ifdef(`confTRUSTED_USERS', `T`'confTRUSTED_USERS', `dnl')
-
-#########################
-# Format of headers #
-#########################
-
-ifdef(`confFROM_HEADER',, `define(`confFROM_HEADER', `$?x$x <$g>$|$g$.')')dnl
-H?P?Return-Path: <$g>
-HReceived: confRECEIVED_HEADER
-H?D?Resent-Date: $a
-H?D?Date: $a
-H?F?Resent-From: confFROM_HEADER
-H?F?From: confFROM_HEADER
-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>
-ifdef(`_NULL_CLIENT_ONLY_',
- `include(_CF_DIR_`'m4/nullrelay.m4)m4exit',
- `dnl')
-#
-######################################################################
-######################################################################
-#####
-##### 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
-
-ifdef(`_NO_UUCP_', `dnl',
-`# 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
-')
-ifdef(`_USE_DECNET_SYNTAX_',
-`# convert node::user addresses into a domain-based address
-R$- :: $+ $@ $>96 $2 < @ $1 .DECNET > resolve DECnet names
-R$- . $- :: $+ $@ $>96 $3 < @ $1.$2 .DECNET > numeric DECnet addr
-',
- `dnl')
-# 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
-ifdef(`_NO_UUCP_', `dnl',
-`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
-
-ifdef(`DOMAIN_TABLE', `dnl
-# look up domains in the domain table
-R$* < @ $+ > $* $: $1 < @ $(domaintable $2 $) > $3', `dnl')
-
-undivert(2)dnl
-
-ifdef(`BITDOMAIN_TABLE', `dnl
-# handle BITNET mapping
-R$* < @ $+ .BITNET > $* $: $1 < @ $(bitdomain $2 $: $2.BITNET $) > $3', `dnl')
-
-ifdef(`UUDOMAIN_TABLE', `dnl
-# handle UUCP mapping
-R$* < @ $+ .UUCP > $* $: $1 < @ $(uudomain $2 $: $2.UUCP $) > $3', `dnl')
-
-ifdef(`_NO_UUCP_', `dnl',
-`ifdef(`UUCP_RELAY',
-`# pass UUCP addresses straight through
-R$* < @ $+ . UUCP > $* $@ $1 < @ $2 . UUCP . > $3',
-`# if really UUCP, handle it immediately
-ifdef(`_CLASS_U_',
-`R$* < @ $=U . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl')
-ifdef(`_CLASS_V_',
-`R$* < @ $=V . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl')
-ifdef(`_CLASS_W_',
-`R$* < @ $=W . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl')
-ifdef(`_CLASS_X_',
-`R$* < @ $=X . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl')
-ifdef(`_CLASS_Y_',
-`R$* < @ $=Y . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl')
-
-ifdef(`_NO_CANONIFY_', `dnl', `dnl
-# try UUCP traffic as a local address
-R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3
-R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3')
-')')
-ifdef(`_NO_CANONIFY_', `dnl', `dnl
-# 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
-ifdef(`_MASQUERADE_ENTIRE_DOMAIN_',
-`R$* < @ $* $=M > $* $: $1 < @ $2 $3 . > $4',
-`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
-
-ifdef(`_NO_UUCP_', `dnl',
-`# UUCP must always be presented in old form
-R$+ @ $- . UUCP $2!$1 u@h.UUCP => h!u')
-
-ifdef(`_USE_DECNET_SYNTAX_',
-`# put DECnet back in :: form
-R$+ @ $+ . DECNET $2 :: $1 u@h.DECNET => h::u',
- `dnl')
-# 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) ###
-##############################################################
-
-S`'97
-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
-ifdef(`_MAILER_smtp_',
-`# handle numeric address spec
-R$* < @ [ $+ ] > $* $: $>98 $1 < @ [ $2 ] > $3 numeric internet spec
-R$* < @ [ $+ ] > $* $#_SMTP_ $@ [$2] $: $1 < @ [$2] > $3 still numeric: send',
- `dnl')
-
-ifdef(`VIRTUSER_TABLE', `dnl
-# handle virtual users
-R$+ < @ $=w . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
-R<@> $+ + $* < @ $* . >
- $: < $(virtuser $1 + * @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 . >
-R<@> $+ + $* < @ $* . >
- $: < $(virtuser $1 @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 . >
-R<@> $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
-R<@> $+ $: $1
-R< error : $- $+ > $* $#error $@ $(dequote $1 $) $: $2
-R< $+ > $+ < @ $+ > $: $>97 $1',
-`dnl')
-
-# short circuit local delivery so forwarded email works
-ifdef(`_MAILER_usenet_', `dnl
-R$+ . USENET < @ $=w . > $#usenet $: $1 handle usenet specially', `dnl')
-ifdef(`_STICKY_LOCAL_DOMAIN_',
-`R$+ < @ $=w . > $: < $H > $1 < @ $2 . > first try hub
-R< $+ > $+ < $+ > $>95 < $1 > $2 < $3 > yep ....
-R< > $+ + $* < $+ > $#_LOCAL_ $: $1 + $2 plussed name?
-R< > $+ < $+ > $#_LOCAL_ $: @ $1 nope, local address',
-`R$=L < @ $=w . > $#_LOCAL_ $: @ $1 special local names
-R$+ < @ $=w . > $#_LOCAL_ $: $1 regular local name')
-
-ifdef(`MAILER_TABLE', `dnl
-# not local -- try mailer table lookup
-R$* <@ $+ > $* $: < $2 > $1 < @ $2 > $3 extract host name
-R< $+ . > $* $: < $1 > $2 strip trailing dot
-R< $+ > $* $: < $(mailertable $1 $) > $2 lookup
-R< $~[ : $* > $* $>95 < $1 : $2 > $3 check -- resolved?
-R< $+ > $* $: $>90 <$1> $2 try domain',
-`dnl')
-undivert(4)dnl
-
-ifdef(`_NO_UUCP_', `dnl',
-`# resolve remotely connected UUCP links (if any)
-ifdef(`_CLASS_V_',
-`R$* < @ $=V . UUCP . > $* $: $>95 < $V > $1 <@$2.UUCP.> $3',
- `dnl')
-ifdef(`_CLASS_W_',
-`R$* < @ $=W . UUCP . > $* $: $>95 < $W > $1 <@$2.UUCP.> $3',
- `dnl')
-ifdef(`_CLASS_X_',
-`R$* < @ $=X . UUCP . > $* $: $>95 < $X > $1 <@$2.UUCP.> $3',
- `dnl')')
-
-# resolve fake top level domains by forwarding to other hosts
-ifdef(`BITNET_RELAY',
-`R$*<@$+.BITNET.>$* $: $>95 < $B > $1 <@$2.BITNET.> $3 user@host.BITNET',
- `dnl')
-ifdef(`DECNET_RELAY',
-`R$*<@$+.DECNET.>$* $: $>95 < $C > $1 <@$2.DECNET.> $3 user@host.DECNET',
- `dnl')
-ifdef(`_MAILER_pop_',
-`R$+ < @ POP. > $#pop $: $1 user@POP',
- `dnl')
-ifdef(`_MAILER_fax_',
-`R$+ < @ $+ .FAX. > $#fax $@ $2 $: $1 user@host.FAX',
-`ifdef(`FAX_RELAY',
-`R$*<@$+.FAX.>$* $: $>95 < $F > $1 <@$2.FAX.> $3 user@host.FAX',
- `dnl')')
-
-ifdef(`UUCP_RELAY',
-`# forward non-local UUCP traffic to our UUCP relay
-R$*<@$*.UUCP.>$* $: $>95 < $Y > $1 <@$2.UUCP.> $3 uucp mail',
-`ifdef(`_MAILER_uucp_',
-`# forward other UUCP traffic straight to UUCP
-R$* < @ $+ .UUCP. > $* $#_UUCP_ $@ $2 $: $1 < @ $2 .UUCP. > $3 user@host.UUCP',
- `dnl')')
-ifdef(`_MAILER_usenet_', `
-# addresses sent to net.group.USENET will get forwarded to a newsgroup
-R$+ . USENET $#usenet $: $1',
- `dnl')
-
-ifdef(`_LOCAL_RULES_',
-`# figure out what should stay in our local mail system
-undivert(1)', `dnl')
-
-# 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
-ifdef(`_MAILER_smtp_',
-`R$* < @$* > $* $#_SMTP_ $@ $2 $: $1 < @ $2 > $3 user@host.domain',
-`R$* < @$* > $* $#error $@ 5.1.2 $: "Unrecognized host name " $2')
-
-# 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
-
-ifdef(`LUSER_RELAY', `dnl
-# send unrecognized local users to a relay host
-R< > $+ $: < $L . > $(user $1 $) look up user
-R< $* > $+ <> $* $: < > $2 $3 found; strip $L
-R< $* . > $+ $: < $1 > $2 strip extra dot',
-`dnl')
-
-# 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$+ <> + $* $: $1 + $2 check whether +detail
-R$+ <> $* $: $1 else discard
-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 >
-
-ifdef(`MAILER_TABLE', `dnl
-###################################################################
-### Ruleset 90 -- try domain part of mailertable entry ###
-###################################################################
-
-S90
-R$* <$- . $+ > $* $: $1$2 < $(mailertable .$3 $@ $1$2 $@ $2 $) > $4
-R$* <$~[ : $* > $* $>95 < $2 : $3 > $4 check -- resolved?
-R$* < . $+ > $* $@ $>90 $1 . <$2> $3 no -- strip & try again
-R$* < $* > $* $: < $(mailertable . $@ $1$2 $) > $3 try "."
-R< $~[ : $* > $* $>95 < $1 : $2 > $3 "." found?
-R< $* > $* $@ $2 no mailertable match',
-`dnl')
-
-###################################################################
-### 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 local host from routed addresses
-R< $* > < @ $+ > : $+ $@ $>97 $3
-R< $* > $+ $=O $+ < @ $+ > $@ $>97 $2 $3 $4
-
-# 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
-
-ifdef(`GENERICS_TABLE', `dnl
-# handle generics database
-ifdef(`_GENERICS_ENTIRE_DOMAIN_',
-`R$+ < @ $* $=G . > $: < $1@$2$3 > $1 < @ $2$3 . > @ mark',
-`R$+ < @ $=G . > $: < $1@$2 > $1 < @ $2 . > @ mark')
-R$+ < @ *LOCAL* > $: < $1@$j > $1 < @ *LOCAL* > @ mark
-R< $+ > $+ < $* > @ $: < $(generics $1 $: $) > $2 < $3 >
-R< > $+ < @ $+ > $: < $(generics $1 $: $) > $1 < @ $2 >
-R< $* @ $* > $* < $* > $@ $>3 $1 @ $2 found qualified
-R< $+ > $* < $* > $: $>3 $1 @ *LOCAL* found unqualified
-R< > $* $: $1 not found',
-`dnl')
-
-# special case the users that should be exposed
-R$=E < @ *LOCAL* > $@ $1 < @ $j . > leave exposed
-ifdef(`_MASQUERADE_ENTIRE_DOMAIN_',
-`R$=E < @ $* $=M . > $@ $1 < @ $2 $3 . >',
-`R$=E < @ $=M . > $@ $1 < @ $2 . >')
-ifdef(`_LIMITED_MASQUERADE_', `dnl',
-`R$=E < @ $=w . > $@ $1 < @ $2 . >')
-
-# handle domain-specific masquerading
-ifdef(`_MASQUERADE_ENTIRE_DOMAIN_',
-`R$* < @ $* $=M . > $* $: $1 < @ $2 $3 . @ $M > $4 convert masqueraded doms',
-`R$* < @ $=M . > $* $: $1 < @ $2 . @ $M > $3 convert masqueraded doms')
-ifdef(`_LIMITED_MASQUERADE_', `dnl',
-`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
-ifdef(`_MASQUERADE_ENVELOPE_',
-`R$+ $@ $>93 $1',
-`R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2')
-
-###################################################################
-### Ruleset 98 -- local part of ruleset zero (can be null) ###
-###################################################################
-
-S98
-undivert(3)dnl
-
-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
-###
-### Parameters:
-### <$1> -- key (domain name)
-### <$2> -- default (what to return if not found in db)
-### <$3> -- passthru (additional data passed unchanged through)
-######################################################################
-
-SLookUpDomain
-R<$+> <$+> <$*> $: < $(access $1 $: ? $) > <$1> <$2> <$3>
-R<?> <$+.$+> <$+> <$*> $@ $>LookUpDomain <$2> <$3> <$4>
-R<?> <$+> <$+> <$*> $@ <$2> <$3>
-R<$*> <$+> <$+> <$*> $@ <$1> <$4>
-
-######################################################################
-### LookUpAddress -- search for host address in access database
-###
-### Parameters:
-### <$1> -- key (dot quadded host address)
-### <$2> -- default (what to return if not found in db)
-### <$3> -- passthru (additional data passed through)
-######################################################################
-
-SLookUpAddress
-R<$+> <$+> <$*> $: < $(access $1 $: ? $) > <$1> <$2> <$3>
-R<?> <$+.$-> <$+> <$*> $@ $>LookUpAddress <$1> <$3> <$4>
-R<?> <$+> <$+> <$*> $@ <$2> <$3>
-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.
-###
-### 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
-
-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')
-
-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 >
-ifdef(`ACCESS_TABLE', `dnl
-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
-
-######################################################################
-### 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
-
-ifdef(`ACCESS_TABLE', `dnl
-R$+ $| $+ $: $>LookUpDomain < $1 > <?> < $2 >
-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
-# 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 by blackhole site _RBL_"',
-`dnl')
-
-######################################################################
-### 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
-ifdef(`_ACCEPT_UNRESOLVABLE_DOMAINS_',
-`R<?> $* < @ $+ > $* $: <OK> $1 < @ $2 > $3 ... unresolvable OK',
-`R<?> $* < @ $+ > $* $: <? $(resolve $2 $: $2 <PERM> $) > $1 < @ $2 > $3
-R<? $* <$->> $* < @ $+ > $*
- $: <$2> $3 < @ $4 > $5')
-
-ifdef(`_ACCEPT_UNQUALIFIED_SENDERS_',`dnl',`dnl
-# handle case of @localhost on address
-R<$+> $* < @localhost > $: < ? $&{client_name} > <$1> $2 < @localhost >
-R<$+> $* < @localhost.$m >
- $: < ? $&{client_name} > <$1> $2 < @localhost.$m >
-ifdef(`_NO_UUCP_', `dnl',
-`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')
-
-ifdef(`ACCESS_TABLE', `dnl
-# lookup localpart (user@)
-R<$+> $* < @ $+ > $* $: <USER $(access $2@ $: ? $) > <$1> $2 < @ $3 > $4
-# no match, try full address (user@domain rest)
-R<USER ?> <$+> $* < @ $* > $*
- $: <USER $(access $2@$3$4 $: ? $) > <$1> $2 < @ $3 > $4
-# no match, try address (user@domain)
-R<USER ?> <$+> $+ < @ $+ > $*
- $: <USER $(access $2@$3 $: ? $) > <$1> $2 < @ $3 > $4
-# no match, try (sub)domain (domain)
-R<USER ?> <$+> $* < @ $+ > $*
- $: $>LookUpDomain <$3> <$1> <>
-# check unqualified user in access database
-R<?> $* $: <USER $(access $1@ $: ? $) > <?> $1
-# retransform for further use
-R<USER $+> <$+> $* $: <$1> $3',
-`dnl')
-
-ifdef(`_ACCEPT_UNQUALIFIED_SENDERS_',`dnl',`dnl
-# 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"
-ifdef(`ACCESS_TABLE', `dnl
-R<RELAY> $* $@ <RELAY>
-R<DISCARD> $* $#discard $: discard
-R<REJECT> $* $#error $@ 5.7.1 $: "ifdef(`confREJECT_MSG', `confREJECT_MSG', `550 Access denied')"
-R<$+> $* $#error $@ 5.7.1 $: $1 error from access db',
-`dnl')
-
-######################################################################
-### 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
-
-ifdef(`_LOOSE_RELAY_CHECK_',`dnl
-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
-R$* $: <?> $1
-R<?> $+ < @ $=w > $: <> <USER $1> <FULL $1@$2> <HOST $2> <$1 < @ $2 >>
-R<?> $+ < @ $* > $: <> <FULL $1@$2> <HOST $2> <$1 < @ $2 >>
-R<?> $+ $: <> <USER $1> <$1>
-R<> <USER $+> $* $: <$(access $1 $: $)> $2
-R<> <FULL $+> $* $: <$(access $1 $: $)> $2
-R<OK> <FULL $+> $* $: <$(access $1 $: $)> $2
-R<> <HOST $+> $* $: <$(access $1 $: $)> $2
-R<OK> <HOST $+> $* $: <$(access $1 $: $)> $2
-R<> <$*> $: $1
-R<OK> <$*> $: $1
-R<RELAY> <$*> $: $1
-R<REJECT> $* $#error $@ 5.2.1 $: "550 Mailbox disabled for this recipient"
-R<$+> $* $#error $@ 5.2.1 $: $1 error from access db', `dnl')', `dnl')
-
-ifdef(`_PROMISCUOUS_RELAY_', `dnl', `dnl
-# anything terminating locally is ok
-ifdef(`_RELAY_ENTIRE_DOMAIN_', `dnl
-R$+ < @ $* $=m > $@ OK', `dnl')
-R$+ < @ $=w > $@ OK
-ifdef(`_RELAY_HOSTS_ONLY_',
-`R$+ < @ $=R > $@ OK
-ifdef(`ACCESS_TABLE', `dnl
-R$+ < @ $* > $: <$(access $2 $: ? $)> <$1 < @ $2 >>',`dnl')',
-`R$+ < @ $* $=R > $@ OK
-ifdef(`ACCESS_TABLE', `dnl
-R$+ < @ $* > $: $>LookUpDomain <$2> <?> <$1 < @ $2 >>',`dnl')')
-ifdef(`ACCESS_TABLE', `dnl
-R<RELAY> $* $@ RELAY
-R<$*> <$*> $: $2',`dnl')
-
-ifdef(`_RELAY_MX_SERVED_', `dnl
-# allow relaying for hosts which we MX serve
-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',
-`dnl')
-
-# 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
-ifdef(`_RELAY_ENTIRE_DOMAIN_', `dnl
-R$* $=m $@ OK', `dnl')
-R$=w $@ OK
-ifdef(`_RELAY_HOSTS_ONLY_',
-`R$=R $@ OK
-ifdef(`ACCESS_TABLE', `dnl
-R$* $: <$(access $1 $: ? $)> <$1>',`dnl')',
-`R$* $=R $@ OK
-ifdef(`ACCESS_TABLE', `dnl
-R$* $: $>LookUpDomain <$1> <?> <$1>',`dnl')')
-ifdef(`ACCESS_TABLE', `dnl
-R<RELAY> $* $@ RELAY
-R<$*> <$*> $: $2',`dnl')
-
-# check IP address
-R$* $: $&{client_addr}
-R$@ $@ OK originated locally
-R0 $@ OK originated locally
-R$=R $* $@ OK relayable IP address
-ifdef(`ACCESS_TABLE', `dnl
-R$* $: $>LookUpAddress <$1> <?> <$1>
-R<RELAY> $* $@ RELAY relayable IP address
-R<$*> <$*> $: $2', `dnl')
-R$* $: [ $1 ] put brackets around it...
-R$=w $@ OK ... and see if it is local
-
-ifdef(`_RELAY_LOCAL_FROM_', `dnl
-# anything with a local FROM is ok
-R$* $: $1 $| $>CanonAddr $&f
-R$* $| $+ < @ $=w . > $@ OK FROM local
-R$* $| $* $: $1
-', `dnl')
-
-# anything else is bogus
-R$* $#error $@ 5.7.1 $: "550 Relaying denied"')
-
-undivert(9)dnl
-#
-######################################################################
-######################################################################
-#####
-`##### MAILER DEFINITIONS'
-#####
-######################################################################
-######################################################################
-undivert(7)dnl
diff --git a/debian/rules b/debian/rules
index 06dd8ea..4beba56 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,421 +1,1172 @@
#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
+#------------------------------------------------------------------------------
+# vim: syntax=make
#
-# This file is also based upon prior sendmail makefiles
+# $Sendmail: rules,v 8.12.3 2003-09-17 15:19:44 cowboy Exp $
#
-# This file will make sendmail on either slink or potato, the only thing
-# to watch for is to make sure the changelog correctly reflects the
-# appropriate distribution!
+# Copyright (c) 1998-2003 Richard Nelson. All Rights Reserved.
#
-# Richard Nelson <cowboy@debian.org>
+# ./rules. Generated from rules.in by configure.
+#
+# Rules file for Sendmail 8.12.3-6.5(527363)
+# on Debian 3.0
+# via Debhelper V4
+#
+# Note: the .in file supports Sendmail 8.7.6 - 8.12.7
+# on Debian slink, potato, woody, testing, sid, ...
+# but the generated file is customized to the version noted above.
+#
+# The only thing to watch for is to make sure the changelog correctly
+# reflects the appropriate version and distribution!
+#
+# To support private builds:
+# 1) use the environment variables (defaults shown first):
+# CC=gcc|gcc-3.0..........-- choose compiler
+# CFLAGS='-O2 -Wall [-g]'.-- choose compile options
+# DEFINES=''..............-- additional -Dxxx
+# SM_CONF_OPT=''..........-- additional configure options
+# SM_BUILD_OPT=''.........-- additional build options
+# 2) Build the package using your normal setup:
+# A) [fakeroot] debian/rules binary
+# B) debuild -rfakeroot
+# C) dpkg-buildpackage -rfakeroot -uc -us
+#
+# DEB_BUILD_OPTIONS (global Debian package build options)
+# Debian specific, and common across package options
+# noopt - Do *NOT* compile with optimization (force -O0)
+# nostrip - Do *NOT* strip binaries (for debugging)
+#
+#
+# SM_CONF_OPT
+# Additional configure options and/or overrides may be specified thusly:
+# 1) export SM_CONF_OPT='--enable-shm=no'
+# dpkg-buildpackage -rfakeroot -uc -us
+# 2) SM_CONF_OPT='--enable-shm=no' dpkg-buildpackage
+# 3) debuild -e SM_CONF_OPT='--enable-shm=no'
+# etc...
+#
+# SM_BUILD_OPT
+# 1) export SM_BUILD_OPT='notls'
+# dpkg-buildpackage -rfakeroot -uc -us
+# 2) SM_BUILD_OPT='notls' dpkg-buildpackage -rfakeroot -uc -us
+# 3) debuild -e SM_BUILD_OPT='notls' -e CLFAGS='-O3 Wall'
+# etc...
+#
+# Supported options values for SM_BUILD_OPT:
+# notls Disable STARTTLS (OpenSSL) support
+# noauth Disable SMTP AUTH (sasl) support
+# nodev Disable generation of libmilter-dev package
+# nodoc Disable generation of sendmail-doc package
+#
+# This make file uses scripts from the DBS (0.8) package!
+#
+# Richard Nelson <cowboy@debian.org> 2003-09-17 15:19:44 (+0000)
+#------------------------------------------------------------------------------
+#SHELL := /bin/sh -x
# Uncomment this to turn on verbose mode.
-export DH_VERBOSE=
+#export DH_VERBOSE=1
+
+# This is the debhelper compatibility version to use. (we'll set it later)
+#export DH_COMPAT=4
# This has to be exported to make some magic below work.
export DH_OPTIONS
-package=sendmail
-version=$(shell expr `pwd` : '.*-\([0-9.].*\)')
-version_main=$(shell expr `pwd` : '.*-\([0-9]*.[0-9.]*\)')
-
-# Many things depend upon which release (slink, potato, etc.)
-ifeq ("$(shell dh_testversion 2.0.40 && echo potato)", "potato")
- DH_COMPAT = 2
- TEMP_DIR = $(shell echo "debian/tmp debian/$(package)" | \
- cut -d " " -f $(DH_COMPAT))
- DOC_PFX = usr/share/doc
- MAN_PFX = usr/share/man
+# Support separate debian directory
+ifeq (yes, $(shell test -d debian && echo 'yes'))
+ debian_dir := debian
+ pwd_dir := ${PWD}
+else
+ debian_dir := .
+ pwd_dir := ${PWD}/..
+ endif
+
+# Determine build,host architectures (via dpkg-architecture)
+ifeq (, ${DEB_BUILD_ARCH})
+ ifeq (yes, $(shell test -x /usr/bin/dpkg-architecture && echo 'yes'))
+ include ${debian_dir}/scripts/dpkg-arch.mk
+ endif
+ endif
+
+# Check for cross-compilation
+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
+ ifneq (, $(DEB_BUILD_GNU_TYPE))
+ endif
+ endif
+
+# will want path info for some things... Like patches/changelogs...
+pwd_string := $(shell expr "${pwd_dir}" : '.*-\([0-9.].*\)')
+ifeq (, $(findstring +,${pwd_string}))
+ pwd_version := ${pwd_string}
else
- DH_COMPAT = 1
- TEMP_DIR = debian/tmp
- DOC_PFX = usr/doc
- MAN_PFX = usr/man
+ pwd_version := $(shell expr "${pwd_string}" : '.*+\([0-9.].*\)')
endif
+pwd_major := $(shell expr "${pwd_version}" : '\([0-9]*\.[0-9]*\)')
+# get package/version information from the changelog
+package := $(shell (cd ${debian_dir}/.. && \
+ dpkg-parsechangelog 2>/dev/null) | awk '/^Source:/ {print $$2}')
+version_string := $(shell (cd ${debian_dir}/.. && \
+ dpkg-parsechangelog 2>/dev/null) | awk '/^Version:/ {print $$2}')
+version_full := $(shell expr "${version_string}" : '\([^-]*\)')
+version_debian := $(shell expr "${version_string}" : '[^-]*\(-.*\)')
+version := ${version_full}
+version_major := $(shell expr "${version_full}" : '\([0-9]*\.[0-9]*\)')
+version_minor := $(shell expr "${version_full}" : '[0-9]*\.[0-9]*\.\(.*\)')
+ifneq (, $(findstring +,${version_minor}))
+ beta_version := $(shell expr "${version_full}" : '.*+\([0-9.].*\)')
+ beta_major := $(shell expr "${beta_version}" : '\([0-9]*\.[0-9]*\)')
+ beta_minor := $(shell expr "${beta_version}" : '[0-9]*\.[0-9]*\.\(.*\)')
+ ifneq (, $(beta_version))
+ version := ${beta_version}
+ version_major := ${beta_major}
+ version_minor := ${beta_minor}
+ endif
+ endif
+
+# Many things depend upon which release (slink, potato, woody, etc.)
+PKG_DIR := ${debian_dir}/${package}
+DATA_DIR := /usr/share
+ifeq (v4, $(shell (cd ${debian_dir}/.. && dh_testversion 4.0.0 2>/dev/null && echo 'v4')))
+ DH_COMPAT := 4
+else
+ ifeq (v3, $(shell (cd ${debian_dir}/.. && dh_testversion 3.0.0 2>/dev/null && echo 'v3')))
+ DH_COMPAT := 3
+ else
+ ifeq (v2, $(shell (cd ${debian_dir}/.. && dh_testversion 2.0.40 2>/dev/null && echo 'v2')))
+ DH_COMPAT := 2
+ else
+ DH_COMPAT := 1
+ PKG_DIR := ${debian_dir}/tmp
+ DATA_DIR := /usr
+ endif
+ endif
+ endif
export DH_COMPAT
-MAN_DIR="$(TEMP_DIR)/$(MAN_PFX)"
-DOC_DIR="$(TEMP_DIR)/$(DOC_PFX)"
+# the dbs rules
+TAR_DIR := ${package}-${version}
+# Handle the case where the changelog is newer that what we're building
+ifneq (yes, $(shell test -e ${debian_dir}/../${TAR_DIR}.tar.gz && echo 'yes'))
+ TAR_DIR := ${package}-${pwd_version}
+ endif
+SOURCE_DIR := build-tree
+BUILD_TREE := ${SOURCE_DIR}/${TAR_DIR}
+PATCH_DIR := ${debian_dir}/patches/${version_major}/${version}
+SCRIPT_DIR := ${debian_dir}/scripts
+STAMP_DIR := ${debian_dir}/build/stampdir
+
+# Include Debian Autoconf settings
+ifeq (yes, $(shell test -e ${debian_dir}/build/autoconf.mk && echo 'yes'))
+ include ${debian_dir}/build/autoconf.mk
+else
+ include ${debian_dir}/build/autoconf.mk.in
+ endif
+
+# these are strictly for my own consuption
+PKG_DOC := ${debian_dir}/${package}-doc${docdir}/${package}-doc
+MAKE_SUBDIRS := examples local sensible_mda
+PACKAGES := sendmail sendmail-doc libmilter-dev
+SM_SUBDIRS := editmap libmilter mail.local mailstats \
+ makemap praliases rmail sendmail smrsh vacation
+#
+# We want delayed interpretation of the options !
+ifeq (yes, $(shell test -x /usr/bin/debuild && echo 'yes'))
+ DEB_BUILD = \
+ SM_CONF_OPT="${SM_CONF_OPT}" \
+ SM_BUILD_OPT="${SM_BUILD_OPT}" \
+ DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
+ debuild -e SM_CONF_OPT -e SM_BUILD_OPT
+else
+ DEB_BUILD = \
+ SM_CONF_OPT="${SM_CONF_OPT}" \
+ SM_BUILD_OPT="${SM_BUILD_OPT}" \
+ DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
+ dpkg-buildpackage
+ endif
+
+# Process build-time options:
+# 1) options from SM_BUILD_OPT (Prior to configure)
+# 2) defaults (Prior to configure)
+ENABLE_INDEP := yes
+ENABLE_ARCH := yes
+ENABLE_LIB := no
+ENABLE_BIN := yes
+ifneq (, $(findstring notls,${SM_BUILD_OPT}))
+ ENABLE_TLS := no
+else
+ ENABLE_TLS := yes
+ endif
+ifneq (, $(findstring noauth,${SM_BUILD_OPT}))
+ ENABLE_AUTH := no
+else
+ ENABLE_AUTH := yes
+ endif
+ifneq (, $(findstring nodev,${SM_BUILD_OPT}))
+ ENABLE_DEV := no
+else
+ ENABLE_DEV := yes
+ endif
+ifneq (, $(findstring nodoc,${SM_BUILD_OPT}))
+ ENABLE_DOC := no
+else
+ ENABLE_DOC := yes
+ endif
+#
+# Summarize above options into -INDEP and -ARCH for this Makefile
+ENABLE_INDEP := ${ENABLE_DOC}
+ifeq (no, ${ENABLE_BIN})
+ ifeq (no, ${ENABLE_LIB})
+ ifeq (no, ${ENABLE_DEV})
+ ENABLE_ARCH := no
+ endif
+ endif
+ endif
+
+all:
+ @echo 'Please specify a real target in the future...';
+ $(MAKE) -f ${debian_dir}/rules \
+ version_string=${pwd_string} \
+ SM_CONF_OPT="${SM_CONF_OPT}" SM_BUILD_OPT="${SM_BUILD_OPT}" \
+ DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
+ binary;
+
+#------------------------------------------------------------------------------
+# Rules to maintain the external Debian directory
+#------------------------------------------------------------------------------
+#-------------
+refresh-dbs:
+ @echo 'updating debian/scripts directory...';
+ cp -af /usr/share/dbs/* ${SCRIPT_DIR}/;
+ chmod a-w ${SCRIPT_DIR}/*;
+
+#-------------
+refresh-debian:
+ @dh_testdir;
+ @echo 'updating debian directory ...';
+ sudo $(RM) -r debian;
+ cp -a ../debian ./;
+ sudo $(RM) -r ${SOURCE_DIR} ${STAMP_DIR};
+ rm -f ${debian_dir}/config.status;
+ touch ${debian_dir}/rules;
+ $(MAKE) -f ${debian_dir}/rules \
+ version_string=${pwd_string} \
+ SM_CONF_OPT="${SM_CONF_OPT}" SM_BUILD_OPT="${SM_BUILD_OPT}" \
+ DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
+ debian-setup;
+
+debian-setup:
+ # Force a configure here, using $${PWD} so the changelog, etc.
+ # wind up with the right version numbers
+ rm -f ${debian_dir}/configure ${debian_dir}/config.status;
+ rm -f ${debian_dir}/build/autoconf.mk;
+ $(MAKE) -f ${debian_dir}/rules \
+ version_string=${pwd_string} \
+ SM_CONF_OPT="${SM_CONF_OPT}" SM_BUILD_OPT="${SM_BUILD_OPT}" \
+ DEB_BUILD_OPTIONS="${DEB_BUILD_OPTIONS}" \
+ configure;
+ $(MAKE) -f ${debian_dir}/rules clean-debian;
+
+ # Remove pieces not needed for further building
+ find ${debian_dir}/patches -type d -a ! -name 'patches' \
+ -a ! -name 'contrib' \
+ -a ! -name "${pwd_major}" \
+ -a ! -name "${pwd_version}" \
+ | xargs -r $(RM) -r;
+ $(RM) -r ${debian_dir}/bugs ${debian_dir}/private ${debian_dir}/watch;
+ $(RM) ${debian_dir}/build/acinclude.m4 \
+ ${debian_dir}/build/aclocal.m4 \
+ ${debian_dir}/build/sendmail.m4 \
+ ${debian_dir}/build/ndbm.m4 \
+ ${debian_dir}/config.log ${debian_dir}/config.cache \
+ ${debian_dir}/config.status \
+ ${debian_dir}/build/config.guess ${debian_dir}/build/config.sub;
+ $(RM) -r ${debian_dir}/autom4te.cache;
+ # Fakeout Make to look like current
+ $(RM) ${debian_dir}/configure.ac;
+ echo `date` > ${debian_dir}/configure.ac;
+ touch ${debian_dir}/configure;
+ touch ${debian_dir}/rules;
+
+
+#-------------
+clean-debian:
+ @echo 'cleaning debian directory...';
+ find ${debian_dir} -name '*~' -o -name '\.*\.swp' \
+ | xargs -r rm;
+ $(RM) ${debian_dir}/*.sav;
+ $(RM) ${debian_dir}/config.log ${debian_dir}/config.cache \
+ ${debian_dir}/config.status \
+ ${debian_dir}/build/config.guess.sav \
+ ${debian_dir}/build/config.sub.sav;
+ $(RM) -r ${debian_dir}/autom4te.cache;
+ # can't touch control/changelog/configure -- needed by debuild, etc
+ for file in $$(find ${debian_dir} -type f -name '*\.in' \
+ -a ! -name 'configure.in'); do \
+ $(RM) $$(echo "$$file" | sed -e 's/\.in$$//'); \
+ done;
+ $(RM) ${STAMP_DIR}/autotools ${STAMP_DIR}/configure;
+
+#-------------
+refresh-faq:
+ @echo 'Refreshing FAQ'
+ @chmod u+w ${debian_dir}/faq.txt;
+ (cd ${debian_dir} && wget --passive-ftp --timestamping \
+ --cache=off http://www.sendmail.org/faq/faq.txt;);
+ @chmod a-w ${debian_dir}/faq.txt;
+ @echo 'Refreshing Misc'
+ @chmod u+w ${debian_dir}/cf/feature/rhsbl.m4;
+ (cd ${debian_dir}/cf/feature && wget --passive-ftp --timestamping \
+ --cache=off http://www.rfc-ignorant.org/rhsbl.m4;);
+ @chmod u-w ${debian_dir}/cf/feature/rhsbl.m4;
+
+
+#-------------
+world:
+ # Debian build daemons don't (for the nonce) support build-indep,
+ # so this rule allows *me* to build both arch and indep portions
+ # of sendmail in one go (so I don't forget).
+ @dh_testdir;
+ $(MAKE) -f ${debian_dir}/rules info;
+ time ${DEB_BUILD} -rfakeroot
+
+test:
+ @dh_testdir;
+ $(MAKE) -f ${debian_dir}/rules clean-debian;
+ fakeroot $(MAKE) -f ${debian_dir}/rules clean;
+ $(MAKE) -f ${debian_dir}/rules \
+ ENABLE_TLS=yes ENABLE_DEV=no ENABLE_DOC=no \
+ CFLAGS='-O2 -Wall' DEB_BUILD_OPTIONS='nostrip' configure;
+ #time ${DEB_BUILD} -rfakeroot -d -us -uc;
+ time $(MAKE) -f ${debian_dir}/rules build-arch;
+
+print:
+ @dh_testdir;
+ -(cd ${BUILD_TREE}/.. && \
+ for file in `find . -name 'README'`; do \
+ lpr $$file; \
+ done; );
+ -(cd ${BUILD_TREE}/.. && \
+ lpr */KNOWNBUGS; \
+ lpr */RELEASE_NOTES; \
+ lpr */sendmail/SECURITY; \
+ lpr */sendmail/TUNING; \
+ lpr */sendmail/TRACEFLAGS; \
+ lpr */doc/op/op.ps; \
+ lpr */cf/feature/nullclient.m4; \
+ lpr */cf/feature/msp.m4; \
+ );
+ -(cd ${debian_dir} && \
+ lpr ../../${debian_dir}/configure.ac; \
+ lpr ../../${debian_dir}/build/rules.in; \
+ lpr build/site.config.m4.in; \
+ lpr cf/hack/msp_nullclient.m4; \
+ );
+
+
+#------------------------------------------------------------------------------
+# Misc rules
+#------------------------------------------------------------------------------
+#-------------
+${STAMP_DIR}:
+ mkdir -p ${STAMP_DIR};
+
+
+#------------------------------------------------------------------------------
+# Autoconf rules
+#------------------------------------------------------------------------------
+#-------------
+${debian_dir}/rules: ${debian_dir}/build/rules.in ${debian_dir}/config.status
+ # *** *** *** configure changed ?!? *** *** ***
+ if [ -e ${debian_dir}/config.status ]; then \
+ chmod ug+x ${debian_dir}/config.status; \
+ (cd ${debian_dir} && ./config.status;); \
+ fi;
+
+#-------------
+${debian_dir}/config.status: ${debian_dir}/configure
+ # *** *** *** configure changed ?!? *** *** ***
+ if [ -e ${debian_dir}/config.status ]; then \
+ chmod ug+x ${debian_dir}/config.status; \
+ (cd ${debian_dir} && ./config.status --recheck;) \
+ fi;
+
+#-------------
+${debian_dir}/configure: ${debian_dir}/configure.ac
+ # *** *** *** configure.ac changed ?!? *** *** ***
+ cp -af ${debian_dir}/configure.ac \
+ ${debian_dir}/configure.in;
+ (cd ${debian_dir} && autoconf;);
+ $(RM) ${debian_dir}/configure.in;
+ chmod ug+x ${debian_dir}/configure;
+
+#-------------
+autotools: ${STAMP_DIR} ${STAMP_DIR}/autotools
+${STAMP_DIR}/autotools:
+
+ #Add here commands to setup the autotools environment
+
+ # Make sure we have the latest available config.{guess,sub}
+ # Allow the package to override either by faking the date...
+ if [ -e /usr/share/misc/config.guess -a \
+ -e ${debian_dir}/build/config.guess ]; then \
+ OLDDATEGUESS=`${debian_dir}/build/config.guess -t | tr -d - `; \
+ NEWDATEGUESS=`/usr/share/misc/config.guess -t | tr -d - `; \
+ if [ "$$OLDDATEGUESS" -lt "$$NEWDATEGUESS" ]; then \
+ if [ ! -e ${debian_dir}/build/config.guess.sav ]; then \
+ cp -pf ${debian_dir}/build/config.guess \
+ ${debian_dir}/build/config.guess.sav;\
+ fi; \
+ if [ -e ${debian_dir}/build/config.guess.sav ]; then \
+ cp -pf /usr/share/misc/config.guess \
+ ${debian_dir}/build/config.guess; \
+ fi; \
+ fi; \
+ fi;
+ if [ -e /usr/share/misc/config.sub -a \
+ -e ${debian_dir}/build/config.sub ]; then \
+ OLDDATESUB=`${debian_dir}/build/config.sub -t | tr -d - `; \
+ NEWDATESUB=`/usr/share/misc/config.sub -t | tr -d - `; \
+ if [ "$$OLDDATESUB" -lt "$$NEWDATESUB" ]; then \
+ if [ ! -e ${debian_dir}/build/config.sub.sav ]; then \
+ cp -pf ${debian_dir}/build/config.sub \
+ ${debian_dir}/build/config.sub.sav; \
+ fi; \
+ if [ -e ${debian_dir}/build/config.sub.sav ]; then \
+ cp -pf /usr/share/misc/config.sub \
+ ${debian_dir}/build/config.sub; \
+ fi; \
+ fi; \
+ fi;
+
+ touch ${STAMP_DIR}/autotools;
+
+
+
+#------------------------------------------------------------------------------
+# Build/Package check rules
+#------------------------------------------------------------------------------
#-------------
info:
#--------------------------------------------------------------------
# The following information will be used for this run:
- # Package = $(package)
- # version = $(version)
- # DH_VERBOSE = $(DH_VERBOSE)
- # DH_OPTIONS = $(DH_OPTIONS)
- # DH_COMPAT = $(DH_COMPAT)
- # TEMP_DIR = $(TEMP_DIR)
- # MAN_PFX = $(MAN_PFX)
- # DOC_PFX = $(DOC_PFX)
+ # Source = ${package} ${pwd_string}
+ # Package = ${package} ${version_string}
+ # Version = ${version_major}.${version_minor}${version_debian}
+ # Arch = ${DEB_BUILD_ARCH} on ${DEB_HOST_ARCH}
+ # Options
+ # config opt = ${SM_CONF_OPT}
+ # build opt = ${SM_BUILD_OPT}
+ # ENABLE_TLS = ${ENABLE_TLS}
+ # ENABLUE_AUTH= ${ENABLE_AUTH}
+ # ENABLE_DEV = ${ENABLE_DEV}
+ # ENABLE_DOC = ${ENABLE_DOC}
+ # compile opt = ${CC} ${CFLAGS} ${DEFINES}
+ # DEB_BUILD_OPTIONS = ${DEB_BUILD_OPTIONS}
+ # DH_VERBOSE = ${DH_VERBOSE}
+ # DH_OPTIONS = ${DH_OPTIONS}
+ # DH_COMPAT = ${DH_COMPAT}
#--------------------------------------------------------------------
-
#-------------
-setup: setup-stamp
-setup-stamp: info
-
- # Mark some files executable, dpkg-source -x undoes me here...
- chmod a+x \
- debian/rules \
- debian/local/configure \
- debian/local/sendmailconfig \
- debian/local/updatedb \
- debian/local/parsemc
+buildinfo:
+ @echo '';
+ @dpkg -l \
+ debhelper \
+ dpkg-dev \
+ gcc \
+ 'libc6*' \
+ binutils \
+ ldso \
+ make \
+ m4 \
+ libdb3 libdb3-dev \
+ libdb2 libdb2-dev \
+ libwrap0 libwrap0-dev \
+ libldap2 libldap2-dev \
+ libopenldap1 libopenldap-dev \
+ umich-libldap umich-libldap-dev \
+ libsasl7 libsasl-dev \
+ openssl libssl-dev 'libssl0*' \
+ ${BUILD_INFO} \
+ 2> /dev/null \
+ | awk '$$1 == "ii" { printf("%s-%s\n", $$2, $$3) }' \
+ | tee ${debian_dir}/${package}.buildinfo.Debian;
+ @echo '';
+ @chmod 644 ${debian_dir}/${package}.buildinfo.Debian;
- # Create proper debian/$(package).dirs file
- # This way, we can build for either slink or potato
- sed "s?MAN_PFX?$(MAN_PFX)?g" \
- debian/$(package).dirs.template \
- | sed "s?\DOC_PFX?$(DOC_PFX)?g" \
- > debian/$(package).dirs
+#-------------
+pristine:
+ @dh_testdir;
+ #$(MAKE) -f ${debian_dir}/rules info;
+ #
+ # Fail if there are any modifications to the original
+ # tarball, other than the debian directory
+ if [ -f ../${package}_${version_string}.diff.gz ]; then \
+ zgrep -e "^\+\+\+ " ../${package}_${version_string}.diff.gz \
+ | sed -e "/^\+\+\+ ${package}-${version}\/debian\/.*$$/d" - \
+ | sed -e "/^+\+\+ ${package}-${version}\/upstream\/patches\/.*$$/d" - \
+ | [ ! -z - ]; \
+ fi;
- # Use autoconf for some Slink/Potato differences
- #cd debian/local && autoconf
- cd debian/local && ./configure
+ # Check for presence of TLS (crypto) enablement and bitch if found
+ @if (grep -qEe '^#TLS:[[:space:]]*yes' \
+ ${debian_dir}/build/site.config.m4); then \
+ echo '** ** --------------------------------------------------- ** **';\
+ echo '** ** This package contains crypto support ! Be careful ! ** **';\
+ echo '** ** --------------------------------------------------- ** **';\
+ fi;
- touch setup-stamp
+#-------------
+verify:
+ @dh_testdir;
+ # Verifying the md5 summs and signed files
+ @for file in $$(find . -maxdepth 1 -name '*.md5'); do \
+ echo "Checking MD5 source: $$file."; \
+ cat $$file; \
+ md5sum -c $$file; \
+ done;
+ @for file in $$(find . -maxdepth 1 -name '*.sig'); do \
+ echo "Checking signature file $$file."; \
+ part=$$(echo "$$file" | sed -e 's/\.sig$$//'); \
+ if [ -f $$part ]; then \
+ gpg --verify $$part.sig $$part || true; \
+ elif [ -f $$part.gz ]; then \
+ gunzip -c $$part.gz > $$part; \
+ gpg --verify $$part.sig $$part || true; \
+ rm $$part; \
+ fi; \
+ done;
+#------------------------------------------------------------------------------
+# User callable rules
+#------------------------------------------------------------------------------
#-------------
clean:
- dh_testdir
- dh_testroot
- rm -f setup-stamp build-stamp install-stamp
+ dh_testdir;
+ dh_testroot;
# Add here commands to clean up after the build process.
- #-$(MAKE) clean
- #-$(MAKE) distclean
-
- # First, remove any patches
- if [ -f patch-stamp ]; then $(MAKE) -f debian/rules unpatch; fi
+ #-$(MAKE) clean;
+ #-$(MAKE) distclean;
- # Finally, clean the whole enchilada
- #-$(MAKE) clean -S
+ # First, remove any patches, and source directories
+ #$(MAKE) -f ${debian_dir}/sys-build.mk source.clean;
# Debian stuff
- rm -f debian/check.tar debian/local/sensible-mda
- rm -f debian/local/site.config.m4
- rm -f debian/local/config.*
- rm -rf debian/tmp debian/$(package)
+ $(RM) -r ${SOURCE_DIR} ${STAMP_DIR};
+ $(RM) ${debian_dir}/*.buildinfo.Debian;
+ for file in tmp ${PACKAGES};do \
+ $(RM) -r ${debian_dir}/$$file; \
+ done;
- # Local approximation of distclean
- for file in \
- mail.local mailstats makemap praliases rmail smrsh src; do \
- rm -rf $$(find . -name "obj*" -type d); \
- done;
+ # Local stuff
+ for subdir in ${MAKE_SUBDIRS}; do \
+ (cd ${debian_dir}/$$subdir && $(MAKE) -f Makefile.in clean;); \
+ done;
+
+ifeq (3, $(shell test ${DH_COMPAT} -ge 3 && echo '3'))
+ # Debhelper V3 conffile handling - prevent duplicates
+ for file in $$(find ${debian_dir} -maxdepth 1 -type f \
+ -name '*\.conffiles\.sav'); do \
+ mv $$file $$(echo "$$file" | sed -e 's?\.sav$$??'); \
+ done;
+endif
+
+ # can't touch control/changelog/configure -- needed by debuild, etc
+ $(RM) ${debian_dir}/config.log ${debian_dir}/config.cache \
+ ${debian_dir}/config.status;
+ $(RM) -r ${debian_dir}/autom4te.cache
+ for file in $$(find ${debian_dir} -type f -name '*\.in' \
+ -a ! -name 'configure.in'); do \
+ $(RM) $$(echo "$$file" | sed -e 's/\.in$$//'); \
+ done;
+
+ # Restore pre-existing config.{guess,sub}
+ -if [ -e ${debian_dir}/buil/config.sub.sav ]; then \
+ cp -pf ${debian_dir}/build/config.sub.sav \
+ ${debian_dir}/build/config.sub \
+ && $(RM) ${debian_dir}/build/config.sub.sav; \
+ fi;
+ -if [ -e ${debian_dir}/build/config.guess.sav ]; then \
+ cp -pf ${debian_dir}/build/config.guess.sav \
+ ${debian_dir}/build/config.guess \
+ && $(RM) ${debian_dir}/build/config.guess.sav; \
+ fi;
# Cleanup after build (for pristine source, smaller diffs)
- #find .. -name $(package)*.asc -size 0 -maxdepth 1 -exec rm {} ";"
+ #find .. -name ${package}*.asc -size 0 -maxdepth 1 -exec rm {} ';';
+ dh_clean;
- dh_clean
#-------------
-build: build-stamp
-build-stamp: setup-stamp
- dh_testdir
+setup: ${STAMP_DIR}/setup
+${STAMP_DIR}/setup:
+
+# Support separate debian directory
+ifeq (yes, $(shell test -d debian && echo 'yes'))
+ dh_testdir;
+
+ # unpack and patch source
+ $(MAKE) -f ${SCRIPT_DIR}/dbs-build.mk \
+ BUILD_TREE="${BUILD_TREE}" TAR_DIR="${TAR_DIR}" \
+ STAMP_DIR="${STAMP_DIR}" PATCH_DIR="${PATCH_DIR}" \
+ SCRIPT_DIR="${SCRIPT_DIR}" \
+ ${STAMP_DIR}/unpack ${STAMP_DIR}/patch;
+
+ touch ${STAMP_DIR}/setup;
+endif
+
+
+#-------------
+configure: ${STAMP_DIR}/configure
+${STAMP_DIR}/configure: ${STAMP_DIR}/setup ${STAMP_DIR}/autotools
+
+ $(MAKE) -f ${debian_dir}/rules info;
+
+ #Add here commands to configure the package.
+ #./configure --prefix=/usr
+
+ # Use autoconf to handle varying degrees of library support
+ # NOTE: options values are Yes/No/Auto, but auto isn't always
+ # used herein, as it can cause problems to be ignored
+ # so it is only used on items of lesser importance
+ chmod ug+x ${debian_dir}/configure;
+ (cd ${debian_dir} && \
+ ./configure \
+ --build=${DEB_BUILD_GNU_TYPE} \
+ --host=${DEB_HOST_GNU_TYPE} \
+ --prefix=/usr \
+ --libexecdir=/usr/lib/sm.bin \
+ --datadir=${DATA_DIR} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=${DATA_DIR}/info \
+ --mandir=${DATA_DIR}/man \
+ --srcdir=${pwd_dir}/debian \
+ --with-buildtree=${BUILD_TREE} \
+ --with-docdir=${DATA_DIR}/doc \
+ --with-revision=${version_debian} \
+ --enable-regex=auto \
+ --enable-ndbm=no \
+ --enable-newdb=yes \
+ --enable-nis=auto \
+ --enable-nisplus=auto \
+ --enable-ldap=yes \
+ --enable-hesiod=no \
+ --enable-tcpd=auto \
+ --enable-bind=no \
+ --enable-ipv6=auto \
+ --enable-maillock=yes \
+ --enable-auth=${ENABLE_AUTH} \
+ --enable-tls=${ENABLE_TLS} \
+ --enable-shm=auto \
+ --enable-doc=${ENABLE_DOC} \
+ --enable-dev=${ENABLE_DEV} \
+ ${SM_CONF_OPT} \
+ ;);
+ # CC="${CC}" CFLAGS="${CFLAGS}
+
+ifeq (3, $(shell test ${DH_COMPAT} -ge 3 && echo '3'))
+ # Debhelper V3 conffile handling - prevent duplicates
+ for file in $$(find ${debian_dir} -maxdepth 1 -type f \
+ -name '*.conffiles'); do \
+ mv $$file $$file.sav; \
+ done;
+endif
+
+ touch ${STAMP_DIR}/configure;
+
+
+#-------------
+build-indep: ${STAMP_DIR}/build-indep
+${STAMP_DIR}/build-indep: ${STAMP_DIR}/configure
+
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_INDEP})
+ dh_testdir;
+
+ # Document what we're building against
+ $(MAKE) -f ${debian_dir}/rules buildinfo;
+
+ # Add here commands to build/compile the documentation/package.
+ #$(MAKE) doc;
+
+ # Only valid on newer (8.11+) Sendmails
+ #(cd ${BUILD_TREE}/doc/op/ && make op.txt);
+ # So we'll do it by hand...
+ $(RM) ${BUILD_TREE}/doc/op/op.txt;
+ pic -C ${BUILD_TREE}/doc/op/op.me | eqn -C -Tascii \
+ | GROFF_NO_SGR=1 groff -Tascii -me | ul -t dumb > ${BUILD_TREE}/doc/op/op.txt;
+
+ # Debian stuff
+ for subdir in ${MAKE_SUBDIRS}; do \
+ (cd ${debian_dir}/$$subdir && $(MAKE) build-indep;); \
+ done;
+endif
+
+ touch ${STAMP_DIR}/build-indep;
+
+
+#-------------
+build-arch: ${STAMP_DIR}/build-arch
+${STAMP_DIR}/build-arch: ${STAMP_DIR}/configure
+
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_ARCH})
+ dh_testdir;
+
+ # Document what we're building against
+ $(MAKE) -f ${debian_dir}/rules buildinfo;
# Add here commands to compile the package.
- #$(MAKE)
-
- # First, install any patches
- if [ ! -f patch-stamp ]; then $(MAKE) -f debian/rules patch; fi
-
- # Finally, build the whole enchilada
- cd mail.local && ./Build -f ../debian/local/site.config.m4 \
- LIBS=""
- cd mailstats && ./Build -f ../debian/local/site.config.m4 \
- LIBS=""
- cd makemap && ./Build -f ../debian/local/site.config.m4 \
- LIBS="-ldb"
- cd praliases && ./Build -f ../debian/local/site.config.m4 \
- LIBS="-ldb"
- cd rmail && ./Build -f ../debian/local/site.config.m4 \
- LIBS=""
- cd smrsh && ./Build -f ../debian/local/site.config.m4 \
- LIBS=""
- cd src && ./Build -f ../debian/local/site.config.m4 \
- LIBS="-ldb -lwrap -lnsl -lresolv"
- # LIBS="-ldb2 -lwrap -lnsl -lresolv -lldap -llber-openldap"
- # MAPDEF="-DNEWDB -DMAP_REGEX -DLDAPMAP $(DNIS_DEF)"
+ #$(MAKE);
+
+ # Place our m4 configuration files for the sendmail build to use
+ if [ -d ${BUILD_TREE}/devtools/Site ]; then \
+ cp -f ${debian_dir}/build/site.config.m4 ${BUILD_TREE}/devtools/Site/; \
+ fi;
+
+ # Correct some paths in upstream man pages
+ sed -e "s?/usr/adm/sm.bin?${sysconfdir}/mail/smrsh?g" \
+ -e "s?sm.bin?${sysconfdir}/mail/smrsh?g" \
+ ${BUILD_TREE}/smrsh/smrsh.8 \
+ > ${BUILD_TREE}/smrsh/smrsh.8.new;
+ mv ${BUILD_TREE}/smrsh/smrsh.8.new ${BUILD_TREE}/smrsh/smrsh.8;
+ sed -e "s?/etc/mail/statistics?${localstatedir}/lib/sendmail/sendmail.st?g"\
+ ${BUILD_TREE}/sendmail/sendmail.8 \
+ > ${BUILD_TREE}/sendmail/sendmail.8.new;
+ mv ${BUILD_TREE}/sendmail/sendmail.8.new \
+ ${BUILD_TREE}/sendmail/sendmail.8;
+
+ # Finally, build the whole enchilada (we'll let sendmail figure
+ # which, if any of the dependant libraries each component needs)
+ for subdir in ${SM_SUBDIRS}; do \
+ if [ -d ${BUILD_TREE}/$${subdir} ]; then \
+ (cd ${BUILD_TREE}/$${subdir} && ./Build -S;); \
+ fi; \
+ done;
+
+ # Remove our config m4 files
+ $(RM) ${BUILD_TREE}/devtools/Site/site.config.m4;
# Debian stuff
- cd debian/local && gcc -O2 -o sensible-mda sensible-mda.c
+ for subdir in ${MAKE_SUBDIRS}; do \
+ (cd ${debian_dir}/$$subdir && $(MAKE) build-arch;); \
+ done;
+endif
- # Cleanup after build (for pristine source, smaller diffs)
- # None - Must leave patches to prevent rebuilds
+ touch ${STAMP_DIR}/build-arch;
- touch build-stamp
#-------------
-install: DH_OPTIONS=
-install: build
- dh_testdir
- dh_testroot
- #dh_clean -k
- dh_clean
+install-indep: ${STAMP_DIR}/install-indep
+${STAMP_DIR}/install-indep: DH_OPTIONS=-i
+${STAMP_DIR}/install-indep: ${STAMP_DIR}/build-indep
- dh_installdirs
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_INDEP})
+ dh_testdir;
+ dh_testroot;
+ dh_clean -k;
+ dh_installdirs;
+ if [ -x /usr/bin/dh_link ]; then dh_link; fi;
- # Add here commands to install the package into $(TEMP_DIR).
- #$(MAKE) prefix=`pwd`/$(TEMP_DIR)/usr install
+ # Add here commands to install the documentation/package.
+ #$(MAKE) prefix=`pwd`/${PKG_DIR}/usr install;
- # sendmail install proper... with a little help ;-}
- #$(MAKE) install DESTDIR="$$(pwd)/$(TEMP_DIR)"
- cd mail.local/obj* && $(MAKE) force-install \
- DESTDIR="../../$(TEMP_DIR)"
- cd mailstats/obj* && $(MAKE) install \
- DESTDIR="../../$(TEMP_DIR)"
- cd makemap/obj* && $(MAKE) install \
- DESTDIR="../../$(TEMP_DIR)"
- cd praliases/obj* && $(MAKE) install \
- DESTDIR="../../$(TEMP_DIR)"
- cd rmail/obj* && $(MAKE) force-install \
- DESTDIR="../../$(TEMP_DIR)"
- cd smrsh/obj* && $(MAKE) install \
- DESTDIR="../../$(TEMP_DIR)"
- cd src/obj* && $(MAKE) install \
- DESTDIR="../../$(TEMP_DIR)"
-
- # correct what the m4 build process did...
- mv $(TEMP_DIR)/usr/bin/rmail $(TEMP_DIR)/usr/sbin/rmail
- #ln -sf ../sbin/rmail $(TEMP_DIR)/usr/bin/rmail
- rm -f $(TEMP_DIR)/var/lib/sendmail/sendmail.st
- chown root.mail $(TEMP_DIR)/usr/share/sendmail/sendmail.hf
- # NOTE: whilst smptd is a valid alias for sendmail, we don't create
- # one so that we can co-exists with smtpd (a firewall frontend)
- # NOTE: newscache package also contains /usr/sbin/hoststat
- cd $(TEMP_DIR)/usr/bin && \
- rm -f hoststat mailq newaliases purgestat smtpd
- for file in \
- $(TEMP_DIR)/usr/bin/mailq \
- $(TEMP_DIR)/usr/lib/sendmail; do \
- ln -sf ../sbin/sendmail $$file; \
+ # sendmail operations guide and other documentation
+ $(INSTALL_DATA) ${BUILD_TREE}/doc/op/op.ps ${PKG_DOC}/op;
+ $(INSTALL_DATA) ${BUILD_TREE}/doc/op/op.txt ${PKG_DOC}/op;
+ $(INSTALL_DATA) ${BUILD_TREE}/README ${PKG_DOC}/;
+ $(INSTALL_DATA) ${BUILD_TREE}/KNOWNBUGS ${PKG_DOC}/;
+ $(INSTALL_DATA) ${BUILD_TREE}/cf/README ${PKG_DOC}/cf.README;
+ $(INSTALL_DATA) debian/README.Debian.sendmail \
+ ${PKG_DOC}/sendmail/README.Debian;
+ $(INSTALL_DATA) ${BUILD_TREE}/sendmail/README \
+ ${PKG_DOC}/sendmail/;
+ if [ -f ${BUILD_TREE}/sendmail/SECURITY ]; then \
+ $(INSTALL_DATA) ${BUILD_TREE}/sendmail/SECURITY \
+ ${PKG_DOC}/sendmail/SECURITY; \
+ fi;
+ $(INSTALL_DATA) ${BUILD_TREE}/sendmail/TRACEFLAGS \
+ ${PKG_DOC}/sendmail/TRACEFLAGS;
+ if [ -f ${BUILD_TREE}/sendmail/TUNING ]; then \
+ $(INSTALL_DATA) ${BUILD_TREE}/sendmail/TUNING \
+ ${PKG_DOC}/sendmail/TUNING; \
+ fi;
+ sed -e "s?/usr/libexec?${libexecdir}?g" \
+ -e "s?/usr/ucb/vacation?${libexecdir}/vacation.sendmail?g" \
+ -e "s?/usr/adm/sm.bin?/etc/mail/smrsh?g" \
+ ${BUILD_TREE}/smrsh/README \
+ > ${PKG_DOC}/smrsh.README;
+ $(INSTALL_DATA) debian/faq.txt ${PKG_DOC}/;
+
+ # libmilter-dev package
+ if [ -d ${BUILD_TREE}/libmilter ]; then \
+ $(INSTALL_DATA) debian/README.Debian.libmilter-dev \
+ ${PKG_DOC}/libmilter/README.Debian; \
+ $(INSTALL_DATA) ${BUILD_TREE}/libmilter/README \
+ ${PKG_DOC}/libmilter/README; \
+ if [ -d ${BUILD_TREE}/libmilter/docs ]; then \
+ cp -a ${BUILD_TREE}/libmilter/docs/* \
+ ${PKG_DOC}/libmilter/html; \
+ fi; \
+ fi;
+
+ # Debian stuff
+ for subdir in ${MAKE_SUBDIRS}; do \
+ (cd ${debian_dir}/$$subdir && \
+ $(MAKE) install-indep \
+ DESTDIR="../../${PKG_DOC}";); \
done;
- # newalias, purgestat, etc. aren't for the general user...
- # yeah, yeah, I know... these can be done with -bxxx as well!
- cd $(TEMP_DIR)/usr/sbin && for file in \
- newaliases purgestat \
- ; do \
- ln -sf sendmail $$file; \
+
+ # Multiple package fixup
+ #dh_movefiles -i --sourcedir debian/${package};
+
+ # Actions from binary-common
+ #
+ dh_fixperms;
+ #
+ # Cleanup misc permissions, etc... (fakeroot, dh_fixperms, etc.)
+endif
+
+ touch ${STAMP_DIR}/install-indep;
+
+
+#-------------
+install-arch: ${STAMP_DIR}/install-arch
+${STAMP_DIR}/install-arch: DH_OPTIONS=-a
+${STAMP_DIR}/install-arch: ${STAMP_DIR}/build-arch
+
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_ARCH})
+ dh_testdir;
+ dh_testroot;
+ dh_clean -k;
+ dh_installdirs;
+ if [ -x /usr/bin/dh_link ]; then dh_link; fi;
+
+ # Add here commands to install the package into ${PKG_DIR}.
+ #$(MAKE) prefix=`pwd`/${PKG_DIR}/usr install;
+
+ # sendmail install proper... with a little help ;-}
+ #$(MAKE) install DESTDIR="$${pwd}/${PKG_DIR}";
+
+ # Finally, install the whole enchilada
+ for subdir in ${SM_SUBDIRS}; do \
+ if [ -d ${BUILD_TREE}/$${subdir} ]; then \
+ if [ "$${subdir}" = 'libmilter' ]; then \
+ :; \
+ elif [ "$${subdir}" = 'mail.local' -o \
+ "$${subdir}" = 'rmail' ]; then \
+ (cd ${BUILD_TREE}/obj*/$${subdir} && \
+ $(MAKE) force-install \
+ DESTDIR="../../../../${PKG_DIR}";); \
+ else \
+ (cd ${BUILD_TREE}/obj*/$${subdir} && \
+ $(MAKE) install \
+ DESTDIR="../../../../${PKG_DIR}";); \
+ fi; \
+ fi; \
done;
+ # Support older Sendmail (below 8.10.0)
+ if [ -f ${PKG_DIR}${sysconfdir}/mail/sendmail.hf ]; then \
+ mv -f ${PKG_DIR}${sysconfdir}/mail/sendmail.hf \
+ ${PKG_DIR}${sysconfdir}/mail/helpfile; \
+ $(RM) ${PKG_DIR}${localstatedir}/lib/sendmail/sendmail.st; \
+ fi;
- # create some usefull defaults in /usr/lib/sm.bin (for smrsh)
- cd $(TEMP_DIR)/usr/lib/sm.bin && \
- ln -sf ../../bin/procmail procmail && \
- ln -sf ../../bin/deliver deliver && \
- ln -sf ../../bin/vacation vacation
-
- # sendmail documentation
- install -pm 0444 doc/*/*.ps $(DOC_DIR)/$(package)/
- cd doc && { \
- for doc in \
- changes/changes intro/intro op/op usenix/usenix; do\
- base=$$(basename $$doc.txt); \
- test -f $$doc.txt || \
- nroff -me $$doc.me | \
- cat -s > ../$(DOC_DIR)/$(package)/$$base; \
- done; \
- }
+ # FHS says that rmail belongs in ${sbindir}
+ mv ${PKG_DIR}${bindir}/rmail ${PKG_DIR}${sbindir}/rmail;
+ # Sendmail alias handling...
+ # NOTE: whilst smptd is a valid alias for sendmail, we don't create
+ # one so that we can co-exists with smtpd (a firewall frontend)
+ # NOTE: newscache package also contains ${sbindir}/hoststat
+ # NOTE: newalias, purgestat, etc. aren't for the general user..
+ # yeah, yeah, I know... these can be done with -b<flag>!
+ (cd ${PKG_DIR}${bindir} && \
+ $(RM) hoststat mailq newaliases purgestat smtpd;)
+ ln -sf ../sbin/sendmail ${PKG_DIR}${libdir}/sendmail;
+ (cd ${PKG_DIR}${sbindir} && for file in \
+ newaliases hoststat purgestat \
+ ; do \
+ ln -sf sendmail $$file; \
+ done;);
+ # Handle man pages for these aliases
+ (cd ${PKG_DIR}${mandir}/man8 && for file in \
+ hoststat.8.gz purgestat.8.gz \
+ ; do \
+ ln -sf sendmail.8.gz $$file; \
+ done;);
+ # Place those removed aliases in ${libexecdir} (mostly for me)
+ (cd ${PKG_DIR}${libexecdir} && for file in \
+ hoststat mailq newaliases purgestat smtpd; do \
+ ln -sf ../../sbin/sendmail $$file; \
+ done;);
+ # NOTE: with the MSP/MTA split, we'll provide our own mailstats (keep orig)
+ mv ${PKG_DIR}${sbindir}/mailstats \
+ ${PKG_DIR}${libexecdir}/mailstats;
+ # Special handling of vacation - Debian has a seperate package
+ # with a different version (sigh) keep our copy just in case...
+ if [ -d ${BUILD_TREE}/vacation ]; then \
+ mv ${PKG_DIR}${bindir}/vacation \
+ ${PKG_DIR}${libexecdir}/vacation.sendmail; \
+ mv ${PKG_DIR}${mandir}/man1/vacation.1 \
+ ${PKG_DIR}${mandir}/man1/vacation.sendmail.1; \
+ fi;
# m4 configuration directories
- install -pm 0444 cf/README \
- $(DOC_DIR)/$(package)/cf.README
- cp -a cf/* $(TEMP_DIR)/usr/share/$(package)/sendmail.cf
- rm -f $(TEMP_DIR)/usr/share/$(package)/sendmail.cf/README
+ cp -a ${BUILD_TREE}/cf/* ${PKG_DIR}${datadir}/sendmail/cf;
+ $(RM) ${PKG_DIR}${datadir}/sendmail/cf/README;
+ $(RM) ${PKG_DIR}${datadir}/sendmail/cf/sendmail.schema;
+ $(RM) ${PKG_DIR}${datadir}/sendmail/cf/cf/Build;
+ $(RM) ${PKG_DIR}${datadir}/sendmail/cf/cf/Makefile;
+ $(RM) ${PKG_DIR}${datadir}/sendmail/cf/cf/*.cf;
# contributed stuff - scripts
- sed "s?/usr/local/bin/perl?/usr/bin/perl?g" contrib/etrn.pl \
- | sed "s?/etc/sendmail.cf?/etc/mail/sendmail.cf?g" \
- > $(TEMP_DIR)/usr/sbin/etrn
- chmod 0755 $(TEMP_DIR)/usr/sbin/etrn
- sed "s?/usr/local/bin/perl?/usr/bin/perl?g" contrib/expn.pl \
- > $(TEMP_DIR)/usr/bin/expn
- chmod 0755 $(TEMP_DIR)/usr/bin/expn
- sed "s?/etc/sendmail.cf?/etc/mail/sendmail.cf?g" \
+ sed -e 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ -e "s?/etc/sendmail.cf?${sysconfdir}/mail/sendmail.cf?g" \
+ ${BUILD_TREE}/contrib/etrn.pl \
+ > ${PKG_DIR}${sbindir}/etrn;
+ chmod 0755 ${PKG_DIR}${sbindir}/etrn;
+ if [ -f ${BUILD_TREE}/contrib/etrn.0 ]; then \
+ sed 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/etrn.0 \
+ > ${PKG_DIR}${mandir}/man8/etrn.8; \
+ else \
+ sed 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/etrn.pl \
+ > ${PKG_DIR}${mandir}/man8/etrn.8; \
+ fi;
+ sed -e 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/expn.pl \
+ > ${PKG_DIR}${bindir}/expn;
+ chmod 0755 ${PKG_DIR}${bindir}/expn;
+ sed 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/expn.pl \
+ > ${PKG_DIR}${mandir}/man8/expn.8;
+ sed -e "s?/etc/sendmail.cf?${sysconfdir}/mail/sendmail.cf?g" \
debian/checksendmail/checksendmail.perl \
- > $(TEMP_DIR)/usr/sbin/checksendmail
- chmod 0755 $(TEMP_DIR)/usr/sbin/checksendmail
- # contributed stuff - man
- sed "s?/usr/local/bin/perl?/usr/bin/perl?g" contrib/etrn.pl \
- > $(MAN_DIR)/man8/etrn.8
- sed "s?/usr/local/bin/perl?/usr/bin/perl?g" contrib/expn.pl \
- > $(MAN_DIR)/man8/expn.8
- install -p debian/checksendmail/checksendmail.8 \
- $(MAN_DIR)/man8/
- # contributed stuff - examples
- sed "s?/bin/perl?/usr/bin/perl?g" contrib/passwd-to-alias.pl \
- > $(DOC_DIR)/$(package)/examples/passwd-to-alias
- chmod 0755 $(DOC_DIR)/$(package)/examples/passwd-to-alias
-
- # Debian stuff - binaries
- install -pm 0755 debian/local/sendmailconfig $(TEMP_DIR)/usr/sbin
- install -pm 0755 debian/local/runq $(TEMP_DIR)/usr/sbin
- install -pm 0755 debian/local/sensible-mda $(TEMP_DIR)/usr/lib/sm.bin
- # Debian stuff - scripts
- install -pm 0755 debian/local/parsemc $(TEMP_DIR)/usr/share/sendmail
- install -pm 0755 debian/local/updatedb $(TEMP_DIR)/usr/share/sendmail
- install -pm 0755 debian/local/ip-up.d \
- $(TEMP_DIR)/etc/ppp/ip-up.d/sendmail
- install -pm 0755 debian/local/ip-down.d \
- $(TEMP_DIR)/etc/ppp/ip-down.d/sendmail
- # Debian stuff - config files
- install -pm 0660 -g mail debian/local/service.switch* \
- $(TEMP_DIR)/etc/mail/
- # Debian stuff - m4
- cp -a debian/cf/* $(TEMP_DIR)/usr/share/$(package)/sendmail.cf
- install -pm 0660 -g mail debian/local/provider \
- $(TEMP_DIR)/etc/mail/peers/provider
-
- #$(MAKE) -f debian/rules hacks
-
- # Not quite debhelper v2 compliant yet
- #dh_movefiles
+ > ${PKG_DIR}${sbindir}/checksendmail;
+ chmod 0755 ${PKG_DIR}${sbindir}/checksendmail;
+ $(INSTALL_DATA) debian/checksendmail/checksendmail.8 \
+ ${PKG_DIR}${mandir}/man8/;
+ sed -e 's?/usr/local/bin/perl?/usr/bin/perl?g' \
+ -e 's?/usr/sbin/sendmail -q30m -bd?/etc/init.d/sendmail start?g' \
+ ${BUILD_TREE}/contrib/smcontrol.pl \
+ > ${PKG_DIR}${datadir}/sendmail/smcontrol.pl;
+ chmod 0755 ${PKG_DIR}${datadir}/sendmail/smcontrol.pl;
+ $(INSTALL_SCRIPT) ${BUILD_TREE}/contrib/doublebounce.pl \
+ ${PKG_DIR}${datadir}/sendmail;
+ if [ -f ${BUILD_TREE}/contrib/qtool.pl ]; then \
+ sed -e 's?/usr/bin/env perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/qtool.pl \
+ > ${PKG_DIR}${datadir}/sendmail/qtool.pl; \
+ chmod 0755 ${PKG_DIR}${datadir}/sendmail/qtool.pl; \
+ $(INSTALL_DATA) ${BUILD_TREE}/contrib/qtool.8 \
+ ${PKG_DIR}${mandir}/man8/; \
+ fi;
+ if [ -f ${BUILD_TREE}/contrib/buildvirtuser ]; then \
+ $(INSTALL_SCRIPT) ${BUILD_TREE}/contrib/buildvirtuser \
+ ${PKG_DIR}${datadir}/sendmail/; \
+ fi;
- # Cleanup after build (for pristine source, smaller diffs)
- $(MAKE) -f debian/rules unpatch
+ # contributed stuff - examples
+ sed 's?/bin/perl?/usr/bin/perl?g' \
+ ${BUILD_TREE}/contrib/passwd-to-alias.pl \
+ > ${PKG_DIR}${datadir}/sendmail/examples/passwd-to-alias;
+ chmod 0755 ${PKG_DIR}${datadir}/sendmail/examples/passwd-to-alias;
+
+ # contributed stuff - m4 scripts
+ if [ -f ${BUILD_TREE}/contrib/domainmap.m4 ]; then \
+ $(INSTALL_DATA) ${BUILD_TREE}/contrib/domainmap.m4 \
+ ${PKG_DIR}${datadir}/sendmail/cf/feature; \
+ fi;
+ if [ -f ${BUILD_TREE}/contrib/dnsblaccess.m4 ]; then \
+ $(INSTALL_DATA) ${BUILD_TREE}/contrib/dnsblaccess.m4 \
+ ${PKG_DIR}${datadir}/sendmail/cf/hack; \
+ fi;
+
+ # Debian stuff
+ for subdir in ${MAKE_SUBDIRS}; do \
+ (cd ${debian_dir}/$$subdir && \
+ $(MAKE) install-arch \
+ DESTDIR="../../${PKG_DIR}";); \
+ done;
+ # Debian stuff - m4 scripts
+ (cd debian && \
+ for file in $$(find cf -type f -name '*.m4' -o -name '*.mc'); do \
+ $(INSTALL_DATA) $$file \
+ ../${PKG_DIR}${datadir}/sendmail/$$file; \
+ done;);
+ # Debian stuff - examples
+ $(INSTALL_DATA) debian/checksendmail/address.resolve \
+ ${PKG_DIR}${datadir}/sendmail/examples/;
+
+ # libmilter-dev package
+ifeq (yes, ${ENABLE_DEV})
+ if [ -d ${BUILD_TREE}/libmilter ]; then \
+ (cd ${BUILD_TREE}/obj*/libmilter && \
+ $(MAKE) install \
+ DESTDIR="../../../../debian/libmilter-dev";); \
+ $(INSTALL_PROGRAM) ${BUILD_TREE}/obj.*/libmilter/libmilter.a \
+ debian/libmilter-dev${libdir}/libmilter/; \
+ $(INSTALL_DATA) ${BUILD_TREE}/include/libmilter/mfapi.h \
+ debian/libmilter-dev${includedir}/libmilter/; \
+ if [ -f ${BUILD_TREE}/include/libmilter/mfdef.h ]; then \
+ $(INSTALL_DATA) ${BUILD_TREE}/include/libmilter/mfdef.h \
+ debian/libmilter-dev${includedir}/libmilter/; \
+ fi; \
+ $(INSTALL_PROGRAM) ${BUILD_TREE}/obj.*/libsmutil/libsmutil.a \
+ debian/libmilter-dev${libdir}/libmilter/; \
+ if [ -d ${BUILD_TREE}/libsm ]; then \
+ $(INSTALL_PROGRAM) ${BUILD_TREE}/obj.*/libsm/libsm.a \
+ debian/libmilter-dev${libdir}/libmilter/; \
+ fi; \
+ fi;
+endif
+
+ # Multiple package fixup
+ #dh_movefiles -a --sourcedir debian/${package};
+
+ # Actions from binary-common
+ #dh_installcron;
+ $(INSTALL_SCRIPT) debian/${package}.cron.daily \
+ ${PKG_DIR}${sysconfdir}/cron.daily/sendmail;
+ #dh_installlogrotate;
+ #$(INSTALL_DATA) debian/${package}.logrotate \
+ # ${PKG_DIR}${sysconfdir}/logrotate.d/sendmail;
+ #
+ dh_fixperms;
+ #
+ # Cleanup misc permissions, etc... (fakeroot, dh_fixperms, etc.)
+ chmod a+x ${PKG_DIR}${datadir}/sendmail/cf/sh/makeinfo.sh;
+ chown root:root ${PKG_DIR}${sysconfdir}/mail/helpfile;
+ chown root:root ${PKG_DIR}${sysconfdir}/mail/peers/provider;
+ chown root:root ${PKG_DIR}${sysconfdir}/mail/service.switch*;
+ #
+ # You may want to make some executables suid here.
+ chown root:mail ${PKG_DIR}${sbindir}/sendmail;
+ chmod 04755 ${PKG_DIR}${sbindir}/sendmail;
+ chown root:mail ${PKG_DIR}${libexecdir}/mailstats;
+ chmod 02755 ${PKG_DIR}${libexecdir}/mailstats;
+ chown root:mail ${PKG_DIR}${libexecdir}/mail.local;
+ chmod 0755 ${PKG_DIR}${libexecdir}/mail.local;
+ chown root:mail ${PKG_DIR}${libexecdir}/smrsh;
+ chmod 0755 ${PKG_DIR}${libexecdir}/smrsh;
+ chown root:mail ${PKG_DIR}${libexecdir}/sensible-mda;
+ chmod 0755 ${PKG_DIR}${libexecdir}/sensible-mda;
+
+ # Special case Perl for Debian Slink (2.1), debhelper v1
+ if [ ! -x /usr/bin/dh_perl ]; then \
+ echo 'perl:Depends=perl5|perl' >> debian/substvars; fi;
+
+ # Install Lintian overrides
+ $(INSTALL_DATA) -d -g root -m 755 ${PKG_DIR}${datadir}/lintian/overrides
+ $(INSTALL_DATA) -g root -m 644 debian/${package}.lintian-overrides \
+ ${PKG_DIR}${datadir}/lintian/overrides/${package}
+endif
+
+ touch ${STAMP_DIR}/install-arch;
- touch install-stamp
#-------------
# This single target is used to build all the packages, all at once, or
# one at a time. So keep in mind: any options passed to commands here will
# affect _all_ packages. Anything you want to only affect one package
# should be put in another target, such as the install target.
+#
+# Must not depend on anything. This is to be called by
+# binary-arch/binary-indep in another 'make' thread.
binary-common:
# Need this version of debhelper for DH_OPTIONS to work.
- dh_testversion 1.1.17
- dh_testdir
- dh_testroot
- dh_installchangelogs -k RELEASE_NOTES
- dh_installcron
- if [ -x /usr/bin/dh_installdebconf ]; then dh_installdebconf; fi
- dh_installdocs debian/Debian-specific
- dh_installemacsen
- dh_installexamples
- chmod 0755 $(DOC_DIR)/$(package)/examples/passwd-to-alias
- chmod 0755 $(DOC_DIR)/$(package)/examples/ip-up.d
- chmod 0755 $(DOC_DIR)/$(package)/examples/ip-down.d
- if [ -x /usr/bin/dh_installinfo ]; then dh_installinfo; fi
- dh_installinit
- # install $(TEMP_DIR).init.d $(TEMP_DIR)/etc/init.d/sendmail
- dh_installmanpages
- cd $(MAN_DIR)/man8 && \
- ln -sf sendmail.8.gz ./purgestat.8.gz
- # ln -sf sendmail.8.gz ./hoststat.8.gz
- # ln -sf sendmail.8.gz ./sendmail.real.8.gz
- sed "s?/usr/adm/sm.bin?/usr/lib/sm.bin?g" smrsh/smrsh.8 \
- > $(MAN_DIR)/man8/smrsh.8
- dh_undocumented
- dh_installmenu
- if [ -x /usr/bin/dh_installpam ]; then dh_installpam; fi
- #
- $(MAKE) -s -f debian/rules buildinfo
- #
- if [ -x /usr/bin/dh_link ]; then dh_link; fi
- dh_strip
- dh_compress
- dh_fixperms
+ dh_testversion 1.1.17;
+ dh_testdir;
+ dh_testroot;
+ # Done in install-xxx, but still need to get rid of *.debhelper !!!
+ #dh_clean -k;
+ $(RM) debian/*.debhelper;
+
+ dh_installchangelogs -k ${BUILD_TREE}/RELEASE_NOTES;
+ #-------- needs script name ala installinit ----
+ # Done in install-xxx
+ #dh_installcron;
+ if [ -x /usr/bin/dh_installdebconf ]; then dh_installdebconf; fi;
+ dh_installdocs;
+ #dh_installemacsen;
+ #dh_installexamples;
+ #if [ -x /usr/bin/dh_installinfo ]; then dh_installinfo; fi;
+ dh_installinit --init-script=sendmail;
+ #-------- needs script name ala installinit ----
+ # Done in install-xxx
+ #if [ -x /usr/bin/dh_installlogrotate ]; then dh_installlogrotate; fi;
+ if [ -x /usr/bin/dh_installman ]; then dh_installman; fi;
+ #dh_installmenu;
+ #dh_installmime;
+ #dh_undocumented;
+ if [ -x /usr/bin/dh_installpam ]; then dh_installpam; fi;
+ # Done in install-xxx
+ #if [ -x /usr/bin/dh_link ]; then dh_link; fi;
+ifeq (, $(findstring nostrip,${DEB_BUILD_OPTIONS}))
+ dh_strip;
+else
+ #dh_strip;
+endif
+ dh_compress;
+ # Done in install-xxx
+ #dh_fixperms;
+ # Need to special case this now that we're using dynamic uid/gid
+ #if [ -x /usr/sbin/suidregister -a -s /etc/suid.conf ]; then
+ # dh_suidregister; fi;
#
- # Cleanup misc permissions, etc... (fakeroot, etc.)
- chmod a+x $(TEMP_DIR)/usr/share/sendmail/sendmail.cf/sh/*
+ # Cleanup misc permissions, etc... (fakeroot, dh_fixperms, etc.)
+ # Done in install-xxx
#
# You may want to make some executables suid here.
- chmod 04755 $(TEMP_DIR)/usr/sbin/sendmail
- chown 0.8 $(TEMP_DIR)/usr/sbin/sendmail
- chmod 0755 $(TEMP_DIR)/usr/sbin/mailstats
- chown 0.8 $(TEMP_DIR)/usr/sbin/mailstats
- chmod 04755 $(TEMP_DIR)/usr/lib/sm.bin/mail.local
- chown 0.8 $(TEMP_DIR)/usr/lib/sm.bin/mail.local
- chmod 0755 $(TEMP_DIR)/usr/lib/sm.bin/smrsh
- chown 0.8 $(TEMP_DIR)/usr/lib/sm.bin/smrsh
- chmod 0755 $(TEMP_DIR)/usr/lib/sm.bin/sensible-mda
- chown 0.8 $(TEMP_DIR)/usr/lib/sm.bin/sensible-mda
+ # Done in install-xxx
#
- dh_suidregister
- dh_makeshlibs
- dh_installdeb
- #
- # Can now clean up debian/*.debhelper scripts
- rm -f debian/*.debhelper
- dh_shlibdeps
- # Handle perl specially, to support building under slink
- if [ -x /usr/bin/dh_perl ]; then \
- dh_perl; \
- else \
- echo "perl:Depends=perl5" >> debian/substvars; \
- fi
- dh_gencontrol
- dh_md5sums -x
- dh_builddeb
+ #dh_makeshlibs;
+ dh_installdeb;
+ dh_shlibdeps;
+ if [ -x /usr/bin/dh_perl ]; then dh_perl; fi
+ dh_gencontrol;
+ dh_md5sums;
+ dh_builddeb;
+
+ $(MAKE) -f ${debian_dir}/rules pristine;
+
#-------------
# Build architecture independant packages using the common target.
# (Uncomment this next line if you have such packages.)
-#binary-indep: build install
-# $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+binary-indep: ${STAMP_DIR}/build-indep ${STAMP_DIR}/install-indep
-#-------------
-# Build architecture dependant packages using the common target.
-binary-arch: build install
- $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_INDEP})
+ $(MAKE) -f ${debian_dir}/rules DH_OPTIONS=-i binary-common;
+endif
-#-------------
-# Any other binary targets build just one binary package at a time.
-binary-%: build install
- make -f debian/rules binary-common DH_OPTIONS=-p$*
#-------------
-l33ch:
- dh_testdir
- #@echo >&2 'l33ch is obsolete'; false
- cd debian && \
- wget --passive-ftp --timestamping \
- http://www.sendmail.org/faq/faq.txt
- #ftp://rtfm.mit.edu/pub/usenet/comp.mail.sendmail/sendmail_FAQ
-
-#-------------
-patch: patch-stamp
-patch-stamp:
- dh_testdir
-
- $(MAKE) -s -f debian/patches/Makefile patch
-
- touch patch-stamp
-
-unpatch: unpatch-stamp
-unpatch-stamp: patch-stamp
- dh_testdir
+# Build architecture dependant packages using the common target.
+binary-arch: ${STAMP_DIR}/build-arch ${STAMP_DIR}/install-arch
- $(MAKE) -s -f debian/patches/Makefile unpatch
+# Skip work if nothing to do...
+ifeq (yes, ${ENABLE_ARCH})
+ $(MAKE) -f ${debian_dir}/rules DH_OPTIONS=-a binary-common;
+endif
- rm -f patch-stamp
#-------------
-hacks:
-# cd debian && uudecode check.tar.uue
-# cd $(DOC_DIR)/$(package) && tar -xf ../../../../check.tar
-# cd $(DOC_DIR)/$(package)/hack; \
-# for file in *; do \
-# sed "s/dbm /hash /g" < $$file \
-# > ../../../share/sendmail.cf/hack/$$file; \
-# done
-# sed "s/dbm /hash /g" $(DOC_DIR)/$(package)/README.check \
-# > $(DOC_DIR)/$(package)/README.Spam
-# rm $(DOC_DIR)/$(package)/README.check
-# rm -r $(DOC_DIR)/$(package)/hack/
+# Any other binary targets build just one binary package at a time.
+binary-%:
+ $(MAKE) -f ${debian_dir}/rules binary-common DH_OPTIONS=-p$*;
-#-------------
-buildinfo:
- @echo; dpkg -l gcc "libc6*" binutils ldso make libdb2 libdb2.6 \
- libopenldap1 dpkg-dev $(BUILDINFO) \
- | awk '$$1 == "ii" { printf("%s-%s\n", $$2, $$3) }' \
- | tee $(DOC_DIR)/$(package)/buildinfo.Debian; echo
- chmod 644 $(DOC_DIR)/$(package)/buildinfo.Debian
#-------------
# Below here is fairly generic really
@@ -423,5 +1174,16 @@ buildinfo:
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+# Due to buildd not (for the nonce) supporting build-arch, kluge next rule
+build: build-arch
+install: install-indep install-arch
binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+.PHONY: refresh-dbs refresh-debian update-debian refresh-faq
+.PHONY: pristine
+.PHONY: info buildinfo
+.PHONY: setup autotools configure
+.PHONY: clean build build-indep build-arch
+.PHONY: install install-indep install-arch
+.PHONY: binary binary-indep binary-arch
+.SUFFIXES:
+.PRECIOUS: ${debian_dir}/rules
diff --git a/debian/scripts/dbs-build.mk b/debian/scripts/dbs-build.mk
new file mode 100644
index 0000000..1fe8000
--- /dev/null
+++ b/debian/scripts/dbs-build.mk
@@ -0,0 +1,94 @@
+#!/usr/bin/make -f
+# Separate tarball/patch build system by Adam Heath <doogie@debian.org>
+# Modified by Ben Collins <bcollins@debian.org>
+
+SHELL = /bin/bash -e
+SOURCE_DIR = build-tree
+STAMP_DIR = stampdir
+PATCH_DIR = debian/patches
+SCRIPT_DIR = /usr/share/dbs
+
+patched = $(STAMP_DIR)/patch
+unpacked = $(STAMP_DIR)/unpack
+
+ifdef TAR_DIR
+ BUILD_TREE = $(SOURCE_DIR)/$(TAR_DIR)
+else
+ BUILD_TREE = $(SOURCE_DIR)
+endif
+
+dh_mak_deps = $(shell DH_COMPAT=$(DH_COMPAT) perl $(SCRIPT_DIR)/dbs_split makedeps)
+dh_gen_deps = $(shell DH_COMPAT=$(DH_COMPAT) perl $(SCRIPT_DIR)/dbs_split gendeps)
+
+$(dh_mak_deps): $(dh_gen_deps)
+ perl $(SCRIPT_DIR)/dbs_split
+
+setup: $(dh_mak_deps)
+ dh_testdir
+ @-up-scripts
+ $(MAKE) -f debian/rules $(unpacked) $(patched)
+
+$(patched)/: $(STAMP_DIR)/created $(unpacked)
+ test -d $(STAMP_DIR)/patches || mkdir -p $(STAMP_DIR)/patches
+ @if [ -d "$(PATCH_DIR)" ]; then \
+ mkdir -p $(STAMP_DIR)/log/patches; \
+ for f in `(cd $(PATCH_DIR); find -type f ! -name 'chk-*') | sort | \
+ sed s,'./',,g`; do \
+ stampfile=$(STAMP_DIR)/patches/$$f; \
+ log=$(STAMP_DIR)/log/patches/$$f; \
+ if [ ! -e $$stampfile ]; then \
+ echo -n "Applying patch $(PATCH_DIR)/$$f ... "; \
+ if $(SHELL) $(SCRIPT_DIR)/file2cat $(PATCH_DIR)/$$f | \
+ (cd $(SOURCE_DIR);patch -p0 --no-backup-if-mismatch) > $$log 2>&1; then \
+ echo successful.; \
+ touch $$stampfile; \
+ else \
+ echo "failed! (check $$log for reason)"; \
+ exit 1; \
+ fi; \
+ else \
+ echo Already applied $(PATCH_DIR)/$$f.; \
+ fi; \
+ done; \
+ fi
+ touch $@
+
+unpacked: $(unpacked)
+$(unpacked): $(STAMP_DIR)/created
+ mkdir -p $(STAMP_DIR)/sources $(SOURCE_DIR) $(STAMP_DIR)/log/sources
+ @for f in `find . -type f -maxdepth 1 -name \*.tgz -o -name \*.tar.gz -o \
+ -name \*.tar.bz -o -name \*.tar.bz2 | sort | sed s,'./',,g`; do \
+ stampfile=$(STAMP_DIR)/sources/`basename $$f`; \
+ log=$(STAMP_DIR)/log/sources/`basename $$f`; \
+ if [ ! -e $$stampfile ]; then \
+ echo -n "Extracting source $$f ... "; \
+ if $(SHELL) $(SCRIPT_DIR)/file2cat $$f | \
+ (cd $(SOURCE_DIR); tar xv) > $$log 2>&1; then \
+ echo successful.; \
+ touch $$stampfile; \
+ else \
+ echo failed!; \
+ exit 1; \
+ fi; \
+ else \
+ echo Already unpacked $$f.; \
+ fi; \
+ done
+ touch $@
+
+make_patch:
+ mv $(BUILD_TREE) $(BUILD_TREE).new
+ rm -rf $(STAMP_DIR)
+ $(MAKE) -f debian/rules $(unpacked) $(patched)
+ifndef TAR_DIR
+ diff -urN $(BUILD_TREE) $(BUILD_TREE).new > new.diff
+else
+ (cd $(SOURCE_DIR) && diff -urN $(TAR_DIR) $(TAR_DIR).new || true) > new.diff
+endif
+ rm -rf $(BUILD_TREE)
+ mv $(BUILD_TREE).new $(BUILD_TREE)
+ @echo; ls -l new.diff
+
+$(STAMP_DIR)/created:
+ test -d $(STAMP_DIR) || mkdir $(STAMP_DIR)
+ touch $(STAMP_DIR)/created
diff --git a/debian/scripts/dbs_split b/debian/scripts/dbs_split
new file mode 100644
index 0000000..13f4d82
--- /dev/null
+++ b/debian/scripts/dbs_split
@@ -0,0 +1,83 @@
+#!/usr/bin/perl
+
+$control = 'debian/control';
+if ( -d 'debian/packages.d' ) {
+ $dir = 'debian/packages.d';
+} else {
+ $dir = 'debian';
+}
+$needclean = 0;
+$needlist = 0;
+$needdeps = 0;
+
+if (defined($ENV{'DH_COMPAT'})) {
+ $dh = $ENV{'DH_COMPAT'};
+} else {
+ $dh = 0;
+}
+
+if (@ARGV) {
+ $temp = shift;
+ if ($temp eq "clean") { $needclean = 1; }
+ elsif ($temp eq "makedeps") { $needlist = 1; }
+ elsif ($temp eq "gendeps") { $needdeps = 1; }
+}
+
+@packages = ();
+$first_package = "";
+
+open (CONTROL, "< $control");
+
+while (<CONTROL>) {
+ if (m/^Package:/) {
+ $package = (split)[1];
+ if ($first_package eq "" and $dh < 2) {
+ $first_package = $package;
+ }
+ if ( -f "${dir}/${package}.in" ) {
+ push @packages, $package;
+ }
+ }
+}
+
+close CONTROL;
+
+while (@packages) {
+ $package = shift(@packages);
+ $inhead = 1;
+ $opened = 0;
+ if ($needdeps) {
+ print "${dir}/${package}.in ";
+ next;
+ }
+ open (IN, "< ${dir}/${package}.in");
+ while (<IN>) {
+ if (m/^\%(.*)\%$/) {
+ if ($needclean) {
+ if ($package ne $first_package) {
+ system("rm -f debian/${package}.${1}");
+ } else {
+ system("rm -f debian/${1}");
+ }
+ } elsif ($needlist) {
+ if ($package ne $first_package) {
+ print "debian/${package}.${1} ";
+ } else {
+ print "debian/${1} ";
+ }
+ } else {
+ $inhead = 0;
+ if ($opened) { close OUT; } else { $opened = 1; }
+ if ($package ne $first_package) {
+ open OUT, "> debian/${package}.${1}";
+ } else {
+ open OUT, "> debian/${1}";
+ }
+ }
+ } elsif (!$inhead) {
+ print OUT $_;
+ }
+ }
+ close OUT;
+ close IN;
+}
diff --git a/debian/scripts/dpkg-arch.mk b/debian/scripts/dpkg-arch.mk
new file mode 100644
index 0000000..4a3ab3d
--- /dev/null
+++ b/debian/scripts/dpkg-arch.mk
@@ -0,0 +1,7 @@
+# see dpkg-architecture(8)
+DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+DEB_BUILD_GNU_CPU := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
+DEB_BUILD_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
+DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
+DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
diff --git a/debian/scripts/file2cat b/debian/scripts/file2cat
new file mode 100644
index 0000000..d95d77e
--- /dev/null
+++ b/debian/scripts/file2cat
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ "$1" = "" ]; then
+ echo "Usage: file2cat <file>"
+ exit 1
+fi
+
+case "$1" in
+ *.gz|*.Z|*.tgz) cmd=zcat;;
+ *.bz|*.bz2) cmd=bzcat;;
+ *) cmd=cat;;
+esac
+$cmd $1
diff --git a/debian/sendmail-8.9.3-imrss-patches b/debian/sendmail-8.9.3-imrss-patches
deleted file mode 100644
index 14138da..0000000
--- a/debian/sendmail-8.9.3-imrss-patches
+++ /dev/null
@@ -1,193 +0,0 @@
-diff -rc2 --new-file ./cf/README ./cf/README
-*** ./cf/README Wed Feb 3 14:06:38 1999
---- ./cf/README Mon Apr 5 19:24:45 1999
-***************
-*** 852,860 ****
- described below.
-
-! rbl Turns on rejection of hosts found in the Realtime Blackhole
-! List. If an argument is provided it is used as the
-! name sever to contact; otherwise, the main RBL server at
-! rbl.maps.vix.com is used. For details, see
-! http://maps.vix.com/rbl/.
-
- loose_relay_check
---- 852,873 ----
- described below.
-
-! rbl Turns on rejection of incoming E-mail from SMTP clients
-! whose IP addresses are currently included in the MAPS
-! Realtime Blackhole List (RBL), a list of known (fixed)
-! spam sources. For additional information regarding the
-! MAPS RBL list, see http://maps.vix.com/rbl/.
-!
-! imrss Turns on rejection of incoming E-mail from SMTP clients
-! whose IP addresses are currently included in the Internet
-! Mail Relay Services Survey (IMRSS) list of unrestricted
-! "open" E-mail relay servers. For additional information
-! regarding the IMRSS list, see http://www.imrss.org/.
-!
-! dssl Turns on rejection of incoming E-mail from SMTP clients
-! whose IP addresses are currently included in the DynamicIP
-! Spam Sources List (DSSL), a list of IP addresses of dynamic
-! dialup ports for many commercial ISPs and some Universities.
-! For additional information regarding the DSSL, see
-! http://www.imrss.org/dssl/.
-
- loose_relay_check
-***************
-*** 1385,1397 ****
- 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
-! spammers. To use this database, use
-
- FEATURE(`rbl')
-
-! This will cause sendmail to reject mail from any site in the
-! Realtime Blackhole List database. You can specify an alternative
-! RBL name server to contact by specifying an argument to the FEATURE.
-
- The features described above make use of the check_relay, check_mail,
---- 1398,1437 ----
- Mail can't be sent to spammer@aol.com or anyone at cyberspammer.com.
-
-! In addition to the above do-it-yourself spam contol mechanisms, you can also
-! enable support in Sendmail for arbitrary combinations of some popular data
-! bases of IP addrsses that may try to send spam to your local site via SMTP.
-! The list described below are all accessed via a special (kludge?) form of
-! DNS lookups.
-!
-! The first such list is the ``Realtime Blackhole List'' run by the MAPS
-! project. Information about this list is available at http://maps.vix.com/rbl/.
-! This is a database of the IP addresses of known (fixed) spam sources. To use
-! the MAPS RBL list for blocking incoming E-mail, include the line:
-
- FEATURE(`rbl')
-
-! into your .mc file. This will cause Sendmail to reject mail from any IP
-! address currently listed in the MAPS RBL database.
-!
-! Another list that can be used for junk E-mail filtering is the Internet
-! Mail Relay Services Survey's (IMRSS) list of unsecured/unrestricted "open"
-! E-mail relays. To use the IMRSS list of open relays for blocking incoming
-! E-mail, include the line:
-!
-! FEATURE(`imrss')
-!
-! into your .mc file. This will cause Sendmail to reject mail from any IP
-! address currently listed in the IMRSS open relays database.
-!
-! Yet another list that can be used for junk E-mail filtering is the DynamicIP
-! Spam Sources List (DSSL). This is a list of the IP address of various
-! "dynamic" dialup lines, mostly belonging to commercial Internet Service
-! Providers and/or Universities. To use the DSSL list of dynamic dialups
-! for blocking incoming E-mail, include the line:
-!
-! FEATURE(`dssl')
-!
-! into your .mc file. This will cause Sendmail to reject mail from any IP
-! address currently listed in the DSSL database.
-
- The features described above make use of the check_relay, check_mail,
-diff -rc2 --new-file ./cf/feature/dssl.m4 ./cf/feature/dssl.m4
-*** ./cf/feature/dssl.m4 Wed Dec 31 16:00:00 1969
---- ./cf/feature/dssl.m4 Mon Apr 5 19:05:35 1999
-***************
-*** 0 ****
---- 1,15 ----
-+ 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(`@(#)imrss.m4 8.8 (Berkeley) 4/5/1999')
-+ divert(-1)
-+
-+ define(`_DSSL_',`dssl.imrss.org')dnl
-diff -rc2 --new-file ./cf/feature/imrss.m4 ./cf/feature/imrss.m4
-*** ./cf/feature/imrss.m4 Wed Dec 31 16:00:00 1969
---- ./cf/feature/imrss.m4 Mon Apr 5 19:05:20 1999
-***************
-*** 0 ****
---- 1,15 ----
-+ 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(`@(#)imrss.m4 8.8 (Berkeley) 4/5/1999')
-+ divert(-1)
-+
-+ define(`_IMRSS_',`mr-out.imrss.org')dnl
-diff -rc2 --new-file ./cf/feature/rbl.m4 ./cf/feature/rbl.m4
-*** ./cf/feature/rbl.m4 Tue Dec 29 09:42:13 1998
---- ./cf/feature/rbl.m4 Mon Apr 5 19:05:06 1999
-***************
-*** 13,15 ****
- divert(-1)
-
-! define(`_RBL_', ifelse(_ARG_, `', `rbl.maps.vix.com', `_ARG_'))dnl
---- 13,15 ----
- divert(-1)
-
-! define(`_RBL_',`rbl.maps.vix.com')dnl
-diff -rc2 --new-file ./cf/m4/proto.m4 ./cf/m4/proto.m4
-*** ./cf/m4/proto.m4 Tue Feb 2 15:21:30 1999
---- ./cf/m4/proto.m4 Tue Apr 6 00:18:06 1999
-***************
-*** 1109,1119 ****
- R<$+> $* $#error $@ 5.7.1 $: $1', `dnl')
-
- ifdef(`_RBL_', `dnl
-! # 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 by blackhole site _RBL_"',
- `dnl')
-
- ######################################################################
---- 1109,1137 ----
- R<$+> $* $#error $@ 5.7.1 $: $1', `dnl')
-
-+ # For the sake of efficiency, spam blocking list checks are ordered by the
-+ # amount of incoming traffic they are likely to affect, mostest firstest.
-+
-+ ifdef(`_IMRSS_', `dnl
-+ # DNS based IMRSS IP address list
-+ R$* $: $&{client_addr}
-+ R$-.$-.$-.$- $: $(host $4.$3.$2.$1._IMRSS_. $: OK $)
-+ R$+. $#error $@ 5.7.1 $: "Mail from " $&{client_addr} " refused. See http://www.imrss.org/error.html"',
-+ `dnl')
-+
-+ ifdef(`_DSSL_', `dnl
-+ # DNS based DSSL IP address list
-+ R$* $: $&{client_addr}
-+ R$-.$-.$-.$- $: $(host $4.$3.$2.$1._DSSL_. $: OK $)
-+ R$+. $#error $@ 5.7.1 $: "Mail from " $&{client_addr} " refused. See http://www.imrss.org/dssl/unblock.html"',
-+ `dnl')
-+
- ifdef(`_RBL_', `dnl
-! # DNS based MAPS RBL IP address list
- R$* $: $&{client_addr}
- R$-.$-.$-.$- $: $(host $4.$3.$2.$1._RBL_. $: OK $)
-! R$+. $#error $@ 5.7.1 $: "Mail from " $&{client_addr} " refused. See http://maps.vix.com/rbl/enduser.html"',
- `dnl')
-+
-+ R$* $@ OK
-
- ######################################################################
diff --git a/debian/sendmail-doc.dirs.in b/debian/sendmail-doc.dirs.in
new file mode 100644
index 0000000..b301667
--- /dev/null
+++ b/debian/sendmail-doc.dirs.in
@@ -0,0 +1,5 @@
+@docdir@/sendmail-doc
+@docdir@/sendmail-doc/libmilter
+@docdir@/sendmail-doc/libmilter/html
+@docdir@/sendmail-doc/op
+@docdir@/sendmail-doc/sendmail
diff --git a/debian/sendmail-doc.docs b/debian/sendmail-doc.docs
new file mode 100644
index 0000000..58c806d
--- /dev/null
+++ b/debian/sendmail-doc.docs
@@ -0,0 +1,4 @@
+debian/README.Debian.sendmail-doc
+debian/sendmail.buildinfo.Debian
+debian/Debian-specific
+debian/build/site.config.m4
diff --git a/debian/sendmail-doc.postinst b/debian/sendmail-doc.postinst
new file mode 100644
index 0000000..bf0ac2a
--- /dev/null
+++ b/debian/sendmail-doc.postinst
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+#
+# Debian post installation script
+#
+# Install of already installed package:
+# 1) old-prerm upgrade new-version
+# *) new-prerm failed-upgrade old-version
+# *) old-postinst abort-upgrade new-version
+#
+# If a `conflicting' package is being removed at the same time:
+# 1) forall packages depending on conflicting package and --auto-deconfigure
+# deconfigured's-prerm deconfigure \
+# in-favour package-being-installed version \
+# removing conflicting-package version
+# *) deconfigured's-postinst abort-deconfigure \
+# in-favour package-being-installed-but-failed version \
+# removing conflicting-package version
+# 2) To prepare for removal of the conflicting package
+# conflictor's-prerm remove \
+# in-favour package new-version
+# *) conflictor's-postinst abort-remove \
+# in-favour package new-version
+#
+# Configuration of package:
+# postinst configure most-recently-configured-version
+#
+set -e;
+
+PACKAGE=`echo "$(basename $0)" | sed -e 's/\.postinst$//'`;
+
+case "$1" in
+ configure)
+ # continue below
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ exit 0;
+ ;;
+
+ *)
+ echo "$PACKAGE postinst called with unknown argument \`$1'" >&2;
+ exit 1;
+ ;;
+ esac;
+
+#DEBHELPER#
+exit 0;
diff --git a/debian/sendmail-doc.postrm.in b/debian/sendmail-doc.postrm.in
new file mode 100644
index 0000000..8b10744
--- /dev/null
+++ b/debian/sendmail-doc.postrm.in
@@ -0,0 +1,53 @@
+#!/bin/sh -e
+#
+# Debian post removal script
+#
+# Install of already installed package:
+# 1) Upgrade of package:
+# new-preinst upgrade old-version
+# *) new-postrm abort-upgrade old-version
+# 2) package had some configuration files from a previous version installed
+# new-preinst install old-version
+# *) new-postrm abort-install old-version
+# 3) Otherwise (i.e., the package was completely purged)
+# new-preinst install
+# *) new-postrm abort-install
+#
+# Removal of a package:
+# 1) prerm remove
+# 2) The package's files are removed (except conffiles).
+# 3) postrm remove
+# 4) All the maintainer scripts except the postrm are removed.
+# 5) The conffiles and any backup files
+# (~-files, #*# files, %-files, .dpkg-{old,new,tmp}, etc.) are removed.
+# 6) postrm purge
+# 7) The package's file list is removed
+#
+set -e;
+
+PACKAGE=`echo "$(basename $0)" | sed -e 's/\.postrm$//'`;
+
+case "$1" in
+ remove)
+ # /usr/share/doc/sendmail-doc is a symlink to /usr/share/doc/sendmail
+ rm -f @docdir@/sendmail-doc 2>/dev/null || true;
+ rmdir @docdir@/sendmail 2>/dev/null || true;
+ ;;
+
+ purge)
+ ;;
+
+ upgrade)
+ ;;
+
+ failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "$PACKAGE postrm called with unknown argument \`$1'" >&2;
+ exit 1;
+ ;;
+ esac;
+
+#DEBHELPER#
+exit 0;
diff --git a/debian/sendmail-doc.preinst.in b/debian/sendmail-doc.preinst.in
new file mode 100644
index 0000000..85a410b
--- /dev/null
+++ b/debian/sendmail-doc.preinst.in
@@ -0,0 +1,55 @@
+#!/bin/sh -e
+#
+# Debian pre install script
+#
+# Install of already installed package:
+# 1) Upgrade of package:
+# new-preinst upgrade old-version
+# *) new-postrm abort-upgrade old-version
+# 2) package had some configuration files from a previous version installed
+# new-preinst install old-version
+# *) new-postrm abort-install old-version
+# 3) Otherwise (i.e., the package was completely purged)
+# new-preinst install
+# *) new-postrm abort-install
+#
+set -e;
+
+PACKAGE=`echo "$(basename $0)" | sed -e 's/\.preinst$//'`;
+
+case "$1" in
+ install)
+ # DPKG doesn't overwrite directories with symlinks...
+ if [ -d @docdir@/sendmail-doc ]; then
+ rm -rf @docdir@/sendmail-doc;
+ fi;
+ if [ ! -d @docdir@/sendmail ]; then
+ mkdir -p @docdir@/sendmail;
+ chmod a+rx @docdir@/sendmail;
+ fi;
+ ln -sf sendmail @docdir@/sendmail-doc;
+ ;;
+
+ upgrade)
+ # DPKG doesn't overwrite directories with symlinks...
+ if [ -d @docdir@/sendmail-doc ]; then
+ rm -rf @docdir@/sendmail-doc;
+ fi;
+ if [ ! -d @docdir@/sendmail ]; then
+ mkdir -p @docdir@/sendmail;
+ chmod a+rx @docdir@/sendmail;
+ fi;
+ ln -sf sendmail @docdir@/sendmail-doc;
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "$PACKAGE preinst called with unknown argument \`$1'" >&2;
+ exit 1;
+ ;;
+ esac;
+
+#DEBHELPER#
+exit 0;
diff --git a/debian/sendmail-doc.prerm b/debian/sendmail-doc.prerm
new file mode 100644
index 0000000..966dfdd
--- /dev/null
+++ b/debian/sendmail-doc.prerm
@@ -0,0 +1,54 @@
+#!/bin/sh -e
+#
+# Debian pre removal script
+#
+# Install of already installed package:
+# 1) old-prerm upgrade new-version
+# *) new-prerm failed-upgrade old-version
+# *) old-postinst abort-upgrade new-version
+#
+# If a `conflicting' package is being removed at the same time:
+# 1) forall packages depending on conflicting package and --auto-deconfigure
+# deconfigured's-prerm deconfigure \
+# in-favour package-being-installed version \
+# removing conflicting-package version
+# *) deconfigured's-postinst abort-deconfigure \
+# in-favour package-being-installed-but-failed version \
+# removing conflicting-package version
+# 2) To prepare for removal of the conflicting package
+# conflictor's-prerm remove \
+# in-favour package new-version
+# *) conflictor's-postinst abort-remove \
+# in-favour package new-version
+#
+# Removal of a package:
+# 1) prerm remove
+# 2) The package's files are removed (except conffiles).
+# 3) postrm remove
+# 4) All the maintainer scripts except the postrm are removed.
+#
+set -e;
+
+PACKAGE=`echo "$(basename $0)" | sed -e 's/\.prerm$//'`;
+
+case "$1" in
+ remove)
+ ;;
+
+ upgrade)
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ deconfigure)
+ ;;
+
+ *)
+ echo "$PACKAGE prerm called with unknown argument \`$1'" >&2;
+ exit 1;
+ ;;
+ esac;
+
+#DEBHELPER#
+exit 0;
diff --git a/debian/sendmail.README.Debian b/debian/sendmail.README.Debian
deleted file mode 100644
index c62e1ee..0000000
--- a/debian/sendmail.README.Debian
+++ /dev/null
@@ -1,34 +0,0 @@
- ***** Important notes on sendmail 8.9.2 ****
-
-1) Sendmail now always uses TCP wrappers (/etc/hosts.allow /etc/hosts.deny)
- This is a change from prior versions where wrapper support was enabled
- via sendmail.mc.
-
- Please make sure you add the appropriate entry to the /etc/hosts.* file.
- The most likely candidate is to place sendmail: all in /etc/hosts.allow
-
-2) You should *really* read RELEASE_NOTES... There are *many* changes for
- spam control.
- A) Relaying is, by default, prohibitted
- B) Mail from non-resolvable domains is, by default, prohibitted
-
- **** Other information ****
-
-This Debian package includes an automatic configuration utility
-`sendmailconfig' which can be run at any time to modify the current sendmail
-configuration.
-
-Most mail-related configuration files are kept in the /etc/mail directory.
-
-Specialized configurations can be accomplished by editing the file
-/etc/mail/sendmail.mc by hand and then running `sendmailconfig' to generate
-and use the appropriate corresponding sendmail.cf file. Such configurations
-can make use of the m4 configuration macros kept in the
-/usr/share/sendmail/sendmail.cf directory.
-
-See also the other documentation in this directory.
-
-Finally, the file /etc/aliases holds a text representation of the current mail
-aliases. See the aliases(5) man page for more information. If you edit this
-file, be sure to run `newaliases' to update the corresponding binary database.
-
diff --git a/debian/sendmail.conffiles b/debian/sendmail.conffiles
deleted file mode 100644
index 1c87967..0000000
--- a/debian/sendmail.conffiles
+++ /dev/null
@@ -1,6 +0,0 @@
-/etc/mail/service.switch
-/etc/mail/service.switch-nodns
-/etc/mail/peers/provider
-/etc/init.d/sendmail
-/etc/ppp/ip-up.d/sendmail
-/etc/ppp/ip-down.d/sendmail
diff --git a/debian/sendmail.conffiles.in b/debian/sendmail.conffiles.in
new file mode 100644
index 0000000..729712d
--- /dev/null
+++ b/debian/sendmail.conffiles.in
@@ -0,0 +1,13 @@
+@sysconfdir@/cron.daily/sendmail
+@sysconfdir@/init.d/sendmail
+@sysconfdir@/logcheck/ignore.d.paranoid/sendmail
+@sysconfdir@/logcheck/ignore.d.server/sendmail
+@sysconfdir@/logcheck/ignore.d.workstation/sendmail
+@sysconfdir@/logcheck/violations.ignore.d/sendmail
+@sysconfdir@/mail/peers/provider
+@sysconfdir@/mail/helpfile
+@sysconfdir@/mail/service.switch
+@sysconfdir@/mail/service.switch-nodns
+@sysconfdir@/pam.d/smtp
+@sysconfdir@/ppp/ip-up.d/sendmail
+@sysconfdir@/ppp/ip-down.d/sendmail
diff --git a/debian/sendmail.cron.daily b/debian/sendmail.cron.daily
deleted file mode 100644
index c2abbe4..0000000
--- a/debian/sendmail.cron.daily
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-set +e
-
-copies=2
-
-# backup "/etc/mail/sendmail.mc"
-if [ -f /etc/mail/sendmail.mc ]; then
- if [ ! -f /var/backups/sendmail.mc.bak ]; then
- cp -pf /etc/mail/sendmail.mc /var/backups/sendmail.mc.bak
- fi;
- if ! cmp -s /var/backups/sendmail.mc.bak /etc/mail/sendmail.mc ; then
- cd /var/backups
- /usr/bin/savelog -p -c $copies sendmail.mc.bak > /dev/null
- cp -pf /etc/mail/sendmail.mc /var/backups/sendmail.mc.bak
- fi;
- fi;
-
-# while we're here, might as well do sendmail.cf
-if [ -f /etc/mail/sendmail.cf ]; then
- if [ ! -f /var/backups/sendmail.cf.bak ]; then
- cp -pf /etc/mail/sendmail.cf /var/backups/sendmail.cf.bak
- fi;
- if ! cmp -s /var/backups/sendmail.cf.bak /etc/mail/sendmail.cf ; then
- cd /var/backups
- # save previous generation only if differences are significant
- diff -bBwI "^\#\#\#\#\# " \
- /var/backups/sendmail.cf.bak /etc/mail/sendmail.cf \
- > /dev/null
- if [ $? -ne 0 ]; then
- /usr/bin/savelog -p -c $copies sendmail.cf.bak \
- > /dev/null
- fi;
- cp -pf /etc/mail/sendmail.cf /var/backups/sendmail.cf.bak
- fi;
- fi;
-
diff --git a/debian/sendmail.cron.daily.in b/debian/sendmail.cron.daily.in
new file mode 100644
index 0000000..131f9a2
--- /dev/null
+++ b/debian/sendmail.cron.daily.in
@@ -0,0 +1,101 @@
+#!/bin/sh
+set +e;
+
+#------------------------------------------------------------------------------
+# Autoconf variables - in a form suitable for sh, perl
+# Generated automatically from autoconf.sh.in by configure.
+#------------------------------------------------------------------------------
+# Variables for, and by, Autoconf (Don't touch these! edit config step)
+PACKAGE_NAME="@PACKAGE_NAME@";
+PACKAGE_VERSION="@PACKAGE_VERSION@";
+prefix="@prefix@";
+exec_prefix="@exec_prefix@";
+bindir="@bindir@";
+sbindir="@sbindir@";
+libexecdir="@libexecdir@";
+datadir="@datadir@";
+sysconfdir="@sysconfdir@";
+sharedstatedir="@sharedstatedir@";
+localstatedir="@localstatedir@";
+libdir="@libdir@";
+includedir="@includedir@";
+infodir="@infodir@";
+mandir="@mandir@";
+docdir="@docdir@";
+srcdir="@srcdir@";
+
+copies=2;
+
+# backup "/etc/mail/sendmail.mc"
+if [ -f ${sysconfdir}/mail/sendmail.mc ]; then
+ if [ ! -f ${localstatedir}/backups/sendmail.mc.bak ]; then
+ cp -pf ${sysconfdir}/mail/sendmail.mc \
+ ${localstatedir}/backups/sendmail.mc.bak;
+ fi;
+ if ! cmp -s ${localstatedir}/backups/sendmail.mc.bak \
+ ${sysconfdir}/mail/sendmail.mc ; then
+ cd ${localstatedir}/backups;
+ /usr/bin/savelog -p -c $copies sendmail.mc.bak > /dev/null;
+ cp -pf ${sysconfdir}/mail/sendmail.mc \
+ ${localstatedir}/backups/sendmail.mc.bak;
+ fi;
+ fi;
+
+# backup "/etc/mail/submit.mc"
+if [ -f ${sysconfdir}/mail/submit.mc ]; then
+ if [ ! -f ${localstatedir}/backups/submit.mc.bak ]; then
+ cp -pf ${sysconfdir}/mail/submit.mc \
+ ${localstatedir}/backups/submit.mc.bak;
+ fi;
+ if ! cmp -s ${localstatedir}/backups/submit.mc.bak \
+ ${sysconfdir}/mail/submit.mc ; then
+ cd ${localstatedir}/backups;
+ /usr/bin/savelog -p -c $copies submit.mc.bak > /dev/null;
+ cp -pf ${sysconfdir}/mail/submit.mc \
+ ${localstatedir}/backups/submit.mc.bak;
+ fi;
+ fi;
+
+# while we're here, might as well do sendmail.cf
+if [ -f ${sysconfdir}/mail/sendmail.cf ]; then
+ if [ ! -f ${localstatedir}/backups/sendmail.cf.bak ]; then
+ cp -pf ${sysconfdir}/mail/sendmail.cf \
+ ${localstatedir}/backups/sendmail.cf.bak;
+ fi;
+ if ! cmp -s ${localstatedir}/backups/sendmail.cf.bak \
+ ${sysconfdir}/mail/sendmail.cf ; then
+ cd ${localstatedir}/backups;
+ # save previous generation only if differences are significant
+ diff -bBwI "^\#\#\#\#\# " \
+ ${localstatedir}/backups/sendmail.cf.bak \
+ ${sysconfdir}/mail/sendmail.cf > /dev/null;
+ if [ $? -ne 0 ]; then
+ /usr/bin/savelog -p -c $copies sendmail.cf.bak \
+ > /dev/null;
+ fi;
+ cp -pf ${sysconfdir}/mail/sendmail.cf \
+ ${localstatedir}/backups/sendmail.cf.bak;
+ fi;
+ fi;
+
+# while we're here, might as well do submit.cf
+if [ -f ${sysconfdir}/mail/submit.cf ]; then
+ if [ ! -f ${localstatedir}/backups/submit.cf.bak ]; then
+ cp -pf ${sysconfdir}/mail/submit.cf \
+ ${localstatedir}/backups/submit.cf.bak;
+ fi;
+ if ! cmp -s ${localstatedir}/backups/submit.cf.bak \
+ ${sysconfdir}/mail/submit.cf ; then
+ cd ${localstatedir}/backups;
+ # save previous generation only if differences are significant
+ diff -bBwI "^\#\#\#\#\# " \
+ ${localstatedir}/backups/submit.cf.bak \
+ ${sysconfdir}/mail/submit.cf > /dev/null;
+ if [ $? -ne 0 ]; then
+ /usr/bin/savelog -p -c $copies submit.cf.bak \
+ > /dev/null;
+ fi;
+ cp -pf ${sysconfdir}/mail/submit.cf \
+ ${localstatedir}/backups/submit.cf.bak;
+ fi;
+ fi;
diff --git a/debian/sendmail.dirs b/debian/sendmail.dirs
deleted file mode 100644
index aa336ae..0000000
--- a/debian/sendmail.dirs
+++ /dev/null
@@ -1,25 +0,0 @@
-DEBIAN
-etc/init.d
-etc/mail
-etc/mail/peers
-etc/ppp/ip-up.d
-etc/ppp/ip-down.d
-usr/bin
-usr/sbin
-usr/lib/sm.bin
-usr/share/doc/sendmail
-usr/share/doc/sendmail/examples
-usr/share/doc/sendmail/examples/db-examples
-usr/share/man/man1
-usr/share/man/man5
-usr/share/man/man8
-usr/share/sendmail
-usr/share/sendmail/sendmail.cf/cf
-usr/share/sendmail/sendmail.cf/domain
-usr/share/sendmail/sendmail.cf/feature
-usr/share/sendmail/sendmail.cf/hack
-usr/share/sendmail/sendmail.cf/m4
-usr/share/sendmail/sendmail.cf/mailer
-usr/share/sendmail/sendmail.cf/ostype
-usr/share/sendmail/sendmail.cf/sh
-var/lib/sendmail
diff --git a/debian/sendmail.dirs.in b/debian/sendmail.dirs.in
new file mode 100644
index 0000000..6d33f58
--- /dev/null
+++ b/debian/sendmail.dirs.in
@@ -0,0 +1,54 @@
+/DEBIAN
+@sysconfdir@/cron.d
+@sysconfdir@/cron.daily
+@sysconfdir@/default
+@sysconfdir@/init.d
+@sysconfdir@/logcheck
+@sysconfdir@/logcheck/ignore.d.paranoid
+@sysconfdir@/logcheck/ignore.d.server
+@sysconfdir@/logcheck/ignore.d.workstation
+@sysconfdir@/logcheck/violations.ignore.d
+@sysconfdir@/logrotate.d
+@sysconfdir@/mail
+@sysconfdir@/mail/peers
+@sysconfdir@/mail/smrsh
+@sysconfdir@/mail/sasl
+@sysconfdir@/mail/tls
+@sysconfdir@/pam.d
+@sysconfdir@/ppp/ip-up.d
+@sysconfdir@/ppp/ip-down.d
+@bindir@
+@sbindir@
+@libexecdir@
+@docdir@/sendmail
+@mandir@/man1
+@mandir@/man5
+@mandir@/man8
+@datadir@/sendmail
+@datadir@/sendmail/examples
+@datadir@/sendmail/examples/db
+@datadir@/sendmail/examples/dialup
+@datadir@/sendmail/examples/ldap
+@datadir@/sendmail/examples/logcheck
+@datadir@/sendmail/examples/logcheck/ignore.d.paranoid
+@datadir@/sendmail/examples/logcheck/ignore.d.server
+@datadir@/sendmail/examples/logcheck/ignore.d.workstation
+@datadir@/sendmail/examples/logcheck/violations.ignore.d
+@datadir@/sendmail/examples/milter
+@datadir@/sendmail/examples/pam
+@datadir@/sendmail/examples/sasl
+@datadir@/sendmail/examples/tls
+@datadir@/sendmail/cf/cf
+@datadir@/sendmail/cf/debian
+@datadir@/sendmail/cf/domain
+@datadir@/sendmail/cf/feature
+@datadir@/sendmail/cf/hack
+@datadir@/sendmail/cf/m4
+@datadir@/sendmail/cf/mailer
+@datadir@/sendmail/cf/ostype
+@datadir@/sendmail/cf/sh
+@localstatedir@/lib/sendmail
+@localstatedir@/run/sendmail
+@localstatedir@/run/sendmail/msp
+@localstatedir@/run/sendmail/mta
+@localstatedir@/run/sendmail/stampdir
diff --git a/debian/sendmail.dirs.template b/debian/sendmail.dirs.template
deleted file mode 100644
index ec4f856..0000000
--- a/debian/sendmail.dirs.template
+++ /dev/null
@@ -1,25 +0,0 @@
-DEBIAN
-etc/init.d
-etc/mail
-etc/mail/peers
-etc/ppp/ip-up.d
-etc/ppp/ip-down.d
-usr/bin
-usr/sbin
-usr/lib/sm.bin
-DOC_PFX/sendmail
-DOC_PFX/sendmail/examples
-DOC_PFX/sendmail/examples/db-examples
-MAN_PFX/man1
-MAN_PFX/man5
-MAN_PFX/man8
-usr/share/sendmail
-usr/share/sendmail/sendmail.cf/cf
-usr/share/sendmail/sendmail.cf/domain
-usr/share/sendmail/sendmail.cf/feature
-usr/share/sendmail/sendmail.cf/hack
-usr/share/sendmail/sendmail.cf/m4
-usr/share/sendmail/sendmail.cf/mailer
-usr/share/sendmail/sendmail.cf/ostype
-usr/share/sendmail/sendmail.cf/sh
-var/lib/sendmail
diff --git a/debian/sendmail.docs b/debian/sendmail.docs
index e04d426..7f37dde 100644
--- a/debian/sendmail.docs
+++ b/debian/sendmail.docs
@@ -1,4 +1,3 @@
-KNOWNBUGS
-README
-RELEASE_NOTES
-debian/faq.txt
+debian/sendmail.buildinfo.Debian
+debian/Debian-specific
+debian/build/site.config.m4
diff --git a/debian/sendmail.examples b/debian/sendmail.examples
deleted file mode 100644
index 9bdd0d0..0000000
--- a/debian/sendmail.examples
+++ /dev/null
@@ -1,4 +0,0 @@
-debian/local/ip-up.d
-debian/local/ip-down.d
-debian/checksendmail/address.resolve
-debian/db-examples
diff --git a/debian/sendmail.init.d b/debian/sendmail.init.d
deleted file mode 100644
index 0788bda..0000000
--- a/debian/sendmail.init.d
+++ /dev/null
@@ -1,169 +0,0 @@
-#!/bin/sh
-set -e
-# Start or stop sendmail
-#
-# Robert Leslie <rob@mars.org>
-# Johnie Ingram <johnie@netgod.net>
-# David Rocher <rocher@mail.dotcom.fr>
-# Richard Nelson <cowboy@debain.org>
-
-# How often to run the queue
-Q="10m"
-
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-DAEMON=/usr/sbin/sendmail
-COMMAND=/usr/sbin/sendmail
-PIDFILE=/var/run/sendmail.pid
-QUEUE=/var/spool/mqueue
-START_CMD="start-stop-daemon \
- --pidfile $PIDFILE \
- --exec $DAEMON \
- --startas $COMMAND \
- --start"
-STOP_CMD="start-stop-daemon \
- --pidfile $PIDFILE \
- --stop"
-NAME=sendmail
-FLAGS="defaults 50"
-
-# Support for coexistance with smtpd package
-SMTPD=/usr/sbin/smtpd
-
-test -x $DAEMON -a -d /usr/share/sendmail || exit 0
-
-#
-# Clean sendmail queues (somewhat)
-queue_clean () {
- # remove lock files left because of kill/crash
- # rm -f $QUEUE/[lnx]f* doesn't work with a plethora of files ;-{
- for i in A B C D E F G H I J K L M N O P Q R S T U V W X Y Z; do
- rm -f [lnx]f${i}*
- done
- # remove zero length qf files
- for qffile in $QUEUE/qf*; do
- if [ -r "$qffile" -a ! -s "$qffile" ]; then
- echo -n "<zero: $qffile> "
- rm -f "$qffile"
- fi
- done
- # rename tf files to be qf if the qf does not exist
- for tffile in $QUEUE/tf*; do
- qffile=`echo "$tffile" | sed 's/t/q/'`
- if [ -r "$tffile" -a ! -f "$qffile" ]; then
- echo -n "<recovering: $tffile> "
- mv "$tffile" "$qffile"
- elif [ -f "$tffile" ]; then
- echo -n "<extra: $tffile> "
- rm -f "$tffile"
- fi
- done
- # remove df files with no corresponding qf files
- for dffile in $QUEUE/df*; do
- qffile=`echo "$dffile" | sed 's/d/q/'`
- if [ -r "$dffile" -a ! -f "$qffile" ]; then
- echo -n "<incomplete: $dffile> "
- mv "$dffile" `echo $dffile | sed 's/d/D/'`
- fi
- done
- # announce files that have been saved during disaster recovery
- for xffile in $QUEUE/[A-Z]f*; do
- if [ -f "$xffile" ]; then
- echo -n "<panic: $xffile> "
- fi
- done
- }
-
-#
-# enhanced sendmail startup
-start() {
- # cleanup queues
- queue_clean;
-
- # Skip daemon run for the following:
- # * sendmail hasn't been configured
- # * smptd, a firewall frontend for sendmail, is installed
- # * If running a nullclient
- if [ ! -s /etc/mail/sendmail.mc ]; then
- echo "sendmail has not been configured, not started."
- echo "To configure sendmail, type sendmailconfig"
- exit 0
- elif [ -x $SMTPD ] || \
- egrep -qe "^[[:space:]]*FEATURE(nullclient)" \
- /etc/mail/sendmail.mc \
- ; then
- echo "sendmail daemon not needed, not started."
- exit 0
- fi
- # Ok, really start the puppy
- cd /var/lib/sendmail
- $START_CMD -- -bd -q"$Q"
- }
-
-#
-# enhanced sendmail shutdown
-stop () {
- $STOP_CMD --quiet --oknodo > /dev/null
- #
- # Now we have to wait until sendmail has _really_ stopped.
- #
- sleep 2
- if $STOP_CMD --quiet > /dev/null; then
- echo -n "Waiting ."
- cnt=0
- while $STOP_CMD --quiet > /dev/null; do
- cnt=`expr $cnt + 1`
- if [ $cnt -gt 60 ]; then
- #
- # Waited 120 seconds now. Fail.
- #
- echo -n " Failed "
- break
- fi
- sleep 2
- echo -n "."
- done
- echo -n " Done "
- fi
- }
-
-case "$1" in
- start)
- echo -n "Starting mail transport agent: "
- start
- echo "$NAME."
- ;;
-
- stop)
- echo -n "Stopping mail transport agent: "
- stop
- echo "$NAME."
- ;;
-
- restart)
- $0 stop
- $0 start
- ;;
-
- reload)
- echo -n "Reloading $NAME configuration..."
- $STOP_CMD --signal HUP
- echo "done."
- ;;
-
- force-reload)
- $0 reload
- ;;
-
- debug)
- echo -n "Dumping $NAME state..."
- $STOP_CMD --signal USR1
- echo "done."
- ;;
-
- *)
- echo "Usage: /etc/init.d/sendmail {start|stop|restart|reload|force-reload|debug}"
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/debian/sendmail.init.d.in b/debian/sendmail.init.d.in
new file mode 100644
index 0000000..5e72517
--- /dev/null
+++ b/debian/sendmail.init.d.in
@@ -0,0 +1,42 @@
+#!/bin/sh -e
+#
+# $Sendmail: init.d,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Sendmail rc script for Debian (/etc/init.d/sendmail)
+#
+# Copyright (c) 2001-@SM_CPYRT@, Richard Nelson <cowboy@debian.org>.
+#
+# Notes (to all):
+# * *** Do not edit this file *** Instead edit /etc/mail/sendmail.conf
+#
+# Notes (to self):
+# *
+#
+set -e;
+PATH=/bin:/usr/bin:/sbin:/usr/sbin;
+
+# All the real work is done by helper functions defined herein (really!)
+if [ ! -x @datadir@/sendmail/sendmail ]; then
+ echo "@datadir@/sendmail/sendmail not found/executable, aborting.";
+ exit 1;
+ fi;
+. @datadir@/sendmail/sendmail;
+
+exit 0
+
+# Control never reaches here, but lets keep lintian from bitching...
+case "$1" in
+ start)
+ ;;
+ stop)
+ ;;
+ restart)
+ ;;
+ restart-if-running)
+ ;;
+ reload|force-reload)
+ ;;
+ *)
+ ;;
+ esac;
+exit 0;
diff --git a/debian/sendmail.links.in b/debian/sendmail.links.in
new file mode 100644
index 0000000..e465f5a
--- /dev/null
+++ b/debian/sendmail.links.in
@@ -0,0 +1 @@
+@datadir@/sendmail/examples @docdir@/sendmail/examples
diff --git a/debian/sendmail.lintian-overrides b/debian/sendmail.lintian-overrides
new file mode 100644
index 0000000..dd94f51
--- /dev/null
+++ b/debian/sendmail.lintian-overrides
@@ -0,0 +1,16 @@
+# I *really* wish the next two items worked !!!
+#sendmail source: dh_testversion-is-deprecated
+#.*.changes: bad-distribution-in-changes-file private
+# There's a dummy #DEBHELPER# at the bottom, can't use it directly
+sendmail: duplicate-updaterc.d-calls-in-postinst sendmail
+# suidregister conditionaly used to support older releases
+sendmail: suidregister-used-in-maintainer-script postinst
+# Expected, and required
+sendmail: setuid-binary usr/sbin/sendmail 4755 root/mail
+sendmail: setgid-binary usr/sbin/sendmail 2755 root/mail
+sendmail: setgid-binary usr/lib/sm.bin/mailstats 2755 root/mail
+# Not yet in lintian
+sendmail-doc: prerm-does-not-remove-usr-doc-link
+sendmail-doc: postinst-does-not-set-usr-doc-link
+libmilter-dev: prerm-does-not-remove-usr-doc-link
+libmilter-dev: postinst-does-not-set-usr-doc-link
diff --git a/debian/sendmail.logrotate b/debian/sendmail.logrotate
new file mode 100644
index 0000000..37f2537
--- /dev/null
+++ b/debian/sendmail.logrotate
@@ -0,0 +1,86 @@
+# Logrotate file for sendmail
+
+/var/log/mail/mail.alert {
+ notifempty
+ rotate 4
+ size 100k
+ weekly
+ compress
+ missingok
+}
+
+/var/log/mail/mail.crit {
+ notifempty
+ rotate 4
+ size 100k
+ weekly
+ compress
+ missingok
+}
+
+/var/log/mail/mail.debug {
+ notifempty
+ rotate 4
+ size 100k
+ weekly
+ compress
+ missingok
+}
+
+/var/log/mail/mail.emerg {
+ notifempty
+ rotate 4
+ size 100k
+ weekly
+ compress
+ missingok
+}
+
+/var/log/mail/mail.err {
+ notifempty
+ rotate 4
+ size 100k
+ weekly
+ compress
+ missingok
+}
+
+/var/log/mail/mail.info {
+ notifempty
+ rotate 4
+ size 100k
+ weekly
+ compress
+ missingok
+}
+
+/var/log/mail/mail.log {
+ create 0660 root mail
+ notifempty
+ rotate 4
+ size 100k
+ weekly
+ compress
+ missingok
+ postrotate
+ /etc/init.d/sysklogd reload
+ endscript
+}
+
+/var/log/mail/mail.notice {
+ notifempty
+ rotate 4
+ size 100k
+ weekly
+ compress
+ missingok
+}
+
+/var/log/mail/mail.warn {
+ notifempty
+ rotate 4
+ size 100k
+ weekly
+ compress
+ missingok
+}
diff --git a/debian/sendmail.postinst b/debian/sendmail.postinst
deleted file mode 100644
index 1e4aa11..0000000
--- a/debian/sendmail.postinst
+++ /dev/null
@@ -1,331 +0,0 @@
-#!/bin/sh -e
-set -e
-
-case "$1" in
- configure)
- # continue below
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
- exit 0
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 0
- ;;
- esac
-
-#--------------------------------------------------------------------
-# Continuation of "$1" = "configure"
-
-#if [ "$2" = "" ]; then echo "first time"; fi
-
-# Note: can't use debhelper here because the actions aren't contiguous
-#xxxHELPER#
-
-# This would be done via debhelper, but the start of sendmail must be delayed
-
-# Automatically added by dh_installdocs
-if [ "$1" = "configure" ]; then
- if [ -d /usr/doc -a ! -e /usr/doc/sendmail -a -d /usr/share/doc/sendmail ]; then
- ln -sf ../share/doc/sendmail /usr/doc/sendmail
- fi
-fi
-# End automatically added section
-# Automatically added by dh_installinit
-update-rc.d sendmail defaults >/dev/null
-#/etc/init.d/sendmail start
-# End automatically added section
-# Automatically added by dh_installmenu
-#if test -x /usr/bin/update-menus ; then update-menus ; fi
-# End automatically added section
-# Automatically added by dh_suidregister
-if command -v suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then
- suidregister -s sendmail /usr/sbin/sendmail root mail 04755
-elif [ -e /usr/sbin/sendmail ]; then
- chown root.mail /usr/sbin/sendmail
- chmod 04755 /usr/sbin/sendmail
- fi
-if command -v suidregister >/dev/null 2>&1 && [ -e /etc/suid.conf ]; then
- suidregister -s sendmail /usr/lib/sm.bin/mail.local root mail 04755
-elif [ -e /usr/lib/sm.bin/mail.local ]; then
- chown root.mail /usr/lib/sm.bin/mail.local
- chmod 04755 /usr/lib/sm.bin/mail.local
- fi
-# End automatically added section
-
-/etc/init.d/sendmail stop
-update-inetd --disable smtp
-
-#-----------------------------------------------------------
-# Create any needed directories, and move any prior data to
-# its new home
-
-if [ ! -d /etc/mail ]; then
- mkdir /etc/mail
- chown root.mail /etc/mail
- chmod 02770 /etc/mail
- fi
-
-if [ ! -f /etc/mail/aliases -a ! -f /etc/aliases ]; then
- if [ -f /usr/doc/sendmail/examples/db-examples/aliases ]; then
- cp /usr/doc/sendmail/examples/db-examples/aliases /etc/aliases
- fi
- fi
-
-if [ ! -d /var/spool/mail ]; then
- mkdir /var/spool/mail
- chown root.mail /var/spool/mail
- chmod 03775 /var/spool/mail
- fi
-
-if [ ! -d /var/spool/mqueue ]; then
- mkdir /var/spool/mqueue
- chown root.mail /var/spool/mqueue
- chmod 0750 /var/spool/mqueue
- fi
-
-if [ ! -d /var/lib/sendmail ]; then
- mkdir /var/lib/sendmail
- chown root.mail /var/lib/sendmail
- chmod 02750 /var/lib/sendmail
- fi
-
-if [ -d /var/state/sendmail/host_status ]; then
- echo "Moving host_status to /var/lib/sendmail/host_status"
- mv /var/state/sendmail/host_status /var/lib/sendmail/host_status
-elif [ -d /var/sendmail ]; then
- echo "Moving /var/sendmail to /var/lib/sendmail"
- mv -f /var/sendmail/* /var/lib/sendmail/ || true
- rm -rf /var/sendmail
- fi
-if [ ! -d /var/lib/sendmail/host_status ]; then
- mkdir /var/lib/sendmail/host_status
- fi
-if [ -d /var/lib/sendmail/host_status ]; then
- chown root.mail /var/lib/sendmail/host_status
- chmod 02750 /var/lib/sendmail/host_status
- fi
-
-if [ -f /var/log/sendmail.st ]; then
- echo "Moving /var/log/sendmail.st to /var/lib/sendmail/sendmail.st"
- mv /var/log/sendmail.st /var/lib/sendmail/sendmail.st
- fi
-if [ -f /var/lib/sendmail/sendmail.st ]; then
- chown root.mail /var/lib/sendmail/sendmail.st
- chmod 0660 /var/lib/sendmail/sendmail.st
- fi
-
-#-----------------------------------------------------------
-# Move sendmail.{mc,cf} from /etc/ to /etc/mail
-if [ ! -f /etc/mail/sendmail.mc ]; then
- if [ -f /etc/sendmail.mc ]; then
- # Move from /etc/sendmail.* to /etc/mail/sendmail.*
- echo "Moving /etc/sendmail.* to /etc/mail"
- mv /etc/sendmail.mc /etc/mail/sendmail.mc
- chown root.mail /etc/mail/sendmail.mc
- chmod 0664 /etc/mail/sendmail.mc
- mv /etc/sendmail.mc /etc/mail/sendmail.cf
- fi;
- fi;
-
-start_ask=0
-#-----------------------------------------------------------
-#start(): start sendmail
-start () {
- if [ $start_ask -eq 1 ]; then
- echo " "
- echo -n "Start sendmail now? (Y/n) "
- read yn
- yn=$(echo -n "$yn" | sed -e "s/^\ *//" -e "s/^\t*//")
- test -n "$yn" || yn="Y"
- case "$yn" in
- [Yy]*)
- /etc/init.d/sendmail start
- ;;
- [Nn]*)
- echo " "
- echo "Not started; to start later," \
- "type: /etc/init.d/sendmail start"
- echo -n "Press [ENTER] "
- read yn
- ;;
- esac
- fi;
- }
-
-#-----------------------------------------------------------
-# configure(): save sendmail.cf, call sendmailconfig
-configure () {
- echo -n "Configure now ? (y/N) "
- read yn
- yn=$(echo -n "$yn" | sed -e "s/^\ *//" -e "s/^\t*//")
- test -n "$yn" || yn="N"
- case "$yn" in
- [Yy]*)
- if [ -f /etc/mail/sendmail.cf ]; then
- echo "Saving old /etc/mail/sendmail.cf" \
- "as /etc/mail/sendmail.cf.old ..."
- mv -f /etc/mail/sendmail.cf \
- /etc/mail/sendmail.cf.old
- chown root.mail /etc/mail/sendmail.cf.old
- chmod 0644 /etc/mail/sendmail.cf.old
- fi;
- sendmailconfig --no-reload
- start
- ;;
- [Nn]*)
- echo -e "\nTo configure sendmail later, type" \
- "sendmailconfig"
- echo "After configuring sendmail, you can" \
- "start it via /etc/init.d/sendmail start"
- echo -n "Press [ENTER] "
- read yn
- ;;
- esac
- }
-
-
-#-----------------------------------------------------------
-# Create /etc/mail/sendmail.mc if it doesn't exist
-if [ ! -f /etc/mail/sendmail.mc ]; then
- cat <<-EOT
-
- You are doing a new install, or have erased /etc/mail/sendmail.mc.
- If you've accidentaly erased /etc/mail/sendmail.mc, check /var/backups.
-
- Sendmail will not start until it is configured.
- Do you wish to configure sendmail now, or wait until later?
-
- EOT
- start_ask=1
- start_txt=""
- configure
- exit 0
- fi;
-
-#-----------------------------------------------------------
-# Next, save the current files in safe place...
-echo "Saving current /etc/mail/sendmail.{mc,cf} to /var/backups"
-/etc/cron.daily/sendmail
-
-#-----------------------------------------------------------
-# Perform some updated to an existing sendmail.mc to make
-# sure it is compatible with the current executables.
-changed=0
-if (grep -q "^[[:space:]]*FEATURE(mailertable, \`text /etc/mail/mailertable')dnl" /etc/mail/sendmail.mc); then
- echo "Correcting FEATURE(mailertable) in /etc/mail/sendmail.mc"
- sed "s?FEATURE(mailertable, \`text /etc/mail/mailertable')dnl?FEATURE(mailertable)dnl?g" \
- /etc/mail/sendmail.mc > /etc/mail/sendmail.mc.new
- changed=1
- chown root.mail /etc/mail/sendmail.mc.new
- chmod 0664 /etc/mail/sendmail.mc.new
- mv /etc/mail/sendmail.mc.new /etc/mail/sendmail.mc
- fi;
-if (grep -q "^[[:space:]]*FEATURE(smrsh, \`/usr/sbin/smrsh')dnl" /etc/mail/sendmail.mc); then
- echo "Correcting FEATURE(smrsh) in /etc/mail/sendmail.mc"
- sed "s?FEATURE(smrsh, \`/usr/sbin/smrsh')dnl?FEATURE(smrsh, \`/usr/lib/sm.bin/smrsh')dnl?g" \
- /etc/mail/sendmail.mc > /etc/mail/sendmail.mc.new
- changed=1
- chown root.mail /etc/mail/sendmail.mc.new
- chmod 0664 /etc/mail/sendmail.mc.new
- mv /etc/mail/sendmail.mc.new /etc/mail/sendmail.mc
- fi;
-
-
-#-----------------------------------------------------------
-# See if we can do this automagically...
-cat <<-EOT
-
-It's usually a good idea to regenerate the sendmail.cf configuration
-file with each new spin of the sendmail package.
-
-But, if you hand edited it instead of making changes through sendmail.mc,
-then you want to say no, save your old sendmail.cf, run sendmailconfig,
-then migrate your changes into the new version.
-
-EOT
-echo -n "Automagically regenerate the sendmail.cf configuration file? (Y/n) "
-read yn
-yn=$(echo -n "$yn" | sed -e "s/^\ *//" -e "s/^\t*//")
-test -n "$yn" || yn="Y"
-case "$yn" in
- [Yy]*)
- ;;
- [Nn]*)
- cat <<-EOT
-
- OK, your sendmail.cf has *not* been altered.
- EOT
- if [ $changed -eq 1 ]; then
- cat <<-EOT
-
- *** Warning ***
- There have been changes in the paths
- of some databases and executables referenced
- in /etc/mail/sendmail.mc. These changes
- were made for you (see the "Correcting" messages
- above), but they have *not* been
- reflected in /etc/mail/sendmail.cf!
-
- Until you update /etc/mail/sendmail.cf as
- outlined above, you should expect to have
- problems running sendmail!
-
- "Well, a pet peeve of mine is people who
- directly edit the .cf file instead of using
- the m4 configuration files. Don't do it!
- [laughs] I treat the .cf file as a binary
- file - you should too."
- -- Eric Allman 1999/10/18
-
- EOT
- fi;
- echo "Do you wish to run sendmailconfig now, or later"
- start_ask=0
- configure
- case "$yn" in
- [Yy]*)
- cat <<-EOT
-
- Do you wish to start sendmail with the new sendmail.cf,
- or do you wish to delay until you can merge any changes
- from your older sendmail.cf.old?
- EOT
- start_ask=1
- start
- ;;
- esac
- exit 0
- esac
-
-#-----------------------------------------------------------
-# If we're still here, we're going the automagic path...
-# Now, liberal application of smoke and mirrors
-if [ -f /etc/mail/sendmail.mc ]; then
- if [ -f /etc/mail/sendmail.cf ]; then
- echo "Saving old /etc/mail/sendmail.cf" \
- "as /etc/mail/sendmail.cf.old ..."
- cp -f /etc/mail/sendmail.cf \
- /etc/mail/sendmail.cf.old
- chown root.mail /etc/mail/sendmail.cf.old
- chmod 0644 /etc/mail/sendmail.cf.old
- fi;
- /usr/share/sendmail/updatedb || true
- start_ask=1
- start
- fi;
-
-exit 0
-
-#-----------------------------------------------------------
-#if test "$1" = configure && dpkg --compare-versions "$2" lt 8.9.3-4; then
-#if (sed -n -e "/^DZ/s/^DZ//p" /etc/mail/sendmail.cf \
-#| grep "8.9.3" > /dev/null); then
-#echo "Existing /etc/mail/sendmail.cf found, and it appears it may be"
-#echo -n "compatible with this version of sendmail. Use it? [Y] "
-#
-# List herein (for reference) what debhelper would've done:
-#xDEBHELPER#
-exit 0
diff --git a/debian/sendmail.postinst.in b/debian/sendmail.postinst.in
new file mode 100644
index 0000000..d2cd445
--- /dev/null
+++ b/debian/sendmail.postinst.in
@@ -0,0 +1,356 @@
+#!/bin/sh -e
+#
+# Debian post installation script
+#
+# Install of already installed package:
+# 1) old-prerm upgrade new-version
+# *) new-prerm failed-upgrade old-version
+# *) old-postinst abort-upgrade new-version
+#
+# If a `conflicting' package is being removed at the same time:
+# 1) forall packages depending on conflicting package and --auto-deconfigure
+# deconfigured's-prerm deconfigure \
+# in-favour package-being-installed version \
+# removing conflicting-package version
+# *) deconfigured's-postinst abort-deconfigure \
+# in-favour package-being-installed-but-failed version \
+# removing conflicting-package version
+# 2) To prepare for removal of the conflicting package
+# conflictor's-prerm remove \
+# in-favour package new-version
+# *) conflictor's-postinst abort-remove \
+# in-favour package new-version
+#
+# Configuration of package:
+# postinst configure most-recently-configured-version
+#
+set -e;
+
+PACKAGE=`echo "$(basename $0)" | sed -e 's/\.postinst$//'`;
+
+# do we have debconf?
+if [ -f /usr/share/debconf/confmodule ]; then
+ DEBCONF=true;
+ #. /usr/share/debconf/confmodule;
+ #db_stop; # For testing
+else
+ DEBCONF='';
+ fi;
+
+case "$1" in
+ configure)
+ # continue below
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ exit 0;
+ ;;
+
+ *)
+ echo "$PACKAGE postinst called with unknown argument \`$1'" >&2;
+ exit 1;
+ ;;
+ esac;
+
+#--------------------------------------------------------------------
+# Continuation of "$1" = "configure"
+
+if [ "$2" = "" ]; then
+ echo " ";
+ echo "A new sendmail user, welcome!";
+ fi;
+
+# Note: can't use debhelper here because the actions aren't contiguous
+#xxxHELPER#
+
+# This would be done via debhelper, but the start of sendmail must be delayed
+
+if [ '@DEBIAN_DH@' != '4.1' ]; then
+# Automatically added by dh_installdocs
+if [ "$1" = "configure" ]; then
+ if [ -d /usr/doc -a ! -e /usr/doc/sendmail -a -d /usr/share/doc/sendmail ]; then
+ ln -sf ../share/doc/sendmail /usr/doc/sendmail
+ fi
+fi
+# End automatically added section
+fi;
+# Automatically added by dh_installinit
+if [ -x "@sysconfdir@/init.d/sendmail" ]; then
+ update-rc.d sendmail defaults >/dev/null
+ #/etc/init.d/sendmail start
+fi
+# End automatically added section
+# Automatically added by dh_installmenu
+#if test -x /usr/bin/update-menus ; then update-menus ; fi
+# End automatically added section
+
+#-----------------------------------------------------------
+# Tell users about new and interesting things...
+if [ -x @datadir@/sendmail/update_notices ]; then
+ @datadir@/sendmail/update_notices $2;
+ fi;
+
+
+#-----------------------------------------------------------
+if test ! -z "$version" && \
+ (dpkg --compare-versions "$version" lt 8.12.6-5); then
+ if [ -x /usr/sbin/deluser ]; then
+ deluser --quiet smmsp || true;
+ else
+ userdel smmsp || true;
+ fi;
+ if [ -x /usr/sbin/delgroup ]; then
+ delgroup --quiet smmsp || true;
+ else
+ groupdel smmsp || true;
+ fi;
+ fi;
+# Create group/user smmsp iff needed
+touch @sysconfdir@/mail/smmsp;
+if ! chown root:smmsp @sysconfdir@/mail/smmsp 2>/dev/null; then
+ addgroup --system --quiet smmsp;
+ fi;
+if ! chown smmsp:smmsp @sysconfdir@/mail/smmsp 2>/dev/null; then
+ adduser --system --ingroup smmsp --home "/var/lib/sendmail" \
+ --disabled-password \
+ --quiet --gecos 'Mail Submission Program' smmsp;
+ fi;
+rm @sysconfdir@/mail/smmsp;
+
+#-----------------------------------------------------------
+# With a dynamic uid/gid, have to set appropriate ownership herein
+if command -v suidregister >/dev/null 2>&1 && test -s /etc/suid.conf; then
+ suidregister -s sendmail @sbindir@/sendmail root smmsp 02755;
+ suidregister -s sendmail @libexecdir@/mailstats root smmsp 02755;
+elif [ -x @sbindir@/sendmail ]; then
+ chown root:smmsp @sbindir@/sendmail;
+ chmod 02755 @sbindir@/sendmail;
+ chown root:smmsp @libexecdir@/mailstats;
+ chmod 02755 @libexecdir@/mailstats;
+ fi;
+chown root:smmsp @sysconfdir@/mail/sasl;
+chown root:smmsp @sysconfdir@/mail/tls;
+
+#-----------------------------------------------------------
+# Make sure inetd.conf has sendmail in it (but disabled)
+if [ -x /usr/sbin/update-inetd ]; then
+ update-inetd --group MAIL --remove smtp;
+ update-inetd --group MAIL --remove smtps;
+ update-inetd --group MAIL --remove 587;
+ update-inetd --group MAIL --add \
+ "smtp \tstream\ttcp\tnowait\troot\t@sbindir@/sendmail sendmail -Am -bs";
+ update-inetd --group MAIL --add \
+ "587 \tstream\ttcp\tnowait\troot\t@sbindir@/sendmail sendmail -Am -bs";
+ update-inetd --group MAIL --add \
+ "smtps\tstream\ttcp\tnowait\troot\t@sbindir@/sendmail sendmail -Am -bs";
+ update-inetd --group MAIL --disable smtp,smtps,587;
+ fi;
+
+#-----------------------------------------------------------
+# Save the current configuration files in safe place...
+if [ -x @sysconfdir@/cron.daily/sendmail ]; then
+ echo "Saving current /etc/mail/sendmail.mc,cf to /var/backups";
+ @sysconfdir@/cron.daily/sendmail || true;
+ fi;
+
+#-----------------------------------------------------------
+#stop(): stop sendmail
+stop () {
+ # Account for varying PIDfile locations of older sendmail packages
+ if [ -f /var/run/sendmail/msp/sendmail.pid ]; then
+ start-stop-daemon --stop --oknodo --quiet \
+ --pidfile /var/run/sendmail/msp/sendmail.pid > /dev/null;
+ start-stop-daemon --stop --oknodo --quiet \
+ -pidfile /var/run/sendmail/mta/sendmail.pid > /dev/null;
+ elif [ -f /var/run/sendmail/sendmail.pid ]; then
+ start-stop-daemon --stop --oknodo --quiet \
+ --pidfile /var/run/sendmail/sendmail.pid > /dev/null;
+ elif [ -f /var/run/sendmail.pid ]; then
+ start-stop-daemon --stop --oknodo --quiet \
+ --pidfile /var/run/sendmail.pid > /dev/null;
+ fi;
+ if [ -x @sysconfdir@/init.d/sendmail ]; then
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ /usr/sbin/invoke-rc.d --quiet --force sendmail stop;
+ else
+ @sysconfdir@/init.d/sendmail stop;
+ fi;
+ fi;
+ };
+
+start_ask=0;
+
+#-----------------------------------------------------------
+#start(): start sendmail
+start () {
+ local enter;
+ if [ $start_ask -eq 1 ]; then
+ echo " ";
+ echo -n "Start sendmail now? (Y/n) ";
+ read yn;
+ yn=$(echo -n "$yn" | sed -e "s/^\ *//" -e "s/^\t*//");
+ test -n "$yn" || yn="Y";
+ case "$yn" in
+ [Yy]*)
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ /usr/sbin/invoke-rc.d sendmail start;
+ else
+ @sysconfdir@/init.d/sendmail start;
+ fi;
+ ;;
+ [Nn]*)
+ echo " ";
+ echo "Not started; to start later," \
+ "type: @sysconfdir@/init.d/sendmail start";
+ echo -n "Press [ENTER] ";
+ read enter;
+ ;;
+ esac;
+ fi;
+ };
+
+#-----------------------------------------------------------
+# configure(): save sendmail.cf, call sendmailconfig
+configure () {
+ local enter;
+ echo -n "Configure now ? (y/N) ";
+ read yn;
+ yn=$(echo -n "$yn" | sed -e "s/^\ *//" -e "s/^\t*//");
+ test -n "$yn" || yn="N";
+ case "$yn" in
+ [Yy]*)
+ if [ -f @sysconfdir@/mail/sendmail.cf ]; then
+ echo "Saving old /etc/mail/sendmail.cf" \
+ "as /etc/mail/sendmail.cf.old ...";
+ mv -f @sysconfdir@/mail/sendmail.cf \
+ @sysconfdir@/mail/sendmail.cf.old;
+ chown root:root @sysconfdir@/mail/sendmail.cf.old;
+ chmod 0644 @sysconfdir@/mail/sendmail.cf.old;
+ fi;
+ @sbindir@/sendmailconfig --no-reload;
+ start;
+ ;;
+
+ [Nn]*)
+ echo -e "\nTo configure sendmail later, type" \
+ "sendmailconfig";
+ echo "After configuring sendmail, you can" \
+ "start it via @sysconfdir@/init.d/sendmail start";
+ echo -n "Press [ENTER] ";
+ read enter;
+ ;;
+ esac;
+ };
+
+#-----------------------------------------------------------
+# Create /etc/mail/sendmail.mc if it doesn't exist
+if [ ! -f @sysconfdir@/mail/sendmail.mc ]; then
+ cat <<-EOT
+
+ You are doing a new install, or have erased /etc/mail/sendmail.mc.
+ If you've accidentaly erased /etc/mail/sendmail.mc, check /var/backups.
+
+ Sendmail will not start until it is configured.
+ Do you wish to configure sendmail now, or wait until later?
+
+ EOT
+ start_ask=1;
+ start_txt="";
+ configure;
+ exit 0;
+ fi;
+
+#-----------------------------------------------------------
+# See if we can do this automagically...
+cat <<-EOT
+
+It is a good idea to regenerate the sendmail configuration
+file with each new spin of the sendmail package.
+
+But, if you hand edit sendmail.cf instead of making changes through
+sendmail.mc, then you want to say no, save your old sendmail.cf, run
+sendmailconfig, then migrate your changes into the new version.
+
+EOT
+echo -n "Automagically regenerate the sendmail.cf configuration file? (Y/n) ";
+read yn;
+yn=$(echo -n "$yn" | sed -e "s/^\ *//" -e "s/^\t*//");
+test -n "$yn" || yn="Y";
+case "$yn" in
+ [Yy]*)
+ if [ -f @sysconfdir@/mail/sendmail.cf ]; then
+ echo "Saving old /etc/mail/sendmail.cf" \
+ "as /etc/mail/sendmail.cf.old ...";
+ cp -f @sysconfdir@/mail/sendmail.cf \
+ @sysconfdir@/mail/sendmail.cf.old;
+ chown root:root @sysconfdir@/mail/sendmail.cf.old;
+ chmod 0644 @sysconfdir@/mail/sendmail.cf.old;
+ fi;
+ if [ -x @datadir@/sendmail/update_sendmail ]; then
+ stop;
+ echo "Updating sendmail environment ...";
+ @datadir@/sendmail/update_sendmail || true;
+ fi;
+ ;;
+
+ [Nn]*)
+ cat <<-EOT
+
+ Your files (sendmail.mc,cf, etc) have *not* been altered.
+
+ *** Warning *** Warning *** Warning *** Warning *** Warning *** Warning ***
+
+ There have been changes in
+ * Paths of some databases and executables
+ * FEATUREs, DOMAIN, includes
+ * Internal Database storage
+
+ These changes were *NOT* made for you ... And will not be
+ until you run sendmailconfig!
+
+ Until you update /etc/mail/sendmail.cf via sendmailconfig,
+ you should expect to have problems running sendmail!
+
+ "Well, a pet peeve of mine is people who directly edit the
+ .cf file instead of using the m4 configuration files.
+ Don't do it! [laughs] I treat the .cf file as a binary
+ file - you should too."
+ -- Eric Allman 1999/10/18
+
+ *** Warning *** Warning *** Warning *** Warning *** Warning *** Warning ***
+
+ EOT
+ echo "Do you wish to run sendmailconfig now, or later";
+ start_ask=0;
+ stop;
+ configure;
+ case "$yn" in
+ [Yy]*)
+ cat <<-EOT
+
+ Do you wish to start sendmail with the new sendmail.cf,
+ or do you wish to delay until you can merge any changes
+ from your older sendmail.cf.old?
+ EOT
+ start_ask=1;
+ start;
+ ;;
+ esac;
+ exit 0;
+ esac;
+
+#-----------------------------------------------------------
+# If we're still here, we're going the automagic path...
+# Now, liberal application of smoke and mirrors
+if [ -f @sysconfdir@/mail/sendmail.mc ]; then
+ start_ask=1;
+ start;
+ fi;
+
+exit 0;
+
+#-----------------------------------------------------------
+#
+# List herein (for reference) what debhelper would've done:
+#DEBHELPER#
+exit 0;
diff --git a/debian/sendmail.postrm b/debian/sendmail.postrm
deleted file mode 100644
index cf70ba9..0000000
--- a/debian/sendmail.postrm
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh -e
-set -e
-
-case "$1" in
- remove)
- ;;
-
- purge)
- rm -rf /var/sendmail
- rm -rf /usr/doc/sendmail
- rm -rf /usr/share/doc/sendmail
- rm -rf /usr/share/sendmail
- rm -rf /var/spool/mqueue
- rm -f /etc/sendmail.cf \
- /etc/aliases.db /etc/aliases.dir /etc/aliases.pag
- if [ -f /etc/mail/aliases -a -L /etc/aliases ]; then
- mv /etc/mail/aliases /etc/aliases;
- fi;
- rm -rf /etc/mail/peers
- #cd /etc/mail && make clean
- rm -f /etc/mail/*.db /etc/mail/*.dir /etc/mail/*.pag
- rm -f /etc/mail/sendmail.cf /etc/mail/sendmail.cf.old \
- /etc/mail/sendmail.mc /etc/mail/sendmail.mc.old \
- /etc/mail/databases /etc/mail/Makefile
- rmdir /etc/mail 2>/dev/null || true
- ;;
-
- upgrade)
- ;;
-
- failed-upgrade|abort-install|abort-upgrade|disappear)
- ;;
-
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 0
- ;;
- esac
-
-#DEBHELPER#
-exit 0
diff --git a/debian/sendmail.postrm.in b/debian/sendmail.postrm.in
new file mode 100644
index 0000000..47451b4
--- /dev/null
+++ b/debian/sendmail.postrm.in
@@ -0,0 +1,119 @@
+#!/bin/sh -e
+#
+# Debian post removal script
+#
+# Install of already installed package:
+# 1) Upgrade of package:
+# new-preinst upgrade old-version
+# *) new-postrm abort-upgrade old-version
+# 2) package had some configuration files from a previous version installed
+# new-preinst install old-version
+# *) new-postrm abort-install old-version
+# 3) Otherwise (i.e., the package was completely purged)
+# new-preinst install
+# *) new-postrm abort-install
+#
+# Removal of a package:
+# 1) prerm remove
+# 2) The package's files are removed (except conffiles).
+# 3) postrm remove
+# 4) All the maintainer scripts except the postrm are removed.
+# 5) The conffiles and any backup files
+# (~-files, #*# files, %-files, .dpkg-{old,new,tmp}, etc.) are removed.
+# 6) postrm purge
+# 7) The package's file list is removed
+#
+set -e;
+
+PACKAGE=`echo "$(basename $0)" | sed -e 's/\.postrm$//'`;
+
+case "$1" in
+ remove)
+ if [ ! -z "$2" ]; then
+ echo "Removing $PACKAGE $2 $3($4)";
+ if [ "$PACKAGE" = 'sendmail' -a "$3" = 'sendmail-tls' ] || \
+ [ "$PACKAGE" = 'sendmail-tls' -a "$3" = 'sendmail' ]; then
+ echo '...Nothing to do...';
+ exit 0;
+ fi;
+ fi;
+ if [ -x /usr/sbin/update-inetd ]; then
+ update-inetd --remove smtp;
+ update-inetd --remove smtps;
+ update-inetd --remove 587;
+ fi;
+ ;;
+
+ purge)
+ # If postrm is called *AND* there are no files, exit quickly
+ # (This is a *GROSS* hack... beter use the test below)
+ #if [ ! -s `echo "$0" | sed -e 's/postrm$/list/'` ]; then
+ # echo "Purging replaced package $PACKAGE, nothing to do...";
+ # exit 0;
+ # fi;
+
+ # We're *really* purging; neither sendmail nor sendmail-tls
+ # is currently installed
+ if [ -f @libexecdir@/sendmail ]; then
+ echo "Purging replaced package $PACKAGE, nothing to do...";
+ exit 0;
+ fi;
+
+ # Currently, dh_installdebconf doesn't do db_stop... ensure it is done!
+ if [ "$1" = "purge" -a -e /usr/share/debconf/confmodule ]; then
+ # Source debconf library.
+ . /usr/share/debconf/confmodule;
+ # Make sure we're done
+ #db_stop;
+ # Remove my changes to the db.
+ db_purge;
+ fi;
+
+ # Remove user/group smmsp
+ if [ -x /usr/sbin/deluser ]; then
+ deluser --quiet smmsp || true;
+ fi;
+ userdel smmsp 2>/dev/null || true;
+ groupdel smmsp 2>/dev/null || true;
+
+ # Purge those files installed in other package directories
+ rm -f @libdir@/lib/sasl/Sendmail.conf;
+ rm -f @sysconfdir@/certs/sendmail.pem;
+ # Can't touch these as they may be included in slapd.conf
+ #rm -rf @sysconfdir@/ldap/schema/sendmail.schema;
+ #rm -rf @sysconfdir@/openldap/sendmail.schema;
+ #rm -rf @sysconfdir@/umich-ldap/sendmail.schema;
+ # Purge psuedo conffiles (managed by sendmail)
+ rm -f @sysconfdir@/mail/sendmail.conf;
+ # Purge sendmail configuration files
+ rm -f @sysconfdir@/mail/sendmail.mc \
+ @sysconfdir@/mail/submit.mc \
+ @sysconfdir@/mail/dialup.m4 \
+ @sysconfdir@/mail/provider.m4 \
+ @sysconfdir@/mail/local-host-names \
+ @sysconfdir@/mail/relay-domains \
+ @sysconfdir@/mail/trusted-users \
+ @sysconfdir@/mail/default-auth-info \
+ ;
+ rmdir @sysconfdir@/mail/peers 2>/dev/null || true;
+ rmdir @sysconfdir@/mail 2>/dev/null || true;
+ ;;
+
+ upgrade)
+ ;;
+
+ failed-upgrade|abort-install|abort-upgrade|disappear)
+ echo "$1 of $PACKAGE $2";
+ ;;
+
+ *)
+ echo "$PACKAGE postrm called with unknown argument \`$1'" >&2;
+ exit 1;
+ ;;
+ esac;
+
+# NOTE WELL: If we fall through here during purge, update-rc.d will be
+# called with remove... and /etc/init.d/$PACKAGE goes away!
+#DEBHELPER#
+
+exit 0;
diff --git a/debian/sendmail.preinst b/debian/sendmail.preinst
deleted file mode 100644
index 5393c22..0000000
--- a/debian/sendmail.preinst
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh -e
-set -e
-
-case "$1" in
- install)
- ;;
-
- upgrade)
- ;;
-
- abort-upgrade)
- ;;
-
- *)
- echo "preinst called with unknown argument \`$1'" >&2
- exit 0
- ;;
- esac
-
-#DEBHELPER#
-exit 0
diff --git a/debian/sendmail.preinst.in b/debian/sendmail.preinst.in
new file mode 100644
index 0000000..17d115d
--- /dev/null
+++ b/debian/sendmail.preinst.in
@@ -0,0 +1,61 @@
+#!/bin/sh -e
+#
+# Debian pre install script
+#
+# Install of already installed package:
+# 1) Upgrade of package:
+# new-preinst upgrade old-version
+# *) new-postrm abort-upgrade old-version
+# 2) package had some configuration files from a previous version installed
+# new-preinst install old-version
+# *) new-postrm abort-install old-version
+# 3) Otherwise (i.e., the package was completely purged)
+# new-preinst install
+# *) new-postrm abort-install
+#
+set -e;
+
+PACKAGE=`echo "$(basename $0)" | sed -e 's/\.preinst$//'`;
+
+# do we have debconf?
+if [ -f /usr/share/debconf/confmodule ]; then
+ DEBCONF=true;
+ . /usr/share/debconf/confmodule;
+else
+ DEBCONF='';
+ fi;
+
+case "$1" in
+ install)
+ ;;
+
+ upgrade)
+ # DPKG doesn't overwrite directories with symlinks...
+ rm -rf @docdir@/sendmail/examples 2>/dev/null || true;
+ rm -rf @libdir@/sendmail 2>/dev/null || true;
+
+ # Somehow, /etc/logrotate.d/sendmail didn't get erased !?!
+ rm -rf @sysconfdir@/logrotate.d/sendmail 2>/dev/null || true;
+
+ # Prevent cronjob from running during upgrade...
+ if [ -f /etc/cron.d/sendmail ]; then
+ echo "#preinst" > @sysconfdir@/cron.d/sendmail;
+ fi;
+
+ # Move files to new home
+ if [ -d @sysconfdir@/mail/ssl ]; then
+ mv -f @sysconfdir@/mail/ssl @sysconfdir@/mail/tls;
+ fi;
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "$PACKAGE preinst called with unknown argument \`$1'" >&2;
+ exit 1;
+ ;;
+ esac;
+
+#DEBHELPER#
+exit 0;
diff --git a/debian/sendmail.prerm b/debian/sendmail.prerm
deleted file mode 100644
index 840eabe..0000000
--- a/debian/sendmail.prerm
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh -e
-set -e
-
-case "$1" in
- remove)
- /etc/init.d/sendmail stop
- ;;
-
- upgrade)
- ;;
-
- failed-upgrade)
- ;;
-
- deconfigure)
- ;;
-
- *)
- echo "prerm called with unknown argument \`$1'" >&2
- exit 0
- ;;
- esac
-
-# The @DEBHELPER@ stuff causes problems with upgrades because of the
-# length of time that sendmail is stopped...
-
-# Automatically added by dh_installdocs
-if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/sendmail ]; then
- rm -f /usr/doc/sendmail
-fi
-# End automatically added section
-# Automatically added by dh_installinit
-#/etc/init.d/sendmail stop
-# End automatically added section
-#@DEBHELPER#
-exit 0
diff --git a/debian/sendmail.prerm.in b/debian/sendmail.prerm.in
new file mode 100644
index 0000000..fdeae7d
--- /dev/null
+++ b/debian/sendmail.prerm.in
@@ -0,0 +1,153 @@
+#!/bin/sh -e
+#
+# Debian pre removal script
+#
+# Install of already installed package:
+# 1) old-prerm upgrade new-version
+# *) new-prerm failed-upgrade old-version
+# *) old-postinst abort-upgrade new-version
+#
+# If a `conflicting' package is being removed at the same time:
+# 1) forall packages depending on conflicting package and --auto-deconfigure
+# deconfigured's-prerm deconfigure \
+# in-favour package-being-installed version \
+# removing conflicting-package version
+# *) deconfigured's-postinst abort-deconfigure \
+# in-favour package-being-installed-but-failed version \
+# removing conflicting-package version
+# 2) To prepare for removal of the conflicting package
+# conflictor's-prerm remove \
+# in-favour package new-version
+# *) conflictor's-postinst abort-remove \
+# in-favour package new-version
+#
+# Removal of a package:
+# 1) prerm remove
+# 2) The package's files are removed (except conffiles).
+# 3) postrm remove
+# 4) All the maintainer scripts except the postrm are removed.
+#
+set -e;
+
+PACKAGE=`echo "$(basename $0)" | sed -e 's/\.prerm$//'`;
+
+case "$1" in
+ remove)
+ if [ ! -z "$2" ]; then
+ echo "Removing $PACKAGE $2 $3($4)";
+ if [ "$PACKAGE" = 'sendmail' -a "$3" = 'sendmail-tls' ] || \
+ [ "$PACKAGE" = 'sendmail-tls' -a "$3" = 'sendmail' ]; then
+ echo '...Nothing to do...';
+ exit 0;
+ fi;
+ fi;
+ if [ -x /usr/sbin/update-inetd ]; then
+ update-inetd --disable smtp;
+ fi;
+ if [ -x @sysconfdir@/init.d/sendmail ]; then
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ /usr/sbin/invoke-rc.d --quiet --force sendmail stop;
+ else
+ @sysconfdir@/init.d/sendmail stop;
+ fi;
+ fi;
+
+ # Make sure /etc/aliases is left (move it from /etc/mail if needed)
+ if [ -L @sysconfdir@/mail/aliases ]; then
+ rm -f @sysconfdir@/mail/aliases;
+ elif [ -f @sysconfdir@/mail/aliases -a \
+ -L /etc/aliases ]; then
+ mv @sysconfdir@/mail/aliases /etc/aliases;
+ fi;
+
+ # Remove psuedo conffiles (managed by sendmail)
+ if [ -f /etc/cron.d/sendmail ]; then
+ echo "#prerm" > @sysconfdir@/cron.d/sendmail;
+ fi;
+
+ # Remove files scattered across the system that
+ # happened to be created by sendmail
+ rm -f @libdir@/sasl/Sendmail.conf;
+
+ # Remove those files created by sendmail
+ rm -rf @localstatedir@/lib/sendmail;
+ rm -rf @localstatedir@/run/sendmail;
+ # Note: syslog really owns these files
+ #rm -f @localstatedir@/log/mail/*;
+ #rm -f @localstatedir@/log/mail.log;
+ # Note: these can lead to a loss of mail!!!!
+ @sysconfdir@/init.d/sendmail clean;
+ rmdir --ignore-fail-on-non-empty \
+ @localstatedir@/spool/mqueue;
+ rmdir --ignore-fail-on-non-empty \
+ @localstatedir@/spool/mqueue-client;
+
+ # Remove sendmail built configuration files
+ rm -f @sysconfdir@/mail/*.db \
+ @sysconfdir@/mail/*.dir \
+ @sysconfdir@/mail/*.pag;
+ rm -f @sysconfdir@/mail/sendmail.cf \
+ @sysconfdir@/mail/sendmail.cf.old \
+ @sysconfdir@/mail/sendmail.cf.errors \
+ @sysconfdir@/mail/sendmail.mc.old \
+ @sysconfdir@/mail/submit.cf \
+ @sysconfdir@/mail/submit.cf.errors \
+ @sysconfdir@/mail/submit.mc.old \
+ @sysconfdir@/mail/databases \
+ @sysconfdir@/mail/Makefile \
+ ;
+ rm -rf @sysconfdir@/mail/smrsh \
+ @sysconfdir@/mail/sasl \
+ @sysconfdir@/mail/tls;
+
+ # Remove empty files (probably touched databases)
+ find @sysconfdir@/mail -maxdepth 1 -size 0 | xargs -r rm;
+ ;;
+
+ upgrade)
+ # Potentially move the old configuration file to the new name -
+ # before it gets deleted (for not existing in the new package)
+ mv -f @sysconfdir@/default/sendmail \
+ @sysconfdir@/mail/sendmail.conf 2>/dev/null || true;
+ #
+ # 8.9.3- used sendmail.hf, we now use helpfile
+ mv -f @sysconfdir@/mail/sendmail.hf \
+ @sysconfdir@/mail/helpfile 2>/dev/null || true;
+
+ # Prevent cronjob from running during upgrade...
+ rm -f @sysconfdir@/cron.d/sendmail;
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ deconfigure)
+ echo "Deconfigure of $PACKAGE $2 $3($4) $5 $6($7) ";
+ ;;
+
+ *)
+ echo "$PACKAGE prerm called with unknown argument \`$1'" >&2;
+ exit 1;
+ ;;
+ esac;
+
+# The @DEBHELPER@ stuff causes problems with upgrades because of the
+# length of time that Sendmail is stopped...
+
+# Automatically added by dh_installdocs
+if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/sendmail ]; then
+ rm -f /usr/doc/sendmail
+fi
+# End automatically added section
+# Automatically added by dh_installinit
+#if [ -x "@sysconfdir@/init.d/sendmail" ]; then
+# @sysconfdir@/init.d/sendmail stop
+#fi
+# End automatically added section
+exit 0;
+
+#
+# Included for sanity checks
+#
+#DEBHELPER#
+exit 0;
diff --git a/debian/sendmail.suid b/debian/sendmail.suid
deleted file mode 100644
index 04f6530..0000000
--- a/debian/sendmail.suid
+++ /dev/null
@@ -1,3 +0,0 @@
-/usr/lib/sm.bin/mail.local
-/usr/sbin/sendmail
-/usr/sbin/mailstats
diff --git a/debian/sendmail.suid.in b/debian/sendmail.suid.in
new file mode 100644
index 0000000..32469ca
--- /dev/null
+++ b/debian/sendmail.suid.in
@@ -0,0 +1,2 @@
+@sbindir@/sendmail
+@libexecdir@/mailstats
diff --git a/debian/sensible_mda/Makefile.in b/debian/sensible_mda/Makefile.in
new file mode 100644
index 0000000..aa23f36
--- /dev/null
+++ b/debian/sensible_mda/Makefile.in
@@ -0,0 +1,61 @@
+#!/usr/bin/make -f
+#------------------------------------------------------------------------------
+# vim: syntax=make
+#
+# $Sendmail: Makefile,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 1998-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# Rules file for Sendmail @sm_version@@sm_revision@(@sm_version_math@)
+# on @sm_dist_name@ @sm_dist_vers@
+# via Debhelper V@DEBIAN_DH@
+#
+# Note: the .in file supports Sendmail @SM_MINVERS@ - @SM_MAXVERS@
+# on Debian slink, potato, woody, testing, sid, ...
+# but the generated file is customized to the version noted above.
+#
+# Richard Nelson <cowboy@debian.org> @sm_date@ @sm_time@ (@sm_utc@)
+#------------------------------------------------------------------------------
+#SHELL=/bin/sh -x
+
+# Include Debian Autoconf settings
+ifeq (yes, $(shell test -e ../build/autoconf.mk && echo 'yes'))
+ include ../build/autoconf.mk
+ endif
+
+all: sensible-mda
+
+clean:
+ rm -rf core *~ sensible-mda;
+
+setup: ;
+
+build-indep: setup
+build-arch: setup sensible-mda
+
+sensible-mda: sensible-mda.c
+ @rm -f $@;
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $? $(LIBS)
+
+install-indep: build-indep
+install-arch: build-arch
+ $(INSTALL) -d ${libexecdir};
+ $(INSTALL) -d ${mandir}/man8
+ $(INSTALL_PROGRAM) sensible-mda ${libexecdir};
+ $(INSTALL_DATA) sensible-mda.8 ${mandir}/man8;
+
+#-------------
+# Below here is fairly generic really
+
+source diff:
+ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+build: build-indep build-arch
+install: install-indep install-arch
+.PHONY: all
+.PHONY: setup
+.PHONY: clean build build-indep build-arch
+.PHONY: install install-indep install-arch
+.PHONY: source diff
diff --git a/debian/local/sensible-mda.8 b/debian/sensible_mda/sensible-mda.8
index bdb1186..622d50f 100644
--- a/debian/local/sensible-mda.8
+++ b/debian/sensible_mda/sensible-mda.8
@@ -4,12 +4,12 @@
.\" You may distribute under the terms of the GNU General Public
.\" License
.\"
-.\" $Id: sendmailconfig.8,v 2.0 1999/10/21 11:30:00 cowboy Exp $
+.\" $Id: sensible-mda.8,v 2.0 1999/10/21 11:30:00 cowboy Exp $
.\"
-.TH SENDMAILCONFIG 8 "October 21 1999"
+.TH SENSIBLE-MDA 8 "October 21 1999"
.UC 4
.SH NAME
-sensible\-mda \- a generic sendmail local MDA for Debian systems
+sensible\-mda \- a generic local MDA router for Debian systems
.SH SYNOPSIS
.B sensible\-mda
.IR from
@@ -21,8 +21,9 @@ sensible\-mda \- a generic sendmail local MDA for Debian systems
.B sensible\-mda
is used to simplify the installation and configuration of
.BR sendmail (8)
-for use on Debian systems. With sensible\-mda, sendmail can support
-a plethora of MDAs (procmail, deliver, etc.) without having pick any
+, or other MTAs for use on Debian systems. With sensible\-mda, sendmail
+can support a plethora of MDAs (procmail, maildrop, deliver, etc.) without
+having pick any
.I one
of them as required.
.LP
@@ -35,9 +36,11 @@ sendmail.mc:
.LP
sensible-mda
will look for the following MDAs (in this order), and pass the mail
-on to the first SUID MDA found:
+on to the first SUID MDA found (Or first found MDA, if run w/euid=root):
.BR procmail (1),
-.BR deliver (8)
+.BR maildrop (1),
+.BR deliver (8),
+.BR mail.local (8)
.LP
.SH OPTIONS
Available command line options are the following:
@@ -71,7 +74,9 @@ actual sendmail configuration file (treated as a binary file)
.SH "SEE ALSO"
.BR sendmail (8),
.BR procmail (1),
-.BR deliver (8)
+.BR maildrop (1),
+.BR deliver (8),
+.BR mail.local (8)
.br
.SH BUGS
None known so far.
diff --git a/debian/sensible_mda/sensible-mda.c.in b/debian/sensible_mda/sensible-mda.c.in
new file mode 100644
index 0000000..a31c718
--- /dev/null
+++ b/debian/sensible_mda/sensible-mda.c.in
@@ -0,0 +1,351 @@
+/*
+ * $Sendmail: sensible-mda.c,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+ *
+ * sensible-mda.c
+ * Copyright (c) 1998, Johnie Ingram.
+ * Copyright (c) 1998-@SM_CPYRT@ Richard Nelson <cowboy@debian.org>.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#ifndef lint
+static char id[] = "@(#)$Id: sensible-mda.c,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $";
+#endif /* ! lint */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <limits.h>
+#include <unistd.h>
+#include <pwd.h>
+#include <grp.h>
+#include <sysexits.h>
+#include <string.h>
+#include <syslog.h>
+
+// TODO: declare -x TCPREMOTEIP="$3"
+
+# define min(a, b) ((a) < (b) ? (a) : (b))
+
+#ifndef DEBUG
+ #define DEBUG 0
+ #endif
+#ifndef TESTING
+ #define TESTING 0
+ #endif
+
+#define PROCMAIL "@sysconfdir@/mail/smrsh/procmail"
+#define MAILDROP "@sysconfdir@/mail/smrsh/maildrop"
+#define DELIVER "@sysconfdir@/mail/smrsh/deliver"
+#define MAIL_LOCAL "@sysconfdir@/mail/smrsh/mail.local"
+
+#define PROCMAILRCS "@sysconfdir@/procmailrcs/"
+
+static void help(void);
+static int drop_privs(char *, uid_t, gid_t);
+static void show_privs(void);
+static unsigned char program[PATH_MAX];
+
+static uid_t RealUid, RunAsUid;
+static gid_t RealGid, RunAsGid;
+
+extern int errno;
+
+int
+main (int argc, char *argv[]) {
+
+ struct stat MDA_stat;
+ int done = 1;
+ struct passwd* passwd_entry;
+
+ char *str_pos;
+ int exec_rc = EX_OK;
+
+ #if DEBUG
+ int arg_index;
+ int str_len;
+ #endif
+
+ (void) openlog( "sensible-mda", LOG_PID+LOG_PERROR, LOG_MAIL );
+
+ /*----------------------------------------------------------------
+ * Obtain program name
+ *----------------------------------------------------------------*/
+ str_pos = strrchr(argv[0], '/');
+ if ( str_pos )
+ str_pos++;
+ else
+ str_pos = argv[0];
+ (void) strncpy(program, str_pos,
+ min(strlen(str_pos), sizeof(program)-1));
+ program[sizeof(program)-1] = '\0';
+
+ #if DEBUG
+ str_len = 0;
+ for ( arg_index = 0; arg_index < argc; arg_index++ )
+ str_len += strlen( argv[arg_index] ) + 1;
+ str_pos = malloc( str_len + 1);
+ str_pos[0] = '\0';
+ for ( arg_index = 0; arg_index < argc; arg_index++ ) {
+ (void) strcat( str_pos, argv[arg_index] );
+ (void) strcat( str_pos, " " );
+ };
+ (void) syslog( LOG_INFO, "Parms: %s\n", str_pos );
+ (void) free(str_pos);
+ #endif
+
+ /*----------------------------------------------------------------
+ * Parse input to determine to whom to speak and who we are...
+ * Must have at least three parameters unless first is ?,-?,/?.
+ *----------------------------------------------------------------*/
+ if (argc >= 2 &&
+ (strcmp(argv[1],"?") == 0 || strcmp(argv[1],"-?") == 0 ||
+ strcmp(argv[1],"/?") == 0 || strcmp(argv[1],"\\?") == 0 ||
+ strcmp(argv[1],"-h") == 0 || strcmp(argv[1],"--help") == 0)) {
+ (void) printf( "%s - Help\n", program );
+ help();
+ (void) closelog();
+ return (EX_USAGE);
+ };
+ if (argc < 3) {
+ (void) syslog( LOG_ERR, "%s - Required parameters elided.\n",
+ program );
+ help();
+ (void) closelog();
+ return (EX_USAGE);
+ };
+
+ /*----------------------------------------------------------------
+ * Determine to whom we are delivering mail to, and set that
+ * as our real, effective, and saved {u,g}ids
+ *----------------------------------------------------------------*/
+ RealUid = RunAsUid = geteuid();
+ RealGid = RunAsGid = getegid();
+ passwd_entry=getpwnam(argv[2]);
+ if (passwd_entry) {
+ RunAsUid = passwd_entry->pw_uid;
+ RunAsGid = passwd_entry->pw_gid;
+ }
+ else {
+ (void) syslog( LOG_ERR, "User(%s) does not exist!\n",
+ argv[2]);
+ (void) closelog();
+ return (EX_TEMPFAIL);
+ };
+
+ /*----------------------------------------------------------------
+ * 1st: try delivery via PROCMAIL (Keep SUID, works better that way)
+ *----------------------------------------------------------------*/
+ if (!stat(PROCMAIL, &MDA_stat)) {
+ done = 0;
+ #if DEBUG
+ (void) syslog( LOG_INFO, "MDA: %s -t -f %s"
+ " -a %s -d %s\n",
+ PROCMAIL, argv[1], argv[3], argv[2]);
+ #endif
+ #if ! TESTING
+ exec_rc = execl (PROCMAIL, PROCMAIL, "-t",
+ "-f", argv[1],
+ "-a", argv[3],
+ "-d", argv[2], NULL);
+ (void) syslog( LOG_ERR, "%s did not execute %i,%i\n",
+ PROCMAIL, exec_rc, errno);
+ (void) closelog();
+ return (EX_TEMPFAIL);
+ #endif
+ done = 1;
+ };
+
+ /*----------------------------------------------------------------
+ * 2nd: try delivery via MAILDROP
+ *----------------------------------------------------------------*/
+ if (done && !stat(MAILDROP, &MDA_stat)) {
+ done = 0;
+ #if DEBUG
+ (void) syslog( LOG_INFO, "MDA: %s -f %s -d %s %s\n",
+ MAILDROP, argv[1], argv[2], argv[3]);
+ #endif
+ if (drop_privs( argv[2], RunAsUid, RunAsGid )) {
+ (void) closelog();
+ return (EX_TEMPFAIL);
+ };
+ #if ! TESTING
+ exec_rc = execl (MAILDROP, MAILDROP,
+ "-f", argv[1], "-d", argv[2], argv[3], NULL);
+ (void) syslog( LOG_ERR, "%s did not execute %i,%i\n",
+ MAILDROP, exec_rc, errno);
+ (void) closelog();
+ return (EX_TEMPFAIL);
+ #endif
+ done = 1;
+ };
+
+ /*----------------------------------------------------------------
+ * 3rd: try delivery via DELIVER
+ *----------------------------------------------------------------*/
+ if (done && !stat(DELIVER, &MDA_stat)) {
+ done = 0;
+ #if DEBUG
+ (void) syslog( LOG_INFO, "MDA: %s -r %s %s\n",
+ DELIVER, argv[1], argv[2]);
+ #endif
+ if (drop_privs( argv[2], RunAsUid, RunAsGid )) {
+ (void) closelog();
+ return (EX_TEMPFAIL);
+ };
+ #if ! TESTING
+ exec_rc = execl (DELIVER, DELIVER,
+ "-r", argv[1], argv[2], NULL);
+ (void) syslog( LOG_ERR, "%s did not execute %i,%i\n",
+ DELIVER, exec_rc, errno);
+ (void) closelog();
+ return (EX_TEMPFAIL);
+ #endif
+ done = 1;
+ };
+
+ /*----------------------------------------------------------------
+ * 4th: try delivery via MAIL.LOCAL (Needs SUID because of LMTP)
+ *----------------------------------------------------------------*/
+ if (done && !stat(MAIL_LOCAL, &MDA_stat)) {
+ done = 0;
+ #if DEBUG
+ (void) syslog( LOG_INFO, "MDA: %s -f %s %s\n",
+ MAIL_LOCAL, argv[1], argv[2]);
+ #endif
+ #if ! TESTING
+ exec_rc = execl (MAIL_LOCAL, MAIL_LOCAL,
+ "-f", argv[1], argv[2], NULL);
+ (void) syslog( LOG_ERR, "%s did not execute %i,%i\n",
+ MAIL_LOCAL, exec_rc, errno);
+ (void) closelog();
+ return (EX_TEMPFAIL);
+ #endif
+ done = 1;
+ };
+
+ (void) syslog( LOG_ERR, "No MDA was found! Tried: "
+ "%s, %s, %s, and %s.\n",
+ PROCMAIL, MAILDROP, DELIVER, MAIL_LOCAL );
+
+ (void) closelog();
+ return (EX_TEMPFAIL);
+ };
+
+/*-------------------------------------------------------------------
+ * drop_privs...
+ *-------------------------------------------------------------------*/
+static int
+drop_privs(char * luser, uid_t new_uid, gid_t new_gid) {
+ gid_t emptygidset[1];
+ uid_t EffUid;
+ gid_t EffGid;
+ int rval;
+
+ rval = EX_OK;
+ EffUid = geteuid();
+ EffGid = getegid();
+
+ /* reset group permissions; these can be set later */
+ emptygidset[0] = (RunAsGid != 0) ? RunAsGid : EffGid;
+ if (setgroups(1, emptygidset) == -1 && EffUid == 0) {
+ (void) syslog( LOG_ERR, "drop_privs: setgroups(1, %d) failed\n",
+ (int) emptygidset[0]);
+ rval = EX_OSERR;
+ };
+
+ /* reset primary group id */
+ if ((RunAsGid != 0) && EffGid != RunAsGid && setgid(RunAsGid) < 0) {
+ (void) syslog( LOG_ERR, "drop_privs: setgid(%d) failed\n",
+ (int) RunAsGid);
+ rval = EX_OSERR;
+ };
+
+ /* reset primary user id */
+ if ((RunAsUid != 0) && EffUid != RunAsUid && setuid(RunAsUid) < 0) {
+ (void) syslog( LOG_ERR, "drop_privs: setuid(%d) failed\n",
+ (int) RunAsUid);
+ rval = EX_OSERR;
+ };
+
+ #if DEBUG
+ show_privs();
+ (void) syslog( LOG_INFO, "drop_privs: rval = %d\n", rval);
+ #endif
+
+ if (rval) {
+ (void) syslog( LOG_ERR,
+ "Can not setreuid to %d:%d for user(%s)!\n",
+ RunAsUid, RunAsGid, luser);
+ show_privs();
+ };
+
+ return rval;
+ };
+
+/*-------------------------------------------------------------------
+ * show_privs...
+ *-------------------------------------------------------------------*/
+static void
+show_privs(void) {
+
+ (void) syslog( LOG_INFO, "show_privs: RealUser = %d:%d\n",
+ (int) RealUid, (int) RealGid);
+ (void) syslog( LOG_INFO, "show_privs: "
+ "get[ug]id=%d:%d, gete[ug]id=%d:%d\n",
+ (int) getuid(), (int) getgid(),
+ (int) geteuid(), (int) getegid());
+ (void) syslog( LOG_INFO, "show_privs: RunAsUser = %d:%d\n",
+ (int) RunAsUid, (int) RunAsGid);
+ return;
+ };
+
+/*-------------------------------------------------------------------
+ * Help...
+ *-------------------------------------------------------------------*/
+static void
+help(void) {
+
+ (void) printf("\n%s - Help information.\n\n"
+ "%s:\n"
+ "\tA general MTA->MDA wrapper to isolate the MTA from\n"
+ "\tthe vagaries of MDA installation and invocation.\n"
+ "\nSupported MTAs:\n"
+ "\tsendmail\n"
+ "\nSupported MDAs:\n"
+ "\tprocmail, maildrop, deliver, mail.local\n"
+ "\nCalled by:\n"
+ "\tSendmail: \n"
+ "\tYou: "
+ "Go directly to jail, do not pass GO, "
+ "do not collect $200!\n"
+ "\nSyntax:\n"
+ "\t%s <from:$g> <user:$u> [<detail:$h>]"
+ "[<client:${client_addr}>]\n"
+ "\nCalls:\n"
+ "\tprocmail:\t procmail -t"
+ " -f <from>"
+ " -a <detail> -d <to>\n"
+ "\tmaildrop:\t maildrop -f <from> -d <to> <detail>\n"
+ "\tdeliver:\t deliver -r <from> <to>\n"
+ "\tmail.local:\t mail.local -f <from> <to>\n"
+ "\n"
+ ,program, program, program
+ );
+ return;
+ };
+
diff --git a/debian/sensible_mda/sensible-mda.c.old b/debian/sensible_mda/sensible-mda.c.old
new file mode 100644
index 0000000..269efc0
--- /dev/null
+++ b/debian/sensible_mda/sensible-mda.c.old
@@ -0,0 +1,281 @@
+/*
+ * sensible-mda.c
+ * Copyright (c) 1998, Johnie Ingram.
+ * Copyright (c) 1998-2001 Richard Nelson <cowboy@debian.org>.
+ * Time-stamp: <2000/08/28 12:00:00 cowboy>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+# ifndef lint
+static char id[] = "@(#)$Id: sensible-mda.c,v 03.00.01 2001/08/24 12:00:00 cowboy Exp $";
+# endif /* ! lint */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <pwd.h>
+#include <sys/types.h>
+#include <sysexits.h>
+#include <string.h>
+#include <syslog.h>
+
+// TODO: declare -x TCPREMOTEIP="$3"
+
+# define min(a, b) ((a) < (b) ? (a) : (b))
+
+#define DEBUG 0
+
+#define PROCMAIL "/usr/bin/procmail"
+#define MAILDROP "/usr/bin/maildrop"
+#define DELIVER "/usr/bin/deliver"
+#define MAIL_LOCAL "/usr/lib/sm.bin/mail.local"
+
+#define PROCMAILRCS "/etc/procmailrcs/"
+
+static void help(void);
+static unsigned char program[32];
+
+static struct stat MDA_stat;
+static struct stat procmailrc_stat;
+static int done = 1;
+static struct passwd* passwd_entry;
+static uid_t euid;
+
+extern int errno;
+
+int
+main (int argc, char *argv[])
+{
+
+ char *procmailrc;
+ char *str_pos;
+ int exec_rc;
+
+ (void) openlog( "sensible-mda", LOG_PID+LOG_PERROR, LOG_MAIL );
+
+ /*----------------------------------------------------------------
+ * Obtain program name
+ *----------------------------------------------------------------*/
+ str_pos = strrchr(argv[0], '/');
+ if ( str_pos )
+ str_pos++;
+ else
+ str_pos = argv[0];
+ (void) strncpy(program, str_pos,
+ min(strlen(str_pos), sizeof(program)-1));
+ program[sizeof(program)-1] = '\0';
+
+ #if DEBUG
+ int arg_index;
+ int str_len;
+ str_len = 0;
+ for ( arg_index = 0; arg_index < argc; arg_index++ )
+ str_len += strlen( argv[arg_index] ) + 1;
+ str_pos = malloc( str_len + 1);
+ str_pos[0] = '\0';
+ for ( arg_index = 0; arg_index < argc; arg_index++ ) {
+ (void) strcat( str_pos, argv[arg_index] );
+ (void) strcat( str_pos, " " );
+ };
+ (void) syslog( LOG_INFO, "Parms: %s\n", str_pos );
+ (void) free(str_pos);
+ #endif
+
+ /*----------------------------------------------------------------
+ * Parse input to determine to whom to speak and who we are...
+ * Must have at least three parameters unless first is ?,-?,/?.
+ *----------------------------------------------------------------*/
+ if (argc >= 2 &&
+ (strcmp(argv[1],"?") == 0 || strcmp(argv[1],"-?") == 0 ||
+ strcmp(argv[1],"/?") == 0 || strcmp(argv[1],"\\?") == 0 ||
+ strcmp(argv[1],"-h") == 0 || strcmp(argv[1],"--help") == 0)) {
+ (void) printf( "%s - Help\n", program );
+ help();
+ (void) closelog( );
+ return (EX_USAGE);
+ };
+ if (argc < 3) {
+ (void) syslog( LOG_ERR, "%s - Required parameters elided.\n",
+ program );
+ help();
+ (void) closelog( );
+ return (EX_USAGE);
+ };
+
+ euid = geteuid();
+
+ /*----------------------------------------------------------------
+ * 1st: try delivery via PROCMAIL
+ *----------------------------------------------------------------*/
+ if (!lstat(PROCMAIL, &MDA_stat)) {
+ if (MDA_stat.st_mode & S_ISUID) {
+ procmailrc=malloc(strlen(PROCMAILRCS)+strlen(argv[2])+1);
+ sprintf(procmailrc,"%s%s",PROCMAILRCS,argv[2]);
+ passwd_entry=getpwnam(argv[2]);
+ /*
+ * If argv[2] is a valid user &
+ * /etc/procmailrcs/argv[2] exists & is owned by argv[2]
+ */
+ if (passwd_entry &&
+ !stat(procmailrc, &procmailrc_stat) &&
+ procmailrc_stat.st_uid==passwd_entry->pw_uid) {
+ done = 0;
+ (void) syslog( LOG_INFO, "MDA: %s\n", PROCMAIL );
+ exec_rc = execl (PROCMAIL, PROCMAIL, "-t",
+ "-f", argv[1], "-m", procmailrc, "-a", argv[3], NULL);
+ (void) syslog( LOG_INFO, "%s did not execute %i,%i\n",
+ PROCMAIL,
+ exec_rc,
+ errno );
+ return (EX_TEMPFAIL);
+ }
+ else {
+ done = 0;
+ #if DEBUG
+ (void) syslog( LOG_INFO, "MDA: %s\n", PROCMAIL );
+ #endif
+ exec_rc = execl (PROCMAIL, PROCMAIL, "-t",
+ "-f", argv[1], "-a", argv[3], "-d", argv[2], NULL);
+ (void) syslog( LOG_INFO, "%s did not execute %i,%i\n",
+ PROCMAIL,
+ exec_rc,
+ errno );
+ return (EX_TEMPFAIL);
+ };
+ }
+ else
+ (void) syslog( LOG_INFO, "%s is not setuid!\n", PROCMAIL );
+ };
+
+ /*----------------------------------------------------------------
+ * 2nd: try delivery via MAILDROP
+ *----------------------------------------------------------------*/
+ if (done && !lstat(MAILDROP, &MDA_stat)) {
+ if ( (euid == 0) ||
+ (MDA_stat.st_mode & S_ISUID)
+ ) {
+ done = 0;
+ #if DEBUG
+ (void) syslog( LOG_INFO, "MDA: %s\n", MAILDROP );
+ #endif
+ exec_rc = execl (MAILDROP, MAILDROP,
+ "-f", argv[1], "-d", argv[2], NULL);
+ (void) syslog( LOG_INFO, "%s did not execute %i,%i\n",
+ MAILDROP,
+ exec_rc,
+ errno );
+ return (EX_TEMPFAIL);
+ }
+ else
+ (void) syslog( LOG_INFO, "%s is not setuid!\n", MAILDROP );
+ };
+
+
+ /*----------------------------------------------------------------
+ * 3rd: try delivery via DELIVER
+ *----------------------------------------------------------------*/
+ if (done && !lstat(DELIVER, &MDA_stat)) {
+ if ( (euid == 0) ||
+ (MDA_stat.st_mode & S_ISUID)
+ ) {
+ done = 0;
+ #if DEBUG
+ (void) syslog( LOG_INFO, "MDA: %s\n", DELIVER );
+ #endif
+ exec_rc = execl (DELIVER, DELIVER,
+ "-r", argv[1], argv[2], NULL);
+ (void) syslog( LOG_INFO, "%s did not execute %i,%i\n",
+ DELIVER,
+ exec_rc,
+ errno );
+ return (EX_TEMPFAIL);
+ }
+ else
+ (void) syslog( LOG_INFO, "%s is not setuid!\n", DELIVER );
+ };
+
+ /*----------------------------------------------------------------
+ * 4th: try delivery via MAIL.LOCAL
+ *----------------------------------------------------------------*/
+ if (done && !lstat(MAIL_LOCAL, &MDA_stat)) {
+ if ( (euid == 0) ||
+ (MDA_stat.st_mode & S_ISUID)
+ ) {
+ done = 0;
+ #if DEBUG
+ (void) syslog( LOG_INFO, "MDA: %s\n", MAIL_LOCAL );
+ #endif
+ exec_rc = execl (MAIL_LOCAL, MAIL_LOCAL,
+ "-f", argv[1], argv[2], NULL);
+ (void) syslog( LOG_INFO, "%s did not execute %i,%i\n",
+ MAIL_LOCAL,
+ exec_rc,
+ errno );
+ return (EX_TEMPFAIL);
+ }
+ else
+ (void) syslog( LOG_INFO, "%s is not setuid!\n", MAIL_LOCAL );
+ };
+
+ (void) syslog( LOG_ERR, "No MDA was found (or was suid)! Tried: "
+ "%s, %s, %s, and %s.\n",
+ PROCMAIL,
+ MAILDROP,
+ DELIVER,
+ MAIL_LOCAL
+ );
+
+ (void) closelog( );
+
+ return (EX_TEMPFAIL);
+ };
+
+
+/*-------------------------------------------------------------------
+ * Help...
+ *-------------------------------------------------------------------*/
+static void help(void) {
+
+ (void) printf("\n%s - Help information.\n\n"
+ "%s:\n"
+ "\tA general MTA->MDA wrapper to isolate the MTA from\n"
+ "\tthe vagaries of MDA installation and invocation.\n"
+ "\nSupported MTAs:\n"
+ "\tsendmail\n"
+ "\nSupported MDAs:\n"
+ "\tprocmail, maildrop, deliver, mail.local\n"
+ "\nCalled by:\n"
+ "\tSendmail\n"
+ "\tYou - "
+ "Go directly to jail, do not pass GO, "
+ "do not collect $200!\n"
+ "\nSyntax:\n"
+ "\t%s <from:$g> <user:$u> [<detail:$h>]"
+ "[<client:${client_addr}>]\n"
+ "\nCalls:\n"
+ "\tprocmail:\t procmail -t -f <from>"
+ "-a <detail> -d <to>\n"
+ "\tmaildrop:\t maildrop -f <from> -d <to>\n"
+ "\tdeliver:\t deliver -r <from> <to>\n"
+ "\tmail.local:\t mail.local -f <from> <to>\n"
+ "\n"
+ ,program, program, program
+ );
+ return;
+ };
+
diff --git a/debian/sources b/debian/sources
new file mode 100644
index 0000000..6005260
--- /dev/null
+++ b/debian/sources
@@ -0,0 +1 @@
+upstream tar sendmail.8.12.0.tar.gz
diff --git a/debian/watch b/debian/watch
deleted file mode 100644
index c799298..0000000
--- a/debian/watch
+++ /dev/null
@@ -1,5 +0,0 @@
-# Example watch control file for uscan
-# Rename this file to "watch" and then you can run the "uscan" command
-# to check for upstream updates and more.
-# Site Directory Pattern Version Script
-ftp.sendmail.org /pub/sendmail/ sendmail\.(.*)\.tar.gz debian uupdate