1*66338Seric8.1C/8.1B 93/06/27 2*66338Seric Serious security bug fix: it was possible to read any file on 3*66338Seric the system, regardless of ownership and permissions. 4*66338Seric If a subroutine returns a fully qualified address, return it 5*66338Seric immediately instead of feeding it back into rewriting. 6*66338Seric This fixes a problem with mailertable lookups. 7*66338Seric CONFIG: fix some M4 frotz (concat => CONCAT) 8*66338Seric 9*66338Seric8.1B/8.1A 93/06/12 10*66338Seric Serious bug fix: pattern matching backup algorithm stepped by 11*66338Seric two tokens in classes instead of one. Found by Claus 12*66338Seric Assmann at University of Kiel, Germany. 13*66338Seric 14*66338Seric8.1A/8.1A 93/06/08 15*66338Seric Another mailertable fix.... 16*66338Seric 17*66338Seric8.1/8.1 93/06/07 18*66338Seric 4.4BSD freeze. No semantic changes. 19*66338Seric 20*66338Seric6.65/6.34 93/06/06 21*66338Seric Fix some lintish problems. 22*66338Seric Fix some cases where server SMTP behaved poorly when handed bogus 23*66338Seric input, pointed out by Eric Wassenaar. 24*66338Seric CONFIG: fix some more (sigh) mailertable bugs -- thanks to 25*66338Seric Motonori Nakamura of Kyoto University (again). 26*66338Seric 27*66338Seric6.64/6.33 93/06/05 28*66338Seric Don't send 050 (-v) information after the 250 response to a QUIT 29*66338Seric command in srvrsmtp -- clients usually close the connection 30*66338Seric at this point, and it causes bogus error messages. 31*66338Seric Don't send messages that have errors on input (such as unbalanced 32*66338Seric parentheses) during SMTP transactions, since a return 33*66338Seric message has (probably) already been sent. 34*66338Seric Give better diagnostics on timeouts during network reads, including 35*66338Seric information similar to the SMTP phase. 36*66338Seric Fix bug that caused SMTP messages to deliver synchronously; this 37*66338Seric happened after the DATA 250, and hence caused reading the 38*66338Seric next command to be delayed. 39*66338Seric Ignore Errors-To: header unless 'l' (lower case el) header is 40*66338Seric specified. The Errors-To: header violates RFC 1123. 41*66338Seric Errors-To: was only needed to take the place of the 42*66338Seric envelope sender in the days when most Unix mailers 43*66338Seric didn't understand about the two kinds of senders. 44*66338Seric Don't send warning messages in response to automatically generated 45*66338Seric messages (that is, those From:<>). 46*66338Seric CONFIG: fix some rather stupid typos in the mailertable code 47*66338Seric pointed out by Motonori Nakamura of Kyoto University. 48*66338Seric CONFIG: add confUSE_ERRORS_TO configuration option. 49*66338Seric CONFIG: if ALWAYS_ADD_DOMAIN is selected, try to use $M 50*66338Seric (masquerade name) instead of $j. 51*66338Seric CONFIG: don't add dots to relay names (added in 6.29); it breaks 52*66338Seric several things, and can be simulated by dot terminating 53*66338Seric the names of relays. For example, use: 54*66338Seric DBbit.net.relay. 55*66338Seric (note the trailing dot). 56*66338Seric 57*66338Seric6.63/6.32 93/06/01 58*66338Seric Fix prototypes to eliminate chars in argument lists -- some 59*66338Seric compilers are pissy about this. 60*66338Seric Log protocol ($r) and body type if set so we can determine if 61*66338Seric the adaptive algorithms are working. 62*66338Seric Pessimize on locking of database files (particularly for NEWDB 63*66338Seric databases) during opens. There were problems with 64*66338Seric processes opening the file while it was rebuilt; since 65*66338Seric NEWDB caches heavily, the reader opened an empty file, 66*66338Seric which is an error. If your system has the ability to 67*66338Seric lock atomically on open, this works properly; otherwise, 68*66338Seric there are race conditions. 69*66338Seric Check mod time on .pag file instead of .dir in NDBM aliases 70*66338Seric because the .dir file doesn't get updated for small 71*66338Seric alias files. From John Gardiner Myers of CMU. 72*66338Seric More Solaris portability -- it now compiles on Solaris, but 73*66338Seric hangs up in gethostbyname(). 74*66338Seric Move setting of RES_DEBUG flag before first myhostname() call 75*66338Seric so we can see name server traffic on that call. 76*66338Seric Fsync() queue files. 77*66338Seric Fix a problem that causes -bi to try to rebuild maps other than 78*66338Seric the alias file(s). 79*66338Seric Fix a problem that caused udb to reject entries from any but 80*66338Seric the first database listed. 81*66338Seric Rearrange doc subdirectory for 4.4BSD release tape. 82*66338Seric CONFIG: put $r into the Received line. This was an oversight. 83*66338Seric CONFIG: fix typo (call to ruleset 99 should have been rulset 90). 84*66338Seric CONFIG: move "auxiliary" subroutines to be in ruleset 90-99 85*66338Seric range -- in the long run, single digit rulesets may 86*66338Seric become reserved for builtin use by sendmail. 87*66338Seric CONFIG: fix major problem that causes host aliases (that is, 88*66338Seric anything in $=w != $j) to not be recognized. This has 89*66338Seric been around since 6.30. 90*66338Seric 91*66338Seric6.62/6.31 93/05/28 92*66338Seric BETA RELEASE 93*66338Seric Fix recursive syserr (if there is an error printing a syserr 94*66338Seric message). This makes the code much less eager to consider 95*66338Seric a write error as serious. This also includes some 96*66338Seric heuristics to be clever about closed connections. 97*66338Seric Lock NEWDB files during gets. This requires version 1.5 or later 98*66338Seric of the db library. If you have an older version, you 99*66338Seric can use -DOLD_NEWDB. This will go away in a few weeks. 100*66338Seric Fix problem causing aliases that use host maps to get overwritten. 101*66338Seric Do appropriate byte swapping on port numbers in ident protocol 102*66338Seric code. Fix from Allan Johannesen of WPI. 103*66338Seric Defer opening of map files to the same time as alias files so that 104*66338Seric the daemon will tend to pick up new versions more promptly. 105*66338Seric Prototype a bunch more functions. 106*66338Seric Some Solaris 2.1 changes (still doesn't link though). 107*66338Seric Try to simplify Makefiles by including more subordinate #defines 108*66338Seric in conf.h (based on OS type). 109*66338Seric CONFIG: check for domains if FEATURE(mailertable) is defined. 110*66338Seric For example, if the host name is "knecht.cs.berkeley.edu" 111*66338Seric it will search the following mailertable keys: 112*66338Seric knecht.cs.berkeley.edu 113*66338Seric .cs.berkeley.edu 114*66338Seric .berkeley.edu 115*66338Seric .edu 116*66338Seric This could be used to replace the special relays for bitnet 117*66338Seric and similar nets. 118*66338Seric 119*66338Seric6.61/6.30 93/05/24 120*66338Seric Fix problem that prevented appending dots on canonified host 121*66338Seric names. This breaks tons of config files -- very 122*66338Seric important fix. 123*66338Seric Fix improper pointer dereference in response to HELO command. 124*66338Seric Fix core dump if debugging set in map_rewrite. 125*66338Seric CONFIG: add FEATURE(always_add_domain) to always attach the 126*66338Seric local domain (only impacts local mail). 127*66338Seric CONFIG: try to avoid turning names into $j -- although 128*66338Seric technically a host can only have one "canonical name", 129*66338Seric it seems to be common practice to have several. 130*66338Seric 131*66338Seric6.60/6.29 93/05/22 132*66338Seric Major change: merge alias databases with maps. This expands and 133*66338Seric changes the map class interface but fixes a bunch of bugs. 134*66338Seric The important user-visible change is that the file name 135*66338Seric in a K line now does not include the ".db" extension; this 136*66338Seric is added automatically. Also, the -d (NIS domain) flag is 137*66338Seric missing from the K config line; use @domain instead. 138*66338Seric When compiling, the *_MAP names are gone -- just compile 139*66338Seric in NDBM, NEWDB, and/or NIS support. 140*66338Seric Announce mailer/host/user triple on -bv flag -- from Brian 141*66338Seric Bullen of Stirling University. 142*66338Seric Don't send more than one line in response to HELO -- it confuses 143*66338Seric Pony Express, which then behaves very badly. However, 144*66338Seric this change does send two line 220 greetings, with the 145*66338Seric second line reading "ESMTP spoken here". The usersmtp 146*66338Seric module recognizes this and goes into ESMTP mode regardless 147*66338Seric of the setting of the "a" mailer flag. Thus, "a" means 148*66338Seric "always try EHLO". 149*66338Seric AIX portability changes (thanks to Christophe Wolfhugel of 150*66338Seric Herve Schauer Consultants (Paris) for providing me with 151*66338Seric an INSA account for this purpose). Lightly tested. Use 152*66338Seric -D_AIX3. This probably breaks compatibility with some 153*66338Seric older systems (e.g., 4.2bsd) but still works on SunOS 154*66338Seric 4.1.2, Ultrix 4.2A, HP-UX 8.07, OSF/1 T1.3, and AIX 3.2.3. 155*66338Seric Fix a problem causing an error message loop if the output channel 156*66338Seric is hosed. 157*66338Seric Add the Makefiles that I use for various environments -- some are 158*66338Seric Berkeley make versions and some are old make versions. 159*66338Seric My makefile for the NeXT box has gotten lost, alas! 160*66338Seric PRALIASES: support for printing NEWDB databases. From 161*66338Seric Michael J. Corrigan of U.C. San Diego. 162*66338Seric CONFIG: don't pass pseudo-domains to $[ ... $] (if you have 163*66338Seric a wildcard MX it can have wierd results). From 164*66338Seric Christophe Wolfhugel. 165*66338Seric CONFIG: dot terminate relay hostnames in S0. From Christophe 166*66338Seric Wolfhugel. 167*66338Seric 168*66338Seric6.59/6.28 93/05/13 169*66338Seric Log version with SMTP daemon startup message. 170*66338Seric Adjust setproctitle to work on NetBSD and BSD/386. 171*66338Seric Fix null pointer reference in MX fallback code. 172*66338Seric A bunch of minor fixes from Eric Wassenaar: 173*66338Seric If deliver cannot execv the mailer, return EX_OSERR 174*66338Seric instead of EX_TEMPFAIL (to give better 175*66338Seric error messages). 176*66338Seric Consistently malloc e_message. 177*66338Seric Catch degenerate case of calling returntosender() 178*66338Seric with an empty returnq. 179*66338Seric MIME reformatting. 180*66338Seric 181*66338Seric6.58/6.28 93/05/13 182*66338Seric Fix bug that can cause incorrect verbose display of user smtp 183*66338Seric messages. 184*66338Seric Disable SMTP VERB command if PRIV_NOEXPN is set (since this 185*66338Seric could reveal the same information. 186*66338Seric Allow failure when reading SMTP greeting message to go on to 187*66338Seric next MX host. 188*66338Seric Add "MIME-Version: 1.0" header if using MIME (this was NOT 189*66338Seric included in RFC 1344, but Bill King of Allan-Bradley 190*66338Seric Company forwarded me email from Nathaniel Borenstein 191*66338Seric claiming that it was an inadvertent omission). 192*66338Seric Don't use Content-Type: X-message-header. According to John 193*66338Seric Myers of CMU, many MIME readers will completely ignore 194*66338Seric the data if they don't recognize it. Instead, just 195*66338Seric add a blank line to make it a legal (empty) message. 196*66338Seric Fix problem causing dots to keep getting appended to cached 197*66338Seric hostnames. This can cause buffer overrun conditions. 198*66338Seric The problem was found by Erik Forsberg of Retix, 199*66338Seric although I used a different bug fix than he provided. 200*66338Seric Fix parsing of split header/envelope rewriting specs -- from 201*66338Seric Eric Forsberg. 202*66338Seric Fix from Eric Wassenaar to correct To: lists in error messages. 203*66338Seric 204*66338Seric6.57/6.28 93/05/11 205*66338Seric Fix minor glitch causing extra ctladdrs to be output to queue 206*66338Seric file. Just an annoyance. 207*66338Seric Cache results of name server canonification lookups to avoid 208*66338Seric backed up queue runs. 209*66338Seric Major rewrite of alias.c: considerable cleanup, plus sample 210*66338Seric (untested) support for NIS aliases. The "A" option 211*66338Seric can now be a comma separated list (or be repeated) -- 212*66338Seric that is, you can have multiple alias databases. Each 213*66338Seric database can have the syntax ``class:file''; if no class 214*66338Seric is specified, the "implicit" class is assumed. Implicit 215*66338Seric searches through a list of compiled in types -- hash, 216*66338Seric dbm, nis, and stab. Alias files are searched in the 217*66338Seric order they are listed. For example: 218*66338Seric OAhash:/etc/aliases.local,/etc/aliases 219*66338Seric OAnis:mail.aliases@my.nis.domain 220*66338Seric first searches the hash database /etc/aliases.local, 221*66338Seric then the regular /etc/aliases database, then the NIS 222*66338Seric map "mail.aliases" in the NIS domain "my.nis.domain". 223*66338Seric If in Verbose mode (probably from VERB command) run SMTP job 224*66338Seric in foreground and don't do RCPT optimizations. 225*66338Seric Add udb :mailsender as equivalent to owner- for regular aliases. 226*66338Seric Delete option 8; add option 7 that means the opposite. That is, 227*66338Seric default to 8-bit mode; a special option is needed to 228*66338Seric force sendmail into 7 bit mode. 229*66338Seric Send error messages in encapsulated MIME format. 230*66338Seric New compile flag "NIS" that turns on NIS alias and NIS map 231*66338Seric support. 232*66338Seric Add "j" option to send error messages in MIME (RFC 1341) 233*66338Seric encapsulated message format per RFC 1344. The 234*66338Seric syntax is pretty ugly if you don't have MIME-aware 235*66338Seric user agents. 236*66338Seric Clean up message handling (for display in mailq output). 237*66338Seric New setproctitle implementation for 4.4bsd. 238*66338Seric Create files (such as ~/dead.letter) using mode FileMode (the 239*66338Seric F option value) instead of 0666. 240*66338Seric Fix bug causing output of EXPN command to not be fully qualified. 241*66338Seric This may cause some problems with UUCP addresses that 242*66338Seric will require some config file assistance -- specifically, 243*66338Seric the $: part has to include the host name for this output 244*66338Seric to make sense. 245*66338Seric Fix a problem that sometimes diagnosed errors and still sent the 246*66338Seric message if the header syntax was bad. 247*66338Seric Fix a bug that caused an error message to be emailed when sendmail 248*66338Seric was operating in -bv mode. 249*66338Seric Add "ListenQueueSize" keyword to daemon options option (OO) to 250*66338Seric set the queue size parameter passed to listen(). You 251*66338Seric will normally have to tweak your kernel to up this. 252*66338Seric Strip spaces off of beginning of message-id before logging (in 253*66338Seric case it was folded across lines). 254*66338Seric Tweak compile flags in daemon.c -- there were some cases where 255*66338Seric it wouldn't work without NETINET. 256*66338Seric Change *file* mailer to output all the usual default headers 257*66338Seric (From, Date, Message-Id). It gets used when sending 258*66338Seric back error messages. 259*66338Seric CONFIG: explicitly catch and diagnose list:; syntax in ruleset 260*66338Seric zero -- this is not a valid recipient syntax according 261*66338Seric to RFC 821. 262*66338Seric CONFIG: add confMIME_FORMAT_ERRORS to send error messages in 263*66338Seric MIME format. Defaults to on. 264*66338Seric CONFIG: add SMTP_MAILER_FLAGS and UUCP_MAILER_FLAGS to augment 265*66338Seric the flags for those mailers. 266*66338Seric 267*66338Seric6.56/6.27 93/05/01 268*66338Seric Fix problem that causes the fallback mail to postmaster 269*66338Seric (case ESM_POSTMASTER in savemail()) to not look at 270*66338Seric aliases (ugh). 271*66338Seric Some more HPUX tweaking (compile flag hpux => __hpux so it 272*66338Seric still works in ANSI mode). 273*66338Seric Don't try to flock non-regular files when mailing to a file. 274*66338Seric In particular, this was a problem if you tried to 275*66338Seric send to /dev/null. 276*66338Seric Fix a wierd bug that can cause senders to be queued as 277*66338Seric recipients if the name server is down when the mail 278*66338Seric is initially sent. This hack just ignores sender 279*66338Seric deletion (essentially, it sets the MeToo flag) if there 280*66338Seric is a TEMPFAIL during processing of the sender address. 281*66338Seric Obscure. 282*66338Seric Fix a dangling else problem -- from Brian Bullen from University 283*66338Seric of Stirling, UK. 284*66338Seric Add the "b" mailer flag to force a blank line on the end of 285*66338Seric messages. Some brilliant versions of /bin/mail insist 286*66338Seric on this but do not add it themselves. 287*66338Seric Add the "g" mailer flag to prevent user SMTP from sending 288*66338Seric "MAIL From:<>". This is only intended to be a 289*66338Seric transitional gesture, and should not be used if at 290*66338Seric all possible. It appears that Berkeley and IDA 291*66338Seric config files have always handled this properly; the 292*66338Seric UK config kit apparently does not. 293*66338Seric Don't lowercase and then capitalize header field names -- leave 294*66338Seric them with original capitalization. Fixes from Bill 295*66338Seric King of Allen-Bradley Company. 296*66338Seric Further cleanup and improved reporting of error messages, 297*66338Seric particularly conditions that cause messages to be 298*66338Seric requeued for future delivery. 299*66338Seric Tweak syslog priorities in some cases. 300*66338Seric CONFIG: clean up route-addr on UUCP addresses. 301*66338Seric 302*66338Seric6.55/6.25 93/04/27 303*66338Seric HPUX 8.07 compatibility changes in getla() -- I had to make 304*66338Seric these changes to get it to work at Berkeley, although 305*66338Seric others seem to have been working before (???). 306*66338Seric Various patches to XLA code. 307*66338Seric Fix problem that causes setuid bit on files to be ignored from 308*66338Seric SMTP or in queue runs. Problem noted by Jason Ornstein 309*66338Seric of Under The Wire, Inc. 310*66338Seric Fix problem that can cause CNAMEs to be ignored. 311*66338Seric Generalize getmxrr to match local host in $=w instead of a 312*66338Seric single name passed in. 313*66338Seric Some cleanup from Eric Wassenaar: 314*66338Seric Use FileMailer instead of ProgMailer in two places. 315*66338Seric Eliminate duplicate 8th-bit stripping in commaize. 316*66338Seric Fix a problem with mis-parsing of backslash escapes 317*66338Seric under some circumstances. 318*66338Seric NIS map fix (was always including trailing null character) 319*66338Seric from Mike Glendinning of Ingres UK. 320*66338Seric Add "a" mailer flag to try using ESMTP. It tries the EHLO 321*66338Seric command and if that fails falls back to regular SMTP. 322*66338Seric Also parses EHLO option keywords. If host supports 323*66338Seric SIZE extension, this is added to the MAIL FROM: 324*66338Seric command. 325*66338Seric Extend "b" option to include a second value which is the 326*66338Seric maximum message size this server is willing to accept. 327*66338Seric For example, a value of "10/1000000" says that there 328*66338Seric must be ten blocks free, and sendmail will reject 329*66338Seric any message larger than one megabyte. 330*66338Seric Some portability hooks for NeXT (this could be applicable 331*66338Seric to Mach in general). You have to create an empty 332*66338Seric file called "unistd.h" to get it to compile. 333*66338Seric Adjust config values (MAXLINE, MAXATOM, and PSBUFSIZE) to 334*66338Seric be more generous. 335*66338Seric Add X400-Received: to the list of headers tagged with H_TRACE 336*66338Seric in conf.c. From Bill King, Allen-Bradley Co. 337*66338Seric 338*66338Seric6.54/6.25 93/04/19 339*66338Seric Fix problem that caused redefinition of SMTP and QUEUE compile 340*66338Seric flags. Pointed out by Jon Forrest of the Sequoia 2000 341*66338Seric project at Berkeley. 342*66338Seric Properly handle \! hack -- it was treating host\!user as one 343*66338Seric token (host!user) instead of three (host, !, user). 344*66338Seric Fix from Eric Wassenaar of NIKHEF-H. 345*66338Seric Fix compilation problem in getauthinfo() if IDENTPROTO is off. 346*66338Seric Turn off DEFNAMES and DNSRCH when getting the hostsignature 347*66338Seric (i.e., MX records) in level 1 configuration files; this 348*66338Seric matches the old behaviour. From Motonori Nakamura of 349*66338Seric Kyoto University. 350*66338Seric Improve error message printing -- if sent through an alias, 351*66338Seric error messages include the name of the alias in the 352*66338Seric message. Unfortunately, in order to make this work 353*66338Seric properly in queue runs, this changes the format of the 354*66338Seric C line in the qf file. The relatively uselessness of 355*66338Seric the previous information was pointed out to me by 356*66338Seric Allan E Johannesen of WPI. 357*66338Seric Add XLA compile flag to add hooks to Christophe Wolfhugel's 358*66338Seric extended load average code. This is still in very early 359*66338Seric form. For information regarding the guts of the xla 360*66338Seric code, contact Christophe.Wolfhugel@grasp.insa-lyon.fr. 361*66338Seric Additional hooks for detecting tempfails in rewriting rules 362*66338Seric (that is, in map lookups). 363*66338Seric 364*66338Seric6.53/6.25 93/04/15 365*66338Seric Properly diagnose ruleset zero returning null (instead of a mailer 366*66338Seric triple). From Motonori Nakamura of Kyoto University. 367*66338Seric More generalization of socket code for other protocols. 368*66338Seric Shorten timeouts on reverse name lookups -- since they are done 369*66338Seric during connection establishment, long timeouts here can 370*66338Seric cause higher level timeouts. This mainly serves to accept 371*66338Seric mail from hosts that do not have proper reverse (PTR) DNS 372*66338Seric records set up. 373*66338Seric Reset e_statmsg before each mailer invocation to avoid bogus 374*66338Seric messages in the log. 375*66338Seric Redefine $r, $s, and $_ in error envelopes so you don't get 376*66338Seric incorrect cruft in the error message. Problem noted by 377*66338Seric Motonori Nakamura of Kyoto University. 378*66338Seric Fix a problem that can cause failure to return errors to Postmaster 379*66338Seric in certain cases. From Motonori Nakamura. 380*66338Seric Fix a problem that can cause some systems to give duplicate error 381*66338Seric messages when a bad syntax address such as "<a" is presented 382*66338Seric to an SMTP server. It doesn't seem to occur on all 383*66338Seric machines. From Motonori Nakamura. 384*66338Seric Default IDENTPROTO off for Ultrix and HPUX, which apparently have 385*66338Seric the interesting "feature" that when they receive a "Host 386*66338Seric unreachable" message they closes all open connections to 387*66338Seric that host. However, some firewall gateways send this message 388*66338Seric if you try to connect to an unauthorized port, such as the 389*66338Seric IDENT port (113). Thus, no email can be received from such 390*66338Seric hosts. There is some evidence that versions of Ultrix before 391*66338Seric 4.3 do not have this problem. Thanks to Tom Ivar Helbekkmo 392*66338Seric for pointing out this behaviour to me and to Michael Corrigan 393*66338Seric of U.C. San Diego for informing me about the HPUX problem. 394*66338Seric Allow IPC mailers to return a colon-separated list of hosts in the 395*66338Seric $@ clause; these are searched in order as though they were 396*66338Seric MX records. 397*66338Seric When sending an error report, print the list of addresses tagged 398*66338Seric as bad. Requested by Allan E Johannesen of WPI. 399*66338Seric Change map function calls to return a status code. This gets 400*66338Seric passed back as the result of rewrite. Parseaddr marks 401*66338Seric the address as a QUEUEUP address if the return code is 402*66338Seric EX_TEMPFAIL. All this to queue properly if the name 403*66338Seric server is down. This code is not well tested. This code 404*66338Seric changes the interface to map lookup functions (a fifth 405*66338Seric parameter, int *statp, is added). Feature requested by 406*66338Seric Dan Oscarsson. 407*66338Seric Don't delete quotes (in the dequote map) if there are spaces in 408*66338Seric the string, since this would cause them to be replaced by 409*66338Seric the SpaceSub character. 410*66338Seric Accept BODY=8BITMIME on SMTP MAIL command. This isn't advertised 411*66338Seric because the 8BIT to 7BIT translation doesn't exist yet. 412*66338Seric This does add a "bodytype" field to both envelope and 413*66338Seric queue file and a -B command line flag to pass the type in 414*66338Seric during direct invocations. 415*66338Seric Discard return error messages only on responses to responses to 416*66338Seric responses, not on responses to responses. That is, the 417*66338Seric algorithm is to try return to sender, then return to 418*66338Seric postmaster, then discard. Previously it discarded 419*66338Seric immediately if the return to sender pass failed. 420*66338Seric CONFIG: back out change to hide unqualified hostnames behind %-hack. 421*66338Seric This screws up local aliases and .forward files. 422*66338Seric CONFIG: add FEATURE(nocanonify) to turn off calls to $[ ... $]; 423*66338Seric some sites only handle completely canonified names. 424*66338Seric Requested by John Gardiner Myers of CMU. 425*66338Seric CONFIG: some UUCP code was still included even if FEATURE(nouucp) 426*66338Seric was specified. 427*66338Seric 428*66338Seric6.52/6.24 93/04/10 429*66338Seric Clean up some minor glitches on error return messages pointed out 430*66338Seric by Motonori Nakamura of Kyoto University. 431*66338Seric Fix reply() to not reset SmtpReplyBuffer on fatal errors; this 432*66338Seric was supposed to reset SmtpMsg Buffer. This makes the 433*66338Seric client side code virtually useless. Reported by Allan 434*66338Seric E Johannesen of WPI and Phil Brandenberger of Swarthmore. 435*66338Seric Better debug messages if fuzzy is disabled, suggested by Allan 436*66338Seric E Johannesen of WPI. 437*66338Seric Offset SmtpReplyBuffer by four in usersmtp when checking for 438*66338Seric loopback. From Eric Wassenaar. 439*66338Seric Don't set $s until after runinchild in srvrsmtp -- otherwise 440*66338Seric it gets cleared. From Eric Wassenaar. 441*66338Seric Implement IDA-style $&x for deferred macro expansion. 442*66338Seric More POSIX compatibility. 443*66338Seric CONFIG: Hide unqualified hostnames behind %-hack using $s as the 444*66338Seric actual sender. This is only done if $r is non-null, that 445*66338Seric is, if this is not locally submitted mail. 446*66338Seric CONFIG: Add FEATURE(bitdomain) allowing mapping of BITNET host 447*66338Seric names to internet domains. A program contributed by 448*66338Seric John Gardiner Myers of CMU to create the maps is included 449*66338Seric in the contrib directory (in the "misc" tar file). 450*66338Seric CONFIG: Add FEATURE(uucpdomain) for a similar mapping for UUCP 451*66338Seric hosts. There is currently no tool to create this map. 452*66338Seric 453*66338Seric6.51/6.23 93/04/04 454*66338Seric Add D= mailer flag to specify a path of possible working directories 455*66338Seric in which to execute the mailer. This is intended for the 456*66338Seric prog mailer; some shells can get upset if they don't have 457*66338Seric access to the current directory. 458*66338Seric Add RFC 1413 (IDENT) protocol support. This is only very loosely 459*66338Seric tested. This adds a $_ macro to be the authenticated 460*66338Seric info (in ``user@domain [address]'' form) and debug flag 461*66338Seric 9 to trace the protocol. 462*66338Seric Check for loopbacks in usersmtp instead of srvrsmtp -- there is no 463*66338Seric reason for a local agent to not be talking to the localhost 464*66338Seric (although the inverse is not true). 465*66338Seric Add a few hooks for automated map rebuilding. This is certainly 466*66338Seric not done yet. 467*66338Seric CONFIG: Have prog mailer specify a path of ``D=$z:/'' -- that is, 468*66338Seric user's home directory then the root. 469*66338Seric CONFIG: Log RFC 1413 identification in Received: line. 470*66338Seric 471*66338Seric6.50/6.22 93/04/01 472*66338Seric Fixes to requeueing code to make it compute priority, nrcpts, 473*66338Seric and the like properly. 474*66338Seric 475*66338Seric6.49/6.22 93/04/01 476*66338Seric Diagnose incorrect privacy flags. Suggested by Bryan Costales 477*66338Seric of ICSI. 478*66338Seric Some ANSI C fixes. 479*66338Seric Arrange to quote backslashes as well as other special characters 480*66338Seric in the phrase part of a route-addr. 481*66338Seric Some fixes to FallBackMX code suggested by Motonori Nakamura of 482*66338Seric Kyoto University. 483*66338Seric More vigorous zeroing of CurHostAddr to avoid logging of bogus 484*66338Seric host addresses when you are actually just printing 485*66338Seric information from the MCI structure; problem noted by 486*66338Seric Michael Corrigan of U.C. San Diego. 487*66338Seric Don't ignore rest of queue if any job is not runnable. This can 488*66338Seric also cause an incorrect job to be lost. Fix from 489*66338Seric Eric Wassenaar. 490*66338Seric Always respond "quickly" to RCPT command; do alias expansion and 491*66338Seric the like later. This also means that mail for lists that 492*66338Seric have errors will be acccepted, and an error sent back 493*66338Seric later. This is done by instantiating the queue file 494*66338Seric and then immediately running and requeueing it. 495*66338Seric 496*66338Seric6.48/6.22 93/03/30 497*66338Seric Fix incorrect diagnosis of infinite loop in ruleset. Problem noted 498*66338Seric by several people. 499*66338Seric Improve information printed when infinite loops are discovered. 500*66338Seric Zero CurHostAddr to fix erroneous internet addresses in log when no 501*66338Seric addresses can be bound. Pointed out by Motonori Nakamura 502*66338Seric of Kyoto University. 503*66338Seric "Probe" SMTP connections using RSET instead of NOOP "just in case". 504*66338Seric Suggested by John Gardiner Myers of CMU. 505*66338Seric Don't warn about -f if you are setting sender to yourself. 506*66338Seric 507*66338Seric6.47/6.22 93/03/29 508*66338Seric Fix incompatible call to endmailer in smtpquit which causes core 509*66338Seric dumps. Noted by Allan E Johannesen of WPI. 510*66338Seric HPUX portability changes from Michael J. Corrigan of UC San Diego. 511*66338Seric Require MAIL before RCPT command in srvrsmtp.c. This had been 512*66338Seric intentional from the 821 draft days when the order wasn't 513*66338Seric clear, but is silly now. 514*66338Seric Fix bug in nis_magic routine that was initializing parameters 515*66338Seric incorrectly. Fix from Takahiro Kanbe of Fuji Xerox 516*66338Seric Information Systems Co., Ltd. 517*66338Seric Change default for PrivacyFlags in conf.c to 0 -- since it always 518*66338Seric "or"s in new values, there was no way to turn off the 519*66338Seric AuthWarning stuff. 520*66338Seric Add O option to set SMTP daemon options. 521*66338Seric Add V option to set fallback MX host. This always sorts at lower 522*66338Seric priority than anything it gets from the name server. It 523*66338Seric should only be used for environments with very bad network 524*66338Seric connectivity. Requested by several people. 525*66338Seric Log sending info. It's not clear this is a good idea. 526*66338Seric CONFIG: fix typo in mailertable code. Noted by Phil Brandenberger 527*66338Seric of Swarthmore. 528*66338Seric CONFIG: add confDAEMON_OPTIONS and confFALLBACK_MX to set options 529*66338Seric O and V, respectively. 530*66338Seric 531*66338Seric6.46/6.21 93/03/26 532*66338Seric Fix botch in server SMTP that broke transactions that did not 533*66338Seric use HELO first (like MH). Fix from Michael Corrigan 534*66338Seric of U.C. San Diego. 535*66338Seric Fall back to other MX records if there is an error anywhere 536*66338Seric in delivery (actually on MAIL or DATA -- RCPT is harder). 537*66338Seric Suggested by John Gardiner Myers and Motonori Nakamura. 538*66338Seric Revert to non-prototypes -- it turns out that our ANSI C 539*66338Seric compiler is more forgiving than most others about 540*66338Seric mixing prototyped extern declarations with non-prototyped 541*66338Seric function definitions. 542*66338Seric Fix a problem with multi-word class matching pointed out by 543*66338Seric Neil Rickert. Given: 544*66338Seric CX b a.b.c 545*66338Seric R$+ $=X $+ $: $1 < $2 > $3 546*66338Seric the input "user@a.b.c" failed instead of being properly 547*66338Seric rewritten as "user@a.<b>.c". 548*66338Seric Neil also convinced me that it was correct that $~ should match 549*66338Seric only one token -- the problem is that it's always possible 550*66338Seric to add another token, so $~ matches far too eagerly. 551*66338Seric 552*66338Seric6.45/6.21 93/03/25 553*66338Seric Implement multi-word classes (properly!). 554*66338Seric 555*66338Seric6.44/6.21 93/03/25 556*66338Seric Add X-Authentication-Warning: headers to clue users into possible 557*66338Seric attempts to forge mail. This is on the authwarnings 558*66338Seric privacy flag, but is the default. Suggested by Bryan 559*66338Seric Costales of ICSI. 560*66338Seric Pass default units for convtime in so they can be more reasonable. 561*66338Seric Allow config files to always add a new Comments: header (i.e., 562*66338Seric they will be added even if an old one already exists). 563*66338Seric Suggested by Bryan Costales of ICSI. 564*66338Seric Allow config files to delete an existing Return-Path: header. 565*66338Seric These should only be added at final delivery. Suggested 566*66338Seric by Bryan Costales of ICSI. 567*66338Seric Some debugging additions. Suggested by Bryan Costales of ICSI. 568*66338Seric Clean up logging of Family 0 addresses. Noted by David Muir 569*66338Seric Sharnoff and others. 570*66338Seric Add a "dequote" map class. This allows config files to strip 571*66338Seric quotes off of addresses. Note that this is not a builtin 572*66338Seric map, just a class -- so you have to define the map 573*66338Seric using the K line. 574*66338Seric Fix a bug in the queueup() loop getting a locked tf where in 575*66338Seric very odd cases it can fall off the bottom and core dump. 576*66338Seric Of course, it was P{r Emanuelsson who found it.... 577*66338Seric Open a new transcript when splitting an envelope. Problem found 578*66338Seric by Allan E Johannesen of WPI. 579*66338Seric Improved error output in endmailer if the mailer core dumps. 580*66338Seric CONFIG: Fix typo in UUCP mailer definition. 581*66338Seric CONFIG: Default several of the new options on: eight bit input, 582*66338Seric privacy flags set to "authwarnings", and message warning 583*66338Seric set to 4h. 584*66338Seric CONFIG: Use dequote map. 585*66338Seric 586*66338Seric6.43/6.20 93/03/23 587*66338Seric Fix problem with assumption of an sa_len field in a generic 588*66338Seric sockaddr -- it turns out that most vendors haven't 589*66338Seric picked up this (very important) fix. 590*66338Seric Change compilation flags for daemon code -- select one or both 591*66338Seric of NETINET or NETISO, but don't ever set DAEMON manually. 592*66338Seric CONFIG: add FEATURE(mailertable) to do IDA-style mailertables. 593*66338Seric 594*66338Seric6.42/6.19 93/03/19 595*66338Seric Use Postmaster as default fallback return address, not root. 596*66338Seric POSIX changes for file descriptor handling. 597*66338Seric Diagnose errors writing new queue file. 598*66338Seric If you change the owner using an owner- alias, also change the 599*66338Seric error mode to EM_MAIL so that errors don't get dropped 600*66338Seric into an inappropriate directory. Problem noted by 601*66338Seric Allan E Johannesen of WPI. 602*66338Seric If you are su'ed to root, send email as who you really are, not 603*66338Seric as root. From Brian Kantor of U.C. San Diego. 604*66338Seric Allow warning messages to be sent after a configurable interval 605*66338Seric has passed without delivery. The message is sent only 606*66338Seric once per envelope. This changes the format of the qf 607*66338Seric file to have an F line, and the format of the T option 608*66338Seric to accept take the format "return/warn" (both intervals). 609*66338Seric Don't force all local names to lower case -- this was left over 610*66338Seric from the wierd handling of case mapping on aliases. It 611*66338Seric is now driven (as expected) by the "u" mailer flag. 612*66338Seric Problem noted by P{r Emanuelsson. 613*66338Seric Fix problem that caused headers on returned email to be trashed; 614*66338Seric they were getting freed, but are still accessible via 615*66338Seric BlankEnvelope. 616*66338Seric Fix problem that caused bogus ids to be created on returned 617*66338Seric mail. 618*66338Seric Add support for ISO and other non-INET networking. This is by 619*66338Seric no means finished yet. This does assume a lot of other 620*66338Seric system support, like a version of gethostbyname that 621*66338Seric returns non-AF_INET addresses. 622*66338Seric CONFIG: change default on prog mailer to keep upper case in 623*66338Seric user names (i.e., in the program command line). 624*66338Seric CONFIG: strip trailing dots off of hosts in uucp mailer before 625*66338Seric convert to bang format. 626*66338Seric CONFIG: create new "relay" mailer for $R (LOCAL_RELAY) and $H 627*66338Seric (MAIL_HUB) delivery that doesn't add local domain. Note 628*66338Seric that this violates 821, but is probably "more correct" 629*66338Seric for what we are trying to do. Problem pointed out by 630*66338Seric Michael Graff of Iowa State. 631*66338Seric 632*66338Seric6.41/6.18 93/03/18 633*66338Seric Clean up unnecessary creates of queue ids (i.e., empty qf files) 634*66338Seric when not needed, such as when starting up an SMTP 635*66338Seric connection. 636*66338Seric Fix problem where split envelopes aren't instantiated in the queue. 637*66338Seric This is quite a serious bug. 638*66338Seric Owner- aliases had problems with leading spaces causing a 639*66338Seric premature delimitation. 640*66338Seric 641*66338Seric6.40/6.18 93/03/18 642*66338Seric Have ending 250 (after DATA) include the id; suggested by 643*66338Seric Brian Kantor of UC San Diego. 644*66338Seric Add logging on envelope splitting. 645*66338Seric Change queue ids to have one more letter encoding the hour of 646*66338Seric the day so that during a single day there is a greater 647*66338Seric likelihood of uniqueness; requested by Brian Kantor. 648*66338Seric 649*66338Seric6.39/6.18 93/03/18 650*66338Seric Fix minor compile problem if LOCKF is defined. 651*66338Seric Define size of tobuf in conf.h. Observed by Toshinari Takahashi 652*66338Seric of Toshiba. 653*66338Seric Restore e_sender -- this is equivalent to e_from.q_paddr without 654*66338Seric decorations such as angle brackets and comments. 655*66338Seric OSF/1 on Alpha changes from Allan E Johannesen of WPI. 656*66338Seric CONFIG: fix typo in S3 for list syntax (;: => :;). Thanks to 657*66338Seric Christopher Hoover for noting the problem. 658*66338Seric 659*66338Seric6.38/6.17 93/03/17 660*66338Seric Pass envelope to disconnect to avoid another use of CurEnv, which 661*66338Seric can apparently end up being null at inopportune times. 662*66338Seric Log "received from" as "relay=" for consistency (suggested by 663*66338Seric John Gardiner Myers). 664*66338Seric Fix major bug in header handling: if no From: line existed in 665*66338Seric the header (so sendmail inserts one), and the sender is 666*66338Seric an alias that has an owner, the From: line shows the 667*66338Seric owner (as well as the envelope). Fixed by early binding 668*66338Seric the headers (which will change debugging output). 669*66338Seric HPUX portability patches from Michael J. Corrigan of UC San Diego. 670*66338Seric Some attempts to adapt better to out of open file conditions. 671*66338Seric Some changes to ctladdr handling in queue files. 672*66338Seric 673*66338Seric6.37/6.17 93/03/16 674*66338Seric MAJOR CHANGE: delete e_sender and e_returnpath (why are these 675*66338Seric different from e_from?) and $< macro. 676*66338Seric Log correct IP address in relay= field even if the connection 677*66338Seric times out. 678*66338Seric Log "received from [RESPONSE]" on EF_RESPONSE messages (from 679*66338Seric John Gardiner Myers). 680*66338Seric Fixes to SysExMsg logging (sometimes just got "message: %s" 681*66338Seric instead of "message: error message"), noted by Eric 682*66338Seric Wassenaar. Also reported by Motonori Nakamura. 683*66338Seric Improvements to MX piggybacking code, from Motonori Nakamura. 684*66338Seric Fix case where CurHostName points to an auto variable that has 685*66338Seric been deallocated (from Motonori Nakamura). 686*66338Seric Fix bug causing newlines to be included in aliases if option 687*66338Seric "n" (check alias RHS) is set; bug noted by David Muir 688*66338Seric Sharnoff. 689*66338Seric Fix problem causing user names that should be mapped to lower 690*66338Seric case to not be mapped if they are sent during a queue 691*66338Seric run. This greatly simplifies the case mapping code. 692*66338Seric Problem noted by Allan E Johannesen of WPI. 693*66338Seric Don't do recipient address rewriting in buildaddr. This 694*66338Seric improperly did recipient rewriting on sender addresses, 695*66338Seric and just seems bogus in general -- but the change could 696*66338Seric break some .cf files. 697*66338Seric Pass TZ envariable to child processes for System V. 698*66338Seric CONFIG: allow LOCAL_RULE_1 and LOCAL_RULE_2 if you want to 699*66338Seric define those rulesets. 700*66338Seric KNOWN PROBLEM: I have seen some problems on SunOS that causes 701*66338Seric the User Data Base to give errors on some addresses. I 702*66338Seric have tracked the problem back at least as far as 93.02.15 703*66338Seric (version 6.22). Running with debugging on makes it 704*66338Seric go away, so I conclude that it is referencing uninitialized 705*66338Seric stack data. I haven't been able to track this down yet. 706*66338Seric 707*66338Seric6.36/6.16 93/03/08 708*66338Seric Allow local mailer to specify $@host -- this lets you assign the 709*66338Seric "foo" part of jgm+foo to $h for passing in to the local 710*66338Seric mailer. 711*66338Seric Additional debug printing in getcanonname (show query type). 712*66338Seric Don't add the e_fromdomain on sender addresses -- this interacts 713*66338Seric wierdly with the owner- code. 714*66338Seric Improve delivery logging to not log obvious or meaningless stuff. 715*66338Seric Include numeric IP address in Received: lines per RFC 1123 section 716*66338Seric 5.2.8. 717*66338Seric Fixed a bug in checking stat() return value if restrictmailq is 718*66338Seric set. Also, check the entire group set instead of just the 719*66338Seric primary group. Both from John Gardiner Myers. 720*66338Seric Don't have usrerr automatically print errno, since this is often 721*66338Seric misleading. 722*66338Seric Use transienterror() in makeconnection after connect() fails and 723*66338Seric in openmailer after execve() fails (from Eric Wassenaar). 724*66338Seric Also moved transienterror() from util.c to conf.c. 725*66338Seric Clean up from= logging on response messages. 726*66338Seric Undo patch allowing prescan to return a null vector -- it breaks 727*66338Seric too many things. 728*66338Seric Config: FEATURE(notsticky) lets you use UDB for everything coming 729*66338Seric in to the machine, even if it is specifically targetted 730*66338Seric to this machine. Without it, UDB is bypassed if the user 731*66338Seric name is fully qualified. 732*66338Seric Config: fix another minor botch with <> (local mailer wasn't 733*66338Seric mapping them properly). 734*66338Seric 735*66338Seric6.35/6.15 93/03/05 736*66338Seric Fix getrealhostname to return null if sinlen <= 0 -- this can 737*66338Seric occur if stdin is a pipe. 738*66338Seric Avoid infinite loop in getcanonname if name server return 739*66338Seric NO_DATA (for example). 740*66338Seric Config: avoid having C flag qualify list syntax and error syntax. 741*66338Seric 742*66338Seric6.34/6.14 93/03/05 743*66338Seric Fix logging in deliver to not pass too many parameters to Ultrix 744*66338Seric versions of syslog. 745*66338Seric Don't write the pid file until after the daemon has actually 746*66338Seric opened and conditioned the connection. 747*66338Seric Consider addresses "different" if their q_uids differ (so that 748*66338Seric two users forwarding to the same program will be seen 749*66338Seric as different, rather than the same). 750*66338Seric Fix problem with bad parameters in main() -- they set ExitStat 751*66338Seric but don't exit. 752*66338Seric Fix null pointer references through RealHostName -- painfully 753*66338Seric discovered by Allan E Johannesen of WPI. 754*66338Seric Fix bug causing user@@localhost to core dump (yuch). 755*66338Seric Config: don't put two @host.dom.ain on users in $=E in SMTP 756*66338Seric mailer. Also, catch user@ (no host) in ruleset 0. 757*66338Seric 758*66338Seric6.33/6.13 93/03/03 759*66338Seric Config: add confCW_FILE as the name of the cw configuration file 760*66338Seric (defaults to /etc/sendmail.cw). From P{r Emanuelsson. 761*66338Seric Allow prescan to return a pointer to an empty list -- this is 762*66338Seric not an error. Also, clean up error reporting to avoid 763*66338Seric double errors (prescan reports once, then the caller 764*66338Seric reports again). 765*66338Seric Changes to avoid trusting T_ANY queries -- run them, but if you 766*66338Seric don't get the info you expected, do T_A and T_MX queries 767*66338Seric anyhow. This also fixes an oversight where _res.options 768*66338Seric bits were being ignored. 769*66338Seric If PRIV_NOVRFY is set, use 252 response code instead of 502 per 770*66338Seric RFC 1123 section 5.2.3. It's not 100% clear that this 771*66338Seric is correct, but it probably works better with stupid 772*66338Seric mailers that do a VRFY and only check the first digit. 773*66338Seric 774*66338Seric6.32/6.12 93/03/02 775*66338Seric Fix uninitialized variable "protocol" in smtp code. 776*66338Seric Include <unistd.h> in sendmail.h -- move towards POSIX/ANSI. 777*66338Seric Additional hooks for RFC 1427 (ESMTP SIZE extension). This 778*66338Seric includes requiring that enoughspace() know the system 779*66338Seric block size, which will undoubtedly break most ports. 780*66338Seric Trace flag 19 in use for srvrsmtp.c. 781*66338Seric Additional logging -- notably the sending mailer name. This 782*66338Seric also changes the delivery logging to strict field=value 783*66338Seric syntax. 784*66338Seric Fix some problems with messages getting sent even to addresses 785*66338Seric that had been marked bad -- from Eric Wassenaar. 786*66338Seric More WIDE changes: accept host name inside [...] as non-MXed 787*66338Seric host. This is intended ONLY for use inside firewalled 788*66338Seric environments, where the MX points at the gateway. 789*66338Seric Change .cf file conventions so that mapping for <> addresses 790*66338Seric don't have an @ in them (to avoid confusing the C mailer 791*66338Seric flag). Pointed out by Neil Rickert. 792*66338Seric Config extensions for Sam Leffler's FlexFAX software. 793*66338Seric 794*66338Seric6.31/6.10 93/02/28 795*66338Seric Fix some more bugs in alias owner code -- there were some wierd 796*66338Seric cases where an error in a non-aliased name would override 797*66338Seric the return info in an aliased name with an owner. 798*66338Seric Changes from WIDE Project, forwarded to me by Motonori Nakamura: 799*66338Seric Log actual delivery host (after MX et al); from 800*66338Seric yasuhiro@dcl.co.jp. 801*66338Seric Log daemon startup. 802*66338Seric Deliver Postmaster copies without a body. 803*66338Seric Better logging of SMTP senders. 804*66338Seric Send all program email as daemon even when local. 805*66338Seric As requested in various forms from many people, accept -qIstring 806*66338Seric to limit queue runs to jobs with queue-id matching string. 807*66338Seric Similarly for -qRstring for recipients, -qSstring for 808*66338Seric senders. 809*66338Seric Initial hooks for ESMTP support (see RFC 1425). 810*66338Seric Fixed a syntax error in the UUCP mailer specification that caused 811*66338Seric core dumps on startup. 812*66338Seric Check for missing A= or P= arguments in mailer definitions. 813*66338Seric 814*66338Seric6.30/6.10 93/02/27 815*66338Seric Require FROZENCONFIG compilation flag to include frozen 816*66338Seric configuration code. Frozen configuration is really 817*66338Seric not a very good idea any more, particularly in shared 818*66338Seric library environments. 819*66338Seric Do better checking of errno after opens of :include: and .forward 820*66338Seric files to defer delivery on network and other transient 821*66338Seric errors. Suggestion from Craig Everhart. 822*66338Seric Fix minor botch in read timeout macro processing. 823*66338Seric Add FEATURE(nouucp) to config files for sites that know absolutely 824*66338Seric nothing about UUCP. 825*66338Seric Add built cf files to distribution tape and clarify how to build 826*66338Seric them if you don't have the Berkeley make. 827*66338Seric Some sizeof(long) portability changes for the Alpha, from Allan 828*66338Seric E Johannesen. 829*66338Seric Add "restrictmailq" privacy flag -- if set, only people in the same 830*66338Seric group as your queue directory can print the queue. If you 831*66338Seric set this, be sure you also restrict access to log files.... 832*66338Seric Fix another bug in owner-list stuff that can cause data files to 833*66338Seric be "lost". 834*66338Seric Fix a bug with queue runs that cause forwards to yourself to go 835*66338Seric into alias/forwarding loops. I'm still iffy about this 836*66338Seric fix. 837*66338Seric Fix from Eric Wassenaar for suppression of return message code. 838*66338Seric 839*66338Seric6.29/6.9 93/02/24 840*66338Seric Fix yet another problem in alias owner code -- put the wrong return 841*66338Seric address on the enclosed return-to-sender letter. 842*66338Seric 843*66338Seric6.28/6.9 93/02/24 844*66338Seric Fix botch in alias owner code that caused it to not operate if the 845*66338Seric error was detected locally. 846*66338Seric 847*66338Seric6.27/6.9 93/02/24 848*66338Seric M_LOCAL => M_LOCALMAILER to avoid conflict with Ultrix include 849*66338Seric file <sys/mount.h>. 850*66338Seric Miscellaneous bug fixes from Eric Wassenaar: 851*66338Seric sendmail -bv -t logs the from line even though in verify 852*66338Seric mode only. 853*66338Seric sendmail -v can go into queue mode if shouldqueue returns 854*66338Seric TRUE. 855*66338Seric Add route-addr pruning per RFC 1123 section 5.3.3. This can be 856*66338Seric disabled using the "R" option. 857*66338Seric Delete (always undocumented) -R flag (save original recipients); 858*66338Seric there are ways to syslog(3) these now. 859*66338Seric Clean up SMTP reply codes -- specify them as needed in the code, 860*66338Seric instead of in conf.c -- this was needed during the NCP to 861*66338Seric TCP transition, but seems silly now. This also changes 862*66338Seric parameters to message and nmessage. 863*66338Seric Have mailstats read the .cf file to find the sendmail.st file and 864*66338Seric get text versions of mailer names. An initial version of 865*66338Seric this code was provided by Tuominen Keijo (although the 866*66338Seric comments indicate the good bits were written by "E.V."). 867*66338Seric Add yet more System V compatibility hacks. 868*66338Seric Fix bug in VRFY code (assumes everything must be a local user). 869*66338Seric Allow specification of any of the hard-wired pathnames in the 870*66338Seric Makefile. 871*66338Seric Delete concept of "trusted users" -- this really didn't provide 872*66338Seric any security anyway, and caused some problems. 873*66338Seric Delete last vestige of support for the word "at" as an equivalent 874*66338Seric to the character "@". 875*66338Seric Propagate owner-foo alias information into the envelope sender. 876*66338Seric Based on code from John Gardiner Myers. This is a major 877*66338Seric semantic change -- beware! 878*66338Seric Allow $@ on LHS to indicate "match zero" -- this is used to match 879*66338Seric the null expression. 880*66338Seric 881*66338Seric6.26/6.8 93/02/21 882*66338Seric Don't "lose" queue runs. Very important fix from (who else?) 883*66338Seric Eric Wassenaar. 884*66338Seric Completely reset state on RSET command -- from Eric Wassenaar. 885*66338Seric Send error messages and return receipts using an envelope sender 886*66338Seric of <> regardless of the setting of $n. Rewriting rules 887*66338Seric can undo this if they feel the necessity, as might be 888*66338Seric needed for networks that don't understand the syntax. 889*66338Seric This is permitted by RFC 821 section 3.6 and required by 890*66338Seric RFC 1123 section 5.3.3. THIS REQUIRES VERSION 4 CONFIG 891*66338Seric FILES because the rulesets must be able to parse <> 892*66338Seric properly. 893*66338Seric Don't ever send error messages to "<>" -- they will get sent to 894*66338Seric the local postmaster or dumped in /usr/tmp/dead.letter 895*66338Seric instead. Per RFC 1123 section 5.3.3. 896*66338Seric Explicitly check for email to yourself as a dotted quad. You 897*66338Seric have to call $[ [ ... ] $] to get this. 898*66338Seric Up the message timeout to five days per RFC 1123 section 5.3.1.1. 899*66338Seric Make all read timeouts individually configurable, as strongly 900*66338Seric recommended by RFC 1123 section 5.3.2. 901*66338Seric Use f_bavail (blocks available to regular users) instead of f_bfree 902*66338Seric (blocks available to superuser) in free block checks. 903*66338Seric Change $d macro to be the current time, not the origination time, 904*66338Seric since this is consistent with how it is used now. 905*66338Seric Generalization of enoughspace from Eric Wassenaar covering 906*66338Seric SGI, Apollo, HPUX, Ultrix, and SunOS. 907*66338Seric Ignore process group signals -- some front ends can do this if 908*66338Seric you kill a window too quickly. From Eric Wassenaar. 909*66338Seric Change umask to 022. 910*66338Seric 911*66338Seric6.25/6.8 93/02/20 912*66338Seric Close all cached connections before calling mailers and after 913*66338Seric forking for delivery (caused double closes which resulted 914*66338Seric in false errors). 915*66338Seric Add FEATURE(redirect) in config files -- this allows you to alias 916*66338Seric old addresses to a pointer to the new address that will 917*66338Seric give a 551 error message, but not deliver the mail. 918*66338Seric Some code changes to make the 551 errors look pretty. 919*66338Seric Names of M4 program paths in config files have changed -- they 920*66338Seric are all XXX_MAILER_PATH now, to match XXX_MAILER_FLAGS. 921*66338Seric Fix a bug in the QSELFREF code having to do with empty .forward 922*66338Seric files, reported by Eric Wassenaar. 923*66338Seric Add option "p" (privacy flags); this allows you to tune how 924*66338Seric picky the SMTP server will be. This also adds the 925*66338Seric confPRIVACY_FLAGS M4 macro in the config files. 926*66338Seric Add option "b" (minimum blocks free). If there are fewer than 927*66338Seric this number of blocks free on the filesystem containing 928*66338Seric the queue directory, the SMTP MAIL command will return 929*66338Seric a 452 response and ask you to try again later. This 930*66338Seric also adds the confMIN_FREE_BLOCKS M4 macro in the config 931*66338Seric files. 932*66338Seric Made VRFY just verify (doesn't expand aliases and .forward files); 933*66338Seric EXPN does full expansion. RCPT in queue-only mode also 934*66338Seric doesn't chase aliases and .forward. 935*66338Seric 936*66338Seric6.24/6.7 93/02/19 937*66338Seric Increase the number of domain search entries in domain.c to allow 938*66338Seric for the extra "" entry indicating the root domain. 939*66338Seric Reported by Motonori Nakamura of Kyoto U. 940*66338Seric Add a "SMART_HOST" in the configs for UUCP-connected sites that 941*66338Seric want to forward all mail with extra "@"s to that site. 942*66338Seric Also allows SMART_HOST, LOCAL_RELAY, and MAIL_HUB to 943*66338Seric be specified as ``mailer:hostname'' to use an alternate 944*66338Seric mailer. 945*66338Seric Clarified and updated some wording in the Operations Guide. 946*66338Seric Add the "c" mailer flag -- this suppresses all comment parts of 947*66338Seric addresses (requested by John Curran of NEARnet). 948*66338Seric Have -v print prompts in -bt mode even if stdin is not a terminal 949*66338Seric (default behaviour is to be silent if not reading from 950*66338Seric a terminal). Suggested by Bryan Costales, ICSI. 951*66338Seric Move the metacharacters from C0 space (\001-\037) into C1 space 952*66338Seric (\201-\237). This also fixes a bunch of potential bugs 953*66338Seric with G1 characters (\240-\276) in headers relating to 954*66338Seric negative numbers passed to isspace() et al. 955*66338Seric Add YP_LAST_MODIFIED and YP_MASTER_NAME to DBM version of alias 956*66338Seric database if YPCOMPAT is #defined. Enhancement from 957*66338Seric Takahiro Kanbe of Fuji Xerox Information Systems Co., Ltd. 958*66338Seric Add "list" Precedence (-30); this can be used with old sendmails 959*66338Seric which will map to precedence 0 (which will return error 960*66338Seric messages). Suggested by Stephen R. van den Berg. 961*66338Seric Many bug fixes from Eric Wassenaar of the National Institute for 962*66338Seric Nuclear and High-Energy Physics, Amsterdam: 963*66338Seric Clear timeouts properly on open failures in include(). 964*66338Seric Don't dereference through NULL if no home directory found. 965*66338Seric Re-establish SIGCHLD signal on System 5 in reapchild(). 966*66338Seric Avoid NULL pointer reference on -pFOO flag. 967*66338Seric Properly handle backslash escapes in comments. 968*66338Seric Correctly check reply status on SMTP NOOP command. 969*66338Seric Properly save SMTP error message if peer gives 970*66338Seric "Service Shutting Down" message. 971*66338Seric Avoid writing to the transcript if it couldn't be opened. 972*66338Seric Signal errors in SMTP children to parent properly. 973*66338Seric Handle self references in a list more globally (include a 974*66338Seric QSELFREF bit in the address flags). This enhancement 975*66338Seric was suggested by Eric Wassenaar. 976*66338Seric Use initgroups() in hpux, even though it's System-V based. The 977*66338Seric HASINITGROUPS compile flag can set this on other systems. 978*66338Seric This HPUX behaviour was pointed out by Eric Wassenaar. 979*66338Seric 980*66338Seric6.23/6.6 93/02/16 981*66338Seric Clean up handling of LogLevel to make it easier to figure out 982*66338Seric what's on what level. 983*66338Seric Change log levels to have some consistency: 984*66338Seric 1 serious system failures, security problems 985*66338Seric 2 lost communications, protocol failures 986*66338Seric 3 other serious failures 987*66338Seric 4 minor errors 988*66338Seric 5 message collection 989*66338Seric 6 vrfy logging, creation of return-to-sender 990*66338Seric 7 delivery failures 991*66338Seric 8 delivery successes 992*66338Seric 9 delivery tempfails (queue ups) 993*66338Seric 10 database expansion 994*66338Seric >64 debugging 995*66338Seric Allow IDA-style separated processing on S= and R= in Mailer 996*66338Seric definition lines. Note that rulesets 1 and 2 are 997*66338Seric still used for both addresses as before. Bruce Lilly 998*66338Seric gave a convincing argument that RFC976 insists on 999*66338Seric this behaviour. 1000*66338Seric Added some time zones to arpatounix -- they may not be in the 1001*66338Seric standards, but they are in use. However, I may delete 1002*66338Seric arpatounix entirely -- there appears to be no reason 1003*66338Seric for it to exist. 1004*66338Seric Change to UUCP mailer (in cf directory) to try to do a saner job. 1005*66338Seric I'm still not certain about this mailer in general. 1006*66338Seric 1007*66338Seric6.22/6.5 93/02/15 1008*66338Seric Fix bug that prevents saving letters in ~/dead.letter. 1009*66338Seric Don't add angle brackets in VRFY command if angle brackets already 1010*66338Seric exist in the address. 1011*66338Seric Fix bogus error message in udbexpand. 1012*66338Seric Null terminate host buffers in buildaddr (broken in 6.21) -- 1013*66338Seric IMPORTANT FIX!! 1014*66338Seric 1015*66338Seric6.21/6.5 93/02/15 1016*66338Seric Fix another incorrect error message in alias.c, found by Azuma 1017*66338Seric Okamoto. 1018*66338Seric Fix a couple of problems in the more-configurable config files, 1019*66338Seric found by Tom Ivar Helbekkmo. 1020*66338Seric Fix problem with quoted :include: entries. 1021*66338Seric Don't duplicate the filename on verbose printing of .forward and 1022*66338Seric :include: contents. 1023*66338Seric Extend size of prescan buffer (to allow bigger addresses). Also, 1024*66338Seric detect some buffer overflows. 1025*66338Seric Log user SMTP protocol errors (log level 4). 1026*66338Seric 1027*66338Seric6.20/6.4 93/02/14 1028*66338Seric Fix another problem in the MCI state machine caused when there 1029*66338Seric were errors generated from the other end to commands 1030*66338Seric other than RCPT. 1031*66338Seric 1032*66338Seric6.19/6.4 93/02/14 1033*66338Seric Include load average support for DEC Alpha running OSF/1. 1034*66338Seric Fix multiple-response problem with errors in MAIL From: line. 1035*66338Seric Fix SMTP reply codes for invalid address syntaxes (give 501; 1036*66338Seric never give multiple error messages for a single message). 1037*66338Seric Fix problem where a cached connection timeout rejects all 1038*66338Seric later connects to that host. 1039*66338Seric Fix incorrect error message if alias.c is compiled with DBM only. 1040*66338Seric Additional changes to fix nested conditionals (from Bruce Lilly). 1041*66338Seric Recover more gracefully from operating system failures, particularly 1042*66338Seric NULL returns from openmailer (from Noritoshi Demizu, 1043*66338Seric OMRON Corporation). 1044*66338Seric Log forward, alias, and userdb expand operations on log level 10; 1045*66338Seric concept suggested by P{r (Pell) Emanuelsson. 1046*66338Seric Changes for HPUX 8.07 compatibility. 1047*66338Seric 1048*66338Seric6.18/6.4 93/02/12 1049*66338Seric Allow any config option to be set using an M4 define. 1050*66338Seric Change UNAME compile flag to HASUNAME for IDA compatibility 1051*66338Seric (besides, it's a better name). 1052*66338Seric Note in README that on SunOS it must be linked -Bstatic. 1053*66338Seric Fairly major change in domain.c to handle wildcard MX records 1054*66338Seric more rationally. NOTE: the "w" option (no wildcard MX 1055*66338Seric records match local domain) has been eliminated. 1056*66338Seric Fix some unset variable references pointed out by Bruce Lilly. 1057*66338Seric Fix host name in process titles when using cached connection. 1058*66338Seric 1059*66338Seric6.17/6.3 93/01/28 1060*66338Seric Fix System 5 compatibility changes to be compatible with the rest 1061*66338Seric of the world. 1062*66338Seric 1063*66338Seric6.16/6.3 93/01/28 1064*66338Seric Experimental fix for problem handling errors in the SMTP 1065*66338Seric protocol in conjunction with connection caching. 1066*66338Seric System 5 compatibility changes. 1067*66338Seric 1068*66338Seric6.15/6.3 93/01/26 1069*66338Seric Fix a bug that causes local mail delivered using -odq to be 1070*66338Seric eliminated as a duplicate (because it matched the 1071*66338Seric ctladdr, now passed in as a C line). These changes 1072*66338Seric are pretty tricky...... 1073*66338Seric 1074*66338Seric6.14/6.3 93/01/25 1075*66338Seric Add debugging for some MCI errors. 1076*66338Seric 1077*66338Seric6.13/6.3 93/01/22 1078*66338Seric Fix -e compatibility flag to take a value. 1079*66338Seric Fix a couple of minor compilation warnings on Sun cc. 1080*66338Seric Improve error messages in a few cases to be more self-explanatory. 1081*66338Seric 1082*66338Seric6.12/6.3 93/01/21 1083*66338Seric Fix yet-another problem with environment handling, pointed out 1084*66338Seric by Yoshitaka Tokugawa and Tom Ivar Helbekkmo. 1085*66338Seric Some heuristics to try to limit resource exhaustion problems 1086*66338Seric if a downstream host has been down for a long time. 1087*66338Seric Fix problem with incorrect host name being logged in "Connection 1088*66338Seric timed out" messages (from Tom Ivar Helbekkmo). 1089*66338Seric Fix some ANSI C problems (from Takahiro Kanbe). 1090*66338Seric Properly log message sender on returned mail during queue run. 1091*66338Seric Count number of recipients properly. 1092*66338Seric Fix a problem in yp map code. 1093*66338Seric Diagnose "message timed out" (from Motonori Nakamura). 1094*66338Seric 1095*66338Seric6.11/6.3 93/01/20 1096*66338Seric Fix problem with address delimitor inside quotes. 1097*66338Seric Define $k and $=k to be the UUCP name (from the uname call) 1098*66338Seric based on code from Bruce Lilly. 1099*66338Seric 1100*66338Seric6.10/6.2 93/01/18 1101*66338Seric Implement arpatounix (largely code from Bruce Lilly). 1102*66338Seric Log more info (suggested by John Myers). 1103*66338Seric Allow nested $?...$|...$. (inspired by code from Bruce Lilly of 1104*66338Seric Sony US). 1105*66338Seric POSIX compatibility (noted by Keith Bostic). 1106*66338Seric Handle SMTP MAIL command errors properly (urged by several people, 1107*66338Seric notably John Myers of CMU). 1108*66338Seric Do early diagnosis of .cf errors (notably referencing a RHS 1109*66338Seric substitution that isn't on the LHS). 1110*66338Seric Adjust checkpointing to better handle batched recipients, suggested 1111*66338Seric by John Myers. 1112*66338Seric Fix miscellaneous bugs. 1113*66338Seric (config files:) Implement MAIL_HUB for all local mail (to handle 1114*66338Seric NFS-mounted directories) as urged by Tom Ivar Helbekkmo 1115*66338Seric of the Norwegian School of Economics. 1116*66338Seric 1117*66338Seric6.9/6.1 93/01/13 1118*66338Seric Environment handling simplification/bug fix -- child processes 1119*66338Seric get a minimal, fixed environment. This avoids different 1120*66338Seric behaviour in queue runs. 1121*66338Seric Handle commas inside comments properly. 1122*66338Seric Properly limit large messages submitted in -obq mode. 1123*66338Seric 1124*66338Seric6.8/6.1 93/01/10 1125*66338Seric Check mtime of thaw file against .cf and sendmail binary, based on 1126*66338Seric code from John Myers. 1127*66338Seric 1128*66338Seric6.7/6.1 93/01/10 1129*66338Seric MX piggybacking, based on code from John Myers@CMU. 1130*66338Seric Allow checkcompat to return -1 to mean tempfail. 1131*66338Seric Bug fix in m_mno computation. 1132*66338Seric 1133*66338Seric6.6/6.1 93/01/09 1134*66338Seric Tuning of queueing functions as recommended by John Gardiner Myers. 1135*66338Seric Return mail headers (no body) on messages with negative precedence. 1136*66338Seric Minor other bug fixes. 1137*66338Seric 1138*66338Seric6.5/6.1 93/01/03 1139*66338Seric Fix botch causing queued headers to have ?XX? prefixes. 1140*66338Seric 1141*66338Seric6.4/6.1 93/01/02 1142*66338Seric Changes to recognize special mailer types (e.g., file) early. 1143*66338Seric 1144*66338Seric6.3/6.1 93/01/01 1145*66338Seric Pass timeouts to sfgets. 1146*66338Seric Check for control characters in addresses. 1147*66338Seric Fixed deferred error reporting. 1148*66338Seric Report duplicate aliases. 1149*66338Seric Handle mixed case recursive aliases. 1150*66338Seric Misc bug fixes. 1151*66338Seric 1152*66338Seric6.2/6.1 92/12/30 1153*66338Seric Put return-receipt-to on a conf.c flag (but don't set it). 1154*66338Seric Fix minor syslog problem. 1155