diff -Ncr sendmail-8.8.5/FAQ sendmail-8.8.6/FAQ *** sendmail-8.8.5/FAQ Sat Aug 17 14:27:46 1996 --- sendmail-8.8.6/FAQ Sat Jun 14 08:57:59 1997 *************** *** 6,9 **** sending email to mail-server@rtfm.mit.edu with the command "send usenet/news.answers/mail/sendmail-faq" in the message. ! --Eric Allman 8/17/96 --- 6,11 ---- sending email to mail-server@rtfm.mit.edu with the command "send usenet/news.answers/mail/sendmail-faq" in the message. ! An HTML version is also available at http://www.sendmail.org/faq. ! ! --Eric Allman 14 June 1997 diff -Ncr sendmail-8.8.5/KNOWNBUGS sendmail-8.8.6/KNOWNBUGS *** sendmail-8.8.5/KNOWNBUGS Tue Oct 15 13:33:31 1996 --- sendmail-8.8.6/KNOWNBUGS Fri Jun 13 12:04:51 1997 *************** *** 1,13 **** K N O W N B U G S I N S E N D M A I L ! (for 8.8) The following are bugs or deficiencies in sendmail that I am aware of but which have not been fixed in the current release. You probably ! want to get the most up to date version of this from FTP.CS.Berkeley.EDU ! in /ucb/sendmail/KNOWNBUGS. For descriptions of bugs that have been fixed, see the file RELEASE_NOTES (in the root directory of the sendmail distribution). --- 1,13 ---- K N O W N B U G S I N S E N D M A I L ! (for 8.8.6) The following are bugs or deficiencies in sendmail that I am aware of but which have not been fixed in the current release. You probably ! want to get the most up to date version of this from ftp.sendmail.org ! in /pub/sendmail/KNOWNBUGS. For descriptions of bugs that have been fixed, see the file RELEASE_NOTES (in the root directory of the sendmail distribution). *************** *** 40,59 **** this address. It's not clear what the right behaviour is in this circumstance. - * MX records that point at non-existent hosts work strangly. - - Consider the DNS records: - - hostH MX 1 hostA - MX 2 hostB - hostA A 128.32.8.9 - - (note that there is no A record for hostB). If hostA is down, - an attempt to send to hostH gives "host unknown" -- that is, it - reflects out the status on the last host it tries, which in this - case is hostB, which is unknown. It probably ought to eliminate - hostB early in processing. - * \231 considered harmful. Header addresses that have the \231 character (and possibly others --- 40,45 ---- *************** *** 77,82 **** --- 63,80 ---- Apparently, this problem is due to linking -lc before -lsocket; if you are having this problem, check your Makefile. + * accept() problem on Linux. + + Apparently, the accept() in sendmail daemon loop can return ETIMEDOUT + and cause sendmail to sleep for 5 seconds during which time no new + connections will be accepted. An error is reported to syslog: + + Jun 9 17:14:12 hostname sendmail[207]: NOQUEUE: SYSERR(root): + getrequests: accept: Connection timed out + + "Connection timed out" is not documented as a valid return from + accept(2) and this is believed to be a bug in the Linux kernel. + * Excessive mailing list nesting can run out of file descriptors. If you have a mailing list that includes lots of other mailing *************** *** 106,109 **** allow for 8->7 bit MIME conversions either. ! (Version 8.23, last updated 10/15/96) --- 104,107 ---- allow for 8->7 bit MIME conversions either. ! (Version 8.25, last updated 6/13/97) diff -Ncr sendmail-8.8.5/READ_ME sendmail-8.8.6/READ_ME *** sendmail-8.8.5/READ_ME Tue Sep 24 18:24:27 1996 --- sendmail-8.8.6/READ_ME Thu May 8 08:06:28 1997 *************** *** 1,5 **** /*- ! * @(#)READ_ME 8.29 (Berkeley) 9/24/96 */ SENDMAIL RELEASE 8 --- 1,5 ---- /*- ! * @(#)READ_ME 8.30 (Berkeley) 5/8/97 */ SENDMAIL RELEASE 8 *************** *** 165,173 **** use the version that was on the Net2 tape -- it has a number of nefarious bugs that were bad enough when I got them; you shouldn't have to go through the same thing. Instead, get a new version via public ! FTP from ftp.CS.Berkeley.EDU, file ucb/4bsd/db.tar.Z. This software ! is highly recommended; it gets rid of several stupid limits, it's much ! faster, and the interface is nicer to animals and plants. You will also probably find that you have to add -I/where/you/put/db/include to the sendmail makefile to get db.h to work properly. --- 165,173 ---- use the version that was on the Net2 tape -- it has a number of nefarious bugs that were bad enough when I got them; you shouldn't have to go through the same thing. Instead, get a new version via public ! FTP from ftp.sleepycat.com, file db/packages/db.1.85.tar.gz. This ! software is highly recommended; it gets rid of several stupid limits, it's ! much faster, and the interface is nicer to animals and plants. You will also probably find that you have to add -I/where/you/put/db/include to the sendmail makefile to get db.h to work properly. diff -Ncr sendmail-8.8.5/RELEASE_NOTES sendmail-8.8.6/RELEASE_NOTES *** sendmail-8.8.5/RELEASE_NOTES Tue Jan 21 08:43:48 1997 --- sendmail-8.8.6/RELEASE_NOTES Sat Jun 14 08:45:31 1997 *************** *** 1,11 **** SENDMAIL RELEASE NOTES ! @(#)RELEASE_NOTES 8.8.5.3 (Berkeley) 1/21/97 This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. 8.8.5/8.8.5 97/01/21 SECURITY: Clear out group list during startup. Without this, sendmail will continue to run with the group permissions of the caller, --- 1,315 ---- SENDMAIL RELEASE NOTES ! @(#)RELEASE_NOTES 8.8.6.11 (Berkeley) 6/14/97 This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. + 8.8.6/8.8.6 97/06/14 + ************************************************************* + * The extensive assistance of Gregory Neil Shapiro of WPI * + * in preparing this release is gratefully appreciated. * + * Sun Microsystems has also provided resources toward * + * continued sendmail development. * + ************************************************************* + SECURITY: A few systems allow an open with the O_EXCL|O_CREAT open + mode bits set to create a file that is a symbolic link that + points nowhere. This makes it possible to create a root + owned file in an arbitrary directory by inserting the symlink + into a writable directory after the initial lstat(2) check + determined that the file did not exist. The only verified + example of a system having these odd semantics for O_EXCL + and symbolic links was HP-UX prior to version 9.07. Most + systems do not have the problem, since a exclusive create + of a file disallows symbolic links. Systems that have been + verified to NOT have the problem include AIX 3.x, *BSD, + DEC OSF/1, HP-UX 9.07 and higher, Linux, SunOS, Solaris, + and Ultrix. This is a potential exposure on systems that + have this bug and which do not have a MAILER-DAEMON alias + pointing at a legitimate account, since this will cause old + mail to be dropped in /var/tmp/dead.letter. + SECURITY: Problems can occur on poorly managed systems, specifically, + if maps or alias files are in world writable directories. + If your system has alias maps in writable directories, it + is potentially possible for an attacker to replace the .db + (or .dir and .pag) files by symbolic links pointing at + another database; this can be used either to expose + information (e.g., by pointing an alias file at /etc/spwd.db + and probing for accounts), or as a denial-of-service attack + (by trashing the password database). The fix disallows + symbolic links entirely when rebuilding alias files or on + maps that are in writable directories, and always warns on + writable directories; 8.9 will probably consider writable + directories to be fatal errors. This does not represent an + exposure on systems that have alias files in unwritable + system directories. + SECURITY: disallow .forward or :include: files that are links (hard + or soft) if the parent directory (or any directory in the + path) is writable by anyone other than the owner. This is + similar to the previous case for user files. This change + should not affect most systems, but is necessary to prevent + an attacker who can write the directory from pointing such + files at other files that are readable only by the owner. + SECURITY: Tighten safechown rules: many systems will say that they + have a safe (restricted to root) chown even on files that + are mounted from another system that allows owners to give + away files. The new rules are very strict, trusting file + ownership only in those few cases where the system has + been verified to be at least as paranoid as necessary. + However, it is possible to relax the rules to partially + trust the ownership if the directory path is not world or + group writable. This might allow someone who has a legitimate + :include: file (referenced directly from /etc/aliases) to + become another non-root user if the :include: file is in a + non-writable directory on an NFS-mounted filesystem where + the local system says that giveaway is denied but it is + actually permitted. I believe this to be a very small set + of cases. If in doubt, do not point :include: aliases at + NFS-mounted filesystems. + SECURITY: When setting a numeric group id using the RunAsUser option + (e.g., "O RunAsUser=10:20", the group id would not be set. + Implicit group ids (e.g., "O RunAsUser=mailnull") or alpha + group ids (e.g., "O RunAsUser=mailuser:mailgrp") worked fine. + The user id was still set properly. Problem noted by Uli + Pralle of the Technical University of Berlin. + Save the initial gid set for use when checking for if the + PrivacyOptions=restrictmailq option is set. Problem reported + by Wolfgang Ley of DFN-CERT. + Make 55x reply codes to the SMTP DATA-"." be non-sticky (i.e., a + failure on one message won't affect future messages to the + same host). + IP source route printing had an "off by one" error that would + affect any options that came after the route option. Patch + from Theo de Raadt. + The "Message is too large" error didn't successfully bounce the error + back to the sender. Problem reported by Stephen More of + PSI; patch from Gregory Neil Shapiro of WPI. + Change SMTP status code 553 to map into Extended code 5.1.0 (instead + of 5.1.3); it apparently gets used in multiple ways. + Suggested by John Myers of Portola Communications. + Fix possible extra null byte generated during collection if errors + occur at the beginning of the stream. Patch contributed by + Andrey A. Chernov and Gregory Neil Shapiro. + Code changes to avoid possible reentrant call of malloc/free within + a signal handler. Problem noted by John Beck of Sun + Microsystems. + Move map initialization to be earlier so that check_relay ruleset + will have the latest version of the map data. Problem noted + by Paul Forgey of Metainfo; patch from Gregory Neil Shapiro. + If there are fatal errors during the collection phase (e.g., message + too large) don't send the bogus message. + Avoid "cannot open xfAAA00000" messages when sending to aliases that + have errors and have owner- aliases. Problem noted by Michael + Barber of MTU; fix from Gregory Neil Shapiro of WPI. + Avoid null pointer dereference on illegal Boundary= parameters in + multipart/mixed Content-Type: header. Problem noted by + Richard Muirden of RMIT University. + Always print error messages during newaliases (-bi) even if the + ErrorMode is not set to "print". Fix from Gregory Neil + Shapiro. + Test mode could core dump if you did a /map lookup in an optional map + that could not be opened. Based on a fix from John Beck of + Sun Microsystems. + If DNS is misconfigured so that the last MX record tried points to + a host that does not have an A record, but other MX records + pointed to something reasonable, don't bounce the message + with a "host unknown" error. Note that this should really + be fixed in the zone file for the domain. Problem noted by + Joe Rhett of Navigist, Inc. + If a map fails (e.g., DNS times out) on all recipient addresses, mark + the message as having been tried; otherwise the next queue + run will not realize that this is a second attempt and will + retry immediately. Problem noted by Bryan Costales of + Mercury Mail. + If the clock is set backwards, and a MinQueueAge is set, no jobs + will be run until the later setting of the clock is reached. + "Problem" (I use the term loosely) noted by Eric Hagberg of + Morgan Stanley. + If the load average rises above the cutoff threshold (above which + sendmail will not process the queue at all) during a queue + run, abort the queue run immediately. Problem noted by + Bryan Costales of Mercury Mail. + The variable queue processing algorithm (based on the message size, + number of recipients, message precedence, and job age) was + non-functional -- either the entire queue was processed or + none of the queue was processed. The updated algorithm + does no queue run if a single recipient zero size job will + not be run. + If there is a fatal ("panic") message that will cause sendmail to + die immediately, never hold the error message for future + printing. + Force ErrorMode=print in -bt mode so that all errors are printed + regardless of the setting of the ErrorMode option in the + configuration file. Patch from Gregory Neil Shapiro. + New compile flag HASSTRERROR says that this OS has the strerror(3) + routine available in one of the libraries. Use it in conf.h. + The -m (match only) flag now works on host class maps. + If class hash or btree maps are rebuilt, sendmail will now detect + this and reopen the map. Previously, they could give + erroneous results during a single message processing + (but would recover when the next message was received). + Don't delete zero length queue files when doing queue runs until the + files are at least ten minutes old. This avoids a potential + race condition: the creator creates the qf file, getting back + a file descriptor. The queue runner locks it and deletes it + because it is zero length. The creator then writes the + descriptor that is now for a disconnected file, and the + job goes away. Based on a suggestion by Bryan Costales. + When determining the "validated" host name ($_ macro), do a forward + (A) DNS lookup on the result of the PTR lookup and compare + results. If they differ or if the PTR lookup fails, tag the + address as "may be forged". + Log null connections (i.e., hosts that connect but do not do any + substantive activity on the connection before disconnecting; + "substantive" is defined to be MAIL, EXPN, VRFY, or ETRN. + Always permit "writes" to /dev/null regardless of the link count. + This is safe because /dev/null is special cased, and no open + or write is ever actually attempted. Patch from Villy Kruse + of TwinCom. + If a message cannot be sent because of a 552 (exceeded storage + allocation) response to the MAIL FROM:<>, and a SIZE= parameter + was given, don't return the body in the bounce, since there + is a very good chance that the message will double-bounce. + Fix possible line truncation if a quoted-printable had an =00 escape + in the body. Problem noted by Charles Karney of the Princeton + Plasma Physics Laboratory. + Notify flags (e.g., -NSUCCESS) were lost on user+detail addresses. + Problem noted by Kari Hurtta of the Finnish Meteorological + Institute. + The MaxDaemonChildren option wasn't applying to queue runs as + documented. Note that this increases the potential denial + of service problems with this option: an attacker can + connect many times, and thereby lock out queue runs as well + as incoming connections. If you use this option, you should + run the "sendmail -bd" and "sendmail -q30m" jobs separately + to avoid this attack. Failure to limit noted by Matthew + Dillon of BEST Internet Communications. + Always give a message in newaliases if alias files cannot be + opened instead of failing silently. Suggested by Gregory + Neil Shapiro. This change makes the code match the O'Reilly + book (2nd edition). + Some older versions of the resolver could return with h_errno == -1 + if no name server could be reached, causing mail to bounce + instead of queueing. Treat this like TRY_AGAIN. Fix from + John Beck of SunSoft. + If a :include: file is owned by a user that does not have an entry + in the passwd file, sendmail could dereference a null pointer. + Problem noted by Satish Mynam of Sun Microsystems. + Take precautions to make sure that the SMTP protocol cannot get out + of sync if (for example) an alias file cannot be opened. + Fix a possible race condition that can cause a SIGALRM to come in + immediately after a SIGHUP, causing the new sendmail to die. + Avoid possible hang on SVr3 systems when doing child reaping. Patch + from Villy Kruse of TwinCom. + Ignore improperly formatted SMTP reply codes. Previously these were + partially processed, which could cause confusing error + returns. + Fix possible bogus pointer dereference when doing ldapx map lookups + on some architectures. + Portability: + A/UX: from Jim Jagielski of NASA/GSFC. + glibc: SOCK_STREAM was changed from a #define to an enum, + thus breaking #ifdef SOCK_STREAM. Only option seems + to be to assume SOCK_STREAM if __GNU_LIBRARY__ is + defined. Problem reported by A Sun of the University + of Washington. + Solaris: use SIOCGIFNUM to get the number of interfaces on + the system rather than guessing at compile time. + Patch contributed by John Beck of Sun Microsystems. + Intel Paragon: from Wendy Lin of Purdue University. + GNU Hurd: from Miles Bader of the GNU project. + RISC/os 4.50 from Harlan Stenn of PFCS Corporation. + ISC Unix: wait never returns if SIGCLD signals are blocked. + Unfortunately releasing them opens a race condition, + but there appears to be no fix for this. Patch from + Gregory Neil Shapiro. + BIND 8.1 for IPv6 compatibility from John Kennedy. + Solaris: a bug in strcasecmp caused characters with the + high order bit set to apparently randomly match + letters -- for example, $| (0233) matches "i" and "I". + Problem noted by John Gregson of the University of + Cambridge. + IRIX 6.x: make Makefile.IRIX.6.2 apply to all 6.x. From + Kari Hurtta. + IRIX 6.x: Create Makefiles for systems that claim to be + IRIX64 but are 6.2 or higher (so use the regular + IRIX Makefile). + IRIX 6.x: Fix load average computation on 64 bit kernels. + Problem noted by Eric Hagberg of Morgan Stanley. + CONFIG: Some canonification was still done for UUCP-like addresses + even if FEATURE(nocanonify) was set. Problem pointed out by + Brian Candler. + CONFIG: In some cases UUCP mailers wouldn't properly recognize all + local names as local. Problem noted by Jeff Polk of BSDI; + fix provided by Gregory Neil Shapiro. + CONFIG: The "local:user" syntax entries in mailertables and other + "mailer:user" syntax locations returned an incorrect value + for the $h macro. Problem noted by Gregory Neil Shapiro. + CONFIG: Retain "+detail" information when forwarding mail to a + MAIL_HUB, LUSER_RELAY, or LOCAL_RELAY. Patch from Philip + Guenther of Gustavus Adolphus College. + CONFIG: Make sure user+detail works for FEATURE(virtusertable); + rules are the same as for aliasing. Based on a patch from + Gregory Neil Shapiro. + CONFIG: Break up parsing rules into several pieces; this should + have no functional change in this release, but makes it + possible to have better anti-spam rulesets in the future. + CONFIG: Disallow double dots in host names to avoid having the + HostStatusDirectory store status under the wrong name. + In some cases this can be used as a denial-of-service attack. + Problem noted by Ron Jarrell of Virginia Tech, patch from + Gregory Neil Shapiro. + CONFIG: Don't use F=m (multiple recipients per invocation) for + MAILER(procmail), but do pass F=Pn9 (include Return-Path:, + don't include From_, and convert to 8-bit). Suggestions + from Kimmo Suominen and Roderick Schertler. + CONFIG: Domains under $=M (specified with MASQUERADE_DOMAIN) where + being masqueraded as though FEATURE(masquerade_entire_domain) + was specified, even when it wasn't. + MAIL.LOCAL: Solaris 2.6 has snprintf. From John Beck of SunSoft. + MAIL.LOCAL: SECURITY: check to make sure that an attacker doesn't + "slip in" a symbolic link between the lstat(2) call and the + exclusive open. This is only a problem on System V derived + systems that allow an exclusive create on files that are + symbolic links pointing nowhere. + MAIL.LOCAL: If the final mailbox close() failed, the user id was + not reset back to root, which on some systems would cause + later mailboxes to fail. Also, any partial message would + not be truncated, which could result in repeated deliveries. + Problem noted by Bruce Evans via Peter Wemm (FreeBSD + developers). + MAKEMAP: Handle cases where O_EXLOCK is #defined to be 0. A similar + change to the sendmail map code was made in 8.8.3. Problem + noted by Gregory Neil Shapiro. + MAKEMAP: Give warnings on file problems such as map files that are + symbolic links; although makemap is not setuid root, it is + often run as root and hence has the potential for the same + sorts of problems as alias rebuilds. + MAKEMAP: Change compilation so that it will link properly on + NEXTSTEP. + CONTRIB: etrn.pl: search for Cw as well as Fw lines in sendmail.cf. + Accept an optional list of arguments following the server + name for the ETRN arguments to use (instead of $=w). Other + miscellaneous bug fixes. From Christian von Roques via + John Beck of Sun Microsystems. + CONTRIB: Add passwd-to-alias.pl, contributed by Kari Hurtta. This + Perl script converts GECOS information in the /etc/passwd + file into aliases, allowing for faster access to full name + lookups; it is also clever about adding aliases (to root) + for system accounts. + NEW FILES: + src/safefile.c + cf/ostype/gnuhurd.m4 + cf/ostype/irix6.m4 + contrib/passwd-to-alias.pl + test/t_exclopen.c + src/Makefiles/Makefile.IRIX64.6.1 + src/Makefiles/Makefile.IRIX64.6.x + RENAMED FILES: + src/Makefiles/Makefile.IRIX.6.2 => Makefile.IRIX.6.x + src/Makefiles/Makefile.IRIX64 => Makefile.IRIX64.6.0 + 8.8.5/8.8.5 97/01/21 SECURITY: Clear out group list during startup. Without this, sendmail will continue to run with the group permissions of the caller, *************** *** 101,108 **** Give better diagnostics on long alias lines. Based on code contributed by Patrick Gosling of the University of Cambridge. Increase the number of virtual interfaces that will be probed for ! alternate names. Problem noted by Gregory Neil Shapiro of ! WPI. PORTABILITY: UXP/DS V20L10 for Fujitsu DS/90: Makefile patches from Toshiaki Nomura of Fujitsu Limited. --- 405,411 ---- Give better diagnostics on long alias lines. Based on code contributed by Patrick Gosling of the University of Cambridge. Increase the number of virtual interfaces that will be probed for ! alternate names. Problem noted by Amy Rich of Shore.Net. PORTABILITY: UXP/DS V20L10 for Fujitsu DS/90: Makefile patches from Toshiaki Nomura of Fujitsu Limited. *************** *** 138,145 **** to the named user on the local machine. ``local:user@host'' is equivalent to ``local:user'' (the host is ignored). In all cases, the original user@host is passed in $@ (i.e., the ! detail information). Inspired by a report from Michael Fuhr ! of Dimensional Communications, L.L.C. CONFIG: Strip quotes from the first word of an "error:" host indication. This lets you set (for example) the LUSER_RELAY to be ``error:\"5.1.1\" Your Message Here''. Note the use --- 441,447 ---- to the named user on the local machine. ``local:user@host'' is equivalent to ``local:user'' (the host is ignored). In all cases, the original user@host is passed in $@ (i.e., the ! detail information). Inspired by a report from Michael Fuhr. CONFIG: Strip quotes from the first word of an "error:" host indication. This lets you set (for example) the LUSER_RELAY to be ``error:\"5.1.1\" Your Message Here''. Note the use *************** *** 837,844 **** Add new RunAsUser option; this causes sendmail to do a setuid to that user early in processing to avoid potential security problems. However, this means that all .forward and :include: files must ! be readable by that user, and on systems that don't support the ! saved uid bit properly, all files to be written must be writable by that user and all programs will be executed by that user. It is also incompatible with the SafeFileEnvironment option. In other words, it may not actually add much to --- 1139,1145 ---- Add new RunAsUser option; this causes sendmail to do a setuid to that user early in processing to avoid potential security problems. However, this means that all .forward and :include: files must ! be readable by that user, and all files to be written must be writable by that user and all programs will be executed by that user. It is also incompatible with the SafeFileEnvironment option. In other words, it may not actually add much to *************** *** 1407,1413 **** ``/mx host'' returns the MX records for ``host''. ``/parse address'' will parse address, returning the value of crackaddr (essentially, the comment information) ! and the parsed address (the same as -bv). ``/try mailer address'' will rewrite address into the form it will have when presented to the indicated mailer. ``/tryflags flags'' will set flags used by parsing. The --- 1708,1714 ---- ``/mx host'' returns the MX records for ``host''. ``/parse address'' will parse address, returning the value of crackaddr (essentially, the comment information) ! and the parsed address. ``/try mailer address'' will rewrite address into the form it will have when presented to the indicated mailer. ``/tryflags flags'' will set flags used by parsing. The diff -Ncr sendmail-8.8.5/cf/README sendmail-8.8.6/cf/README *** sendmail-8.8.5/cf/README Thu Jan 16 17:20:29 1997 --- sendmail-8.8.6/cf/README Sat Jun 14 08:22:42 1997 *************** *** 4,10 **** Eric Allman ! @(#)README 8.111 (Berkeley) 1/16/97 This document describes the sendmail configuration files being used --- 4,10 ---- Eric Allman ! @(#)README 8.120 (Berkeley) 6/14/97 This document describes the sendmail configuration files being used *************** *** 34,40 **** or later also works. Unfortunately, I'm told that the M4 on BSDI 1.0 doesn't work -- you'll have to use a Net/2 or GNU version. GNU m4 is available from ftp://prep.ai.mit.edu/pub/gnu/m4-1.4.tar.gz (check for ! the latest version). IF YOU DON'T HAVE A BERKELEY MAKE, don't despair! Just run "m4 ../m4/cf.m4 foo.mc > foo.cf" -- that should be all you need. --- 34,41 ---- or later also works. Unfortunately, I'm told that the M4 on BSDI 1.0 doesn't work -- you'll have to use a Net/2 or GNU version. GNU m4 is available from ftp://prep.ai.mit.edu/pub/gnu/m4-1.4.tar.gz (check for ! the latest version). EXCEPTIONS: DEC's m4 on Digital UNIX 4.x is broken ! (3.x is fine). Use GNU m4 on this platform. IF YOU DON'T HAVE A BERKELEY MAKE, don't despair! Just run "m4 ../m4/cf.m4 foo.mc > foo.cf" -- that should be all you need. *************** *** 120,126 **** # # This is a Berkeley-specific configuration file for HP-UX 9.x. ! # It applies only the the Computer Science Division at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the --- 121,127 ---- # # This is a Berkeley-specific configuration file for HP-UX 9.x. ! # It applies only to the Computer Science Division at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the *************** *** 306,316 **** POP_MAILER_ARGS [pop $u] The arguments passed to the POP mailer. PROCMAIL_MAILER_PATH [/usr/local/bin/procmail] The path to the procmail program. This is also used by FEATURE(local_procmail). ! PROCMAIL_MAILER_FLAGS [Shu] Flags added to Procmail mailer. Flags ! ``DFMmn'' are always set. This is NOT used by FEATURE(local_procmail); tweak LOCAL_MAILER_FLAGS instead. ! PROCMAIL_MAILER_ARGS [procmail -m $h $f $u] The arguments passed to the Procmail mailer. This is NOT used by FEATURE(local_procmail); tweak LOCAL_MAILER_ARGS instead. --- 307,317 ---- POP_MAILER_ARGS [pop $u] The arguments passed to the POP mailer. PROCMAIL_MAILER_PATH [/usr/local/bin/procmail] The path to the procmail program. This is also used by FEATURE(local_procmail). ! PROCMAIL_MAILER_FLAGS [SPhnu9] Flags added to Procmail mailer. Flags ! ``DFM'' are always set. This is NOT used by FEATURE(local_procmail); tweak LOCAL_MAILER_FLAGS instead. ! PROCMAIL_MAILER_ARGS [procmail -Y -m $h $f $u] The arguments passed to the Procmail mailer. This is NOT used by FEATURE(local_procmail); tweak LOCAL_MAILER_ARGS instead. *************** *** 656,662 **** The key for this table is either the full address or the unqualified username (the former is tried first); the value is the new user address. If the new user address does ! not include a domain, $j is used. virtusertable A domain-specific form of aliasing, allowing multiple virtual domains to be hosted on one machine. For example, --- 657,666 ---- The key for this table is either the full address or the unqualified username (the former is tried first); the value is the new user address. If the new user address does ! not include a domain, $j is used. Note that the address must ! being looked up must be fully qualified. For local mail, it ! is necessary to use FEATURE(always_add_domain) for the ! addresses to be qualified. virtusertable A domain-specific form of aliasing, allowing multiple virtual domains to be hosted on one machine. For example, *************** *** 669,686 **** then mail addressed to info@foo.com will be sent to the address foo-info, mail addressed to info@bar.com will be delivered to bar-info, and mail addressed to anyone at ! baz.org will be sent to jane@elsewhere.net. All the host ! names on the left hand side (foo.com, bar.com, and baz.org) ! must be in $=w. The default map definition is: hash -o /etc/virtusertable A new definition can be specified as the second argument of ! the FEATURE macro. nodns We aren't running DNS at our site (for example, we are UUCP-only connected). It's hard to consider this a "feature", but hey, it had to go somewhere. nullclient This is a special case -- it creates a stripped down configuration file containing nothing but support for --- 673,700 ---- then mail addressed to info@foo.com will be sent to the address foo-info, mail addressed to info@bar.com will be delivered to bar-info, and mail addressed to anyone at ! baz.org will be sent to jane@elsewhere.net. The username ! from the original address is passed as %1 allowing: ! ! @foo.org %1@elsewhere.com ! ! meaning someone@foo.org will be sent to someone@elsewhere.com. ! ! All the host names on the left hand side (foo.com, bar.com, ! and baz.org) must be in $=w. The default map definition is: hash -o /etc/virtusertable A new definition can be specified as the second argument of ! the FEATURE macro, such as ! ! FEATURE(virtusertable, dbm -o /etc/mail/virtusers) nodns We aren't running DNS at our site (for example, we are UUCP-only connected). It's hard to consider this a "feature", but hey, it had to go somewhere. + Actually, as of 8.7 this is a no-op -- remove "dns" from + the hosts service switch entry instead. nullclient This is a special case -- it creates a stripped down configuration file containing nothing but support for *************** *** 1062,1067 **** --- 1076,1098 ---- note the trailing dot ---^ + +--------------------------------+ + | ADDING NEW MAILERS OR RULESETS | + +--------------------------------+ + + Sometimes you may need to add entirely new mailers or rulesets. They + should be introduced with the constructs MAILER_DEFINITIONS and + LOCAL_RULESETS respectively. For example: + + MAILER_DEFINITIONS + Mmymailer, ... + ... + + LOCAL_RULESETS + Scheck_relay + ... + + +-------------------------------+ | NON-SMTP BASED CONFIGURATIONS | +-------------------------------+ *************** *** 1102,1111 **** That is, send directly only to things you found in your DNS lookup; anything else goes through SMART_HOST. - If you are not running DNS at all, it is important to use - FEATURE(nodns) to avoid having sendmail queue everything waiting - for the name server to come up. - +-----------+ | WHO AM I? | --- 1133,1138 ---- *************** *** 1522,1532 **** named directory tree. This need not be a full pathname, in which case it is interpreted relative to the queue ! directory. This option also ! single-threads connections to each ! host, i.e., prevents multiple ! connections to a single server from ! this client. confUSE_ERRORS_TO* UserErrorsTo [False] Use the Errors-To: header to deliver error messages. This should not be necessary because of general --- 1549,1567 ---- named directory tree. This need not be a full pathname, in which case it is interpreted relative to the queue ! directory. ! confSINGLE_THREAD_DELIVERY SingleThreadDelivery ! [False] If this option and the ! HostStatusDirectory option are both ! set, single thread deliveries to other ! hosts. That is, don't allow any two ! sendmails on this host to connect ! simultaneously to any other single ! host. This can slow down delivery in ! some cases, in particular since a ! cached but otherwise idle connection ! to a host will prevent other sendmails ! from connecting to the other host. confUSE_ERRORS_TO* UserErrorsTo [False] Use the Errors-To: header to deliver error messages. This should not be necessary because of general *************** *** 1669,1675 **** confWORK_CLASS_FACTOR ClassFactor [1800] Priority multiplier for class. confWORK_TIME_FACTOR RetryFactor [90000] Cost of each delivery attempt. confQUEUE_SORT_ORDER QueueSortOrder [Priority] Queue sort algorithm: ! Priority or Host. confMIN_QUEUE_AGE MinQueueAge [0] The minimum amount of time a job must sit in the queue between queue runs. This allows you to set the --- 1704,1710 ---- confWORK_CLASS_FACTOR ClassFactor [1800] Priority multiplier for class. confWORK_TIME_FACTOR RetryFactor [90000] Cost of each delivery attempt. confQUEUE_SORT_ORDER QueueSortOrder [Priority] Queue sort algorithm: ! Priority, Host, or Time. confMIN_QUEUE_AGE MinQueueAge [0] The minimum amount of time a job must sit in the queue between queue runs. This allows you to set the *************** *** 1782,1799 **** files will be written as this user. Intended for use only on firewalls where users do not have accounts. - confSINGLE_THREAD_DELIVERY SingleThreadDelivery - [False] If this option and the - HostStatusDirectory option are both - set, single thread deliveries to other - hosts. That is, don't allow any two - sendmails on this host to connect - simultaneously to any other single - host. This can slow down delivery in - some cases, in particular since a - cached but otherwise idle connection - to a host will prevent other sendmails - from connecting to the other host. See also the description of OSTYPE for some parameters that can be tweaked (generally pathnames to mailers). --- 1817,1822 ---- *************** *** 1935,1941 **** O operators that indicate network operations (cannot be in local names) P top level pseudo-domains: BITNET, DECNET, FAX, UUCP, etc. Q ! R S T U locally connected UUCP hosts --- 1958,1964 ---- O operators that indicate network operations (cannot be in local names) P top level pseudo-domains: BITNET, DECNET, FAX, UUCP, etc. Q ! R domains we are willing to relay (pass anti-spam filters) S T U locally connected UUCP hosts diff -Ncr sendmail-8.8.5/cf/cf/cs-hpux10.mc sendmail-8.8.6/cf/cf/cs-hpux10.mc *** sendmail-8.8.5/cf/cf/cs-hpux10.mc Sat Mar 23 18:22:58 1996 --- sendmail-8.8.6/cf/cf/cs-hpux10.mc Tue Jun 3 17:14:53 1997 *************** *** 35,41 **** # # This is a Berkeley-specific configuration file for HP-UX 9.x. ! # It applies only the the Computer Science Division at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the --- 35,41 ---- # # This is a Berkeley-specific configuration file for HP-UX 9.x. ! # It applies only to the Computer Science Division at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the *************** *** 44,50 **** # divert(0)dnl ! VERSIONID(`@(#)cs-hpux10.mc 8.4 (Berkeley) 3/23/96') OSTYPE(hpux10)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl --- 44,50 ---- # divert(0)dnl ! VERSIONID(`@(#)cs-hpux10.mc 8.5 (Berkeley) 6/3/97') OSTYPE(hpux10)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl diff -Ncr sendmail-8.8.5/cf/cf/cs-hpux9.mc sendmail-8.8.6/cf/cf/cs-hpux9.mc *** sendmail-8.8.5/cf/cf/cs-hpux9.mc Sat Mar 23 18:22:58 1996 --- sendmail-8.8.6/cf/cf/cs-hpux9.mc Tue Jun 3 17:14:53 1997 *************** *** 35,41 **** # # This is a Berkeley-specific configuration file for HP-UX 9.x. ! # It applies only the the Computer Science Division at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the --- 35,41 ---- # # This is a Berkeley-specific configuration file for HP-UX 9.x. ! # It applies only to the Computer Science Division at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the *************** *** 44,50 **** # divert(0)dnl ! VERSIONID(`@(#)cs-hpux9.mc 8.5 (Berkeley) 3/23/96') OSTYPE(hpux9)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl --- 44,50 ---- # divert(0)dnl ! VERSIONID(`@(#)cs-hpux9.mc 8.6 (Berkeley) 6/3/97') OSTYPE(hpux9)dnl DOMAIN(CS.Berkeley.EDU)dnl define(`MAIL_HUB', mailspool.CS.Berkeley.EDU)dnl diff -Ncr sendmail-8.8.5/cf/cf/cs-osf1.mc sendmail-8.8.6/cf/cf/cs-osf1.mc *** sendmail-8.8.5/cf/cf/cs-osf1.mc Sat Mar 23 18:22:58 1996 --- sendmail-8.8.6/cf/cf/cs-osf1.mc Tue Jun 3 17:14:53 1997 *************** *** 35,41 **** # # This is a Berkeley-specific configuration file for OSF/1. ! # It applies only the the Computer Science Division at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the --- 35,41 ---- # # This is a Berkeley-specific configuration file for OSF/1. ! # It applies only to the Computer Science Division at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the *************** *** 44,50 **** # divert(0)dnl ! VERSIONID(`@(#)cs-osf1.mc 8.4 (Berkeley) 3/23/96') OSTYPE(osf1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl --- 44,50 ---- # divert(0)dnl ! VERSIONID(`@(#)cs-osf1.mc 8.5 (Berkeley) 6/3/97') OSTYPE(osf1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl diff -Ncr sendmail-8.8.5/cf/cf/cs-solaris2.mc sendmail-8.8.6/cf/cf/cs-solaris2.mc *** sendmail-8.8.5/cf/cf/cs-solaris2.mc Sat Mar 23 18:22:58 1996 --- sendmail-8.8.6/cf/cf/cs-solaris2.mc Tue Jun 3 17:14:53 1997 *************** *** 35,41 **** # # This is a Berkeley-specific configuration file for Solaris 2.x. ! # It applies only the the Computer Science Division at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the --- 35,41 ---- # # This is a Berkeley-specific configuration file for Solaris 2.x. ! # It applies only to the Computer Science Division at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the *************** *** 44,50 **** # divert(0)dnl ! VERSIONID(`@(#)cs-solaris2.mc 8.3 (Berkeley) 3/23/96') OSTYPE(solaris2)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl --- 44,50 ---- # divert(0)dnl ! VERSIONID(`@(#)cs-solaris2.mc 8.4 (Berkeley) 6/3/97') OSTYPE(solaris2)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl diff -Ncr sendmail-8.8.5/cf/cf/cs-sunos4.1.mc sendmail-8.8.6/cf/cf/cs-sunos4.1.mc *** sendmail-8.8.5/cf/cf/cs-sunos4.1.mc Sat Mar 23 18:22:57 1996 --- sendmail-8.8.6/cf/cf/cs-sunos4.1.mc Tue Jun 3 17:14:53 1997 *************** *** 35,41 **** # # This is a Berkeley-specific configuration file for SunOS 4.1.x. ! # It applies only the the Computer Science Division at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the --- 35,41 ---- # # This is a Berkeley-specific configuration file for SunOS 4.1.x. ! # It applies only to the Computer Science Division at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the *************** *** 44,50 **** # divert(0)dnl ! VERSIONID(`@(#)cs-sunos4.1.mc 8.4 (Berkeley) 3/23/96') OSTYPE(sunos4.1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl --- 44,50 ---- # divert(0)dnl ! VERSIONID(`@(#)cs-sunos4.1.mc 8.5 (Berkeley) 6/3/97') OSTYPE(sunos4.1)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl diff -Ncr sendmail-8.8.5/cf/cf/cs-ultrix4.mc sendmail-8.8.6/cf/cf/cs-ultrix4.mc *** sendmail-8.8.5/cf/cf/cs-ultrix4.mc Sat Mar 23 18:22:58 1996 --- sendmail-8.8.6/cf/cf/cs-ultrix4.mc Tue Jun 3 17:14:53 1997 *************** *** 35,41 **** # # This is a Berkeley-specific configuration file for Ultrix 4.x. ! # It applies only the the Computer Science Division at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the --- 35,41 ---- # # This is a Berkeley-specific configuration file for Ultrix 4.x. ! # It applies only to the Computer Science Division at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the *************** *** 44,50 **** # divert(0)dnl ! VERSIONID(`@(#)cs-ultrix4.mc 8.4 (Berkeley) 3/23/96') OSTYPE(ultrix4)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl --- 44,50 ---- # divert(0)dnl ! VERSIONID(`@(#)cs-ultrix4.mc 8.5 (Berkeley) 6/3/97') OSTYPE(ultrix4)dnl DOMAIN(CS.Berkeley.EDU)dnl MAILER(local)dnl diff -Ncr sendmail-8.8.5/cf/cf/knecht.mc sendmail-8.8.6/cf/cf/knecht.mc *** sendmail-8.8.5/cf/cf/knecht.mc Sun Nov 24 14:27:45 1996 --- sendmail-8.8.6/cf/cf/knecht.mc Fri Jun 13 06:52:32 1997 *************** *** 38,44 **** # divert(0)dnl ! VERSIONID(`@(#)knecht.mc 8.4 (Berkeley) 11/24/96') OSTYPE(bsd4.4)dnl DOMAIN(generic)dnl define(`confDEF_USER_ID', `mailnull')dnl --- 38,44 ---- # divert(0)dnl ! VERSIONID(`@(#)knecht.mc 8.11 (Berkeley) 6/12/97') OSTYPE(bsd4.4)dnl DOMAIN(generic)dnl define(`confDEF_USER_ID', `mailnull')dnl *************** *** 46,51 **** --- 46,94 ---- define(`confTO_ICONNECT', `10s')dnl define(`confCOPY_ERRORS_TO', `Postmaster')dnl define(`confTO_QUEUEWARN', `8h')dnl + define(`confPRIVACY_FLAGS', ``authwarnings,noexpn,novrfy'')dnl FEATURE(virtusertable)dnl MAILER(local)dnl MAILER(smtp)dnl + + LOCAL_CONFIG + # domains that are not us but which we will relay + FR-o /etc/sendmail.cR + + # domain override table to accept unresolvable/reject resolvable domains + Kdomaincheck hash -o /etc/domaincheck + + + LOCAL_RULESETS + + # reject bogus return addresses + Scheck_mail + R<> $@ + R$* $: $>Parse0 $>3 $1 make domain canonical + R $* < @ $+ . > $* $: < $( domaincheck $2 $: OK $) > $1 < @ $2 . > $3 + tag resolved names + R $* < @ $+ > $* $: < $( domaincheck $2 $: ? $) > $1 < @ $2 > $3 + check for overrides + R $* $@ + R $* < @ $+ > $* $#error $: 451 Sender domain must resolve + R $* $: < ? $&{client_name} > $1 no @domain on address... + R $* $@ ...local unqualed ok + R $* $#error $: 551 Domain name required + ...remote is not + R<$+> $* $#error $: $1 error from domaincheck + + # disallow relaying + Scheck_rcpt + # anything terminating locally is ok + R$* $: $>Parse0 $>3 $1 strip local crud + R$+ < @ $=w . > $@ OK + R$+ < @ $* $=R . > $@ OK + + # anything originating locally is ok + R$* $: $(dequote "" $&{client_name} $) + R$=w $@ OK + R$=R $@ OK + R$@ $@ OK + + # anything else is bogus + R$* $#error $: "550 Relaying Denied" diff -Ncr sendmail-8.8.5/cf/cf/obj/sample.simple.cf sendmail-8.8.6/cf/cf/obj/sample.simple.cf *** sendmail-8.8.5/cf/cf/obj/sample.simple.cf Fri Apr 11 13:11:34 1997 --- sendmail-8.8.6/cf/cf/obj/sample.simple.cf Wed Dec 31 16:00:00 1969 *************** *** 1,535 **** - # - # Copyright (c) 1983, 1995 Eric P. Allman - # Copyright (c) 1988, 1993 - # The Regents of the University of California. All rights reserved. - # - # Redistribution and use in source and binary forms, with or without - # modification, are permitted provided that the following conditions - # are met: - # 1. Redistributions of source code must retain the above copyright - # notice, this list of conditions and the following disclaimer. - # 2. Redistributions in binary form must reproduce the above copyright - # notice, this list of conditions and the following disclaimer in the - # documentation and/or other materials provided with the distribution. - # 3. All advertising materials mentioning features or use of this software - # must display the following acknowledgement: - # This product includes software developed by the University of - # California, Berkeley and its contributors. - # 4. Neither the name of the University nor the names of its contributors - # may be used to endorse or promote products derived from this software - # without specific prior written permission. - # - # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - # SUCH DAMAGE. - # - - ###################################################################### - ###################################################################### - ##### - ##### SENDMAIL CONFIGURATION FILE - ##### - ##### built by eric@knecht.Oxford.Reference.COM on Fri Apr 11 13:11:34 PDT 1997 - ##### in /home/knecht/a/eric/src/sendmail-8.8.5/cf/cf - ##### using ../ as configuration include directory - ##### - ###################################################################### - ###################################################################### - - ##### @(#)cfhead.m4 8.9 (Berkeley) 1/18/97 ##### - ##### @(#)cf.m4 8.24 (Berkeley) 8/16/95 ##### - ##### "sample-only" ##### - - ##### @(#)bsd4.4.m4 8.4 (Berkeley) 11/13/95 ##### - - - - # - # This is used only for relaying mail from a client to a hub when - # that client does absolutely nothing else -- i.e., it is a "null - # mailer". In this sense, it acts like the "R" option in Sun - # sendmail. - # - - ##### @(#)nullclient.m4 8.7 (Berkeley) 2/11/96 ##### - - - - - - - ##### @(#)proto.m4 8.139 (Berkeley) 12/31/96 ##### - - - # level 7 config file format - V7/Berkeley - - ################## - # local info # - ################## - - Cwlocalhost - - # my official domain name - # ... define this only if sendmail cannot automatically determine your domain - #Dj$w.Foo.COM - - # class E: names that should be exposed as from this host, even if we masquerade - #CE root - - # who I masquerade as (null for no masquerading) (see also $=M) - DMmailhub - - # my name for error messages - DnMAILER-DAEMON - - - # hub host (to which all mail is sent) - DHmailhub - - # route-addr separators - C: : , - - # Configuration version number - DZ8.8.5 - - - ############### - # Options # - ############### - - # strip message body to 7 bits on input? - O SevenBitInput=False - - # 8-bit data handling - O EightBitMode=pass8 - - # minimum number of free blocks on filesystem - O MinFreeBlocks=100 - - # maximum message size - #O MaxMessageSize=1000000 - - # substitution for space (blank) characters - O BlankSub=. - - # avoid connecting to "expensive" mailers on initial submission? - O HoldExpensive=False - - # checkpoint queue runs after every N successful deliveries - #O CheckpointInterval=10 - - # default delivery mode - O DeliveryMode=background - - # automatically rebuild the alias database? - #O AutoRebuildAliases - - # error message header/file - #O ErrorHeader=/etc/sendmail.oE - - # error mode - #O ErrorMode=print - - # save Unix-style "From_" lines at top of header? - #O SaveFromLine - - # temporary file mode - O TempFileMode=0600 - - # match recipients against GECOS field? - #O MatchGECOS - - # maximum hop count - #O MaxHopCount=17 - - # location of help file - O HelpFile=/usr/share/misc/sendmail.hf - - # ignore dots as terminators in incoming messages? - #O IgnoreDots - - # name resolver options - #O ResolverOptions=+AAONLY - - # deliver MIME-encapsulated error messages? - O SendMimeErrors=True - - # Forward file search path - O ForwardPath=$z/.forward.$w:$z/.forward - - # open connection cache size - O ConnectionCacheSize=2 - - # open connection cache timeout - O ConnectionCacheTimeout=5m - - # persistent host status directory - #O HostStatusDirectory=.hoststat - - # single thread deliveries (requires HostStatusDirectory)? - #O SingleThreadDelivery - - # use Errors-To: header? - O UseErrorsTo=False - - # log level - O LogLevel=9 - - # send to me too, even in an alias expansion? - #O MeToo - - # verify RHS in newaliases? - O CheckAliases=False - - # default messages to old style headers if no special punctuation? - O OldStyleHeaders=True - - # SMTP daemon options - #O DaemonPortOptions=Port=esmtp - - # privacy flags - O PrivacyOptions=authwarnings - - # who (if anyone) should get extra copies of error messages - #O PostMasterCopy=Postmaster - - # slope of queue-only function - #O QueueFactor=600000 - - # queue directory - O QueueDirectory=/var/spool/mqueue - - # timeouts (many of these) - #O Timeout.initial=5m - #O Timeout.connect=5m - #O Timeout.iconnect=5m - #O Timeout.helo=5m - #O Timeout.mail=10m - #O Timeout.rcpt=1h - #O Timeout.datainit=5m - #O Timeout.datablock=1h - #O Timeout.datafinal=1h - #O Timeout.rset=5m - #O Timeout.quit=2m - #O Timeout.misc=2m - #O Timeout.command=1h - #O Timeout.ident=30s - #O Timeout.fileopen=60s - O Timeout.queuereturn=5d - #O Timeout.queuereturn.normal=5d - #O Timeout.queuereturn.urgent=2d - #O Timeout.queuereturn.non-urgent=7d - O Timeout.queuewarn=4h - #O Timeout.queuewarn.normal=4h - #O Timeout.queuewarn.urgent=1h - #O Timeout.queuewarn.non-urgent=12h - #O Timeout.hoststatus=30m - - # should we not prune routes in route-addr syntax addresses? - #O DontPruneRoutes - - # queue up everything before forking? - O SuperSafe=True - - # status file - O StatusFile=/var/log/sendmail.st - - # time zone handling: - # if undefined, use system default - # if defined but null, use TZ envariable passed in - # if defined and non-null, use that info - #O TimeZoneSpec= - - # default UID (can be username or userid:groupid) - O DefaultUser=1:1 - - # list of locations of user database file (null means no lookup) - #O UserDatabaseSpec=/etc/userdb - - # fallback MX host - #O FallbackMXhost=fall.back.host.net - - # if we are the best MX host for a site, try it directly instead of config err - #O TryNullMXList - - # load average at which we just queue messages - #O QueueLA=8 - - # load average at which we refuse connections - #O RefuseLA=12 - - # maximum number of children we allow at one time - #O MaxDaemonChildren=12 - - # maximum number of new connections per second - #O ConnectionRateThrottle=3 - - # work recipient factor - #O RecipientFactor=30000 - - # deliver each queued job in a separate process? - #O ForkEachJob - - # work class factor - #O ClassFactor=1800 - - # work time factor - #O RetryFactor=90000 - - # shall we sort the queue by hostname first? - #O QueueSortOrder=priority - - # minimum time in queue before retry - #O MinQueueAge=30m - - # default character set - #O DefaultCharSet=iso-8859-1 - - # service switch file (ignored on Solaris, Ultrix, OSF/1, others) - #O ServiceSwitchFile=/etc/service.switch - - # hosts file (normally /etc/hosts) - #O HostsFile=/etc/hosts - - # dialup line delay on connection failure - #O DialDelay=10s - - # action to take if there are no recipients in the message - #O NoRecipientAction=add-to-undisclosed - - # chrooted environment for writing to files - #O SafeFileEnvironment=/arch - - # are colons OK in addresses? - #O ColonOkInAddr - - # how many jobs can you process in the queue? - #O MaxQueueRunSize=10000 - - # shall I avoid expanding CNAMEs (violates protocols)? - #O DontExpandCnames - - # SMTP initial login message (old $e macro) - O SmtpGreetingMessage=$j Sendmail $v/$Z; $b - - # UNIX initial From header format (old $l macro) - O UnixFromLine=From $g $d - - # delimiter (operator) characters (old $o macro) - O OperatorChars=.:%@!^/[]+ - - # shall I avoid calling initgroups(3) because of high NIS costs? - #O DontInitGroups - - # are group-writable :include: and .forward files (un)trustworthy? - #O UnsafeGroupWrites - - # where do errors that occur when sending errors get sent? - #O DoubleBounceAddress - - # what user id do we assume for the majority of the processing? - #O RunAsUser=sendmail - - ########################### - # Message precedences # - ########################### - - Pfirst-class=0 - Pspecial-delivery=100 - Plist=-30 - Pbulk=-60 - Pjunk=-100 - - ##################### - # Trusted users # - ##################### - - # this is equivalent to setting class "t" - #Ft/etc/sendmail.ct - Troot - Tdaemon - Tuucp - - ######################### - # Format of headers # - ######################### - - H?P?Return-Path: <$g> - HReceived: $?sfrom $s $.$?_($?s$|from $.$_) - $.by $j ($v/$Z)$?r with $r$. id $i$?u - for $u; $|; - $.$b - H?D?Resent-Date: $a - H?D?Date: $a - H?F?Resent-From: <$g> - H?F?From: <$g> - H?x?Full-Name: $x - # HPosted-Date: $a - # H?l?Received-Date: $b - H?M?Resent-Message-Id: <$t.$i@$j> - H?M?Message-Id: <$t.$i@$j> - - - ##### @(#)nullrelay.m4 8.12 (Berkeley) 10/12/96 ##### - - # - # This configuration applies only to relay-only hosts. They send - # all mail to a hub without consideration of the address syntax - # or semantics, except for adding the hub qualification to the - # addresses. - # - # This is based on a prototype done by Bryan Costales of ICSI. - # - - ###################################################################### - ###################################################################### - ##### - ##### REWRITING RULES - ##### - ###################################################################### - ###################################################################### - - ########################################### - ### Rulset 3 -- Name Canonicalization ### - ########################################### - S3 - - # handle null input - R$@ $@ <@> - - # strip group: syntax (not inside angle brackets!) and trailing semicolon - R$* $: $1 <@> mark addresses - R$* < $* > $* <@> $: $1 < $2 > $3 unmark - R$* :: $* <@> $: $1 :: $2 unmark node::addr - R:include: $* <@> $: :include: $1 unmark :include:... - R$* : $* <@> $: $2 strip colon if marked - R$* <@> $: $1 unmark - R$* ; $: $1 strip trailing semi - - # null input now results from list:; syntax - R$@ $@ :; <@> - - # basic textual canonicalization -- note RFC733 heuristic here - R$* $: < $1 > housekeeping <> - R$+ < $* > < $2 > strip excess on left - R< $* > $+ < $1 > strip excess on right - R<> $@ < @ > MAIL FROM:<> case - R< $+ > $: $1 remove housekeeping <> - - # eliminate local host if present - R@ $=w $=: $+ $@ @ $M $2 $3 @thishost ... - R@ $+ $@ @ $1 @somewhere ... - - R$=E @ $=w $@ $1 @ $2 leave exposed - R$+ @ $=w $@ $1 @ $M ...@thishost - R$+ @ $+ $@ $1 @ $2 ...@somewhere - - R$=w ! $=E $@ $2 @ $1 leave exposed - R$=w ! $+ $@ $2 @ $M thishost!... - R$+ ! $+ $@ $1 ! $2 @ $M somewhere ! ... - - R$=E % $=w $@ $1 @ $2 leave exposed - R$+ % $=w $@ $1 @ $M ...%thishost - R$+ % $+ $@ $1 @ $2 ...%somewhere - - R$=E $@ $1 @ $j leave exposed - R$+ $@ $1 @ $M unadorned user - - - ###################################### - ### Ruleset 0 -- Parse Address ### - ###################################### - - S0 - - R$*:;<@> $#error $@ USAGE $: "list:; syntax illegal for recipient addresses" - - # pass everything else to a relay host - R$* $#nullclient $@ $H $: $1 - - - ################################################## - ### Ruleset 4 -- Final Output Post-rewriting ### - ################################################## - S4 - - R$* <@> $@ handle <> and list:; - - # strip trailing dot off before passing to nullclient relay - R$* @ $+ . $1 @ $2 - - # - ###################################################################### - ###################################################################### - ##### - ##### MAILER DEFINITIONS - ##### - ###################################################################### - ###################################################################### - - ############################################ - ### Null Client Mailer specification ### - ############################################ - - - Mnullclient, P=[IPC], F=mDFMuXa, - A=IPC $h - - - ################################################## - ### Local and Program Mailer specification ### - ################################################## - - ##### @(#)local.m4 8.23 (Berkeley) 5/31/96 ##### - - Mlocal, P=/usr/libexec/mail.local, F=lsDFMAw5:/|@qrmn9, S=10/30, R=20/40, - T=DNS/RFC822/X-Unix, - A=mail -d $u - Mprog, P=/bin/sh, F=lsDFMoqeu9, S=10/30, R=20/40, D=$z:/, - T=X-Unix, - A=sh -c $u - - # - # Envelope sender rewriting - # - S10 - R<@> $n errors to mailer-daemon - R$+ $: $>50 $1 add local domain if needed - R$* $: $>94 $1 do masquerading - - # - # Envelope recipient rewriting - # - S20 - R$+ < @ $* > $: $1 strip host part - - # - # Header sender rewriting - # - S30 - R<@> $n errors to mailer-daemon - R$+ $: $>50 $1 add local domain if needed - R$* $: $>93 $1 do masquerading - - # - # Header recipient rewriting - # - S40 - R$+ $: $>50 $1 add local domain if needed - #R$* $: $>93 $1 do all-masquerading - - # - # Common code to add local domain name (only if always-add-domain) - # - S50 - #R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified - #R$+ $@ $1 < @ *LOCAL* > add local qualification --- 0 ---- diff -Ncr sendmail-8.8.5/cf/cf/s2k-osf1.mc sendmail-8.8.6/cf/cf/s2k-osf1.mc *** sendmail-8.8.5/cf/cf/s2k-osf1.mc Sat Mar 23 18:22:58 1996 --- sendmail-8.8.6/cf/cf/s2k-osf1.mc Tue Jun 3 17:14:53 1997 *************** *** 35,41 **** # # This is a Berkeley-specific configuration file for OSF/1. ! # It applies only the the Sequoia 2000 Project at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the --- 35,41 ---- # # This is a Berkeley-specific configuration file for OSF/1. ! # It applies only to the Sequoia 2000 Project at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the *************** *** 44,50 **** # divert(0)dnl ! VERSIONID(`@(#)s2k-osf1.mc 8.4 (Berkeley) 3/23/96') OSTYPE(osf1)dnl DOMAIN(S2K.Berkeley.EDU)dnl MAILER(local)dnl --- 44,50 ---- # divert(0)dnl ! VERSIONID(`@(#)s2k-osf1.mc 8.5 (Berkeley) 6/3/97') OSTYPE(osf1)dnl DOMAIN(S2K.Berkeley.EDU)dnl MAILER(local)dnl diff -Ncr sendmail-8.8.5/cf/cf/s2k-ultrix4.mc sendmail-8.8.6/cf/cf/s2k-ultrix4.mc *** sendmail-8.8.5/cf/cf/s2k-ultrix4.mc Sat Mar 23 18:22:59 1996 --- sendmail-8.8.6/cf/cf/s2k-ultrix4.mc Tue Jun 3 17:14:53 1997 *************** *** 35,41 **** # # This is a Berkeley-specific configuration file for Ultrix 4.x. ! # It applies only the the Sequoia 2000 Project at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the --- 35,41 ---- # # This is a Berkeley-specific configuration file for Ultrix 4.x. ! # It applies only to the Sequoia 2000 Project at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the *************** *** 44,50 **** # divert(0)dnl ! VERSIONID(`@(#)s2k-ultrix4.mc 8.4 (Berkeley) 3/23/96') OSTYPE(ultrix4)dnl DOMAIN(S2K.Berkeley.EDU)dnl MAILER(local)dnl --- 44,50 ---- # divert(0)dnl ! VERSIONID(`@(#)s2k-ultrix4.mc 8.5 (Berkeley) 6/3/97') OSTYPE(ultrix4)dnl DOMAIN(S2K.Berkeley.EDU)dnl MAILER(local)dnl diff -Ncr sendmail-8.8.5/cf/cf/sample.simple.mc sendmail-8.8.6/cf/cf/sample.simple.mc *** sendmail-8.8.5/cf/cf/sample.simple.mc Fri Apr 11 13:11:25 1997 --- sendmail-8.8.6/cf/cf/sample.simple.mc Wed Dec 31 16:00:00 1969 *************** *** 1,3 **** - VERSIONID("sample-only") - OSTYPE(bsd4.4) - FEATURE(nullclient, mailhub) --- 0 ---- diff -Ncr sendmail-8.8.5/cf/feature/bestmx_is_local.m4 sendmail-8.8.6/cf/feature/bestmx_is_local.m4 *** sendmail-8.8.5/cf/feature/bestmx_is_local.m4 Wed Oct 23 08:43:46 1996 --- sendmail-8.8.6/cf/feature/bestmx_is_local.m4 Mon Apr 7 14:39:39 1997 *************** *** 34,40 **** # divert(0) ! VERSIONID(`@(#)bestmx_is_local.m4 8.4 (Berkeley) 10/23/96') divert(-1) LOCAL_CONFIG --- 34,40 ---- # divert(0) ! VERSIONID(`@(#)bestmx_is_local.m4 8.5 (Berkeley) 3/28/97') divert(-1) LOCAL_CONFIG *************** *** 60,66 **** ifelse(_ARG_, `', `', `#')dnl unlimited bestmx R$* < @ $* > $* $: $1 < @ $2 @@ $(bestmx $2 $) > $3 ifelse(_ARG_, `', `#', `')dnl limit bestmx to $=B ! R$* < @ $* $=B > $* $: $1 < @ $2 $3 @@ $(bestmx $2 $3 $) > $4 R$* $=O $* < @ $* @@ $=w . > $* $@ $>97 $1 $2 $3 R$* < @ $* @@ $=w . > $* $#local $: $1 R$* < @ $* @@ $* > $* $: $1 < @ $2 > $4 --- 60,66 ---- ifelse(_ARG_, `', `', `#')dnl unlimited bestmx R$* < @ $* > $* $: $1 < @ $2 @@ $(bestmx $2 $) > $3 ifelse(_ARG_, `', `#', `')dnl limit bestmx to $=B ! R$* < @ $* $=B . > $* $: $1 < @ $2 $3 . @@ $(bestmx $2 $3 . $) > $4 R$* $=O $* < @ $* @@ $=w . > $* $@ $>97 $1 $2 $3 R$* < @ $* @@ $=w . > $* $#local $: $1 R$* < @ $* @@ $* > $* $: $1 < @ $2 > $4 diff -Ncr sendmail-8.8.5/cf/m4/nullrelay.m4 sendmail-8.8.6/cf/m4/nullrelay.m4 *** sendmail-8.8.5/cf/m4/nullrelay.m4 Sat Oct 12 18:27:40 1996 --- sendmail-8.8.6/cf/m4/nullrelay.m4 Wed Apr 30 08:53:05 1997 *************** *** 34,40 **** # divert(0) ! VERSIONID(`@(#)nullrelay.m4 8.12 (Berkeley) 10/12/96') # # This configuration applies only to relay-only hosts. They send --- 34,40 ---- # divert(0) ! VERSIONID(`@(#)nullrelay.m4 8.13 (Berkeley) 4/30/97') # # This configuration applies only to relay-only hosts. They send *************** *** 68,74 **** R:`include': $* <@> $: :`include': $1 unmark :`include':... R$* : $* <@> $: $2 strip colon if marked R$* <@> $: $1 unmark ! R$* ; $: $1 strip trailing semi # null input now results from list:; syntax R$@ $@ :; <@> --- 68,75 ---- R:`include': $* <@> $: :`include': $1 unmark :`include':... R$* : $* <@> $: $2 strip colon if marked R$* <@> $: $1 unmark ! R$* ; $1 strip trailing semi ! R$* < $* ; > $1 < $2 > bogus bracketed semi # null input now results from list:; syntax R$@ $@ :; <@> diff -Ncr sendmail-8.8.5/cf/m4/proto.m4 sendmail-8.8.6/cf/m4/proto.m4 *** sendmail-8.8.5/cf/m4/proto.m4 Tue Dec 31 12:04:17 1996 --- sendmail-8.8.6/cf/m4/proto.m4 Wed Apr 30 13:33:26 1997 *************** *** 34,40 **** # divert(0) ! VERSIONID(`@(#)proto.m4 8.139 (Berkeley) 12/31/96') MAILER(local)dnl --- 34,40 ---- # divert(0) ! VERSIONID(`@(#)proto.m4 8.149 (Berkeley) 4/30/97') MAILER(local)dnl *************** *** 505,511 **** R$* : $* [ $* ] $: $1 : $2 [ $3 ] <@> remark if leading colon R$* : $* <@> $: $2 strip colon if marked R$* <@> $: $1 unmark ! R$* ; $: $1 strip trailing semi # null input now results from list:; syntax R$@ $@ :; <@> --- 505,512 ---- R$* : $* [ $* ] $: $1 : $2 [ $3 ] <@> remark if leading colon R$* : $* <@> $: $2 strip colon if marked R$* <@> $: $1 unmark ! R$* ; $1 strip trailing semi ! R$* < $* ; > $1 < $2 > bogus bracketed semi # null input now results from list:; syntax R$@ $@ :; <@> *************** *** 593,601 **** ifdef(`_CLASS_Y_', `R$* < @ $=Y . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') # try UUCP traffic as a local address ! R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3 ! R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3') ') # pass to name server to make hostname canonical ifdef(`_NO_CANONIFY_', `#')dnl --- 594,604 ---- ifdef(`_CLASS_Y_', `R$* < @ $=Y . UUCP > $* $@ $1 < @ $2 . UUCP . > $3', `dnl') + define(`X', ifdef(`_NO_CANONIFY_', `#', `'))dnl # try UUCP traffic as a local address ! X`'R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3 ! X`'R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3') ! undefine(`X')dnl ') # pass to name server to make hostname canonical ifdef(`_NO_CANONIFY_', `#')dnl *************** *** 604,610 **** # local host aliases and pseudo-domains are always canonical R$* < @ $=w > $* $: $1 < @ $2 . > $3 R$* < @ $j > $* $: $1 < @ $j . > $2 ! R$* < @ $* $=M > $* $: $1 < @ $2 $3 . > $4 R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4 R$* < @ $* . . > $* $1 < @ $2 . > $3 --- 607,615 ---- # local host aliases and pseudo-domains are always canonical R$* < @ $=w > $* $: $1 < @ $2 . > $3 R$* < @ $j > $* $: $1 < @ $j . > $2 ! ifdef(`_MASQUERADE_ENTIRE_DOMAIN_', ! `R$* < @ $* $=M > $* $: $1 < @ $2 $3 . > $4', ! `R$* < @ $=M > $* $: $1 < @ $2 . > $3') R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4 R$* < @ $* . . > $* $1 < @ $2 . > $3 *************** *** 656,661 **** --- 661,671 ---- S0 + R$* $: $>Parse0 $1 initial parsing + R$* $: $>98 $1 handle local hacks + R$* $: $>Parse1 $1 final parsing + + SParse0 R<@> $#_LOCAL_ $: <@> special case error msgs R$* : $* ; <@> $#error $@ 5.1.3 $: "list:; syntax illegal for recipient addresses" R<@ $+> $#error $@ 5.1.1 $: "user address required" *************** *** 664,669 **** --- 674,680 ---- R<> $* <$* : $* > $* $#error $@ 5.1.1 $: "colon illegal in host name part" R<> $* $1 R$* < @ . $* > $* $#error $@ 5.1.2 $: "invalid host name" + R$* < @ $* .. $* > $* $#error $@ 5.1.2 $: "invalid host name" ifdef(`_MAILER_smtp_', `# handle numeric address spec *************** *** 672,691 **** `dnl') # now delete the local info -- note $=O to find characters that cause forwarding ! R$* < @ > $* $@ $>97 $1 user@ => user ! R< @ $=w . > : $* $@ $>97 $2 @here:... -> ... R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here R< @ $+ > $#error $@ 5.1.1 $: "user address required" ! R$* $=O $* < @ $=w . > $@ $>97 $1 $2 $3 ...@here -> ... ! ! # handle local hacks ! R$* $: $>98 $1 # handle virtual users define(`X', ifdef(`VIRTUSER_TABLE', `', `#'))dnl X`'R$+ < @ $=w . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . > ! X`'R< @ > $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . > ! X`'R< @ > $+ $: $1 X`'R< error : $- $+ > $* $#error $@ $( dequote $1 $) $: $2 X`'R< $+ > $+ < @ $+ > $: $>97 $1 undefine(`X')dnl --- 683,704 ---- `dnl') # now delete the local info -- note $=O to find characters that cause forwarding ! R$* < @ > $* $@ $>Parse0 $>3 $1 user@ => user ! R< @ $=w . > : $* $@ $>Parse0 $>3 $2 @here:... -> ... R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here R< @ $+ > $#error $@ 5.1.1 $: "user address required" ! R$* $=O $* < @ $=w . > $@ $>Parse0 $>3 $1 $2 $3 ...@here -> ... + SParse1 # handle virtual users define(`X', ifdef(`VIRTUSER_TABLE', `', `#'))dnl X`'R$+ < @ $=w . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . > ! X`'R<@> $+ + $* < @ $* . > ! $: < $(virtuser $1 + * @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 . > ! X`'R<@> $+ + $* < @ $* . > ! $: < $(virtuser $1 @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 . > ! X`'R<@> $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . > ! X`'R<@> $+ $: $1 X`'R< error : $- $+ > $* $#error $@ $( dequote $1 $) $: $2 X`'R< $+ > $+ < @ $+ > $: $>97 $1 undefine(`X')dnl *************** *** 779,804 **** # deal with plussed users so aliases work nicely R$+ + * $#_LOCAL_ $@ $&h $: $1 ! R$+ + $* $#_LOCAL_ $@ $2 $: $1 + * # prepend an empty "forward host" on the front R$+ $: <> $1 define(`X', ifdef(`LUSER_RELAY', `', `#'))dnl # send unrecognized local users to a relay host - X`'R< > $+ + $* $: < $L . > $( user $1 $) + $2 X`'R< > $+ $: < $L . > $( user $1 $) look up user X`'R< $* > $+ <> $* $: < > $2 $3 found; strip $L X`'R< $* . > $+ $: < $1 > $2 strip extra dot undefine(`X')dnl - # handle plussed local names - R< > $+ + $* $#_LOCAL_ $@ $2 $: $1 - # see if we have a relay or a hub R< > $+ $: < $H > $1 try hub R< > $+ $: < $R > $1 try relay ! R< > $+ $@ $1 nope, give up R< local : $* > $* $: $>95 < local : $1 > $2 no host extension R< error : $* > $* $: $>95 < error : $1 > $2 no host extension R< $- : $+ > $+ $: $>95 < $1 : $2 > $3 < @ $2 > --- 792,817 ---- # deal with plussed users so aliases work nicely R$+ + * $#_LOCAL_ $@ $&h $: $1 ! R$+ + $* $#_LOCAL_ $@ + $2 $: $1 + * # prepend an empty "forward host" on the front R$+ $: <> $1 define(`X', ifdef(`LUSER_RELAY', `', `#'))dnl # send unrecognized local users to a relay host X`'R< > $+ $: < $L . > $( user $1 $) look up user X`'R< $* > $+ <> $* $: < > $2 $3 found; strip $L X`'R< $* . > $+ $: < $1 > $2 strip extra dot undefine(`X')dnl # see if we have a relay or a hub R< > $+ $: < $H > $1 try hub R< > $+ $: < $R > $1 try relay ! R< > $+ $: < > < $1 $(dequote "" $&h $) > nope, restore +detail ! R< > < $+ + $* > $* < > < $1 > + $2 $3 find the user part ! R< > < $+ > + $* $#_LOCAL_ $@ $2 $: @ $1 strip the extra + ! R< > < $+ > $@ $1 no +detail ! R$+ $: $1 $(dequote "" $&h $) add +detail back in R< local : $* > $* $: $>95 < local : $1 > $2 no host extension R< error : $* > $* $: $>95 < error : $1 > $2 no host extension R< $- : $+ > $+ $: $>95 < $1 : $2 > $3 < @ $2 > *************** *** 840,854 **** R< $* > $* < @ $* . > $: < $1 > $2 < @ $3 > # handle local: syntax -- use old user, either with or without host ! R< > $* < @ $* > $* $#local $@ $1@$2 $: $1 ! R< > $+ $#local $@ $1 $: $1 # handle local:user@host syntax -- ignore host part ! R< $+ @ $+ > $* $: < $1 > $3 # handle local:user syntax ! R< $+ > $* <@ $* > $* $#local $@ $2@$3 $: $1 ! R< $+ > $* $#local $@ $2 $: $1 ################################################################### ### Ruleset 93 -- convert header names to masqueraded form ### --- 853,867 ---- R< $* > $* < @ $* . > $: < $1 > $2 < @ $3 > # handle local: syntax -- use old user, either with or without host ! R< > $* < @ $* > $* $#_LOCAL_ $@ $1@$2 $: $1 ! R< > $+ $#_LOCAL_ $@ $1 $: $1 # handle local:user@host syntax -- ignore host part ! R< $+ @ $+ > $* < @ $* > $: < $1 > $3 < @ $4 > # handle local:user syntax ! R< $+ > $* <@ $* > $* $#_LOCAL_ $@ $2@$3 $: $1 ! R< $+ > $* $#_LOCAL_ $@ $2 $: $1 ################################################################### ### Ruleset 93 -- convert header names to masqueraded form ### diff -Ncr sendmail-8.8.5/cf/m4/version.m4 sendmail-8.8.6/cf/m4/version.m4 *** sendmail-8.8.5/cf/m4/version.m4 Tue Jan 21 08:43:31 1997 --- sendmail-8.8.6/cf/m4/version.m4 Sat Jun 14 08:22:08 1997 *************** *** 32,39 **** # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ! VERSIONID(`@(#)version.m4 8.8.5.3 (Berkeley) 1/21/97') # divert(0) # Configuration version number ! DZ8.8.5`'ifdef(`confCF_VERSION', `/confCF_VERSION') --- 32,39 ---- # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ! VERSIONID(`@(#)version.m4 8.8.6.1 (Berkeley) 6/14/97') # divert(0) # Configuration version number ! DZ8.8.6`'ifdef(`confCF_VERSION', `/confCF_VERSION') diff -Ncr sendmail-8.8.5/cf/mailer/mail11.m4 sendmail-8.8.6/cf/mailer/mail11.m4 *** sendmail-8.8.5/cf/mailer/mail11.m4 Tue May 23 12:05:20 1995 --- sendmail-8.8.6/cf/mailer/mail11.m4 Mon Apr 7 14:39:40 1997 *************** *** 15,26 **** ifdef(`MAIL11_MAILER_FLAGS',, `define(`MAIL11_MAILER_FLAGS', nsFx)') ifdef(`MAIL11_MAILER_ARGS',, `define(`MAIL11_MAILER_ARGS', mail11 $g $x $h $u)') define(`_USE_DECNET_SYNTAX_') POPDIVERT PUSHDIVERT(3) # DECNET delivery ! R$* < @ $=w .DECNET. > $#local $: $1 local DECnet R$+ < @ $+ .DECNET. > $#mail11 $@ $2 $: $1 DECnet user POPDIVERT --- 15,27 ---- ifdef(`MAIL11_MAILER_FLAGS',, `define(`MAIL11_MAILER_FLAGS', nsFx)') ifdef(`MAIL11_MAILER_ARGS',, `define(`MAIL11_MAILER_ARGS', mail11 $g $x $h $u)') define(`_USE_DECNET_SYNTAX_') + define(`_LOCAL_', ifdef(`confLOCAL_MAILER', confLOCAL_MAILER, `local')) POPDIVERT PUSHDIVERT(3) # DECNET delivery ! R$* < @ $=w .DECNET. > $#_LOCAL_ $: $1 local DECnet R$+ < @ $+ .DECNET. > $#mail11 $@ $2 $: $1 DECnet user POPDIVERT *************** *** 32,38 **** ### UTK-MAIL11 Mailer specification ### ########################################### ! VERSIONID(`@(#)mail11.m4 8.1 (Berkeley) 5/23/95') Mmail11, P=MAIL11_MAILER_PATH, F=MAIL11_MAILER_FLAGS, S=15, R=25, A=MAIL11_MAILER_ARGS --- 33,39 ---- ### UTK-MAIL11 Mailer specification ### ########################################### ! VERSIONID(`@(#)mail11.m4 8.4 (Berkeley) 3/18/97') Mmail11, P=MAIL11_MAILER_PATH, F=MAIL11_MAILER_FLAGS, S=15, R=25, A=MAIL11_MAILER_ARGS diff -Ncr sendmail-8.8.5/cf/mailer/procmail.m4 sendmail-8.8.6/cf/mailer/procmail.m4 *** sendmail-8.8.5/cf/mailer/procmail.m4 Thu Dec 28 07:40:54 1995 --- sendmail-8.8.6/cf/mailer/procmail.m4 Wed Apr 30 10:14:32 1997 *************** *** 38,46 **** `define(`PROCMAIL_MAILER_PATH', PROCMAIL_PATH)', `define(`PROCMAIL_MAILER_PATH', /usr/local/bin/procmail)')') ifdef(`PROCMAIL_MAILER_FLAGS',, ! `define(`PROCMAIL_MAILER_FLAGS', `Shu')') ifdef(`PROCMAIL_MAILER_ARGS',, ! `define(`PROCMAIL_MAILER_ARGS', `procmail -m $h $f $u')') POPDIVERT --- 38,46 ---- `define(`PROCMAIL_MAILER_PATH', PROCMAIL_PATH)', `define(`PROCMAIL_MAILER_PATH', /usr/local/bin/procmail)')') ifdef(`PROCMAIL_MAILER_FLAGS',, ! `define(`PROCMAIL_MAILER_FLAGS', `SPhnu9')') ifdef(`PROCMAIL_MAILER_ARGS',, ! `define(`PROCMAIL_MAILER_ARGS', `procmail -Y -m $h $f $u')') POPDIVERT *************** *** 48,54 **** ### PROCMAIL Mailer specification ### ##################*****################## ! VERSIONID(`@(#)procmail.m4 8.5 (Berkeley) 12/28/95') ! Mprocmail, P=PROCMAIL_MAILER_PATH, F=CONCAT(`DFMm', PROCMAIL_MAILER_FLAGS), S=11/31, R=21/31, T=DNS/RFC822/X-Unix, ifdef(`PROCMAIL_MAILER_MAX', `M=PROCMAIL_MAILER_MAX, ')A=PROCMAIL_MAILER_ARGS --- 48,54 ---- ### PROCMAIL Mailer specification ### ##################*****################## ! VERSIONID(`@(#)procmail.m4 8.6 (Berkeley) 4/30/97') ! Mprocmail, P=PROCMAIL_MAILER_PATH, F=CONCAT(`DFM', PROCMAIL_MAILER_FLAGS), S=11/31, R=21/31, T=DNS/RFC822/X-Unix, ifdef(`PROCMAIL_MAILER_MAX', `M=PROCMAIL_MAILER_MAX, ')A=PROCMAIL_MAILER_ARGS diff -Ncr sendmail-8.8.5/cf/mailer/uucp.m4 sendmail-8.8.6/cf/mailer/uucp.m4 *** sendmail-8.8.5/cf/mailer/uucp.m4 Sat Mar 23 17:00:21 1996 --- sendmail-8.8.6/cf/mailer/uucp.m4 Mon Apr 7 14:39:40 1997 *************** *** 44,50 **** ### UUCP Mailer specification ### ##################################### ! VERSIONID(`@(#)uucp.m4 8.24 (Berkeley) 9/5/95') # # There are innumerable variations on the UUCP mailer. It really --- 44,50 ---- ### UUCP Mailer specification ### ##################################### ! VERSIONID(`@(#)uucp.m4 8.25 (Berkeley) 3/16/97') # # There are innumerable variations on the UUCP mailer. It really *************** *** 110,116 **** R:; <@> $@ R$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots ! R$* < @ $j > $1 strip local name R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format R<@ $+ > : $+ $1 ! $2 convert to UUCP format R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format --- 110,116 ---- R:; <@> $@ R$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots ! R$* < @ $=w > $1 strip local name R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format R<@ $+ > : $+ $1 ! $2 convert to UUCP format R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format *************** *** 125,131 **** R:; <@> $@ R$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots ! R$* < @ $j > $1 strip local name R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format R<@ $+ > : $+ $1 ! $2 convert to UUCP format R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format --- 125,131 ---- R:; <@> $@ R$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots ! R$* < @ $=w > $1 strip local name R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format R<@ $+ > : $+ $1 ! $2 convert to UUCP format R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format diff -Ncr sendmail-8.8.5/cf/ostype/gnuhurd.m4 sendmail-8.8.6/cf/ostype/gnuhurd.m4 *** sendmail-8.8.5/cf/ostype/gnuhurd.m4 Wed Dec 31 16:00:00 1969 --- sendmail-8.8.6/cf/ostype/gnuhurd.m4 Mon Apr 7 14:39:43 1997 *************** *** 0 **** --- 1,41 ---- + divert(-1) + # + # Copyright (c) 1983 Eric P. Allman + # Copyright (c) 1988, 1993 + # The Regents of the University of California. All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions + # are met: + # 1. Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # 2. Redistributions in binary form must reproduce the above copyright + # notice, this list of conditions and the following disclaimer in the + # documentation and/or other materials provided with the distribution. + # 3. All advertising materials mentioning features or use of this software + # must display the following acknowledgement: + # This product includes software developed by the University of + # California, Berkeley and its contributors. + # 4. Neither the name of the University nor the names of its contributors + # may be used to endorse or promote products derived from this software + # without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + # + # + + divert(0) + VERSIONID(`@(#)gnuhurd.m4 8.1 (Berkeley) 3/8/97') + ifdef(`HELP_FILE',, `define(`HELP_FILE', /share/misc/sendmail.hf)')dnl + ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/log/sendmail.st)')dnl + ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /libexec/mail.local)')dnl diff -Ncr sendmail-8.8.5/cf/ostype/irix6.m4 sendmail-8.8.6/cf/ostype/irix6.m4 *** sendmail-8.8.5/cf/ostype/irix6.m4 Wed Dec 31 16:00:00 1969 --- sendmail-8.8.6/cf/ostype/irix6.m4 Fri Apr 11 10:33:36 1997 *************** *** 0 **** --- 1,61 ---- + divert(-1) + # + # Copyright (c) 1995 Eric P. Allman + # Copyright (c) 1988, 1993 + # The Regents of the University of California. All rights reserved. + # + # Contributed by Kari E. Hurtta + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions + # are met: + # 1. Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # 2. Redistributions in binary form must reproduce the above copyright + # notice, this list of conditions and the following disclaimer in the + # documentation and/or other materials provided with the distribution. + # 3. All advertising materials mentioning features or use of this software + # must display the following acknowledgement: + # This product includes software developed by the University of + # California, Berkeley and its contributors. + # 4. Neither the name of the University nor the names of its contributors + # may be used to endorse or promote products derived from this software + # without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + # + + # + # Notes: + # - SGI's /etc/sendmail.cf defines also 'u' for local mailer flags -- you + # perhaps don't want it. + # - Perhaps is should also add define(`LOCAL_MAILER_CHARSET', iso-8859-1) + # put some Asian sites may prefer otherwise -- or perhaps not. + # - SGI's /etc/sendmail.cf seems use: A=mail -s -d $u + # It seems work without that -s however. + # - SGI's /etc/sendmail.cf set's default uid and gid to 998 (guest) + # - In SGI seems that TZ variable is needed that correct time is marked to + # syslog + # - helpfile is in /etc/sendmail.hf in SGI's /etc/sendmail.cf + # + + divert(0) + VERSIONID(`@(#)irix6.m4 8.1 (Berkeley) 4/11/97') + ifdef(`LOCAL_MAILER_FLAGS',, `define(`LOCAL_MAILER_FLAGS', Ehmu9)')dnl + ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -s -d $u')')dnl + ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /var/spool/mqueue)')dnl + define(`ALIAS_FILE', /etc/aliases)dnl + ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/sendmail.st)')dnl + ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/sendmail.hf)')dnl + define(`confDEF_USER_ID', `998:998')dnl + define(`confTIME_ZONE', USE_TZ)dnl diff -Ncr sendmail-8.8.5/contrib/etrn.pl sendmail-8.8.6/contrib/etrn.pl *** sendmail-8.8.5/contrib/etrn.pl Fri Nov 22 06:55:08 1996 --- sendmail-8.8.6/contrib/etrn.pl Sat Feb 1 16:45:28 1997 *************** *** 7,13 **** # # hardcoded constants, should work fine for BSD-based systems ! require 'sys/socket.ph'; $sockaddr = 'S n a4 x8'; # system requirements: --- 7,14 ---- # # hardcoded constants, should work fine for BSD-based systems ! use Socket; ! use Getopt::Std; $sockaddr = 'S n a4 x8'; # system requirements: *************** *** 61,113 **** $0 = "$av0 - lookup host FQDN and IP addr"; ($hostname,$aliases,$type,$len,$thisaddr) = gethostbyname($name); ! push(@hosts,$hostname); ! $0 = "$av0 - parsing sendmail.cf"; ! open(CF, "){ ! if (/^Fw.*$/){ # look for a line starting with "Fw" ! $cwfile = $_; ! chop($cwfile); ! $optional = /^Fw-o/; ! $cwfile =~ s,^Fw[^/]*,,; # extract the file name ! } ! } ! close(CF); ! $0 = "$av0 - reading $cwfile"; ! if (open(CW, "<$cwfile")){ ! while (){ ! $thishost = $_; ! chop($thishost); ! push(@hosts, $thishost) unless $thishost =~ $hostname; } ! close(CW); ! } else { ! die "open $cwfile: $!" unless optional; ! } ! $0 = "$av0 - parsing args"; ! $usage = "Usage: $av0 [-wd] host"; ! for $a (@ARGV) { ! die $usage if $a eq "-"; ! while ($a =~ s/^(-.*)([wd])/$1/) { ! eval '$'."flag_$2 += 1"; } - next if $a eq "-"; - die $usage if $a =~ /^-/; - $server = $a; } - $watch = $flag_w; - $debug = $flag_d; - - die $usage unless $server; $0 = "$av0 - building local socket"; ($name,$aliases,$proto) = getprotobyname('tcp'); ($name,$aliases,$port) = getservbyname($port,'tcp') unless $port =~ /^\d+/; - $this = pack($sockaddr, &AF_INET, 0, $thisaddr); # look it up $0 = "$av0 - gethostbyname($server)"; --- 62,117 ---- $0 = "$av0 - lookup host FQDN and IP addr"; ($hostname,$aliases,$type,$len,$thisaddr) = gethostbyname($name); ! $0 = "$av0 - parsing args"; ! $usage = "Usage: $av0 [-wd] host [args]"; ! getopts('dw'); ! $watch = $opt_w; ! $debug = $opt_d; ! $server = shift(@ARGV); ! @hosts = @ARGV; ! die $usage unless $server; ! if (!@hosts) { ! push(@hosts,$hostname); ! $0 = "$av0 - parsing sendmail.cf"; ! open(CF, "){ ! if (/^Fw.*$/){ # look for a line starting with "Fw" ! $cwfile = $_; ! chop($cwfile); ! $optional = /^Fw-o/; ! $cwfile =~ s,^Fw[^/]*,,; # extract the file name ! } ! if (/^Cw(.*)$/){ # look for a line starting with "Cw" ! @cws = split (' ', $1); ! while (@cws) { ! $thishost = shift(@cws); ! push(@hosts, $thishost) unless $thishost =~ "$hostname|localhost"; ! } ! } } ! close(CF); ! if ($cwfile){ ! $0 = "$av0 - reading $cwfile"; ! if (open(CW, "<$cwfile")){ ! while (){ ! $thishost = $_; ! chop($thishost); ! push(@hosts, $thishost) unless $thishost =~ $hostname; ! } ! close(CW); ! } else { ! die "open $cwfile: $!" unless $optional; ! } } } $0 = "$av0 - building local socket"; ($name,$aliases,$proto) = getprotobyname('tcp'); ($name,$aliases,$port) = getservbyname($port,'tcp') unless $port =~ /^\d+/; # look it up $0 = "$av0 - gethostbyname($server)"; *************** *** 119,127 **** $that = pack($sockaddr, &AF_INET, $port, $thataddr); socket(S, &AF_INET, &SOCK_STREAM, $proto) || die "socket: $!"; - $0 = "$av0 - bind to $server"; - bind(S, $this) - || die "bind $hostname,0: $!"; $0 = "$av0 - connect to $server"; print "debug = $debug server = $server\n" if $debug > 8; if (! connect(S, $that)) { --- 123,128 ---- *************** *** 170,176 **** alarm(0); if ($etrn_support){ ! print "ETRN supported\n" if ($debug) &alarm("sending etrn to $server",''); while (@hosts) { $server = shift(@hosts); --- 171,177 ---- alarm(0); if ($etrn_support){ ! print "ETRN supported\n" if ($debug); &alarm("sending etrn to $server",''); while (@hosts) { $server = shift(@hosts); *************** *** 244,250 **** .nr % 0 .\\"'; __END__ .\" ############## END PERL/TROFF TRANSITION ! .TH ETRN 1 "November 16, 1996" .AT 3 .SH NAME etrn \- start mail queue run --- 245,251 ---- .nr % 0 .\\"'; __END__ .\" ############## END PERL/TROFF TRANSITION ! .TH ETRN 1 "January 25, 1997" .AT 3 .SH NAME etrn \- start mail queue run *************** *** 253,263 **** --- 254,275 ---- .RI [ -w ] .RI [ -d ] .IR hostname + .RI [ args ] .SH DESCRIPTION .B etrn will use the SMTP .B etrn command to start mail delivery from the host given on the command line. + .B etrn + usually sends an + .B etrn + for each host the local sendmail accepts e-mail for, but if + .IR args + are specified, + .B etrn + uses these as arguments for the SMTP + .B etrn + commands passed to the host given on the command line. .SH OPTIONS .LP The normal mode of operation for *************** *** 291,296 **** --- 303,311 ---- It is assumed that you are running domain names. .SH CREDITS Leveraged from David Muir Sharnoff's expn.pl script. + Christian von Roques added support for + .IR args + and fixed a couple of bugs. .SH AVAILABILITY The latest version of .B etrn diff -Ncr sendmail-8.8.5/contrib/passwd-to-alias.pl sendmail-8.8.6/contrib/passwd-to-alias.pl *** sendmail-8.8.5/contrib/passwd-to-alias.pl Wed Dec 31 16:00:00 1969 --- sendmail-8.8.6/contrib/passwd-to-alias.pl Wed Mar 19 09:48:07 1997 *************** *** 0 **** --- 1,28 ---- + #!/bin/perl + + # + # Convert GECOS information in password files to alias syntax. + # + # Contributed by Kari E. Hurtta + # + + print "# Generated from passwd by $0\n"; + + while (@a = getpwent) { + ($name,$passwd,$uid,$gid,$quota,$comment,$gcos,$dir,$shell) = @a; + + ($fullname = $gcos) =~ s/,.*$//; + + if (!-d $dir || !-x $shell) { + print "$name: root\n"; + } + + $fullname =~ s/\.*[ _]+\.*/./g; + if ($fullname =~ /^[a-zA-Z]+(\.[a-zA-Z]+)+$/) { + print "$fullname: $name\n"; + } else { + print "# $fullname: $name\n"; + } + }; + + endpwent; diff -Ncr sendmail-8.8.5/doc/op/op.me sendmail-8.8.6/doc/op/op.me *** sendmail-8.8.5/doc/op/op.me Fri Dec 13 10:50:34 1996 --- sendmail-8.8.6/doc/op/op.me Mon Mar 10 07:34:52 1997 *************** *** 30,36 **** .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" ! .\" @(#)op.me 8.103 (Berkeley) 12/13/96 .\" .\" eqn op.me | pic | troff -me .eh 'SMM:08-%''Sendmail Installation and Operation Guide' --- 30,36 ---- .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" ! .\" @(#)op.me 8.104 (Berkeley) 3/10/97 .\" .\" eqn op.me | pic | troff -me .eh 'SMM:08-%''Sendmail Installation and Operation Guide' *************** *** 67,73 **** Eric Allman eric@Sendmail.ORG .sp ! Version 8.103 .sp For Sendmail Version 8.8 .)l --- 67,73 ---- Eric Allman eric@Sendmail.ORG .sp ! Version 8.104 .sp For Sendmail Version 8.8 .)l *************** *** 7020,7036 **** .pp The initialization function is called as .(b ! \fIxxx\fP_map_init(MAP *map, char *mapname, char *args) .)b The .i map is an internal data structure. The - .i mapname - is the name of the map (used for error messages). - The .i args ! is a pointer to the rest of the configuration file line; flags and filenames can be extracted from this line. The initialization function must return .sm TRUE --- 7020,7034 ---- .pp The initialization function is called as .(b ! \fIxxx\fP_map_init(MAP *map, char *args) .)b The .i map is an internal data structure. The .i args ! is a pointer to the portion of the configuration file line ! following the map class name; flags and filenames can be extracted from this line. The initialization function must return .sm TRUE *************** *** 7040,7055 **** .pp The lookup function is called as .(b ! \fIxxx\fP_map_lookup(MAP *map, char buf[], int bufsize, char **av, int *statp) .)b The .i map defines the map internally. ! The parameters .i buf ! and ! .i bufsize ! have the input key. This may be (and often is) used destructively. The .i av --- 7038,7051 ---- .pp The lookup function is called as .(b ! \fIxxx\fP_map_lookup(MAP *map, char buf[], char **av, int *statp) .)b The .i map defines the map internally. ! The .i buf ! has the input key. This may be (and often is) used destructively. The .i av *************** *** 8163,8169 **** .\".sz 10 .\"Eric Allman .\".sp ! .\"Version 8.103 .\".ce 0 .bp 3 .ce --- 8159,8165 ---- .\".sz 10 .\"Eric Allman .\".sp ! .\"Version 8.104 .\".ce 0 .bp 3 .ce diff -Ncr sendmail-8.8.5/mail.local/Makefile.dist sendmail-8.8.6/mail.local/Makefile.dist *** sendmail-8.8.5/mail.local/Makefile.dist Wed Sep 25 08:39:20 1996 --- sendmail-8.8.6/mail.local/Makefile.dist Wed Feb 19 10:44:57 1997 *************** *** 1,13 **** ! # @(#)Makefile.dist 8.3 (Berkeley) 9/25/96 BINDIR= ${DESTDIR}/usr/lib BINOWN= root BINMODE=4555 # For Solaris, uncomment one of the CC= lines and the LIBS= line #CC= cc -Xc #CC= gcc #LIBS= -lsocket -lnsl # Which *roff program has -mandoc support NROFF= groff -Tascii --- 1,15 ---- ! # @(#)Makefile.dist 8.4 (Berkeley) 2/19/97 BINDIR= ${DESTDIR}/usr/lib BINOWN= root BINMODE=4555 # For Solaris, uncomment one of the CC= lines and the LIBS= line + # Also, if you're running 2.6 or later, uncomment the ENVDEF= line #CC= cc -Xc #CC= gcc #LIBS= -lsocket -lnsl + #ENVDEF= -DSOLARIS=20600 # Which *roff program has -mandoc support NROFF= groff -Tascii *************** *** 19,25 **** all: ${ALL} mail.local: mail.local.c ! ${CC} -O -o mail.local mail.local.c ${LIBS} mail.local.0: mail.local.8 ${NROFF} ${MANDOC} mail.local.8 > mail.local.0 --- 21,27 ---- all: ${ALL} mail.local: mail.local.c ! ${CC} -O -o mail.local ${ENVDEF} mail.local.c ${LIBS} mail.local.0: mail.local.8 ${NROFF} ${MANDOC} mail.local.8 > mail.local.0 diff -Ncr sendmail-8.8.5/mail.local/mail.local.0 sendmail-8.8.6/mail.local/mail.local.0 *** sendmail-8.8.5/mail.local/mail.local.0 Wed Dec 31 16:00:00 1969 --- sendmail-8.8.6/mail.local/mail.local.0 Sun Nov 10 13:05:14 1996 *************** *** 0 **** --- 1,47 ---- + MAIL.LOCAL(8) BSD System Manager's Manual MAIL.LOCAL(8) + + NNAAMMEE + mmaaiill..llooccaall - store mail in a mailbox + + SSYYNNOOPPSSIISS + mmaaiill..llooccaall [--ff _f_r_o_m] _u_s_e_r _._._. + + DDEESSCCRRIIPPTTIIOONN + MMaaiill..llooccaall reads the standard input up to an end-of-file and appends it + to each _u_s_e_r_'_s _m_a_i_l file. The _u_s_e_r must be a valid user name. + + The options are as follows: + + --ff _f_r_o_m Specify the sender's name. + + Individual mail messages in the mailbox are delimited by an empty line + followed by a line beginning with the string ``From ''. A line contain- + ing the string ``From '', the sender's name and a time stamp is prepended + to each delivered mail message. A blank line is appended to each mes- + sage. A greater-than character (``>'') is prepended to any line in the + message which could be mistaken for a ``From '' delimiter line. + + The mail files are exclusively locked with flock(2) while mail is append- + ed. + + If the ``biff'' service is returned by getservbyname(3), the biff server + is notified of delivered mail. + + The mmaaiill..llooccaall utility exits 0 on success, and >0 if an error occurs. + + EENNVVIIRROONNMMEENNTT + TZ Used to set the appropriate time zone on the timestamp. + + FFIILLEESS + /tmp/local.XXXXXX temporary files + /var/mail/user user's mailbox directory + + SSEEEE AALLSSOO + mail(1), xsend(1), flock(2), getservbyname(3), comsat(8), send- + mail(8) + + HHIISSTTOORRYY + A superset of mmaaiill..llooccaall (handling mailbox reading as well as mail deliv- + ery) appeared in Version 7 AT&T UNIX. as the program mmaaiill. + + BSDI BSD/OS December 11, 1993 1 diff -Ncr sendmail-8.8.5/mail.local/mail.local.c sendmail-8.8.6/mail.local/mail.local.c *** sendmail-8.8.5/mail.local/mail.local.c Sun Nov 24 14:15:27 1996 --- sendmail-8.8.6/mail.local/mail.local.c Wed May 28 08:46:15 1997 *************** *** 38,44 **** #endif /* not lint */ #ifndef lint ! static char sccsid[] = "@(#)mail.local.c 8.34 (Berkeley) 11/24/96"; #endif /* not lint */ /* --- 38,44 ---- #endif /* not lint */ #ifndef lint ! static char sccsid[] = "@(#)mail.local.c 8.39 (Berkeley) 5/28/97"; #endif /* not lint */ /* *************** *** 86,91 **** --- 86,92 ---- #if defined(_AIX) # define USE_LOCKF 1 + # define USET_SETEUID 1 # define USE_VSYSLOG 0 #endif *************** *** 146,154 **** # define _BSD_VA_LIST_ va_list #endif #if !defined(BSD4_4) && !defined(linux) extern char *strerror __P((int)); ! extern int snprintf __P((char *, int, const char *, ...)); extern FILE *fdopen __P((int, const char *)); #endif --- 147,163 ---- # define _BSD_VA_LIST_ va_list #endif + #if defined(BSD4_4) || defined(linux) + # define HASSNPRINTF 1 + #endif + + #if SOLARIS >= 20600 || (SOLARIS < 10000 && SOLARIS >= 206) + # define HASSNPRINTF 1 /* has snprintf starting in 2.6 */ + #endif + #if !defined(BSD4_4) && !defined(linux) extern char *strerror __P((int)); ! extern int snprintf __P((char *, size_t, const char *, ...)); extern FILE *fdopen __P((int, const char *)); #endif *************** *** 374,382 **** */ tryagain: lockmbox(path); ! if (lstat(path, &sb)) { mbfd = open(path, O_APPEND|O_CREAT|O_EXCL|O_WRONLY, S_IRUSR|S_IWUSR); if (mbfd == -1) { if (errno == EEXIST) goto tryagain; --- 383,395 ---- */ tryagain: lockmbox(path); ! if (lstat(path, &sb) < 0) { mbfd = open(path, O_APPEND|O_CREAT|O_EXCL|O_WRONLY, S_IRUSR|S_IWUSR); + if (lstat(path, &sb) < 0) + goto filechanged; + else + sb.st_uid = pw->pw_uid; if (mbfd == -1) { if (errno == EEXIST) goto tryagain; *************** *** 395,414 **** goto err0; } else { mbfd = open(path, O_APPEND|O_WRONLY, 0); - if (mbfd != -1 && - (fstat(mbfd, &fsb) || fsb.st_nlink != 1 || - !S_ISREG(fsb.st_mode) || sb.st_dev != fsb.st_dev || - sb.st_ino != fsb.st_ino || sb.st_uid != fsb.st_uid)) { - eval = EX_CANTCREAT; - warn("%s: file changed after open", path); - goto err1; - } } if (mbfd == -1) { e_to_sys(errno); warn("%s: %s", path, strerror(errno)); goto err0; } /* Wait until we can get a lock on the file. */ --- 408,427 ---- goto err0; } else { mbfd = open(path, O_APPEND|O_WRONLY, 0); } if (mbfd == -1) { e_to_sys(errno); warn("%s: %s", path, strerror(errno)); goto err0; + } else if (fstat(mbfd, &fsb) < 0 || + fsb.st_nlink != 1 || sb.st_nlink != 1 || + !S_ISREG(fsb.st_mode) || sb.st_dev != fsb.st_dev || + sb.st_ino != fsb.st_ino || sb.st_uid != fsb.st_uid) { + filechanged: + eval = EX_CANTCREAT; + warn("%s: file changed after open", path); + goto err1; } /* Wait until we can get a lock on the file. */ *************** *** 474,482 **** if (close(mbfd)) { e_to_sys(errno); warn("%s: %s", path, strerror(errno)); ! unlockmbox(); ! return; ! } if (setreuid(0, 0) < 0) { e_to_sys(errno); --- 487,495 ---- if (close(mbfd)) { e_to_sys(errno); warn("%s: %s", path, strerror(errno)); ! truncate(path, curoff); ! } else ! notifybiff(biffmsg); if (setreuid(0, 0) < 0) { e_to_sys(errno); *************** *** 486,492 **** printf("reset euid = %d\n", geteuid()); #endif unlockmbox(); - notifybiff(biffmsg); } /* --- 499,504 ---- *************** *** 507,512 **** --- 519,526 ---- if (locked) return; + if (strlen(path) + 6 > sizeof lockname) + return; sprintf(lockname, "%s.lock", path); for (;; sleep(5)) { int fd; *************** *** 761,776 **** return ebuf; } ! # endif ! #if !defined(BSD4_4) && !defined(linux) # if __STDC__ ! snprintf(char *buf, int bufsiz, const char *fmt, ...) # else snprintf(buf, bufsiz, fmt, va_alist) char *buf; ! int bufsiz; const char *fmt; va_dcl # endif --- 775,790 ---- return ebuf; } ! #endif /* !defined(BSD4_4) && !defined(__osf__) */ ! #if !HASSNPRINTF # if __STDC__ ! snprintf(char *buf, size_t bufsiz, const char *fmt, ...) # else snprintf(buf, bufsiz, fmt, va_alist) char *buf; ! size_t bufsiz; const char *fmt; va_dcl # endif *************** *** 786,792 **** va_end(ap); } ! #endif #ifdef ultrix --- 800,806 ---- va_end(ap); } ! #endif /* !HASSNPRINTF */ #ifdef ultrix *************** *** 879,885 **** break; if (*trv == '/') { *trv = '\0'; ! if (stat(path, &sbuf)) return(0); if (!S_ISDIR(sbuf.st_mode)) { errno = ENOTDIR; --- 893,899 ---- break; if (*trv == '/') { *trv = '\0'; ! if (stat(path, &sbuf) < 0) return(0); if (!S_ISDIR(sbuf.st_mode)) { errno = ENOTDIR; *************** *** 898,904 **** if (errno != EEXIST) return(0); } ! else if (stat(path, &sbuf)) return(errno == ENOENT ? 1 : 0); /* tricky little algorithm for backward compatibility */ --- 912,918 ---- if (errno != EEXIST) return(0); } ! else if (stat(path, &sbuf) < 0) return(errno == ENOENT ? 1 : 0); /* tricky little algorithm for backward compatibility */ *************** *** 919,922 **** /*NOTREACHED*/ } ! #endif --- 933,936 ---- /*NOTREACHED*/ } ! #endif /* ultrix */ diff -Ncr sendmail-8.8.5/mailstats/mailstats.0 sendmail-8.8.6/mailstats/mailstats.0 *** sendmail-8.8.5/mailstats/mailstats.0 Wed Dec 31 16:00:00 1969 --- sendmail-8.8.6/mailstats/mailstats.0 Sat Sep 21 17:14:59 1996 *************** *** 0 **** --- 1,47 ---- + MAILSTATS(1) BSD Reference Manual MAILSTATS(1) + + NNAAMMEE + mmaaiillssttaattss - display mail statistics + + SSYYNNOOPPSSIISS + mmaaiillssttaattss [--oo] [--CC _c_f_f_i_l_e] [--ff _s_t_f_i_l_e] + + DDEESSCCRRIIPPTTIIOONN + The mmaaiillssttaattss utility displays the current mail statistics. + + First, the time at which statistics started being kept is displayed, in + the format specified by ctime(3). Then, the statistics for each mailer + are displayed on a single line, each with the following whitespace sepa- + rated fields: + + MM The mailer number. + mmssggssffrr Number of messages from the mailer. + bbyytteess__ffrroomm Kbytes from the mailer. + mmssggssttoo Number of messages to the mailer. + bbyytteess__ttoo Kbytes to the mailer. + MMaaiilleerr The name of the mailer. + + After this display, a line totaling the values for all of the mailers is + displayed, separated from the previous information by a line containing + only equals (``='') characters. + + The options are as follows: + + --CC Read the specified file instead of the default sseennddmmaaiill ``cf'' + file. + + --ff Read the specified statistics file instead of the statistics file + specified in the sseennddmmaaiill ``cf'' file. + + --oo Don't display the name of the mailer in the output. + + The mmaaiillssttaattss utility exits 0 on success, and >0 if an error occurs. + + FFIILLEESS + /etc/sendmail.cf The default sseennddmmaaiill ``cf'' file. + /var/log/sendmail.st The default sseennddmmaaiill statistics file. + + SSEEEE AALLSSOO + mailq(1), sendmail(8) + + 3rd Berkeley Distribution April 25, 1996 1 diff -Ncr sendmail-8.8.5/mailstats/mailstats.c sendmail-8.8.6/mailstats/mailstats.c *** sendmail-8.8.5/mailstats/mailstats.c Wed Sep 25 08:37:36 1996 --- sendmail-8.8.6/mailstats/mailstats.c Fri May 30 12:05:20 1997 *************** *** 40,46 **** #endif /* not lint */ #ifndef lint ! static char sccsid[] = "@(#)mailstats.c 8.8 (Berkeley) 9/25/96"; #endif /* not lint */ #define NOT_SENDMAIL --- 40,46 ---- #endif /* not lint */ #ifndef lint ! static char sccsid[] = "@(#)mailstats.c 8.10 (Berkeley) 5/30/97"; #endif /* not lint */ #define NOT_SENDMAIL *************** *** 66,72 **** bool mnames; long frmsgs = 0, frbytes = 0, tomsgs = 0, tobytes = 0; char mtable[MAXMAILERS][MNAMELEN+1]; ! char sfilebuf[100]; char buf[MAXLINE]; extern char *ctime(); --- 66,72 ---- bool mnames; long frmsgs = 0, frbytes = 0, tomsgs = 0, tobytes = 0; char mtable[MAXMAILERS][MNAMELEN+1]; ! char sfilebuf[MAXLINE]; char buf[MAXLINE]; extern char *ctime(); *************** *** 145,150 **** --- 145,157 ---- } /* this is the S or StatusFile option -- save it */ + if (strlen(b) >= sizeof sfilebuf) + { + fprintf(stderr, + "StatusFile filename too long: %.30s...\n", + s); + exit(EX_CONFIG); + } strcpy(sfilebuf, b); b = strchr(sfilebuf, '#'); if (b == NULL) diff -Ncr sendmail-8.8.5/makemap/Makefile sendmail-8.8.6/makemap/Makefile *** sendmail-8.8.5/makemap/Makefile Wed Dec 18 11:19:32 1996 --- sendmail-8.8.6/makemap/Makefile Tue Jun 10 16:03:15 1997 *************** *** 1,8 **** ! # @(#)Makefile 8.1 (Berkeley) 6/7/93 PROG= makemap MAN8= makemap.0 ! CFLAGS+=-I${.CURDIR}/../src -DNDBM -DNEWDB .include "../../Makefile.inc" .include --- 1,13 ---- ! # @(#)Makefile 8.4 (Berkeley) 6/10/97 PROG= makemap MAN8= makemap.0 ! CFLAGS+=-I${.CURDIR}/../src -DNEWDB -DNOT_SENDMAIL ! ! SRCS= makemap.c safefile.c ! ! safefile.c: ${.CURDIR}/../src/safefile.c ! ln -s ${.CURDIR}/../src/safefile.c .include "../../Makefile.inc" .include diff -Ncr sendmail-8.8.5/makemap/Makefile.dist sendmail-8.8.6/makemap/Makefile.dist *** sendmail-8.8.5/makemap/Makefile.dist Wed Dec 18 11:20:19 1996 --- sendmail-8.8.6/makemap/Makefile.dist Tue Jun 10 16:03:15 1997 *************** *** 5,11 **** # old make program (I recommend that you get and port the new make if you # are going to be doing any signficant work on sendmail). # ! # @(#)Makefile.dist 8.5 (Berkeley) 12/18/96 # # use O=-O (usual) or O=-g (debugging) --- 5,11 ---- # old make program (I recommend that you get and port the new make if you # are going to be doing any signficant work on sendmail). # ! # @(#)Makefile.dist 8.7 (Berkeley) 6/10/97 # # use O=-O (usual) or O=-g (debugging) *************** *** 22,28 **** DBMDEF= -DNDBM -DNEWDB # environment definitions (e.g., -D_AIX3) ! ENVDEF= # see also conf.h for additional compilation flags --- 22,28 ---- DBMDEF= -DNDBM -DNEWDB # environment definitions (e.g., -D_AIX3) ! ENVDEF= -DNOT_SENDMAIL # see also conf.h for additional compilation flags *************** *** 48,54 **** CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} ! OBJS= makemap.o ${OBJADD} LINKS= ${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq BINOWN= bin --- 48,54 ---- CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} ! OBJS= makemap.o safefile.o ${OBJADD} LINKS= ${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq BINOWN= bin *************** *** 61,66 **** --- 61,69 ---- makemap: ${BEFORE} ${OBJS} ${CC} -o makemap ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} + + safefile.c: ${SRCDIR}/safefile.c + ln -s ${SRCDIR}/safefile.c safefile.c #NROFF= nroff -h NROFF= groff -Tascii diff -Ncr sendmail-8.8.5/makemap/makemap.0 sendmail-8.8.6/makemap/makemap.0 *** sendmail-8.8.5/makemap/makemap.0 Wed Dec 31 16:00:00 1969 --- sendmail-8.8.6/makemap/makemap.0 Sat Sep 21 17:15:01 1996 *************** *** 0 **** --- 1,58 ---- + MAKEMAP(8) BSD System Manager's Manual MAKEMAP(8) + + NNAAMMEE + mmaakkeemmaapp - create database maps for sendmail + + SSYYNNOOPPSSIISS + mmaakkeemmaapp [--NN] [--dd] [--ff] [--oo] [--rr] [--vv] _m_a_p_t_y_p_e _m_a_p_n_a_m_e + + DDEESSCCRRIIPPTTIIOONN + mmaakkeemmaapp creates the database maps used by the keyed map lookups in + sendmail(8). It reads input from the standard input and outputs them to + the indicated _m_a_p_n_a_m_e. + + Depending on how it is compiled, mmaakkeemmaapp handles up to three different + database formats, selected using the _m_a_p_t_y_p_e parameter. They may be + + dbm DBM format maps. This requires the ndbm(3) library. + + btree B-Tree format maps. This requires the new Berkeley db(3) li- + brary. + + hash Hash format maps. This also requires the db(3) library. + + In all cases, mmaakkeemmaapp reads lines from the standard input consisting of + two words separated by white space. The first is the database key, the + second is the value. The value may contain ``%_n'' strings to indicated + parameter substitution. Literal parentheses should be doubled (``%%''). + Blank lines and lines beginning with ``#'' are ignored. + + FFllaaggss + + --NN Include the null byte that terminates strings in the map. + This must match the -N flag in the sendmail.cf ``K'' line. + + --dd Allow duplicate keys in the map. This is only allowed on B- + Tree format maps. If two identical keys are read, they will + both be inserted into the map. + + --ff Normally all upper case letters in the key are folded to low- + er case. This flag disables that behaviour. This is intend- + ed to mesh with the -f flag in the KK line in sendmail.cf. + The value is never case folded. + + --oo Append to an old file. This allows you to augment an exist- + ing file. + + --rr Allow replacement of existing keys. Normally mmaakkeemmaapp com- + plains if you repeat a key, and does not do the insert. + + --vv Verbosely print what it is doing. + + SSEEEE AALLSSOO + sendmail(8) + + HHIISSTTOORRYY + The mmaakkeemmaapp command appeared in 4.4BSD. + + 4.4BSD November 16, 1992 1 diff -Ncr sendmail-8.8.5/makemap/makemap.c sendmail-8.8.6/makemap/makemap.c *** sendmail-8.8.5/makemap/makemap.c Mon Nov 18 07:41:59 1996 --- sendmail-8.8.6/makemap/makemap.c Tue Jun 10 16:03:15 1997 *************** *** 33,53 **** */ #ifndef lint ! static char sccsid[] = "@(#)makemap.c 8.19 (Berkeley) 11/18/96"; #endif /* not lint */ - #include - #include #include - #include - #include #include #ifndef ISC_UNIX # include #endif ! #define NOT_SENDMAIL ! #include "useful.h" ! #include "conf.h" #ifdef NDBM #include --- 33,47 ---- */ #ifndef lint ! static char sccsid[] = "@(#)makemap.c 8.35 (Berkeley) 6/10/97"; #endif /* not lint */ #include #include #ifndef ISC_UNIX # include #endif ! #include "sendmail.h" #ifdef NDBM #include *************** *** 74,79 **** --- 68,84 ---- } xx; }; + uid_t RealUid; + gid_t RealGid; + char *RealUserName; + uid_t RunAsUid; + uid_t RunAsGid; + char *RunAsUserName; + int Verbose = 2; + bool DontInitGroups = TRUE; + bool UnsafeGroupWrites = FALSE; + u_char tTdvect[100]; + #define BUFSIZE 1024 main(argc, argv) *************** *** 87,98 **** bool allowdups = FALSE; bool verbose = FALSE; bool foldcase = TRUE; int exitstat; int opt; char *typename; char *mapname; char *ext; - char *lext; int lineno; int st; int mode; --- 92,103 ---- bool allowdups = FALSE; bool verbose = FALSE; bool foldcase = TRUE; + bool ignoresafeties = FALSE; int exitstat; int opt; char *typename; char *mapname; char *ext; int lineno; int st; int mode; *************** *** 117,131 **** #endif char ibuf[BUFSIZE]; char fbuf[MAXNAME]; ! char lbuf[MAXNAME]; extern char *optarg; extern int optind; extern bool lockfile(); progname = argv[0]; ! #ifdef FFR_CFLAG ! #define OPTIONS "Nc:dforv" #else #define OPTIONS "Ndforv" #endif --- 122,154 ---- #endif char ibuf[BUFSIZE]; char fbuf[MAXNAME]; ! char dbuf[MAXNAME]; ! char pbuf[MAXNAME]; ! static char rnamebuf[MAXNAME]; /* holds RealUserName */ ! struct passwd *pw; ! int sff = SFF_ROOTOK|SFF_REGONLY|SFF_NOLINK|SFF_NOWLINK; ! struct stat std, stp; extern char *optarg; extern int optind; extern bool lockfile(); progname = argv[0]; ! RunAsUid = RealUid = getuid(); ! RunAsGid = RealGid = getgid(); ! pw = getpwuid(RealUid); ! if (pw != NULL) ! { ! if (strlen(pw->pw_name) > MAXNAME - 1) ! pw->pw_name[MAXNAME] = 0; ! sprintf(rnamebuf, "%s", pw->pw_name); ! } ! else ! sprintf(rnamebuf, "Unknown UID %d", RealUid); ! RunAsUserName = RealUserName = rnamebuf; ! ! #if _FFR_NEW_MAKEMAP_FLAGS ! #define OPTIONS "Nc:dforsv" #else #define OPTIONS "Ndforv" #endif *************** *** 137,143 **** inclnull = TRUE; break; ! #ifdef FFR_CFLAG case 'c': dbcachesize = atol(optarg); break; --- 160,166 ---- inclnull = TRUE; break; ! #if _FFR_NEW_MAKEMAP_FLAGS case 'c': dbcachesize = atol(optarg); break; *************** *** 159,164 **** --- 182,193 ---- allowreplace = TRUE; break; + #if _FFR_NEW_MAKEMAP_FLAGS + case 's': + ignoresafeties = TRUE; + break; + #endif + case 'v': verbose = TRUE; break; *************** *** 178,189 **** typename = argv[0]; mapname = argv[1]; ext = NULL; - lext = NULL; if (strcmp(typename, "dbm") == 0) { type = T_DBM; - lext = ".dir"; } else if (strcmp(typename, "btree") == 0) { --- 207,216 ---- *************** *** 202,209 **** switch (type) { case T_ERR: ! #ifdef FFR_CFLAG ! fprintf(stderr, "Usage: %s [-N] [-c cachesize] [-d] [-f] [-o] [-r] [-v] type mapname\n", progname); #else fprintf(stderr, "Usage: %s [-N] [-d] [-f] [-o] [-r] [-v] type mapname\n", progname); #endif --- 229,238 ---- switch (type) { case T_ERR: ! #if _FFR_NEW_MAKEMAP_FLAGS ! fprintf(stderr, ! "Usage: %s [-N] [-c cachesize] [-d] [-f] [-o] [-r] [-s] [-v] type mapname\n", ! progname); #else fprintf(stderr, "Usage: %s [-N] [-d] [-f] [-o] [-r] [-v] type mapname\n", progname); #endif *************** *** 270,275 **** --- 299,309 ---- el = strlen(ext); fl = strlen(mapname); + if (el + fl + 1 >= sizeof fbuf) + { + fprintf(stderr, "%s: file name too long", mapname); + exit(EX_USAGE); + } if (fl < el || strcmp(&mapname[fl - el], ext) != 0) { strcpy(fbuf, mapname); *************** *** 278,286 **** } } ! strcpy(lbuf, mapname); ! if (lext != NULL) ! strcat(lbuf, lext); /* ** Create the database. --- 312,379 ---- } } ! if (!notrunc) ! sff |= SFF_CREAT; ! switch (type) ! { ! #ifdef NEWDB ! case T_BTREE: ! case T_HASH: ! if (strlen(mapname) >= sizeof dbuf) ! { ! fprintf(stderr, ! "%s: map name too long\n", mapname); ! exit(EX_USAGE); ! } ! strcpy(dbuf, mapname); ! if (!ignoresafeties && ! (st = safefile(dbuf, RealUid, RealGid, RealUserName, ! sff, S_IWUSR, &std)) != 0) ! { ! fprintf(stderr, ! "%s: could not create: %s\n", ! dbuf, errstring(st)); ! exit(EX_CANTCREAT); ! } ! break; ! #endif ! #ifdef NDBM ! case T_DBM: ! if (strlen(mapname) + 5 > sizeof dbuf) ! { ! fprintf(stderr, ! "%s: map name too long\n", mapname); ! exit(EX_USAGE); ! } ! sprintf(dbuf, "%s.dir", mapname); ! if (!ignoresafeties && ! (st = safefile(dbuf, RealUid, RealGid, RealUserName, ! sff, S_IWUSR, &std)) != 0) ! { ! fprintf(stderr, ! "%s: could not create: %s\n", ! dbuf, errstring(st)); ! exit(EX_CANTCREAT); ! } ! sprintf(pbuf, "%s.pag", mapname); ! if (!ignoresafeties && ! (st = safefile(pbuf, RealUid, RealGid, RealUserName, ! sff, S_IWUSR, &stp)) != 0) ! { ! fprintf(stderr, ! "%s: could not create: %s\n", ! pbuf, errstring(st)); ! exit(EX_CANTCREAT); ! } ! break; ! #endif ! default: ! fprintf(stderr, ! "%s: internal error: type %d\n", ! progname, ! type); ! exit(EX_SOFTWARE); ! } /* ** Create the database. *************** *** 289,312 **** mode = O_RDWR; if (!notrunc) mode |= O_CREAT|O_TRUNC; ! #ifdef O_EXLOCK mode |= O_EXLOCK; #else /* pre-lock the database */ ! fd = open(lbuf, mode & ~O_TRUNC, 0644); if (fd < 0) { fprintf(stderr, "%s: cannot create type %s map %s\n", progname, typename, mapname); exit(EX_CANTCREAT); } - (void) lockfile(fd); #endif switch (type) { #ifdef NDBM case T_DBM: dbp.dbm = dbm_open(mapname, mode, 0644); break; #endif --- 382,417 ---- mode = O_RDWR; if (!notrunc) mode |= O_CREAT|O_TRUNC; ! #if O_EXLOCK mode |= O_EXLOCK; #else /* pre-lock the database */ ! if (ignoresafeties) ! fd = dfopen(dbuf, mode & ~O_TRUNC, 0644, sff); ! else ! fd = safeopen(dbuf, mode & ~O_TRUNC, 0644, sff); if (fd < 0) { fprintf(stderr, "%s: cannot create type %s map %s\n", progname, typename, mapname); exit(EX_CANTCREAT); } #endif switch (type) { #ifdef NDBM case T_DBM: dbp.dbm = dbm_open(mapname, mode, 0644); + if (!ignoresafeties && dbp.dbm != NULL && + (filechanged(dbuf, dbm_dirfno(dbp.dbm), &std, sff) || + filechanged(pbuf, dbm_pagfno(dbp.dbm), &stp, sff))) + { + fprintf(stderr, + "dbm map %s: file changed after open\n", + mapname); + dbm_close(dbp.dbm); + exit(EX_CANTCREAT); + } break; #endif *************** *** 315,324 **** /* tweak some parameters for performance */ hinfo.nelem = 4096; hinfo.cachesize = dbcachesize; ! dbp.db = dbopen(mapname, mode, 0644, DB_HASH, &hinfo); if (dbp.db != NULL) { # if OLD_NEWDB (void) (*dbp.db->sync)(dbp.db); # else --- 420,438 ---- /* tweak some parameters for performance */ hinfo.nelem = 4096; hinfo.cachesize = dbcachesize; ! dbp.db = dbopen(mapname, mode, 0644, DB_HASH, &hinfo); if (dbp.db != NULL) { + if (!ignoresafeties && + filechanged(dbuf, dbp.db->fd(dbp.db), &std, sff)) + { + fprintf(stderr, + "db map %s: file changed after open\n", + mapname); + dbp.db->close(dbp.db); + exit(EX_CANTCREAT); + } # if OLD_NEWDB (void) (*dbp.db->sync)(dbp.db); # else *************** *** 334,339 **** --- 448,462 ---- dbp.db = dbopen(mapname, mode, 0644, DB_BTREE, &bti); if (dbp.db != NULL) { + if (!ignoresafeties && + filechanged(dbuf, dbp.db->fd(dbp.db), &std, sff)) + { + fprintf(stderr, + "db map %s: file changed after open\n", + mapname); + dbp.db->close(dbp.db); + exit(EX_CANTCREAT); + } # if OLD_NEWDB (void) (*dbp.db->sync)(dbp.db); # else *************** *** 344,350 **** #endif default: ! fprintf(stderr, "%s: internal error: type %d\n", progname, type); exit(EX_SOFTWARE); } --- 467,474 ---- #endif default: ! fprintf(stderr, "%s: internal error: type %d\n", ! progname, type); exit(EX_SOFTWARE); } *************** *** 447,453 **** } else if (st > 0) { ! fprintf(stderr, "%s: %s: line %d: key %s: duplicate key\n", progname, mapname, lineno, key.xx.data); } } --- 571,578 ---- } else if (st > 0) { ! fprintf(stderr, ! "%s: %s: line %d: key %s: duplicate key\n", progname, mapname, lineno, key.xx.data); } } *************** *** 477,483 **** #endif } ! #ifndef O_EXLOCK /* release locks */ close(fd); #endif --- 602,608 ---- #endif } ! #if !O_EXLOCK /* release locks */ close(fd); #endif *************** *** 489,494 **** --- 614,624 ---- ** ** Parameters: ** fd -- the file descriptor of the file. + ** filename -- the file name (for error messages). + ** ext -- the filename extension. + ** type -- type of the lock. Bits can be: + ** LOCK_EX -- exclusive lock. + ** LOCK_NB -- non-blocking. ** ** Returns: ** TRUE if the lock was acquired. *************** *** 496,503 **** */ bool ! lockfile(fd) int fd; { # if !HASFLOCK int action; --- 626,636 ---- */ bool ! lockfile(fd, filename, ext, type) int fd; + char *filename; + char *ext; + int type; { # if !HASFLOCK int action; *************** *** 505,512 **** extern int errno; bzero(&lfd, sizeof lfd); ! lfd.l_type = F_WRLCK; ! action = F_SETLKW; if (fcntl(fd, action, &lfd) >= 0) return TRUE; --- 638,653 ---- extern int errno; bzero(&lfd, sizeof lfd); ! if (bitset(LOCK_UN, type)) ! lfd.l_type = F_UNLCK; ! else if (bitset(LOCK_EX, type)) ! lfd.l_type = F_WRLCK; ! else ! lfd.l_type = F_RDLCK; ! if (bitset(LOCK_NB, type)) ! action = F_SETLK; ! else ! action = F_SETLKW; if (fcntl(fd, action, &lfd) >= 0) return TRUE; *************** *** 525,534 **** # else /* HASFLOCK */ ! if (flock(fd, LOCK_EX) >= 0) return TRUE; # endif return FALSE; } --- 666,775 ---- # else /* HASFLOCK */ ! if (flock(fd, type) >= 0) return TRUE; # endif return FALSE; + } + + /*VARARGS2*/ + void + #ifdef __STDC__ + message(const char *msg, ...) + #else + message(msg, va_alist) + const char *msg; + va_dcl + #endif + { + const char *m; + VA_LOCAL_DECL + + m = msg; + if (isdigit(m[0]) && isdigit(m[1]) && isdigit(m[2]) && m[3] == ' ') + m += 4; + VA_START(msg); + vfprintf(stderr, m, ap); + VA_END; + fprintf(stderr, "\n"); + } + + /*VARARGS2*/ + void + #ifdef __STDC__ + syserr(const char *msg, ...) + #else + syserr(msg, va_alist) + const char *msg; + va_dcl + #endif + { + const char *m; + VA_LOCAL_DECL + + m = msg; + if (isdigit(m[0]) && isdigit(m[1]) && isdigit(m[2]) && m[3] == ' ') + m += 4; + VA_START(msg); + vfprintf(stderr, m, ap); + VA_END; + fprintf(stderr, "\n"); + } + + const char * + errstring(err) + int err; + { + static char errstr[64]; + #if !HASSTRERROR && !defined(ERRLIST_PREDEFINED) + extern char *sys_errlist[]; + extern int sys_nerr; + #endif + + /* handle pseudo-errors internal to sendmail */ + switch (err) + { + case E_SM_OPENTIMEOUT: + return "Timeout on file open"; + + case E_SM_NOSLINK: + return "Symbolic links not allowed"; + + case E_SM_NOHLINK: + return "Hard links not allowed"; + + case E_SM_REGONLY: + return "Regular files only"; + + case E_SM_ISEXEC: + return "Executable files not allowed"; + + case E_SM_WWDIR: + return "World writable directory"; + + case E_SM_GWDIR: + return "Group writable directory"; + + case E_SM_FILECHANGE: + return "File changed after open"; + + case E_SM_WWFILE: + return "World writable file"; + + case E_SM_GWFILE: + return "Group writable file"; + } + + #if HASSTRERROR + return strerror(err); + #else + if (err < 0 || err > sys_nerr) + { + sprintf(errstr, "Error %d", err); + return errstr; + } + return sys_errlist[err]; + #endif } diff -Ncr sendmail-8.8.5/praliases/praliases.0 sendmail-8.8.6/praliases/praliases.0 *** sendmail-8.8.5/praliases/praliases.0 Wed Dec 31 16:00:00 1969 --- sendmail-8.8.6/praliases/praliases.0 Sat Sep 21 17:15:02 1996 *************** *** 0 **** --- 1,27 ---- + PRALIASES(1) BSD Reference Manual PRALIASES(1) + + NNAAMMEE + pprraalliiaasseess - display system mail aliases + + SSYYNNOOPPSSIISS + pprraalliiaasseess [--ff _f_i_l_e] + + DDEESSCCRRIIPPTTIIOONN + The pprraalliiaasseess utility displays the current system aliases, one per line, + in no particular order. + + The options are as follows: + + --ff Read the specified file instead of the default sseennddmmaaiill system + aliases file. + + The pprraalliiaasseess utility exits 0 on success, and >0 if an error occurs. + + FFIILLEESS + /etc/aliases The default sseennddmmaaiill system aliases file. + /etc/aliases.db The database version of the _/_e_t_c_/_a_l_i_a_s_e_s file. + + SSEEEE AALLSSOO + mailq(1), sendmail(8) + + 3rd Berkeley Distribution April 25, 1996 1 diff -Ncr sendmail-8.8.5/praliases/praliases.c sendmail-8.8.6/praliases/praliases.c *** sendmail-8.8.5/praliases/praliases.c Wed Sep 25 08:37:48 1996 --- sendmail-8.8.6/praliases/praliases.c Wed May 28 16:52:17 1997 *************** *** 39,45 **** #endif /* not lint */ #ifndef lint ! static char sccsid[] = "@(#)praliases.c 8.4 (Berkeley) 9/25/96"; #endif /* not lint */ #include --- 39,45 ---- #endif /* not lint */ #ifndef lint ! static char sccsid[] = "@(#)praliases.c 8.5 (Berkeley) 5/28/97"; #endif /* not lint */ #include *************** *** 81,86 **** --- 81,91 ---- argv += optind; #ifdef NEWDB + if (strlen(filename) + 4 >= sizeof buf) + { + fprintf(stderr, "Alias filename too long: %.30s...\n", filename); + exit(EX_USAGE); + } (void) strcpy(buf, filename); (void) strcat(buf, ".db"); if (db = dbopen(buf, O_RDONLY, 0444 , DB_HASH, NULL)) { diff -Ncr sendmail-8.8.5/smrsh/smrsh.0 sendmail-8.8.6/smrsh/smrsh.0 *** sendmail-8.8.5/smrsh/smrsh.0 Wed Dec 31 16:00:00 1969 --- sendmail-8.8.6/smrsh/smrsh.0 Sat Sep 21 17:15:05 1996 *************** *** 0 **** --- 1,66 ---- + + + +