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:
+
+
+apt-get install make gcc
+
+
+
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:
+
+
+
+uncompress arc521.tar.Z; tar xf arc521.tar
+
+
+
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:
+
+
+chmod u+w arcdos.c
+
+
+
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:
+
+
+make
+
+
+
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:
+
+
+System = -DSYSV=1
+
+
+
Close the Makefile and run make again by typing:
+
+
+make
+
+
+
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?
+
+Next
+Previous
+Contents
+
+
--- sendmail-8.14.4.orig/debian/examples/amavis/amavis-doc-3.html
+++ sendmail-8.14.4/debian/examples/amavis/amavis-doc-3.html
@@ -0,0 +1,38 @@
+
+
+
+
+ How to Install Amavis-milter for Debian Sendmail: Example Installation of an Antivirus Scanner
+
+
+
+
+
+Next
+Previous
+Contents
+
+
I am using a Linux commandline scanner from NAI Associates, Inc.
+You will have to avail yourself of the documentation at
+
+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.
+
+Next
+Previous
+Contents
+
+
--- sendmail-8.14.4.orig/debian/examples/amavis/amavis-doc-4.html
+++ sendmail-8.14.4/debian/examples/amavis/amavis-doc-4.html
@@ -0,0 +1,31 @@
+
+
+
+
+ How to Install Amavis-milter for Debian Sendmail: Obtaining the Libmilter Sourcecode and Libraries
+
+
+
+
+
+Next
+Previous
+Contents
+
+
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:
As of October 23, 2001; the CVS copy might not compile. Skip
+to the next section if you don't want to fool around.
+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
+
+. If you do not already
+have the CVS package installed on your system, you can obtain it
+with the command:
+
If you are like me, and the CVS copy died hideously during "
+./configure"
+,
+then download the the "
+official"
+CVS snapshot from
+
+. 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:
+
+
+tar zxf <filename>
+
+
+
That should give you a nice directory of sourcecode.
+
+Next
+Previous
+Contents
+
+
--- sendmail-8.14.4.orig/debian/examples/amavis/amavis-doc-6.html
+++ sendmail-8.14.4/debian/examples/amavis/amavis-doc-6.html
@@ -0,0 +1,48 @@
+
+
+
+
+ How to Install Amavis-milter for Debian Sendmail: Building Amavis
+
+
+
+
+
+Next
+Previous
+Contents
+
+
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:
This will create, among other things, the amavisd perl script
+and the amavis-milter binary in your "
+<amavis-sourcecode-directory>/amavis/"
+
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.
+
+Next
+Previous
+Contents
+
+
--- sendmail-8.14.4.orig/debian/examples/amavis/amavis-doc-7.html
+++ sendmail-8.14.4/debian/examples/amavis/amavis-doc-7.html
@@ -0,0 +1,96 @@
+
+
+
+
+ How to Install Amavis-milter for Debian Sendmail: Installing and Running Amavis
+
+
+
+
+
+Next
+Previous
+Contents
+
+
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"
+
with:
+
+
+useradd amavis
+
+
+
From the amavis-sourcecode-directory type:
+
+
+make install
+
+
+
If everythiny worked, the install script should have
+
+
+
copied the amavisd perl script to /usr/local/sbin
+
copied the amavis-milter binary to /usr/local/sbin
+
created the /var/local/amavis directory with owner amavis and
+mode 2700 or 0700
+
created a file named /etc/amavisd.conf
+
+
+
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.
+
Don't forget to rebuild the aliases file by issuing:
+
+
+newaliases
+
+
+
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):
Now that Amavis is ready and running, you can fire-up your new
+sendmail configuration with:
+
+
+sendmailconfig
+
+
+
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).
+
+Next
+Previous
+Contents
+
+
--- sendmail-8.14.4.orig/debian/examples/amavis/amavis-doc-8.html
+++ sendmail-8.14.4/debian/examples/amavis/amavis-doc-8.html
@@ -0,0 +1,72 @@
+
+
+
+
+ How to Install Amavis-milter for Debian Sendmail: An Example Startup script
+
+
+
+
+Next
+Previous
+Contents
+
+
23.10.2001
+
+This document provides a step-by-step guide to the installation
+ and configuration of the Amavis antivirus software available from
+
+
+ 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!
+
+
+
+
+Next
+Previous
+Contents
+
+
--- sendmail-8.14.4.orig/debian/examples/checksendmail/BSDI/BSDI_CONTRIB
+++ sendmail-8.14.4/debian/examples/checksendmail/BSDI/BSDI_CONTRIB
@@ -0,0 +1,18 @@
+Software Package:
+ checksendmail
+
+Release/Version:
+ Dated 7/11/90.
+
+Retrieved from:
+ N/A.
+
+Bug reports:
+ This software package is maintained by the software contributor,
+ not BSDI. Please send any bug reports to both support@BSDI.COM
+ and polk@bsdi.com.
+
+Comments:
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+Modifications to this version made by BSDI:
--- sendmail-8.14.4.orig/debian/examples/checksendmail/BSDI/Makefile
+++ sendmail-8.14.4/debian/examples/checksendmail/BSDI/Makefile
@@ -0,0 +1,15 @@
+# BSDI $Id: Makefile,v 1.3 1995/01/07 05:34:35 donn Exp $
+
+MAN8= checksendmail.0
+
+all checksendmail: ${MAN8}
+
+clean depend tags:
+
+install: maninstall
+ install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ ${.CURDIR}/checksendmail.perl ${DESTDIR}${BINDIR}/checksendmail
+ install -c -o ${BINOWN} -g ${BINGRP} -m 0444 \
+ ${.CURDIR}/address.resolve ${DESTDIR}/usr/contrib/lib/
+
+.include
--- sendmail-8.14.4.orig/debian/examples/checksendmail/BSDI/address.resolve
+++ sendmail-8.14.4/debian/examples/checksendmail/BSDI/address.resolve
@@ -0,0 +1,27 @@
+
+# BSDI $Id: address.resolve,v 1.1.1.1 1994/01/13 21:15:30 polk Exp $
+
+# Sample address resolution file for checksendmail(8)
+
+# local addresses
+user
+user@hilltop
+user@hilltop.BSDI.COM
+hilltop!polk
+
+# within-domain addresses
+user@bsdi.com
+user@ibapah
+user@ibapah.bsdi.com
+ibapah!user
+
+# faraway addresses
+user@xxxxxxx.com
+user@xxxxxxx.dom
+site!user
+
+# addresses with routing, etc.
+site1!site2!user
+user@xxxxxxx.dom@bar.dom
+site!user@xxxxxxx.dom
+site!user@uunet.uu.net
--- sendmail-8.14.4.orig/debian/examples/checksendmail/BSDI/checksendmail.8
+++ sendmail-8.14.4/debian/examples/checksendmail/BSDI/checksendmail.8
@@ -0,0 +1,223 @@
+.\" BSDI $Id: checksendmail.8,v 1.1.1.1 1994/01/13 21:15:31 polk Exp $
+.Dd January 12, 1994
+.Dt CHECKSENDMAIL 8
+.Os
+.Sh NAME
+.Nm checksendmail
+.Nd verify sendmail address transformations.
+.Sh SYNOPSIS
+.Nm checksendmail
+.Op Fl C Ar file.cf
+.Op Fl r Ar resolve
+.Op Fl T Ar test.address
+.Op Fl b Ar sendmail_binary
+.Sh DESCRIPTION
+.Pp
+The
+.Nm checksendmail
+program is a
+.Xr perl
+script that aids the testing of
+.Xr sendmail 8 's
+various configuration files.
+.Nm checksendmail
+passes typical addresses (supplied in input files) through
+.Xr sendmail
+and prints the results of the resolution and transformation routines.
+.Pp
+The input files contain a list of addresses, one per line.
+For example:
+.Bd -literal -offset indent
+user
+user@site
+user@site.com
+.Ed
+.Pp
+The input file can contain comments started with a
+.Em #
+and blank lines.
+.Sh OPTIONS
+.Pp
+.Bl -tag -width Fl -compact -offset left
+.It Fl C Ar file.cf
+Use the
+.Xr sendmail
+configuration file
+.Ar file.cf
+instead of the default
+.Pa /etc/sendmail.cf
+file.
+.It Fl r Ar resolve
+Use
+.Ar resolve
+as the input file for the addresses to be used for mail resolving. Defaults
+to
+.Ar address.resolve .
+.It Fl T Ar test.address
+Use
+.Ar test.address
+as the single address to test. Cannot be used in conjunction with
+file setting flags.
+.It Fl B Ar sendmail_binary
+Use the specified
+.Ar sendmail_binary
+as the path to invoke sendmail (instead of
+.Pa /usr/sbin/sendmail ) .
+.El
+.Sh EXAMPLES
+.Pp
+The following command will pass the addresses in
+.Ar address.resolve
+through
+.Xr sendmail
+using the configuration information in
+.Ar myconfig.cf .
+.Bd -literal -offset left
+example% cat address.resolve
+user
+user@site
+user@site.com
+example% checksendmail \-C myconfig.cf
+config file: myconfig.cf resolve file: address.resolve
+towhom file: address.resolve fromwhom file: address.resolve
+Mail address resolution
+user --(ether )--> user[rmtc]
+user@site --(ether )--> user@site[rmtc]
+user@site.com --(ether )--> user@site.com[rmtc]
+`To' address transformations for mailer ether:
+user ----> user
+user@site ----> user@site
+user@site.com ----> user@site.com
+`From' address transformations for mailer ether:
+user ----> user
+user@site ----> user
+user@site.com ----> user
+.Ed
+.Pp
+The first section of the output shows how the addresses in the input
+files are resolved by
+.Xr sendmail 8 .
+Consider the following output line:
+.Pp
+.Dl user@site.com --(ether )--> user@site.com[rmtc]
+.Pp
+The input address
+.Em user@site.com
+resolves to use the
+.Em ether
+mailer. That mailer is directed to send the mail to
+to the user
+.Em user@site.com
+at site
+.Em rmtc
+(as indicated in the square brackets).
+.Pp
+The two later sections of output show how the addresses specified as
+the
+.Em To
+and
+.Em From
+address are transformed in the text of the
+headers. In the example above, the
+.Em To
+addresses are untouched.
+The
+.Em From
+addresses, however, all lose their machine information on
+the way through the mailer:
+.Pp
+.Dl user@site ----> user
+.Pp
+This may be desirable when using a configuration file on a
+workstation which is to be hidden as a mailhost from the rest of the
+network.
+.Pp
+The following is a set of addresses used at one site for the purposes of
+testing address resolution. Comments after the addresses detail why
+particular addresses are present:
+.Bl -tag -width "user@machine.com" -compact -offset indent
+.It user
+Standard trivial address
+.It user@rmtc
+qualified at one level
+.It user@rmtc.central
+qualified at two levels
+.It user@rmtc.central.sun.com
+qualified all the way
+.It rmtc!user
+local but specified as uucp
+.It user@summit
+a workstation (normally delivered locally, though)
+.It user@summit.central
+same but more qualified
+.It user@summit.central.sun.com
+same but fully qualified
+.It summit!user
+same but specified as uucp
+.It user@prisma
+Backward compatibility tests
+.It user@prisma.com
+.It prisma!user
+.It user@central
+Superior domain testing
+.It user@machine.central
+more qualified, but unknown
+.It user@summit.central
+more qualified and known
+.It user@eng
+name in faraway domain
+.It user@machine.eng
+unknown machine in faraway domain
+.It user@summit.eng
+local machine, far away domain
+.It user@hoback
+far away machine
+.It user@machine
+apparently local but unknown machine
+.It user@sun.com
+Standard trivial address
+.It user@machine.dom.sun.com
+fully qualified but unknown machine
+.It user@foo.com
+standard, known, really far away domain
+.It user@foo.dom
+standard, unknown, really far away domain
+.It site!user
+Single level uucp
+.It site1!site2!user
+Double level uucp
+.It user@foo.dom@bar.dom
+Trickier address
+.It site!user@foo.dom
+Mixed uucp/domain
+.It site!user@uunet.uu.net
+Mixed double uucp/domain
+.El
+.Sh NOTES
+Note that
+.Nm checksendmail
+is a
+.Xr perl
+script. If your site does not have
+.Xr perl 1 ,
+it can be obtained via anonymous
+.Xr ftp
+from
+.Em ftp.uu.net .
+.Pp
+.Xr sendmail
+requires that the user have access to directory specified by the
+.Em OQ
+parameter in the configuration file (normally
+.Pa /usr/spool/mqueue ) .
+.Nm checksendmail
+verifies that the user has access to this directory before allowing the
+test to continue.
+.Sh AUTHORS
+.Bd -literal
+Gene Kim
+Rob Kolstad
+Jeff Polk
+.Ed
+.Sh "SEE ALSO"
+.Xr sendmail 8
--- sendmail-8.14.4.orig/debian/examples/checksendmail/BSDI/checksendmail.perl
+++ sendmail-8.14.4/debian/examples/checksendmail/BSDI/checksendmail.perl
@@ -0,0 +1,377 @@
+#!/usr/bin/perl
+
+# BSDI $Id: checksendmail.perl,v 1.1.1.1 1994/01/13 21:15:31 polk Exp $
+
+# checksendmail
+#
+# The checksendmail program is a perl script that aids the testing
+# of sendmail's various configuration filse. checksendmail
+# passes typical addresses (supplied in input files) through
+# sendmail and prints the result of the resolution and
+# transformation routines.
+#
+# Gene Kim & Rob Kolstad & Jeff Polk, 7/11/90
+
+# -- -C config file
+# -- -r resolve_addresses_file
+# -- -T test one address
+# -- -b sendmail binary
+
+# XXX deficiencies: ``/etc/sendmail'' should be a parameter
+
+# defaults:
+ $resolve = "address.resolve";
+ $cffile = "/etc/sendmail.cf";
+ $sendmail = "/usr/sbin/sendmail";
+
+sub usage {
+ die "Usage: checksendmail [-C cffile.cf] [-r resolve_addrs_file [-T one\@test.addr\n";
+}
+
+for (unshift (@ARGV, "XX"); $#ARGV > 0; shift ARGV) {
+ if ($ARGV[1] eq "-C")
+ {
+ shift @ARGV;
+ if ($#ARGV >= 1) {$cffile = $ARGV[1]; }
+ else { &usage(); }
+ }
+ elsif ($ARGV[1] eq "-r")
+ {
+ if ($setfile & 1) { die "Can only set `resolve' once"; }
+ shift @ARGV;
+ if ($#ARGV < 1) { &usage(); }
+ $resolve = $ARGV[1];
+ $setfile += 1;
+ }
+ elsif ($ARGV[1] eq "-T")
+ {
+ if ($setfile) { die "Can't set other files and use -T"; }
+ shift @ARGV;
+ if ($#ARGV < 1) { &usage(); }
+ open (OUT, ">/tmp/csm.in$$") ||
+ die "Can't open >/tmp/csm.in$$";
+ $resolve = "/tmp/csm.in$$";
+ print OUT "$ARGV[1]\n";
+ close (OUT);
+ $setfile = 7;
+ }
+ elsif ($ARGV[1] eq "-b")
+ {
+ shift @ARGV;
+ if ($#ARGV >= 1) {$sendmail = $ARGV[1]; }
+ else { &usage(); }
+ }
+ else { &usage(); }
+}
+
+if (!-e $cffile) { die "Can't find configuration file $cffile\n"; }
+if (!-e $resolve) { die "Can't find name file $resolve\n"; }
+
+# make sure the user can access the ../mqueue directory
+
+$maildir = `grep ^OQ $cffile`;
+chop $maildir;
+$maildir =~ s/^OQ//;
+if ((!-r $maildir) || (!-x $maildir) || (!-w $maildir)) {
+ warn "checksendmail: can't access $maildir! trying anyway...\n";
+}
+
+chop($hostname = `hostname`);
+chop($pwd = `pwd`);
+print "system: $hostname\t\tcurrent dir: $pwd\n";
+print "config file: $cffile\t\tresolve file: $resolve\n";
+
+sub handler { # 1st argument is signal name
+ local($sig) = @_;
+ print STDERR "Caught a SIG$sig--shutting down\n";
+ unlink("/tmp/csm$$") || die "Can't unlink /tmp/csm$$";
+ unlink("/tmp/csm.in$$");
+ exit(0);
+}
+
+$SIG{'INT'} = 'handler';
+$SIG{'QUIT'} = 'handler';
+
+
+# glean the mailers used from the rule 0 tests
+
+sub parseresolve
+{
+ while ()
+ {
+ if (/^ADDRESS TEST MODE/) { next; }
+ if (/^Enter /) { next; }
+ if (/^>/) # INPUT LINE! (and last output is done)
+ {
+ chop;
+ if ($prevline) { # OUTPUT LINE!
+ &printparseresolve;
+ }
+ s/> *[0-9,]* *//g;
+ s/.*input: *//;
+ s/ //g;
+ s/"//g;
+ $input = $_;
+ }
+ else { chop; }
+ $prevline = $_;
+ }
+ &printparseresolve;
+}
+
+sub printparseresolve {
+ $prevline =~ s/.*returns: *//;
+ $prevline =~ s/"//g;
+ $prevline =~ s/ //g;
+ # Don't strip spaces off error messages
+ $prevline =~ s/ *([.!%<>]) */$1/g;
+ $prevline =~ s/ +([;?\$])/$1/g;
+ $prevline =~ s/([#\@:]) +/$1/g;
+
+# non-Sun test mode delimiters -> easily-readable style
+# Mark Sausville, MIT Media Laboratory, saus@media-lab.media.mit.edu
+ $prevline =~ s/\^V/\$#/;
+ $prevline =~ s/\^W/\$@/;
+ $prevline =~ s/\^X/\$:/;
+
+ #### $#ether$@sun-barr.Ebay.Sun.COM$:site!user@uunet.uu.NET
+ @t = split( '\$', $prevline);
+ $address = "XXX";
+ $remote = "XXX";
+ $mailer = "XXX";
+ for ($i = 1; $i <= $#t; $i++)
+ {
+ if (substr($t[$i], 0, 1) eq ":")
+ { $address = substr($t[$i], 1,999); }
+ if (substr($t[$i], 0, 1) eq "@")
+ { $remote = substr($t[$i], 1,999); }
+ if (substr($t[$i], 0, 1) eq "#")
+ { $mailer = substr($t[$i], 1,999);
+ $mailer =~ tr/A-Z/a-z/; }
+ }
+ printf("%-27.27s --(%-6.6s)--> %s[%s]\n", $input, $mailer,
+ $address, $remote);
+ if ($mailer ne "XXX") { $themailers{$mailer}.="$input ";}
+}
+
+# Parse output of sendmail name resolution
+
+sub parseaddress
+{
+## ADDRESS TEST MODE
+## Enter
+## > rewrite: ruleset 3 input: "user"
+
+ open(MAIL, $_[0]) || die "Can't open $_[0]...\n";
+ local ($k, $address, $prevline, $mailer, $remote, $input);
+ print $_[1]; # the title
+
+ $done = 0;
+ while ()
+ {
+ if (/^> *$/) { $done = 1; }
+ if (/^ADDRESS TEST MODE/) { next; }
+ if (/^Enter /) { next; }
+ chop;
+ if (/^>/) # INPUT LINE! (and last output is done)
+ {
+ if ($prevline) { # OUTPUT LINE!
+ $prevline =~ s/.*returns: *//;
+ $prevline =~ s/"//g;
+ $prevline =~ s/ //g;
+#> rewrite: ruleset 3 input: "site" "!" "user" "@" "uunet" "." "uu" "." "net"
+#rewrite: ruleset 8 input: "site" "!" "user" "@" "uunet" "." "uu" "." "net"
+#>
+ printf("%-27.27s ----> %s\n", $input, $prevline);
+ }
+ s/> *[0-9,]* *//g;
+ s/.*input: *//;
+ s/ //g;
+ s/"//g;
+ $input = $_;
+ }
+ last if $done;
+ $prevline = $_;
+ }
+ close(MAIL);
+}
+
+
+# pass names from resolve files to sendmail
+
+open(IN, $resolve) || die "can't open $resolve\n";
+open(OUT, ">/tmp/csm$$") || die "can't open >/tmp/csm$$\n";
+while ()
+{
+ /^$/ && next;
+ /^#/ && next;
+ print OUT "3,0 $_";
+ chop;
+ $allinput .= " $_";
+}
+close(OUT);
+close(IN);
+$sendmailprog = "$sendmail -bt -C$cffile < /tmp/csm$$|";
+open(MAIL, $sendmailprog) || die "can't exec $sendmailprog...\n";
+print "Mail address resolution (rule 0)\n\n";
+&parseresolve();
+
+# calculate $f
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+ open (IN, $resolve);
+ $rules = "3,1,4";
+ while () {
+ chop;
+ /^$/ && next;
+ /^#/ && next;
+ $address = $_;
+ print OUT "$rules $address\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ &parseaddress ("/tmp/csm$$", "\n\n\$f address header transformations\n\n");
+
+# Get the R= and S= special rulesets from the configuration
+
+open(FID, "grep ^M $cffile|");
+while ()
+{
+# Mether, P=[IPC], F=msDFMueCX, S=11, R=21, A=IPC $h
+ chop;
+ $thisline = $_; $thisline =~ s/M//; $thisline =~ s/,.*//;
+ $thisline =~ tr/A-Z/a-z/;
+ $sendrule = $_; $sendrule =~ s/.*S=//; $sendrule =~ s/,.*//;
+ if ($sendrule=~q!/!) {
+ ($esendrule, $hsendrule) = split (q!/!, $sendrule);
+ }
+ else { $esendrule = $hsendrule = $sendrule; }
+ $recvrule = $_; $recvrule =~ s/.*R=//; $recvrule =~ s/,.*//;
+ if ($recvrule=~q!/!) {
+ ($erecvrule, $hrecvrule) = split (q!/!, $recvrule);
+ }
+ else { $erecvrule = $hrecvrule = $recvrule; }
+ $esendrules{$thisline} = $esendrule;
+ $hsendrules{$thisline} = $hsendrule;
+ $erecvrules{$thisline} = $erecvrule;
+ $hrecvrules{$thisline} = $hrecvrule;
+}
+close(FID);
+
+# pass names from various mailers through sendmail
+
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ if ($erecvrules{$i} == 0) {
+ print "\n\nCan't find recv rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ open (OUT, $sendmailprog);
+ @namelist = split(/ /, $allinput);
+ $rules = "3,2,$erecvrules{$i},4";
+ foreach (@namelist) {
+ print OUT "$rules $_\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(OUT);
+ $note = "";
+ if ($erecvrules{$i} eq $hrecvrules{$i}) { $note = "and header "; }
+ &parseaddress ("/tmp/csm$$", "\n\n`To' envelope ${note}address transformations for mailer $i [$rules]:\n\n");
+}
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ if ($hrecvrules{$i} == 0) {
+ print "\n\nCan't find recv rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ if ($hrecvrules{$i} ne $erecvrules{$i}) {
+ open (OUT, $sendmailprog);
+ @namelist = split(/ /, $allinput);
+ $rules = "3,2,$hrecvrules{$i},4";
+ foreach (@namelist) {
+ print OUT "$rules $_\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(OUT);
+ &parseaddress ("/tmp/csm$$", "\n\n`To' header address transformations for mailer $i [$rules]:\n\n");
+ }
+}
+
+# pass names from various mailers through sendmail
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ if ($esendrules{$i} == 0) {
+ print "\n\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ open (OUT, $sendmailprog);
+ open (IN, $resolve);
+ $rules = "3,1,$esendrules{$i},4";
+ while () {
+ chop;
+ /^$/ && next;
+ /^#/ && next;
+ $address = $_;
+ print OUT "$rules $address\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ $note = "";
+ if ($esendrules{$i} eq $hsendrles{$i}) {$note = "and header ";}
+ &parseaddress ("/tmp/csm$$", "\n\n`From' envelope ${note}address transformations for mailer $i [$rules]:\n\n");
+}
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ if ($hsendrules{$i} == 0) {
+ print "\n\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ open (OUT, $sendmailprog);
+ open (IN, $resolve);
+ $rules = "3,1,$hsendrules{$i},4";
+ while () {
+ chop;
+ /^$/ && next;
+ /^#/ && next;
+ $address = $_;
+ print OUT "$rules $address\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ &parseaddress ("/tmp/csm$$", "\n\n`From' address header transformations for mailer $i [$rules]:\n\n");
+}
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ if ($esendrules{$i} == 0) {
+ print "\n\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ open (OUT, $sendmailprog);
+ open (IN, $resolve);
+ $rules = "3,1,4,3,1,$hsendrules{$i},4"; # XXX esendrules? book p. 431???
+ while () {
+ chop;
+ /^$/ && next;
+ /^#/ && next;
+ $address = $_;
+ print OUT "$rules $address\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ $note = "";
+ if ($esendrules{$i} eq $hsendrles{$i}) {$note = "and header ";}
+ &parseaddress ("/tmp/csm$$", "\n\n\$g address transformations for mailer $i [$rules]:\n\n");
+}
+
+unlink("/tmp/csm$$") || die "Can't unlink /tmp/csm$$";
+unlink("/tmp/csm.in$$");
+
--- sendmail-8.14.4.orig/debian/examples/checksendmail/BSDI_CONTRIB
+++ sendmail-8.14.4/debian/examples/checksendmail/BSDI_CONTRIB
@@ -0,0 +1,18 @@
+Software Package:
+ checksendmail
+
+Release/Version:
+ Dated 7/11/90.
+
+Retrieved from:
+ N/A.
+
+Bug reports:
+ This software package is maintained by the software contributor,
+ not BSDI. Please send any bug reports to both support@BSDI.COM
+ and polk@bsdi.com.
+
+Comments:
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+Modifications to this version made by BSDI:
--- sendmail-8.14.4.orig/debian/examples/checksendmail/address.resolve
+++ sendmail-8.14.4/debian/examples/checksendmail/address.resolve
@@ -0,0 +1,15 @@
+# addresses to be delivered locally
+root
+postmaster
+user
+user@mailhub
+user@mailhub.gadget.com
+user@gadget.com
+
+# Addresses to be forwarded with SMTP to firewall
+user@firewall
+user@firewall.gadget.com
+
+# Addresses to be forwarded with SMTP to harker.com
+user@harker.com
+harker!user
--- sendmail-8.14.4.orig/debian/examples/checksendmail/checksendmail
+++ sendmail-8.14.4/debian/examples/checksendmail/checksendmail
@@ -0,0 +1,868 @@
+#!/usr/bin/perl
+
+# BSDI $Id: checksendmail.perl,v 1.1.1.1 1994/01/13 21:15:31 polk Exp $
+
+# checksendmail
+#
+# The checksendmail program is a perl script that aids the testing
+# of sendmail's various configuration filse. checksendmail
+# passes typical addresses (supplied in input files) through
+# sendmail and prints the result of the resolution and
+# transformation routines.
+#
+# Gene Kim & Rob Kolstad & Jeff Polk, 7/11/90
+# Modified by Robert Harker, 11/14/00
+
+# -- -a show aliasing of local addresses
+# -- -d preceed each line with ruleset sequence summary
+# -- -C config_file
+# -- -b sendmail_binary
+# -- -l log_file of results of tests
+# -- -r resolve_addresses_file
+# -- -T test one address
+
+# defaults:
+ $resolve = "address.resolve";
+ $cffile = "/etc/mail/sendmail.cf";
+
+# Pre-create tmp files (so can use safely)
+ use Fcntl;
+ foreach ("/tmp/csm$$", "/tmp/csm.in$$") {
+ die "Can't pre-create $_"
+ unless sysopen(T,$_,O_RDWR|O_CREAT|O_EXCL,0600)
+ and close(T);
+ };
+
+sub usage {
+ die "Usage: checksendmail [-C cffile.cf] [-b sendmail_binary] [-l log_file]\n\t\t\t\t[-a] [-d] [-r resolve_addrs_file || -T one\@test.addr]\n$errormsg\n";
+}
+
+for (unshift (@ARGV, "XX"); $#ARGV > 0; shift ARGV) {
+ if ($ARGV[1] eq "-C")
+ {
+ if ($setcffile & 1) { die "Can only set `cffile.cf' once"; }
+ shift @ARGV;
+ if ($#ARGV >= 1) {$cffile = $ARGV[1]; }
+ else {
+ $errormsg = "No sendmail.cf file given for -C flag\n";
+ &usage();
+ }
+ $setcffile += 1;
+ }
+ elsif ($ARGV[1] eq "-r")
+ {
+ if ($setfile & 1) { die "Can only set `resolve' once"; }
+ shift @ARGV;
+ if ($#ARGV < 1) {
+ $errormsg = "No resolve_addrs_file given for -r flag\n";
+ &usage();
+ }
+ $resolve = $ARGV[1];
+ $setfile += 1;
+ }
+ elsif ($ARGV[1] eq "-T")
+ {
+ if ($setfile) { die "Can't set other files and use -T"; }
+ shift @ARGV;
+ if ($#ARGV < 1) {
+ $errormsg = "No one\@test.addr given for -T flag\n";
+ &usage();
+ }
+ open (OUT, ">/tmp/csm.in$$") ||
+ die "Can't open >/tmp/csm.in$$";
+ $resolve = "/tmp/csm.in$$";
+ print OUT "$ARGV[1]\n";
+ close (OUT);
+ $setfile = 7;
+ }
+ elsif ($ARGV[1] eq "-b")
+ {
+ if ($setbin & 1) { die "Can only set `sendmail_binary' once"; }
+ shift @ARGV;
+ if ($#ARGV >= 1) {$sendmail = $ARGV[1]; }
+ else {
+ $errormsg = "No sendmail_binary file given for -b flag\n";
+ &usage();
+ }
+ $setbin += 1;
+ }
+ elsif ($ARGV[1] eq "-l")
+ {
+ if ($setlog & 1) { die "Can only set `log_file' once"; }
+ shift @ARGV;
+ if ($#ARGV >= 1) {$logfile = $ARGV[1]; }
+ else {
+ $errormsg = "No log_file file given for -l flag\n";
+ &usage();
+ }
+ $setlog += 1;
+ }
+ elsif ($ARGV[1] eq "-a")
+ {
+ $doaliasing += 1;
+ }
+ elsif ($ARGV[1] eq "-d")
+ {
+ $dorspath += 1;
+ }
+ else { &usage(); }
+}
+
+# Figure out where the sendmail binary is
+if (! $setbin & 1) {
+ foreach $i ("/usr/sbin/sendmail", "/usr/libexec/sendmail", "/usr/lib/sendmail")
+ {
+ # test if binary exists and is executable
+ if ((-e $i) && (-x $i)) {
+ $sendmail = $i;
+ last;
+ }
+ }
+}
+
+
+# Figure out the version of sendmail and the location of the sendmail.cf file
+# sendmail -d0.10 -bv root
+# ("-bv root" is just to give sendmail something to chew on)
+
+$binversion = `$sendmail -d0.10 -bv root | grep "^Version "`;
+chop $binversion;
+$binversion =~ s/^Version //;
+
+# Get the major relase number from the sendmail version
+$binver = $binversion;
+$binver =~ s/^8\.//;
+$binver =~ s/\..+//;
+
+# if the cf file was not set on the command line,
+# find out where the binary looks for it
+if ( ! -e $cffile ) {
+ $cffile = `$sendmail -d0.10 -bv root | grep "Def Conf file:"`;
+ chop $cffile;
+ $cffile =~ s/ //g;
+ $cffile =~ s/ //g;
+ $cffile =~ s/^DefConffile://;
+}
+
+if (!-e $cffile) { die "Can't find configuration file $cffile\n"; }
+
+if (!-e $resolve) { die "Can't find name file $resolve\n"; }
+
+# Figure out the version of the sendmail.cf file
+# Look for the V line
+$cfversion = `grep "^V" $cffile`;
+chop $cfversion;
+# if $cfversion is empty, then the configuration is sendmail 5, not sendmail 8
+$cfversion =~ s/^$/V0/;
+
+# Get the version number from the V line
+$cfver = $cfversion;
+$cfver =~ s/^V//;
+$cfver =~ s'/.+'';
+
+# check that the binary is a higher version than config file
+if ( $binver < $cfver + 1) {
+ die "$cffile version ($cfversion) is more advanced than $sendmail version ($binversion)\n";
+}
+
+# figure out where the mqueue directory is
+if ( $cfver <= 6 ) {
+ $maildir = `grep "^OQ" $cffile`;
+ chop $maildir;
+ $maildir =~ s/^OQ//;
+} else {
+ $maildir = `grep "^O QueueDirectory" $cffile`;
+ chop $maildir;
+ $maildir =~ s/^O QueueDirectory=//;
+}
+
+# make sure the user can access the ../mqueue directory
+if ((!-r $maildir) || (!-x $maildir) || (!-w $maildir)) {
+ if ($doaliasing & 1) {
+ die "checksendmail: can't access $maildir! can't use checksendmail's -a flag\n";
+ } else {
+ warn "checksendmail: can't access $maildir! trying anyway...\n";
+ }
+}
+
+chop($hostname = `hostname`);
+chop($pwd = `pwd`);
+print "system: $hostname\t\tcurrent dir: $pwd\n";
+print "resolve file: $resolve\n";
+print "sendmail binary: $sendmail\t\tsendmail version: $binversion\n";
+print "config file: $cffile\t\tconfig file version: $cfversion\n\n";
+if ($setlog & 1) {
+ print "log file: $logfile\n\n";
+ # now print to the log file
+ open (LOG , ">$logfile") || die "Can't open >$logfile";
+ print LOG "system: $hostname\t\tcurrent dir: $pwd\n";
+ print LOG "resolve file: $resolve\n";
+ print LOG "sendmail binary: $sendmail\t\tsendmail version: $binversion\n";
+ print LOG "config file: $cffile\t\tconfig file version: $cfversion\n";
+ print LOG "log file: $logfile\n\n";
+}
+
+sub handler { # 1st argument is signal name
+ local($sig) = @_;
+ print STDERR "Caught a SIG$sig--shutting down\n";
+ unlink("/tmp/csm$$") || die "Can't unlink /tmp/csm$$";
+ unlink("/tmp/csm.in$$");
+ if ($setlog & 1) {
+ close(LOG);
+ }
+ exit(0);
+}
+
+$SIG{'INT'} = 'handler';
+$SIG{'QUIT'} = 'handler';
+
+
+
+# glean the mailers used from the rule 0 tests
+
+sub parseresolve
+{
+ while ()
+ {
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG $_;
+ }
+ if (/^ADDRESS TEST MODE/) { next; }
+ if (/^Enter /) { next; }
+ if (/^Warning: .cf file is out of date/) { next; }
+
+ # if the binary is less than 8.7 then use result of ruleset 0
+ if ( $binver <= 6 ) {
+ if (/^>/) # INPUT LINE! (and last output is done)
+ {
+ chop;
+ if ($prevline) { # OUTPUT LINE!
+ &printparseresolve;
+ }
+ s/> *[0-9,]* *//g;
+ s/.*input: *//;
+ s/ //g;
+ s/"//g;
+ $input = $_;
+ }
+ else { chop; }
+ $prevline = $_;
+ } else {
+ # format of /parse output is:
+ # Parsing envelope recipient address
+ # rewrite: ruleset 3 input: harker @ harker . com
+ if ($prevrule eq "Parsing envelope recipient address\n" )
+ {
+ chop;
+ s/> *[0-9,]* *//g;
+ s/.*input: *//;
+ s/ //g;
+ s/"//g;
+ $input = $_;
+ $prevrule = $_;
+ }
+ elsif (/^mailer /)
+ {
+ $prevrule = $_;
+ &printparseresolve;
+ }
+ else
+ {
+ $prevrule = $_;
+ }
+ }
+ }
+ #&printparseresolve;
+}
+
+sub printparseresolve {
+ # if the binary is less than 8.7 then use result of ruleset 0
+ if ( $binver <= 6 ) {
+ if ($input eq "") { return;}
+
+ $prevline =~ s/.*returns: *//;
+ $prevline =~ s/"//g;
+ $prevline =~ s/ //g;
+ # Don't strip spaces off error messages
+ $prevline =~ s/ *([.!%<>]) */$1/g;
+ $prevline =~ s/ +([;?\$])/$1/g;
+ $prevline =~ s/([#\@:]) +/$1/g;
+
+# non-Sun test mode delimiters -> easily-readable style
+# Mark Sausville, MIT Media Laboratory, saus@media-lab.media.mit.edu
+ $prevline =~ s/\^V/\$#/;
+ $prevline =~ s/\^W/\$@/;
+ $prevline =~ s/\^X/\$:/;
+
+ #### $#ether$@sun-barr.Ebay.Sun.COM$:site!user@uunet.uu.NET
+ @t = split( '\$', $prevline);
+ $address = "XXX";
+ $remote = "XXX";
+ $mailer = "XXX";
+ for ($i = 1; $i <= $#t; $i++)
+ {
+ if (substr($t[$i], 0, 1) eq ":")
+ { $address = substr($t[$i], 1,999); }
+ if (substr($t[$i], 0, 1) eq "@")
+ { $remote = substr($t[$i], 1,999); }
+ if (substr($t[$i], 0, 1) eq "#")
+ { $mailer = substr($t[$i], 1,999);
+ $mailer =~ tr/A-Z/a-z/; }
+ }
+ } else {
+ # the binary is at least 8.7 then use result of /parse
+ chop;
+ s/,//g;
+
+ # mailer esmtp, host harker.com., user harker@harker.com
+ @t = split( ' ', $_);
+ $address = "XXX";
+ $remote = "XXX";
+ $mailer = "XXX";
+ for ($i = 0; $i <= $#t; $i++)
+ {
+ if ($t[$i] eq "user")
+ { $address = $t[++$i]; }
+ if ($t[$i] eq "host")
+ { $remote = $t[++$i]; }
+ if ($t[$i] eq "mailer")
+ { $mailer = $t[++$i];
+ $mailer =~ tr/A-Z/a-z/; }
+ }
+ }
+ printf("%-27.27s --(%-6.6s)--> %s[%s]\n", $input, $mailer,
+ $address, $remote);
+ # now print to the log file
+ if ($setlog & 1) {
+ printf LOG ("%-27.27s --(%-6.6s)--> %s[%s]\n\n", $input, $mailer,
+ $address, $remote);
+ }
+
+ if ($doaliasing & 1) {
+ # If the address resolved to the local mailer,
+ # then expand the username as an alias
+ if ( $mailer eq "local")
+ {
+ $setalias = $aliasfound = 0;
+ $laddress = $address;
+ $sendmailprog = "$sendmail -bv -C$cffile $laddress|";
+ open(LOCAL, $sendmailprog) ||
+ die "can't exec $sendmailprog...\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "\n$sendmailprog\n";
+ }
+ while ()
+ {
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG $_;
+ }
+ chop;
+ if (/unknown/)
+ {
+ $aliasfound = 1;
+ printf("\t\t aliased to --(error )--> %s\n", $_);
+ # now print to the log file
+ if ($setlog & 1) {
+ printf LOG ("\t\t aliased to --(error )--> %s\n\n", $_);
+ }
+ next;
+ }
+ s/,//g;
+ @l = split( ' ', $_);
+ $aladdress = "XXX";
+ $remote = "XXX";
+ $mailer = "XXX";
+ for ($i = 1; $i <= $#l; $i++)
+ {
+ # ./sendmail -bv -C./sendmail.cf j.murphy
+ # j.murphy@pop.mcit.com... deliverable: mailer mciesmtp,
+ # host pop.mcit.com, user j.murphy@pop.mcit.com
+ if ($l[$i] eq "user") { $aladdress = $l[++$i]; }
+ if ($l[$i] eq "host") { $remote = $l[++$i]; }
+ if ($l[$i] eq "mailer") { $mailer = $l[++$i]; }
+ }
+ if (("$laddress" eq "$aladdress") && ($aliasfound == 0)) {
+ $selfalias = 1;
+ next;
+ }
+ printf("\t\t aliased to --(%-6.6s)--> %s[%s]\n",
+ $mailer, $aladdress, $remote);
+ # now print to the log file
+ if ($setlog & 1) {
+ printf LOG ("\t\t aliased to --(%-6.6s)--> %s[%s]\n\n",
+ $mailer, $aladdress, $remote);
+ }
+ if ("$laddress" ne "$aladdress") {
+ $aliasfound = 1;
+ $envsenderaddrs .= " $aladdress";
+ }
+ if ($mailer ne "XXX") { $themailers{$mailer}=1;}
+ }
+ close(LOCAL);
+ if ($selfalias == 1 && $aliasfound == 1) {
+ printf("\t\t aliased to --(%-6.6s)--> %s[%s]\n",
+ $mailer, $aladdress, $remote);
+ # now print to the log file
+ if ($setlog & 1) {
+ printf LOG ("\t\t aliased to --(%-6.6s)--> %s[%s]\n\n",
+ $mailer, $aladdress, $remote);
+ }
+ }
+ # now print a blank line to the log file
+ if ($setlog & 1) {
+ print LOG "\n";
+ }
+ } else {
+ $envsenderaddrs .= " $address";
+ }
+ }
+
+ if ($mailer ne "XXX") { $themailers{$mailer}.="$input ";}
+}
+
+# Parse output of sendmail name resolution
+
+sub parseaddress
+{
+## ADDRESS TEST MODE
+## Enter
+## > rewrite: ruleset 3 input: "user"
+
+ open(MAIL, $_[0]) || die "Can't open $_[0]...\n";
+ local ($k, $address, $prevline, $mailer, $remote, $input);
+ print $_[1]; # the title
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "\n$_[1]"; # the title
+ }
+
+ $done = 0;
+ while ()
+ {
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG $_;
+ }
+ if (/^> *$/) { $done = 1; }
+ if (/^ADDRESS TEST MODE/) { next; }
+ if (/^Enter /) { next; }
+ if (/^Warning: .cf file is out of date/) { next; }
+ if (/^$/) { next; }
+ chop;
+ # rewrite $rules to be just a slash if it starts with a /
+ $rules =~ s'/.+'/';
+ # if the binary is less than 8.7 then use result of ruleset 4
+ if ( $binver <= 6 || $rules ne "/" ) {
+ if (/^>/) # INPUT LINE! (and last output is done)
+ {
+ if ($prevline) { # OUTPUT LINE!
+ $prevline =~ s/.*returns: *//;
+ $prevline =~ s/"//g;
+ $prevline =~ s/ //g;
+#> rewrite: ruleset 3 input: "site" "!" "user" "@" "uunet" "." "uu" "." "net"
+#rewrite: ruleset 8 input: "site" "!" "user" "@" "uunet" "." "uu" "." "net"
+#>
+ printf("%s%-24.24s ----> %s\n", $rspath, $input, $prevline);
+ # now print to the log file
+ if ($setlog & 1) {
+ printf LOG ("%s%-24.24s ----> %s\n", $rspath, $input, $prevline);
+ }
+ }
+ s/> *[0-9,]* *//g;
+ s/.*input: *//;
+ s/ //g;
+ s/"//g;
+ $input = $_;
+ }
+ last if $done;
+ $prevline = $_;
+ } else {
+ # format of /try output is:
+ # Trying envelope recipient address harker for mailer esmtp
+ # ...
+ # Rcode = 0, addr = harker@mailhub.gadget.com
+ # remove extra ">" from "> >" lines
+ s/^> >/>/;
+ if (/^> Trying/) # INPUT LINE! (and last output is done)
+ {
+ chop;
+ s/> Trying .+ address //;
+ s/ for mailer .+//;
+ s/ //g;
+ s/"//g;
+ $input = $_;
+ $prevrule = $_;
+ }
+ elsif (/^Rcode = /)
+ {
+ $prevrule = $_;
+ # Rcode = 0, addr = harker@mailhub.gadget.com
+ s/^Rcode = .+ addr = //;
+ printf("%s%-24.24s ----> %s\n", $rspath, $input, $_);
+ # now print to the log file
+ if ($setlog & 1) {
+ printf LOG ("%s%-24.24s ----> %s\n\n", $rspath, $input, $_);
+ }
+ }
+ else
+ {
+ $prevrule = $_;
+ }
+ }
+ }
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "\n";
+ }
+ close(MAIL);
+}
+
+
+# if the binary is less than 8.7 then use result of ruleset 4
+if ( $binver <= 6 ) {
+ print "Mail address resolution (rule 0)\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "Mail address resolution (rule 0)\n";
+ }
+} else {
+ print "Mail address resolution (/parse)\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "Mail address resolution (/parse)\n";
+ }
+}
+# pass names from resolve files to sendmail
+
+open(IN, $resolve) || die "can't open $resolve\n";
+open(OUT, ">/tmp/csm$$") || die "can't open >/tmp/csm$$\n";
+while ()
+{
+ /^$/ && next;
+ /^#/ && next;
+ # if the binary is less than 8.7 then use result of ruleset 0
+ if ( $binver == 5 ) {
+ $rules = "0 $_";
+ } elsif ( $binver <= 6 ) {
+ $rules = "3,0 $_";
+ } else {
+ $rules = "/parse $_";
+ }
+ print OUT $rules;
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "$rules";
+ }
+ chop;
+ $allinput .= " $_";
+}
+ $allinput =~ s/^ //;
+close(OUT);
+close(IN);
+$sendmailprog = "$sendmail -bt -C$cffile < /tmp/csm$$|";
+open(MAIL, $sendmailprog) || die "can't exec $sendmailprog...\n";
+&parseresolve();
+
+# calculate $f
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+ open (IN, $resolve);
+ # sendmail 5 automatically runs ruleset 3
+ if ( $binver == 5 ) {
+ $rules = "1,4";
+ } else {
+ $rules = "3,1,4";
+ }
+ if ($dorspath & 1) { $rspath = "\$f: "; }
+
+ while () {
+ chop;
+ /^$/ && next;
+ /^#/ && next;
+ $address = $_;
+ print OUT "$rules $address\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "$rules $address\n";
+ }
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "\n"; # stuff last line into sendmail
+ }
+ close(IN);
+ close(OUT);
+ &parseaddress ("/tmp/csm$$", "\n\$f address header transformations\n");
+
+# Get the R= and S= special rulesets from the configuration
+# now print to the log file
+if ($setlog & 1) {
+ print LOG "\nGet the R= and S= mailer specific rulesets\n";
+}
+
+open(FID, "grep ^M $cffile|");
+while ()
+{
+# Mether, P=[IPC], F=msDFMueCX, S=11, R=21, A=IPC $h
+ chop;
+ $thisline = $_;
+ $thisline =~ s/M//;
+ $thisline =~ s/,.*//;
+ $thisline =~ tr/A-Z/a-z/;
+ $sendrule = $_;
+ $sendrule =~ s/.*S=//;
+ $sendrule =~ s/,.*//;
+ if ($sendrule=~q!/!) {
+ ($esendrule, $hsendrule) = split (q!/!, $sendrule);
+ } else {
+ $esendrule = $hsendrule = $sendrule;
+ }
+ $recvrule = $_;
+ $recvrule =~ s/.*R=//;
+ $recvrule =~ s/,.*//;
+ if ($recvrule=~q!/!) {
+ ($erecvrule, $hrecvrule) = split (q!/!, $recvrule);
+ } else {
+ $erecvrule = $hrecvrule = $recvrule;
+ }
+ $esendrules{$thisline} = $esendrule;
+ $hsendrules{$thisline} = $hsendrule;
+ $erecvrules{$thisline} = $erecvrule;
+ $hrecvrules{$thisline} = $hrecvrule;
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "mailer: $thisline\t->\tesendrule = $esendrule, hsendrule = $hsendrule,
+ erecvrule = $erecvrule, hrecvrule = $hrecvrule\n";
+ }
+}
+# now print to the log file
+if ($setlog & 1) {
+ print LOG "\n";
+}
+close(FID);
+
+# pass envelope recipient names from various mailers through sendmail
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+ if ($dorspath & 1) { $rspath = "$i ER: "; }
+
+ # if the binary is less than 8.7 then use result of ruleset 0
+ if ( $binver <= 6 ) {
+ if ($erecvrules{$i} == 0) {
+ print "\nCan't find recv rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ # sendmail 5 automatically runs ruleset 3
+ if ( $binver == 5 ) {
+ $rules = "2,$erecvrules{$i},4";
+ } else {
+ $rules = "3,2,$erecvrules{$i},4";
+ }
+ } else {
+ print OUT "/tryflags ER\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "/tryflags ER\n";
+ }
+ $rules = "/try $i";
+ }
+ @namelist = split(/ /, $allinput);
+ foreach (@namelist) {
+ print OUT "$rules $_\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "$rules $_\n";
+ }
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "\n"; # stuff last line into the log
+ }
+ close(OUT);
+ $note = "";
+ if ($erecvrules{$i} eq $hrecvrules{$i}) { $note = "and header "; }
+ &parseaddress ("/tmp/csm$$", "\n`To' envelope ${note}address transformations for mailer $i [$rules]:\n");
+}
+
+# pass header recipient names from various mailers through sendmail
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+ if ($dorspath & 1) { $rspath = "$i HR: "; }
+
+ # only run the header ruleset if the mailer uses split env/hdr rulesets
+ if ($hrecvrules{$i} ne $erecvrules{$i}) {
+ # if the binary is less than 8.7 then use result of ruleset 0
+ if ( $binver <= 6 ) {
+ if ($hrecvrules{$i} == 0) {
+ print "\nCan't find recv rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ # sendmail 5 automatically runs ruleset 3
+ if ( $binver == 5 ) {
+ $rules = "2,$hrecvrules{$i},4";
+ } else {
+ $rules = "3,2,$hrecvrules{$i},4";
+ }
+ } else {
+ print OUT "/tryflags HR\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "/tryflags HR\n";
+ }
+ $rules = "/try $i";
+ }
+ @namelist = split(/ /, $allinput);
+ foreach (@namelist) {
+ print OUT "$rules $_\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "$rules $_\n";
+ }
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "\n"; # stuff last line into the log
+ }
+ close(OUT);
+ &parseaddress ("/tmp/csm$$", "\n`To' header address transformations for mailer $i [$rules]:\n");
+ }
+}
+
+# pass envelope sender names from various mailers through sendmail
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+ if ($dorspath & 1) { $rspath = "$i ES: "; }
+
+ # if the binary is less than 8.7 then use result of ruleset 0
+ if ( $binver <= 6 ) {
+ if ($esendrules{$i} == 0) {
+ print "\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ # sendmail 5 automatically runs ruleset 3
+ if ( $binver == 5 ) {
+ $rules = "2,$esendrules{$i},4";
+ } else {
+ $rules = "3,2,$esendrules{$i},4";
+ }
+ } else {
+ print OUT "/tryflags ES\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "/tryflags ES\n";
+ }
+ $rules = "/try $i";
+ }
+ @namelist = split(/ /, $allinput);
+ foreach (@namelist) {
+ print OUT "$rules $_\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "$rules $_\n";
+ }
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ $note = "";
+ if ($esendrules{$i} eq $hsendrles{$i}) {$note = "and header ";}
+ &parseaddress ("/tmp/csm$$", "\n`From' envelope ${note}address transformations for mailer $i [$rules]:\n");
+}
+
+# pass header sender names from various mailers through sendmail
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+ if ($dorspath & 1) { $rspath = "$i HS: "; }
+
+ # only run the header ruleset if the mailer uses split env/hdr rulesets
+ if ($hsendrules{$i} ne $esendrules{$i}) {
+ # if the binary is less than 8.7 then use result of ruleset 0
+ if ( $binver <= 6 ) {
+ if ($hsendrules{$i} == 0) {
+ print "\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ # sendmail 5 automatically runs ruleset 3
+ if ( $binver == 5 ) {
+ $rules = "2,$hsendrules{$i},4";
+ } else {
+ $rules = "3,2,$hsendrules{$i},4";
+ }
+ } else {
+ print OUT "/tryflags HS\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "/tryflags HR\n";
+ }
+ $rules = "/try $i";
+ }
+ @namelist = split(/ /, $allinput);
+ foreach (@namelist) {
+ print OUT "$rules $_\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "$rules $_\n";
+ }
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ &parseaddress ("/tmp/csm$$", "\n`From' address header transformations for mailer $i [$rules]:\n");
+ }
+}
+
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+ if ($dorspath & 1) { $rspath = "\$g: "; }
+
+ # if the binary is 8.9 or below then check if the mailer
+ # specific ruleset exists
+ if ( $binver <= 9 ) {
+ # if the binary is less than 8.7 then use result of ruleset 0
+ if ($esendrules{$i} == 0) {
+ print "\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ }
+ # sendmail 5 automatically runs ruleset 3
+ if ( $binver == 5 ) {
+ $rules = "1,4,3,1,$hsendrules{$i},4"; # XXX esendrules? book p. 431???
+ } else {
+ $rules = "3,1,4,3,1,$hsendrules{$i},4"; # XXX esendrules? book p. 431???
+ }
+ open (IN, $resolve);
+ while () {
+ chop;
+ /^$/ && next;
+ /^#/ && next;
+ $address = $_;
+ print OUT "$rules $address\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ $note = "";
+ if ($esendrules{$i} eq $hsendrles{$i}) {$note = "and header ";}
+ &parseaddress ("/tmp/csm$$", "\n\$g address transformations for mailer $i [$rules]:\n");
+}
+
+unlink("/tmp/csm$$") || die "Can't unlink /tmp/csm$$";
+unlink("/tmp/csm.in$$");
+
+exit;
--- sendmail-8.14.4.orig/debian/examples/checksendmail/checksendmail-BSDI.patch
+++ sendmail-8.14.4/debian/examples/checksendmail/checksendmail-BSDI.patch
@@ -0,0 +1,1240 @@
+diff -c 'BSDI/checksendmail.perl' 'checksendmail'
+Index: ./BSDI/checksendmail.perl
+Prereq: 1.1.1.1
+*** ./BSDI/checksendmail.perl Mon Jan 15 12:49:25 2001
+--- ./checksendmail Mon Apr 14 15:57:56 2003
+***************
+*** 4,45 ****
+
+ # checksendmail
+ #
+! # The checksendmail program is a perl script that aids the testing
+ # of sendmail's various configuration filse. checksendmail
+ # passes typical addresses (supplied in input files) through
+ # sendmail and prints the result of the resolution and
+ # transformation routines.
+ #
+ # Gene Kim & Rob Kolstad & Jeff Polk, 7/11/90
+
+! # -- -C config file
+ # -- -r resolve_addresses_file
+ # -- -T test one address
+- # -- -b sendmail binary
+-
+- # XXX deficiencies: ``/etc/sendmail'' should be a parameter
+
+ # defaults:
+ $resolve = "address.resolve";
+! $cffile = "/etc/sendmail.cf";
+! $sendmail = "/usr/sbin/sendmail";
+
+ sub usage {
+! die "Usage: checksendmail [-C cffile.cf] [-r resolve_addrs_file [-T one\@test.addr\n";
+ }
+
+ for (unshift (@ARGV, "XX"); $#ARGV > 0; shift ARGV) {
+ if ($ARGV[1] eq "-C")
+ {
+ shift @ARGV;
+ if ($#ARGV >= 1) {$cffile = $ARGV[1]; }
+! else { &usage(); }
+ }
+ elsif ($ARGV[1] eq "-r")
+ {
+ if ($setfile & 1) { die "Can only set `resolve' once"; }
+ shift @ARGV;
+! if ($#ARGV < 1) { &usage(); }
+ $resolve = $ARGV[1];
+ $setfile += 1;
+ }
+--- 4,62 ----
+
+ # checksendmail
+ #
+! # The checksendmail program is a perl script that aids the testing
+ # of sendmail's various configuration filse. checksendmail
+ # passes typical addresses (supplied in input files) through
+ # sendmail and prints the result of the resolution and
+ # transformation routines.
+ #
+ # Gene Kim & Rob Kolstad & Jeff Polk, 7/11/90
++ # Modified by Robert Harker, 11/14/00
+
+! # -- -a show aliasing of local addresses
+! # -- -d preceed each line with ruleset sequence summary
+! # -- -C config_file
+! # -- -b sendmail_binary
+! # -- -l log_file of results of tests
+ # -- -r resolve_addresses_file
+ # -- -T test one address
+
+ # defaults:
+ $resolve = "address.resolve";
+! $cffile = "/etc/mail/sendmail.cf";
+!
+! # Pre-create tmp files (so can use safely)
+! use Fcntl;
+! foreach ("/tmp/csm$$", "/tmp/csm.in$$") {
+! die "Can't pre-create $_"
+! unless sysopen(T,$_,O_RDWR|O_CREAT|O_EXCL,0600)
+! and close(T);
+! };
+
+ sub usage {
+! die "Usage: checksendmail [-C cffile.cf] [-b sendmail_binary] [-l log_file]\n\t\t\t\t[-a] [-d] [-r resolve_addrs_file || -T one\@test.addr]\n$errormsg\n";
+ }
+
+ for (unshift (@ARGV, "XX"); $#ARGV > 0; shift ARGV) {
+ if ($ARGV[1] eq "-C")
+ {
++ if ($setcffile & 1) { die "Can only set `cffile.cf' once"; }
+ shift @ARGV;
+ if ($#ARGV >= 1) {$cffile = $ARGV[1]; }
+! else {
+! $errormsg = "No sendmail.cf file given for -C flag\n";
+! &usage();
+! }
+! $setcffile += 1;
+ }
+ elsif ($ARGV[1] eq "-r")
+ {
+ if ($setfile & 1) { die "Can only set `resolve' once"; }
+ shift @ARGV;
+! if ($#ARGV < 1) {
+! $errormsg = "No resolve_addrs_file given for -r flag\n";
+! &usage();
+! }
+ $resolve = $ARGV[1];
+ $setfile += 1;
+ }
+***************
+*** 47,53 ****
+ {
+ if ($setfile) { die "Can't set other files and use -T"; }
+ shift @ARGV;
+! if ($#ARGV < 1) { &usage(); }
+ open (OUT, ">/tmp/csm.in$$") ||
+ die "Can't open >/tmp/csm.in$$";
+ $resolve = "/tmp/csm.in$$";
+--- 64,73 ----
+ {
+ if ($setfile) { die "Can't set other files and use -T"; }
+ shift @ARGV;
+! if ($#ARGV < 1) {
+! $errormsg = "No one\@test.addr given for -T flag\n";
+! &usage();
+! }
+ open (OUT, ">/tmp/csm.in$$") ||
+ die "Can't open >/tmp/csm.in$$";
+ $resolve = "/tmp/csm.in$$";
+***************
+*** 57,91 ****
+ }
+ elsif ($ARGV[1] eq "-b")
+ {
+ shift @ARGV;
+ if ($#ARGV >= 1) {$sendmail = $ARGV[1]; }
+! else { &usage(); }
+ }
+ else { &usage(); }
+ }
+
+ if (!-e $cffile) { die "Can't find configuration file $cffile\n"; }
+ if (!-e $resolve) { die "Can't find name file $resolve\n"; }
+
+! # make sure the user can access the ../mqueue directory
+
+! $maildir = `grep ^OQ $cffile`;
+! chop $maildir;
+! $maildir =~ s/^OQ//;
+ if ((!-r $maildir) || (!-x $maildir) || (!-w $maildir)) {
+! warn "checksendmail: can't access $maildir! trying anyway...\n";
+ }
+
+ chop($hostname = `hostname`);
+ chop($pwd = `pwd`);
+ print "system: $hostname\t\tcurrent dir: $pwd\n";
+! print "config file: $cffile\t\tresolve file: $resolve\n";
+
+ sub handler { # 1st argument is signal name
+ local($sig) = @_;
+ print STDERR "Caught a SIG$sig--shutting down\n";
+ unlink("/tmp/csm$$") || die "Can't unlink /tmp/csm$$";
+ unlink("/tmp/csm.in$$");
+ exit(0);
+ }
+
+--- 77,215 ----
+ }
+ elsif ($ARGV[1] eq "-b")
+ {
++ if ($setbin & 1) { die "Can only set `sendmail_binary' once"; }
+ shift @ARGV;
+ if ($#ARGV >= 1) {$sendmail = $ARGV[1]; }
+! else {
+! $errormsg = "No sendmail_binary file given for -b flag\n";
+! &usage();
+! }
+! $setbin += 1;
+! }
+! elsif ($ARGV[1] eq "-l")
+! {
+! if ($setlog & 1) { die "Can only set `log_file' once"; }
+! shift @ARGV;
+! if ($#ARGV >= 1) {$logfile = $ARGV[1]; }
+! else {
+! $errormsg = "No log_file file given for -l flag\n";
+! &usage();
+! }
+! $setlog += 1;
+! }
+! elsif ($ARGV[1] eq "-a")
+! {
+! $doaliasing += 1;
+! }
+! elsif ($ARGV[1] eq "-d")
+! {
+! $dorspath += 1;
+ }
+ else { &usage(); }
+ }
+
++ # Figure out where the sendmail binary is
++ if (! $setbin & 1) {
++ foreach $i ("/usr/sbin/sendmail", "/usr/libexec/sendmail", "/usr/lib/sendmail")
++ {
++ # test if binary exists and is executable
++ if ((-e $i) && (-x $i)) {
++ $sendmail = $i;
++ last;
++ }
++ }
++ }
++
++
++ # Figure out the version of sendmail and the location of the sendmail.cf file
++ # sendmail -d0.10 -bv root
++ # ("-bv root" is just to give sendmail something to chew on)
++
++ $binversion = `$sendmail -d0.10 -bv root | grep "^Version "`;
++ chop $binversion;
++ $binversion =~ s/^Version //;
++
++ # Get the major relase number from the sendmail version
++ $binver = $binversion;
++ $binver =~ s/^8\.//;
++ $binver =~ s/\..+//;
++
++ # if the cf file was not set on the command line,
++ # find out where the binary looks for it
++ if ( ! -e $cffile ) {
++ $cffile = `$sendmail -d0.10 -bv root | grep "Def Conf file:"`;
++ chop $cffile;
++ $cffile =~ s/ //g;
++ $cffile =~ s/ //g;
++ $cffile =~ s/^DefConffile://;
++ }
++
+ if (!-e $cffile) { die "Can't find configuration file $cffile\n"; }
++
+ if (!-e $resolve) { die "Can't find name file $resolve\n"; }
+
+! # Figure out the version of the sendmail.cf file
+! # Look for the V line
+! $cfversion = `grep "^V" $cffile`;
+! chop $cfversion;
+! # if $cfversion is empty, then the configuration is sendmail 5, not sendmail 8
+! $cfversion =~ s/^$/V0/;
+!
+! # Get the version number from the V line
+! $cfver = $cfversion;
+! $cfver =~ s/^V//;
+! $cfver =~ s'/.+'';
+!
+! # check that the binary is a higher version than config file
+! if ( $binver < $cfver + 1) {
+! die "$cffile version ($cfversion) is more advanced than $sendmail version ($binversion)\n";
+! }
+!
+! # figure out where the mqueue directory is
+! if ( $cfver <= 6 ) {
+! $maildir = `grep "^OQ" $cffile`;
+! chop $maildir;
+! $maildir =~ s/^OQ//;
+! } else {
+! $maildir = `grep "^O QueueDirectory" $cffile`;
+! chop $maildir;
+! $maildir =~ s/^O QueueDirectory=//;
+! }
+
+! # make sure the user can access the ../mqueue directory
+ if ((!-r $maildir) || (!-x $maildir) || (!-w $maildir)) {
+! if ($doaliasing & 1) {
+! die "checksendmail: can't access $maildir! can't use checksendmail's -a flag\n";
+! } else {
+! warn "checksendmail: can't access $maildir! trying anyway...\n";
+! }
+ }
+
+ chop($hostname = `hostname`);
+ chop($pwd = `pwd`);
+ print "system: $hostname\t\tcurrent dir: $pwd\n";
+! print "resolve file: $resolve\n";
+! print "sendmail binary: $sendmail\t\tsendmail version: $binversion\n";
+! print "config file: $cffile\t\tconfig file version: $cfversion\n\n";
+! if ($setlog & 1) {
+! print "log file: $logfile\n\n";
+! # now print to the log file
+! open (LOG , ">$logfile") || die "Can't open >$logfile";
+! print LOG "system: $hostname\t\tcurrent dir: $pwd\n";
+! print LOG "resolve file: $resolve\n";
+! print LOG "sendmail binary: $sendmail\t\tsendmail version: $binversion\n";
+! print LOG "config file: $cffile\t\tconfig file version: $cfversion\n";
+! print LOG "log file: $logfile\n\n";
+! }
+
+ sub handler { # 1st argument is signal name
+ local($sig) = @_;
+ print STDERR "Caught a SIG$sig--shutting down\n";
+ unlink("/tmp/csm$$") || die "Can't unlink /tmp/csm$$";
+ unlink("/tmp/csm.in$$");
++ if ($setlog & 1) {
++ close(LOG);
++ }
+ exit(0);
+ }
+
+***************
+*** 93,157 ****
+ $SIG{'QUIT'} = 'handler';
+
+
+ # glean the mailers used from the rule 0 tests
+
+ sub parseresolve
+ {
+ while ()
+ {
+! if (/^ADDRESS TEST MODE/) { next; }
+! if (/^Enter /) { next; }
+! if (/^>/) # INPUT LINE! (and last output is done)
+! {
+! chop;
+! if ($prevline) { # OUTPUT LINE!
+ &printparseresolve;
+! }
+! s/> *[0-9,]* *//g;
+! s/.*input: *//;
+! s/ //g;
+! s/"//g;
+! $input = $_;
+! }
+! else { chop; }
+! $prevline = $_;
+ }
+! &printparseresolve;
+ }
+
+ sub printparseresolve {
+! $prevline =~ s/.*returns: *//;
+! $prevline =~ s/"//g;
+! $prevline =~ s/ //g;
+! # Don't strip spaces off error messages
+! $prevline =~ s/ *([.!%<>]) */$1/g;
+! $prevline =~ s/ +([;?\$])/$1/g;
+! $prevline =~ s/([#\@:]) +/$1/g;
+
+ # non-Sun test mode delimiters -> easily-readable style
+ # Mark Sausville, MIT Media Laboratory, saus@media-lab.media.mit.edu
+! $prevline =~ s/\^V/\$#/;
+! $prevline =~ s/\^W/\$@/;
+! $prevline =~ s/\^X/\$:/;
+!
+! #### $#ether$@sun-barr.Ebay.Sun.COM$:site!user@uunet.uu.NET
+! @t = split( '\$', $prevline);
+! $address = "XXX";
+! $remote = "XXX";
+! $mailer = "XXX";
+! for ($i = 1; $i <= $#t; $i++)
+! {
+! if (substr($t[$i], 0, 1) eq ":")
+! { $address = substr($t[$i], 1,999); }
+! if (substr($t[$i], 0, 1) eq "@")
+! { $remote = substr($t[$i], 1,999); }
+! if (substr($t[$i], 0, 1) eq "#")
+! { $mailer = substr($t[$i], 1,999);
+! $mailer =~ tr/A-Z/a-z/; }
+! }
+! printf("%-27.27s --(%-6.6s)--> %s[%s]\n", $input, $mailer,
+! $address, $remote);
+! if ($mailer ne "XXX") { $themailers{$mailer}.="$input ";}
+ }
+
+ # Parse output of sendmail name resolution
+--- 217,426 ----
+ $SIG{'QUIT'} = 'handler';
+
+
++
+ # glean the mailers used from the rule 0 tests
+
+ sub parseresolve
+ {
+ while ()
+ {
+! # now print to the log file
+! if ($setlog & 1) {
+! print LOG $_;
+! }
+! if (/^ADDRESS TEST MODE/) { next; }
+! if (/^Enter /) { next; }
+! if (/^Warning: .cf file is out of date/) { next; }
+!
+! # if the binary is less than 8.7 then use result of ruleset 0
+! if ( $binver <= 6 ) {
+! if (/^>/) # INPUT LINE! (and last output is done)
+! {
+! chop;
+! if ($prevline) { # OUTPUT LINE!
+! &printparseresolve;
+! }
+! s/> *[0-9,]* *//g;
+! s/.*input: *//;
+! s/ //g;
+! s/"//g;
+! $input = $_;
+! }
+! else { chop; }
+! $prevline = $_;
+! } else {
+! # format of /parse output is:
+! # Parsing envelope recipient address
+! # rewrite: ruleset 3 input: harker @ harker . com
+! if ($prevrule eq "Parsing envelope recipient address\n" )
+! {
+! chop;
+! s/> *[0-9,]* *//g;
+! s/.*input: *//;
+! s/ //g;
+! s/"//g;
+! $input = $_;
+! $prevrule = $_;
+! }
+! elsif (/^mailer /)
+! {
+! $prevrule = $_;
+ &printparseresolve;
+! }
+! else
+! {
+! $prevrule = $_;
+! }
+! }
+ }
+! #&printparseresolve;
+ }
+
+ sub printparseresolve {
+! # if the binary is less than 8.7 then use result of ruleset 0
+! if ( $binver <= 6 ) {
+! if ($input eq "") { return;}
+!
+! $prevline =~ s/.*returns: *//;
+! $prevline =~ s/"//g;
+! $prevline =~ s/ //g;
+! # Don't strip spaces off error messages
+! $prevline =~ s/ *([.!%<>]) */$1/g;
+! $prevline =~ s/ +([;?\$])/$1/g;
+! $prevline =~ s/([#\@:]) +/$1/g;
+
+ # non-Sun test mode delimiters -> easily-readable style
+ # Mark Sausville, MIT Media Laboratory, saus@media-lab.media.mit.edu
+! $prevline =~ s/\^V/\$#/;
+! $prevline =~ s/\^W/\$@/;
+! $prevline =~ s/\^X/\$:/;
+!
+! #### $#ether$@sun-barr.Ebay.Sun.COM$:site!user@uunet.uu.NET
+! @t = split( '\$', $prevline);
+! $address = "XXX";
+! $remote = "XXX";
+! $mailer = "XXX";
+! for ($i = 1; $i <= $#t; $i++)
+! {
+! if (substr($t[$i], 0, 1) eq ":")
+! { $address = substr($t[$i], 1,999); }
+! if (substr($t[$i], 0, 1) eq "@")
+! { $remote = substr($t[$i], 1,999); }
+! if (substr($t[$i], 0, 1) eq "#")
+! { $mailer = substr($t[$i], 1,999);
+! $mailer =~ tr/A-Z/a-z/; }
+! }
+! } else {
+! # the binary is at least 8.7 then use result of /parse
+! chop;
+! s/,//g;
+!
+! # mailer esmtp, host harker.com., user harker@harker.com
+! @t = split( ' ', $_);
+! $address = "XXX";
+! $remote = "XXX";
+! $mailer = "XXX";
+! for ($i = 0; $i <= $#t; $i++)
+! {
+! if ($t[$i] eq "user")
+! { $address = $t[++$i]; }
+! if ($t[$i] eq "host")
+! { $remote = $t[++$i]; }
+! if ($t[$i] eq "mailer")
+! { $mailer = $t[++$i];
+! $mailer =~ tr/A-Z/a-z/; }
+! }
+! }
+! printf("%-27.27s --(%-6.6s)--> %s[%s]\n", $input, $mailer,
+! $address, $remote);
+! # now print to the log file
+! if ($setlog & 1) {
+! printf LOG ("%-27.27s --(%-6.6s)--> %s[%s]\n\n", $input, $mailer,
+! $address, $remote);
+! }
+!
+! if ($doaliasing & 1) {
+! # If the address resolved to the local mailer,
+! # then expand the username as an alias
+! if ( $mailer eq "local")
+! {
+! $setalias = $aliasfound = 0;
+! $laddress = $address;
+! $sendmailprog = "$sendmail -bv -C$cffile $laddress|";
+! open(LOCAL, $sendmailprog) ||
+! die "can't exec $sendmailprog...\n";
+! # now print to the log file
+! if ($setlog & 1) {
+! print LOG "\n$sendmailprog\n";
+! }
+! while ()
+! {
+! # now print to the log file
+! if ($setlog & 1) {
+! print LOG $_;
+! }
+! chop;
+! if (/unknown/)
+! {
+! $aliasfound = 1;
+! printf("\t\t aliased to --(error )--> %s\n", $_);
+! # now print to the log file
+! if ($setlog & 1) {
+! printf LOG ("\t\t aliased to --(error )--> %s\n\n", $_);
+! }
+! next;
+! }
+! s/,//g;
+! @l = split( ' ', $_);
+! $aladdress = "XXX";
+! $remote = "XXX";
+! $mailer = "XXX";
+! for ($i = 1; $i <= $#l; $i++)
+! {
+! # ./sendmail -bv -C./sendmail.cf j.murphy
+! # j.murphy@pop.mcit.com... deliverable: mailer mciesmtp,
+! # host pop.mcit.com, user j.murphy@pop.mcit.com
+! if ($l[$i] eq "user") { $aladdress = $l[++$i]; }
+! if ($l[$i] eq "host") { $remote = $l[++$i]; }
+! if ($l[$i] eq "mailer") { $mailer = $l[++$i]; }
+! }
+! if (("$laddress" eq "$aladdress") && ($aliasfound == 0)) {
+! $selfalias = 1;
+! next;
+! }
+! printf("\t\t aliased to --(%-6.6s)--> %s[%s]\n",
+! $mailer, $aladdress, $remote);
+! # now print to the log file
+! if ($setlog & 1) {
+! printf LOG ("\t\t aliased to --(%-6.6s)--> %s[%s]\n\n",
+! $mailer, $aladdress, $remote);
+! }
+! if ("$laddress" ne "$aladdress") {
+! $aliasfound = 1;
+! $envsenderaddrs .= " $aladdress";
+! }
+! if ($mailer ne "XXX") { $themailers{$mailer}=1;}
+! }
+! close(LOCAL);
+! if ($selfalias == 1 && $aliasfound == 1) {
+! printf("\t\t aliased to --(%-6.6s)--> %s[%s]\n",
+! $mailer, $aladdress, $remote);
+! # now print to the log file
+! if ($setlog & 1) {
+! printf LOG ("\t\t aliased to --(%-6.6s)--> %s[%s]\n\n",
+! $mailer, $aladdress, $remote);
+! }
+! }
+! # now print a blank line to the log file
+! if ($setlog & 1) {
+! print LOG "\n";
+! }
+! } else {
+! $envsenderaddrs .= " $address";
+! }
+! }
+!
+! if ($mailer ne "XXX") { $themailers{$mailer}.="$input ";}
+ }
+
+ # Parse output of sendmail name resolution
+***************
+*** 162,202 ****
+ ## Enter
+ ## > rewrite: ruleset 3 input: "user"
+
+! open(MAIL, $_[0]) || die "Can't open $_[0]...\n";
+! local ($k, $address, $prevline, $mailer, $remote, $input);
+! print $_[1]; # the title
+
+ $done = 0;
+! while ()
+! {
+ if (/^> *$/) { $done = 1; }
+! if (/^ADDRESS TEST MODE/) { next; }
+! if (/^Enter /) { next; }
+! chop;
+! if (/^>/) # INPUT LINE! (and last output is done)
+! {
+! if ($prevline) { # OUTPUT LINE!
+! $prevline =~ s/.*returns: *//;
+! $prevline =~ s/"//g;
+! $prevline =~ s/ //g;
+ #> rewrite: ruleset 3 input: "site" "!" "user" "@" "uunet" "." "uu" "." "net"
+ #rewrite: ruleset 8 input: "site" "!" "user" "@" "uunet" "." "uu" "." "net"
+ #>
+! printf("%-27.27s ----> %s\n", $input, $prevline);
+! }
+! s/> *[0-9,]* *//g;
+! s/.*input: *//;
+! s/ //g;
+! s/"//g;
+! $input = $_;
+! }
+! last if $done;
+! $prevline = $_;
+! }
+ close(MAIL);
+ }
+
+
+ # pass names from resolve files to sendmail
+
+ open(IN, $resolve) || die "can't open $resolve\n";
+--- 431,540 ----
+ ## Enter
+ ## > rewrite: ruleset 3 input: "user"
+
+! open(MAIL, $_[0]) || die "Can't open $_[0]...\n";
+! local ($k, $address, $prevline, $mailer, $remote, $input);
+! print $_[1]; # the title
+! # now print to the log file
+! if ($setlog & 1) {
+! print LOG "\n$_[1]"; # the title
+! }
+
+ $done = 0;
+! while ()
+! {
+! # now print to the log file
+! if ($setlog & 1) {
+! print LOG $_;
+! }
+ if (/^> *$/) { $done = 1; }
+! if (/^ADDRESS TEST MODE/) { next; }
+! if (/^Enter /) { next; }
+! if (/^Warning: .cf file is out of date/) { next; }
+! if (/^$/) { next; }
+! chop;
+! # rewrite $rules to be just a slash if it starts with a /
+! $rules =~ s'/.+'/';
+! # if the binary is less than 8.7 then use result of ruleset 4
+! if ( $binver <= 6 || $rules ne "/" ) {
+! if (/^>/) # INPUT LINE! (and last output is done)
+! {
+! if ($prevline) { # OUTPUT LINE!
+! $prevline =~ s/.*returns: *//;
+! $prevline =~ s/"//g;
+! $prevline =~ s/ //g;
+ #> rewrite: ruleset 3 input: "site" "!" "user" "@" "uunet" "." "uu" "." "net"
+ #rewrite: ruleset 8 input: "site" "!" "user" "@" "uunet" "." "uu" "." "net"
+ #>
+! printf("%s%-24.24s ----> %s\n", $rspath, $input, $prevline);
+! # now print to the log file
+! if ($setlog & 1) {
+! printf LOG ("%s%-24.24s ----> %s\n", $rspath, $input, $prevline);
+! }
+! }
+! s/> *[0-9,]* *//g;
+! s/.*input: *//;
+! s/ //g;
+! s/"//g;
+! $input = $_;
+! }
+! last if $done;
+! $prevline = $_;
+! } else {
+! # format of /try output is:
+! # Trying envelope recipient address harker for mailer esmtp
+! # ...
+! # Rcode = 0, addr = harker@mailhub.gadget.com
+! # remove extra ">" from "> >" lines
+! s/^> >/>/;
+! if (/^> Trying/) # INPUT LINE! (and last output is done)
+! {
+! chop;
+! s/> Trying .+ address //;
+! s/ for mailer .+//;
+! s/ //g;
+! s/"//g;
+! $input = $_;
+! $prevrule = $_;
+! }
+! elsif (/^Rcode = /)
+! {
+! $prevrule = $_;
+! # Rcode = 0, addr = harker@mailhub.gadget.com
+! s/^Rcode = .+ addr = //;
+! printf("%s%-24.24s ----> %s\n", $rspath, $input, $_);
+! # now print to the log file
+! if ($setlog & 1) {
+! printf LOG ("%s%-24.24s ----> %s\n\n", $rspath, $input, $_);
+! }
+! }
+! else
+! {
+! $prevrule = $_;
+! }
+! }
+! }
+! # now print to the log file
+! if ($setlog & 1) {
+! print LOG "\n";
+! }
+ close(MAIL);
+ }
+
+
++ # if the binary is less than 8.7 then use result of ruleset 4
++ if ( $binver <= 6 ) {
++ print "Mail address resolution (rule 0)\n";
++ # now print to the log file
++ if ($setlog & 1) {
++ print LOG "Mail address resolution (rule 0)\n";
++ }
++ } else {
++ print "Mail address resolution (/parse)\n";
++ # now print to the log file
++ if ($setlog & 1) {
++ print LOG "Mail address resolution (/parse)\n";
++ }
++ }
+ # pass names from resolve files to sendmail
+
+ open(IN, $resolve) || die "can't open $resolve\n";
+***************
+*** 205,377 ****
+ {
+ /^$/ && next;
+ /^#/ && next;
+! print OUT "3,0 $_";
+ chop;
+ $allinput .= " $_";
+ }
+ close(OUT);
+ close(IN);
+ $sendmailprog = "$sendmail -bt -C$cffile < /tmp/csm$$|";
+ open(MAIL, $sendmailprog) || die "can't exec $sendmailprog...\n";
+- print "Mail address resolution (rule 0)\n\n";
+ &parseresolve();
+
+ # calculate $f
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+ open (IN, $resolve);
+! $rules = "3,1,4";
+ while () {
+! chop;
+! /^$/ && next;
+! /^#/ && next;
+ $address = $_;
+! print OUT "$rules $address\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+! &parseaddress ("/tmp/csm$$", "\n\n\$f address header transformations\n\n");
+
+ # Get the R= and S= special rulesets from the configuration
+
+ open(FID, "grep ^M $cffile|");
+ while ()
+ {
+ # Mether, P=[IPC], F=msDFMueCX, S=11, R=21, A=IPC $h
+ chop;
+! $thisline = $_; $thisline =~ s/M//; $thisline =~ s/,.*//;
+ $thisline =~ tr/A-Z/a-z/;
+! $sendrule = $_; $sendrule =~ s/.*S=//; $sendrule =~ s/,.*//;
+! if ($sendrule=~q!/!) {
+! ($esendrule, $hsendrule) = split (q!/!, $sendrule);
+! }
+! else { $esendrule = $hsendrule = $sendrule; }
+! $recvrule = $_; $recvrule =~ s/.*R=//; $recvrule =~ s/,.*//;
+! if ($recvrule=~q!/!) {
+! ($erecvrule, $hrecvrule) = split (q!/!, $recvrule);
+! }
+! else { $erecvrule = $hrecvrule = $recvrule; }
+ $esendrules{$thisline} = $esendrule;
+ $hsendrules{$thisline} = $hsendrule;
+ $erecvrules{$thisline} = $erecvrule;
+ $hrecvrules{$thisline} = $hrecvrule;
+ }
+ close(FID);
+
+! # pass names from various mailers through sendmail
+!
+ foreach $i (keys %themailers)
+ {
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+! if ($erecvrules{$i} == 0) {
+! print "\n\nCan't find recv rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+- open (OUT, $sendmailprog);
+ @namelist = split(/ /, $allinput);
+- $rules = "3,2,$erecvrules{$i},4";
+ foreach (@namelist) {
+! print OUT "$rules $_\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(OUT);
+ $note = "";
+ if ($erecvrules{$i} eq $hrecvrules{$i}) { $note = "and header "; }
+! &parseaddress ("/tmp/csm$$", "\n\n`To' envelope ${note}address transformations for mailer $i [$rules]:\n\n");
+ }
+ foreach $i (keys %themailers)
+ {
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+! if ($hrecvrules{$i} == 0) {
+! print "\n\nCan't find recv rule for `$i', skipping this mailer <-------------------\n";
+! next;
+! }
+ if ($hrecvrules{$i} ne $erecvrules{$i}) {
+! open (OUT, $sendmailprog);
+! @namelist = split(/ /, $allinput);
+! $rules = "3,2,$hrecvrules{$i},4";
+! foreach (@namelist) {
+! print OUT "$rules $_\n";
+! }
+! print OUT "\n"; # stuff last line into sendmail
+! close(OUT);
+! &parseaddress ("/tmp/csm$$", "\n\n`To' header address transformations for mailer $i [$rules]:\n\n");
+ }
+ }
+
+! # pass names from various mailers through sendmail
+ foreach $i (keys %themailers)
+ {
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+! if ($esendrules{$i} == 0) {
+! print "\n\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+- open (OUT, $sendmailprog);
+- open (IN, $resolve);
+- $rules = "3,1,$esendrules{$i},4";
+- while () {
+- chop;
+- /^$/ && next;
+- /^#/ && next;
+- $address = $_;
+- print OUT "$rules $address\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ $note = "";
+ if ($esendrules{$i} eq $hsendrles{$i}) {$note = "and header ";}
+! &parseaddress ("/tmp/csm$$", "\n\n`From' envelope ${note}address transformations for mailer $i [$rules]:\n\n");
+ }
+ foreach $i (keys %themailers)
+ {
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+- if ($hsendrules{$i} == 0) {
+- print "\n\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+- next;
+- }
+ open (OUT, $sendmailprog);
+! open (IN, $resolve);
+! $rules = "3,1,$hsendrules{$i},4";
+! while () {
+! chop;
+! /^$/ && next;
+! /^#/ && next;
+! $address = $_;
+! print OUT "$rules $address\n";
+ }
+- print OUT "\n"; # stuff last line into sendmail
+- close(IN);
+- close(OUT);
+- &parseaddress ("/tmp/csm$$", "\n\n`From' address header transformations for mailer $i [$rules]:\n\n");
+ }
+ foreach $i (keys %themailers)
+ {
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+! if ($esendrules{$i} == 0) {
+! print "\n\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+- open (OUT, $sendmailprog);
+ open (IN, $resolve);
+- $rules = "3,1,4,3,1,$hsendrules{$i},4"; # XXX esendrules? book p. 431???
+ while () {
+! chop;
+! /^$/ && next;
+! /^#/ && next;
+ $address = $_;
+! print OUT "$rules $address\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ $note = "";
+ if ($esendrules{$i} eq $hsendrles{$i}) {$note = "and header ";}
+! &parseaddress ("/tmp/csm$$", "\n\n\$g address transformations for mailer $i [$rules]:\n\n");
+ }
+
+ unlink("/tmp/csm$$") || die "Can't unlink /tmp/csm$$";
+ unlink("/tmp/csm.in$$");
+
+--- 543,868 ----
+ {
+ /^$/ && next;
+ /^#/ && next;
+! # if the binary is less than 8.7 then use result of ruleset 0
+! if ( $binver == 5 ) {
+! $rules = "0 $_";
+! } elsif ( $binver <= 6 ) {
+! $rules = "3,0 $_";
+! } else {
+! $rules = "/parse $_";
+! }
+! print OUT $rules;
+! # now print to the log file
+! if ($setlog & 1) {
+! print LOG "$rules";
+! }
+ chop;
+ $allinput .= " $_";
+ }
++ $allinput =~ s/^ //;
+ close(OUT);
+ close(IN);
+ $sendmailprog = "$sendmail -bt -C$cffile < /tmp/csm$$|";
+ open(MAIL, $sendmailprog) || die "can't exec $sendmailprog...\n";
+ &parseresolve();
+
+ # calculate $f
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+ open (IN, $resolve);
+! # sendmail 5 automatically runs ruleset 3
+! if ( $binver == 5 ) {
+! $rules = "1,4";
+! } else {
+! $rules = "3,1,4";
+! }
+! if ($dorspath & 1) { $rspath = "\$f: "; }
+!
+ while () {
+! chop;
+! /^$/ && next;
+! /^#/ && next;
+ $address = $_;
+! print OUT "$rules $address\n";
+! # now print to the log file
+! if ($setlog & 1) {
+! print LOG "$rules $address\n";
+! }
+ }
+ print OUT "\n"; # stuff last line into sendmail
++ # now print to the log file
++ if ($setlog & 1) {
++ print LOG "\n"; # stuff last line into sendmail
++ }
+ close(IN);
+ close(OUT);
+! &parseaddress ("/tmp/csm$$", "\n\$f address header transformations\n");
+
+ # Get the R= and S= special rulesets from the configuration
++ # now print to the log file
++ if ($setlog & 1) {
++ print LOG "\nGet the R= and S= mailer specific rulesets\n";
++ }
+
+ open(FID, "grep ^M $cffile|");
+ while ()
+ {
+ # Mether, P=[IPC], F=msDFMueCX, S=11, R=21, A=IPC $h
+ chop;
+! $thisline = $_;
+! $thisline =~ s/M//;
+! $thisline =~ s/,.*//;
+ $thisline =~ tr/A-Z/a-z/;
+! $sendrule = $_;
+! $sendrule =~ s/.*S=//;
+! $sendrule =~ s/,.*//;
+! if ($sendrule=~q!/!) {
+! ($esendrule, $hsendrule) = split (q!/!, $sendrule);
+! } else {
+! $esendrule = $hsendrule = $sendrule;
+! }
+! $recvrule = $_;
+! $recvrule =~ s/.*R=//;
+! $recvrule =~ s/,.*//;
+! if ($recvrule=~q!/!) {
+! ($erecvrule, $hrecvrule) = split (q!/!, $recvrule);
+! } else {
+! $erecvrule = $hrecvrule = $recvrule;
+! }
+ $esendrules{$thisline} = $esendrule;
+ $hsendrules{$thisline} = $hsendrule;
+ $erecvrules{$thisline} = $erecvrule;
+ $hrecvrules{$thisline} = $hrecvrule;
++ # now print to the log file
++ if ($setlog & 1) {
++ print LOG "mailer: $thisline\t->\tesendrule = $esendrule, hsendrule = $hsendrule,
++ erecvrule = $erecvrule, hrecvrule = $hrecvrule\n";
++ }
++ }
++ # now print to the log file
++ if ($setlog & 1) {
++ print LOG "\n";
+ }
+ close(FID);
+
+! # pass envelope recipient names from various mailers through sendmail
+ foreach $i (keys %themailers)
+ {
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+! open (OUT, $sendmailprog);
+! if ($dorspath & 1) { $rspath = "$i ER: "; }
+!
+! # if the binary is less than 8.7 then use result of ruleset 0
+! if ( $binver <= 6 ) {
+! if ($erecvrules{$i} == 0) {
+! print "\nCan't find recv rule for `$i', skipping this mailer <-------------------\n";
+ next;
++ }
++ # sendmail 5 automatically runs ruleset 3
++ if ( $binver == 5 ) {
++ $rules = "2,$erecvrules{$i},4";
++ } else {
++ $rules = "3,2,$erecvrules{$i},4";
++ }
++ } else {
++ print OUT "/tryflags ER\n";
++ # now print to the log file
++ if ($setlog & 1) {
++ print LOG "/tryflags ER\n";
++ }
++ $rules = "/try $i";
+ }
+ @namelist = split(/ /, $allinput);
+ foreach (@namelist) {
+! print OUT "$rules $_\n";
+! # now print to the log file
+! if ($setlog & 1) {
+! print LOG "$rules $_\n";
+! }
+ }
+ print OUT "\n"; # stuff last line into sendmail
++ # now print to the log file
++ if ($setlog & 1) {
++ print LOG "\n"; # stuff last line into the log
++ }
+ close(OUT);
+ $note = "";
+ if ($erecvrules{$i} eq $hrecvrules{$i}) { $note = "and header "; }
+! &parseaddress ("/tmp/csm$$", "\n`To' envelope ${note}address transformations for mailer $i [$rules]:\n");
+ }
++
++ # pass header recipient names from various mailers through sendmail
+ foreach $i (keys %themailers)
+ {
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+! open (OUT, $sendmailprog);
+! if ($dorspath & 1) { $rspath = "$i HR: "; }
+!
+! # only run the header ruleset if the mailer uses split env/hdr rulesets
+ if ($hrecvrules{$i} ne $erecvrules{$i}) {
+! # if the binary is less than 8.7 then use result of ruleset 0
+! if ( $binver <= 6 ) {
+! if ($hrecvrules{$i} == 0) {
+! print "\nCan't find recv rule for `$i', skipping this mailer <-------------------\n";
+! next;
+! }
+! # sendmail 5 automatically runs ruleset 3
+! if ( $binver == 5 ) {
+! $rules = "2,$hrecvrules{$i},4";
+! } else {
+! $rules = "3,2,$hrecvrules{$i},4";
+! }
+! } else {
+! print OUT "/tryflags HR\n";
+! # now print to the log file
+! if ($setlog & 1) {
+! print LOG "/tryflags HR\n";
+! }
+! $rules = "/try $i";
+! }
+! @namelist = split(/ /, $allinput);
+! foreach (@namelist) {
+! print OUT "$rules $_\n";
+! # now print to the log file
+! if ($setlog & 1) {
+! print LOG "$rules $_\n";
+! }
+! }
+! print OUT "\n"; # stuff last line into sendmail
+! # now print to the log file
+! if ($setlog & 1) {
+! print LOG "\n"; # stuff last line into the log
+! }
+! close(OUT);
+! &parseaddress ("/tmp/csm$$", "\n`To' header address transformations for mailer $i [$rules]:\n");
+ }
+ }
+
+! # pass envelope sender names from various mailers through sendmail
+ foreach $i (keys %themailers)
+ {
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+! open (OUT, $sendmailprog);
+! if ($dorspath & 1) { $rspath = "$i ES: "; }
+!
+! # if the binary is less than 8.7 then use result of ruleset 0
+! if ( $binver <= 6 ) {
+! if ($esendrules{$i} == 0) {
+! print "\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+ next;
++ }
++ # sendmail 5 automatically runs ruleset 3
++ if ( $binver == 5 ) {
++ $rules = "2,$esendrules{$i},4";
++ } else {
++ $rules = "3,2,$esendrules{$i},4";
++ }
++ } else {
++ print OUT "/tryflags ES\n";
++ # now print to the log file
++ if ($setlog & 1) {
++ print LOG "/tryflags ES\n";
++ }
++ $rules = "/try $i";
++ }
++ @namelist = split(/ /, $allinput);
++ foreach (@namelist) {
++ print OUT "$rules $_\n";
++ # now print to the log file
++ if ($setlog & 1) {
++ print LOG "$rules $_\n";
+ }
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ $note = "";
+ if ($esendrules{$i} eq $hsendrles{$i}) {$note = "and header ";}
+! &parseaddress ("/tmp/csm$$", "\n`From' envelope ${note}address transformations for mailer $i [$rules]:\n");
+ }
++
++ # pass header sender names from various mailers through sendmail
+ foreach $i (keys %themailers)
+ {
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+! if ($dorspath & 1) { $rspath = "$i HS: "; }
+!
+! # only run the header ruleset if the mailer uses split env/hdr rulesets
+! if ($hsendrules{$i} ne $esendrules{$i}) {
+! # if the binary is less than 8.7 then use result of ruleset 0
+! if ( $binver <= 6 ) {
+! if ($hsendrules{$i} == 0) {
+! print "\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+! next;
+! }
+! # sendmail 5 automatically runs ruleset 3
+! if ( $binver == 5 ) {
+! $rules = "2,$hsendrules{$i},4";
+! } else {
+! $rules = "3,2,$hsendrules{$i},4";
+! }
+! } else {
+! print OUT "/tryflags HS\n";
+! # now print to the log file
+! if ($setlog & 1) {
+! print LOG "/tryflags HR\n";
+! }
+! $rules = "/try $i";
+! }
+! @namelist = split(/ /, $allinput);
+! foreach (@namelist) {
+! print OUT "$rules $_\n";
+! # now print to the log file
+! if ($setlog & 1) {
+! print LOG "$rules $_\n";
+! }
+! }
+! print OUT "\n"; # stuff last line into sendmail
+! close(IN);
+! close(OUT);
+! &parseaddress ("/tmp/csm$$", "\n`From' address header transformations for mailer $i [$rules]:\n");
+ }
+ }
++
+ foreach $i (keys %themailers)
+ {
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+! open (OUT, $sendmailprog);
+! if ($dorspath & 1) { $rspath = "\$g: "; }
+!
+! # if the binary is 8.9 or below then check if the mailer
+! # specific ruleset exists
+! if ( $binver <= 9 ) {
+! # if the binary is less than 8.7 then use result of ruleset 0
+! if ($esendrules{$i} == 0) {
+! print "\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+ next;
++ }
++ }
++ # sendmail 5 automatically runs ruleset 3
++ if ( $binver == 5 ) {
++ $rules = "1,4,3,1,$hsendrules{$i},4"; # XXX esendrules? book p. 431???
++ } else {
++ $rules = "3,1,4,3,1,$hsendrules{$i},4"; # XXX esendrules? book p. 431???
+ }
+ open (IN, $resolve);
+ while () {
+! chop;
+! /^$/ && next;
+! /^#/ && next;
+ $address = $_;
+! print OUT "$rules $address\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ $note = "";
+ if ($esendrules{$i} eq $hsendrles{$i}) {$note = "and header ";}
+! &parseaddress ("/tmp/csm$$", "\n\$g address transformations for mailer $i [$rules]:\n");
+ }
+
+ unlink("/tmp/csm$$") || die "Can't unlink /tmp/csm$$";
+ unlink("/tmp/csm.in$$");
+
++ exit;
--- sendmail-8.14.4.orig/debian/examples/checksendmail/checksendmail-harker.patch
+++ sendmail-8.14.4/debian/examples/checksendmail/checksendmail-harker.patch
@@ -0,0 +1,22 @@
+diff -c 'harker/checksendmail' 'checksendmail'
+Index: ./harker/checksendmail
+Prereq: 1.1.1.1
+*** ./harker/checksendmail Mon Apr 14 15:44:43 2003
+--- ./checksendmail Mon Apr 14 15:57:56 2003
+***************
+*** 25,30 ****
+--- 25,38 ----
+ $resolve = "address.resolve";
+ $cffile = "/etc/mail/sendmail.cf";
+
++ # Pre-create tmp files (so can use safely)
++ use Fcntl;
++ foreach ("/tmp/csm$$", "/tmp/csm.in$$") {
++ die "Can't pre-create $_"
++ unless sysopen(T,$_,O_RDWR|O_CREAT|O_EXCL,0600)
++ and close(T);
++ };
++
+ sub usage {
+ die "Usage: checksendmail [-C cffile.cf] [-b sendmail_binary] [-l log_file]\n\t\t\t\t[-a] [-d] [-r resolve_addrs_file || -T one\@test.addr]\n$errormsg\n";
+ }
--- sendmail-8.14.4.orig/debian/examples/checksendmail/checksendmail.8
+++ sendmail-8.14.4/debian/examples/checksendmail/checksendmail.8
@@ -0,0 +1,246 @@
+.\" BSDI $Id: checksendmail.8,v 1.1.1.1 1994/01/13 21:15:31 polk Exp $
+.Dd November 14, 2000
+.Dt CHECKSENDMAIL 8
+.Os
+.Sh NAME
+.Nm checksendmail
+.Nd verify sendmail address transformations.
+.Sh SYNOPSIS
+.Nm checksendmail
+.Op Fl a
+.Op Fl d
+.Op Fl b
+.Op Fl C Ar file.cf
+.Op Fl b Ar sendmail_binary
+.Op Fl l Ar log_file
+.Op Fl r Ar resolve
+.Op Fl T Ar test.address
+.Sh DESCRIPTION
+.Pp
+The
+.Nm checksendmail
+program is a
+.Xr perl
+script that aids the testing of
+.\".Xr sendmail 8 's
+sendmail(8)'s
+various configuration files.
+.Nm checksendmail
+passes typical addresses (supplied in input files) through
+.Xr sendmail
+and prints the results of the resolution and transformation routines.
+.Pp
+The input files contain a list of addresses, one per line.
+For example:
+.Bd -literal -offset indent
+user
+user@site
+user@site.com
+.Ed
+.Pp
+The input file can contain comments started with a
+.Em #
+and blank lines.
+.Sh OPTIONS
+.Pp
+.Bl -tag -width Fl -compact -offset left
+.It Fl a
+Show aliasing of local addresses in
+mail address resolution phase of testing
+.It Fl d
+Precede each address translation line with ruleset sequence summary
+.It Fl C Ar file.cf
+Use the
+.Xr sendmail
+configuration file
+.Ar file.cf
+instead of the default
+.Pa /etc/sendmail.cf
+file.
+.It Fl b Ar sendmail_binary
+Use the specified
+.Ar sendmail_binary
+as the path to invoke sendmail (instead of
+.Pa /usr/sbin/sendmail ) .
+.It Fl l Ar log_file
+Log
+.Xr sendmail
+address test mode debugging output to
+.Ar log_file
+.It Fl r Ar resolve
+Use
+.Ar resolve
+as the input file for the addresses to be used for mail resolving. Defaults
+to
+.Ar address.resolve .
+.It Fl T Ar test.address
+Use
+.Ar test.address
+as the single address to test. Cannot be used in conjunction with
+file setting flags.
+.El
+.Sh EXAMPLES
+.Pp
+The following command will pass the addresses in
+.Ar address.resolve
+through
+.Xr sendmail
+using the configuration information in
+.Ar myconfig.cf .
+.Bd -literal -offset left
+example% cat address.resolve
+user
+user@site
+user@site.com
+
+example% checksendmail \-C myconfig.cf
+system: myhost.gadget.com current dir: /tmp/Checksendmail
+resolve file: address.resolve
+sendmail binary: /usr/sbin/sendmail sendmail version: 8.9.3
+config file: /etc/sendmail.cf config file version: V8/Berkeley
+
+Mail address resolution
+user --(ether )--> user[rmtc]
+user@site --(ether )--> user@site[rmtc]
+user@site.com --(ether )--> user@site.com[rmtc]
+
+`To' address transformations for mailer ether:
+user ----> user
+user@site ----> user@site
+user@site.com ----> user@site.com
+
+`From' address transformations for mailer ether:
+user ----> user
+user@site ----> user
+user@site.com ----> user
+.Ed
+.Pp
+The first section of the output shows how the addresses in the input
+files are resolved by
+.Xr sendmail 8 .
+Consider the following output line:
+.Pp
+.Dl "user@site.com --(ether )--> user@site.com[rmtc]"
+.Pp
+The input address
+.Em user@site.com
+resolves to use the
+.Em ether
+mailer. That mailer is directed to send the mail to
+to the user
+.Em user@site.com
+at site
+.Em rmtc
+(as indicated in the square brackets).
+.Pp
+The two later sections of output show how the addresses specified as
+the
+.Em To
+and
+.Em From
+address are transformed in the text of the
+headers. In the example above, the
+.Em To
+addresses are untouched.
+The
+.Em From
+addresses, however, all lose their machine information on
+the way through the mailer:
+.Pp
+.Dl "user@site ----> user"
+.Pp
+This may be desirable when using a configuration file on a
+workstation which is to be hidden as a mailhost from the rest of the
+network.
+.Pp
+The following is a set of addresses used at one site for the purposes of
+testing address resolution. Comments after the addresses detail why
+particular addresses are present:
+.Bl -tag -width "user@machine.com" -compact -offset indent
+.It user
+Standard trivial address
+.It user@rmtc
+qualified at one level
+.It user@rmtc.central
+qualified at two levels
+.It user@rmtc.central.sun.com
+qualified all the way
+.It rmtc!user
+local but specified as uucp
+.It user@summit
+a workstation (normally delivered locally, though)
+.It user@summit.central
+same but more qualified
+.It user@summit.central.sun.com
+same but fully qualified
+.It summit!user
+same but specified as uucp
+.It user@prisma
+Backward compatibility tests
+.It user@prisma.com
+.It prisma!user
+.It user@central
+Superior domain testing
+.It user@machine.central
+more qualified, but unknown
+.It user@summit.central
+more qualified and known
+.It user@eng
+name in faraway domain
+.It user@machine.eng
+unknown machine in faraway domain
+.It user@summit.eng
+local machine, far away domain
+.It user@hoback
+far away machine
+.It user@machine
+apparently local but unknown machine
+.It user@sun.com
+Standard trivial address
+.It user@machine.dom.sun.com
+fully qualified but unknown machine
+.It user@foo.com
+standard, known, really far away domain
+.It user@foo.dom
+standard, unknown, really far away domain
+.It site!user
+Single level uucp
+.It site1!site2!user
+Double level uucp
+.It user@foo.dom@bar.dom
+Trickier address
+.It site!user@foo.dom
+Mixed uucp/domain
+.It site!user@uunet.uu.net
+Mixed double uucp/domain
+.El
+.Sh NOTES
+Note that
+.Nm checksendmail
+is a
+.Xr perl
+script. If your site does not have
+.Xr perl 1 ,
+it can be obtained via anonymous
+.Xr ftp
+from
+.Em ftp.uu.net .
+.Pp
+.Xr sendmail
+requires that the user have access to directory specified by the
+.Em OQ
+parameter in the configuration file (normally
+.Pa /usr/spool/mqueue ) .
+.Nm checksendmail
+verifies that the user has access to this directory before allowing the
+test to continue.
+.Sh AUTHORS
+.Bd -literal
+Gene Kim
+Rob Kolstad
+Jeff Polk
+.Ed
+.Pp
+Modified by Robert Harker
+.Sh "SEE ALSO"
+.Xr sendmail 8
--- sendmail-8.14.4.orig/debian/examples/checksendmail/checksendmail.perl
+++ sendmail-8.14.4/debian/examples/checksendmail/checksendmail.perl
@@ -0,0 +1,377 @@
+#!/usr/bin/perl
+
+# BSDI $Id: checksendmail.perl,v 1.1.1.1 1994/01/13 21:15:31 polk Exp $
+
+# checksendmail
+#
+# The checksendmail program is a perl script that aids the testing
+# of sendmail's various configuration filse. checksendmail
+# passes typical addresses (supplied in input files) through
+# sendmail and prints the result of the resolution and
+# transformation routines.
+#
+# Gene Kim & Rob Kolstad & Jeff Polk, 7/11/90
+
+# -- -C config file
+# -- -r resolve_addresses_file
+# -- -T test one address
+# -- -b sendmail binary
+
+# XXX deficiencies: ``/etc/sendmail'' should be a parameter
+
+# defaults:
+ $resolve = "address.resolve";
+ $cffile = "/etc/sendmail.cf";
+ $sendmail = "/usr/sbin/sendmail";
+
+sub usage {
+ die "Usage: checksendmail [-C cffile.cf] [-r resolve_addrs_file [-T one\@test.addr\n";
+}
+
+for (unshift (@ARGV, "XX"); $#ARGV > 0; shift ARGV) {
+ if ($ARGV[1] eq "-C")
+ {
+ shift @ARGV;
+ if ($#ARGV >= 1) {$cffile = $ARGV[1]; }
+ else { &usage(); }
+ }
+ elsif ($ARGV[1] eq "-r")
+ {
+ if ($setfile & 1) { die "Can only set `resolve' once"; }
+ shift @ARGV;
+ if ($#ARGV < 1) { &usage(); }
+ $resolve = $ARGV[1];
+ $setfile += 1;
+ }
+ elsif ($ARGV[1] eq "-T")
+ {
+ if ($setfile) { die "Can't set other files and use -T"; }
+ shift @ARGV;
+ if ($#ARGV < 1) { &usage(); }
+ open (OUT, ">/tmp/csm.in$$") ||
+ die "Can't open >/tmp/csm.in$$";
+ $resolve = "/tmp/csm.in$$";
+ print OUT "$ARGV[1]\n";
+ close (OUT);
+ $setfile = 7;
+ }
+ elsif ($ARGV[1] eq "-b")
+ {
+ shift @ARGV;
+ if ($#ARGV >= 1) {$sendmail = $ARGV[1]; }
+ else { &usage(); }
+ }
+ else { &usage(); }
+}
+
+if (!-e $cffile) { die "Can't find configuration file $cffile\n"; }
+if (!-e $resolve) { die "Can't find name file $resolve\n"; }
+
+# make sure the user can access the ../mqueue directory
+
+$maildir = `grep ^OQ $cffile`;
+chop $maildir;
+$maildir =~ s/^OQ//;
+if ((!-r $maildir) || (!-x $maildir) || (!-w $maildir)) {
+ warn "checksendmail: can't access $maildir! trying anyway...\n";
+}
+
+chop($hostname = `hostname`);
+chop($pwd = `pwd`);
+print "system: $hostname\t\tcurrent dir: $pwd\n";
+print "config file: $cffile\t\tresolve file: $resolve\n";
+
+sub handler { # 1st argument is signal name
+ local($sig) = @_;
+ print STDERR "Caught a SIG$sig--shutting down\n";
+ unlink("/tmp/csm$$") || die "Can't unlink /tmp/csm$$";
+ unlink("/tmp/csm.in$$");
+ exit(0);
+}
+
+$SIG{'INT'} = 'handler';
+$SIG{'QUIT'} = 'handler';
+
+
+# glean the mailers used from the rule 0 tests
+
+sub parseresolve
+{
+ while ()
+ {
+ if (/^ADDRESS TEST MODE/) { next; }
+ if (/^Enter /) { next; }
+ if (/^>/) # INPUT LINE! (and last output is done)
+ {
+ chop;
+ if ($prevline) { # OUTPUT LINE!
+ &printparseresolve;
+ }
+ s/> *[0-9,]* *//g;
+ s/.*input: *//;
+ s/ //g;
+ s/"//g;
+ $input = $_;
+ }
+ else { chop; }
+ $prevline = $_;
+ }
+ &printparseresolve;
+}
+
+sub printparseresolve {
+ $prevline =~ s/.*returns: *//;
+ $prevline =~ s/"//g;
+ $prevline =~ s/ //g;
+ # Don't strip spaces off error messages
+ $prevline =~ s/ *([.!%<>]) */$1/g;
+ $prevline =~ s/ +([;?\$])/$1/g;
+ $prevline =~ s/([#\@:]) +/$1/g;
+
+# non-Sun test mode delimiters -> easily-readable style
+# Mark Sausville, MIT Media Laboratory, saus@media-lab.media.mit.edu
+ $prevline =~ s/\^V/\$#/;
+ $prevline =~ s/\^W/\$@/;
+ $prevline =~ s/\^X/\$:/;
+
+ #### $#ether$@sun-barr.Ebay.Sun.COM$:site!user@uunet.uu.NET
+ @t = split( '\$', $prevline);
+ $address = "XXX";
+ $remote = "XXX";
+ $mailer = "XXX";
+ for ($i = 1; $i <= $#t; $i++)
+ {
+ if (substr($t[$i], 0, 1) eq ":")
+ { $address = substr($t[$i], 1,999); }
+ if (substr($t[$i], 0, 1) eq "@")
+ { $remote = substr($t[$i], 1,999); }
+ if (substr($t[$i], 0, 1) eq "#")
+ { $mailer = substr($t[$i], 1,999);
+ $mailer =~ tr/A-Z/a-z/; }
+ }
+ printf("%-27.27s --(%-6.6s)--> %s[%s]\n", $input, $mailer,
+ $address, $remote);
+ if ($mailer ne "XXX") { $themailers{$mailer}.="$input ";}
+}
+
+# Parse output of sendmail name resolution
+
+sub parseaddress
+{
+## ADDRESS TEST MODE
+## Enter
+## > rewrite: ruleset 3 input: "user"
+
+ open(MAIL, $_[0]) || die "Can't open $_[0]...\n";
+ local ($k, $address, $prevline, $mailer, $remote, $input);
+ print $_[1]; # the title
+
+ $done = 0;
+ while ()
+ {
+ if (/^> *$/) { $done = 1; }
+ if (/^ADDRESS TEST MODE/) { next; }
+ if (/^Enter /) { next; }
+ chop;
+ if (/^>/) # INPUT LINE! (and last output is done)
+ {
+ if ($prevline) { # OUTPUT LINE!
+ $prevline =~ s/.*returns: *//;
+ $prevline =~ s/"//g;
+ $prevline =~ s/ //g;
+#> rewrite: ruleset 3 input: "site" "!" "user" "@" "uunet" "." "uu" "." "net"
+#rewrite: ruleset 8 input: "site" "!" "user" "@" "uunet" "." "uu" "." "net"
+#>
+ printf("%-27.27s ----> %s\n", $input, $prevline);
+ }
+ s/> *[0-9,]* *//g;
+ s/.*input: *//;
+ s/ //g;
+ s/"//g;
+ $input = $_;
+ }
+ last if $done;
+ $prevline = $_;
+ }
+ close(MAIL);
+}
+
+
+# pass names from resolve files to sendmail
+
+open(IN, $resolve) || die "can't open $resolve\n";
+open(OUT, ">/tmp/csm$$") || die "can't open >/tmp/csm$$\n";
+while ()
+{
+ /^$/ && next;
+ /^#/ && next;
+ print OUT "3,0 $_";
+ chop;
+ $allinput .= " $_";
+}
+close(OUT);
+close(IN);
+$sendmailprog = "$sendmail -bt -C$cffile < /tmp/csm$$|";
+open(MAIL, $sendmailprog) || die "can't exec $sendmailprog...\n";
+print "Mail address resolution (rule 0)\n\n";
+&parseresolve();
+
+# calculate $f
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+ open (IN, $resolve);
+ $rules = "3,1,4";
+ while () {
+ chop;
+ /^$/ && next;
+ /^#/ && next;
+ $address = $_;
+ print OUT "$rules $address\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ &parseaddress ("/tmp/csm$$", "\n\n\$f address header transformations\n\n");
+
+# Get the R= and S= special rulesets from the configuration
+
+open(FID, "grep ^M $cffile|");
+while ()
+{
+# Mether, P=[IPC], F=msDFMueCX, S=11, R=21, A=IPC $h
+ chop;
+ $thisline = $_; $thisline =~ s/M//; $thisline =~ s/,.*//;
+ $thisline =~ tr/A-Z/a-z/;
+ $sendrule = $_; $sendrule =~ s/.*S=//; $sendrule =~ s/,.*//;
+ if ($sendrule=~q!/!) {
+ ($esendrule, $hsendrule) = split (q!/!, $sendrule);
+ }
+ else { $esendrule = $hsendrule = $sendrule; }
+ $recvrule = $_; $recvrule =~ s/.*R=//; $recvrule =~ s/,.*//;
+ if ($recvrule=~q!/!) {
+ ($erecvrule, $hrecvrule) = split (q!/!, $recvrule);
+ }
+ else { $erecvrule = $hrecvrule = $recvrule; }
+ $esendrules{$thisline} = $esendrule;
+ $hsendrules{$thisline} = $hsendrule;
+ $erecvrules{$thisline} = $erecvrule;
+ $hrecvrules{$thisline} = $hrecvrule;
+}
+close(FID);
+
+# pass names from various mailers through sendmail
+
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ if ($erecvrules{$i} == 0) {
+ print "\n\nCan't find recv rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ open (OUT, $sendmailprog);
+ @namelist = split(/ /, $allinput);
+ $rules = "3,2,$erecvrules{$i},4";
+ foreach (@namelist) {
+ print OUT "$rules $_\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(OUT);
+ $note = "";
+ if ($erecvrules{$i} eq $hrecvrules{$i}) { $note = "and header "; }
+ &parseaddress ("/tmp/csm$$", "\n\n`To' envelope ${note}address transformations for mailer $i [$rules]:\n\n");
+}
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ if ($hrecvrules{$i} == 0) {
+ print "\n\nCan't find recv rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ if ($hrecvrules{$i} ne $erecvrules{$i}) {
+ open (OUT, $sendmailprog);
+ @namelist = split(/ /, $allinput);
+ $rules = "3,2,$hrecvrules{$i},4";
+ foreach (@namelist) {
+ print OUT "$rules $_\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(OUT);
+ &parseaddress ("/tmp/csm$$", "\n\n`To' header address transformations for mailer $i [$rules]:\n\n");
+ }
+}
+
+# pass names from various mailers through sendmail
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ if ($esendrules{$i} == 0) {
+ print "\n\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ open (OUT, $sendmailprog);
+ open (IN, $resolve);
+ $rules = "3,1,$esendrules{$i},4";
+ while () {
+ chop;
+ /^$/ && next;
+ /^#/ && next;
+ $address = $_;
+ print OUT "$rules $address\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ $note = "";
+ if ($esendrules{$i} eq $hsendrles{$i}) {$note = "and header ";}
+ &parseaddress ("/tmp/csm$$", "\n\n`From' envelope ${note}address transformations for mailer $i [$rules]:\n\n");
+}
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ if ($hsendrules{$i} == 0) {
+ print "\n\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ open (OUT, $sendmailprog);
+ open (IN, $resolve);
+ $rules = "3,1,$hsendrules{$i},4";
+ while () {
+ chop;
+ /^$/ && next;
+ /^#/ && next;
+ $address = $_;
+ print OUT "$rules $address\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ &parseaddress ("/tmp/csm$$", "\n\n`From' address header transformations for mailer $i [$rules]:\n\n");
+}
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ if ($esendrules{$i} == 0) {
+ print "\n\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ open (OUT, $sendmailprog);
+ open (IN, $resolve);
+ $rules = "3,1,4,3,1,$hsendrules{$i},4"; # XXX esendrules? book p. 431???
+ while () {
+ chop;
+ /^$/ && next;
+ /^#/ && next;
+ $address = $_;
+ print OUT "$rules $address\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ $note = "";
+ if ($esendrules{$i} eq $hsendrles{$i}) {$note = "and header ";}
+ &parseaddress ("/tmp/csm$$", "\n\n\$g address transformations for mailer $i [$rules]:\n\n");
+}
+
+unlink("/tmp/csm$$") || die "Can't unlink /tmp/csm$$";
+unlink("/tmp/csm.in$$");
+
--- sendmail-8.14.4.orig/debian/examples/checksendmail/harker/address.resolve
+++ sendmail-8.14.4/debian/examples/checksendmail/harker/address.resolve
@@ -0,0 +1,15 @@
+# addresses to be delivered locally
+root
+postmaster
+user
+user@mailhub
+user@mailhub.gadget.com
+user@gadget.com
+
+# Addresses to be forwarded with SMTP to firewall
+user@firewall
+user@firewall.gadget.com
+
+# Addresses to be forwarded with SMTP to harker.com
+user@harker.com
+harker!user
--- sendmail-8.14.4.orig/debian/examples/checksendmail/harker/checksendmail
+++ sendmail-8.14.4/debian/examples/checksendmail/harker/checksendmail
@@ -0,0 +1,860 @@
+#!/usr/bin/perl
+
+# BSDI $Id: checksendmail.perl,v 1.1.1.1 1994/01/13 21:15:31 polk Exp $
+
+# checksendmail
+#
+# The checksendmail program is a perl script that aids the testing
+# of sendmail's various configuration filse. checksendmail
+# passes typical addresses (supplied in input files) through
+# sendmail and prints the result of the resolution and
+# transformation routines.
+#
+# Gene Kim & Rob Kolstad & Jeff Polk, 7/11/90
+# Modified by Robert Harker, 11/14/00
+
+# -- -a show aliasing of local addresses
+# -- -d preceed each line with ruleset sequence summary
+# -- -C config_file
+# -- -b sendmail_binary
+# -- -l log_file of results of tests
+# -- -r resolve_addresses_file
+# -- -T test one address
+
+# defaults:
+ $resolve = "address.resolve";
+ $cffile = "/etc/mail/sendmail.cf";
+
+sub usage {
+ die "Usage: checksendmail [-C cffile.cf] [-b sendmail_binary] [-l log_file]\n\t\t\t\t[-a] [-d] [-r resolve_addrs_file || -T one\@test.addr]\n$errormsg\n";
+}
+
+for (unshift (@ARGV, "XX"); $#ARGV > 0; shift ARGV) {
+ if ($ARGV[1] eq "-C")
+ {
+ if ($setcffile & 1) { die "Can only set `cffile.cf' once"; }
+ shift @ARGV;
+ if ($#ARGV >= 1) {$cffile = $ARGV[1]; }
+ else {
+ $errormsg = "No sendmail.cf file given for -C flag\n";
+ &usage();
+ }
+ $setcffile += 1;
+ }
+ elsif ($ARGV[1] eq "-r")
+ {
+ if ($setfile & 1) { die "Can only set `resolve' once"; }
+ shift @ARGV;
+ if ($#ARGV < 1) {
+ $errormsg = "No resolve_addrs_file given for -r flag\n";
+ &usage();
+ }
+ $resolve = $ARGV[1];
+ $setfile += 1;
+ }
+ elsif ($ARGV[1] eq "-T")
+ {
+ if ($setfile) { die "Can't set other files and use -T"; }
+ shift @ARGV;
+ if ($#ARGV < 1) {
+ $errormsg = "No one\@test.addr given for -T flag\n";
+ &usage();
+ }
+ open (OUT, ">/tmp/csm.in$$") ||
+ die "Can't open >/tmp/csm.in$$";
+ $resolve = "/tmp/csm.in$$";
+ print OUT "$ARGV[1]\n";
+ close (OUT);
+ $setfile = 7;
+ }
+ elsif ($ARGV[1] eq "-b")
+ {
+ if ($setbin & 1) { die "Can only set `sendmail_binary' once"; }
+ shift @ARGV;
+ if ($#ARGV >= 1) {$sendmail = $ARGV[1]; }
+ else {
+ $errormsg = "No sendmail_binary file given for -b flag\n";
+ &usage();
+ }
+ $setbin += 1;
+ }
+ elsif ($ARGV[1] eq "-l")
+ {
+ if ($setlog & 1) { die "Can only set `log_file' once"; }
+ shift @ARGV;
+ if ($#ARGV >= 1) {$logfile = $ARGV[1]; }
+ else {
+ $errormsg = "No log_file file given for -l flag\n";
+ &usage();
+ }
+ $setlog += 1;
+ }
+ elsif ($ARGV[1] eq "-a")
+ {
+ $doaliasing += 1;
+ }
+ elsif ($ARGV[1] eq "-d")
+ {
+ $dorspath += 1;
+ }
+ else { &usage(); }
+}
+
+# Figure out where the sendmail binary is
+if (! $setbin & 1) {
+ foreach $i ("/usr/sbin/sendmail", "/usr/libexec/sendmail", "/usr/lib/sendmail")
+ {
+ # test if binary exists and is executable
+ if ((-e $i) && (-x $i)) {
+ $sendmail = $i;
+ last;
+ }
+ }
+}
+
+
+# Figure out the version of sendmail and the location of the sendmail.cf file
+# sendmail -d0.10 -bv root
+# ("-bv root" is just to give sendmail something to chew on)
+
+$binversion = `$sendmail -d0.10 -bv root | grep "^Version "`;
+chop $binversion;
+$binversion =~ s/^Version //;
+
+# Get the major relase number from the sendmail version
+$binver = $binversion;
+$binver =~ s/^8\.//;
+$binver =~ s/\..+//;
+
+# if the cf file was not set on the command line,
+# find out where the binary looks for it
+if ( ! -e $cffile ) {
+ $cffile = `$sendmail -d0.10 -bv root | grep "Def Conf file:"`;
+ chop $cffile;
+ $cffile =~ s/ //g;
+ $cffile =~ s/ //g;
+ $cffile =~ s/^DefConffile://;
+}
+
+if (!-e $cffile) { die "Can't find configuration file $cffile\n"; }
+
+if (!-e $resolve) { die "Can't find name file $resolve\n"; }
+
+# Figure out the version of the sendmail.cf file
+# Look for the V line
+$cfversion = `grep "^V" $cffile`;
+chop $cfversion;
+# if $cfversion is empty, then the configuration is sendmail 5, not sendmail 8
+$cfversion =~ s/^$/V0/;
+
+# Get the version number from the V line
+$cfver = $cfversion;
+$cfver =~ s/^V//;
+$cfver =~ s'/.+'';
+
+# check that the binary is a higher version than config file
+if ( $binver < $cfver + 1) {
+ die "$cffile version ($cfversion) is more advanced than $sendmail version ($binversion)\n";
+}
+
+# figure out where the mqueue directory is
+if ( $cfver <= 6 ) {
+ $maildir = `grep "^OQ" $cffile`;
+ chop $maildir;
+ $maildir =~ s/^OQ//;
+} else {
+ $maildir = `grep "^O QueueDirectory" $cffile`;
+ chop $maildir;
+ $maildir =~ s/^O QueueDirectory=//;
+}
+
+# make sure the user can access the ../mqueue directory
+if ((!-r $maildir) || (!-x $maildir) || (!-w $maildir)) {
+ if ($doaliasing & 1) {
+ die "checksendmail: can't access $maildir! can't use checksendmail's -a flag\n";
+ } else {
+ warn "checksendmail: can't access $maildir! trying anyway...\n";
+ }
+}
+
+chop($hostname = `hostname`);
+chop($pwd = `pwd`);
+print "system: $hostname\t\tcurrent dir: $pwd\n";
+print "resolve file: $resolve\n";
+print "sendmail binary: $sendmail\t\tsendmail version: $binversion\n";
+print "config file: $cffile\t\tconfig file version: $cfversion\n\n";
+if ($setlog & 1) {
+ print "log file: $logfile\n\n";
+ # now print to the log file
+ open (LOG , ">$logfile") || die "Can't open >$logfile";
+ print LOG "system: $hostname\t\tcurrent dir: $pwd\n";
+ print LOG "resolve file: $resolve\n";
+ print LOG "sendmail binary: $sendmail\t\tsendmail version: $binversion\n";
+ print LOG "config file: $cffile\t\tconfig file version: $cfversion\n";
+ print LOG "log file: $logfile\n\n";
+}
+
+sub handler { # 1st argument is signal name
+ local($sig) = @_;
+ print STDERR "Caught a SIG$sig--shutting down\n";
+ unlink("/tmp/csm$$") || die "Can't unlink /tmp/csm$$";
+ unlink("/tmp/csm.in$$");
+ if ($setlog & 1) {
+ close(LOG);
+ }
+ exit(0);
+}
+
+$SIG{'INT'} = 'handler';
+$SIG{'QUIT'} = 'handler';
+
+
+
+# glean the mailers used from the rule 0 tests
+
+sub parseresolve
+{
+ while ()
+ {
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG $_;
+ }
+ if (/^ADDRESS TEST MODE/) { next; }
+ if (/^Enter /) { next; }
+ if (/^Warning: .cf file is out of date/) { next; }
+
+ # if the binary is less than 8.7 then use result of ruleset 0
+ if ( $binver <= 6 ) {
+ if (/^>/) # INPUT LINE! (and last output is done)
+ {
+ chop;
+ if ($prevline) { # OUTPUT LINE!
+ &printparseresolve;
+ }
+ s/> *[0-9,]* *//g;
+ s/.*input: *//;
+ s/ //g;
+ s/"//g;
+ $input = $_;
+ }
+ else { chop; }
+ $prevline = $_;
+ } else {
+ # format of /parse output is:
+ # Parsing envelope recipient address
+ # rewrite: ruleset 3 input: harker @ harker . com
+ if ($prevrule eq "Parsing envelope recipient address\n" )
+ {
+ chop;
+ s/> *[0-9,]* *//g;
+ s/.*input: *//;
+ s/ //g;
+ s/"//g;
+ $input = $_;
+ $prevrule = $_;
+ }
+ elsif (/^mailer /)
+ {
+ $prevrule = $_;
+ &printparseresolve;
+ }
+ else
+ {
+ $prevrule = $_;
+ }
+ }
+ }
+ #&printparseresolve;
+}
+
+sub printparseresolve {
+ # if the binary is less than 8.7 then use result of ruleset 0
+ if ( $binver <= 6 ) {
+ if ($input eq "") { return;}
+
+ $prevline =~ s/.*returns: *//;
+ $prevline =~ s/"//g;
+ $prevline =~ s/ //g;
+ # Don't strip spaces off error messages
+ $prevline =~ s/ *([.!%<>]) */$1/g;
+ $prevline =~ s/ +([;?\$])/$1/g;
+ $prevline =~ s/([#\@:]) +/$1/g;
+
+# non-Sun test mode delimiters -> easily-readable style
+# Mark Sausville, MIT Media Laboratory, saus@media-lab.media.mit.edu
+ $prevline =~ s/\^V/\$#/;
+ $prevline =~ s/\^W/\$@/;
+ $prevline =~ s/\^X/\$:/;
+
+ #### $#ether$@sun-barr.Ebay.Sun.COM$:site!user@uunet.uu.NET
+ @t = split( '\$', $prevline);
+ $address = "XXX";
+ $remote = "XXX";
+ $mailer = "XXX";
+ for ($i = 1; $i <= $#t; $i++)
+ {
+ if (substr($t[$i], 0, 1) eq ":")
+ { $address = substr($t[$i], 1,999); }
+ if (substr($t[$i], 0, 1) eq "@")
+ { $remote = substr($t[$i], 1,999); }
+ if (substr($t[$i], 0, 1) eq "#")
+ { $mailer = substr($t[$i], 1,999);
+ $mailer =~ tr/A-Z/a-z/; }
+ }
+ } else {
+ # the binary is at least 8.7 then use result of /parse
+ chop;
+ s/,//g;
+
+ # mailer esmtp, host harker.com., user harker@harker.com
+ @t = split( ' ', $_);
+ $address = "XXX";
+ $remote = "XXX";
+ $mailer = "XXX";
+ for ($i = 0; $i <= $#t; $i++)
+ {
+ if ($t[$i] eq "user")
+ { $address = $t[++$i]; }
+ if ($t[$i] eq "host")
+ { $remote = $t[++$i]; }
+ if ($t[$i] eq "mailer")
+ { $mailer = $t[++$i];
+ $mailer =~ tr/A-Z/a-z/; }
+ }
+ }
+ printf("%-27.27s --(%-6.6s)--> %s[%s]\n", $input, $mailer,
+ $address, $remote);
+ # now print to the log file
+ if ($setlog & 1) {
+ printf LOG ("%-27.27s --(%-6.6s)--> %s[%s]\n\n", $input, $mailer,
+ $address, $remote);
+ }
+
+ if ($doaliasing & 1) {
+ # If the address resolved to the local mailer,
+ # then expand the username as an alias
+ if ( $mailer eq "local")
+ {
+ $setalias = $aliasfound = 0;
+ $laddress = $address;
+ $sendmailprog = "$sendmail -bv -C$cffile $laddress|";
+ open(LOCAL, $sendmailprog) ||
+ die "can't exec $sendmailprog...\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "\n$sendmailprog\n";
+ }
+ while ()
+ {
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG $_;
+ }
+ chop;
+ if (/unknown/)
+ {
+ $aliasfound = 1;
+ printf("\t\t aliased to --(error )--> %s\n", $_);
+ # now print to the log file
+ if ($setlog & 1) {
+ printf LOG ("\t\t aliased to --(error )--> %s\n\n", $_);
+ }
+ next;
+ }
+ s/,//g;
+ @l = split( ' ', $_);
+ $aladdress = "XXX";
+ $remote = "XXX";
+ $mailer = "XXX";
+ for ($i = 1; $i <= $#l; $i++)
+ {
+ # ./sendmail -bv -C./sendmail.cf j.murphy
+ # j.murphy@pop.mcit.com... deliverable: mailer mciesmtp,
+ # host pop.mcit.com, user j.murphy@pop.mcit.com
+ if ($l[$i] eq "user") { $aladdress = $l[++$i]; }
+ if ($l[$i] eq "host") { $remote = $l[++$i]; }
+ if ($l[$i] eq "mailer") { $mailer = $l[++$i]; }
+ }
+ if (("$laddress" eq "$aladdress") && ($aliasfound == 0)) {
+ $selfalias = 1;
+ next;
+ }
+ printf("\t\t aliased to --(%-6.6s)--> %s[%s]\n",
+ $mailer, $aladdress, $remote);
+ # now print to the log file
+ if ($setlog & 1) {
+ printf LOG ("\t\t aliased to --(%-6.6s)--> %s[%s]\n\n",
+ $mailer, $aladdress, $remote);
+ }
+ if ("$laddress" ne "$aladdress") {
+ $aliasfound = 1;
+ $envsenderaddrs .= " $aladdress";
+ }
+ if ($mailer ne "XXX") { $themailers{$mailer}=1;}
+ }
+ close(LOCAL);
+ if ($selfalias == 1 && $aliasfound == 1) {
+ printf("\t\t aliased to --(%-6.6s)--> %s[%s]\n",
+ $mailer, $aladdress, $remote);
+ # now print to the log file
+ if ($setlog & 1) {
+ printf LOG ("\t\t aliased to --(%-6.6s)--> %s[%s]\n\n",
+ $mailer, $aladdress, $remote);
+ }
+ }
+ # now print a blank line to the log file
+ if ($setlog & 1) {
+ print LOG "\n";
+ }
+ } else {
+ $envsenderaddrs .= " $address";
+ }
+ }
+
+ if ($mailer ne "XXX") { $themailers{$mailer}.="$input ";}
+}
+
+# Parse output of sendmail name resolution
+
+sub parseaddress
+{
+## ADDRESS TEST MODE
+## Enter
+## > rewrite: ruleset 3 input: "user"
+
+ open(MAIL, $_[0]) || die "Can't open $_[0]...\n";
+ local ($k, $address, $prevline, $mailer, $remote, $input);
+ print $_[1]; # the title
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "\n$_[1]"; # the title
+ }
+
+ $done = 0;
+ while ()
+ {
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG $_;
+ }
+ if (/^> *$/) { $done = 1; }
+ if (/^ADDRESS TEST MODE/) { next; }
+ if (/^Enter /) { next; }
+ if (/^Warning: .cf file is out of date/) { next; }
+ if (/^$/) { next; }
+ chop;
+ # rewrite $rules to be just a slash if it starts with a /
+ $rules =~ s'/.+'/';
+ # if the binary is less than 8.7 then use result of ruleset 4
+ if ( $binver <= 6 || $rules ne "/" ) {
+ if (/^>/) # INPUT LINE! (and last output is done)
+ {
+ if ($prevline) { # OUTPUT LINE!
+ $prevline =~ s/.*returns: *//;
+ $prevline =~ s/"//g;
+ $prevline =~ s/ //g;
+#> rewrite: ruleset 3 input: "site" "!" "user" "@" "uunet" "." "uu" "." "net"
+#rewrite: ruleset 8 input: "site" "!" "user" "@" "uunet" "." "uu" "." "net"
+#>
+ printf("%s%-24.24s ----> %s\n", $rspath, $input, $prevline);
+ # now print to the log file
+ if ($setlog & 1) {
+ printf LOG ("%s%-24.24s ----> %s\n", $rspath, $input, $prevline);
+ }
+ }
+ s/> *[0-9,]* *//g;
+ s/.*input: *//;
+ s/ //g;
+ s/"//g;
+ $input = $_;
+ }
+ last if $done;
+ $prevline = $_;
+ } else {
+ # format of /try output is:
+ # Trying envelope recipient address harker for mailer esmtp
+ # ...
+ # Rcode = 0, addr = harker@mailhub.gadget.com
+ # remove extra ">" from "> >" lines
+ s/^> >/>/;
+ if (/^> Trying/) # INPUT LINE! (and last output is done)
+ {
+ chop;
+ s/> Trying .+ address //;
+ s/ for mailer .+//;
+ s/ //g;
+ s/"//g;
+ $input = $_;
+ $prevrule = $_;
+ }
+ elsif (/^Rcode = /)
+ {
+ $prevrule = $_;
+ # Rcode = 0, addr = harker@mailhub.gadget.com
+ s/^Rcode = .+ addr = //;
+ printf("%s%-24.24s ----> %s\n", $rspath, $input, $_);
+ # now print to the log file
+ if ($setlog & 1) {
+ printf LOG ("%s%-24.24s ----> %s\n\n", $rspath, $input, $_);
+ }
+ }
+ else
+ {
+ $prevrule = $_;
+ }
+ }
+ }
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "\n";
+ }
+ close(MAIL);
+}
+
+
+# if the binary is less than 8.7 then use result of ruleset 4
+if ( $binver <= 6 ) {
+ print "Mail address resolution (rule 0)\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "Mail address resolution (rule 0)\n";
+ }
+} else {
+ print "Mail address resolution (/parse)\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "Mail address resolution (/parse)\n";
+ }
+}
+# pass names from resolve files to sendmail
+
+open(IN, $resolve) || die "can't open $resolve\n";
+open(OUT, ">/tmp/csm$$") || die "can't open >/tmp/csm$$\n";
+while ()
+{
+ /^$/ && next;
+ /^#/ && next;
+ # if the binary is less than 8.7 then use result of ruleset 0
+ if ( $binver == 5 ) {
+ $rules = "0 $_";
+ } elsif ( $binver <= 6 ) {
+ $rules = "3,0 $_";
+ } else {
+ $rules = "/parse $_";
+ }
+ print OUT $rules;
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "$rules";
+ }
+ chop;
+ $allinput .= " $_";
+}
+ $allinput =~ s/^ //;
+close(OUT);
+close(IN);
+$sendmailprog = "$sendmail -bt -C$cffile < /tmp/csm$$|";
+open(MAIL, $sendmailprog) || die "can't exec $sendmailprog...\n";
+&parseresolve();
+
+# calculate $f
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+ open (IN, $resolve);
+ # sendmail 5 automatically runs ruleset 3
+ if ( $binver == 5 ) {
+ $rules = "1,4";
+ } else {
+ $rules = "3,1,4";
+ }
+ if ($dorspath & 1) { $rspath = "\$f: "; }
+
+ while () {
+ chop;
+ /^$/ && next;
+ /^#/ && next;
+ $address = $_;
+ print OUT "$rules $address\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "$rules $address\n";
+ }
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "\n"; # stuff last line into sendmail
+ }
+ close(IN);
+ close(OUT);
+ &parseaddress ("/tmp/csm$$", "\n\$f address header transformations\n");
+
+# Get the R= and S= special rulesets from the configuration
+# now print to the log file
+if ($setlog & 1) {
+ print LOG "\nGet the R= and S= mailer specific rulesets\n";
+}
+
+open(FID, "grep ^M $cffile|");
+while ()
+{
+# Mether, P=[IPC], F=msDFMueCX, S=11, R=21, A=IPC $h
+ chop;
+ $thisline = $_;
+ $thisline =~ s/M//;
+ $thisline =~ s/,.*//;
+ $thisline =~ tr/A-Z/a-z/;
+ $sendrule = $_;
+ $sendrule =~ s/.*S=//;
+ $sendrule =~ s/,.*//;
+ if ($sendrule=~q!/!) {
+ ($esendrule, $hsendrule) = split (q!/!, $sendrule);
+ } else {
+ $esendrule = $hsendrule = $sendrule;
+ }
+ $recvrule = $_;
+ $recvrule =~ s/.*R=//;
+ $recvrule =~ s/,.*//;
+ if ($recvrule=~q!/!) {
+ ($erecvrule, $hrecvrule) = split (q!/!, $recvrule);
+ } else {
+ $erecvrule = $hrecvrule = $recvrule;
+ }
+ $esendrules{$thisline} = $esendrule;
+ $hsendrules{$thisline} = $hsendrule;
+ $erecvrules{$thisline} = $erecvrule;
+ $hrecvrules{$thisline} = $hrecvrule;
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "mailer: $thisline\t->\tesendrule = $esendrule, hsendrule = $hsendrule,
+ erecvrule = $erecvrule, hrecvrule = $hrecvrule\n";
+ }
+}
+# now print to the log file
+if ($setlog & 1) {
+ print LOG "\n";
+}
+close(FID);
+
+# pass envelope recipient names from various mailers through sendmail
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+ if ($dorspath & 1) { $rspath = "$i ER: "; }
+
+ # if the binary is less than 8.7 then use result of ruleset 0
+ if ( $binver <= 6 ) {
+ if ($erecvrules{$i} == 0) {
+ print "\nCan't find recv rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ # sendmail 5 automatically runs ruleset 3
+ if ( $binver == 5 ) {
+ $rules = "2,$erecvrules{$i},4";
+ } else {
+ $rules = "3,2,$erecvrules{$i},4";
+ }
+ } else {
+ print OUT "/tryflags ER\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "/tryflags ER\n";
+ }
+ $rules = "/try $i";
+ }
+ @namelist = split(/ /, $allinput);
+ foreach (@namelist) {
+ print OUT "$rules $_\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "$rules $_\n";
+ }
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "\n"; # stuff last line into the log
+ }
+ close(OUT);
+ $note = "";
+ if ($erecvrules{$i} eq $hrecvrules{$i}) { $note = "and header "; }
+ &parseaddress ("/tmp/csm$$", "\n`To' envelope ${note}address transformations for mailer $i [$rules]:\n");
+}
+
+# pass header recipient names from various mailers through sendmail
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+ if ($dorspath & 1) { $rspath = "$i HR: "; }
+
+ # only run the header ruleset if the mailer uses split env/hdr rulesets
+ if ($hrecvrules{$i} ne $erecvrules{$i}) {
+ # if the binary is less than 8.7 then use result of ruleset 0
+ if ( $binver <= 6 ) {
+ if ($hrecvrules{$i} == 0) {
+ print "\nCan't find recv rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ # sendmail 5 automatically runs ruleset 3
+ if ( $binver == 5 ) {
+ $rules = "2,$hrecvrules{$i},4";
+ } else {
+ $rules = "3,2,$hrecvrules{$i},4";
+ }
+ } else {
+ print OUT "/tryflags HR\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "/tryflags HR\n";
+ }
+ $rules = "/try $i";
+ }
+ @namelist = split(/ /, $allinput);
+ foreach (@namelist) {
+ print OUT "$rules $_\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "$rules $_\n";
+ }
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "\n"; # stuff last line into the log
+ }
+ close(OUT);
+ &parseaddress ("/tmp/csm$$", "\n`To' header address transformations for mailer $i [$rules]:\n");
+ }
+}
+
+# pass envelope sender names from various mailers through sendmail
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+ if ($dorspath & 1) { $rspath = "$i ES: "; }
+
+ # if the binary is less than 8.7 then use result of ruleset 0
+ if ( $binver <= 6 ) {
+ if ($esendrules{$i} == 0) {
+ print "\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ # sendmail 5 automatically runs ruleset 3
+ if ( $binver == 5 ) {
+ $rules = "2,$esendrules{$i},4";
+ } else {
+ $rules = "3,2,$esendrules{$i},4";
+ }
+ } else {
+ print OUT "/tryflags ES\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "/tryflags ES\n";
+ }
+ $rules = "/try $i";
+ }
+ @namelist = split(/ /, $allinput);
+ foreach (@namelist) {
+ print OUT "$rules $_\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "$rules $_\n";
+ }
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ $note = "";
+ if ($esendrules{$i} eq $hsendrles{$i}) {$note = "and header ";}
+ &parseaddress ("/tmp/csm$$", "\n`From' envelope ${note}address transformations for mailer $i [$rules]:\n");
+}
+
+# pass header sender names from various mailers through sendmail
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+ if ($dorspath & 1) { $rspath = "$i HS: "; }
+
+ # only run the header ruleset if the mailer uses split env/hdr rulesets
+ if ($hsendrules{$i} ne $esendrules{$i}) {
+ # if the binary is less than 8.7 then use result of ruleset 0
+ if ( $binver <= 6 ) {
+ if ($hsendrules{$i} == 0) {
+ print "\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ # sendmail 5 automatically runs ruleset 3
+ if ( $binver == 5 ) {
+ $rules = "2,$hsendrules{$i},4";
+ } else {
+ $rules = "3,2,$hsendrules{$i},4";
+ }
+ } else {
+ print OUT "/tryflags HS\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "/tryflags HR\n";
+ }
+ $rules = "/try $i";
+ }
+ @namelist = split(/ /, $allinput);
+ foreach (@namelist) {
+ print OUT "$rules $_\n";
+ # now print to the log file
+ if ($setlog & 1) {
+ print LOG "$rules $_\n";
+ }
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ &parseaddress ("/tmp/csm$$", "\n`From' address header transformations for mailer $i [$rules]:\n");
+ }
+}
+
+foreach $i (keys %themailers)
+{
+ $sendmailprog = "|$sendmail -bt -C$cffile > /tmp/csm$$";
+ open (OUT, $sendmailprog);
+ if ($dorspath & 1) { $rspath = "\$g: "; }
+
+ # if the binary is 8.9 or below then check if the mailer
+ # specific ruleset exists
+ if ( $binver <= 9 ) {
+ # if the binary is less than 8.7 then use result of ruleset 0
+ if ($esendrules{$i} == 0) {
+ print "\nCan't find send rule for `$i', skipping this mailer <-------------------\n";
+ next;
+ }
+ }
+ # sendmail 5 automatically runs ruleset 3
+ if ( $binver == 5 ) {
+ $rules = "1,4,3,1,$hsendrules{$i},4"; # XXX esendrules? book p. 431???
+ } else {
+ $rules = "3,1,4,3,1,$hsendrules{$i},4"; # XXX esendrules? book p. 431???
+ }
+ open (IN, $resolve);
+ while () {
+ chop;
+ /^$/ && next;
+ /^#/ && next;
+ $address = $_;
+ print OUT "$rules $address\n";
+ }
+ print OUT "\n"; # stuff last line into sendmail
+ close(IN);
+ close(OUT);
+ $note = "";
+ if ($esendrules{$i} eq $hsendrles{$i}) {$note = "and header ";}
+ &parseaddress ("/tmp/csm$$", "\n\$g address transformations for mailer $i [$rules]:\n");
+}
+
+unlink("/tmp/csm$$") || die "Can't unlink /tmp/csm$$";
+unlink("/tmp/csm.in$$");
+
+exit;
--- sendmail-8.14.4.orig/debian/examples/checksendmail/harker/checksendmail.8
+++ sendmail-8.14.4/debian/examples/checksendmail/harker/checksendmail.8
@@ -0,0 +1,246 @@
+.\" BSDI $Id: checksendmail.8,v 1.1.1.1 1994/01/13 21:15:31 polk Exp $
+.Dd November 14, 2000
+.Dt CHECKSENDMAIL 8
+.Os
+.Sh NAME
+.Nm checksendmail
+.Nd verify sendmail address transformations.
+.Sh SYNOPSIS
+.Nm checksendmail
+.Op Fl a
+.Op Fl d
+.Op Fl b
+.Op Fl C Ar file.cf
+.Op Fl b Ar sendmail_binary
+.Op Fl l Ar log_file
+.Op Fl r Ar resolve
+.Op Fl T Ar test.address
+.Sh DESCRIPTION
+.Pp
+The
+.Nm checksendmail
+program is a
+.Xr perl
+script that aids the testing of
+.\".Xr sendmail 8 's
+sendmail(8)'s
+various configuration files.
+.Nm checksendmail
+passes typical addresses (supplied in input files) through
+.Xr sendmail
+and prints the results of the resolution and transformation routines.
+.Pp
+The input files contain a list of addresses, one per line.
+For example:
+.Bd -literal -offset indent
+user
+user@site
+user@site.com
+.Ed
+.Pp
+The input file can contain comments started with a
+.Em #
+and blank lines.
+.Sh OPTIONS
+.Pp
+.Bl -tag -width Fl -compact -offset left
+.It Fl a
+Show aliasing of local addresses in
+mail address resolution phase of testing
+.It Fl d
+Precede each address translation line with ruleset sequence summary
+.It Fl C Ar file.cf
+Use the
+.Xr sendmail
+configuration file
+.Ar file.cf
+instead of the default
+.Pa /etc/sendmail.cf
+file.
+.It Fl b Ar sendmail_binary
+Use the specified
+.Ar sendmail_binary
+as the path to invoke sendmail (instead of
+.Pa /usr/sbin/sendmail ) .
+.It Fl l Ar log_file
+Log
+.Xr sendmail
+address test mode debugging output to
+.Ar log_file
+.It Fl r Ar resolve
+Use
+.Ar resolve
+as the input file for the addresses to be used for mail resolving. Defaults
+to
+.Ar address.resolve .
+.It Fl T Ar test.address
+Use
+.Ar test.address
+as the single address to test. Cannot be used in conjunction with
+file setting flags.
+.El
+.Sh EXAMPLES
+.Pp
+The following command will pass the addresses in
+.Ar address.resolve
+through
+.Xr sendmail
+using the configuration information in
+.Ar myconfig.cf .
+.Bd -literal -offset left
+example% cat address.resolve
+user
+user@site
+user@site.com
+
+example% checksendmail \-C myconfig.cf
+system: myhost.gadget.com current dir: /tmp/Checksendmail
+resolve file: address.resolve
+sendmail binary: /usr/sbin/sendmail sendmail version: 8.9.3
+config file: /etc/sendmail.cf config file version: V8/Berkeley
+
+Mail address resolution
+user --(ether )--> user[rmtc]
+user@site --(ether )--> user@site[rmtc]
+user@site.com --(ether )--> user@site.com[rmtc]
+
+`To' address transformations for mailer ether:
+user ----> user
+user@site ----> user@site
+user@site.com ----> user@site.com
+
+`From' address transformations for mailer ether:
+user ----> user
+user@site ----> user
+user@site.com ----> user
+.Ed
+.Pp
+The first section of the output shows how the addresses in the input
+files are resolved by
+.Xr sendmail 8 .
+Consider the following output line:
+.Pp
+.Dl "user@site.com --(ether )--> user@site.com[rmtc]"
+.Pp
+The input address
+.Em user@site.com
+resolves to use the
+.Em ether
+mailer. That mailer is directed to send the mail to
+to the user
+.Em user@site.com
+at site
+.Em rmtc
+(as indicated in the square brackets).
+.Pp
+The two later sections of output show how the addresses specified as
+the
+.Em To
+and
+.Em From
+address are transformed in the text of the
+headers. In the example above, the
+.Em To
+addresses are untouched.
+The
+.Em From
+addresses, however, all lose their machine information on
+the way through the mailer:
+.Pp
+.Dl "user@site ----> user"
+.Pp
+This may be desirable when using a configuration file on a
+workstation which is to be hidden as a mailhost from the rest of the
+network.
+.Pp
+The following is a set of addresses used at one site for the purposes of
+testing address resolution. Comments after the addresses detail why
+particular addresses are present:
+.Bl -tag -width "user@machine.com" -compact -offset indent
+.It user
+Standard trivial address
+.It user@rmtc
+qualified at one level
+.It user@rmtc.central
+qualified at two levels
+.It user@rmtc.central.sun.com
+qualified all the way
+.It rmtc!user
+local but specified as uucp
+.It user@summit
+a workstation (normally delivered locally, though)
+.It user@summit.central
+same but more qualified
+.It user@summit.central.sun.com
+same but fully qualified
+.It summit!user
+same but specified as uucp
+.It user@prisma
+Backward compatibility tests
+.It user@prisma.com
+.It prisma!user
+.It user@central
+Superior domain testing
+.It user@machine.central
+more qualified, but unknown
+.It user@summit.central
+more qualified and known
+.It user@eng
+name in faraway domain
+.It user@machine.eng
+unknown machine in faraway domain
+.It user@summit.eng
+local machine, far away domain
+.It user@hoback
+far away machine
+.It user@machine
+apparently local but unknown machine
+.It user@sun.com
+Standard trivial address
+.It user@machine.dom.sun.com
+fully qualified but unknown machine
+.It user@foo.com
+standard, known, really far away domain
+.It user@foo.dom
+standard, unknown, really far away domain
+.It site!user
+Single level uucp
+.It site1!site2!user
+Double level uucp
+.It user@foo.dom@bar.dom
+Trickier address
+.It site!user@foo.dom
+Mixed uucp/domain
+.It site!user@uunet.uu.net
+Mixed double uucp/domain
+.El
+.Sh NOTES
+Note that
+.Nm checksendmail
+is a
+.Xr perl
+script. If your site does not have
+.Xr perl 1 ,
+it can be obtained via anonymous
+.Xr ftp
+from
+.Em ftp.uu.net .
+.Pp
+.Xr sendmail
+requires that the user have access to directory specified by the
+.Em OQ
+parameter in the configuration file (normally
+.Pa /usr/spool/mqueue ) .
+.Nm checksendmail
+verifies that the user has access to this directory before allowing the
+test to continue.
+.Sh AUTHORS
+.Bd -literal
+Gene Kim
+Rob Kolstad
+Jeff Polk
+.Ed
+.Pp
+Modified by Robert Harker
+.Sh "SEE ALSO"
+.Xr sendmail 8
--- sendmail-8.14.4.orig/debian/examples/db/access
+++ sendmail-8.14.4/debian/examples/db/access
@@ -0,0 +1,139 @@
+# /etc/mail/access
+# Copyright (c) 1998,2004 Richard Nelson .
+# Time-stamp: <1998/10/27 10:00:00 cowboy>
+# GPL'd config file, please feed any gripes, suggestions, etc. to me
+#
+# Function:
+# Access Control for this smtp server - determines:
+# * Who we accept mail from
+# * Who we accept relaying from
+# * Who we will not send to
+#
+# Usage:
+# FEATURE(access_db[, type [-o] /etc/mail/access])dnl
+# makemap hash access < access
+#
+# Format:
+# lhs:
+# email addr
+# domain name unless FEATURE(relay_hosts_only) is used,
+# then this is a fqdn - and relay-domains ($=R)
+# must also be fqdns.
+# network number must end on an octet boundary, or
+# you're stuck going the longwinded way ;-{
+# rhs:
+# OK accept mail even if other rules in the
+# running ruleset would reject it.
+# RELAY Allow domain to relay through your SMTP
+# server. RELAY also serves an implicit
+# OK for the other checks.
+# REJECT reject the sender/recipient with a general
+# purpose message that can be customized.
+# confREJECT_MSG [550 Access denied] will be issued
+# DISCARD discard the message completely using
+# the $#discard mailer.
+# ### any text where ### is an RFC 821 compliant error code
+# and "any text" is a message to return for
+# the command
+# Examples:
+# spammer@aol.com REJECT
+# FREE.STEALTH.MAILER@ 550 Spam not accepted
+#
+# Notes:
+# With FEATURE(blacklist_recipients) this is also possible:
+# badlocaluser 550 Mailbox disabled for this username
+# host.mydomain.com 550 That host does not accept mail
+# user@otherhost.mydomain.com 550 Mailbox disabled for this recipient
+#
+# Related:
+# define(`confREJECT_MSG', `550 Access denied')dnl
+# define(`confCR_FILE', `-o /etc/mail/relay-domains')dnl <<- $=R
+# FEATURE(relay_hosts_only)dnl
+# FEATURE(relay_entire_domain)dnl <<- relays any host in the $=m class
+# FEATURE(relay_based_on_MX)dnl <<- relaying for boxes MX'd to you
+# FEATURE(blacklist_recipients)dnl
+# FEATURE(rbl[,alternate server])dnl
+# FEATURE(orbs[,alternate server])dnl <<- Debian addition
+# FEATURE(orca[,alternate server])dnl <<- Debian addition
+# FEATURE(accept_unqualified_senders)dnl
+# FEATURE(accept_unresolvable_domains)dnl
+#
+# Local addresses 10.x.x.x, 127.x.x.x, 172.16-31.x.x 192.168.x.x can relay
+# Note Well! You *must* make sure these address can't be spoofed externally
+# Note, outbound relaying is controlled by connection and/or auth
+# If you're not firewalled, and you don't have a lan, comment these out
+# If you're not firewalled, and you have a lan, get firewalled *NOW*
+# GreetPause - delay to check for spammers
+# Client Connection rate (and #) control
+Connect:localhost RELAY
+GreetPause:localhost 0
+ClientRate:localhost 0
+ClientConn:localhost 0
+#Connect:10 RELAY
+#GreetPause:10 0
+#ClientRate:10 0
+#ClientConn:10 0
+Connect:127 RELAY
+GreetPause:127 0
+ClientRate:127 0
+ClientConn:127 0
+Connect:IPv6:::1 RELAY
+GreetPause:IPv6:::1 0
+ClientRate:IPv6:::1 0
+ClientConn:IPv6:::1 0
+#Connect:172.16 RELAY
+#Connect:172.17 RELAY
+#Connect:172.18 RELAY
+#Connect:172.19 RELAY
+#Connect:172.20 RELAY
+#Connect:172.21 RELAY
+#Connect:172.22 RELAY
+#Connect:172.23 RELAY
+#Connect:172.24 RELAY
+#Connect:172.25 RELAY
+#Connect:172.26 RELAY
+#Connect:172.27 RELAY
+#Connect:172.28 RELAY
+#Connect:172.29 RELAY
+#Connect:172.30 RELAY
+#Connect:172.31 RELAY
+#Connect:192.168 RELAY
+#GreetPause:192.168 0
+#ClientRate:192.168 0
+#ClientConn:192.168 0
+# Defaults
+GreetPause: 5000
+ClientRate: 10
+ClientConn: 10
+#
+# Don't offer AUTH on local network
+#SRV_Features:192.168.1 A
+#
+# Hosts with to allow relaying
+#
+#
+# Hosts that validly forward to me
+#GreetPause: 0
+#ClientRate: 30
+#ClientConn: 0
+#
+# Whitelisted users
+#
+Spam:postmaster@ FRIEND
+Spam:abuse@ FRIEND
+Spam:spam@ FRIEND
+#
+# Blacklisted users
+#
+#Connect:rampellsoft.com 554 Email directly, not through didtheyreadit.com
+reject@ REJECT
+#cyberpromo.com REJECT
+#From:MAILER-DAEMON@store2.netvisao.pt REJECT
+#
+# Block invalid IPs
+#
+#Connect:0 REJECT whilst invalid, this also blocks sendmail -bs -Am
+Connect:169.254 REJECT
+Connect:192.0.2 REJECT
+Connect:224 REJECT
+Connect:255 REJECT
--- sendmail-8.14.4.orig/debian/examples/db/aliases
+++ sendmail-8.14.4/debian/examples/db/aliases
@@ -0,0 +1,15 @@
+#
+# Mail aliases for sendmail
+#
+# You must run newaliases(1) after making changes to this file.
+#
+
+# Required aliases
+postmaster: root
+MAILER-DAEMON: postmaster
+
+# Common aliases
+abuse: postmaster
+spam: postmaster
+
+# Other aliases
--- sendmail-8.14.4.orig/debian/examples/db/domaintable
+++ sendmail-8.14.4/debian/examples/db/domaintable
@@ -0,0 +1,26 @@
+# /etc/mail/domaintable
+# Copyright (c) 1998, Richard Nelson .
+# Time-stamp: <1998/10/27 10:00:00 cowboy>
+# GPL'd config file, please feed any gripes, suggestions, etc. to me
+#
+# Function:
+# Specify a mapping from old host name to new host name.
+# Commonly used to support old (or merged) domain names.
+# The host name in the lhs will be rewritten to that in the rhs
+#
+# Usage:
+# FEATURE(domaintable[, type [-o] /etc/mail/domaintable])dnl
+# makemap hash domaintable < domaintable
+#
+# Format:
+# old fqdn new fqdn
+#
+# Examples:
+# debian.com debian.org
+# .debian.com %0.debian.org
+#
+# Notes:
+#
+# Related:
+#
+#.cv.lexington.ibm.com %0.lexington.ibm.com
--- sendmail-8.14.4.orig/debian/examples/db/genericstable
+++ sendmail-8.14.4/debian/examples/db/genericstable
@@ -0,0 +1,36 @@
+# /etc/mail/genericstable
+# Copyright (c) 1998, Richard Nelson .
+# Time-stamp: <1998/10/27 10:00:00 cowboy>
+# GPL'd config file, please feed any gripes, suggestions, etc. to me
+#
+# Function:
+# Cause certain addresses originating locally (unqualified), or
+# from a domain in $=G to be rewritten based upon the map below.
+# This mapping may change both the user and domain name.
+#
+# Usage:
+# FEATURE(genericstable[, type [-o] /etc/mail/genericstable])dnl
+# makemap hash genericstable < genericstable
+#
+# Format:
+# localuser realuser@realdomain <<- implied $j or masq domain
+# user@host realuser@realhost <<- tried first
+# user[@host] realuser[@realhost]
+#
+# Examples:
+#
+# Notes:
+# * Masquerading is *required* for genericstable support!
+# * Then genericstable should only be enabled if needed as it
+# causes every sender to be looked up in the database
+# * Members of $=w are *not* automatically placed in $=G
+# * For local mail, FEATURE(always_add_domain) is necessary
+#
+# Related:
+# EXPOSED_USER(root uucp)dnl <<- these are exempt from masquerading
+# FEATURE(allmasquerade)dnl <<- rewrite recipient addrs too
+# FEATURE(always_add_domain)dnl <<- add domain to unqualified names
+# FEATURE(limited_masquerade)dnl <<- only masq domains in $=M
+# FEATURE(masquerade_envelope)dnl <<- rewrite envelope return address too
+# GENERICS_DOMAIN_FILE(`/etc/mail/sendmail.cG')dnl <<- masq From:
+#
--- sendmail-8.14.4.orig/debian/examples/db/mailertable
+++ sendmail-8.14.4/debian/examples/db/mailertable
@@ -0,0 +1,50 @@
+# /etc/mail/mailertable
+# Copyright (c) 1998, Richard Nelson .
+# Time-stamp: <1998/10/27 10:00:00 cowboy>
+# GPL'd config file, please feed any gripes, suggestions, etc. to me
+#
+# Function:
+# Specify a mapping from old host name to new host name.
+# Commonly used to support old (or merged) domain names.
+# The host name in the lhs will be rewritten to that in the rhs
+#
+# Usage:
+# FEATURE(mailertable[, type [-o] /etc/mail/mailertable])dnl
+# makemap hash mailertable < mailertable
+#
+# Format:
+# Local recipients:
+# local:user
+# local: <<- will use same user
+# Error messages:
+# badhost error:nohost mail to %0 is prohibited
+# .baddomain error:nohost mail to %1%0 is prohibited
+#
+# Examples:
+# Local recipients:
+# local:user
+# local: <<- will use same user
+# Error messages:
+# badhost error:nohost mail to %0 is prohibited
+# .baddomain error:nohost mail to %1%0 is prohibited
+#
+# Notes:
+#
+# Related:
+#
+# Address rewrites for hosts *NOT IN* class $w
+# Direct delivery, %0 is left side
+# friend.dom smtp:[%0]:[some.smart.host]
+# Direct deliver of domain, smarthost as second choice
+# .friend.dom smtp:[%1%0]:[some.smart.host]
+# Default route, via smarthost
+# . smtp:[some.smart.host]
+#
+badhost error:nohost mail to %0 is prohibited
+.baddomain error:nohost mail to %1%0 is prohibited
+#
+# Sites we deliver directly to, bypassing SMARTHOST:
+#
+# Sites that use DUL: Dialup User Lists (or equivalent)
+#aol.com esmtp:[relay]
+#primenet.com esmtp:[relay]
--- sendmail-8.14.4.orig/debian/examples/db/relay-domains
+++ sendmail-8.14.4/debian/examples/db/relay-domains
@@ -0,0 +1,35 @@
+# /etc/mail/relay-domains
+# Copyright (c) 1998, Richard Nelson .
+# Time-stamp: <1998/10/27 10:00:00 cowboy>
+# GPL'd config file, please feed any gripes, suggestions, etc. to me
+#
+# Function:
+# Control what hosts are allowed to relay (or be a relay)
+#
+# Usage:
+# define(`confCR_FILE', `[-o ]/etc/mail/relay-domains')dnl
+# RELAY_DOMAIN_FILE(`/etc/mail/relay-domains %[^\#]')dnl
+#
+# Format:
+# lhs:
+#
+# Notes:
+# Class $=R
+# These are domains unless FEATURE(relay_hosts_only) is used,
+# then these names must be fully qualified host names!
+#
+# Related:
+# FEATURE(relay_hosts_only)dnl
+# FEATURE(relay_entire_domain)dnl <<- relays any host in the $=m class
+# FEATURE(relay_based_on_MX)dnl <<- relaying for boxes MX'd to you
+# FEATURE(access_db)dnl
+# EATURE(blacklist_recipients)dnl
+# FEATURE(rbl[,alternate server])dnl
+# FEATURE(orbs[,alternate server])dnl <<- Debian addition
+# FEATURE(accept_unqualified_senders)dnl
+# FEATURE(accept_unresolvable_domains)dnl
+#
+# Hosts that I will relay to:
+#
+# Hosts that can relay to me:
+#
--- sendmail-8.14.4.orig/debian/examples/db/sendmail.cM
+++ sendmail-8.14.4/debian/examples/db/sendmail.cM
@@ -0,0 +1,32 @@
+# /etc/mail/sendmail.cM
+# Copyright (c) 1998, Richard Nelson .
+# Time-stamp: <1998/10/27 10:00:00 cowboy>
+# GPL'd config file, please feed any gripes, suggestions, etc. to me
+#
+# Function:
+# Specify mail domains, which when relayed, will be rewritten
+# to appear as the MASQUERADE_AS address
+#
+# Usage:
+# MASQUERADE_DOMAIN_FILE(`[-o ]/etc/mail/sendmail.cM')dnl
+#
+# Format:
+# fqdn
+#
+# Examples:
+# debian.org
+#
+# Notes:
+# Class=$M
+#
+# Related:
+# EXPOSED_USER(root uucp)dnl <<- these are exempt from masquerading
+# FEATURE(allmasquerade)dnl <<- rewrite recipient addrs too
+# FEATURE(always_add_domain)dnl <<- add domain to unqualified names
+# FEATURE(limited_masquerade)dnl <<- only masq domains in $=M
+# FEATURE(masquerade_entire_domain)dnl <<- masq all hosts under domain
+# FEATURE(masquerade_envelope)dnl <<- rewrite envelope return address too
+# GENERICS_DOMAIN_FILE(`/etc/mail/sendmail.cG')dnl <<- masq From:
+#
+# Local names
+#
--- sendmail-8.14.4.orig/debian/examples/db/userdb
+++ sendmail-8.14.4/debian/examples/db/userdb
@@ -0,0 +1,10 @@
+#User names and the inbound(maildrop)/outbound(mailname) addresses
+#dest machine/domain names must also be in sendmail.cG for masquerading
+# NOTE: do NOT use FEATURE(stickyhost) with userdb
+# NOTE: be carefull with local delivery, defeats plussed users
+#
+# NOTE: Combined with virtusertable and/or aliases, Genericstable
+# can do everything the userdb can and more (and the difference
+# is growing bigger). The userdb is basically obsolete.
+#:default:mailname badlands.org
+#cowboy:mailname cowboy@vnet.ibm.com
--- sendmail-8.14.4.orig/debian/examples/db/virtusertable
+++ sendmail-8.14.4/debian/examples/db/virtusertable
@@ -0,0 +1,8 @@
+# Address rewrites for incomming mail
+# user@realdomain (must be in $w) localuser (may be an alias)
+# info@foo.com foo-info
+# info@bar.com bar-info
+# @baz.org jane@elsewhere.net
+# @foo.org %1@elsewhere.com
+# @bar.org error:nouser User unknown
+#
--- sendmail-8.14.4.orig/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.1.old
+++ sendmail-8.14.4/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.1.old
@@ -0,0 +1,158 @@
+#!/bin/sh
+#
+# This script is called when dhcp 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
+#
+# 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
+#
+# NOTE: The dhcp DNS name is used as the peer name in /etc/mail/peers.
+#
+# Exit by default, check for validity before commenting out the next line:
+exit 0;
+
+provider_m4='/etc/mail/provider.m4';
+#provider_m4='provider.m4';
+dialup_m4='/etc/mail/dialup.m4';
+#dialup_m4='dialup.m4';
+
+update_sendmail() {
+ # Build a new sendmail.cf from sendmail.mc, including our address.
+ 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 &
+ };
+
+update_provider() {
+ # Add smarthost information (if any)...
+ # But not if provider.m4 is a link !
+ local domain;
+ domain="$1";
+ if [ -f /etc/mail/peers/$domain -a ! -L $provider_m4 ]; then
+ cat <<-EOT > $provider_m4;
+ LOCAL_CONFIG
+ #------------------------------------------------------------
+ #
+ # Dynamic provider 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/$domain
+ EOT
+ cat /etc/mail/peers/$domain >> $provider_m4;
+ cat <<-EOT >> $provider_m4;
+ #------------------------------------------------------------
+ EOT
+ fi;
+ };
+
+find_host() {
+ # Determine our fqdn from our ISP
+ local addr;
+ addr="$1";
+ maxloop=20;
+ cntr=0;
+ host='';
+ until (test ! -z "$host"); do
+ cntr=$(($cntr+1));
+ rev=$(host $addr);
+ host=$(echo "$rev" | grep '^Name:' | awk '{print $2}');
+ if [ -z "$host" ]; then
+ host=${rev##*domain name pointer };
+ host=${host%.};
+ fi;
+ test=$(echo $host | cut -d ' ' -f 1);
+ if [ "$host" != "**" ]; then
+ break;
+ elif (($cntr > $maxloop)); then
+ host='';
+ break;
+ fi;
+ done;
+ echo "addr=$addr, name=$host";
+ };
+
+update_host() {
+ local host ip;
+ ip="$1";
+ find_host "$ip";
+ if [ ! -z "$host" ]; then
+ cat <<-EOT > $dialup_m4;
+ LOCAL_CONFIG
+ #------------------------------------------------------------
+ #
+ # Dynamic host/ip 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 two options:
+ # * Add our true hostname as a Virtual Host (we'll accept
+ # mail for it, but keep our local name for SMTP AUTH, etc)
+ C{VirtHost}$host
+ #
+ # * Define our true hostname (from our ISP) - becomes \$j
+ dnl define(\`confDOMAIN_NAME', \`$host')dnl
+ #
+ # Make sure we accept mail as this name (for bounces, etc)
+ Cw$host
+ Cw$ip
+ # Add our hostname to class G for genericstable support
+ CG$host
+ #------------------------------------------------------------
+ EOT
+ fi;
+ };
+
+# No need to continue if we're called with an unsupported option
+if [ "$reason" != BOUND ] && [ "$reason" != RENEW ] \
+ && [ "$reason" != REBIND ] && [ "$reason" != REBOOT ] \
+ && [ "$reason" != EXPIRE ] && [ "$reason" != FAIL ]
+ then
+ return;
+ fi;
+
+# Flag to denote changed have been made;
+changed=0;
+
+# If the domain name has changed, update the provider information
+if [ "$new_domain_name" != "$old_domain_name" ]; then
+ changed=1;
+ update_provider "$new_domain_name";
+ fi;
+
+# If the ip address has changed, update the host information
+if [ "$new_ip_address" != "$oldnew_ip_address" ]; then
+ changed=1;
+ update_host "$new_ip_address";
+ fi;
+
+# If anything has been changed, update sendmail.cf and reload
+if [ $changed -eq 1 ]; then
+ update_sendmail;
+ fi;
+
+exit 0;
+
--- sendmail-8.14.4.orig/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.in
+++ sendmail-8.14.4/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.in
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# This script is called when a dhcp event occurs.
+#
+# Here is where we'll start/stop sendmail if needed.
+#
+# Written By Richard Nelson
+#
+# 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
+#
+# NOTE: The dhcp DNS name is used as the peer name in /etc/mail/peers.
+#
+
+# No need to continue if we're called with an unsupported option
+case "$reason" in
+ EXPIRE|FAIL|RELEASE|STOP) #down... and TIMEOUT too ???
+ ;;
+ BOUND|RENEW|REBIND|REBOOT|TIMEOUT) #up... why TIMEOUT here ???
+ ;;
+ *)
+ return;
+ ;;
+ esac;
+
+# Bring in some script functions to handle dynamic configuration
+. @datadir@/sendmail/dynamic;
+
+# Note the interface that just changed
+update_interface "$interface" "$reason";
+
+# If the domain name has changed, update the provider information
+if [ "$new_domain_name" != "$old_domain_name" ]; then
+ update_provider "$new_domain_name";
+ fi;
+
+# If the ip address has changed, update the host information
+if [ "$new_ip_address" != "$oldnew_ip_address" ]; then
+ update_host "$new_ip_address";
+ fi;
+
+# If anything has been changed, update sendmail.cf and reload
+# Actually, we'll delay the reload because we'll be hit in a moment
+# to handle the change by /etc/network/if-up.d/sendmail
+update_sendmail "dhcp" Delayed;
+
+return;
+
--- sendmail-8.14.4.orig/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.md5sum
+++ sendmail-8.14.4/debian/examples/dhcp/dhclient-exit-hooks.d/sendmail.md5sum
@@ -0,0 +1 @@
+2adc5e32474fb128ee6c7b4425d06a58 sendmail
--- sendmail-8.14.4.orig/debian/examples/ldap/sendmail.schema.v1
+++ sendmail-8.14.4/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
+
--- sendmail-8.14.4.orig/debian/examples/ldap/sendmail.schema.v2
+++ sendmail-8.14.4/debian/examples/ldap/sendmail.schema.v2
@@ -0,0 +1,269 @@
+# Copyright (c) 2000-2002 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.21 2002/11/20 23:13:50 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 )
+
+# attribute sendmailMTAMapSearch cis
+attributetype ( 1.3.6.1.4.1.6152.10.3.1.24
+ NAME 'sendmailMTAMapSearch'
+ DESC 'recursive search for values of a map entry'
+ EQUALITY caseExactMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
+
+# attribute sendmailMTAMapURL cis
+attributetype ( 1.3.6.1.4.1.6152.10.3.1.25
+ NAME 'sendmailMTAMapURL'
+ DESC 'recursive search URL for values of a map entry'
+ EQUALITY caseExactMatch
+ 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,
+# allows
+# sendmailMTACluster,
+# sendmailMTAHost,
+# sendmailMTAMapValue,
+# sendmailMTAMapSearch,
+# sendmailMTAMapURL,
+# 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 )
+ MAY ( sendmailMTACluster $ sendmailMTAHost $
+ sendmailMTAMapValue $ sendmailMTAMapSearch $
+ sendmailMTAMapURL $ 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 caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ 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 )
+
+# attribute sendmailMTAAliasSearch cis
+attributetype ( 1.3.6.1.4.1.6152.10.3.1.26
+ NAME 'sendmailMTAAliasSearch'
+ DESC 'recursive search for values of an alias'
+ EQUALITY caseExactMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
+
+# attribute sendmailMTAAliasURL cis
+attributetype ( 1.3.6.1.4.1.6152.10.3.1.27
+ NAME 'sendmailMTAAliasURL'
+ DESC 'recursive search URL for values of an alias'
+ EQUALITY caseExactMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
+
+#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,
+# allows
+# sendmailMTAAliasGrouping,
+# sendmailMTACluster,
+# sendmailMTAHost,
+# sendmailMTAAliasValue,
+# sendmailMTAAliasSearch,
+# sendmailMTAAliasURL,
+# 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
+ MAY ( sendmailMTAAliasGrouping $ sendmailMTACluster $
+ sendmailMTAHost $ sendmailMTAAliasValue $
+ sendmailMTAAliasSearch $ sendmailMTAAliasURL $ 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 )
+
+# attribute sendmailMTAClassSearch cis
+attributetype ( 1.3.6.1.4.1.6152.10.3.1.28
+ NAME 'sendmailMTAClassSearch'
+ DESC 'recursive search for members of a class'
+ EQUALITY caseExactMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
+
+# attribute sendmailMTAClassURL cis
+attributetype ( 1.3.6.1.4.1.6152.10.3.1.29
+ NAME 'sendmailMTAClassURL'
+ DESC 'recursive search URL for members of a class'
+ EQUALITY caseExactMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
+
+#objectClass sendmailMTAClass
+# requires
+# objectClass,
+# sendmailMTAClassName,
+# allows
+# sendmailMTACluster,
+# sendmailMTAHost,
+# sendmailMTAClassValue,
+# sendmailMTAClassSearch,
+# sendmailMTAClassURL,
+# 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
+ MAY ( sendmailMTACluster $ sendmailMTAHost $
+ sendmailMTAClassValue $ sendmailMTAClassSearch $
+ sendmailMTAClassURL $ Description ) )
--- sendmail-8.14.4.orig/debian/examples/logcheck/ignore.d.paranoid/sendmail
+++ sendmail-8.14.4/debian/examples/logcheck/ignore.d.paranoid/sendmail
@@ -0,0 +1,21 @@
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: starting daemon
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: restarting
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: rejecting connections on daemon
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: accepting connections again for daemon
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* User unknown
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: alias database .* rebuilt
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* aliases, longest
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: from=
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: split:
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* lost input channel
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* message-id=
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* return to sender
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* stat=
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* timeout waiting
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: Milter (add|change|delete) .*:
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: Milter: data, discard
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: discarded
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: AUTH=
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: (PLAIN|CRAM-MD5|DIGEST-MD5) set secret
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: DIGEST-MD5: failed .* later in exchange
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: STARTTLS=(server|client), .* verify=(OK|NO)
--- sendmail-8.14.4.orig/debian/examples/logcheck/ignore.d.server/sendmail
+++ sendmail-8.14.4/debian/examples/logcheck/ignore.d.server/sendmail
@@ -0,0 +1,27 @@
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: starting daemon
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: restarting
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: rejecting connections on daemon
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: accepting connections again for daemon
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* User unknown
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: alias database .* rebuilt
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* aliases, longest
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: from=
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: split:
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* lost input channel
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* message-id=
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* return to sender
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* stat=
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* timeout waiting
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: Milter: data, discard
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: discarded
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: AUTH=
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: (PLAIN|CRAM-MD5|DIGEST-MD5) set secret
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: DIGEST-MD5: failed .* later in exchange
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: STARTTLS=(server|client), .* verify=(OK|NO)
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: no secret in database$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: [[:alnum:]]+: [[:alnum:]]+: DSN: Return receipt$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: [[:alnum:]]+: collect: premature EOM: unexpected close$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: [[:alnum:]]+: collect: unexpected close on connection from (\[[0-9.]+\]|[._[:alnum:]-]+), sender=<[^>]+>$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: DIGEST-MD5 (server|client) step [[:alnum:]]+$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: [[:alnum:]]+: Milter (add|change|delete|message).*: .*$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: [[:alnum:]]+\[[0-9]+\]:.*$
--- sendmail-8.14.4.orig/debian/examples/logcheck/ignore.d.workstation/sendmail
+++ sendmail-8.14.4/debian/examples/logcheck/ignore.d.workstation/sendmail
@@ -0,0 +1,21 @@
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: starting daemon
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: restarting
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: rejecting connections on daemon
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: accepting connections again for daemon
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* User unknown
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: alias database .* rebuilt
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* aliases, longest
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: from=
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: split:
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* lost input channel
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* message-id=
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* return to sender
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* stat=
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* timeout waiting
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: Milter add:
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: Milter: data, discard
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*: discarded
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: AUTH=
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: (PLAIN|CRAM-MD5|DIGEST-MD5) set secret
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: DIGEST-MD5: failed .* later in exchange
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: STARTTLS=
--- sendmail-8.14.4.orig/debian/examples/logcheck/violations.ignore.d/local.sendmail
+++ sendmail-8.14.4/debian/examples/logcheck/violations.ignore.d/local.sendmail
@@ -0,0 +1 @@
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .* did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA$
--- sendmail-8.14.4.orig/debian/examples/logcheck/violations.ignore.d/logcheck-sendmail
+++ sendmail-8.14.4/debian/examples/logcheck/violations.ignore.d/logcheck-sendmail
@@ -0,0 +1,13 @@
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: alias database .* rebuilt
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*stat=(Refused|Deferred)
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: gethostbyaddr\(.*\) failed:
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: rejecting connections on daemon
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: DIGEST-MD5: failed .* later in exchange
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=450 4\.7\.1 <[^>]+>... Relaying temporarily denied. Cannot resolve PTR record for [0-9\.]+$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=451 4\.1\.8 Domain of sender address [^ ]+ does not resolve$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=550 5\.7\.1 (<[^>]+>... )?Access denied$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=550 5\.7\.1 <[^>]+>... Relaying denied. Proper authentication required.$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=550 5\.7\.1 <[^>]+>... Relaying denied. IP name lookup failed \[[0-9\.]+\]$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=550 5\.7\.1 <[^>]+>... Relaying denied. IP name (lookup )?possibly forged \[[0-9\.]+\]$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: .*reject=553 5\.1\.8 <[^>]+>... Relaying temporarily denied. Cannot resolve PTR record for [0-9\.]+$
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ (sendmail|sm-(mta|msp|que))\[[0-9]+\]: [[:alnum:]]+: Milter (add|change|delete|message).*:.*$
--- sendmail-8.14.4.orig/debian/examples/milter/Makefile
+++ sendmail-8.14.4/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 *~
--- sendmail-8.14.4.orig/debian/examples/milter/sample.c
+++ sendmail-8.14.4/debian/examples/milter/sample.c
@@ -0,0 +1,236 @@
+
+/* A trivial filter that logs all email to a file. */
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#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 */
+
--- sendmail-8.14.4.orig/debian/examples/milter/strl.h
+++ sendmail-8.14.4/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 */
+/*-------------------------------------------------------------------*/
+
+#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));
+
--- sendmail-8.14.4.orig/debian/examples/network/if-down.d/sendmail.1.old
+++ sendmail-8.14.4/debian/examples/network/if-down.d/sendmail.1.old
@@ -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
+#
+# 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;
--- sendmail-8.14.4.orig/debian/examples/network/if-down.d/sendmail.in
+++ sendmail-8.14.4/debian/examples/network/if-down.d/sendmail.in
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# This script is called when a network device goes down.
+#
+# Here is where we'll stop sendmail if needed
+#
+# Written By Richard Nelson
+#
+# 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
+#
+
+# These variables are for the use of the scripts run by run-parts
+#IFACE=;
+#IF_ADDRESS=;
+#IF_PROVIDER=;
+
+if [ ! -z "$IFACE" ]; then
+ addr=$IF_ADDRESS;
+ provider=$IF_PROVIDER;
+ iface=$IFACE;
+else
+ addr=$1;
+ provider=$2;
+ iface=$3;
+ fi;
+
+if [ -z "$provider" ]; then
+ exit 0;
+ fi;
+
+# Bring in some script functions to handle dynamic configuration
+. @datadir@/sendmail/dynamic;
+
+# Note the interface that just changed
+update_interface "$iface" "STOP";
+
+# If anything has been changed, update sendmail.cf and reload
+update_sendmail "ifupdown";
+
+exit 0;
--- sendmail-8.14.4.orig/debian/examples/network/if-down.d/sendmail.md5sum
+++ sendmail-8.14.4/debian/examples/network/if-down.d/sendmail.md5sum
@@ -0,0 +1 @@
+fb749db92b73eca0480702c59f6b09ed sendmail
--- sendmail-8.14.4.orig/debian/examples/network/if-post-down.d/sendmail
+++ sendmail-8.14.4/debian/examples/network/if-post-down.d/sendmail
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# This script is called when a network device goes down.
+#
+# Here is where we'll stop sendmail if needed
+#
+# Written By Richard Nelson
+#
+# 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
+#
+
+# These variables are for the use of the scripts run by run-parts
+#IFACE=;
+#IF_ADDRESS=;
+#IF_PROVIDER=;
+
+if [ ! -z "$IFACE" ]; then
+ addr=$IF_ADDRESS;
+ provider=$IF_PROVIDER;
+ iface=$IFACE;
+else
+ addr=$1;
+ provider=$2;
+ iface=$3;
+ fi;
+
+if [ -z "$provider" ]; then
+ exit 0;
+ fi;
+
+# Bring in some script functions to handle dynamic configuration
+. /usr/share/sendmail/dynamic;
+
+# Note the interface that just changed
+update_interface "$iface" "STOP";
+
+# If anything has been changed, update sendmail.cf and reload
+update_sendmail "ifupdown";
+
+exit 0;
--- sendmail-8.14.4.orig/debian/examples/network/if-post-down.d/sendmail.1.old
+++ sendmail-8.14.4/debian/examples/network/if-post-down.d/sendmail.1.old
@@ -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
+#
+# 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;
--- sendmail-8.14.4.orig/debian/examples/network/if-post-down.d/sendmail.in
+++ sendmail-8.14.4/debian/examples/network/if-post-down.d/sendmail.in
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# This script is called when a network device goes down.
+#
+# Here is where we'll stop sendmail if needed
+#
+# Written By Richard Nelson
+#
+# 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
+#
+
+# These variables are for the use of the scripts run by run-parts
+#IFACE=;
+#IF_ADDRESS=;
+#IF_PROVIDER=;
+
+if [ ! -z "$IFACE" ]; then
+ addr=$IF_ADDRESS;
+ provider=$IF_PROVIDER;
+ iface=$IFACE;
+else
+ addr=$1;
+ provider=$2;
+ iface=$3;
+ fi;
+
+if [ -z "$provider" ]; then
+ exit 0;
+ fi;
+
+# Bring in some script functions to handle dynamic configuration
+. @datadir@/sendmail/dynamic;
+
+# Note the interface that just changed
+update_interface "$iface" "STOP";
+
+# If anything has been changed, update sendmail.cf and reload
+update_sendmail "ifupdown";
+
+exit 0;
--- sendmail-8.14.4.orig/debian/examples/network/if-post-down.d/sendmail.md5sum
+++ sendmail-8.14.4/debian/examples/network/if-post-down.d/sendmail.md5sum
@@ -0,0 +1 @@
+fb749db92b73eca0480702c59f6b09ed sendmail
--- sendmail-8.14.4.orig/debian/examples/network/if-up.d/sendmail.1.old
+++ sendmail-8.14.4/debian/examples/network/if-up.d/sendmail.1.old
@@ -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
+#
+# 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 &
--- sendmail-8.14.4.orig/debian/examples/network/if-up.d/sendmail.in
+++ sendmail-8.14.4/debian/examples/network/if-up.d/sendmail.in
@@ -0,0 +1,63 @@
+#!/bin/sh
+#
+# This script is called when a network device comes up.
+#
+# Here is where we'll start sendmail if needed.
+#
+# Written By Richard Nelson
+#
+# 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 to use a 'provider ' tag in /etc/network/interfaces
+# it will be used as the name of a file in /etc/mail/peers
+# If you don't use provider, we'll use DNS_DOMAIN, or lacking that,
+# the first entry in DNS_SEARCH
+#
+
+
+# These variables are for the use of the scripts run by run-parts
+#IFACE=; <-- ifupdown
+#IF_ADDRESS=; <-- ifupdown
+#IF_PROVIDER=; <-- sendmail specific
+#IF_DNS_DOMAIN=; <-- resolvconf
+#IF_DNS_SEARCH=; <-- resolvconf
+
+if [ ! -z "$IFACE" ]; then
+ addr=$IF_ADDRESS;
+ if [ -n "$IF_PROVIDER" ]; then
+ provider="$IF_PROVIDER";
+ elif [ -n "$IF_DNS_DOMAIN" ]; then
+ provider="$IF_DNS_DOMAIN";
+ elif [ -n "$IF_DNS_SEARCH" ]; then
+ provider=$(echo "$IF_DNS_SEARCH" | /usr/bin/cut -d' ' -f 1);
+ fi;
+ iface=$IFACE;
+else
+ addr=$1;
+ provider=$2;
+ iface=$3;
+ fi;
+
+# Bring in some script functions to handle dynamic configuration
+. @datadir@/sendmail/dynamic;
+
+# Note the interface that just changed
+update_interface "$iface" "BOUND";
+
+# If the domain name has changed, update the provider information
+if [ -n "$provider" ]; then
+ update_provider "$provider";
+ fi;
+
+# If the ip address has changed, update the host information
+if [ -n "$addr" ]; then
+ update_host "$addr";
+ fi;
+
+# If anything has been changed, update sendmail.cf and reload
+update_sendmail "ifupdown";
+
+exit 0;
+
--- sendmail-8.14.4.orig/debian/examples/network/if-up.d/sendmail.md5sum
+++ sendmail-8.14.4/debian/examples/network/if-up.d/sendmail.md5sum
@@ -0,0 +1 @@
+2b0ad0f52c1c7562311b6a4f49340072 sendmail
--- sendmail-8.14.4.orig/debian/examples/pam.d/smtp
+++ sendmail-8.14.4/debian/examples/pam.d/smtp
@@ -0,0 +1,15 @@
+#%PAM-1.0
+#------------------------------------------------------------------------
+#
+# /etc/pam.d/smtp
+#
+# Copyright (c) 2000-2003 Richard Nelson. All Rights Reserved.
+# Version: 2.0.1
+# Time-stamp: <2003/05/06 12:00:00 cowboy>
+#
+# PAM configuration file used by SASL to authenticate a PLAIN password.
+#
+#------------------------------------------------------------------------
+@include common-auth
+@include common-account
+#@include common-password
--- sendmail-8.14.4.orig/debian/examples/pam.d/smtp.md5sum
+++ sendmail-8.14.4/debian/examples/pam.d/smtp.md5sum
@@ -0,0 +1 @@
+44980f7978afc8051a84b3414e628613 smtp
--- sendmail-8.14.4.orig/debian/examples/ppp/ip-down.d/sendmail.1.old
+++ sendmail-8.14.4/debian/examples/ppp/ip-down.d/sendmail.1.old
@@ -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
+#
+# 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;
--- sendmail-8.14.4.orig/debian/examples/ppp/ip-down.d/sendmail.in
+++ sendmail-8.14.4/debian/examples/ppp/ip-down.d/sendmail.in
@@ -0,0 +1,47 @@
+#!/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
+#
+# 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
+#
+
+# 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;
+ iface=$PPP_IFACE;
+else
+ addr=$1;
+ provider=$2;
+ iface=$3;
+ fi;
+
+if [ -z "$provider" ]; then
+ exit 0;
+ fi;
+
+# Bring in some script functions to handle dynamic configuration
+. @datadir@/sendmail/dynamic;
+
+# Note the interface that just changed
+update_interface "$iface" "STOP";
+
+# If anything has been changed, update sendmail.cf and reload
+# Actually, we'll delay the reload because we'll be hit in a moment
+# to handle the change by /etc/network/if-up.d/sendmail
+update_sendmail "ppp" Delayed;
+
+exit 0;
--- sendmail-8.14.4.orig/debian/examples/ppp/ip-down.d/sendmail.md5sum
+++ sendmail-8.14.4/debian/examples/ppp/ip-down.d/sendmail.md5sum
@@ -0,0 +1 @@
+fb749db92b73eca0480702c59f6b09ed sendmail
--- sendmail-8.14.4.orig/debian/examples/ppp/ip-up.d/sendmail.1.old
+++ sendmail-8.14.4/debian/examples/ppp/ip-up.d/sendmail.1.old
@@ -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
+#
+# 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 &
--- sendmail-8.14.4.orig/debian/examples/ppp/ip-up.d/sendmail.in
+++ sendmail-8.14.4/debian/examples/ppp/ip-up.d/sendmail.in
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# This script is called when ppp connects to the network.
+#
+# Here is where we'll start sendmail if needed.
+#
+# Written By Richard Nelson
+#
+# 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
+#
+
+# 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;
+ iface=$PPP_IFACE;
+else
+ addr=$1;
+ provider=$2;
+ iface=$3;
+ fi;
+
+if [ -z "$provider" ]; then
+ exit 0;
+ fi;
+
+# Bring in some script functions to handle dynamic configuration
+. @datadir@/sendmail/dynamic;
+
+# Note the interface that just changed
+update_interface "$iface" "BOUND";
+
+# If the domain name has changed, update the provider information
+update_provider "$provider";
+
+# If the ip address has changed, update the host information
+update_host "$addr";
+
+# If anything has been changed, update sendmail.cf and reload
+update_sendmail "ppp";
+
+exit 0;
+
--- sendmail-8.14.4.orig/debian/examples/ppp/ip-up.d/sendmail.md5sum
+++ sendmail-8.14.4/debian/examples/ppp/ip-up.d/sendmail.md5sum
@@ -0,0 +1 @@
+2b0ad0f52c1c7562311b6a4f49340072 sendmail
--- sendmail-8.14.4.orig/debian/examples/resolvconf/update-libc.d/sendmail.in
+++ sendmail-8.14.4/debian/examples/resolvconf/update-libc.d/sendmail.in
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# Make sendmail aware of changes to resolv.conf
+# so that we can reset the statistics for unresolvable hostnames
+
+# Bring in some script functions to handle dynamic configuration
+. /usr/share/sendmail/dynamic;
+
+# Note the interface that just changed - unfortunately, we know not how :(
+update_resolv;
+
+# If anything has been changed, update sendmail.cf and reload
+update_sendmail;
--- sendmail-8.14.4.orig/debian/examples/sasl/Sendmail.conf.1
+++ sendmail-8.14.4/debian/examples/sasl/Sendmail.conf.1
@@ -0,0 +1,20 @@
+#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.
+#
+auto_transition: true
+#pwcheck_method: sasldb
+#pwcheck_method: saslauthd
+#pwcheck_method: PAM
+pwcheck_method: PAM
--- sendmail-8.14.4.orig/debian/examples/sasl/Sendmail.conf.2
+++ sendmail-8.14.4/debian/examples/sasl/Sendmail.conf.2
@@ -0,0 +1,28 @@
+#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: saslauthd
+#
+# If you need plain text, the following converts plain to more secure
+# and allow plaintext from pam/ldap/etc
+#auto_transition: true
+#pwcheck_method: auxprop saslauthd
+#auxprop_plugin: sasldb
+#
+# How paranoid are you ?
+allowanonymouslogin: 0
+allowplaintext: 1
+mech_list: EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
+
--- sendmail-8.14.4.orig/debian/examples/sasl/sasl.m4.in
+++ sendmail-8.14.4/debian/examples/sasl/sasl.m4.in
@@ -0,0 +1,81 @@
+divert(-1)dnl
+#-----------------------------------------------------------------------------
+# $Sendmail: sasl.m4,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Copyright (c) 2003-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# @configure_input@
+#
+# sasl.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/sasl/sasl.m4')dnl'
+#
+#-----------------------------------------------------------------------------
+#
+divert(0)dnl
+VERSIONID(`$Id: sasl.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 #---------------------------------------------------------------------
+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 #---------------------------------------------------------------------
+ifelse(eval(sm_version_math >= 526848), `1', `dnl
+ifelse(sm_enable_auth, `yes', `dnl
+dnl #
+dnl # Set a more reasonable timeout on negotiation
+dnl #
+define(`confTO_AUTH', `2m')dnl # , def=10m
+dnl #
+dnl # Do not touch anything above this line...
+dnl #
+dnl # Available Authentication methods
+dnl #
+define(`confAUTH_MECHANISMS',dnl
+`DIGEST-MD5 CRAM-MD5 PLAIN LOGIN')dnl
+dnl #
+dnl # These, we will trust for relaying
+dnl #
+TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 PLAIN LOGIN')
+dnl #
+dnl # for 8.12.0+, add EXTERNAL as an available & trusted mech (w/STARTTLS)
+dnl # and allow sharing of /etc/sasldb(2) file, allow group read/write
+dnl #
+ifelse(eval(sm_version_math >= 527360), `1', `dnl
+define(`confAUTH_MECHANISMS',dnl
+`EXTERNAL 'defn(`confAUTH_MECHANISMS'))dnl
+TRUST_AUTH_MECH(`EXTERNAL')
+define(`confDONT_BLAME_SENDMAIL',dnl
+defn(`confDONT_BLAME_SENDMAIL')`,GroupReadableSASLDBFile,GroupWritableSASLDBFile')dnl
+')dnl
+dnl #
+dnl # To support SMTP AUTH in `sendmail -bs' :
+dnl # Sigh: SASLV1 MSP AUTH does not work in -bs mode (/etc/sasldb !o+r)
+dnl # so, we have the MSP not use Auth (or ETRN)
+dnl # SASLV2 (w/saslauth) chose to prohibit user authentication - it can
+dnl # be made to work by:
+dnl # 1) changing /etc/sasldb2 {root,sasl,smmta}:smmsp 0660
+dnl # 2) dpkg-statoverride --remove /var/run/saslauthd
+dnl # 3) dpkg-statoverride --add root sasl 711 /var/run/saslauthd
+dnl #
+ifelse(eval(sm_auth_lib < 2), `1', `dnl
+ifdef(`DEBIAN_MSP', `dnl
+ifelse(defn(`_DPO_'), `', `dnl
+DAEMON_OPTIONS(`Name=NoMTA, Addr=0.0.0.0, M=EA')dnl
+')')')dnl
+dnl #
+dnl # Define the REALM passed to sasl (8.13.0+)
+ifelse(eval(sm_version_math >= 527616), `1', `dnl
+dnl define(`confAUTH_REALM', `')dnl # Fill this in and uncomment it
+')dnl
+dnl #
+dnl # Do not touch anything below this line...
+')')dnl
--- sendmail-8.14.4.orig/debian/examples/sasl/saslpasswd.conf.1
+++ sendmail-8.14.4/debian/examples/sasl/saslpasswd.conf.1
@@ -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.
+#
+auto_transition: true
+pwcheck_method: sasldb
--- sendmail-8.14.4.orig/debian/examples/sasl/saslpasswd.conf.2
+++ sendmail-8.14.4/debian/examples/sasl/saslpasswd.conf.2
@@ -0,0 +1,21 @@
+#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.
+#
+#auto_transition: true
+pwcheck_method: saslauthd
+#auxprop_plugin: sasldb
+allowanonymouslogin: 0
+allowplaintext: 1
+mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5
--- sendmail-8.14.4.orig/debian/examples/tls/starttls.m4.in
+++ sendmail-8.14.4/debian/examples/tls/starttls.m4.in
@@ -0,0 +1,64 @@
+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 # To support shared keyfiles, we need it to be group readable
+dnl #
+define(`confDONT_BLAME_SENDMAIL',dnl
+ defn(`confDONT_BLAME_SENDMAIL')`,GroupReadableKeyFile')dnl
+dnl #
+dnl # Set a more reasonable timeout on negotiation
+dnl #
+define(`confTO_STARTTLS', `2m')dnl # , def=10m
+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 # DH parameters
+define(`confDH_PARAMETERS',`@sysconfdir@/mail/tls/sendmail-common.prm')dnl
+dnl #
+dnl # Optional settings
+define(`confTLS_SRV_OPTIONS', `')dnl # do not request user certs
+dnl #
+dnl # Do not touch anything below this line...
+')')dnl
--- sendmail-8.14.4.orig/debian/faq.txt
+++ sendmail-8.14.4/debian/faq.txt
@@ -0,0 +1,3747 @@
+
+ Frequently Asked Questions
+
+Last updated April 3, 2007
+ _________________________________________________________________
+
+Top 5 - the most frequently asked questions about sendmail
+
+ 1. Local config error: see 4.5
+ 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.
+ * 1. COPYRIGHT NOTICE / REDISTRIBUTION REQUIREMENTS
+ * 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?
+ + 2.4 Where can I send comments, questions and bug reports?
+ + 2.5 Where can I ask email-related DNS questions?
+ + 2.6 How can I subscribe to these newsgroups?
+ + 2.7 Which version of sendmail should I run?
+ + 2.8 What is the latest release of sendmail?
+ + 2.9 Where can I find it?
+ + 2.10 What are the differences between Version 8 and other
+ versions?
+ + 2.11 What's the best platform for running sendmail?
+ + 2.12 What is BIND and where can I get the latest version?
+ + 2.13 What is smrsh and where can I get it?
+ + 2.14 What is smap and where can I get it?
+ + 2.15 What is TCP-Wrappers and where can I get it?
+ + 2.16 Why won't db 1.85 build on my machine?
+ + 2.17 What is makemap and where can I get it?
+ * 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 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 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?
+ + 3.9 deprecated
+ + 3.10 How do I solve "collect: I/O error on connection" or
+ "reply: read error from host.name" errors?
+ + 3.11 Why can't my users forward their mail to a program?
+ + 3.12 Why do connections to the SMTP port take such a long
+ time?
+ + 3.13 Why do I get "unknown mailer error 5 -- mail: options
+ MUST PRECEDE recipients" errors?
+ + 3.14 Why does version 8 sendmail panic my SunOS box?
+ + 3.15 Why does the Unix From line get mysteriously munged when
+ I send to an alias?
+ + 3.16 Why doesn't MASQUERADE_AS (or the user database) work
+ for envelope addresses as well as header addresses?
+ + 3.17 How do I run version 8 sendmail and support the MAIL11V3
+ protocol?
+ + 3.18 Why do messages disappear from my queue unsent?
+ + 3.19 When is sendmail going to support RFC 2047 MIME header
+ encoding?
+ + 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 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
+ /etc/mail/sendmail.pid?
+ + 3.25 Why can't I compile sendmail with Berkeley DB 2.X?
+ + 3.26 What operating systems has Berkeley sendmail been ported
+ to?
+ + 3.27 How do I prevent Relaying Denied errors for my clients?
+ + 3.28 Why isn't virtual hosting working, even after I added a
+ Kvirtuser line to sendmail.cf ?
+ + 3.29 How can I add a header specifying the actual recipient
+ when having multiple users in a virtual domain go to a single
+ mailbox?
+ + 3.30 What do I do when Build fails because groff was not
+ found?
+ + 3.31 What does "class hash not available" mean?
+ + 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?
+ * 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 instead of into /usr/spool/mail (or /usr/mail)?
+ + 4.4 Why does it deliver the mail interactively when I'm
+ trying to get it to go into queue only mode?
+ + 4.5 How can I solve "MX list for hostname points back to
+ hostname" and "config error: mail loops back to myself"
+ messages?
+ + 4.6 Why does my sendmail process sometimes hang when
+ connecting over a SLIP/PPP link?
+ + 4.7 How can I summarize the statistics generated by sendmail
+ in the syslog?
+ + 4.8 How can I check my sendmail.cf to ensure that it's
+ re-writing addresses correctly?
+ + 4.9 What is procmail, and where can I get it?
+ + 4.10 How can I solve "cannot alias non-local names" errors?
+ + 4.11 Is sendmail Year 2000 (Y2K) compliant?
+ + 4.12 How can I batch remote mail to be sent using my ISP
+ while delivering local mail immediately?
+ + 4.13 What does "unknown mailer error 1" mean?
+ + 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?
+ + 4.23 How do I restrict attachments with sendmail?
+ + 4.24 Can I get sendmail to verify an entire e-mail address
+ instead of just the domain?
+ * 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
+ bounds" errors?
+ o 5.1.2 How can I solve "line 445: bad ruleset 96 (50
+ max)" errors?
+ o 5.1.3 Why does version 8 sendmail (< 8.7.5) sometimes
+ hang under Solaris 2.5?
+ o 5.1.4 Why can't I use SunOS/Solaris to get email to
+ certain large sites?
+ o 5.1.5 Why do I have trouble compiling on Solaris?
+ o 5.1.6 How does 8.X compare to 8.X+Sun?
+ + 5.2 IBM AIX
+ o 5.2.1 The system resource controller always reports
+ sendmail as "inoperative". What's wrong?
+ 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
+ + 6.3 Reference material on subjects related to sendmail
+ + 6.4 World-wide web index pages on sendmail
+ + 6.5 World-wide web index pages Internet email in general
+ + 6.6 Online tutorials for sendmail
+ + 6.7 Online archives of mailing lists and Usenet newsgroups,
+ relating to Internet email
+ * 7. THANKS!
+
+ sendmail.org 1. COPYRIGHT NOTICE / REDISTRIBUTION REQUIREMENTS
+
+ 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
+ distribution media; and insertion into text retrieval systems), so
+ long as it is the latest version available at the time, all parts are
+ distributed together, and it is kept completely intact without
+ 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
+ sold to customers, all distribution media intact), or a percentage of
+ 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?
+ * 2.4 Where can I send comments, questions and bug reports?
+ * 2.5 Where can I ask email-related DNS questions?
+ * 2.6 How can I subscribe to these newsgroups?
+ * 2.7 Which version of sendmail should I run?
+ * 2.8 What is the latest release of sendmail?
+ * 2.9 Where can I find it?
+ * 2.10 What are the differences between Version 8 and other
+ versions?
+ * 2.11 What's the best platform for running sendmail?
+ * 2.12 What is BIND and where can I get the latest version?
+ * 2.13 What is smrsh and where can I get it?
+ * 2.14 What is smap and where can I get it?
+ * 2.15 What is TCP-Wrappers and where can I get it?
+ * 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
+ author (Eric Allman) is continuing development on a particular version
+ 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...
+ before you post your question publicly, since the answer will likely
+ be very highly dependent on what software and hardware you have. You
+ also don't want to embarrass yourself publicly, nor do you want to
+ annoy the kinds of people who are likely to be the counterparts of
+ 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
+ in the comp.mail hierarchy that more closely matches the particular
+ program you want to ask a question about. For example, the SMTP MTA
+ known as Smail has comp.mail.smail dedicated to it. The Mail User
+ Agent (MUA) Eudora has two newsgroups dedicated to it
+ (comp.mail.eudora.mac and comp.mail.eudora.ms-windows), depending on
+ which hardware platform you use. If there isn't a more appropriate
+ newsgroup, try comp.mail.misc. Again, make sure your question isn't
+ 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
+ plague previous versions, as well as having many new features that
+ 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
+ would require to unseat it as the de facto standard program for
+ sending Internet mail. Obviously, this forum should not be used to
+ discuss the merits of any of the alternative programs versus sendmail.
+ These kinds of discussions should be taken to comp.mail.misc, or you
+ should agitate to get a new newsgroup or newsgroup hierarchy created
+ 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
+ of the additional development is being concentrated. Version 8
+ 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 -- Where can I send comments, questions and bug reports?
+
+ Date: April 26, 2006
+
+ First, please refer to our E-mail Addresses page
+ (http://www.sendmail.org/misc/email-addresses.php), which has a more
+ complete answer.
+
+ Next, if you have a question about sendmail, then please post it to
+ the Usenet group comp.mail.sendmail. This newsgroup is dedicated to
+ sendmail. Please make sure you check the usual resources before
+ posting and follow the netiquette. Also, if you do not have access to
+ an NNTP server, you might want to use Google Groups.
+
+ Finally, e-mail addresses to contact sendmail.org are (do not send
+ questions about sendmail to these addresses, see above instead;
+ replace YYYY with the current year, e.g., 2006, in all of these
+ addresses):
+ * < sendmail-YYYY (at) support.sendmail.org > for contributing
+ patches, feature requests, and general comments but not questions
+ how to use, install, or configure sendmail;
+ * < sendmail-bugs-YYYY (at) support.sendmail.org > to report
+ implementation bugs;
+ * < sendmail-faq-YYYY (at) support.sendmail.org > only for comments
+ / questions about the FAQ. Please mark your mail clearly with
+ "FAQ: item" where item is the entry in the faq to which you are
+ referring. If it is a general comment about the FAQ, use "FAQ:
+ general", if it is an addition, use "FAQ: new".
+ * < sendmail-security-YYYY (at) support.sendmail.org > (use this
+ only to report security related bugs or problems in sendmail).
+ Please do not use this to ask about problems with your
+ configuration, including how to stop spam, how to set up your own
+ certificate authority, how to make sendmail work with S/MIME, etc.
+ All such questions should be asked in comp.mail.sendmail. Also,
+ please do not tell us that you were able to forge mail by using
+ telnet to connect to port 25; this is fundamental to the Internet
+ design for SMTP, and not a sendmail bug. Please use PGP for
+ encryption to send mail to this address.
+ * < sendmail-mirror-YYYY (at) support.sendmail.org > for updates
+ about a mirror (e.g., a new mirror or an address change).
+ * < webmaster-YYYY (at) support.sendmail.org > for comments about
+ the website.
+
+ Note: remove all spaces in those addresses and replace "(at)" with "@"
+ (without the quotes).
+
+ 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.
+
+ Also, please don't send HTML or graphics; plain text is sufficient.
+ _________________________________________________________________
+
+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: 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
+ the vendor-supplied version of sendmail (assuming it's secure,
+ according to the CERT Alerts and Summaries). Just set the machine up
+ to forward all outbound mail to a central mail relay, and then worry
+ about making that central mail relay the best it can be. Also arrange
+ 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.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
+ and a sendmail.cf file (that may need a bit of tweaking), but not much
+ 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
+ 8.8.8 with a sendmail.cf that is only slightly tweaked. More
+ 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: April 3, 2007
+
+ For version 8 sendmail, there are six release trees.
+
+ For those people who, for whatever reason, are unable or unwilling to
+ upgrade to version 8.14.x, releases of versions 8.13, 8.12, 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; the last release
+ of 8.12 was 8.12.11; the last release of 8.13 was 8.13.8 .
+
+ Version 8.14.1 was released on April 3, 2007.
+ Version 8.14.0 was released on January 31, 2007.
+ Version 8.13.8 was released on August 9, 2006.
+ Version 8.13.7 was released on June 14, 2006.
+ Version 8.13.6 was released on March 22, 2006.
+ Version 8.13.5 was released on September 16, 2005.
+ Version 8.13.4 was released on March 27, 2005.
+ Version 8.13.3 was released on January 11, 2005.
+ Version 8.13.2 was released on December 15, 2004.
+ Version 8.13.1 was released on July 30, 2004.
+ Version 8.13.0 was released on June 20, 2004.
+ Version 8.12.11 was released on January 18, 2004.
+ Version 8.12.10 was released on September 17, 2003.
+ Version 8.12.9 was released on March 29, 2003.
+ 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.14.1 or plan on upgrading in the
+ immediate future. 8.14.1 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 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
+ sendmail is the software, then a recent version of BSD Unix would
+ probably be best, since sendmail was developed at UC Berkeley on BSD
+ Unix. FreeBSD and BSD/OS are two known implementations of BSD Unix for
+ 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
+ BSD/OS Home Page at http://www.bsdi.com/. For more information on
+ 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
+ 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
+ arbitrary programs which are not necessarily known to be sufficiently
+ 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. 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. 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
+ buggy and an easy mark for system crackers to exploit, although with
+ the advent of version 8 sendmail, this becomes much more difficult).
+ In contrast, smap and smapd are very small (only a few hundred lines
+ long), and relatively easy to verify as being correct and functioning
+ as designed (however, as you will see later, we can question their
+ 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,
+ etc...), you first run the connection attempt through a package that
+ checks to see if the IP address of the source packet is coming from a
+ host known to be either good or bad (you may filter connection
+ attempts by source host name, domain name, raw IP address, port they
+ 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,
+ Junkmailers, and Other Undesirables. However, it only works for
+ programs that communicate via TCP packets (not UDP, such as NFS)
+ started up out of inetd. It does not work for RPC-based services, and
+ programs that start up a daemon outside of inetd and just leave 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.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.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,
+ so that you get the best of both worlds. However, this isn't as
+ smoothly integrated as it should be, is not for the faint-of-heart,
+ 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.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
+ ./db.1.85/PORT/irix.5.3 to this same directory. Make sure you extract
+ this archive into the same directory where you extracted the db 1.85
+ archive as available from ftp.cs.berkeley.edu. (see Q3.5 for more
+ 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
+ ftp://ftp.his.com/pub/brad/sendmail/hp-ux.10.20.tar.gz. This will
+ extract into ./db.1.85/PORT/hpux.10.20, so make sure you extract this
+ 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,
+ and presumably will continue to be as newer releases come out).
+ 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 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 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?
+ * 3.9 (deprecated)
+ * 3.10 How do I solve "collect: I/O error on connection" or "reply:
+ read error from host.name" errors?
+ * 3.11 Why can't my users forward their mail to a program?
+ * 3.12 Why do connections to the SMTP port take such a long time?
+ * 3.13 Why do I get "unknown mailer error 5 -- mail: options MUST
+ PRECEDE recipients" errors?
+ * 3.14 Why does version 8 sendmail panic my SunOS box?
+ * 3.15 Why does the Unix From line get mysteriously munged when I
+ send to an alias?
+ * 3.16 Why doesn't MASQUERADE_AS (or the user database) work for
+ envelope addresses as well as header addresses?
+ * 3.17 How do I run version 8 sendmail and support the MAIL11V3
+ protocol?
+ * 3.18 Why do messages disappear from my queue unsent?
+ * 3.19 When is sendmail going to support RFC 2047 MIME header
+ encoding?
+ * 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 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
+ /etc/mail/sendmail.pid on Solaris 2.x?
+ * 3.25 Why can't I compile sendmail with Berkeley DB 2.X?
+ * 3.26 What operating systems has Berkeley sendmail been ported to?
+ * 3.27 How do I prevent Relaying Denied errors for my clients?
+ * 3.28 Why isn't virtual hosting working, even after I added a
+ Kvirtuser line to sendmail.cf ?
+ * 3.29 How can I add a header specifying the actual recipient when
+ having multiple users in a virtual domain go to a single mailbox?
+ * 3.30 What do I do when Build fails because groff was not found?
+ * 3.31 What does "class hash not available" mean?
+ * 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
+ 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
+ Updated: April 7, 2004
+
+ 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.
+ Moreover, at institutions with high turnover (such as universities), a
+ given name may refer to different people at different times, which can
+ again lead to mail going to the wrong person.
+
+ 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
+ should get to him. But if another Allman ever
+ appears, this address could suddenly become ambiguous. He's been the
+ 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.6 -- has been deprecated.
+ _________________________________________________________________
+
+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 -- has been deprecated.
+ _________________________________________________________________
+
+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: 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.
+
+ 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
+ performance or security reasons; although users have directories,
+ 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 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
+ (see RFC 1413 for detail). If the connecting host does not support
+ 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
+ running your own server, make certain that all the servers listed in
+ 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
+ Unix From line [sometimes incorrectly referred to as the From-space
+ "header"] on Unix mail or as the Return-Path: header) so that
+ downstream errors are properly returned to the mailing list owner
+ instead of to the sender. In order to make this appear as sensible as
+ possible to end users, I recommend making the owner point to a
+ "request" address -- for example:
+ list: :include:/path/name/list.list
+ owner-list: list-request
+ list-request: eric
+
+ 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/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
+ Qf to get them out of the way and make it easy for you to find. The
+ usual cause of this is twofold: first, you have the queue directory
+ world writable (which is probably a mistake -- this opens up other
+ 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_
+ necessarily the same as used to encode the body (which is already
+ encoded in MIME in the charset parameter of the Content-Type:
+ header). Furthermore, it is perfectly reasonable for, say, a Swede
+ to be living and working in Korea, or a Russian living and working
+ in Germany, and want their name to be encoded in their native
+ 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
+ detect whether you're on a machine that is known to have this kind of
+ TCP/IP networking problem, and make sure that sendmail does not
+ attempt to use IDENT. If you've since patched your machine so that it
+ 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
+ Updated: January 14, 2004
+
+ 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 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). 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
+
+ And starting with 8.12, changes to submit.cf are required as well; the
+ following in your submit.mc can minimize the problem:
+define(`confDIRECT_SUBMISSION_MODIFIERS', `C')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
+ sendmail and they queue all mail for your domain (as opposed to
+ stuffing it all in one file that you need to download via POP3 or some
+ such), the command
+ etrn.pl mail.myisp.com mydomain.com
+
+ 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
+ telnet mail.myisp.com. 25 << __EOF__
+ EHLO me.mydomain.com
+ ETRN mydomain.com
+ QUIT
+ __EOF__
+
+ 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
+BSD-OS BSD43 CLIX CSOS
+ConvexOS Dell DomainOS Dynix
+EWS-UX_V FreeBSD HP-UX IRIX
+ISC KSR LUNA Linux
+Mach386 NCR.MP-RAS NEWS-OS NeXT
+NetBSD NonStop-UX OSF1 OpenBSD
+PTX Paragon PowerUX RISCos
+SCO SINIX SMP_DC.OSx.NILE Solaris
+SVR4 SunOS Titan ULTRIX
+UMAX UNICOS UNIX_SV.4.x.i386
+UX4800 UXPDS Utah dgux
+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: 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 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
+ Fixed typo: October 10, 2003
+ Updated URL: April 6, 2004
+
+ 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
+ messages for individual users.
+ 1. Use FEATURE(local_procmail) in your .mc file so procmail (which
+ you must install separately) will deliver mail to the mailbox.
+ 2. Use FEATURE(virtusertable) to create a virtual user table entry
+ 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
+
+:0f
+* ENV_TO ?? .
+| formail -i "X-Envelope-To: $ENV_TO@$DOMAIN"
+
+:0fE
+| formail -i "X-Envelope-To: UNKNOWN"
+ This will insert an X-Envelope-To header with the original
+ 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
+ far.
+ 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
+
+ /etc/aliases contains the general majordomo aliases:
+# Majordomo
+majordomo: "|/usr/local/lib/majordomo/wrapper majordomo"
+owner-majordomo: postmaster
+majordomo-owner: postmaster
+
+ /etc/majordomo.aliases contains the majordomo lists of the form:
+wookie: "|/usr/local/lib/majordomo/wrapper resend -l wookie wookie-list"
+wookie-list: :include:/usr/local/lib/majordomo/lists/wookie
+owner-wookie: head-wookie
+wookie-approval: owner-wookie
+wookie-request: "|/usr/local/lib/majordomo/wrapper majordomo -l wookie"
+
+ The various directory owners/groups/permissions:
+drwxr-xr-x 20 root root 1024 Dec 1 15:20 /
+drwxr-xr-x 25 root root 3072 Jan 26 01:26 /etc
+drwxr-xr-x 20 root root 1024 Feb 4 1998 /usr
+drwxr-xr-x 18 root root 1024 Jan 16 18:40 /usr/local
+drwxr-xr-x 5 root root 1024 Feb 6 1996 /usr/local/lib
+lrwxrwxrwx 1 root root 16 Dec 1 10:01 /usr/local/lib/majordomo
+ -> majordomo-1.94.4
+drwxr-x--x 5 majordom majordom 1024 Jan 25 23:12 /usr/local/lib/majordomo
+-1.94.4
+drwxr-xr-x 2 majordom majordom 32768 Jan 26 00:49 /usr/local/lib/majordomo
+-1.94.4/lists
+-rw-rw-r-- 1 majordom majordom 655 Nov 3 17:03 /usr/local/lib/majordomo
+-1.94.4/lists/wookie
+-rw-rw---- 1 majordom majordom 14588 Jan 19 10:28 /usr/local/lib/majordomo
+-1.94.4/lists/wookie.config
+-rw-rw-r-- 1 majordom majordom 23 Jan 14 1997 /usr/local/lib/majordomo
+-1.94.4/lists/wookie.info
+
+ 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). 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.
+ 4. /usr/local/lib/majordomo/lists is mode 0755, owner majordom, group
+ majordom.
+ 5. The permissions/owners for the lists should be as shown above.
+ 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
+ directories and files to determine if can have been trusted. For
+ sendmail to run without complaining, you MUST execute the following
+ command:
+ chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue
+ chown root / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue
+
+ You will probably have to tweak this for your environment (for
+ example, some systems put the spool directory into /usr/spool instead
+ of /var/spool and use /etc/mail for aliases file instead of /etc). If
+ you set the RunAsUser option in your sendmail.cf, the
+ /var/spool/mqueue directory will have to be owned by the RunAsUser
+ user. As a general rule, after you have compiled sendmail, run the
+ command
+ sendmail -v -bi
+
+ to initialize the alias database. If it gives messages such as
+ WARNING: writable directory /etc
+ WARNING: writable directory /usr/spool/mqueue
+
+ 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
+ directory paths (directory paths which are group or world writable)
+ will no longer be allowed. This would mean that if user joe's home
+ directory was writable by group staff, sendmail would not use his
+ .forward file. This behavior can be altered, at the expense of system
+ security, by setting the DontBlameSendmail option. For example, to
+ allow .forward files in group writable directories:
+ O DontBlameSendmail=forwardfileingroupwritabledirpath
+
+ Or to allow them in both group and world writable directories:
+ O DontBlameSendmail=forwardfileinunsafedirpath
+
+ Items from these unsafe .forward and :include: files will be marked as
+ unsafe addresses -- the items can not be deliveries to files or
+ programs. This behavior can also be altered via DontBlameSendmail:
+ O DontBlameSendmail=forwardfileinunsafedirpath,
+ forwardfileinunsafedirpathsafe
+
+ 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
+ Updated: January 10, 2004
+
+ The port used for outgoing SMTP connections can be changed via the
+ respective *_MAILER_ARGS macros for the various SMTP mailers. In a
+ default configuration, sendmail uses either the relay mailer (for e.g.
+ SMART_HOST when no mailer is specified) or the esmtp mailer (when
+ sending directly to the MX of the recipient domain).
+
+ So, if you want all outgoing SMTP connections to use port 2525, you
+ can use this in your .mc file:
+ define(`RELAY_MAILER_ARGS', `TCP $h 2525')
+ define(`ESMTP_MAILER_ARGS', `TCP $h 2525')
+
+ If you want to use an alternate port only for specific destinations,
+ change (e.g.) only the RELAY_MAILER_ARGS, and make sure the relay
+ mailer is not used for anything else. E.g. you can have sendmail use
+ port 2525 only when sending to your domain with this in your .mc file:
+ FEATURE(`mailertable')
+ define(`confRELAY_MAILER', `esmtp')
+ define(`RELAY_MAILER_ARGS', `TCP $h 2525')
+
+ and then in your mailertable:
+ yourdomain.com relay:mail.yourdomain.com
+
+ This will force sendmail to use port 2525 for connections to
+ yourdomain.com. 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
+ Updated: October 19, 2005
+
+ 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 some or all of the following
+ lines to your .mc file:
+FEATURE(`no_default_msa')dnl
+DAEMON_OPTIONS(`NAME=NoMTA4, Family=inet, Addr=127.0.0.1')dnl
+DAEMON_OPTIONS(`Name=MSA4, Family=inet, Addr=127.0.0.1, Port=587, M=E')dnl
+DAEMON_OPTIONS(`NAME=NoMTA6, Family=inet6, Addr=::1')dnl
+DAEMON_OPTIONS(`Name=MSA6, Family=inet6, Addr=::1, Port=587, M=E')dnl
+
+ Use the FEATURE line regardless, then if your machine has IPv4
+ addresses configured, use the first two DAEMON_OPTIONS lines;
+ likewise, use the second two DAEMON_OPTIONS lines if it has IPv6
+ addresses configured, and all four 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
+ instead of into /usr/spool/mail (or /usr/mail)?
+ * 4.4 Why does it deliver the mail interactively when I'm trying to
+ get it to go into queue only mode?
+ * 4.5 How can I solve "MX list for hostname points back to hostname"
+ and "config error: mail loops back to myself" messages?
+ * 4.6 Why does my sendmail process sometimes hang when connecting
+ over a SLIP/PPP link?
+ * 4.7 How can I summarize the statistics generated by sendmail in
+ the syslog?
+ * 4.8 How can I check my sendmail.cf to ensure that it's re-writing
+ addresses correctly?
+ * 4.9 What is procmail, and where can I get it?
+ * 4.10 How can I solve "cannot alias non-local names" errors?
+ * 4.11 Is sendmail Year-2000 (Y2K) compliant?
+ * 4.12 How can I batch remote mail to be sent using my ISP while
+ delivering local mail immediately?
+ * 4.13 What does "unknown mailer error 1" mean?
+ * 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?
+ * 4.23 How do restrict attachments with sendmail?
+ * 4.24 Can I get sendmail to verify an entire e-mail address instead
+ of just the domain?
+ _________________________________________________________________
+
+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
+ not.real.domain.your.domain will get dumped on you, and you may even
+ 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, 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
+ under 5.001a or later. Make sure to check out the web interface for
+ Majordomo called LWGate at
+ http://www.netspace.org/users/dwb/lwgate.html. The latest versions of
+ 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
+ new program that does this local delivery. One program that is capable
+ 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
+ "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: 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 ... Local configuration error
+
+ How can I solve this problem?
+
+ 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/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
+ configuration, not just this one):
+ 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
+ Updated: May, 2006
+
+ 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).
+
+ To see what else is available today, check the Comprehensive 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:
+ If you've ever written a perl script to parse sendmail
+ log files looking for errors, MEWS might be of interest to
+ you. If you've ever thought about writing a perl script to
+ munge sendmail log files, cringed a little and hurriedly
+ came up with an excuse not to do it, read on.
+
+ If you don't have a Solaris 2.5 machine, you can probably
+ stop reading here.
+
+ The Mail Early Warning System (MEWS) gives postmasters
+ immediate notification of trouble spots on your mail
+ backbone. It only works with sendmail.
+
+ To explain it in a nutshell, whenever sendmail returns a
+ 4xx or 5xx SMTP code, with the MEWS modifications, it also
+ sends the code over UDP to a daemon which then replays the
+ error message to interested parties. The man pages go into
+ a little bit more detail.
+
+ 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: 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
+> /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
+ you're likely to run into, and has a whole host of features. It is
+ typically about 30% faster performing the job of the local mailer than
+ programs such as /bin/mail or /usr/bin/mail, it has been hammered on
+ widely to make it extremely secure (much more so than most local
+ 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
+ process your mail before the messages get put into your mailbox, and
+ for that feature alone, it is one of the most important tools any
+ 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
+ of those other programs, but SmartList has more than a few adherents
+ 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
+
+ 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
+ Updated: May 19, 2004
+
+ 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.
+
+ Andrzej Filip offers a different solution based on use of the dsmtp
+ mailer (introduced in 8.10) instead of expensive mailers.
+ _________________________________________________________________
+
+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
+ sendmail invokes for message delivery, as specified on an M line in
+ sendmail.cf, must exit with code 0 (success), or one of the failure
+ codes noted in src/sysexits.h. These generally run in the range 64 -
+ 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
+ Updated: May 19, 2004
+
+ Situation: Your system mailserver.my.domain should act as a backup
+ mailserver for mailserver.destination.domain. The client wants to
+ receive mail for the address user@destination.domain. This requires:
+ 1. MX Records:
+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.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
+ 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!
+ If you want finer-grained control, then instead of updating
+ /etc/mail/relay-domains, add the following to /etc/mail/access, as
+ the access map entries allows relaying only "To:" a domain, while
+ relay-domains allows both directions.
+To:destination.domain RELAY
+ 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,
+ Netscape, Eudora and Pine. Some specialized packages (metamail, some
+ 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.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.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
+> 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 will bounce
+ instead of being delivered to . 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
+ Updated: August 16, 2004
+
+ 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 7,8,9 /usr/lib/mail
+ Solaris 10 /etc/mail/cf
+ 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.
+ _________________________________________________________________
+
+Subject: Q4.23 -- How do I restrict attachments with sendmail?
+
+ Date: May 19, 2004
+
+ sendmail itself does not look at the content of a message, so it is
+ not in a position to strip attachments. You need a filtering package
+ that works with sendmail. You might want to look at www.milter.org for
+ some open source solutions that use our "milter" facility. There's
+ also something called MIMEDefang that can do it. You can also get
+ commercial products to do it (see www.sendmail.com for example).
+ _________________________________________________________________
+
+Subject: Q4.24 -- Can I get sendmail to verify an entire e-mail address instead
+of just the domain?
+
+ Date: May 19, 2004
+
+ If the e-mail comes from example.com, you have to look up the MX or A
+ records for example.com to figure out which mail server to ask if the
+ user is valid. The DNS could be slow or unresponsive. The remote
+ server could be slow or unresponsive.
+
+ If you were to make such checks, a bad guy could bombard you with mail
+ claiming to come from hotmail.com users, and then suddenly you would
+ be connection-bombing Hotmail's mail servers asking them about the
+ recipients the bad guy is claiming to be.
+
+ The only safe way to do this is to verify that the sender exists when
+ the sender claims to be in your domain. Naturally you are then in a
+ position to confirm or deny the sender is valid.
+
+
+ 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?
+ + 5.1.2 How can I solve "line 445: bad ruleset 96 (50 max)"
+ errors?
+ + 5.1.3 Why does version 8 sendmail (< 8.7.5) sometimes hang
+ under Solaris 2.5?
+ + 5.1.4 Why can't I use SunOS/Solaris to get email to certain
+ large sites?
+ + 5.1.5 Why do I have trouble compiling on Solaris?
+ + 5.1.6 How does 8.X compare to 8.X+Sun?
+ * 5.2 IBM AIX
+ + 5.2.1 The system resource controller always reports sendmail
+ as "inoperative". What's wrong?
+ + 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
+
+ the line in question reads:
+ 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
+ Sendmail Version 8", in the contrib directory (file
+ "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
+ have been created to stop and re-start the sendmail processes, etc....
+ Make sure that you've switched everything over to using the new
+ sendmail. To keep this problem from ever happening again, try the
+ following (make sure you're logged in as root):
+ mv /usr/lib/sendmail /usr/lib/sendmail.old
+ ln -s /usr/local/lib/sendmail.v8 /usr/lib/sendmail
+ mv /usr/lib/sendmail.mx /usr/lib/sendmail.mx.old
+ ln -s /usr/local/lib/sendmail.v8 /usr/lib/sendmail.mx
+ chmod 0000 /usr/lib/sendmail.old
+ chmod 0000 /usr/lib/sendmail.mx.old
+
+ 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,
+ but it typically gives you much more up-to-date code to help you
+ resist attacks to your systems, more capable programs to be used for
+ 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 "-bD"
+ startsrc -s sendmail -a "-bd -q30m"
+ # your sendmail args may vary
+
+ 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
+ * 6.4 World-wide web index pages on sendmail
+ * 6.5 World-wide web index pages Internet email in general
+ * 6.6 Online tutorials for sendmail
+ * 6.7 Online archives of mailing lists and Usenet newsgroups,
+ relating to Internet email
+ _________________________________________________________________
+
+Q6 -- Additional information sources
+
+ Date: April 8, 1997
+ 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
+ RFC 1807 "ID" field, and in lieu of information to the contrary
+ indicating what the actual publishers have registered, I have assigned
+ my own, independent, "third-party" IDs. Hopefully, the bibliographic
+ 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:: July 19, 2002
+ TITLE:: Sendmail Installation and Operation Guide
+ AUTHOR:: Allman, Eric
+ AUTHOR:: Shapiro, Gregory
+ AUTHOR:: Aßmann, Claus
+ CONTACT::
+ DATE:: July 20, 2002
+ PAGES:: 100
+ RETRIEVAL:: Contents of manual is in doc/op/op.ps of sendmail source
+ archive
+ 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. 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
+ ENTRY:: March 23, 1996
+ REVISION:: April 8, 1997; Updated entire entry re: 2nd Ed.
+ TYPE:: Reference book, hardcopy
+ TITLE:: sendmail
+ AUTHOR:: Costales, Bryan
+ AUTHOR:: Allman, Eric
+ CONTACT:: Bryan Costales
+ O'Reilly & Associates, Inc.
+ 103 Morris Street, Suite A
+ 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, 1997
+ PAGES:: 1021
+ COPYRIGHT:: Copyright (c) 1997 O'Reilly & Associates, Inc. All rights
+ reserved.
+ LANGUAGE:: English
+ 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
+ ENTRY:: March 23, 1996
+ TYPE:: Reference book, hardcopy
+ REVISION:: Sep 9, 1996; fixed typo
+ TITLE:: Sendmail: Theory and Practice
+ AUTHOR:: Avolio, Frederick M.
+ AUTHOR:: Vixie, Paul A.
+ CONTACT:: Fred Avolio , Paul Vixie
+ Digital Press
+ 225 Wildwood Avenue
+ Woburn, MA 01801, USA
+ Ordering Info: voice 1 800 366 2665
+ fax 1 800 446 6520
+ DATE:: 1994
+ PAGES:: 262
+ COPYRIGHT:: Copyright (c) by 1995 Butterworth-Heinemann
+ LANGUAGE:: English
+ 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
+ very valuable things, but then likely put on a shelf and not read or
+ reference again (unless you have to write up a bibliographic entry for
+ it). Makes a better introduction to sendmail for management types,
+ 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
+ ENTRY:: April 14, 1999
+ REVISION::
+ TYPE:: Pocket size reference, hardcopy
+ TITLE:: sendmail Desktop Reference
+ AUTHOR:: Costales, Bryan
+ AUTHOR:: Allman, Eric
+ CONTACT:: Bryan Costales
+ O'Reilly & Associates, Inc.
+ 103 Morris Street, Suite A
+ 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:: June, 1997
+ PAGES:: 68
+ COPYRIGHT:: Copyright (c) 1997 O'Reilly & Associates, Inc. All rights
+ reserved.
+ LANGUAGE:: English
+ 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
+ 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
+ ID:: sendmail-faq//book/ISBN/0-13-151051-7
+ ENTRY:: March 23, 1996
+ TYPE:: Reference book, hardcopy
+ REVISION:: May 23, 1996; Updated abstract.
+ TITLE:: Unix System Administration Handbook, Second Edition
+ AUTHOR:: Nemeth, Evi
+ AUTHOR:: Snyder, Garth
+ AUTHOR:: Seebass, Scott
+ AUTHOR:: Hein, Trent R.
+ CONTACT::
+ Prentice-Hall, Inc.
+ Upper Saddle River, New Jersey 07458
+ DATE:: January, 1995
+ PAGES:: 780
+ COPYRIGHT:: Copyright (c) 1995 by Prentice Hall PTR
+ LANGUAGE:: English
+ 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
+ ENTRY:: March 23, 1996
+ TYPE:: Reference book, hardcopy
+ REVISION:: March 27, 1996; Changed ID format to include ISBN,
+ moved URL to NOTES field from OTHER_ACCESS field,
+ also updated ABSTRACT
+ REVISION:: March 29, 1996; Updated ID, PAGES, COPYRIGHT, and ABSTRACT
+ TITLE:: Practical Internetworking With TCP/IP and UNIX
+ AUTHOR:: Carl-Mitchell, Smoot
+ AUTHOR:: Quarterman, John S.
+ CONTACT::
+ Addison Wesley Publishing Company
+ Computer Science & Engineering Division
+ One Jacob Way
+ Reading, MA 01867
+ USA
+ Orders: voice://800-822-6339 (USA)
+ fax://617-942-1117
+ DATE:: 1993
+ PAGES:: 476
+ COPYRIGHT:: Copyright (c) 1993 by Addison-Wesley Publishing
+ Company, Inc.
+ LANGUAGE:: English
+ NOTES:: See URL:http://heg-school.aw.com/cseng/authors/mitchell/
+ 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),
+ but rather dated in the face of books devoted to the topic and all the
+ recent development activity in the sendmail community. Forget about
+ 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
+ Information Services_ by Liu, et. al., _DNS and BIND_ by Albitz and
+ Liu, _Unix System Administration_ by Nemeth, et. al., and last, but
+ 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:: July 20, 2002
+ TITLE:: TCP/IP Network Administration 3rd Edition
+ AUTHOR:: Hunt, Craig
+ CONTACT:: O'Reilly & Associates, Inc.
+ 1005 Gravenstein Highway North
+ Sebastapol, CA 95472
+ 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/tcp3/
+
+ ABSTRACT::
+
+ 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
+ ID:: sendmail-faq//book/ISBN/1-56592-512-2
+ ENTRY:: April 14, 1999
+ TYPE:: Reference book, hardcopy
+ REVISION:: April 14, 1999; Updated entire entry for 3rd Ed.
+ TITLE:: DNS and BIND 3rd Edition
+ AUTHOR:: Albitz, Paul
+ AUTHOR:: Liu, Cricket
+ CONTACT:: O'Reilly & Associates, Inc.
+ 103 Morris Street, Suite A
+ Order by phone: 800-998-9938 (US/Canada inquiries)
+ 800-889-8969 (US/Canada credit card orders)
+ 707-829-0515 (local/overseas)
+ DATE:: September, 1998
+ PAGES:: 502
+ COPYRIGHT:: Copyright (c) 1998 O'Reilly & Associates, Inc. All rights
+ reserved.
+ LANGUAGE:: English
+ 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
+ ENTRY:: April 8, 1997
+ TYPE:: Reference book, hardcopy
+ TITLE:: Using & Managing UUCP
+ AUTHOR:: Ravin, Ed
+ AUTHOR:: O'Reilly, Tim
+ AUTHOR:: Dougherty, Dale
+ AUTHOR:: Todino, Grace
+ CONTACT:: O'Reilly & Associates, Inc.
+ 103 Morris Street, Suite A
+ Order by phone: 800-998-9938 (US/Canada inquiries)
+ 800-889-8969 (US/Canada credit card orders)
+ 707-829-0515 (local/overseas)
+ DATE:: September, 1996
+ PAGES:: 424
+ LANGUAGE:: English
+ 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
+ ID:: sendmail-faq//online/index/10
+ ENTRY:: March 23, 1996
+ TYPE:: Online sendmail index
+ REVISION:: April 14, 1999; updated to sendmail.org address
+ TITLE:: sendmail FAQ Support Page
+ AUTHOR:: Beck, John
+ CONTACT:: John Beck
+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
+ ENTRY:: March 25, 1996
+ TYPE:: Online sendmail index
+ REVISION:: April 14, 1999; updated to sendmail.org address
+ TITLE:: comp.mail.sendmail Most Frequently Asked Questions Support Page
+ AUTHOR:: Aßmann, Claus
+ CONTACT:: Claus Aßmann
+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
+ ENTRY:: November 24, 1996
+ TITLE:: IICONS Sendmail Resources
+ AUTHOR:: Caloca, Paul
+ CONTACT:: Paul Caloca
+ COPYRIGHT:: Copyright (c) 1996 Paul Caloca. All Rights Reserved.
+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
+ ID:: sendmail-faq//online/index/12
+ ENTRY:: March 23, 1996
+ TYPE:: Online general Internet email index
+ REVISION:: March 27, 1996; moved URL from RETRIEVAL field to
+ OTHER_ACCESS field.
+ TITLE:: Internet Mail Consortium web site
+ CORP-AUTHOR:: Internet Mail Consortium
+ CONTACT::
+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
+ ENTRY:: March 23, 1996
+ TYPE:: Online general Internet email index
+ REVISION:: August 20, 1996; Updated URL.
+ TITLE:: Email References
+ AUTHOR:: Wohler, Bill
+ CONTACT:: Bill Wohler
+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
+ ENTRY:: March 23, 1996
+ TYPE:: Online general Internet email index
+ REVISION:: June 28, 1996; Added acronym for SMTPRD
+ TITLE:: SMTP Resources Directory (SMTPRD)
+ AUTHOR:: Salamon, Andras
+ AUTHOR:: Knowles, Brad
+ CONTACT:: Andras Salamon
+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
+ ENTRY:: March 23, 1996
+ TYPE:: Online general Internet email index
+ REVISION:: March 27, 1996; moved URL from RETRIEVAL field to
+ OTHER_ACCESS field.
+ TITLE:: E-Mail Web Resources
+ AUTHOR:: Wall, Matt
+ CONTACT:: Matt Wall
+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
+ ID:: sendmail-faq//online/tutorial/9
+ ENTRY:: March 23, 1996
+ TYPE:: Online sendmail tutorial
+ REVISION:: March 27, 1996; moved URL from RETRIEVAL field to
+ OTHER_ACCESS field.
+ REVISION:: August 29, 1998; updated URL.
+ TITLE:: Sendmail V8: A (Smoother) Engine Powers Network Email
+ AUTHOR:: Reich, Richard
+ CONTACT:: Richard Reich
+ DATE:: February 8, 1996
+ COPYRIGHT:: Copyright (c) 1995 The McGraw-Hill Companies, Inc.
+ All Rights Reserved.
+OTHER_ACCESS:: URL:http://www.networkcomputing.com/unixworld/tutorial/
+ 008/008.txt.html
+ LANGUAGE:: English
+ 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
+ ENTRY:: March 23, 1996
+ TYPE:: Online sendmail tutorial
+ REVISION:: March 27, 1996; moved URL from RETRIEVAL field to
+ OTHER_ACCESS field.
+ TITLE:: Sendmail -- Care and Feeding
+ AUTHOR:: Quinton, Reg
+ CONTACT:: Reg Quinton
+ Computing and Communications Services
+ The University of Western Ontario
+ London, Ontario N6A 5B7
+ Canada
+ DATE:: March 24, 1992
+OTHER_ACCESS:: URL:ftp://ftp.sterling.com/mail/sendmail/uwo-course/
+ sendmail.txt.Z
+ LANGUAGE:: English
+ NOTES:: Postscript version also available. See ftp://ftp.sterling.com/
+ 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
+ ENTRY:: March 27, 1996
+ TYPE:: Online sendmail tutorial
+ REVISION:: August 29, 1998; updated URL.
+ TITLE:: Explosion in a Punctuation Factory
+ AUTHOR:: Bryan Costales
+ CONTACT:: Becca Thomas
+ DATE:: January 1994
+ COPYRIGHT:: Copyright (c) 1995 The McGraw-Hill Companies, Inc.
+ All Rights Reserved.
+OTHER_ACCESS:: URL:http://www.networkcomputing.com/unixworld/tutorial/
+ 01/01.txt.html
+ 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
+
+ BIB-VERSION:: CS-TR-v2.1
+ ID:: sendmail-faq//online/archive/18
+ ENTRY:: March 25, 1996
+ TYPE:: Online Usenet newgroup archive
+ REVISION:: March 27, 1996; moved URL from RETRIEVAL field to
+ OTHER_ACCESS field.
+ TITLE:: DejaNews
+OTHER_ACCESS:: URL:http://www.dejanews.com
+ LANGUAGE:: English
+ 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
+ ENTRY:: March 25, 1996
+ TYPE:: Online Usenet newgroup archive
+ REVISION:: March 27, 1996; moved URL from RETRIEVAL field to
+ OTHER_ACCESS field.
+ TITLE:: AltaVista
+OTHER_ACCESS:: URL:http://www.altavista.digital.com
+ LANGUAGE:: English
+ 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 16, 2001
+ TYPE:: Online Usenet newgroup archive
+ REVISION::
+ TITLE:: Google Advance Search
+OTHER_ACCESS:: URL:http://www.google.com/advanced_search
+ LANGUAGE:: English
+
+ ABSTRACT::
+
+ 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
+ wouldn't even be a FAQ. Heck, there might not even be an Internet.
+ Paul Southworth Provides FAQ posting services, useful comments on
+ various sections, and the mailclient-faq. I couldn't have kept doing
+ 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,
+ Alain Durand, Walter Schweizer, Christophe Wolfhugel, Al Gilman,
+ Valdis Kletnieks, John Gardiner Myers, Paul DuBois, Adam Bentley, Dave
+ 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.
+
--- sendmail-8.14.4.orig/debian/libmilter-dev.README.Debian
+++ sendmail-8.14.4/debian/libmilter-dev.README.Debian
@@ -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-doc (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
--- sendmail-8.14.4.orig/debian/local/Makefile.in
+++ sendmail-8.14.4/debian/local/Makefile.in
@@ -0,0 +1,769 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = local
+DIST_COMMON = $(dist_man_MANS) $(dist_pkgdata_SCRIPTS) \
+ $(dist_sbin_SCRIPTS) $(nobase_dist_data_DATA) \
+ $(nobase_dist_sysconf_DATA) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/Parse_conf.pm.in \
+ $(srcdir)/Parse_mc.pm.in $(srcdir)/dynamic.in \
+ $(srcdir)/parse_mc.in $(srcdir)/sendmail.in \
+ $(srcdir)/sendmailconfig.in $(srcdir)/update_auth.in \
+ $(srcdir)/update_authm4.in $(srcdir)/update_conf.in \
+ $(srcdir)/update_db.in $(srcdir)/update_ldap.in \
+ $(srcdir)/update_mc.in $(srcdir)/update_mk.in \
+ $(srcdir)/update_smrsh.in $(srcdir)/update_sys.in \
+ $(srcdir)/update_tls.in $(srcdir)/update_tlsm4.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/./build/mkinstalldirs
+CONFIG_CLEAN_FILES = Parse_conf.pm Parse_mc.pm dynamic parse_mc \
+ sendmailconfig sendmail update_auth update_authm4 update_conf \
+ update_db update_ldap update_mc update_mk update_smrsh \
+ update_sys update_tls update_tlsm4
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(sbindir)" \
+ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(datadir)" \
+ "$(DESTDIR)$(sysconfdir)"
+SCRIPTS = $(dist_pkgdata_SCRIPTS) $(dist_sbin_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(dist_man_MANS)
+DATA = $(nobase_dist_data_DATA) $(nobase_dist_sysconf_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEBIAN = @DEBIAN@
+DEBIAN_DH = @DEBIAN_DH@
+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@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SM_CPYRT = @SM_CPYRT@
+SM_DATE = @SM_DATE@
+SM_MAXVERS = @SM_MAXVERS@
+SM_MINVERS = @SM_MINVERS@
+SM_VERS = @SM_VERS@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_version = @ac_version@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+am_version = @am_version@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+buildtree = @buildtree@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sm_auth_lib = @sm_auth_lib@
+sm_badepends = @sm_badepends@
+sm_build_arch = @sm_build_arch@
+sm_custom = @sm_custom@
+sm_custom_s = @sm_custom_s@
+sm_databases = @sm_databases@
+sm_date = @sm_date@
+sm_depends = @sm_depends@
+sm_dist_name = @sm_dist_name@
+sm_dist_vers = @sm_dist_vers@
+sm_editmap_envdef = @sm_editmap_envdef@
+sm_editmap_libs = @sm_editmap_libs@
+sm_enable_auth = @sm_enable_auth@
+sm_enable_bind = @sm_enable_bind@
+sm_enable_hesiod = @sm_enable_hesiod@
+sm_enable_ipv6 = @sm_enable_ipv6@
+sm_enable_ldap = @sm_enable_ldap@
+sm_enable_maillock = @sm_enable_maillock@
+sm_enable_milter = @sm_enable_milter@
+sm_enable_ndbm = @sm_enable_ndbm@
+sm_enable_newdb = @sm_enable_newdb@
+sm_enable_nis = @sm_enable_nis@
+sm_enable_nisplus = @sm_enable_nisplus@
+sm_enable_regex = @sm_enable_regex@
+sm_enable_sfio = @sm_enable_sfio@
+sm_enable_shm = @sm_enable_shm@
+sm_enable_tcpd = @sm_enable_tcpd@
+sm_enable_tls = @sm_enable_tls@
+sm_envdef = @sm_envdef@
+sm_features = @sm_features@
+sm_ffr = @sm_ffr@
+sm_hesiod_parms = @sm_hesiod_parms@
+sm_host_arch = @sm_host_arch@
+sm_incdirs = @sm_incdirs@
+sm_ldap_lib = @sm_ldap_lib@
+sm_libmilter_envdef = @sm_libmilter_envdef@
+sm_libmilter_libs = @sm_libmilter_libs@
+sm_libmilter_version = @sm_libmilter_version@
+sm_libs = @sm_libs@
+sm_libsm_envdef = @sm_libsm_envdef@
+sm_libsm_libs = @sm_libsm_libs@
+sm_libsmdb_envdef = @sm_libsmdb_envdef@
+sm_libsmdb_libs = @sm_libsmdb_libs@
+sm_libsmutil_envdef = @sm_libsmutil_envdef@
+sm_libsmutil_libs = @sm_libsmutil_libs@
+sm_m4_ffr = @sm_m4_ffr@
+sm_mail_local_envdef = @sm_mail_local_envdef@
+sm_mail_local_libs = @sm_mail_local_libs@
+sm_mailstats_envdef = @sm_mailstats_envdef@
+sm_mailstats_libs = @sm_mailstats_libs@
+sm_makemap_envdef = @sm_makemap_envdef@
+sm_makemap_libs = @sm_makemap_libs@
+sm_mapdef = @sm_mapdef@
+sm_newdb_lib = @sm_newdb_lib@
+sm_praliases_envdef = @sm_praliases_envdef@
+sm_praliases_libs = @sm_praliases_libs@
+sm_recommends = @sm_recommends@
+sm_revision = @sm_revision@
+sm_rmail_envdef = @sm_rmail_envdef@
+sm_rmail_libs = @sm_rmail_libs@
+sm_sendmail_envdef = @sm_sendmail_envdef@
+sm_sendmail_libs = @sm_sendmail_libs@
+sm_smrsh_envdef = @sm_smrsh_envdef@
+sm_smrsh_libs = @sm_smrsh_libs@
+sm_suggests = @sm_suggests@
+sm_time = @sm_time@
+sm_utc = @sm_utc@
+sm_vacation_envdef = @sm_vacation_envdef@
+sm_vacation_libs = @sm_vacation_libs@
+sm_version = @sm_version@
+sm_version_beta = @sm_version_beta@
+sm_version_major = @sm_version_major@
+sm_version_math = @sm_version_math@
+sm_version_minor = @sm_version_minor@
+sm_version_r = @sm_version_r@
+sm_version_v = @sm_version_v@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+#!/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 @sm_date@ @sm_time@ (@sm_utc@)
+#------------------------------------------------------------------------------
+#
+# Shipped programs
+#
+nobase_dist_data_DATA = \
+ bug/sendmail/control \
+ bug/sendmail/script
+
+dist_pkgdata_SCRIPTS = \
+ Parse_conf.pm \
+ Parse_mc.pm \
+ dynamic \
+ parse_mc \
+ sendmail \
+ update_auth update_authm4 \
+ update_conf \
+ update_db \
+ update_ldap \
+ update_mc \
+ update_mk \
+ update_notices \
+ update_sendmail \
+ update_smrsh \
+ update_sys \
+ update_tcpd \
+ update_tls update_tlsm4
+
+dist_sbin_SCRIPTS = \
+ sendmailconfig
+
+#
+# Shipped manpages
+#
+dist_man_MANS = \
+ runq.sendmail.8 \
+ sendmailconfig.8
+
+#
+# Shipped data
+#
+nobase_dist_sysconf_DATA = \
+ mail/service.switch \
+ mail/service.switch-nodns \
+ mail/peers/provider
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu local/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu local/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+Parse_conf.pm: $(top_builddir)/config.status $(srcdir)/Parse_conf.pm.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+Parse_mc.pm: $(top_builddir)/config.status $(srcdir)/Parse_mc.pm.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+dynamic: $(top_builddir)/config.status $(srcdir)/dynamic.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+parse_mc: $(top_builddir)/config.status $(srcdir)/parse_mc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+sendmailconfig: $(top_builddir)/config.status $(srcdir)/sendmailconfig.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+sendmail: $(top_builddir)/config.status $(srcdir)/sendmail.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+update_auth: $(top_builddir)/config.status $(srcdir)/update_auth.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+update_authm4: $(top_builddir)/config.status $(srcdir)/update_authm4.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+update_conf: $(top_builddir)/config.status $(srcdir)/update_conf.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+update_db: $(top_builddir)/config.status $(srcdir)/update_db.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+update_ldap: $(top_builddir)/config.status $(srcdir)/update_ldap.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+update_mc: $(top_builddir)/config.status $(srcdir)/update_mc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+update_mk: $(top_builddir)/config.status $(srcdir)/update_mk.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+update_smrsh: $(top_builddir)/config.status $(srcdir)/update_smrsh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+update_sys: $(top_builddir)/config.status $(srcdir)/update_sys.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+update_tls: $(top_builddir)/config.status $(srcdir)/update_tls.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+update_tlsm4: $(top_builddir)/config.status $(srcdir)/update_tlsm4.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-dist_pkgdataSCRIPTS: $(dist_pkgdata_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
+ @list='$(dist_pkgdata_SCRIPTS)'; test -n "$(pkgdatadir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(pkgdatadir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(pkgdatadir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-dist_pkgdataSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_pkgdata_SCRIPTS)'; test -n "$(pkgdatadir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files
+install-dist_sbinSCRIPTS: $(dist_sbin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(dist_sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-dist_sbinSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+install-man8: $(dist_man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list=''; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list=''; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+install-nobase_dist_dataDATA: $(nobase_dist_data_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(datadir)" || $(MKDIR_P) "$(DESTDIR)$(datadir)"
+ @list='$(nobase_dist_data_DATA)'; test -n "$(datadir)" || list=; \
+ $(am__nobase_list) | while read dir files; do \
+ xfiles=; for file in $$files; do \
+ if test -f "$$file"; then xfiles="$$xfiles $$file"; \
+ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
+ test -z "$$xfiles" || { \
+ test "x$$dir" = x. || { \
+ echo "$(MKDIR_P) '$(DESTDIR)$(datadir)/$$dir'"; \
+ $(MKDIR_P) "$(DESTDIR)$(datadir)/$$dir"; }; \
+ echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(datadir)/$$dir'"; \
+ $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(datadir)/$$dir" || exit $$?; }; \
+ done
+
+uninstall-nobase_dist_dataDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nobase_dist_data_DATA)'; test -n "$(datadir)" || list=; \
+ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(datadir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(datadir)" && rm -f $$files
+install-nobase_dist_sysconfDATA: $(nobase_dist_sysconf_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)"
+ @list='$(nobase_dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
+ $(am__nobase_list) | while read dir files; do \
+ xfiles=; for file in $$files; do \
+ if test -f "$$file"; then xfiles="$$xfiles $$file"; \
+ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
+ test -z "$$xfiles" || { \
+ test "x$$dir" = x. || { \
+ echo "$(MKDIR_P) '$(DESTDIR)$(sysconfdir)/$$dir'"; \
+ $(MKDIR_P) "$(DESTDIR)$(sysconfdir)/$$dir"; }; \
+ echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(sysconfdir)/$$dir'"; \
+ $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(sysconfdir)/$$dir" || exit $$?; }; \
+ done
+
+uninstall-nobase_dist_sysconfDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nobase_dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
+ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sysconfdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sysconfdir)" && rm -f $$files
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS) $(MANS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(datadir)" "$(DESTDIR)$(sysconfdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-dist_pkgdataSCRIPTS install-man \
+ install-nobase_dist_dataDATA
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-dist_sbinSCRIPTS \
+ install-nobase_dist_sysconfDATA
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-dist_pkgdataSCRIPTS uninstall-dist_sbinSCRIPTS \
+ uninstall-man uninstall-nobase_dist_dataDATA \
+ uninstall-nobase_dist_sysconfDATA
+
+uninstall-man: uninstall-man8
+
+.MAKE: install-am install-data-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-data-hook install-dist_pkgdataSCRIPTS \
+ install-dist_sbinSCRIPTS install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-man8 \
+ install-nobase_dist_dataDATA install-nobase_dist_sysconfDATA \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
+ uninstall-dist_pkgdataSCRIPTS uninstall-dist_sbinSCRIPTS \
+ uninstall-man uninstall-man8 uninstall-nobase_dist_dataDATA \
+ uninstall-nobase_dist_sysconfDATA
+
+#
+# Local customisation... not automake friendly (should all be SCRIPTS) :(
+#
+install-data-hook:
+ rm -rf ${DESTDIR}${datadir}/bug/sendmail
+ ${LN_S} sendmail ${DESTDIR}${pkgdatadir}/hoststat;
+ ${LN_S} sendmail ${DESTDIR}${pkgdatadir}/mailstats;
+ ${LN_S} sendmail ${DESTDIR}${pkgdatadir}/mailq;
+ ${LN_S} sendmail ${DESTDIR}${pkgdatadir}/newaliases;
+ ${LN_S} sendmail ${DESTDIR}${pkgdatadir}/purgestat;
+ ${LN_S} sendmail ${DESTDIR}${pkgdatadir}/runq;
+ ${LN_S} sendmail ${DESTDIR}${pkgdatadir}/status;
+#
+# Debian targets, phase out
+#
+.PHONY: build-indep build-arch
+.PHONY: install-indep install-arch
+build-indep:
+build-arch:
+install-indep: install
+install-arch:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
--- sendmail-8.14.4.orig/debian/local/Parse_conf.pm.in
+++ sendmail-8.14.4/debian/local/Parse_conf.pm.in
@@ -0,0 +1,970 @@
+#!/usr/bin/perl -w
+#------------------------------------------------------------------------
+#
+# $Sendmail: Parse_conf.pm,v @sm_version@ @sm_date@ @sm_time@ cowboy Exp $
+#
+# Parse and update /etc/mail/sendmail.conf
+#
+# Copyright (c) 2001-@SM_CPYRT@ Richard Nelson. All Rights Reserved.
+#
+# Notes (to all):
+#
+# Notes (to self):
+#
+#------------------------------------------------------------------------
+#
+# Package/Module declaration
+package Parse_conf;
+require Exporter;
+@ISA = qw(Exporter);
+#@EXPORT = qw(read_conf write_conf);
+@EXPORT_OK = qw(read_conf write_conf get_value);
+$VERSION = '2.0000';
+#
+# 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
+
+# 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: 1.00 $ ';
+$Parse_conf::program_name = 'Parse_conf.pm';
+$Parse_conf::program_version = '@sm_version@';
+$Parse_conf::program_date = '@sm_date@ @sm_time@ cowboy';
+$Parse_conf::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();
+
+$Parse_conf::Conffile = "@sysconfdir@/mail/sendmail.conf";
+my $debug;
+
+#
+#------------------------------------------------------------------------------
+# Global variables
+#------------------------------------------------------------------------------
+my %parm_def = (
+ 'DAEMON_NETMODE' => 'Static'
+ ,'DAEMON_NETIF' => 'eth0'
+ ,'DAEMON_MODE' => 'Daemon'
+ ,'DAEMON_RUNASUSER' => 'No'
+ ,'DAEMON_PARMS' => ''
+ ,'DAEMON_HOSTSTATS' => 'No'
+ ,'DAEMON_MAILSTATS' => 'No'
+ ,'QUEUE_MODE' => '${DAEMON_MODE}'
+ ,'QUEUE_INTERVAL' => '10m'
+ ,'QUEUE_PARMS' => ''
+ ,'MSP_MODE' => 'Cron'
+ ,'MSP_INTERVAL' => '20m'
+ ,'MSP_PARMS' => ''
+ ,'MSP_MAILSTATS' => '${DAEMON_MAILSTATS}'
+ ,'MISC_PARMS' => ''
+ ,'CRON_MAILTO' => 'root'
+ ,'CRON_PARMS' => ''
+ ,'HANDS_OFF' => 'No'
+ ,'LOG_CMDS' => 'No'
+ ,'AGE_DATA' => ''
+ );
+
+my %parameter = %parm_def;
+
+my %parm_kw = (
+ 'DAEMON_NETMODE' => ['static', 'dynamic']
+ ,'DAEMON_MODE' => ['daemon', 'inetd','none']
+ ,'QUEUE_MODE' => ['daemon', 'cron', 'none']
+ ,'MSP_MODE' => ['daemon', 'cron', 'none']
+ );
+
+my %parm_bool = (
+ 'HANDS_OFF' => 1
+ ,'DAEMON_RUNASUSER' => 1
+ ,'DAEMON_HOSTSTATS' => 1
+ ,'DAEMON_MAILSTATS' => 1
+ ,'MSP_MAILSTATS' => 1
+ ,'LOG_CMDS' => 1
+ );
+
+my %parm_dependant = (
+ );
+
+my %parm_deprecated = (
+ 'DAEMON_STATS' => 'DAEMON_MAILSTATS'
+ ,'MSP_STATS' => 'MSP_MAILSTATS'
+ );
+
+my %parm_hidden = (
+ 'DAEMON_RUNASUSER' => 1
+ ,'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
+ );
+
+#
+#------------------------------------------------------------------------------
+# Finally, some code (almost)
+#------------------------------------------------------------------------------
+1; # return (true);
+
+
+#
+#------------------------------------------------------------------------------
+# Read /etc/mail/sendmail.conf
+#------------------------------------------------------------------------------
+sub read_conf {
+ my ($input_file) = @_;
+ $input_file ||= $Parse_conf::Conffile;
+
+ $debug = $main::debug || $Parse_conf::debug;
+
+ # Update defaults according to current environment
+ &update_defaults;
+
+ # Read /etc/mail/sendmail.conf (if extant)
+ &read_config($input_file);
+
+ # Update old values to new format
+ &update_values;
+
+ # Make sure things are kosher
+ my $ok = &validate_config;
+ if (! $ok) {
+ die "Terminating due to configuration error.";
+ };
+ };
+
+#
+#------------------------------------------------------------------------------
+# [Re]write /etc/mail/sendmail.conf
+#------------------------------------------------------------------------------
+sub write_conf {
+ my ($output_file) = @_;
+
+ $debug = $main::debug || $Parse_conf::debug;
+
+ &write_config($output_file);
+ };
+
+#
+#------------------------------------------------------------------------
+# Update default settings according to current environment
+#------------------------------------------------------------------------
+sub update_defaults {
+ 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];
+ 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';
+ };
+
+ };
+
+#
+#------------------------------------------------------------------------
+# Update old settings according to current format
+#------------------------------------------------------------------------
+sub update_values {
+ my ($ok, $var);
+
+ # Add m(inutes) to {queue,msp}_interval if needed
+ $parameter{'QUEUE_INTERVAL'} =~ s/^(p?\d+)$/$1m/;
+ $parameter{'MSP_INTERVAL'} =~ s/^(p?\d+)$/$1m/;
+
+ # Also update the queue aging data
+ ($ok, $var) = &get_value('AGE_DATA');
+ my $tmpval = eval $var;
+ if ($@) {
+ warn $@;
+ }
+ else {
+ $var = $tmpval;
+ };
+ if (not defined $var) {
+ $tmpval = '""';
+ }
+ elsif (not ref $var) {
+ $tmpval = "$var";
+ }
+ elsif (@{$var} == 0) {
+ $tmpval = '""';
+ }
+ else {
+ $tmpval = '[';
+ foreach my $entry (@{$var}) {
+ foreach my $ndx ($[ .. $#{$entry}) {
+ @{$entry}[$ndx] =~ s/'/\\'/g;
+ };
+ @{$entry}[0] =~ s/^(\d+)$/$1m/;
+ $tmpval .= "['" . join("', '", @{$entry}) . "'],";
+ };
+ $tmpval .= ']';
+ $parameter{'AGE_DATA'} = $tmpval;
+ };
+
+ # Set any dependant fields here...
+ };
+
+#
+#------------------------------------------------------------------------
+# 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) = @_;
+ my $ok = 1;
+ my $value = '';
+ if ( ! exists($parameter{$name}) ) {
+ print STDERR "Variable $name not defined...\n";
+ return ($ok, $value);
+ };
+
+ $name = get_name($name, '');
+ $value = $parameter{$name};
+
+ my $tval = $value;
+ $tval =~ s/^\s*//;
+ 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 not deference $ref, it 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 = ucfirst($ltval); };
+ };
+ if ( ! $found ) {
+ $default += 1;
+ if ( $default > 1 ) {
+ print STDERR
+ "Can not 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 = ucfirst($ltval); }
+ else {
+ $default += 1;
+ if ( $default > 1 ) {
+ print STDERR
+ "Can not 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);
+ };
+
+#
+#------------------------------------------------------------------------
+# Read input configuration file (if no input, just use defaults)
+#------------------------------------------------------------------------
+sub read_config {
+ my ($input_file) = @_;
+ @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 () {
+ 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 (exists $parm_kw{$savename} or
+ exists $parm_bool{$savename}) {
+ $parmval = ucfirst($parmval);
+ };
+
+ 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 ($database_file) = @_;
+ my $ofh = new FileHandle;
+
+ # Make sure things are kosher
+ my $result = &validate_config;
+ if (! $result) {
+ die "Terminating due to configuration error.";
+ };
+
+ $database_file = $database_file || $Parse_conf::Conffile;
+ 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);
+
+ print STDOUT "Writing configuration to $database_file.\n";
+ $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 automagically generated -- edit at your own risk
+#####
+##### file: ${database_file}
+##### generated via: (${interp_pgm} ${interp_vrm})
+##### ${caller}
+##### ${Parse_conf::program_name} ${Parse_conf::program_version} ${Parse_conf::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";
+#------------------------------------------------------------------------------
+#
+# $database_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_NETMODE="$parm_def{'DAEMON_NETMODE'}"; Keyword SMTP network mode
+# static: Do not monitor any network interfaces for changes
+# dynamic: Monitor one or more interfaces for changes
+#
+DAEMON_NETMODE="$parameter{'DAEMON_NETMODE'}";
+#
+# DAEMON_NETIF="$parm_def{'DAEMON_NETIF'}"; string SMTP interface(s)
+# This parameter defines the network interface(s) that the daemon
+# will monitor for status changes (via ppp, dhcp, ifup/down hooks).
+#
+# NOTES:
+# 1) Only list more than one interfaces if they only used for fallback,
+# otherwise the daemon will wind up ping-ponging between interfaces.
+# 2) Do not use 'lo' unless your daemon only listens on the localhost.
+#
+DAEMON_NETIF="$parameter{'DAEMON_NETIF'}";
+#
+# 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: If you choose "none", mail will build up in the MSP queues
+# and you will not receive any mail from external sites.
+#
+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 {QUEUE,MISC,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)
+#
+QUEUE_MODE="$parameter{'QUEUE_MODE'}";
+#
+# QUEUE_INTERVAL="$parm_def{'QUEUE_INTERVAL'}"; Timespec (p?digits+w|d|h|m|s)
+# 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.
+#
+# NOTE: To use persistent queue-runners use this form: p120m
+#
+# NOTE: If you leave this field blank, You get *NO* queue runners !!!
+#
+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'}"; Timespec (digits+w|d|h|m|s)
+# 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. The MTA shouldn't be down that often
+# so this can be larger than QUEUE_INTERVAL.
+#
+# NOTE: If you leave this field blank, The MSP queue will *NOT* be run !!!
+#
+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'}";
+#
+#------------------------------------------------------------------------------
+# Other stuff
+# LOG_CMDS="$parm_def{'LOG_CMDS'}"; Binary command logging flag
+# Will cause syslog entries for many of the sendmail related commands
+# like runq, mailq, etc - you'll also see cron jobs (if enabled).
+#
+LOG_CMDS="$parameter{'LOG_CMDS'}";
+#
+# HANDS_OFF="$parm_def{'HANDS_OFF'}"; Binary Do *NOT* touch the configuration
+# Set this *ONLY* if you are going to be fully responsible for the entire
+# setup of sendmail - the directories, permissions, databases, etc. With
+# this variable set to "Yes", nothing will be done for you during updates.
+#
+# In other words, "The blood be upon your hands" if you set this...
+# My ability to help with problems will be greatly reduced !
+#
+# "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
+# http://www.dotcomeon.com/allman_sendmail_qa.html
+#
+HANDS_OFF="$parameter{'HANDS_OFF'}";
+#
+#------------------------------------------------------------------------------
+# 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.
+#
+# NOTE: some values just wont work, due to crontab pecularities
+# a value of 90 minutes will actually be run at every x:30 !
+# Please check /etc/cron.d/sendmail to make sure it is doing what
+# you thought it should !
+#
+# 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="[['25m', '', 'hourly', 'main']]";
+# Every 25 minutes, move any file older than 25 minutes from
+# /var/spool/mqueue/main to /var/spool/mqueue/hourly
+#
+# AGE_DATA="[['25m', '', 'hourly', 'main'],\\
+# ['120m', '', 'daily', 'hourly']]";
+# Same as the above, but also move files from the hourly queue
+# to the daily queue after 120 minutes in the hourly queue.
+#
+# AGE_DATA="[['25m',\\
+# '-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";
+#
+#------------------------------------------------------------------------------
+# Dependant variables (set according to other variables)
+#
+EOT
+ foreach my $key (sort keys %parm_dependant) {
+ 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";
+#
+#------------------------------------------------------------------------------
+# 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);
+ if ( $database_file eq $Parse_conf::Conffile ) {
+ chown '0', '0', "$database_file";
+ chmod 0644, "$database_file";
+ };
+ };
+
+__END__
--- sendmail-8.14.4.orig/debian/local/Parse_mc.pm.in
+++ sendmail-8.14.4/debian/local/Parse_mc.pm.in
@@ -0,0 +1,1086 @@
+#!/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!
+# * 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 format_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';
+$Parse_mc::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($<))[$[] || "Unknown!!";
+my $hostname = hostname();
+my $directory = getcwd();
+
+$Parse_mc::Conffile = "@sysconfdir@/mail/databases";
+$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 = (
+# ----------- Database defaults
+ 'MAIL_SETTINGS_DIR' =>
+ ['-','-',["${smdb_loc}"],'-']
+ ,'DATABASE_MAP_TYPE' =>
+ ["${smdb_type}",'-',['-'],'-']
+# ----------- General stuff
+ ,'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"],'-']
+# ----------- STARTTLS
+ ,'confTO_STARTTLS' =>
+ ['-','-',["2m"],'-']
+ ,'confCACERT' =>
+ ['-','-',["${smdb_loc}tls/sendmail-server.crt"],'-']
+ ,'confCACERT_PATH' =>
+ ['-','-',["@sysconfdir@/ssl/certs"],'-']
+ ,'confCRL' =>
+ ['-','-',[""],'-']
+ ,'confCLIENT_CERT' =>
+ ['-','-',["${smdb_loc}tls/sendmail-client.crt"],'-']
+ ,'confCLIENT_KEY' =>
+ ['-','-',["${smdb_loc}tls/sendmail-common.key"],'-']
+ ,'confSERVER_CERT' =>
+ ['-','-',["${smdb_loc}tls/sendmail-server.crt"],'-']
+ ,'confSERVER_KEY' =>
+ ['-','-',["${smdb_loc}tls/sendmail-common.key"],'-']
+ ,'confDH_PARAMETERS' =>
+ ['-','-',["${smdb_loc}tls/sendmail-common.prm"],'-']
+ ,'confTLS_SRV_OPTIONS' =>
+ ['-','-',["V"],'-']
+# ----------- SMTP AUTH (SASL)
+ ,'confTO_AUTH' =>
+ ['-','-',["2m"],'-']
+ ,'confAUTH_MECHANISMS' =>
+ ['-','-',["DIGEST-MD5 CRAM-MD5 NTLM LOGIN PLAIN"],"-"]
+ ,'TRUST_AUTH_MECH' =>
+ ['-','-',["DIGEST-MD5 CRAM-MD5 NTLM LOGIN PLAIN"],"-"]
+ ,'confAUTH_REALM' =>
+ ['-','-',[""],'-']
+ ,
+ );
+#
+#
+# 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"],'-'];
+$smdb_hash{'auth'} = ['update_auth','-',["${smdb_loc}sasl/sasl.m4"],'-'];
+$smdb_hash{'tls'} = ['update_tls','-',["${smdb_loc}tls/starttls.m4"],'-'];
+$smdb_hash{'include'} = ['-','-',[""],'-'];
+#
+# 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
+ ,'crontab' => 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 = '';
+
+my $QUEUE_GROUPS = 0;
+my $INCLUDES = 0;
+
+#------------------------------------------------------------------------------
+# Finally, some code (almost)
+#------------------------------------------------------------------------------
+1; # return (true);
+
+#
+#------------------------------------------------------------------------------
+# Read *.mc/*.m4 files
+#------------------------------------------------------------------------------
+sub read_mc {
+ my ($input_files) = @_;
+ my $ifh = new FileHandle;
+
+ $input_files = $input_files || $Parse_mc::input_files;
+ $Parse_mc::input_files = $input_files;
+ $debug = $main::debug || '';
+
+ unless ( open($ifh, "<$input_files") ) {
+ warn("Could not open $input_files($!)\n");
+ return;
+ };
+#print "Reading files:",$input_files,"\n";
+
+ #------------------------------------------------------------------
+ # 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
+ if (s/\\$//) {
+ $_ .= <>;
+ redo unless eof();
+ };
+#print "=>",$_,"\n";
+
+ #--------------------------------------------------------------
+ # 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?
+
+ if ( $QUEUE_GROUPS == 0 ) {
+ &put_entry($ARGV, '', 0);
+ $QUEUE_GROUPS = 1;
+ }
+ else {
+ &put_entry($ARGV, '', 1);
+ };
+ }
+
+ #--------------------------------------------------------------
+ # Look for all AUTH specifications
+ # define(confAUTH_MECHANISMS ...)dnl
+ # define(confAUTH_REALM ...)dnl
+ # TRUST_AUTH_MECH( ...)dnl
+ #--------------------------------------------------------------
+ elsif (/^\s*`?define\(\s*`?confAUTH_(MECHANISMS|REALM)/ ..
+ /[^\)]*\)/) {
+ &parse_string($_, 'define');
+ next line if ($smdb_state != $smdb_state_done);
+
+ next line if ($smdb_string =~ /.*defn\(/);
+
+ &get_flags_name_opts;
+
+ push(@smdb_file, split(' ',$smdb_options))
+ if ($smdb_options ne '-');
+ $smdb_options = '-';
+
+ &put_entry($ARGV, 'define');
+ }
+ elsif (/^\s*`?TRUST_AUTH_MECH\(/ ..
+ /[^\)]*\)/) {
+ &parse_string($_, '(');
+ next line if ($smdb_state != $smdb_state_done);
+
+ next line if ($smdb_string eq ' EXTERNAL');
+
+ &get_flags_name_opts;
+
+ push(@smdb_file, split(' ',$smdb_options));
+ $smdb_options = '-';
+
+ &put_entry($ARGV, '');
+ }
+
+ #--------------------------------------------------------------
+ # Look for all TLS specifications
+ # define(confCACERT, ...)dnl
+ # define(confCACERT_PATH, ...)dnl
+ # define(confCRL, ...)dnl
+ # define(confCLIENT_CERT, ...)dnl
+ # define(confCLIENT_KEY, ...)dnl
+ # define(confSERVER_CERT, ...)dnl
+ # define(confSERVER_KEY, ...)dnl
+ # define(confTLS_SRV_OPTIONS, ...)dnl
+ #--------------------------------------------------------------
+ elsif (/^\s*`?define\(\s*`?conf(TO_STARTTLS|CACERT|CRL|((SERVER|CLIENT)_(KEY|CERT))|TLS_SRV_OPTIONS)/ ..
+ /[^\)]*\)/) {
+ &parse_string($_, 'define');
+ next line if ($smdb_state != $smdb_state_done);
+
+ &get_flags_name_opts;
+
+ &put_entry($ARGV, 'define');
+ }
+
+ #
+ #--------------------------------------------------------------
+ # 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');
+ }
+
+ elsif (/^\s*`?(OSTYPE|DOMAIN|include)\(/ .. /[^\)]*/) {
+ &parse_string($_, '(');
+ next line if ($smdb_state != $smdb_state_done);
+
+ next line if ($smdb_name eq 'include'
+ and $smdb_string =~ /^\s*`?_CF_DIR/);
+
+ $smdb_string =~ /\s*`?([^'\)\s]+)/;
+ $smdb_string = $1;
+ if ($smdb_name eq 'OSTYPE') {
+ $smdb_string =
+ "@datadir@/sendmail/cf/ostype/$smdb_string.m4";
+ }
+ elsif ($smdb_name eq 'DOMAIN') {
+ $smdb_string =
+ "@datadir@/sendmail/cf/domain/$smdb_string.m4";
+ };
+
+ $smdb_name = 'include';
+ $smdb_class = '-'; # $1
+ $smdb_flags = '-';
+ @smdb_file = ($smdb_string);
+ $smdb_options = '-'; # Pull out other options?
+
+ if ($INCLUDES == 0) {
+ &put_entry($ARGV, 'include', 0);
+ $INCLUDES = 1;
+ }
+ else {
+ &put_entry($ARGV, 'include', 1);
+ };
+ &read_mc("$smdb_string");
+ };
+ };
+ };
+
+#
+#------------------------------------------------------------------------------
+# 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:
+##### :