8.1C/8.1B 93/06/27 Serious security bug fix: it was possible to read any file on the system, regardless of ownership and permissions. If a subroutine returns a fully qualified address, return it immediately instead of feeding it back into rewriting. This fixes a problem with mailertable lookups. CONFIG: fix some M4 frotz (concat => CONCAT) 8.1B/8.1A 93/06/12 Serious bug fix: pattern matching backup algorithm stepped by two tokens in classes instead of one. Found by Claus Assmann at University of Kiel, Germany. 8.1A/8.1A 93/06/08 Another mailertable fix.... 8.1/8.1 93/06/07 4.4BSD freeze. No semantic changes. 6.65/6.34 93/06/06 Fix some lintish problems. Fix some cases where server SMTP behaved poorly when handed bogus input, pointed out by Eric Wassenaar. CONFIG: fix some more (sigh) mailertable bugs -- thanks to Motonori Nakamura of Kyoto University (again). 6.64/6.33 93/06/05 Don't send 050 (-v) information after the 250 response to a QUIT command in srvrsmtp -- clients usually close the connection at this point, and it causes bogus error messages. Don't send messages that have errors on input (such as unbalanced parentheses) during SMTP transactions, since a return message has (probably) already been sent. Give better diagnostics on timeouts during network reads, including information similar to the SMTP phase. Fix bug that caused SMTP messages to deliver synchronously; this happened after the DATA 250, and hence caused reading the next command to be delayed. Ignore Errors-To: header unless 'l' (lower case el) header is specified. The Errors-To: header violates RFC 1123. Errors-To: was only needed to take the place of the envelope sender in the days when most Unix mailers didn't understand about the two kinds of senders. Don't send warning messages in response to automatically generated messages (that is, those From:<>). CONFIG: fix some rather stupid typos in the mailertable code pointed out by Motonori Nakamura of Kyoto University. CONFIG: add confUSE_ERRORS_TO configuration option. CONFIG: if ALWAYS_ADD_DOMAIN is selected, try to use $M (masquerade name) instead of $j. CONFIG: don't add dots to relay names (added in 6.29); it breaks several things, and can be simulated by dot terminating the names of relays. For example, use: DBbit.net.relay. (note the trailing dot). 6.63/6.32 93/06/01 Fix prototypes to eliminate chars in argument lists -- some compilers are pissy about this. Log protocol ($r) and body type if set so we can determine if the adaptive algorithms are working. Pessimize on locking of database files (particularly for NEWDB databases) during opens. There were problems with processes opening the file while it was rebuilt; since NEWDB caches heavily, the reader opened an empty file, which is an error. If your system has the ability to lock atomically on open, this works properly; otherwise, there are race conditions. Check mod time on .pag file instead of .dir in NDBM aliases because the .dir file doesn't get updated for small alias files. From John Gardiner Myers of CMU. More Solaris portability -- it now compiles on Solaris, but hangs up in gethostbyname(). Move setting of RES_DEBUG flag before first myhostname() call so we can see name server traffic on that call. Fsync() queue files. Fix a problem that causes -bi to try to rebuild maps other than the alias file(s). Fix a problem that caused udb to reject entries from any but the first database listed. Rearrange doc subdirectory for 4.4BSD release tape. CONFIG: put $r into the Received line. This was an oversight. CONFIG: fix typo (call to ruleset 99 should have been rulset 90). CONFIG: move "auxiliary" subroutines to be in ruleset 90-99 range -- in the long run, single digit rulesets may become reserved for builtin use by sendmail. CONFIG: fix major problem that causes host aliases (that is, anything in $=w != $j) to not be recognized. This has been around since 6.30. 6.62/6.31 93/05/28 BETA RELEASE Fix recursive syserr (if there is an error printing a syserr message). This makes the code much less eager to consider a write error as serious. This also includes some heuristics to be clever about closed connections. Lock NEWDB files during gets. This requires version 1.5 or later of the db library. If you have an older version, you can use -DOLD_NEWDB. This will go away in a few weeks. Fix problem causing aliases that use host maps to get overwritten. Do appropriate byte swapping on port numbers in ident protocol code. Fix from Allan Johannesen of WPI. Defer opening of map files to the same time as alias files so that the daemon will tend to pick up new versions more promptly. Prototype a bunch more functions. Some Solaris 2.1 changes (still doesn't link though). Try to simplify Makefiles by including more subordinate #defines in conf.h (based on OS type). CONFIG: check for domains if FEATURE(mailertable) is defined. For example, if the host name is "knecht.cs.berkeley.edu" it will search the following mailertable keys: knecht.cs.berkeley.edu .cs.berkeley.edu .berkeley.edu .edu This could be used to replace the special relays for bitnet and similar nets. 6.61/6.30 93/05/24 Fix problem that prevented appending dots on canonified host names. This breaks tons of config files -- very important fix. Fix improper pointer dereference in response to HELO command. Fix core dump if debugging set in map_rewrite. CONFIG: add FEATURE(always_add_domain) to always attach the local domain (only impacts local mail). CONFIG: try to avoid turning names into $j -- although technically a host can only have one "canonical name", it seems to be common practice to have several. 6.60/6.29 93/05/22 Major change: merge alias databases with maps. This expands and changes the map class interface but fixes a bunch of bugs. The important user-visible change is that the file name in a K line now does not include the ".db" extension; this is added automatically. Also, the -d (NIS domain) flag is missing from the K config line; use @domain instead. When compiling, the *_MAP names are gone -- just compile in NDBM, NEWDB, and/or NIS support. Announce mailer/host/user triple on -bv flag -- from Brian Bullen of Stirling University. Don't send more than one line in response to HELO -- it confuses Pony Express, which then behaves very badly. However, this change does send two line 220 greetings, with the second line reading "ESMTP spoken here". The usersmtp module recognizes this and goes into ESMTP mode regardless of the setting of the "a" mailer flag. Thus, "a" means "always try EHLO". AIX portability changes (thanks to Christophe Wolfhugel of Herve Schauer Consultants (Paris) for providing me with an INSA account for this purpose). Lightly tested. Use -D_AIX3. This probably breaks compatibility with some older systems (e.g., 4.2bsd) but still works on SunOS 4.1.2, Ultrix 4.2A, HP-UX 8.07, OSF/1 T1.3, and AIX 3.2.3. Fix a problem causing an error message loop if the output channel is hosed. Add the Makefiles that I use for various environments -- some are Berkeley make versions and some are old make versions. My makefile for the NeXT box has gotten lost, alas! PRALIASES: support for printing NEWDB databases. From Michael J. Corrigan of U.C. San Diego. CONFIG: don't pass pseudo-domains to $[ ... $] (if you have a wildcard MX it can have wierd results). From Christophe Wolfhugel. CONFIG: dot terminate relay hostnames in S0. From Christophe Wolfhugel. 6.59/6.28 93/05/13 Log version with SMTP daemon startup message. Adjust setproctitle to work on NetBSD and BSD/386. Fix null pointer reference in MX fallback code. A bunch of minor fixes from Eric Wassenaar: If deliver cannot execv the mailer, return EX_OSERR instead of EX_TEMPFAIL (to give better error messages). Consistently malloc e_message. Catch degenerate case of calling returntosender() with an empty returnq. MIME reformatting. 6.58/6.28 93/05/13 Fix bug that can cause incorrect verbose display of user smtp messages. Disable SMTP VERB command if PRIV_NOEXPN is set (since this could reveal the same information. Allow failure when reading SMTP greeting message to go on to next MX host. Add "MIME-Version: 1.0" header if using MIME (this was NOT included in RFC 1344, but Bill King of Allan-Bradley Company forwarded me email from Nathaniel Borenstein claiming that it was an inadvertent omission). Don't use Content-Type: X-message-header. According to John Myers of CMU, many MIME readers will completely ignore the data if they don't recognize it. Instead, just add a blank line to make it a legal (empty) message. Fix problem causing dots to keep getting appended to cached hostnames. This can cause buffer overrun conditions. The problem was found by Erik Forsberg of Retix, although I used a different bug fix than he provided. Fix parsing of split header/envelope rewriting specs -- from Eric Forsberg. Fix from Eric Wassenaar to correct To: lists in error messages. 6.57/6.28 93/05/11 Fix minor glitch causing extra ctladdrs to be output to queue file. Just an annoyance. Cache results of name server canonification lookups to avoid backed up queue runs. Major rewrite of alias.c: considerable cleanup, plus sample (untested) support for NIS aliases. The "A" option can now be a comma separated list (or be repeated) -- that is, you can have multiple alias databases. Each database can have the syntax ``class:file''; if no class is specified, the "implicit" class is assumed. Implicit searches through a list of compiled in types -- hash, dbm, nis, and stab. Alias files are searched in the order they are listed. For example: OAhash:/etc/aliases.local,/etc/aliases OAnis:mail.aliases@my.nis.domain first searches the hash database /etc/aliases.local, then the regular /etc/aliases database, then the NIS map "mail.aliases" in the NIS domain "my.nis.domain". If in Verbose mode (probably from VERB command) run SMTP job in foreground and don't do RCPT optimizations. Add udb :mailsender as equivalent to owner- for regular aliases. Delete option 8; add option 7 that means the opposite. That is, default to 8-bit mode; a special option is needed to force sendmail into 7 bit mode. Send error messages in encapsulated MIME format. New compile flag "NIS" that turns on NIS alias and NIS map support. Add "j" option to send error messages in MIME (RFC 1341) encapsulated message format per RFC 1344. The syntax is pretty ugly if you don't have MIME-aware user agents. Clean up message handling (for display in mailq output). New setproctitle implementation for 4.4bsd. Create files (such as ~/dead.letter) using mode FileMode (the F option value) instead of 0666. Fix bug causing output of EXPN command to not be fully qualified. This may cause some problems with UUCP addresses that will require some config file assistance -- specifically, the $: part has to include the host name for this output to make sense. Fix a problem that sometimes diagnosed errors and still sent the message if the header syntax was bad. Fix a bug that caused an error message to be emailed when sendmail was operating in -bv mode. Add "ListenQueueSize" keyword to daemon options option (OO) to set the queue size parameter passed to listen(). You will normally have to tweak your kernel to up this. Strip spaces off of beginning of message-id before logging (in case it was folded across lines). Tweak compile flags in daemon.c -- there were some cases where it wouldn't work without NETINET. Change *file* mailer to output all the usual default headers (From, Date, Message-Id). It gets used when sending back error messages. CONFIG: explicitly catch and diagnose list:; syntax in ruleset zero -- this is not a valid recipient syntax according to RFC 821. CONFIG: add confMIME_FORMAT_ERRORS to send error messages in MIME format. Defaults to on. CONFIG: add SMTP_MAILER_FLAGS and UUCP_MAILER_FLAGS to augment the flags for those mailers. 6.56/6.27 93/05/01 Fix problem that causes the fallback mail to postmaster (case ESM_POSTMASTER in savemail()) to not look at aliases (ugh). Some more HPUX tweaking (compile flag hpux => __hpux so it still works in ANSI mode). Don't try to flock non-regular files when mailing to a file. In particular, this was a problem if you tried to send to /dev/null. Fix a wierd bug that can cause senders to be queued as recipients if the name server is down when the mail is initially sent. This hack just ignores sender deletion (essentially, it sets the MeToo flag) if there is a TEMPFAIL during processing of the sender address. Obscure. Fix a dangling else problem -- from Brian Bullen from University of Stirling, UK. Add the "b" mailer flag to force a blank line on the end of messages. Some brilliant versions of /bin/mail insist on this but do not add it themselves. Add the "g" mailer flag to prevent user SMTP from sending "MAIL From:<>". This is only intended to be a transitional gesture, and should not be used if at all possible. It appears that Berkeley and IDA config files have always handled this properly; the UK config kit apparently does not. Don't lowercase and then capitalize header field names -- leave them with original capitalization. Fixes from Bill King of Allen-Bradley Company. Further cleanup and improved reporting of error messages, particularly conditions that cause messages to be requeued for future delivery. Tweak syslog priorities in some cases. CONFIG: clean up route-addr on UUCP addresses. 6.55/6.25 93/04/27 HPUX 8.07 compatibility changes in getla() -- I had to make these changes to get it to work at Berkeley, although others seem to have been working before (???). Various patches to XLA code. Fix problem that causes setuid bit on files to be ignored from SMTP or in queue runs. Problem noted by Jason Ornstein of Under The Wire, Inc. Fix problem that can cause CNAMEs to be ignored. Generalize getmxrr to match local host in $=w instead of a single name passed in. Some cleanup from Eric Wassenaar: Use FileMailer instead of ProgMailer in two places. Eliminate duplicate 8th-bit stripping in commaize. Fix a problem with mis-parsing of backslash escapes under some circumstances. NIS map fix (was always including trailing null character) from Mike Glendinning of Ingres UK. Add "a" mailer flag to try using ESMTP. It tries the EHLO command and if that fails falls back to regular SMTP. Also parses EHLO option keywords. If host supports SIZE extension, this is added to the MAIL FROM: command. Extend "b" option to include a second value which is the maximum message size this server is willing to accept. For example, a value of "10/1000000" says that there must be ten blocks free, and sendmail will reject any message larger than one megabyte. Some portability hooks for NeXT (this could be applicable to Mach in general). You have to create an empty file called "unistd.h" to get it to compile. Adjust config values (MAXLINE, MAXATOM, and PSBUFSIZE) to be more generous. Add X400-Received: to the list of headers tagged with H_TRACE in conf.c. From Bill King, Allen-Bradley Co. 6.54/6.25 93/04/19 Fix problem that caused redefinition of SMTP and QUEUE compile flags. Pointed out by Jon Forrest of the Sequoia 2000 project at Berkeley. Properly handle \! hack -- it was treating host\!user as one token (host!user) instead of three (host, !, user). Fix from Eric Wassenaar of NIKHEF-H. Fix compilation problem in getauthinfo() if IDENTPROTO is off. Turn off DEFNAMES and DNSRCH when getting the hostsignature (i.e., MX records) in level 1 configuration files; this matches the old behaviour. From Nakamura Motonori of Kyoto University. Improve error message printing -- if sent through an alias, error messages include the name of the alias in the message. Unfortunately, in order to make this work properly in queue runs, this changes the format of the C line in the qf file. The relatively uselessness of the previous information was pointed out to me by Allan E Johannesen of WPI. Add XLA compile flag to add hooks to Christophe Wolfhugel's extended load average code. This is still in very early form. For information regarding the guts of the xla code, contact Christophe.Wolfhugel@grasp.insa-lyon.fr. Additional hooks for detecting tempfails in rewriting rules (that is, in map lookups). 6.53/6.25 93/04/15 Properly diagnose ruleset zero returning null (instead of a mailer triple). From Nakamura Motonori of Kyoto University. More generalization of socket code for other protocols. Shorten timeouts on reverse name lookups -- since they are done during connection establishment, long timeouts here can cause higher level timeouts. This mainly serves to accept mail from hosts that do not have proper reverse (PTR) DNS records set up. Reset e_statmsg before each mailer invocation to avoid bogus messages in the log. Redefine $r, $s, and $_ in error envelopes so you don't get incorrect cruft in the error message. Problem noted by Nakamura Motonori of Kyoto University. Fix a problem that can cause failure to return errors to Postmaster in certain cases. From Nakamura Motonori. Fix a problem that can cause some systems to give duplicate error messages when a bad syntax address such as " $3 the input "user@a.b.c" failed instead of being properly rewritten as "user@a..c". Neil also convinced me that it was correct that $~ should match only one token -- the problem is that it's always possible to add another token, so $~ matches far too eagerly. 6.45/6.21 93/03/25 Implement multi-word classes (properly!). 6.44/6.21 93/03/25 Add X-Authentication-Warning: headers to clue users into possible attempts to forge mail. This is on the authwarnings privacy flag, but is the default. Suggested by Bryan Costales of ICSI. Pass default units for convtime in so they can be more reasonable. Allow config files to always add a new Comments: header (i.e., they will be added even if an old one already exists). Suggested by Bryan Costales of ICSI. Allow config files to delete an existing Return-Path: header. These should only be added at final delivery. Suggested by Bryan Costales of ICSI. Some debugging additions. Suggested by Bryan Costales of ICSI. Clean up logging of Family 0 addresses. Noted by David Muir Sharnoff and others. Add a "dequote" map class. This allows config files to strip quotes off of addresses. Note that this is not a builtin map, just a class -- so you have to define the map using the K line. Fix a bug in the queueup() loop getting a locked tf where in very odd cases it can fall off the bottom and core dump. Of course, it was P{r Emanuelsson who found it.... Open a new transcript when splitting an envelope. Problem found by Allan E Johannesen of WPI. Improved error output in endmailer if the mailer core dumps. CONFIG: Fix typo in UUCP mailer definition. CONFIG: Default several of the new options on: eight bit input, privacy flags set to "authwarnings", and message warning set to 4h. CONFIG: Use dequote map. 6.43/6.20 93/03/23 Fix problem with assumption of an sa_len field in a generic sockaddr -- it turns out that most vendors haven't picked up this (very important) fix. Change compilation flags for daemon code -- select one or both of NETINET or NETISO, but don't ever set DAEMON manually. CONFIG: add FEATURE(mailertable) to do IDA-style mailertables. 6.42/6.19 93/03/19 Use Postmaster as default fallback return address, not root. POSIX changes for file descriptor handling. Diagnose errors writing new queue file. If you change the owner using an owner- alias, also change the error mode to EM_MAIL so that errors don't get dropped into an inappropriate directory. Problem noted by Allan E Johannesen of WPI. If you are su'ed to root, send email as who you really are, not as root. From Brian Kantor of U.C. San Diego. Allow warning messages to be sent after a configurable interval has passed without delivery. The message is sent only once per envelope. This changes the format of the qf file to have an F line, and the format of the T option to accept take the format "return/warn" (both intervals). Don't force all local names to lower case -- this was left over from the wierd handling of case mapping on aliases. It is now driven (as expected) by the "u" mailer flag. Problem noted by P{r Emanuelsson. Fix problem that caused headers on returned email to be trashed; they were getting freed, but are still accessible via BlankEnvelope. Fix problem that caused bogus ids to be created on returned mail. Add support for ISO and other non-INET networking. This is by no means finished yet. This does assume a lot of other system support, like a version of gethostbyname that returns non-AF_INET addresses. CONFIG: change default on prog mailer to keep upper case in user names (i.e., in the program command line). CONFIG: strip trailing dots off of hosts in uucp mailer before convert to bang format. CONFIG: create new "relay" mailer for $R (LOCAL_RELAY) and $H (MAIL_HUB) delivery that doesn't add local domain. Note that this violates 821, but is probably "more correct" for what we are trying to do. Problem pointed out by Michael Graff of Iowa State. 6.41/6.18 93/03/18 Clean up unnecessary creates of queue ids (i.e., empty qf files) when not needed, such as when starting up an SMTP connection. Fix problem where split envelopes aren't instantiated in the queue. This is quite a serious bug. Owner- aliases had problems with leading spaces causing a premature delimitation. 6.40/6.18 93/03/18 Have ending 250 (after DATA) include the id; suggested by Brian Kantor of UC San Diego. Add logging on envelope splitting. Change queue ids to have one more letter encoding the hour of the day so that during a single day there is a greater likelihood of uniqueness; requested by Brian Kantor. 6.39/6.18 93/03/18 Fix minor compile problem if LOCKF is defined. Define size of tobuf in conf.h. Observed by Toshinari Takahashi of Toshiba. Restore e_sender -- this is equivalent to e_from.q_paddr without decorations such as angle brackets and comments. OSF/1 on Alpha changes from Allan E Johannesen of WPI. CONFIG: fix typo in S3 for list syntax (;: => :;). Thanks to Christopher Hoover for noting the problem. 6.38/6.17 93/03/17 Pass envelope to disconnect to avoid another use of CurEnv, which can apparently end up being null at inopportune times. Log "received from" as "relay=" for consistency (suggested by John Gardiner Myers). Fix major bug in header handling: if no From: line existed in the header (so sendmail inserts one), and the sender is an alias that has an owner, the From: line shows the owner (as well as the envelope). Fixed by early binding the headers (which will change debugging output). HPUX portability patches from Michael J. Corrigan of UC San Diego. Some attempts to adapt better to out of open file conditions. Some changes to ctladdr handling in queue files. 6.37/6.17 93/03/16 MAJOR CHANGE: delete e_sender and e_returnpath (why are these different from e_from?) and $< macro. Log correct IP address in relay= field even if the connection times out. Log "received from [RESPONSE]" on EF_RESPONSE messages (from John Gardiner Myers). Fixes to SysExMsg logging (sometimes just got "message: %s" instead of "message: error message"), noted by Eric Wassenaar. Also reported by Nakamura Motonori. Improvements to MX piggybacking code, from Nakamura Motonori. Fix case where CurHostName points to an auto variable that has been deallocated (from Nakamura Motonori). Fix bug causing newlines to be included in aliases if option "n" (check alias RHS) is set; bug noted by David Muir Sharnoff. Fix problem causing user names that should be mapped to lower case to not be mapped if they are sent during a queue run. This greatly simplifies the case mapping code. Problem noted by Allan E Johannesen of WPI. Don't do recipient address rewriting in buildaddr. This improperly did recipient rewriting on sender addresses, and just seems bogus in general -- but the change could break some .cf files. Pass TZ envariable to child processes for System V. CONFIG: allow LOCAL_RULE_1 and LOCAL_RULE_2 if you want to define those rulesets. KNOWN PROBLEM: I have seen some problems on SunOS that causes the User Data Base to give errors on some addresses. I have tracked the problem back at least as far as 93.02.15 (version 6.22). Running with debugging on makes it go away, so I conclude that it is referencing uninitialized stack data. I haven't been able to track this down yet. 6.36/6.16 93/03/08 Allow local mailer to specify $@host -- this lets you assign the "foo" part of jgm+foo to $h for passing in to the local mailer. Additional debug printing in getcanonname (show query type). Don't add the e_fromdomain on sender addresses -- this interacts wierdly with the owner- code. Improve delivery logging to not log obvious or meaningless stuff. Include numeric IP address in Received: lines per RFC 1123 section 5.2.8. Fixed a bug in checking stat() return value if restrictmailq is set. Also, check the entire group set instead of just the primary group. Both from John Gardiner Myers. Don't have usrerr automatically print errno, since this is often misleading. Use transienterror() in makeconnection after connect() fails and in openmailer after execve() fails (from Eric Wassenaar). Also moved transienterror() from util.c to conf.c. Clean up from= logging on response messages. Undo patch allowing prescan to return a null vector -- it breaks too many things. Config: FEATURE(notsticky) lets you use UDB for everything coming in to the machine, even if it is specifically targetted to this machine. Without it, UDB is bypassed if the user name is fully qualified. Config: fix another minor botch with <> (local mailer wasn't mapping them properly). 6.35/6.15 93/03/05 Fix getrealhostname to return null if sinlen <= 0 -- this can occur if stdin is a pipe. Avoid infinite loop in getcanonname if name server return NO_DATA (for example). Config: avoid having C flag qualify list syntax and error syntax. 6.34/6.14 93/03/05 Fix logging in deliver to not pass too many parameters to Ultrix versions of syslog. Don't write the pid file until after the daemon has actually opened and conditioned the connection. Consider addresses "different" if their q_uids differ (so that two users forwarding to the same program will be seen as different, rather than the same). Fix problem with bad parameters in main() -- they set ExitStat but don't exit. Fix null pointer references through RealHostName -- painfully discovered by Allan E Johannesen of WPI. Fix bug causing user@@localhost to core dump (yuch). Config: don't put two @host.dom.ain on users in $=E in SMTP mailer. Also, catch user@ (no host) in ruleset 0. 6.33/6.13 93/03/03 Config: add confCW_FILE as the name of the cw configuration file (defaults to /etc/sendmail.cw). From P{r Emanuelsson. Allow prescan to return a pointer to an empty list -- this is not an error. Also, clean up error reporting to avoid double errors (prescan reports once, then the caller reports again). Changes to avoid trusting T_ANY queries -- run them, but if you don't get the info you expected, do T_A and T_MX queries anyhow. This also fixes an oversight where _res.options bits were being ignored. If PRIV_NOVRFY is set, use 252 response code instead of 502 per RFC 1123 section 5.2.3. It's not 100% clear that this is correct, but it probably works better with stupid mailers that do a VRFY and only check the first digit. 6.32/6.12 93/03/02 Fix uninitialized variable "protocol" in smtp code. Include in sendmail.h -- move towards POSIX/ANSI. Additional hooks for RFC 1427 (ESMTP SIZE extension). This includes requiring that enoughspace() know the system block size, which will undoubtedly break most ports. Trace flag 19 in use for srvrsmtp.c. Additional logging -- notably the sending mailer name. This also changes the delivery logging to strict field=value syntax. Fix some problems with messages getting sent even to addresses that had been marked bad -- from Eric Wassenaar. More WIDE changes: accept host name inside [...] as non-MXed host. This is intended ONLY for use inside firewalled environments, where the MX points at the gateway. Change .cf file conventions so that mapping for <> addresses don't have an @ in them (to avoid confusing the C mailer flag). Pointed out by Neil Rickert. Config extensions for Sam Leffler's FlexFAX software. 6.31/6.10 93/02/28 Fix some more bugs in alias owner code -- there were some wierd cases where an error in a non-aliased name would override the return info in an aliased name with an owner. Changes from WIDE Project, forwarded to me by Nakamura Motonori: Log actual delivery host (after MX et al); from yasuhiro@dcl.co.jp. Log daemon startup. Deliver Postmaster copies without a body. Better logging of SMTP senders. Send all program email as daemon even when local. As requested in various forms from many people, accept -qIstring to limit queue runs to jobs with queue-id matching string. Similarly for -qRstring for recipients, -qSstring for senders. Initial hooks for ESMTP support (see RFC 1425). Fixed a syntax error in the UUCP mailer specification that caused core dumps on startup. Check for missing A= or P= arguments in mailer definitions. 6.30/6.10 93/02/27 Require FROZENCONFIG compilation flag to include frozen configuration code. Frozen configuration is really not a very good idea any more, particularly in shared library environments. Do better checking of errno after opens of :include: and .forward files to defer delivery on network and other transient errors. Suggestion from Craig Everhart. Fix minor botch in read timeout macro processing. Add FEATURE(nouucp) to config files for sites that know absolutely nothing about UUCP. Add built cf files to distribution tape and clarify how to build them if you don't have the Berkeley make. Some sizeof(long) portability changes for the Alpha, from Allan E Johannesen. Add "restrictmailq" privacy flag -- if set, only people in the same group as your queue directory can print the queue. If you set this, be sure you also restrict access to log files.... Fix another bug in owner-list stuff that can cause data files to be "lost". Fix a bug with queue runs that cause forwards to yourself to go into alias/forwarding loops. I'm still iffy about this fix. Fix from Eric Wassenaar for suppression of return message code. 6.29/6.9 93/02/24 Fix yet another problem in alias owner code -- put the wrong return address on the enclosed return-to-sender letter. 6.28/6.9 93/02/24 Fix botch in alias owner code that caused it to not operate if the error was detected locally. 6.27/6.9 93/02/24 M_LOCAL => M_LOCALMAILER to avoid conflict with Ultrix include file . Miscellaneous bug fixes from Eric Wassenaar: sendmail -bv -t logs the from line even though in verify mode only. sendmail -v can go into queue mode if shouldqueue returns TRUE. Add route-addr pruning per RFC 1123 section 5.3.3. This can be disabled using the "R" option. Delete (always undocumented) -R flag (save original recipients); there are ways to syslog(3) these now. Clean up SMTP reply codes -- specify them as needed in the code, instead of in conf.c -- this was needed during the NCP to TCP transition, but seems silly now. This also changes parameters to message and nmessage. Have mailstats read the .cf file to find the sendmail.st file and get text versions of mailer names. An initial version of this code was provided by Tuominen Keijo (although the comments indicate the good bits were written by "E.V."). Add yet more System V compatibility hacks. Fix bug in VRFY code (assumes everything must be a local user). Allow specification of any of the hard-wired pathnames in the Makefile. Delete concept of "trusted users" -- this really didn't provide any security anyway, and caused some problems. Delete last vestige of support for the word "at" as an equivalent to the character "@". Propagate owner-foo alias information into the envelope sender. Based on code from John Gardiner Myers. This is a major semantic change -- beware! Allow $@ on LHS to indicate "match zero" -- this is used to match the null expression. 6.26/6.8 93/02/21 Don't "lose" queue runs. Very important fix from (who else?) Eric Wassenaar. Completely reset state on RSET command -- from Eric Wassenaar. Send error messages and return receipts using an envelope sender of <> regardless of the setting of $n. Rewriting rules can undo this if they feel the necessity, as might be needed for networks that don't understand the syntax. This is permitted by RFC 821 section 3.6 and required by RFC 1123 section 5.3.3. THIS REQUIRES VERSION 4 CONFIG FILES because the rulesets must be able to parse <> properly. Don't ever send error messages to "<>" -- they will get sent to the local postmaster or dumped in /usr/tmp/dead.letter instead. Per RFC 1123 section 5.3.3. Explicitly check for email to yourself as a dotted quad. You have to call $[ [ ... ] $] to get this. Up the message timeout to five days per RFC 1123 section 5.3.1.1. Make all read timeouts individually configurable, as strongly recommended by RFC 1123 section 5.3.2. Use f_bavail (blocks available to regular users) instead of f_bfree (blocks available to superuser) in free block checks. Change $d macro to be the current time, not the origination time, since this is consistent with how it is used now. Generalization of enoughspace from Eric Wassenaar covering SGI, Apollo, HPUX, Ultrix, and SunOS. Ignore process group signals -- some front ends can do this if you kill a window too quickly. From Eric Wassenaar. Change umask to 022. 6.25/6.8 93/02/20 Close all cached connections before calling mailers and after forking for delivery (caused double closes which resulted in false errors). Add FEATURE(redirect) in config files -- this allows you to alias old addresses to a pointer to the new address that will give a 551 error message, but not deliver the mail. Some code changes to make the 551 errors look pretty. Names of M4 program paths in config files have changed -- they are all XXX_MAILER_PATH now, to match XXX_MAILER_FLAGS. Fix a bug in the QSELFREF code having to do with empty .forward files, reported by Eric Wassenaar. Add option "p" (privacy flags); this allows you to tune how picky the SMTP server will be. This also adds the confPRIVACY_FLAGS M4 macro in the config files. Add option "b" (minimum blocks free). If there are fewer than this number of blocks free on the filesystem containing the queue directory, the SMTP MAIL command will return a 452 response and ask you to try again later. This also adds the confMIN_FREE_BLOCKS M4 macro in the config files. Made VRFY just verify (doesn't expand aliases and .forward files); EXPN does full expansion. RCPT in queue-only mode also doesn't chase aliases and .forward. 6.24/6.7 93/02/19 Increase the number of domain search entries in domain.c to allow for the extra "" entry indicating the root domain. Reported by Nakamura Motonori of Kyoto U. Add a "SMART_HOST" in the configs for UUCP-connected sites that want to forward all mail with extra "@"s to that site. Also allows SMART_HOST, LOCAL_RELAY, and MAIL_HUB to be specified as ``mailer:hostname'' to use an alternate mailer. Clarified and updated some wording in the Operations Guide. Add the "c" mailer flag -- this suppresses all comment parts of addresses (requested by John Curran of NEARnet). Have -v print prompts in -bt mode even if stdin is not a terminal (default behaviour is to be silent if not reading from a terminal). Suggested by Bryan Costales, ICSI. Move the metacharacters from C0 space (\001-\037) into C1 space (\201-\237). This also fixes a bunch of potential bugs with G1 characters (\240-\276) in headers relating to negative numbers passed to isspace() et al. Add YP_LAST_MODIFIED and YP_MASTER_NAME to DBM version of alias database if YPCOMPAT is #defined. Enhancement from Takahiro Kanbe of Fuji Xerox Information Systems Co., Ltd. Add "list" Precedence (-30); this can be used with old sendmails which will map to precedence 0 (which will return error messages). Suggested by Stephen R. van den Berg. Many bug fixes from Eric Wassenaar of the National Institute for Nuclear and High-Energy Physics, Amsterdam: Clear timeouts properly on open failures in include(). Don't dereference through NULL if no home directory found. Re-establish SIGCHLD signal on System 5 in reapchild(). Avoid NULL pointer reference on -pFOO flag. Properly handle backslash escapes in comments. Correctly check reply status on SMTP NOOP command. Properly save SMTP error message if peer gives "Service Shutting Down" message. Avoid writing to the transcript if it couldn't be opened. Signal errors in SMTP children to parent properly. Handle self references in a list more globally (include a QSELFREF bit in the address flags). This enhancement was suggested by Eric Wassenaar. Use initgroups() in hpux, even though it's System-V based. The HASINITGROUPS compile flag can set this on other systems. This HPUX behaviour was pointed out by Eric Wassenaar. 6.23/6.6 93/02/16 Clean up handling of LogLevel to make it easier to figure out what's on what level. Change log levels to have some consistency: 1 serious system failures, security problems 2 lost communications, protocol failures 3 other serious failures 4 minor errors 5 message collection 6 vrfy logging, creation of return-to-sender 7 delivery failures 8 delivery successes 9 delivery tempfails (queue ups) 10 database expansion >64 debugging Allow IDA-style separated processing on S= and R= in Mailer definition lines. Note that rulesets 1 and 2 are still used for both addresses as before. Bruce Lilly gave a convincing argument that RFC976 insists on this behaviour. Added some time zones to arpatounix -- they may not be in the standards, but they are in use. However, I may delete arpatounix entirely -- there appears to be no reason for it to exist. Change to UUCP mailer (in cf directory) to try to do a saner job. I'm still not certain about this mailer in general. 6.22/6.5 93/02/15 Fix bug that prevents saving letters in ~/dead.letter. Don't add angle brackets in VRFY command if angle brackets already exist in the address. Fix bogus error message in udbexpand. Null terminate host buffers in buildaddr (broken in 6.21) -- IMPORTANT FIX!! 6.21/6.5 93/02/15 Fix another incorrect error message in alias.c, found by Azuma Okamoto. Fix a couple of problems in the more-configurable config files, found by Tom Ivar Helbekkmo. Fix problem with quoted :include: entries. Don't duplicate the filename on verbose printing of .forward and :include: contents. Extend size of prescan buffer (to allow bigger addresses). Also, detect some buffer overflows. Log user SMTP protocol errors (log level 4). 6.20/6.4 93/02/14 Fix another problem in the MCI state machine caused when there were errors generated from the other end to commands other than RCPT. 6.19/6.4 93/02/14 Include load average support for DEC Alpha running OSF/1. Fix multiple-response problem with errors in MAIL From: line. Fix SMTP reply codes for invalid address syntaxes (give 501; never give multiple error messages for a single message). Fix problem where a cached connection timeout rejects all later connects to that host. Fix incorrect error message if alias.c is compiled with DBM only. Additional changes to fix nested conditionals (from Bruce Lilly). Recover more gracefully from operating system failures, particularly NULL returns from openmailer (from Noritoshi Demizu, OMRON Corporation). Log forward, alias, and userdb expand operations on log level 10; concept suggested by P{r (Pell) Emanuelsson. Changes for HPUX 8.07 compatibility. 6.18/6.4 93/02/12 Allow any config option to be set using an M4 define. Change UNAME compile flag to HASUNAME for IDA compatibility (besides, it's a better name). Note in README that on SunOS it must be linked -Bstatic. Fairly major change in domain.c to handle wildcard MX records more rationally. NOTE: the "w" option (no wildcard MX records match local domain) has been eliminated. Fix some unset variable references pointed out by Bruce Lilly. Fix host name in process titles when using cached connection. 6.17/6.3 93/01/28 Fix System 5 compatibility changes to be compatible with the rest of the world. 6.16/6.3 93/01/28 Experimental fix for problem handling errors in the SMTP protocol in conjunction with connection caching. System 5 compatibility changes. 6.15/6.3 93/01/26 Fix a bug that causes local mail delivered using -odq to be eliminated as a duplicate (because it matched the ctladdr, now passed in as a C line). These changes are pretty tricky...... 6.14/6.3 93/01/25 Add debugging for some MCI errors. 6.13/6.3 93/01/22 Fix -e compatibility flag to take a value. Fix a couple of minor compilation warnings on Sun cc. Improve error messages in a few cases to be more self-explanatory. 6.12/6.3 93/01/21 Fix yet-another problem with environment handling, pointed out by Yoshitaka Tokugawa and Tom Ivar Helbekkmo. Some heuristics to try to limit resource exhaustion problems if a downstream host has been down for a long time. Fix problem with incorrect host name being logged in "Connection timed out" messages (from Tom Ivar Helbekkmo). Fix some ANSI C problems (from Takahiro Kanbe). Properly log message sender on returned mail during queue run. Count number of recipients properly. Fix a problem in yp map code. Diagnose "message timed out" (from Nakamura Motonori). 6.11/6.3 93/01/20 Fix problem with address delimitor inside quotes. Define $k and $=k to be the UUCP name (from the uname call) based on code from Bruce Lilly. 6.10/6.2 93/01/18 Implement arpatounix (largely code from Bruce Lilly). Log more info (suggested by John Myers). Allow nested $?...$|...$. (inspired by code from Bruce Lilly of Sony US). POSIX compatibility (noted by Keith Bostic). Handle SMTP MAIL command errors properly (urged by several people, notably John Myers of CMU). Do early diagnosis of .cf errors (notably referencing a RHS substitution that isn't on the LHS). Adjust checkpointing to better handle batched recipients, suggested by John Myers. Fix miscellaneous bugs. (config files:) Implement MAIL_HUB for all local mail (to handle NFS-mounted directories) as urged by Tom Ivar Helbekkmo of the Norwegian School of Economics. 6.9/6.1 93/01/13 Environment handling simplification/bug fix -- child processes get a minimal, fixed environment. This avoids different behaviour in queue runs. Handle commas inside comments properly. Properly limit large messages submitted in -obq mode. 6.8/6.1 93/01/10 Check mtime of thaw file against .cf and sendmail binary, based on code from John Myers. 6.7/6.1 93/01/10 MX piggybacking, based on code from John Myers@CMU. Allow checkcompat to return -1 to mean tempfail. Bug fix in m_mno computation. 6.6/6.1 93/01/09 Tuning of queueing functions as recommended by John Gardiner Myers. Return mail headers (no body) on messages with negative precedence. Minor other bug fixes. 6.5/6.1 93/01/03 Fix botch causing queued headers to have ?XX? prefixes. 6.4/6.1 93/01/02 Changes to recognize special mailer types (e.g., file) early. 6.3/6.1 93/01/01 Pass timeouts to sfgets. Check for control characters in addresses. Fixed deferred error reporting. Report duplicate aliases. Handle mixed case recursive aliases. Misc bug fixes. 6.2/6.1 92/12/30 Put return-receipt-to on a conf.c flag (but don't set it). Fix minor syslog problem.