diff -r -c sendmail-8.8.4/RELEASE_NOTES sendmail-8.8.5/RELEASE_NOTES *** sendmail-8.8.4/RELEASE_NOTES Mon Dec 2 08:05:13 1996 --- sendmail-8.8.5/RELEASE_NOTES Tue Jan 21 08:43:48 1997 *************** *** 1,10 **** SENDMAIL RELEASE NOTES ! @(#)RELEASE_NOTES 8.8.4.4 (Berkeley) 12/2/96 This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. 8.8.4/8.8.4 96/12/02 SECURITY: under some circumstances, an attacker could get additional --- 1,156 ---- SENDMAIL RELEASE NOTES ! @(#)RELEASE_NOTES 8.8.5.3 (Berkeley) 1/21/97 This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. + + 8.8.5/8.8.5 97/01/21 + SECURITY: Clear out group list during startup. Without this, sendmail + will continue to run with the group permissions of the caller, + even if RunAsUser is specified. + SECURITY: Make purgestat (-bH) be root-only. This is not in response + to any known attack, but it's best to be conservative. + Suggested by Peter Wemm of DIALix. + SECURITY: Fix buffer overrun problem in MIME code that has possible + security implications. Patch from Alex Garthwaite of the + University of Pennsylvania. + Use of a -f flag with a phrase attached (e.g., "-f 'Full Name '") + would truncate the address after "Full". Although the -f + syntax is incorrect (since it is in the envelope, it + shouldn't have comments and full names), the failure mode + was unnecessarily awful. + Fix a possible null pointer dereference when converting 8-bit data + to a 7-bit format. Problem noted by Jim Hutchins of + Sandia National Labs and David James of British Telecom. + Clear out stale state that affected F=9 on SMTP mailers in queue + runs. Although this really shouldn't be used (F=9 is for + final delivery only, and using it on an SMTP mailer makes + it possible for a message to be converted from 8->7->8->7 + bits several times), it shouldn't have failed with a syserr. + Problem noted by Eric Hagberg of Morgan Stanley. + _Really_ fix the multiple :maildrop code in the user database + module. Patch from Roy Mongiovi of Georgia Tech. + Let F lines in the configuration file actually read root-only + files if the configuration file is safe. Based on a + patch from Keith Reynolds of SCO. + ETRN followed by QUIT would hold the connection open until the queue + run completed. Problem noted by Truck Lewis of TDK + Semiconductor Corp. + It turns out that despite the documentation, the TCP wrappers library + does _not_ log rejected connections. Do the logging ourselves. + Problem noted by Fletcher Mattox of the University of Texas + at Austin. + If sendmail finds a qf file in its queue directory that is an unknown + version (e.g., when backing out to an old version), the + error is reported on every queue run. Change it to only + give the error once (and rename the qf => Qf). Patch from + William A. Gianopoulos of Raytheon Company. + Start a new session when doing background delivery; currently it + ignored signals but didn't start a new signal, that caused + some problems if a background process tried to send mail + under certain circumstances. Problem noted by Eric Hagberg + of Morgan Stanley; fix from Kari Hurtta. + Simplify test for skipping a queue run to just check if the current + load average is >= the queueing load average. Previously + the check factored in some other parameters that caused it + to essentially never skip the queue run. Patch from Bryan + Costales. + If the SMTP server is running in "nullserver" mode (that is, it is + rejecting all commands), start sleeping after MAXBADCOMMAND + (25) commands; this helps prevent a bad guy from putting + you into a tight loop as a denial-of-service attack. Based + on an e-mail conversation with Brad Knowles of AOL. + Slow down when too many "light weight" commands have been issued; + this helps prevent a class of denial-of-service attacks. + The current values and defaults are: + MAXNOOPCOMMANDS 20 NOOP, VERB, ONEX, XUSR + MAXHELOCOMMANDS 3 HELO, EHLO + MAXVRFYCOMMANDS 6 VRFY, EXPN + MAXETRNCOMMANDS 8 ETRN + These will probably be configurable in a future release. + On systems that have uid_t typedefed to be an unsigned short, programs + that had the F=S flag and no U= equate would be invoked with + the real uid set to 65535 rather than being left unchanged. + In some cases, NOTIFY=NEVER was not being honored. Problem noted + by Steve Hubert of the University of Washington, Seattle. + Mail that was Quoted-Printable encoded and had a soft line break on + the last line (i.e., an incomplete continuation) had the last + line dropped. Since this appears to be illegal it isn't + clear what to do with it, but flushing the last line seems + to be a better "fail soft" approach. Based on a patch from + Eric Hagberg. + If AllowBogusHELO and PrivacyOptions=needmailhelo are both set, a + bogus HELO command still causes the "Polite people say HELO + first" error message. Problem pointed out by Chris Thomas + of UCLA; patch from John Beck of SunSoft. + Handle "sendmail -bp -qSfoobar" properly if restrictqrun is set + in PrivacyFlags. The -q shouldn't turn this command off. + Problem noted by Murray Kucherawy of Pacific Bell Internet; + based on a patch from Gregory Neil Shapiro of WPI. + Don't consider SMTP reply codes 452 or 552 (exceeded storage allocation) + in a DATA transaction to be sticky; these can occur because + a message is too large, and smaller messages should still go + through. Problem noted by Matt Dillon of Best Internet + Communications. + In some cases bounces were saved in /var/tmp/dead.letter even if they + had been successfully delivered to the envelope sender. + Problem noted Eric Hagberg of Morgan Stanley; solution from + Gregory Neil Shapiro of WPI. + Give better diagnostics on long alias lines. Based on code contributed + by Patrick Gosling of the University of Cambridge. + Increase the number of virtual interfaces that will be probed for + alternate names. Problem noted by Gregory Neil Shapiro of + WPI. + PORTABILITY: + UXP/DS V20L10 for Fujitsu DS/90: Makefile patches from + Toshiaki Nomura of Fujitsu Limited. + SunOS with LDAP support: compile problems with struct timeval. + Patch from Nick Cuccia of TCSI Corporation. + SCO: from Keith Reynolds of SCO. + Solaris: kstat load average computation wasn't being used. + Fixes from Michael Ju. Tokarev of Telecom Service, JSC + (Moscow). + OpenBSD: from Jason Downs of teeny.org. + Altos System V: from Tim Rice. + Solaris 2.5: from Alan Perry of SunSoft. + Solaris 2.6: from John Beck of SunSoft. + Harris Nighthawk PowerUX (mh6000 box): from Bob Miorelli + of Pratt & Whitney . + CONFIG: It seems that I hadn't gotten the Received: line syntax + _just_right_ yet. Tweak it again. I'll omit the names + of the "contributors" (quantity two) in this one case. + As of now, NO MORE DISCUSSION about the syntax of the + Received: line. + CONFIG: Although FEATURE(nullclient) uses EXPOSED_USER (class $=E), + it never inserts that class into the output file. Fix it + so it will honor EXPOSED_USER but will _not_ include root + automatically in this class. Problem noted by Ronan KERYELL + of Centre de Recherche en Informatique de l'École Nationale + Supérieure des Mines de Paris (CRI-ENSMP). + CONFIG: Clean up handling of "local:" syntax in relay specifications + such as LUSER_RELAY. This change permits the following + syntaxes: ``local:'' will send to the same user on the + local machine (e.g., in a mailertable entry for "host", + ``local:'' will cause an address addressed to user@host to + go to user on the local machone). ``local:user'' will send + to the named user on the local machine. ``local:user@host'' + is equivalent to ``local:user'' (the host is ignored). In + all cases, the original user@host is passed in $@ (i.e., the + detail information). Inspired by a report from Michael Fuhr + of Dimensional Communications, L.L.C. + CONFIG: Strip quotes from the first word of an "error:" host + indication. This lets you set (for example) the LUSER_RELAY + to be ``error:\"5.1.1\" Your Message Here''. Note the use + of the \" so that the resulting string is properly quoted. + Problem noted by Gregory Neil Shapiro of WPI. + OP.ME: documentation was inconsistent about whether sendmail did a + NOOP or a RSET to probe the connection (it does a RSET). + Inconsistency noted by Deeran Peethamparam. + OP.ME: insert additional blank pages so it will print properly on + a duplex printer. From Matthew Black of Cal State University, + Long Beach. 8.8.4/8.8.4 96/12/02 SECURITY: under some circumstances, an attacker could get additional diff -r -c sendmail-8.8.4/cf/README sendmail-8.8.5/cf/README *** sendmail-8.8.4/cf/README Sat Nov 16 09:51:43 1996 --- sendmail-8.8.5/cf/README Thu Jan 16 17:20:29 1997 *************** *** 4,10 **** Eric Allman ! @(#)README 8.108 (Berkeley) 11/16/96 This document describes the sendmail configuration files being used --- 4,10 ---- Eric Allman ! @(#)README 8.111 (Berkeley) 1/16/97 This document describes the sendmail configuration files being used *************** *** 31,38 **** 4.2bsd, SysV.2, or 7th Edition version, I suggest finding a friend with a newer version. You can m4-expand on their system, then run locally. SunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work. GNU m4 version 1.1 ! also works. Unfortunately, I'm told that the M4 on BSDI 1.0 doesn't ! work -- you'll have to use a Net/2 or GNU version. IF YOU DON'T HAVE A BERKELEY MAKE, don't despair! Just run "m4 ../m4/cf.m4 foo.mc > foo.cf" -- that should be all you need. --- 31,40 ---- 4.2bsd, SysV.2, or 7th Edition version, I suggest finding a friend with a newer version. You can m4-expand on their system, then run locally. SunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work. GNU m4 version 1.1 ! or later also works. Unfortunately, I'm told that the M4 on BSDI 1.0 ! doesn't work -- you'll have to use a Net/2 or GNU version. GNU m4 is ! available from ftp://prep.ai.mit.edu/pub/gnu/m4-1.4.tar.gz (check for ! the latest version). IF YOU DON'T HAVE A BERKELEY MAKE, don't despair! Just run "m4 ../m4/cf.m4 foo.mc > foo.cf" -- that should be all you need. *************** *** 305,313 **** PROCMAIL_MAILER_PATH [/usr/local/bin/procmail] The path to the procmail program. This is also used by FEATURE(local_procmail). PROCMAIL_MAILER_FLAGS [Shu] Flags added to Procmail mailer. Flags ! ``DFMmn'' are always set. PROCMAIL_MAILER_ARGS [procmail -m $h $f $u] The arguments passed to ! the Procmail mailer. PROCMAIL_MAILER_MAX [undefined] If set, the maximum size message that will be accepted by the procmail mailer. MAIL11_MAILER_PATH [/usr/etc/mail11] The path to the mail11 mailer. --- 307,319 ---- PROCMAIL_MAILER_PATH [/usr/local/bin/procmail] The path to the procmail program. This is also used by FEATURE(local_procmail). PROCMAIL_MAILER_FLAGS [Shu] Flags added to Procmail mailer. Flags ! ``DFMmn'' are always set. This is NOT used by ! FEATURE(local_procmail); tweak LOCAL_MAILER_FLAGS ! instead. PROCMAIL_MAILER_ARGS [procmail -m $h $f $u] The arguments passed to ! the Procmail mailer. This is NOT used by ! FEATURE(local_procmail); tweak LOCAL_MAILER_ARGS ! instead. PROCMAIL_MAILER_MAX [undefined] If set, the maximum size message that will be accepted by the procmail mailer. MAIL11_MAILER_PATH [/usr/etc/mail11] The path to the mail11 mailer. *************** *** 694,700 **** normally the +indicator is just tossed, but by default it is passed as the -a argument to procmail. The argument to this feature is the pathname of procmail, ! which defaults to PROCMAIL_MAILER_PATH. bestmx_is_local Accept mail as though locally addressed for any host that lists us as the best possible MX record. This generates --- 700,709 ---- normally the +indicator is just tossed, but by default it is passed as the -a argument to procmail. The argument to this feature is the pathname of procmail, ! which defaults to PROCMAIL_MAILER_PATH. Note that this ! does NOT use PROCMAIL_MAILER_FLAGS or PROCMAIL_MAILER_ARGS ! for the local mailer; tweak LOCAL_MAILER_FLAGS and ! LOCAL_MAILER_ARGS instead. bestmx_is_local Accept mail as though locally addressed for any host that lists us as the best possible MX record. This generates *************** *** 1426,1432 **** confFROM_HEADER From: [$?x$x <$g>$|$g$.] The format of an internally generated From: address. confRECEIVED_HEADER Received: ! [.$?_($?s$|from $.$_) $.by $j ($v/$Z)$?r with $r$. id $i$?u for $u$.; $b] The format of the Received: header in messages passed through this host. It is unwise to try to change this. --- 1435,1444 ---- confFROM_HEADER From: [$?x$x <$g>$|$g$.] The format of an internally generated From: address. confRECEIVED_HEADER Received: ! [$?sfrom $s .$?_($?s$|from $.$_) ! $.by $j ($v/$Z)$?r with $r$. id $i$?u ! for $u$.; ! $b] The format of the Received: header in messages passed through this host. It is unwise to try to change this. diff -r -c sendmail-8.8.4/cf/cf/Makefile sendmail-8.8.5/cf/cf/Makefile *** sendmail-8.8.4/cf/cf/Makefile Tue Sep 12 17:06:03 1995 --- sendmail-8.8.5/cf/cf/Makefile Tue Jan 14 17:54:57 1997 *************** *** 1,10 **** ! # @(#)Makefile 8.17 (Berkeley) 9/12/95 # # This Makefile uses the new Berkeley "make" program. See Makefile.dist # for a more vanilla version. # ! # Configuration files are created using "m4 file.mc > file.cf"; # this may be easier than tweaking the Makefile. You do need to # have a fairly modern M4 available (GNU m4 works). On SunOS, use # /usr/5bin/m4. --- 1,10 ---- ! # @(#)Makefile 8.19 (Berkeley) 1/14/97 # # This Makefile uses the new Berkeley "make" program. See Makefile.dist # for a more vanilla version. # ! # Create configuration files using "m4 ../m4/cf.m4 file.mc > file.cf"; # this may be easier than tweaking the Makefile. You do need to # have a fairly modern M4 available (GNU m4 works). On SunOS, use # /usr/5bin/m4. *************** *** 31,37 **** cs-sunos4.1.cf cs-ultrix4.cf \ s2k-osf1.cf s2k-ultrix4.cf \ chez.cs.cf huginn.cs.cf mail.cs.cf mail.eecs.cf mailspool.cs.cf \ ! python.cs.cf ucbarpa.cf ucbvax.cf vangogh.cs.cf all: $(ALL) --- 31,37 ---- cs-sunos4.1.cf cs-ultrix4.cf \ s2k-osf1.cf s2k-ultrix4.cf \ chez.cs.cf huginn.cs.cf mail.cs.cf mail.eecs.cf mailspool.cs.cf \ ! python.cs.cf ucbarpa.cf ucbvax.cf vangogh.cs.cf knecht.cf all: $(ALL) diff -r -c sendmail-8.8.4/cf/cf/Makefile.dist sendmail-8.8.5/cf/cf/Makefile.dist *** sendmail-8.8.4/cf/cf/Makefile.dist Tue Sep 12 17:06:03 1995 --- sendmail-8.8.5/cf/cf/Makefile.dist Tue Jan 14 17:54:57 1997 *************** *** 1,11 **** # # Makefile for configuration files. # ! # @(#)Makefile.dist 8.9 (Berkeley) 9/12/95 # # ! # Configuration files are created using "m4 file.mc > file.cf"; # this may be easier than tweaking the Makefile. You do need to # have a fairly modern M4 available (GNU m4 works). On SunOS, use # /usr/5bin/m4. --- 1,11 ---- # # Makefile for configuration files. # ! # @(#)Makefile.dist 8.11 (Berkeley) 1/14/97 # # ! # Create configuration files using "m4 ../m4/cf.m4 file.mc > file.cf"; # this may be easier than tweaking the Makefile. You do need to # have a fairly modern M4 available (GNU m4 works). On SunOS, use # /usr/5bin/m4. *************** *** 31,37 **** cs-sunos4.1.cf cs-ultrix4.cf \ s2k-osf1.cf s2k-ultrix4.cf \ chez.cs.cf huginn.cs.cf mail.cs.cf mail.eecs.cf mailspool.cs.cf \ ! python.cs.cf ucbarpa.cf ucbvax.cf vangogh.cs.cf all: $(ALL) --- 31,37 ---- cs-sunos4.1.cf cs-ultrix4.cf \ s2k-osf1.cf s2k-ultrix4.cf \ chez.cs.cf huginn.cs.cf mail.cs.cf mail.eecs.cf mailspool.cs.cf \ ! python.cs.cf ucbarpa.cf ucbvax.cf vangogh.cs.cf knecht.cf all: $(ALL) diff -r -c sendmail-8.8.4/cf/cf/knecht.mc sendmail-8.8.5/cf/cf/knecht.mc *** sendmail-8.8.4/cf/cf/knecht.mc Tue Jan 21 08:53:18 1997 --- sendmail-8.8.5/cf/cf/knecht.mc Sun Nov 24 14:27:45 1996 *************** *** 0 **** --- 1,51 ---- + divert(-1) + # + # Copyright (c) 1983 Eric P. Allman + # Copyright (c) 1988, 1993 + # The Regents of the University of California. All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions + # are met: + # 1. Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # 2. Redistributions in binary form must reproduce the above copyright + # notice, this list of conditions and the following disclaimer in the + # documentation and/or other materials provided with the distribution. + # 3. All advertising materials mentioning features or use of this software + # must display the following acknowledgement: + # This product includes software developed by the University of + # California, Berkeley and its contributors. + # 4. Neither the name of the University nor the names of its contributors + # may be used to endorse or promote products derived from this software + # without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + # + + # + # This is specific to Eric's home machine. + # + + divert(0)dnl + VERSIONID(`@(#)knecht.mc 8.4 (Berkeley) 11/24/96') + OSTYPE(bsd4.4)dnl + DOMAIN(generic)dnl + define(`confDEF_USER_ID', `mailnull')dnl + define(`confHOST_STATUS_DIRECTORY', `.hoststat')dnl + define(`confTO_ICONNECT', `10s')dnl + define(`confCOPY_ERRORS_TO', `Postmaster')dnl + define(`confTO_QUEUEWARN', `8h')dnl + FEATURE(virtusertable)dnl + MAILER(local)dnl + MAILER(smtp)dnl diff -r -c sendmail-8.8.4/cf/m4/cfhead.m4 sendmail-8.8.5/cf/m4/cfhead.m4 *** sendmail-8.8.4/cf/m4/cfhead.m4 Wed Nov 20 07:54:50 1996 --- sendmail-8.8.5/cf/m4/cfhead.m4 Sat Jan 18 10:09:34 1997 *************** *** 106,123 **** CONCAT(C, $3, $'1`))') sinclude(_CF_DIR_`'siteconfig/$1.m4)') define(`EXPOSED_USER', `PUSHDIVERT(5)CE$1 ! POPDIVERT`'dnl') define(`LOCAL_USER', `PUSHDIVERT(5)CL$1 ! POPDIVERT`'dnl') define(`MASQUERADE_AS', `define(`MASQUERADE_NAME', $1)') define(`MASQUERADE_DOMAIN', `PUSHDIVERT(5)CM$1 ! POPDIVERT`'dnl') define(`MASQUERADE_DOMAIN_FILE', `PUSHDIVERT(5)FM$1 ! POPDIVERT`'dnl') define(`GENERICS_DOMAIN', `PUSHDIVERT(5)CG$1 ! POPDIVERT`'dnl') define(`GENERICS_DOMAIN_FILE', `PUSHDIVERT(5)FG$1 ! POPDIVERT`'dnl') define(`_OPTINS', `ifdef(`$1', `$2$1$3')') m4wrap(`include(_CF_DIR_`m4/proto.m4')') --- 106,123 ---- CONCAT(C, $3, $'1`))') sinclude(_CF_DIR_`'siteconfig/$1.m4)') define(`EXPOSED_USER', `PUSHDIVERT(5)CE$1 ! POPDIVERT`'dnl`'') define(`LOCAL_USER', `PUSHDIVERT(5)CL$1 ! POPDIVERT`'dnl`'') define(`MASQUERADE_AS', `define(`MASQUERADE_NAME', $1)') define(`MASQUERADE_DOMAIN', `PUSHDIVERT(5)CM$1 ! POPDIVERT`'dnl`'') define(`MASQUERADE_DOMAIN_FILE', `PUSHDIVERT(5)FM$1 ! POPDIVERT`'dnl`'') define(`GENERICS_DOMAIN', `PUSHDIVERT(5)CG$1 ! POPDIVERT`'dnl`'') define(`GENERICS_DOMAIN_FILE', `PUSHDIVERT(5)FG$1 ! POPDIVERT`'dnl`'') define(`_OPTINS', `ifdef(`$1', `$2$1$3')') m4wrap(`include(_CF_DIR_`m4/proto.m4')') *************** *** 129,136 **** define(`confOPERATORS', `.:%@!^/[]+') define(`confSMTP_LOGIN_MSG', `$j Sendmail $v/$Z; $b') define(`confRECEIVED_HEADER', `$?sfrom $s $.$?_($?s$|from $.$_) ! $.by $j ($v/$Z)$?r with $r$. ! id $i$?u for $u$.; $b') define(`confSEVEN_BIT_INPUT', `False') define(`confEIGHT_BIT_HANDLING', `pass8') define(`confALIAS_WAIT', `10') --- 129,137 ---- define(`confOPERATORS', `.:%@!^/[]+') define(`confSMTP_LOGIN_MSG', `$j Sendmail $v/$Z; $b') define(`confRECEIVED_HEADER', `$?sfrom $s $.$?_($?s$|from $.$_) ! $.by $j ($v/$Z)$?r with $r$. id $i$?u ! for $u; $|; ! $.$b') define(`confSEVEN_BIT_INPUT', `False') define(`confEIGHT_BIT_HANDLING', `pass8') define(`confALIAS_WAIT', `10') *************** *** 156,159 **** define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward') divert(0)dnl ! VERSIONID(`@(#)cfhead.m4 8.7 (Berkeley) 11/20/96') --- 157,160 ---- define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward') divert(0)dnl ! VERSIONID(`@(#)cfhead.m4 8.9 (Berkeley) 1/18/97') diff -r -c sendmail-8.8.4/cf/m4/proto.m4 sendmail-8.8.5/cf/m4/proto.m4 *** sendmail-8.8.4/cf/m4/proto.m4 Sun Nov 24 09:33:40 1996 --- sendmail-8.8.5/cf/m4/proto.m4 Tue Dec 31 12:04:17 1996 *************** *** 34,40 **** # divert(0) ! VERSIONID(`@(#)proto.m4 8.136 (Berkeley) 11/24/96') MAILER(local)dnl --- 34,40 ---- # divert(0) ! VERSIONID(`@(#)proto.m4 8.139 (Berkeley) 12/31/96') MAILER(local)dnl *************** *** 171,187 **** # who gets all local email traffic ($R has precedence for unqualified names) DH`'ifdef(`MAIL_HUB', MAIL_HUB) ! # class L: names that should be delivered locally, even if we have a relay # class E: names that should be exposed as from this host, even if we masquerade # class M: domains that should be converted to $M #CL root ! CE root undivert(5)dnl - # dequoting map - Kdequote dequote - - divert(0)dnl # end of nullclient diversion # who I masquerade as (null for no masquerading) (see also $=M) DM`'ifdef(`MASQUERADE_NAME', MASQUERADE_NAME) --- 171,188 ---- # who gets all local email traffic ($R has precedence for unqualified names) DH`'ifdef(`MAIL_HUB', MAIL_HUB) ! # dequoting map ! Kdequote dequote ! ! divert(0)dnl # end of nullclient diversion # class E: names that should be exposed as from this host, even if we masquerade + ifdef(`_NULL_CLIENT_ONLY_', `#', + `# class L: names that should be delivered locally, even if we have a relay # class M: domains that should be converted to $M #CL root ! ')CE root undivert(5)dnl # who I masquerade as (null for no masquerading) (see also $=M) DM`'ifdef(`MASQUERADE_NAME', MASQUERADE_NAME) *************** *** 685,691 **** X`'R$+ < @ $=w . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . > X`'R< @ > $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . > X`'R< @ > $+ $: $1 ! X`'R< error : $- $+ > $* $#error $@ $1 $: $2 X`'R< $+ > $+ < @ $+ > $: $>97 $1 undefine(`X')dnl --- 686,692 ---- X`'R$+ < @ $=w . > $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . > X`'R< @ > $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . > X`'R< @ > $+ $: $1 ! X`'R< error : $- $+ > $* $#error $@ $( dequote $1 $) $: $2 X`'R< $+ > $+ < @ $+ > $: $>97 $1 undefine(`X')dnl *************** *** 798,803 **** --- 799,806 ---- R< > $+ $: < $H > $1 try hub R< > $+ $: < $R > $1 try relay R< > $+ $@ $1 nope, give up + R< local : $* > $* $: $>95 < local : $1 > $2 no host extension + R< error : $* > $* $: $>95 < error : $1 > $2 no host extension R< $- : $+ > $+ $: $>95 < $1 : $2 > $3 < @ $2 > R< $+ > $+ $@ $>95 < $1 > $2 < @ $1 > *************** *** 821,833 **** S95 R< > $* $@ $1 strip off null relay ! R< error : $- $+ > $* $#error $@ $1 $: $2 special case errors ! R< local : > $* < @ $* > $#local $@ $1@$2 $: $1 no host: use old user ! R< local : $+ > $* <@ $* . > $* $#local $@ $2@$3 $: $1 special case local R< $- : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer R< $=w > $* $@ $2 delete local host R< $+ > $* $#_RELAY_ $@ $1 $: $2 use unqualified mailer ################################################################### ### Ruleset 93 -- convert header names to masqueraded form ### --- 824,854 ---- S95 R< > $* $@ $1 strip off null relay ! R< error : $- $+ > $* $#error $@ $( dequote $1 $) $: $2 ! R< local : $* > $* $>CanonLocal < $1 > $2 R< $- : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer R< $=w > $* $@ $2 delete local host R< $+ > $* $#_RELAY_ $@ $1 $: $2 use unqualified mailer + + ################################################################### + ### Ruleset CanonLocal -- canonify local: syntax ### + ################################################################### + + SCanonLocal + # strip trailing dot from any host name that may appear + R< $* > $* < @ $* . > $: < $1 > $2 < @ $3 > + + # handle local: syntax -- use old user, either with or without host + R< > $* < @ $* > $* $#local $@ $1@$2 $: $1 + R< > $+ $#local $@ $1 $: $1 + + # handle local:user@host syntax -- ignore host part + R< $+ @ $+ > $* $: < $1 > $3 + + # handle local:user syntax + R< $+ > $* <@ $* > $* $#local $@ $2@$3 $: $1 + R< $+ > $* $#local $@ $2 $: $1 ################################################################### ### Ruleset 93 -- convert header names to masqueraded form ### diff -r -c sendmail-8.8.4/cf/m4/version.m4 sendmail-8.8.5/cf/m4/version.m4 *** sendmail-8.8.4/cf/m4/version.m4 Tue Nov 26 08:14:24 1996 --- sendmail-8.8.5/cf/m4/version.m4 Tue Jan 21 08:43:31 1997 *************** *** 32,39 **** # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ! VERSIONID(`@(#)version.m4 8.8.4.2 (Berkeley) 11/26/96') # divert(0) # Configuration version number ! DZ8.8.4`'ifdef(`confCF_VERSION', `/confCF_VERSION') --- 32,39 ---- # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ! VERSIONID(`@(#)version.m4 8.8.5.3 (Berkeley) 1/21/97') # divert(0) # Configuration version number ! DZ8.8.5`'ifdef(`confCF_VERSION', `/confCF_VERSION') diff -r -c sendmail-8.8.4/cf/ostype/powerux.m4 sendmail-8.8.5/cf/ostype/powerux.m4 *** sendmail-8.8.4/cf/ostype/powerux.m4 Tue Jan 21 08:53:18 1997 --- sendmail-8.8.5/cf/ostype/powerux.m4 Thu Jan 16 15:58:10 1997 *************** *** 0 **** --- 1,46 ---- + divert(-1) + # + # Copyright (c) 1983 Eric P. Allman + # Copyright (c) 1988, 1993 + # The Regents of the University of California. All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions + # are met: + # 1. Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # 2. Redistributions in binary form must reproduce the above copyright + # notice, this list of conditions and the following disclaimer in the + # documentation and/or other materials provided with the distribution. + # 3. All advertising materials mentioning features or use of this software + # must display the following acknowledgement: + # This product includes software developed by the University of + # California, Berkeley and its contributors. + # 4. Neither the name of the University nor the names of its contributors + # may be used to endorse or promote products derived from this software + # without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + # + + divert(0) + VERSIONID(`@(#)powerux.m4 8.1 (Berkeley) 1/16/97') + + define(`ALIAS_FILE', /etc/mail/aliases)dnl + ifdef(`HELP_FILE',,`define(`HELP_FILE', /etc/mail/sendmail.hf)')dnl + ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /etc/mail/sendmail.st)')dnl + define(`LOCAL_MAILER_PATH', `/usr/bin/rmail')dnl + define(`LOCAL_MAILER_FLAGS', `mn9')dnl + define(`LOCAL_MAILER_ARGS', `rmail $u')dnl + define(`LOCAL_SHELL_FLAGS', `ehuP')dnl + define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gmedium $h!rmail ($u)')dnl diff -r -c sendmail-8.8.4/cf/ostype/sinix.m4 sendmail-8.8.5/cf/ostype/sinix.m4 *** sendmail-8.8.4/cf/ostype/sinix.m4 Tue Jan 21 08:53:18 1997 --- sendmail-8.8.5/cf/ostype/sinix.m4 Sat Dec 14 19:17:52 1996 *************** *** 0 **** --- 1,45 ---- + divert(-1) + # + # Copyright (c) 1996 Eric P. Allman + # Copyright (c) 1988, 1993 + # The Regents of the University of California. All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions + # are met: + # 1. Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # 2. Redistributions in binary form must reproduce the above copyright + # notice, this list of conditions and the following disclaimer in the + # documentation and/or other materials provided with the distribution. + # 3. All advertising materials mentioning features or use of this software + # must display the following acknowledgement: + # This product includes software developed by the University of + # California, Berkeley and its contributors. + # 4. Neither the name of the University nor the names of its contributors + # may be used to endorse or promote products derived from this software + # without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + # + + divert(0) + VERSIONID(`@(#)sinix.m4 8.1 (Berkeley) 12/14/96') + define(`QUEUE_DIR', /usr/ucblib/mqueue)dnl + define(`ALIAS_FILE', /usr/ucblib/aliases)dnl + ifdef(`HELP_FILE',,`define(`HELP_FILE', /usr/ucblib/sendmail.hf)')dnl + ifdef(`STATUS_FILE',,`define(`STATUS_FILE', /usr/ucblib/sendmail.st)')dnl + define(`LOCAL_MAILER_PATH', `/usr/ucblib/mail.local')dnl + define(`LOCAL_MAILER_FLAGS', `rmn9')dnl + define(`LOCAL_SHELL_FLAGS', `ehuP')dnl + define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gmedium $h!rmail ($u)')dnl diff -r -c sendmail-8.8.4/doc/op/op.me sendmail-8.8.5/doc/op/op.me *** sendmail-8.8.4/doc/op/op.me Sun Dec 1 12:48:29 1996 --- sendmail-8.8.5/doc/op/op.me Fri Dec 13 10:50:34 1996 *************** *** 30,36 **** .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" ! .\" @(#)op.me 8.100 (Berkeley) 12/1/96 .\" .\" eqn op.me | pic | troff -me .eh 'SMM:08-%''Sendmail Installation and Operation Guide' --- 30,36 ---- .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" ! .\" @(#)op.me 8.103 (Berkeley) 12/13/96 .\" .\" eqn op.me | pic | troff -me .eh 'SMM:08-%''Sendmail Installation and Operation Guide' *************** *** 65,74 **** .sp .r Eric Allman - InReference, Inc. eric@Sendmail.ORG .sp ! Version 8.100 .sp For Sendmail Version 8.8 .)l --- 65,73 ---- .sp .r Eric Allman eric@Sendmail.ORG .sp ! Version 8.103 .sp For Sendmail Version 8.8 .)l *************** *** 161,166 **** --- 160,171 ---- You should not attempt to use this document for prior versions of .i sendmail . + .bp + .rs + .sp |4i + .ce 2 + This page intentionally left blank; + replace it with a blank sheet for double-sided output. .bp 7 .sh 1 "BASIC INSTALLATION" .pp *************** *** 2476,2482 **** the cache is first searched. If an open connection is found, it is probed to see if it is still active by sending a ! .sm NOOP command. It is not an error if this fails; instead, the connection is closed and reopened. --- 2481,2487 ---- the cache is first searched. If an open connection is found, it is probed to see if it is still active by sending a ! .sm RSET command. It is not an error if this fails; instead, the connection is closed and reopened. *************** *** 8134,8139 **** --- 8139,8153 ---- used during queue file rebuild. .ip /var/spool/mqueue/xf* A transcript of the current session. + .if e \ + \{\ + . bp + . rs + . sp |4i + . ce 2 + This page intentionally left blank; + replace it with a blank sheet for double-sided output. + .\} .\".ro .\".ls 1 .\".tp *************** *** 8148,8163 **** .\".sp .\".sz 10 .\"Eric Allman - .\"InReference, Inc. .\".sp ! .\"Version 8.100 .\".ce 0 - .bp 2 - .rs - .sp |4i - .ce 2 - This page intentionally left blank; - replace it with a blank sheet for double-sided output. .bp 3 .ce .sz 12 --- 8162,8170 ---- .\".sp .\".sz 10 .\"Eric Allman .\".sp ! .\"Version 8.103 .\".ce 0 .bp 3 .ce .sz 12 diff -r -c sendmail-8.8.4/makemap/Makefile.dist sendmail-8.8.5/makemap/Makefile.dist *** sendmail-8.8.4/makemap/Makefile.dist Fri Sep 1 07:17:53 1995 --- sendmail-8.8.5/makemap/Makefile.dist Wed Dec 18 11:20:19 1996 *************** *** 5,11 **** # old make program (I recommend that you get and port the new make if you # are going to be doing any signficant work on sendmail). # ! # @(#)Makefile.dist 8.4 (Berkeley) 9/1/95 # # use O=-O (usual) or O=-g (debugging) --- 5,11 ---- # old make program (I recommend that you get and port the new make if you # are going to be doing any signficant work on sendmail). # ! # @(#)Makefile.dist 8.5 (Berkeley) 12/18/96 # # use O=-O (usual) or O=-g (debugging) *************** *** 69,78 **** makemap.0: makemap.8 ${NROFF} ${MANDOC} makemap.8 > makemap.0 install: install-makemap install-docs install-makemap: makemap ! install -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} makemap ${BINDIR} # doesn't actually install them -- you may want to install pre-nroff versions install-docs: makemap.0 --- 69,80 ---- makemap.0: makemap.8 ${NROFF} ${MANDOC} makemap.8 > makemap.0 + INSTALL=install + install: install-makemap install-docs install-makemap: makemap ! ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} makemap ${BINDIR} # doesn't actually install them -- you may want to install pre-nroff versions install-docs: makemap.0 diff -r -c sendmail-8.8.4/src/Makefiles/Makefile.Altos sendmail-8.8.5/src/Makefiles/Makefile.Altos *** sendmail-8.8.4/src/Makefiles/Makefile.Altos Fri Sep 20 07:35:44 1996 --- sendmail-8.8.5/src/Makefiles/Makefile.Altos Mon Dec 30 07:34:01 1996 *************** *** 7,13 **** # # This has been tested on Altos System V. # ! # @(#)Makefile.Altos 8.6 (Berkeley) 9/20/96 # # The Altos System V compiler does not understand ANSI --- 7,13 ---- # # This has been tested on Altos System V. # ! # @(#)Makefile.Altos 8.7 (Berkeley) 12/30/96 # # The Altos System V compiler does not understand ANSI *************** *** 94,113 **** install: install-sendmail install-docs install-sendmail: sendmail ! -mv ${BINDIR}/sendmail ${BINDIR}/sendmail.old ! ${INSTALL} sendmail ${BINDIR} ! chown ${BINOWN} ${BINDIR}/sendmail ! chgrp ${BINGRP} ${BINDIR}/sendmail ! chmod ${BINMODE} ${BINDIR}/sendmail ! for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done ! ${INSTALL} /dev/null ${STDIR}/sendmail.st ! chown ${BINOWN} ${STDIR}/sendmail.st ! chgrp ${BINGRP} ${STDIR}/sendmail.st ! chmod 644 ${STDIR}/sendmail.st ! ${INSTALL} sendmail.hf ${HFDIR} ! chown ${BINOWN} ${HFDIR}/sendmail.hf ! chgrp ${BINGRP} ${HFDIR}/sendmail.hf ! chmod 444 ${HFDIR}/sendmail.hf # doesn't actually install them -- you may want to install pre-nroff versions install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 --- 94,113 ---- install: install-sendmail install-docs install-sendmail: sendmail ! -mv ${BINDIR}/sendmail ${BINDIR}/sendmail.old ! ${INSTALL} sendmail ${BINDIR} ! chown ${BINOWN} ${BINDIR}/sendmail ! chgrp ${BINGRP} ${BINDIR}/sendmail ! chmod ${BINMODE} ${BINDIR}/sendmail ! for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done ! ${INSTALL} /dev/null ${STDIR}/sendmail.st ! chown ${BINOWN} ${STDIR}/sendmail.st ! chgrp ${BINGRP} ${STDIR}/sendmail.st ! chmod 644 ${STDIR}/sendmail.st ! ${INSTALL} sendmail.hf ${HFDIR} ! chown ${BINOWN} ${HFDIR}/sendmail.hf ! chgrp ${BINGRP} ${HFDIR}/sendmail.hf ! chmod 444 ${HFDIR}/sendmail.hf # doesn't actually install them -- you may want to install pre-nroff versions install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 diff -r -c sendmail-8.8.4/src/Makefiles/Makefile.PowerUX sendmail-8.8.5/src/Makefiles/Makefile.PowerUX *** sendmail-8.8.4/src/Makefiles/Makefile.PowerUX Tue Jan 21 08:53:18 1997 --- sendmail-8.8.5/src/Makefiles/Makefile.PowerUX Thu Jan 16 15:55:13 1997 *************** *** 0 **** --- 1,126 ---- + # + # This Makefile is designed to work on the old "make" program. It does + # not use the obj subdirectory. It also does not install documentation + # automatically -- think of it as a quick start for sites that have the + # old make program (I recommend that you get and port the new make if you + # are going to be doing any signficant work on sendmail). + # + # @(#)Makefile.PowerUX 8.1 (Berkeley) 1/16/97 + # + # Harris Nighthawk 6000 series (nh6000) PowerUX Makefile + # Bob Miorelli, Pratt & Whitney + # + + # make sure the shell constructs below use the right shell + SHELL= /bin/sh + + # use O=-O (usual) or O=-g (debugging) + O= -O + + CC= cc + DESTDIR=/etc/mail + + # define the database mechanism used for alias lookups: + # -DNDBM -- use new DBM + # -DNEWDB -- use new Berkeley DB + # -DNIS -- include NIS support + # The really old (V7) DBM library is no longer supported. + # See READ_ME for a description of how these flags interact. + # + DBMDEF= -DNEWDB + + # environment definitions (e.g., -D_AIX3) + ENVDEF= -D__svr4__ + + # see also conf.h for additional compilation flags + + # include directories + INCDIRS=-I/usr/local/include + + # library directories + LIBDIRS=-L/usr/local/lib + + # libraries required on your system + LIBS= -Bstatic -ldb -lresolv -lsocket -lnsl -lelf -lgen + + # location of sendmail binary (usually /usr/sbin or /usr/lib) + BINDIR= /usr/local/bin + + # location of sendmail.st file (usually /var/log or /usr/lib) + STDIR= ${DESTDIR} + + # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) + HFDIR= ${DESTDIR} + + # additional .o files needed + OBJADD= + + ################### end of user configuration flags ###################### + + CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} + + OBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \ + deliver.o domain.o envelope.o err.o headers.o macro.o main.o \ + map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \ + savemail.o srvrsmtp.o stab.o stats.o sysexits.o \ + trace.o udb.o usersmtp.o util.o version.o ${OBJADD} + + LINKS= ${BINDIR}/newaliases ${BINDIR}/mailq + INSTALL=/usr/ucb/install + BINOWN= root + BINGRP= mail + BINMODE=6555 + + ALL= sendmail aliases.0 mailq.0 newaliases.0 sendmail.0 + + all: ${ALL} + + sendmail: ${BEFORE} ${OBJS} + ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} + + NROFF= nroff -h + MANDOC= -man + + aliases.0: aliases.5 + ${NROFF} ${MANDOC} aliases.5 > aliases.0 + + mailq.0: mailq.1 + ${NROFF} ${MANDOC} mailq.1 > mailq.0 + + newaliases.0: newaliases.1 + ${NROFF} ${MANDOC} newaliases.1 > newaliases.0 + + sendmail.0: sendmail.8 + ${NROFF} ${MANDOC} sendmail.8 > sendmail.0 + + + install: install-sendmail install-docs + + install-sendmail: sendmail + cp sendmail ${DESTDIR} + chown ${BINOWN} ${DESTDIR}/sendmail + chgrp ${BINGRP} ${DESTDIR}/sendmail + chmod ${BINMODE} ${DESTDIR}/sendmail + + for i in ${LINKS}; do rm -f $$i; ln -s ${DESTDIR}/sendmail $$i; done + cp /dev/null ${STDIR}/sendmail.st + chown ${BINOWN} ${STDIR}/sendmail.st + chgrp ${BINGRP} ${STDIR}/sendmail.st + chmod 0644 ${STDIR}/sendmail.st + + cp sendmail.hf ${STDIR}/sendmail.hf + chown ${BINOWN} ${STDIR}/sendmail.hf + chgrp ${BINGRP} ${STDIR}/sendmail.hf + chmod 0444 ${STDIR}/sendmail.hf + + # doesn't actually install them -- you may want to install pre-nroff versions + install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 + + clean: + rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0 + + # dependencies + # gross overkill, and yet still not quite enough.... + ${OBJS}: sendmail.h conf.h + + depend: diff -r -c sendmail-8.8.4/src/Makefiles/Makefile.SINIX sendmail-8.8.5/src/Makefiles/Makefile.SINIX *** sendmail-8.8.4/src/Makefiles/Makefile.SINIX Tue Jan 21 08:53:18 1997 --- sendmail-8.8.5/src/Makefiles/Makefile.SINIX Sat Dec 14 19:15:40 1996 *************** *** 0 **** --- 1,115 ---- + # This Makefile is designed to work on the old "make" program. It does + # not use the obj subdirectory. It also does not install documentation + # automatically -- think of it as a quick start for sites that have the + # old make program (I recommend that you get and port the new make if you + # are going to be doing any signficant work on sendmail). + # + # Contributed by Gerald Rinske . + # + # @(#)Makefile.SINIX 8.1 (Berkeley) 12/14/96 + # + + # make sure the shell constructs below use the right shell + SHELL= /bin/sh + + # use O=-O (usual) or O=-g (debugging) + O= -O + + #CC= /usr/ccs/bin/cc + #DESTDIR=/usr/local/sendmail + + # define the database mechanism used for alias lookups: + # -DNDBM -- use new DBM + # -DNEWDB -- use new Berkeley DB + # -DNIS -- include NIS support + # The really old (V7) DBM library is no longer supported. + # See READ_ME for a description of how these flags interact. + # + DBMDEF= -DNEWDB -DNIS + + # environment definitions (e.g., -D_AIX3) + ENVDEF= -D__svr4__ + + # see also conf.h for additional compilation flags + + # include directories + INCDIRS=-I/usr/local/include + + # library directories + LIBDIRS=-L/usr/local/lib -L/usr/ucblib + + # libraries required on your system + LIBS= -lc -ldb -lresolv -lsocket -lnsl -lucb + + # location of sendmail binary (usually /usr/sbin or /usr/lib) + BINDIR= ${DESTDIR}/usr/ucblib + + # location of sendmail.st file (usually /var/log or /usr/lib) + STDIR= ${DESTDIR}/usr/ucblib + + # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) + HFDIR= ${DESTDIR}/usr/ucblib + + # additional .o files needed + OBJADD= + + ################### end of user configuration flags ###################### + + CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} + + OBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \ + deliver.o domain.o envelope.o err.o headers.o macro.o main.o \ + map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \ + savemail.o srvrsmtp.o stab.o stats.o sysexits.o \ + trace.o udb.o usersmtp.o util.o version.o ${OBJADD} + + LINKS= ${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq \ + ${DESTDIR}/usr/ucb/hoststat ${DESTDIR}/usr/ucb/purgestat + INSTALL=/usr/ucb/install + BINOWN= root + BINGRP= mail + BINMODE=6555 + + ALL= sendmail aliases.0 mailq.0 newaliases.0 sendmail.0 + + all: ${ALL} + + sendmail: ${BEFORE} ${OBJS} + ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} + + NROFF= nroff -h + #NROFF= groff -Tascii + #MANDOC= -mandoc + + aliases.0: aliases.5 + ${NROFF} ${MANDOC} aliases.5 > aliases.0 + + mailq.0: mailq.1 + ${NROFF} ${MANDOC} mailq.1 > mailq.0 + + newaliases.0: newaliases.1 + ${NROFF} ${MANDOC} newaliases.1 > newaliases.0 + + sendmail.0: sendmail.8 + ${NROFF} ${MANDOC} sendmail.8 > sendmail.0 + + install: install-sendmail install-docs + + install-sendmail: sendmail + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR} + for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + ${STDIR}/sendmail.st + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR} + + # doesn't actually install them -- you may want to install pre-nroff versions + install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 + + clean: + rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0 + + # dependencies + # gross overkill, and yet still not quite enough.... + ${OBJS}: sendmail.h conf.h + + depend: diff -r -c sendmail-8.8.4/src/Makefiles/Makefile.SunOS.5.1 sendmail-8.8.5/src/Makefiles/Makefile.SunOS.5.1 *** sendmail-8.8.4/src/Makefiles/Makefile.SunOS.5.1 Fri Sep 20 07:35:45 1996 --- sendmail-8.8.5/src/Makefiles/Makefile.SunOS.5.1 Thu Jan 16 15:31:26 1997 *************** *** 8,14 **** # This has been tested on Solaris 2.1 and 2.2. It DOES NOT WORK on # versions of Solaris after 2.2. # ! # @(#)Makefile.SunOS.5.1 8.17 (Berkeley) 9/20/96 # # use O=-O (usual) or O=-g (debugging) --- 8,14 ---- # This has been tested on Solaris 2.1 and 2.2. It DOES NOT WORK on # versions of Solaris after 2.2. # ! # @(#)Makefile.SunOS.5.1 8.18 (Berkeley) 1/16/97 # # use O=-O (usual) or O=-g (debugging) *************** *** 27,34 **** DBMDEF= -DNDBM -DNIS # environment definitions (e.g., -D_AIX3) ! # include -DSOLARIS_2_3 for version 2.3 and higher ! ENVDEF= -DSOLARIS # see also conf.h for additional compilation flags --- 27,33 ---- DBMDEF= -DNDBM -DNIS # environment definitions (e.g., -D_AIX3) ! ENVDEF= -DSOLARIS=20100 # see also conf.h for additional compilation flags diff -r -c sendmail-8.8.4/src/Makefiles/Makefile.SunOS.5.2 sendmail-8.8.5/src/Makefiles/Makefile.SunOS.5.2 *** sendmail-8.8.4/src/Makefiles/Makefile.SunOS.5.2 Fri Sep 20 07:35:45 1996 --- sendmail-8.8.5/src/Makefiles/Makefile.SunOS.5.2 Thu Jan 16 15:31:26 1997 *************** *** 8,14 **** # This has been tested on Solaris 2.1 and 2.2. It DOES NOT WORK on # versions of Solaris after 2.2. # ! # @(#)Makefile.SunOS.5.1 8.17 (Berkeley) 9/20/96 # # use O=-O (usual) or O=-g (debugging) --- 8,14 ---- # This has been tested on Solaris 2.1 and 2.2. It DOES NOT WORK on # versions of Solaris after 2.2. # ! # @(#)Makefile.SunOS.5.1 8.18 (Berkeley) 1/16/97 # # use O=-O (usual) or O=-g (debugging) *************** *** 27,34 **** DBMDEF= -DNDBM -DNIS # environment definitions (e.g., -D_AIX3) ! # include -DSOLARIS_2_3 for version 2.3 and higher ! ENVDEF= -DSOLARIS # see also conf.h for additional compilation flags --- 27,33 ---- DBMDEF= -DNDBM -DNIS # environment definitions (e.g., -D_AIX3) ! ENVDEF= -DSOLARIS=20100 # see also conf.h for additional compilation flags diff -r -c sendmail-8.8.4/src/Makefiles/Makefile.SunOS.5.3 sendmail-8.8.5/src/Makefiles/Makefile.SunOS.5.3 *** sendmail-8.8.4/src/Makefiles/Makefile.SunOS.5.3 Fri Sep 20 07:35:45 1996 --- sendmail-8.8.5/src/Makefiles/Makefile.SunOS.5.3 Thu Jan 16 15:31:26 1997 *************** *** 7,13 **** # # This has been tested on Solaris 2.3. # ! # @(#)Makefile.SunOS.5.3 8.17 (Berkeley) 9/20/96 # # use O=-O (usual) or O=-g (debugging) --- 7,13 ---- # # This has been tested on Solaris 2.3. # ! # @(#)Makefile.SunOS.5.3 8.18 (Berkeley) 1/16/97 # # use O=-O (usual) or O=-g (debugging) *************** *** 26,32 **** DBMDEF= -DNDBM -DNIS -DNISPLUS # environment definitions (e.g., -D_AIX3) ! ENVDEF= -DSOLARIS=203 # see also conf.h for additional compilation flags --- 26,32 ---- DBMDEF= -DNDBM -DNIS -DNISPLUS # environment definitions (e.g., -D_AIX3) ! ENVDEF= -DSOLARIS=20300 # see also conf.h for additional compilation flags diff -r -c sendmail-8.8.4/src/Makefiles/Makefile.SunOS.5.4 sendmail-8.8.5/src/Makefiles/Makefile.SunOS.5.4 *** sendmail-8.8.4/src/Makefiles/Makefile.SunOS.5.4 Fri Sep 20 07:35:44 1996 --- sendmail-8.8.5/src/Makefiles/Makefile.SunOS.5.4 Thu Jan 16 15:31:26 1997 *************** *** 7,13 **** # # This has been tested on Solaris 2.4. # ! # @(#)Makefile.SunOS.5.4 8.19 (Berkeley) 9/20/96 # # use O=-O (usual) or O=-g (debugging) --- 7,13 ---- # # This has been tested on Solaris 2.4. # ! # @(#)Makefile.SunOS.5.4 8.20 (Berkeley) 1/16/97 # # use O=-O (usual) or O=-g (debugging) *************** *** 28,34 **** DBMDEF= -DNDBM -DNIS -DNISPLUS # environment definitions (e.g., -D_AIX3) ! ENVDEF= -DSOLARIS=204 # see also conf.h for additional compilation flags --- 28,34 ---- DBMDEF= -DNDBM -DNIS -DNISPLUS # environment definitions (e.g., -D_AIX3) ! ENVDEF= -DSOLARIS=20400 # see also conf.h for additional compilation flags diff -r -c sendmail-8.8.4/src/Makefiles/Makefile.SunOS.5.5 sendmail-8.8.5/src/Makefiles/Makefile.SunOS.5.5 *** sendmail-8.8.4/src/Makefiles/Makefile.SunOS.5.5 Fri Sep 20 07:35:45 1996 --- sendmail-8.8.5/src/Makefiles/Makefile.SunOS.5.5 Thu Jan 16 15:31:26 1997 *************** *** 7,13 **** # # This has been tested on Solaris 2.5. # ! # @(#)Makefile.SunOS.5.5 8.6 (Berkeley) 9/20/96 # # use O=-O (usual) or O=-g (debugging) --- 7,13 ---- # # This has been tested on Solaris 2.5. # ! # @(#)Makefile.SunOS.5.5 8.8 (Berkeley) 1/16/97 # # use O=-O (usual) or O=-g (debugging) *************** *** 26,32 **** DBMDEF= -DNDBM -DNIS -DNISPLUS # environment definitions (e.g., -D_AIX3) ! ENVDEF= -DSOLARIS=205 # see also conf.h for additional compilation flags --- 26,32 ---- DBMDEF= -DNDBM -DNIS -DNISPLUS # environment definitions (e.g., -D_AIX3) ! ENVDEF= -DSOLARIS=20500 # see also conf.h for additional compilation flags *************** *** 38,44 **** # libraries required on your system # delete -l44bsd if you are not running BIND 4.9.x ! LIBS= -lresolv -l44bsd -lsocket -lnsl -lelf # location of sendmail binary (usually /usr/sbin or /usr/lib) BINDIR= ${DESTDIR}/usr/lib --- 38,44 ---- # libraries required on your system # delete -l44bsd if you are not running BIND 4.9.x ! LIBS= -lresolv -l44bsd -lsocket -lnsl -lkstat # location of sendmail binary (usually /usr/sbin or /usr/lib) BINDIR= ${DESTDIR}/usr/lib diff -r -c sendmail-8.8.4/src/Makefiles/Makefile.SunOS.5.6 sendmail-8.8.5/src/Makefiles/Makefile.SunOS.5.6 *** sendmail-8.8.4/src/Makefiles/Makefile.SunOS.5.6 Tue Jan 21 08:53:18 1997 --- sendmail-8.8.5/src/Makefiles/Makefile.SunOS.5.6 Thu Jan 16 15:30:45 1997 *************** *** 0 **** --- 1,123 ---- + # + # This Makefile is designed to work on the old "make" program. It does + # not use the obj subdirectory. It also does not install documentation + # automatically -- think of it as a quick start for sites that have the + # old make program (I recommend that you get and port the new make if you + # are going to be doing any signficant work on sendmail). + # + # This has been tested on Solaris 2.6. + # + # @(#)Makefile.SunOS.5.6 8.1 (Berkeley) 1/16/97 + # + + # use O=-O (usual) or O=-g (debugging) + # warning: do not use -O with versions of gcc prior to 2.6 + O= -O + + CC= gcc + + # define the database mechanism used for alias lookups: + # -DNDBM -- use new DBM + # -DNEWDB -- use new Berkeley DB + # -DNIS -- include NIS support + # The really old (V7) DBM library is no longer supported. + # See READ_ME for a description of how these flags interact. + # + DBMDEF= -DNDBM -DNIS -DNISPLUS + + # environment definitions (e.g., -D_AIX3) + ENVDEF= -DSOLARIS=20600 + + # see also conf.h for additional compilation flags + + # include directories + INCDIRS=-I/usr/sww/include + + # library directories + LIBDIRS=-L/usr/sww/lib + + # libraries required on your system + # delete -l44bsd if you are not running BIND 4.9.x + LIBS= -lresolv -l44bsd -lsocket -lnsl -lkstat + + # location of sendmail binary (usually /usr/sbin or /usr/lib) + BINDIR= ${DESTDIR}/usr/lib + + # location of sendmail.st file (usually /var/log or /usr/lib) + STDIR= ${DESTDIR}/var/log + + # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) + HFDIR= ${DESTDIR}/etc/mail + + # additional .o files needed + OBJADD= + + # things to be made before compilation begins + BEFORE= sysexits.h + + ################### end of user configuration flags ###################### + + CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} + + OBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \ + deliver.o domain.o envelope.o err.o headers.o macro.o main.o \ + map.o mci.o mime.o parseaddr.o queue.o readcf.o recipient.o \ + savemail.o srvrsmtp.o stab.o stats.o sysexits.o \ + trace.o udb.o usersmtp.o util.o version.o ${OBJADD} + + LINKS= ${DESTDIR}/usr/bin/newaliases ${DESTDIR}/usr/bin/mailq \ + ${DESTDIR}/usr/bin/hoststat ${DESTDIR}/usr/bin/purgestat + INSTALL=/usr/ucb/install + BINOWN= root + BINGRP= sys + BINMODE=6555 + + ALL= sendmail aliases.0 mailq.0 newaliases.0 sendmail.0 + + all: ${ALL} + + sendmail: ${BEFORE} ${OBJS} + ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} + + sysexits.h: + if [ -r /usr/include/sysexits.h ]; \ + then \ + ln -s /usr/include/sysexits.h; \ + fi + + #NROFF= nroff -h + NROFF= groff -Tascii + MANDOC= -mandoc + + aliases.0: aliases.5 + ${NROFF} ${MANDOC} aliases.5 > aliases.0 + + mailq.0: mailq.1 + ${NROFF} ${MANDOC} mailq.1 > mailq.0 + + newaliases.0: newaliases.1 + ${NROFF} ${MANDOC} newaliases.1 > newaliases.0 + + sendmail.0: sendmail.8 + ${NROFF} ${MANDOC} sendmail.8 > sendmail.0 + + install: install-sendmail install-docs + + install-sendmail: sendmail + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR} + for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + ${STDIR}/sendmail.st + ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR} + + # doesn't actually install them -- you may want to install pre-nroff versions + install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 + + clean: + rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0 + + # dependencies + # gross overkill, and yet still not quite enough.... + ${OBJS}: sendmail.h conf.h + + depend: diff -r -c sendmail-8.8.4/src/Makefiles/Makefile.UXPDS.V20 sendmail-8.8.5/src/Makefiles/Makefile.UXPDS.V20 *** sendmail-8.8.4/src/Makefiles/Makefile.UXPDS.V20 Fri Sep 20 07:35:46 1996 --- sendmail-8.8.5/src/Makefiles/Makefile.UXPDS.V20 Fri Dec 6 09:20:06 1996 *************** *** 12,18 **** # and Toshiaki Nomura of the Fujitsu FreeSoftware Group # . # ! # @(#)Makefile.UXPDS.V20 8.6 (Berkeley) 9/20/96 # # make sure the shell constructs below use the right shell --- 12,18 ---- # and Toshiaki Nomura of the Fujitsu FreeSoftware Group # . # ! # @(#)Makefile.UXPDS.V20 8.7 (Berkeley) 12/6/96 # # make sure the shell constructs below use the right shell *************** *** 125,131 **** ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR} # doesn't actually install them -- you may want to install pre-nroff versions ! install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 cp aliases.0 ${MAN4}/aliases.4 chmod ${MANMODE} ${MAN4}/aliases.4 cp mailq.0 ${MAN1}/mailq.1m --- 125,131 ---- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR} # doesn't actually install them -- you may want to install pre-nroff versions ! install-docs: ${MAN1} ${MAN4} aliases.0 mailq.0 newaliases.0 sendmail.0 cp aliases.0 ${MAN4}/aliases.4 chmod ${MANMODE} ${MAN4}/aliases.4 cp mailq.0 ${MAN1}/mailq.1m *************** *** 135,143 **** --- 135,148 ---- cp sendmail.0 ${MAN1}/sendmail.1m chmod ${MANMODE} ${MAN1}/sendmail.1m + ${MAN1} ${MAN4}: + mkdir -p $@ + clean: rm -f ${OBJS} sendmail aliases.0 mailq.0 newaliases.0 sendmail.0 # dependencies # gross overkill, and yet still not quite enough.... ${OBJS}: sendmail.h conf.h + + depend: diff -r -c sendmail-8.8.4/src/READ_ME sendmail-8.8.5/src/READ_ME *** sendmail-8.8.4/src/READ_ME Sun Dec 1 09:34:38 1996 --- sendmail-8.8.5/src/READ_ME Tue Jan 21 07:47:03 1997 *************** *** 30,36 **** # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ! # @(#)READ_ME 8.132 (Berkeley) 12/1/96 # This directory contains the source files for sendmail. --- 30,36 ---- # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ! # @(#)READ_ME 8.135 (Berkeley) 1/21/97 # This directory contains the source files for sendmail. *************** *** 529,537 **** XDEBUG Do additional internal checking. These don't cost too much; you might as well leave this on. TCPWRAPPERS Turns on support for the TCP wrappers library (-lwrap). ! This library is available on ftp.win.tue.nl in /pub/security; ! grab tcp_wrappers_.tar.gz (where is the highest ! numbered version). SECUREWARE Enable calls to the SecureWare luid enabling/changing routines. SecureWare is a C2 security package added to several UNIX's (notably ConvexOS) to get a C2 Secure system. This --- 529,535 ---- XDEBUG Do additional internal checking. These don't cost too much; you might as well leave this on. TCPWRAPPERS Turns on support for the TCP wrappers library (-lwrap). ! See below for further information. SECUREWARE Enable calls to the SecureWare luid enabling/changing routines. SecureWare is a C2 security package added to several UNIX's (notably ConvexOS) to get a C2 Secure system. This *************** *** 787,792 **** --- 785,796 ---- >> >> here, path 2 would be the first used. + Solaris 2.6 (SunOS 5.6) + If you built sendmail 8.8.1 through 8.8.4 inclusive on a Solaris 2.5 + system, that binary will not run on Solaris 2.6, due to problems with + incompatible snprintf(3s) calls. This problem is fixed in sendmail + 8.8.5. + Ultrix By default, the IDENT protocol is turned off on Ultrix. If you are running Ultrix 4.4 or later, or if you have included patch *************** *** 803,809 **** /usr/include/resolv.h:208: warning: `__P' redefined cdefs.h:58: warning: this is the location of the previous definition ! If you are running with this patch, create a file in the obj.SunOS.5.5.1.* directory that reads: #undef __P --- 807,813 ---- /usr/include/resolv.h:208: warning: `__P' redefined cdefs.h:58: warning: this is the location of the previous definition ! If you are running with this patch, create a resolv.h file in the obj.SunOS.5.5.1.* directory that reads: #undef __P *************** *** 1289,1302 **** send them along. TCP Wrappers ! If you are using -DTCPWRAPPERS to get TCP Wrappers support, you will ! also need to install libwrap.a (you can get it from ftp.win.tue.nl) ! and modify the Makefile to include -lwrap in the LIBS line. If you have alternate MX sites for your site, be sure that all of your MX sites reject the same set of hosts. If not, a bad guy whom you reject will connect to your site, fail, and move on to the next ! MX site, which will accept the mail for your and forward it on to you. +--------------+ --- 1293,1311 ---- send them along. TCP Wrappers ! If you are using -DTCPWRAPPERS to get TCP Wrappers support you will ! also need to install libwrap.a and modify the Makefile to include ! -lwrap in the LIBS line (make sure that INCDIRS and LIBDIRS point ! to where the tcpd.h and libwrap.a can be found). ! ! TCP Wrappers is available on ftp.win.tue.nl in /pub/security; ! grab tcp_wrappers_.tar.gz (where is the highest ! numbered version). If you have alternate MX sites for your site, be sure that all of your MX sites reject the same set of hosts. If not, a bad guy whom you reject will connect to your site, fail, and move on to the next ! MX site, which will accept the mail for you and forward it on to you. +--------------+ *************** *** 1398,1401 **** Eric Allman ! (Version 8.132, last update 12/1/96 09:34:37) --- 1407,1410 ---- Eric Allman ! (Version 8.135, last update 1/21/97 07:47:02) diff -r -c sendmail-8.8.4/src/alias.c sendmail-8.8.5/src/alias.c *** sendmail-8.8.4/src/alias.c Fri Sep 20 11:13:03 1996 --- sendmail-8.8.5/src/alias.c Sat Jan 18 09:54:01 1997 *************** *** 35,41 **** # include "sendmail.h" #ifndef lint ! static char sccsid[] = "@(#)alias.c 8.66 (Berkeley) 9/20/96"; #endif /* not lint */ --- 35,41 ---- # include "sendmail.h" #ifndef lint ! static char sccsid[] = "@(#)alias.c 8.67 (Berkeley) 1/18/97"; #endif /* not lint */ *************** *** 601,611 **** --- 601,624 ---- while (fgets(line, sizeof (line), af) != NULL) { int lhssize, rhssize; + int c; LineNumber++; p = strchr(line, '\n'); if (p != NULL) *p = '\0'; + else if (!feof(af)) + { + syserr("554 alias line too long"); + + /* flush to end of line */ + while ((c = getc(af)) != EOF && c != '\n') + continue; + + /* skip any continuation lines */ + skipping = TRUE; + continue; + } switch (line[0]) { case '#': *************** *** 655,661 **** rhs = p; for (;;) { - register char c; register char *nlp; nlp = &p[strlen(p)]; --- 668,673 ---- *************** *** 698,709 **** LineNumber++; /* check for line overflow */ ! if (strchr(p, '\n') == NULL) { usrerr("554 alias too long"); break; } } if (!bitnset(M_ALIASABLE, al.q_mailer->m_flags)) { syserr("554 %s... cannot alias non-local names", --- 710,728 ---- LineNumber++; /* check for line overflow */ ! if (strchr(p, '\n') == NULL && !feof(af)) { usrerr("554 alias too long"); + while ((c = fgetc(af)) != EOF && c != '\n') + continue; + skipping = TRUE; break; } } + + if (skipping) + continue; + if (!bitnset(M_ALIASABLE, al.q_mailer->m_flags)) { syserr("554 %s... cannot alias non-local names", diff -r -c sendmail-8.8.4/src/clock.c sendmail-8.8.5/src/clock.c *** sendmail-8.8.4/src/clock.c Wed Nov 27 09:29:06 1996 --- sendmail-8.8.5/src/clock.c Tue Dec 31 08:21:24 1996 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)clock.c 8.16 (Berkeley) 11/27/96"; #endif /* not lint */ # include "sendmail.h" --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)clock.c 8.18 (Berkeley) 12/31/96"; #endif /* not lint */ # include "sendmail.h" *************** *** 60,66 **** ** none. */ ! static void tick __P((int)); EVENT * setevent(intvl, func, arg) --- 60,66 ---- ** none. */ ! static SIGFUNC_DECL tick __P((int)); EVENT * setevent(intvl, func, arg) *************** *** 161,167 **** ** calls the next function in EventQueue. */ ! static void tick(arg) int arg; { --- 161,167 ---- ** calls the next function in EventQueue. */ ! static SIGFUNC_DECL tick(arg) int arg; { *************** *** 169,177 **** register EVENT *ev; int mypid = getpid(); int olderrno = errno; - #ifdef SIG_UNBLOCK - sigset_t ss; - #endif (void) setsignal(SIGALRM, SIG_IGN); (void) alarm(0); --- 169,174 ---- *************** *** 224,229 **** --- 221,227 ---- if (EventQueue != NULL) (void) alarm((unsigned) (EventQueue->ev_time - now)); errno = olderrno; + return SIGFUNC_RETURN; } /* ** SLEEP -- a version of sleep that works with this stuff diff -r -c sendmail-8.8.4/src/collect.c sendmail-8.8.5/src/collect.c *** sendmail-8.8.4/src/collect.c Sun Nov 24 07:27:19 1996 --- sendmail-8.8.5/src/collect.c Wed Dec 11 19:58:44 1996 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)collect.c 8.61 (Berkeley) 11/24/96"; #endif /* not lint */ # include --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)collect.c 8.62 (Berkeley) 12/11/96"; #endif /* not lint */ # include *************** *** 500,505 **** --- 500,520 ---- markstats(e, (ADDRESS *) NULL); } + + #ifdef _FFR_DSN_RRT + /* + ** If we have a Return-Receipt-To:, turn it into a DSN. + */ + + if (RrtImpliesDsn && hvalue("return-receipt-to", e->e_header) != NULL) + { + ADDRESS *q; + + for (q = e->e_sendqueue; q != NULL; q = q->q_next) + if (!bitset(QHASNOTIFY, q->q_flags)) + q->q_flags |= QHASNOTIFY|QPINGONSUCCESS; + } + #endif /* ** Add an Apparently-To: line if we have no recipient lines. diff -r -c sendmail-8.8.4/src/conf.c sendmail-8.8.5/src/conf.c *** sendmail-8.8.4/src/conf.c Sun Dec 1 10:57:09 1996 --- sendmail-8.8.5/src/conf.c Tue Jan 21 07:47:33 1997 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)conf.c 8.325 (Berkeley) 12/1/96"; #endif /* not lint */ # include "sendmail.h" --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)conf.c 8.333 (Berkeley) 1/21/97"; #endif /* not lint */ # include "sendmail.h" *************** *** 127,140 **** /* - ** Location of system files/databases/etc. - */ - - char *PidFile = _PATH_SENDMAILPID; /* stores daemon proc id */ - - - - /* ** Privacy values */ --- 127,132 ---- *************** *** 230,235 **** --- 222,228 ---- ServiceSwitchFile = "/etc/service.switch"; ServiceCacheMaxAge = (time_t) 10; HostsFile = _PATH_HOSTS; + PidFile = newstr(_PATH_SENDMAILPID); MustQuoteChars = "@,;:\\()[].'"; MciInfoTimeout = 30 MINUTES; MaxRuleRecursion = MAXRULERECURSION; *************** *** 1851,1862 **** int getla() { ! kstat_ctl_t *kc; ! kstat_t *ksp; kstat_named_t *ksn; int la; ! kc = kstat_open(); if (kc == NULL) { if (tTd(3, 1)) --- 1844,1856 ---- int getla() { ! static kstat_ctl_t *kc = NULL; ! static kstat_t *ksp = NULL; kstat_named_t *ksn; int la; ! if (kc == NULL) /* if not initialized before */ ! kc = kstat_open(); if (kc == NULL) { if (tTd(3, 1)) *************** *** 1864,1887 **** errstring(errno)); return -1; } ! ksp = kstat_lookup(kc, "unix", 0, "system_misc"); /* NULL on error */ if (ksp == NULL) { if (tTd(3, 1)) printf("getla: kstat_lookup(): %s\n", ! errstring(errno); return -1; } if (kstat_read(kc, ksp, NULL) < 0) { if (tTd(3, 1)) printf("getla: kstat_read(): %s\n", ! errstring(errno); return -1; } ksn = (kstat_named_t *) kstat_data_lookup(ksp, "avenrun_1min"); ! la = (ksn->value.ul + FSCALE/2) >> FSHIFT; ! kstat_close(kc); return la; } --- 1858,1882 ---- errstring(errno)); return -1; } ! if (ksp == NULL) ! ksp = kstat_lookup(kc, "unix", 0, "system_misc"); if (ksp == NULL) { if (tTd(3, 1)) printf("getla: kstat_lookup(): %s\n", ! errstring(errno)); return -1; } if (kstat_read(kc, ksp, NULL) < 0) { if (tTd(3, 1)) printf("getla: kstat_read(): %s\n", ! errstring(errno)); return -1; } ksn = (kstat_named_t *) kstat_data_lookup(ksp, "avenrun_1min"); ! la = ((double)ksn->value.ul + FSCALE/2) / FSCALE; ! /* kstat_close(kc); /o do not close for fast access */ return la; } *************** *** 2377,2383 **** ** Picks up extant zombies. */ ! void reapchild(sig) int sig; { --- 2372,2378 ---- ** Picks up extant zombies. */ ! SIGFUNC_DECL reapchild(sig) int sig; { *************** *** 2419,2424 **** --- 2414,2420 ---- (void) setsignal(SIGCHLD, reapchild); # endif errno = olderrno; + return SIGFUNC_RETURN; } /* ** PUTENV -- emulation of putenv() in terms of setenv() *************** *** 2805,2816 **** if(!*place) { /* update scanning pointer */ if (optind >= nargc || *(place = nargv[optind]) != '-' || !*++place) { atend++; ! return(EOF); } if (*place == '-') { /* found "--" */ ++optind; atend++; ! return(EOF); } } /* option letter okay? */ if ((optopt = (int)*place++) == (int)':' || !(oli = strchr(ostr,optopt))) { --- 2801,2812 ---- if(!*place) { /* update scanning pointer */ if (optind >= nargc || *(place = nargv[optind]) != '-' || !*++place) { atend++; ! return -1; } if (*place == '-') { /* found "--" */ ++optind; atend++; ! return -1; } } /* option letter okay? */ if ((optopt = (int)*place++) == (int)':' || !(oli = strchr(ostr,optopt))) { *************** *** 3692,3697 **** --- 3688,3694 ---- # endif syserr("cannot lockf(%s%s, fd=%d, type=%o, omode=%o, euid=%d)", filename, ext, fd, type, omode, geteuid()); + dumpfd(fd, TRUE, TRUE); } # else if (ext == NULL) *************** *** 3721,3726 **** --- 3718,3724 ---- # endif syserr("cannot flock(%s%s, fd=%d, type=%o, omode=%o, euid=%d)", filename, ext, fd, type, omode, geteuid()); + dumpfd(fd, TRUE, TRUE); } # endif if (tTd(55, 60)) *************** *** 4011,4018 **** #if TCPWRAPPERS # include int allow_severity = LOG_INFO; ! int deny_severity = LOG_WARNING; #endif #if DAEMON --- 4009,4018 ---- #if TCPWRAPPERS # include + + /* tcpwrappers does no logging, but you still have to declare these -- ugh */ int allow_severity = LOG_INFO; ! int deny_severity = LOG_NOTICE; #endif #if DAEMON *************** *** 4027,4033 **** --- 4027,4040 ---- #if TCPWRAPPERS if (!hosts_ctl("sendmail", hostname, anynet_ntoa(sap), STRING_UNKNOWN)) + { + # ifdef LOG + if (LogLevel >= 4) + syslog(LOG_NOTICE, "tcpwrappers (%s, %s) rejection", + hostname, anynet_ntoa(sap)); + # endif return FALSE; + } #endif return TRUE; } *************** *** 4395,4401 **** int s; int i; struct ifconf ifc; ! char interfacebuf[1024]; s = socket(AF_INET, SOCK_DGRAM, 0); if (s == -1) --- 4402,4408 ---- int s; int i; struct ifconf ifc; ! char interfacebuf[10240]; s = socket(AF_INET, SOCK_DGRAM, 0); if (s == -1) *************** *** 4765,4770 **** --- 4772,4780 ---- #endif #if USE_SA_SIGACTION "USE_SA_SIGACTION", + #endif + #if USE_SIGLONGJMP + "USE_SIGLONGJMP", #endif #if USESETEUID "USESETEUID", diff -r -c sendmail-8.8.4/src/conf.h sendmail-8.8.5/src/conf.h *** sendmail-8.8.4/src/conf.h Sun Dec 1 15:56:07 1996 --- sendmail-8.8.5/src/conf.h Fri Jan 17 15:54:22 1997 *************** *** 31,37 **** * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ! * @(#)conf.h 8.279 (Berkeley) 12/1/96 */ /* --- 31,37 ---- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ! * @(#)conf.h 8.288 (Berkeley) 1/17/97 */ /* *************** *** 367,380 **** #if defined(sun) && !defined(BSD) # define HASINITGROUPS 1 /* has initgroups(3) call */ # define HASUNAME 1 /* use System V uname(2) system call */ # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ # define HASFCHMOD 1 /* has fchmod(2) syscall */ # define IP_SRCROUTE 1 /* can check IP source routing */ - # ifndef LA_TYPE - # define LA_TYPE LA_INT - # endif # ifdef SOLARIS_2_3 # define SOLARIS 20300 /* for back compat only -- use -DSOLARIS=20300 */ --- 367,378 ---- #if defined(sun) && !defined(BSD) + # include # define HASINITGROUPS 1 /* has initgroups(3) call */ # define HASUNAME 1 /* use System V uname(2) system call */ # define HASGETUSERSHELL 1 /* DOES have getusershell(3) call in libc */ # define HASFCHMOD 1 /* has fchmod(2) syscall */ # define IP_SRCROUTE 1 /* can check IP source routing */ # ifdef SOLARIS_2_3 # define SOLARIS 20300 /* for back compat only -- use -DSOLARIS=20300 */ *************** *** 389,395 **** # ifndef __svr4__ # define __svr4__ /* use all System V Releae 4 defines below */ # endif - # include # define GIDSET_T gid_t # define USE_SA_SIGACTION 1 /* use sa_sigaction field */ # ifndef _PATH_UNIX --- 387,392 ---- *************** *** 409,424 **** # define USESETEUID 1 /* seteuid works as of 2.3 */ # endif # if SOLARIS >= 20500 || (SOLARIS < 10000 && SOLARIS >= 205) - # define HASSNPRINTF 1 /* has snprintf starting in 2.5 */ # define HASSETREUID 1 /* setreuid works as of 2.5 */ - # if SOLARIS == 20500 || SOLARIS == 205 - # define snprintf __snprintf /* but names it oddly in 2.5 */ - # define vsnprintf __vsnprintf - # endif # ifndef LA_TYPE # define LA_TYPE LA_KSTAT /* use kstat(3k) -- may work in < 2.5 */ # endif # endif # ifndef HASGETUSERSHELL # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ # endif --- 406,419 ---- # define USESETEUID 1 /* seteuid works as of 2.3 */ # endif # if SOLARIS >= 20500 || (SOLARIS < 10000 && SOLARIS >= 205) # define HASSETREUID 1 /* setreuid works as of 2.5 */ # ifndef LA_TYPE # define LA_TYPE LA_KSTAT /* use kstat(3k) -- may work in < 2.5 */ # endif # endif + # if SOLARIS >= 20600 || (SOLARIS < 10000 && SOLARIS >= 206) + # define HASSNPRINTF 1 /* has snprintf starting in 2.6 */ + # endif # ifndef HASGETUSERSHELL # define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps */ # endif *************** *** 454,460 **** # endif # endif ! #endif /* ** DG/UX --- 449,460 ---- # endif # endif ! ! # ifndef LA_TYPE ! # define LA_TYPE LA_INT ! # endif ! ! #endif /* sun && !BSD */ /* ** DG/UX *************** *** 680,686 **** /* ! ** FreeBSD / NetBSD (all architectures, all versions) ** ** 4.3BSD clone, closer to 4.4BSD for FreeBSD 1.x and NetBSD 0.9x ** 4.4BSD-Lite based for FreeBSD 2.x and NetBSD 1.x --- 680,686 ---- /* ! ** FreeBSD / NetBSD / OpenBSD (all architectures, all versions) ** ** 4.3BSD clone, closer to 4.4BSD for FreeBSD 1.x and NetBSD 0.9x ** 4.4BSD-Lite based for FreeBSD 2.x and NetBSD 1.x *************** *** 688,694 **** ** See also BSD defines. */ ! #if defined(__FreeBSD__) || defined(__NetBSD__) # include # define HASUNSETENV 1 /* has unsetenv(3) call */ # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ --- 688,694 ---- ** See also BSD defines. */ ! #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) # include # define HASUNSETENV 1 /* has unsetenv(3) call */ # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ *************** *** 723,728 **** --- 723,732 ---- # define SPT_PADCHAR '\0' /* pad process title with nulls */ # endif # endif + # if defined(__OpenBSD__) + # undef SPT_TYPE + # define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */ + # endif #endif *************** *** 832,837 **** --- 836,842 ---- # define SYSTEM5 1 /* include all the System V defines */ # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ # define NOFTRUNCATE 0 /* has (simulated) ftruncate call */ + # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */ # define MAXPATHLEN PATHSIZE # define SFS_TYPE SFS_4ARGS /* use 4-arg impl */ # define SFS_BAVAIL f_bfree /* alternate field name */ *************** *** 904,909 **** --- 909,915 ---- # define WAITUNION 1 /* use "union wait" as wait argument type */ # define NEEDFSYNC 1 /* no fsync(2) in system library */ # define NEEDSTRSTR 1 /* need emulation of the strstr(3) call */ + # define NOFTRUNCATE 1 /* do not have ftruncate(2) */ # define MAXPATHLEN PATH_MAX # define LA_TYPE LA_SHORT # define SFS_TYPE SFS_STATFS /* use statfs() impl */ *************** *** 917,922 **** --- 923,929 ---- typedef unsigned short uid_t; typedef unsigned short gid_t; typedef short pid_t; + typedef unsigned long mode_t; /* some stuff that should have been in the include files */ # include *************** *** 1015,1021 **** extern int errno; typedef int pid_t; ! #define SIGFUNC_DEFINED typedef int (*sigfunc_t)(); extern char *getenv(); extern void *malloc(); --- 1022,1030 ---- extern int errno; typedef int pid_t; ! #define SIGFUNC_DEFINED ! #define SIGFUNC_RETURN (0) ! #define SIGFUNC_DECL int typedef int (*sigfunc_t)(); extern char *getenv(); extern void *malloc(); *************** *** 1110,1115 **** --- 1119,1126 ---- # define HASINITGROUPS 1 /* has initgroups(3) call */ # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ # define SIGFUNC_DEFINED /* sigfunc_t already defined */ + # define SIGFUNC_RETURN (0) /* XXX this is a guess */ + # define SIGFUNC_DECL int /* XXX this is a guess */ # ifndef IDENTPROTO # define IDENTPROTO 0 /* TCP/IP implementation is broken */ # endif *************** *** 1284,1289 **** --- 1295,1303 ---- # define IDENTPROTO 0 /* TCP/IP implementation is broken */ # endif # define RLIMIT_NEEDS_SYS_TIME_H 1 + # if defined(NGROUPS_MAX) && !NGROUPS_MAX + # undef NGROUPS_MAX + # endif #endif *************** *** 1494,1499 **** --- 1508,1515 ---- typedef int pid_t; typedef int (*sigfunc_t)(); # define SIGFUNC_DEFINED + # define SIGFUNC_RETURN (0) + # define SIGFUNC_DECL int # else /* NEWS-OS 6.0.3 with /bin/cc */ *************** *** 1558,1563 **** --- 1574,1581 ---- typedef int pid_t; typedef int (*sigfunc_t)(); # define SIGFUNC_DEFINED + # define SIGFUNC_RETURN (0) + # define SIGFUNC_DECL int extern char *getenv(); extern int errno; # define _PATH_VENDOR_CF "/usr/lib/sendmail.cf" *************** *** 1662,1667 **** --- 1680,1707 ---- #endif + /* + ** Harris Nighthawk PowerUX (nh6000 box) + ** + ** Contributed by Bob Miorelli, Pratt & Whitney + */ + + #ifdef _PowerUX + # ifndef __svr4__ + # define __svr4__ + # endif + # define _PATH_VENDOR_CF "/etc/mail/sendmail.cf" + # ifndef _PATH_SENDMAILPID + # define _PATH_SENDMAILPID "/etc/mail/sendmail.pid" + # endif + # define SYSLOG_BUFSIZE 1024 + # define HASSNPRINTF 1 /* has snprintf(3) and vsnprintf(3) */ + # define LA_TYPE LA_ZERO + typedef struct msgb mblk_t; + # undef offsetof /* avoid stddefs.h and sys/sysmacros.h conflict */ + #endif + + /********************************************************************** ** End of Per-Operating System defines **********************************************************************/ *************** *** 1720,1729 **** # define SFS_TYPE SFS_STATVFS # endif ! /* SVr4 uses different routines for setjmp/longjmp with signal support */ ! # define jmp_buf sigjmp_buf ! # define setjmp(env) sigsetjmp(env, 1) ! # define longjmp(env, val) siglongjmp(env, val) #endif /* general System V defines */ --- 1760,1766 ---- # define SFS_TYPE SFS_STATVFS # endif ! # define USE_SIGLONGJMP 1 /* sigsetjmp needed for signal handling */ #endif /* general System V defines */ *************** *** 1844,1849 **** --- 1881,1890 ---- # define SECUREWARE 0 /* assume no SecureWare C2 auditing hooks */ #endif + #ifndef USE_SIGLONGJMP + # define USE_SIGLONGJMP 0 /* assume setjmp handles signals properly */ + #endif + /* ** If no type for argument two of getgroups call is defined, assume ** it's an integer -- unfortunately, there seem to be several choices *************** *** 2070,2075 **** --- 2111,2122 ---- #ifndef SIGFUNC_DEFINED typedef void (*sigfunc_t) __P((int)); #endif + #ifndef SIGFUNC_RETURN + # define SIGFUNC_RETURN + #endif + #ifndef SIGFUNC_DECL + # define SIGFUNC_DECL void + #endif /* size of syslog buffer */ #ifndef SYSLOG_BUFSIZE *************** *** 2115,2118 **** --- 2162,2184 ---- #ifndef SCANF # define SCANF 1 + #endif + + /* + ** SVr4 and similar systems use different routines for setjmp/longjmp + ** with signal support + */ + + #if USE_SIGLONGJMP + /* Silly SCO /usr/include/setjmp.h file has #define setjmp(env) setjmp(env) */ + # ifdef setjmp + # undef setjmp + # endif + # define jmp_buf sigjmp_buf + # define setjmp(env) sigsetjmp(env, 1) + # define longjmp(env, val) siglongjmp(env, val) + #endif + + #if !defined(NGROUPS_MAX) && defined(NGROUPS) + # define NGROUPS_MAX NGROUPS /* POSIX naming convention */ #endif diff -r -c sendmail-8.8.4/src/daemon.c sendmail-8.8.5/src/daemon.c *** sendmail-8.8.4/src/daemon.c Sun Dec 1 10:24:45 1996 --- sendmail-8.8.5/src/daemon.c Tue Jan 14 18:01:05 1997 *************** *** 37,45 **** #ifndef lint #ifdef DAEMON ! static char sccsid[] = "@(#)daemon.c 8.156 (Berkeley) 12/1/96 (with daemon mode)"; #else ! static char sccsid[] = "@(#)daemon.c 8.156 (Berkeley) 12/1/96 (without daemon mode)"; #endif #endif /* not lint */ --- 37,45 ---- #ifndef lint #ifdef DAEMON ! static char sccsid[] = "@(#)daemon.c 8.159 (Berkeley) 1/14/97 (with daemon mode)"; #else ! static char sccsid[] = "@(#)daemon.c 8.159 (Berkeley) 1/14/97 (without daemon mode)"; #endif #endif /* not lint */ *************** *** 165,171 **** (void) setsignal(SIGCHLD, reapchild); /* write the pid to the log file for posterity */ ! pidf = fopen(PidFile, "w"); if (pidf != NULL) { extern char *CommandLineArgs; --- 165,172 ---- (void) setsignal(SIGCHLD, reapchild); /* write the pid to the log file for posterity */ ! pidf = safefopen(PidFile, O_WRONLY|O_CREAT|O_TRUNC, 0644, ! SFF_NOSLINK|SFF_ROOTOK|SFF_REGONLY|SFF_CREAT); if (pidf != NULL) { extern char *CommandLineArgs; *************** *** 316,322 **** if (pid == 0) { char *p; ! extern void intsig(); FILE *inchannel, *outchannel; bool nullconn; --- 317,323 ---- if (pid == 0) { char *p; ! extern SIGFUNC_DECL intsig __P((int)); FILE *inchannel, *outchannel; bool nullconn; diff -r -c sendmail-8.8.4/src/deliver.c sendmail-8.8.5/src/deliver.c *** sendmail-8.8.4/src/deliver.c Sun Dec 1 15:51:03 1996 --- sendmail-8.8.5/src/deliver.c Fri Jan 17 10:03:29 1997 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)deliver.c 8.260 (Berkeley) 12/1/96"; #endif /* not lint */ #include "sendmail.h" --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)deliver.c 8.266 (Berkeley) 1/17/97"; #endif /* not lint */ #include "sendmail.h" *************** *** 314,320 **** ee->e_errorqueue = copyqueue(e->e_errorqueue); ee->e_flags = e->e_flags & ~(EF_INQUEUE|EF_CLRQUEUE|EF_FATALERRS|EF_SENDRECEIPT|EF_RET_PARAM); ee->e_flags |= EF_NORECEIPT; ! setsender(owner, ee, NULL, TRUE); if (tTd(13, 5)) { printf("sendall(split): QDONTSEND "); --- 314,320 ---- ee->e_errorqueue = copyqueue(e->e_errorqueue); ee->e_flags = e->e_flags & ~(EF_INQUEUE|EF_CLRQUEUE|EF_FATALERRS|EF_SENDRECEIPT|EF_RET_PARAM); ee->e_flags |= EF_NORECEIPT; ! setsender(owner, ee, NULL, '\0', TRUE); if (tTd(13, 5)) { printf("sendall(split): QDONTSEND "); *************** *** 401,407 **** if (owner != NULL) { ! setsender(owner, e, NULL, TRUE); if (tTd(13, 5)) { printf("sendall(owner): QDONTSEND "); --- 401,407 ---- if (owner != NULL) { ! setsender(owner, e, NULL, '\0', TRUE); if (tTd(13, 5)) { printf("sendall(owner): QDONTSEND "); *************** *** 470,475 **** --- 470,482 ---- queueonly: if (e->e_nrcpts > 0) e->e_flags |= EF_INQUEUE; + dropenvelope(e, FALSE); + for (ee = splitenv; ee != NULL; ee = ee->e_sibling) + { + if (ee->e_nrcpts > 0) + ee->e_flags |= EF_INQUEUE; + dropenvelope(ee, FALSE); + } return; case SM_FORK: *************** *** 547,553 **** exit(EX_OK); /* be sure we are immune from the terminal */ ! disconnect(1, e); /* prevent parent from waiting if there was an error */ if (pid < 0) --- 554,560 ---- exit(EX_OK); /* be sure we are immune from the terminal */ ! disconnect(2, e); /* prevent parent from waiting if there was an error */ if (pid < 0) *************** *** 788,797 **** */ #ifndef NO_UID ! # define NO_UID ((uid_t) -1) #endif #ifndef NO_GID ! # define NO_GID ((gid_t) -1) #endif int --- 795,804 ---- */ #ifndef NO_UID ! # define NO_UID -1 #endif #ifndef NO_GID ! # define NO_GID -1 #endif int *************** *** 1500,1508 **** { int i; int saveerrno; ! uid_t new_euid = NO_UID; ! uid_t new_ruid = NO_UID; ! gid_t new_gid = NO_GID; struct stat stb; extern int DtableSize; --- 1507,1515 ---- { int i; int saveerrno; ! int new_euid = NO_UID; ! int new_ruid = NO_UID; ! int new_gid = NO_GID; struct stat stb; extern int DtableSize; *************** *** 1765,1776 **** } #endif if (bitset(EF_HAS8BIT, e->e_flags) && !bitset(EF_DONT_MIME, e->e_flags) && bitnset(M_7BITS, m->m_flags)) mci->mci_flags |= MCIF_CVT8TO7; - else - mci->mci_flags &= ~MCIF_CVT8TO7; #if MIME7TO8 if (bitnset(M_MAKE8BIT, m->m_flags) && --- 1772,1784 ---- } #endif + /* clear out per-message flags from connection structure */ + mci->mci_flags &= ~(MCIF_CVT7TO8|MCIF_CVT8TO7); + if (bitset(EF_HAS8BIT, e->e_flags) && !bitset(EF_DONT_MIME, e->e_flags) && bitnset(M_7BITS, m->m_flags)) mci->mci_flags |= MCIF_CVT8TO7; #if MIME7TO8 if (bitnset(M_MAKE8BIT, m->m_flags) && *************** *** 2000,2006 **** e->e_statmsg = NULL; /* reset the mci state for the next transaction */ ! if (mci->mci_state == MCIS_ACTIVE) mci->mci_state = MCIS_OPEN; } # endif --- 2008,2014 ---- e->e_statmsg = NULL; /* reset the mci state for the next transaction */ ! if (mci != NULL && mci->mci_state == MCIS_ACTIVE) mci->mci_state = MCIS_OPEN; } # endif *************** *** 2014,2020 **** #if SMTP /* now close the connection */ ! if (clever && mci->mci_state != MCIS_CLOSED && !bitset(MCIF_CACHED, mci->mci_flags)) smtpquit(m, mci, e); #endif --- 2022,2028 ---- #if SMTP /* now close the connection */ ! if (clever && mci != NULL && mci->mci_state != MCIS_CLOSED && !bitset(MCIF_CACHED, mci->mci_flags)) smtpquit(m, mci, e); #endif diff -r -c sendmail-8.8.4/src/envelope.c sendmail-8.8.5/src/envelope.c *** sendmail-8.8.4/src/envelope.c Sun Dec 1 10:47:02 1996 --- sendmail-8.8.5/src/envelope.c Mon Dec 16 13:51:19 1996 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)envelope.c 8.99 (Berkeley) 12/1/96"; #endif /* not lint */ #include "sendmail.h" --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)envelope.c 8.101 (Berkeley) 12/16/96"; #endif /* not lint */ #include "sendmail.h" *************** *** 275,285 **** if (bitset(EF_FATALERRS, e->e_flags) && !failure_return) { - failure_return = TRUE; for (q = e->e_sendqueue; q != NULL; q = q->q_next) { ! if (!bitset(QDONTSEND, q->q_flags)) q->q_flags |= QBADADDR; } } --- 275,288 ---- if (bitset(EF_FATALERRS, e->e_flags) && !failure_return) { for (q = e->e_sendqueue; q != NULL; q = q->q_next) { ! if (!bitset(QDONTSEND, q->q_flags) && ! bitset(QPINGONFAILURE, q->q_flags)) ! { ! failure_return = TRUE; q->q_flags |= QBADADDR; + } } } *************** *** 640,645 **** --- 643,650 ---- ** e -- the envelope in which we would like the sender set. ** delimptr -- if non-NULL, set to the location of the ** trailing delimiter. + ** delimchar -- the character that will delimit the sender + ** address. ** internal -- set if this address is coming from an internal ** source such as an owner alias. ** *************** *** 651,666 **** */ void ! setsender(from, e, delimptr, internal) char *from; register ENVELOPE *e; char **delimptr; bool internal; { register char **pvp; char *realname = NULL; register struct passwd *pw; - char delimchar; char *bp; char buf[MAXNAME + 2]; char pvpbuf[PSBUFSIZE]; --- 656,671 ---- */ void ! setsender(from, e, delimptr, delimchar, internal) char *from; register ENVELOPE *e; char **delimptr; + int delimchar; bool internal; { register char **pvp; char *realname = NULL; register struct passwd *pw; char *bp; char buf[MAXNAME + 2]; char pvpbuf[PSBUFSIZE]; *************** *** 683,689 **** if (ConfigLevel < 2) SuprErrs = TRUE; - delimchar = internal ? '\0' : ' '; e->e_from.q_flags = QBADADDR; if (from == NULL || parseaddr(from, &e->e_from, RF_COPYALL|RF_SENDERADDR, --- 688,693 ---- diff -r -c sendmail-8.8.4/src/headers.c sendmail-8.8.5/src/headers.c *** sendmail-8.8.4/src/headers.c Sun Nov 24 14:06:56 1996 --- sendmail-8.8.5/src/headers.c Wed Dec 11 19:58:44 1996 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)headers.c 8.101 (Berkeley) 11/23/96"; #endif /* not lint */ # include --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)headers.c 8.103 (Berkeley) 12/11/96"; #endif /* not lint */ # include *************** *** 569,575 **** if (tTd(32, 2)) printf("eatheader: setsender(*%s == %s)\n", hi->hi_field, p); ! setsender(p, e, NULL, TRUE); } } --- 569,575 ---- if (tTd(32, 2)) printf("eatheader: setsender(*%s == %s)\n", hi->hi_field, p); ! setsender(p, e, NULL, '\0', TRUE); } } *************** *** 1165,1171 **** --- 1165,1175 ---- /* suppress return receipts if requested */ if (bitset(H_RECEIPTTO, h->h_flags) && + #if _FFR_DSN_RRT + (RrtImpliesDsn || bitset(EF_NORECEIPT, e->e_flags))) + #else bitset(EF_NORECEIPT, e->e_flags)) + #endif { if (tTd(34, 11)) printf(" (skipped (receipt))\n"); diff -r -c sendmail-8.8.4/src/main.c sendmail-8.8.5/src/main.c *** sendmail-8.8.4/src/main.c Sun Dec 1 10:47:01 1996 --- sendmail-8.8.5/src/main.c Fri Jan 17 10:51:02 1997 *************** *** 39,45 **** #endif /* not lint */ #ifndef lint ! static char sccsid[] = "@(#)main.c 8.223 (Berkeley) 12/1/96"; #endif /* not lint */ #define _DEFINE --- 39,45 ---- #endif /* not lint */ #ifndef lint ! static char sccsid[] = "@(#)main.c 8.230 (Berkeley) 1/17/97"; #endif /* not lint */ #define _DEFINE *************** *** 145,156 **** extern char *optarg; extern char **environ; extern time_t convtime(); ! extern void intsig(); extern struct hostent *myhostname(); extern char *getauthinfo(); extern char *getcfname(); ! extern void sigusr1(); ! extern void sighup(); extern void initmacros __P((ENVELOPE *)); extern void init_md __P((int, char **)); extern int getdtsize __P((void)); --- 145,156 ---- extern char *optarg; extern char **environ; extern time_t convtime(); ! extern SIGFUNC_DECL intsig __P((int)); extern struct hostent *myhostname(); extern char *getauthinfo(); extern char *getcfname(); ! extern SIGFUNC_DECL sigusr1 __P((int)); ! extern SIGFUNC_DECL sighup __P((int)); extern void initmacros __P((ENVELOPE *)); extern void init_md __P((int, char **)); extern int getdtsize __P((void)); *************** *** 165,170 **** --- 165,171 ---- extern void printqueue __P((void)); extern void sendtoargv __P((char **, ENVELOPE *)); extern void resetlimits __P((void)); + extern void drop_privileges __P((void)); /* ** Check to see if we reentered. *************** *** 228,233 **** --- 229,237 ---- tTsetup(tTdvect, sizeof tTdvect, "0-99.1"); + /* drop group id privileges (RunAsUser not yet set) */ + drop_privileges(); + /* Handle any non-getoptable constructions. */ obsolete(argv); *************** *** 245,251 **** # define OPTIONS "B:b:C:cd:e:F:f:h:IiM:mN:nO:o:p:q:R:r:sTtUV:vX:" #endif opterr = 0; ! while ((j = getopt(argc, argv, OPTIONS)) != EOF) { switch (j) { --- 249,255 ---- # define OPTIONS "B:b:C:cd:e:F:f:h:IiM:mN:nO:o:p:q:R:r:sTtUV:vX:" #endif opterr = 0; ! while ((j = getopt(argc, argv, OPTIONS)) != -1) { switch (j) { *************** *** 511,517 **** OpMode = MD_PURGESTAT; optind = 1; ! while ((j = getopt(argc, argv, OPTIONS)) != EOF) { switch (j) { --- 515,521 ---- OpMode = MD_PURGESTAT; optind = 1; ! while ((j = getopt(argc, argv, OPTIONS)) != -1) { switch (j) { *************** *** 806,815 **** if (OpMode != MD_DAEMON && OpMode != MD_FGDAEMON) { /* drop privileges -- daemon mode done after socket/bind */ ! if (RunAsGid != 0) ! (void) setgid(RunAsGid); ! if (RunAsUid != 0) ! (void) setuid(RunAsUid); } /* --- 810,816 ---- if (OpMode != MD_DAEMON && OpMode != MD_FGDAEMON) { /* drop privileges -- daemon mode done after socket/bind */ ! drop_privileges(); } /* *************** *** 900,905 **** --- 901,920 ---- printf("Warning: HostStatusDirectory required for SingleThreadDelivery\n"); } + /* check for permissions */ + if ((OpMode == MD_DAEMON || OpMode == MD_PURGESTAT) && RealUid != 0) + { + #ifdef LOG + if (LogLevel > 1) + syslog(LOG_ALERT, "user %d attempted to %s", + RealUid, + OpMode == MD_DAEMON ? "run daemon" + : "purge host status"); + #endif + usrerr("Permission denied"); + exit(EX_USAGE); + } + if (MeToo) BlankEnvelope.e_flags |= EF_METOO; *************** *** 916,932 **** /* fall through ... */ case MD_DAEMON: - /* check for permissions */ - if (RealUid != 0) - { - #ifdef LOG - if (LogLevel > 1) - syslog(LOG_ALERT, "user %d attempted to run daemon", - RealUid); - #endif - usrerr("Permission denied"); - exit(EX_USAGE); - } vendor_daemon_setup(CurEnv); /* remove things that don't make sense in daemon mode */ --- 931,936 ---- *************** *** 948,953 **** --- 952,962 ---- Verbose = TRUE; /* fall through... */ + case MD_PRINT: + /* to handle sendmail -bp -qSfoobar properly */ + queuemode = FALSE; + /* fall through... */ + default: /* arrange to exit cleanly on hangup signal */ if (setsignal(SIGHUP, SIG_IGN) == (sigfunc_t) SIG_DFL) *************** *** 1214,1220 **** if (OpMode == MD_TEST) { char buf[MAXLINE]; ! void intindebug(); if (isatty(fileno(stdin))) Verbose = TRUE; --- 1223,1229 ---- if (OpMode == MD_TEST) { char buf[MAXLINE]; ! SIGFUNC_DECL intindebug __P((int)); if (isatty(fileno(stdin))) Verbose = TRUE; *************** *** 1318,1327 **** nullserver = getrequests(CurEnv); /* drop privileges */ ! if (RunAsGid != 0) ! (void) setgid(RunAsGid); ! if (RunAsUid != 0) ! (void) setuid(RunAsUid); /* at this point we are in a child: reset state */ (void) newenvelope(CurEnv, CurEnv); --- 1327,1333 ---- nullserver = getrequests(CurEnv); /* drop privileges */ ! drop_privileges(); /* at this point we are in a child: reset state */ (void) newenvelope(CurEnv, CurEnv); *************** *** 1385,1391 **** if (warn_f_flag != '\0' && !wordinclass(RealUserName, 't')) auth_warning(CurEnv, "%s set sender to %s using -%c", RealUserName, from, warn_f_flag); ! setsender(from, CurEnv, NULL, FALSE); if (macvalue('s', CurEnv) == NULL) define('s', RealHostName, CurEnv); --- 1391,1397 ---- if (warn_f_flag != '\0' && !wordinclass(RealUserName, 't')) auth_warning(CurEnv, "%s set sender to %s using -%c", RealUserName, from, warn_f_flag); ! setsender(from, CurEnv, NULL, '\0', FALSE); if (macvalue('s', CurEnv) == NULL) define('s', RealHostName, CurEnv); *************** *** 1450,1459 **** } ! void ! intindebug() { longjmp(TopFrame, 1); } --- 1456,1467 ---- } ! SIGFUNC_DECL ! intindebug(sig) ! int sig; { longjmp(TopFrame, 1); + return SIGFUNC_RETURN; } *************** *** 1528,1535 **** ** Unlocks the current job. */ ! void ! intsig() { #ifdef LOG if (LogLevel > 79) --- 1536,1544 ---- ** Unlocks the current job. */ ! SIGFUNC_DECL ! intsig(sig) ! int sig; { #ifdef LOG if (LogLevel > 79) *************** *** 1944,1958 **** } ! void ! sigusr1() { dumpstate("user signal"); } ! void ! sighup() { if (SaveArgv[0][0] != '/') { --- 1953,1970 ---- } ! SIGFUNC_DECL ! sigusr1(sig) ! int sig; { dumpstate("user signal"); + return SIGFUNC_RETURN; } ! SIGFUNC_DECL ! sighup(sig) ! int sig; { if (SaveArgv[0][0] != '/') { *************** *** 1982,1987 **** --- 1994,2024 ---- syslog(LOG_ALERT, "could not exec %s: %m", SaveArgv[0]); #endif exit(EX_OSFILE); + } + /* + ** DROP_PRIVILEGES -- reduce privileges to those of the RunAsUser option + ** + ** Parameters: + ** none. + ** + ** Returns: + ** none. + */ + + void + drop_privileges() + { + #ifdef NGROUPS_MAX + /* reset group permissions; these can be set later */ + GIDSET_T emptygidset[NGROUPS_MAX]; + + emptygidset[0] = RunAsGid == 0 ? getegid() : RunAsGid; + (void) setgroups(1, emptygidset); + #endif + if (RunAsGid != 0) + (void) setgid(RunAsGid); + if (RunAsUid != 0) + (void) setuid(RunAsUid); } /* ** TESTMODELINE -- process a test mode input line diff -r -c sendmail-8.8.4/src/makesendmail sendmail-8.8.5/src/makesendmail *** sendmail-8.8.4/src/makesendmail Sun Nov 10 11:15:33 1996 --- sendmail-8.8.5/src/makesendmail Sat Dec 14 19:31:03 1996 *************** *** 32,38 **** # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ! # @(#)makesendmail 8.42 (Berkeley) 11/10/96 # # --- 32,38 ---- # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ! # @(#)makesendmail 8.43 (Berkeley) 12/14/96 # # *************** *** 133,138 **** --- 133,139 ---- os="UXPDS" rel=`uname -v | sed -e 's/\(V.*\)L.*/\1/'` fi;; + SINIX-?) os=SINIX;; esac # get "base part" of operating system release diff -r -c sendmail-8.8.4/src/map.c sendmail-8.8.5/src/map.c *** sendmail-8.8.4/src/map.c Sun Nov 24 07:27:26 1996 --- sendmail-8.8.5/src/map.c Fri Jan 17 10:02:57 1997 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)map.c 8.146 (Berkeley) 11/24/96"; #endif /* not lint */ #include "sendmail.h" --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)map.c 8.147 (Berkeley) 1/17/97"; #endif /* not lint */ #include "sendmail.h" *************** *** 1610,1616 **** #ifdef NISPLUS ! #undef NIS /* symbol conflict in nis.h */ #include #include --- 1610,1617 ---- #ifdef NISPLUS ! #undef NIS /* symbol conflict in nis.h */ ! #undef T_UNSPEC /* symbol conflict in nis.h -> ... -> sys/tiuser.h */ #include #include diff -r -c sendmail-8.8.4/src/mime.c sendmail-8.8.5/src/mime.c *** sendmail-8.8.4/src/mime.c Sun Nov 24 07:27:26 1996 --- sendmail-8.8.5/src/mime.c Tue Jan 14 17:21:22 1997 *************** *** 36,42 **** # include #ifndef lint ! static char sccsid[] = "@(#)mime.c 8.51 (Berkeley) 11/24/96"; #endif /* not lint */ /* --- 36,42 ---- # include #ifndef lint ! static char sccsid[] = "@(#)mime.c 8.54 (Berkeley) 1/14/97"; #endif /* not lint */ /* *************** *** 958,967 **** register char *p; char *cte; char **pvp; - u_char *obp; u_char *fbufp; char buf[MAXLINE]; - u_char obuf[MAXLINE + 1]; u_char fbuf[MAXLINE + 1]; char pvpbuf[MAXLINE]; extern u_char MimeTokenTab[256]; --- 958,965 ---- *************** *** 1045,1053 **** c2 = CHAR64(c2); *fbufp = (c1 << 2) | ((c2 & 0x30) >> 4); ! if (*fbufp++ == '\n' || fbuf >= &fbuf[MAXLINE]) { ! if (*--fbufp != '\n' || *--fbufp != '\r') fbufp++; *fbufp = '\0'; putline((char *) fbuf, mci); --- 1043,1052 ---- c2 = CHAR64(c2); *fbufp = (c1 << 2) | ((c2 & 0x30) >> 4); ! if (*fbufp++ == '\n' || fbufp >= &fbuf[MAXLINE]) { ! if (*--fbufp != '\n' || ! (fbufp > fbuf && *--fbufp != '\r')) fbufp++; *fbufp = '\0'; putline((char *) fbuf, mci); *************** *** 1057,1065 **** continue; c3 = CHAR64(c3); *fbufp = ((c2 & 0x0f) << 4) | ((c3 & 0x3c) >> 2); ! if (*fbufp++ == '\n' || fbuf >= &fbuf[MAXLINE]) { ! if (*--fbufp != '\n' || *--fbufp != '\r') fbufp++; *fbufp = '\0'; putline((char *) fbuf, mci); --- 1056,1065 ---- continue; c3 = CHAR64(c3); *fbufp = ((c2 & 0x0f) << 4) | ((c3 & 0x3c) >> 2); ! if (*fbufp++ == '\n' || fbufp >= &fbuf[MAXLINE]) { ! if (*--fbufp != '\n' || ! (fbufp > fbuf && *--fbufp != '\r')) fbufp++; *fbufp = '\0'; putline((char *) fbuf, mci); *************** *** 1069,1103 **** continue; c4 = CHAR64(c4); *fbufp = ((c3 & 0x03) << 6) | c4; ! if (*fbufp++ == '\n' || fbuf >= &fbuf[MAXLINE]) { ! if (*--fbufp != '\n' || *--fbufp != '\r') fbufp++; *fbufp = '\0'; putline((char *) fbuf, mci); fbufp = fbuf; } } - - /* force out partial last line */ - if (fbufp > fbuf) - { - *fbufp = '\0'; - putline((char *) fbuf, mci); - } } else { /* quoted-printable */ ! obp = obuf; while (fgets(buf, sizeof buf, e->e_dfp) != NULL) { ! if (mime_fromqp((u_char *) buf, &obp, 0, &obuf[MAXLINE] - obp) == 0) continue; ! putline((char *) obuf, mci); ! obp = obuf; } } if (tTd(43, 3)) printf("\t\t\tmime7to8 => %s to 8bit done\n", cte); --- 1069,1105 ---- continue; c4 = CHAR64(c4); *fbufp = ((c3 & 0x03) << 6) | c4; ! if (*fbufp++ == '\n' || fbufp >= &fbuf[MAXLINE]) { ! if (*--fbufp != '\n' || ! (fbufp > fbuf && *--fbufp != '\r')) fbufp++; *fbufp = '\0'; putline((char *) fbuf, mci); fbufp = fbuf; } } } else { /* quoted-printable */ ! fbufp = fbuf; while (fgets(buf, sizeof buf, e->e_dfp) != NULL) { ! if (mime_fromqp((u_char *) buf, &fbufp, 0, ! &fbuf[MAXLINE] - fbufp) == 0) continue; ! putline((char *) fbuf, mci); ! fbufp = fbuf; } + } + + /* force out partial last line */ + if (fbufp > fbuf) + { + *fbufp = '\0'; + putline((char *) fbuf, mci); } if (tTd(43, 3)) printf("\t\t\tmime7to8 => %s to 8bit done\n", cte); diff -r -c sendmail-8.8.4/src/queue.c sendmail-8.8.5/src/queue.c *** sendmail-8.8.4/src/queue.c Mon Dec 2 08:01:27 1996 --- sendmail-8.8.5/src/queue.c Tue Jan 14 18:01:26 1997 *************** *** 36,44 **** #ifndef lint #if QUEUE ! static char sccsid[] = "@(#)queue.c 8.145 (Berkeley) 12/2/96 (with queueing)"; #else ! static char sccsid[] = "@(#)queue.c 8.145 (Berkeley) 12/2/96 (without queueing)"; #endif #endif /* not lint */ --- 36,44 ---- #ifndef lint #if QUEUE ! static char sccsid[] = "@(#)queue.c 8.153 (Berkeley) 1/14/97 (with queueing)"; #else ! static char sccsid[] = "@(#)queue.c 8.153 (Berkeley) 1/14/97 (without queueing)"; #endif #endif /* not lint */ *************** *** 68,77 **** #define QF_VERSION 2 /* version number of this queue format */ - #if !defined(NGROUPS_MAX) && defined(NGROUPS) - # define NGROUPS_MAX NGROUPS /* POSIX naming convention */ - #endif - extern int orderq __P((bool)); /* ** QUEUEUP -- queue a message up for future transmission. --- 68,73 ---- *************** *** 553,558 **** --- 549,555 ---- extern ENVELOPE BlankEnvelope; extern void clrdaemon __P((void)); extern void runqueueevent __P((bool)); + extern void drop_privileges __P((void)); /* ** If no work will ever be selected, don't even bother reading *************** *** 561,567 **** CurrentLA = getla(); /* get load average */ ! if (shouldqueue(0L, curtime())) { char *msg = "Skipping queue run -- load average too high"; --- 558,564 ---- CurrentLA = getla(); /* get load average */ ! if (CurrentLA >= QueueLA) { char *msg = "Skipping queue run -- load average too high"; *************** *** 583,591 **** if (forkflag) { pid_t pid; ! extern void intsig(); #ifdef SIGCHLD ! extern void reapchild(); blocksignal(SIGCHLD); (void) setsignal(SIGCHLD, reapchild); --- 580,588 ---- if (forkflag) { pid_t pid; ! extern SIGFUNC_DECL intsig __P((int)); #ifdef SIGCHLD ! extern SIGFUNC_DECL reapchild __P((int)); blocksignal(SIGCHLD); (void) setsignal(SIGCHLD, reapchild); *************** *** 633,639 **** (void) setsignal(SIGCHLD, SIG_DFL); #endif /* SIGCHLD */ (void) setsignal(SIGHUP, intsig); - Verbose = FALSE; } setproctitle("running queue: %s", QueueDir); --- 630,635 ---- *************** *** 657,668 **** /* drop privileges */ if (geteuid() == (uid_t) 0) ! { ! if (RunAsGid != (gid_t) 0) ! (void) setgid(RunAsGid); ! if (RunAsUid != (uid_t) 0) ! (void) setuid(RunAsUid); ! } /* ** Create ourselves an envelope --- 653,659 ---- /* drop privileges */ if (geteuid() == (uid_t) 0) ! drop_privileges(); /* ** Create ourselves an envelope *************** *** 672,677 **** --- 663,672 ---- e = newenvelope(&QueueEnvelope, CurEnv); e->e_flags = BlankEnvelope.e_flags; + /* make sure we have disconnected from parent */ + if (forkflag) + disconnect(1, e); + /* ** Make sure the alias database is open. */ *************** *** 1569,1580 **** { case 'V': /* queue file version number */ qfver = atoi(&bp[1]); ! if (qfver > QF_VERSION) ! { ! syserr("Version number in qf (%d) greater than max (%d)", ! qfver, QF_VERSION); ! } ! break; case 'C': /* specify controlling user */ ctladdr = setctluser(&bp[1], qfver); --- 1564,1576 ---- { case 'V': /* queue file version number */ qfver = atoi(&bp[1]); ! if (qfver <= QF_VERSION) ! break; ! syserr("Version number in qf (%d) greater than max (%d)", ! qfver, QF_VERSION); ! fclose(qfp); ! loseqfile(e, "unsupported qf file version"); ! return FALSE; case 'C': /* specify controlling user */ ctladdr = setctluser(&bp[1], qfver); *************** *** 1645,1651 **** break; case 'S': /* sender */ ! setsender(newstr(&bp[1]), e, NULL, TRUE); break; case 'B': /* body type */ --- 1641,1647 ---- break; case 'S': /* sender */ ! setsender(newstr(&bp[1]), e, NULL, '\0', TRUE); break; case 'B': /* body type */ diff -r -c sendmail-8.8.4/src/readcf.c sendmail-8.8.5/src/readcf.c *** sendmail-8.8.4/src/readcf.c Sun Dec 1 10:47:03 1996 --- sendmail-8.8.5/src/readcf.c Tue Jan 14 17:51:49 1997 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)readcf.c 8.181 (Berkeley) 12/1/96"; #endif /* not lint */ # include "sendmail.h" --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)readcf.c 8.184 (Berkeley) 1/14/97"; #endif /* not lint */ # include "sendmail.h" *************** *** 1482,1487 **** --- 1482,1495 ---- { "SingleThreadDelivery", O_SINGTHREAD, FALSE }, #define O_RUNASUSER 0x9d { "RunAsUser", O_RUNASUSER, FALSE }, + #ifdef _FFR_DSN_RRT + #define O_DSN_RRT 0x9e + { "RrtImpliesDsn", O_DSN_RRT, FALSE }, + #endif + #ifdef _FFR_PIDFILE_OPT + #define O_PIDFILE 0x9f + { "PidFile", O_PIDFILE, FALSE }, + #endif { NULL, '\0', FALSE } }; *************** *** 2263,2268 **** --- 2271,2289 ---- RunAsGid = gr->gr_gid; } break; + + #ifdef _FFR_DSN_RRT + case O_DSN_RRT: + RrtImpliesDsn = atobool(p); + break; + #endif + + #ifdef _FFR_PIDFILE_OPT + case O_PIDFILE: + free(PidFile); + PidFile = newstr(p); + break; + #endif default: if (tTd(37, 1)) diff -r -c sendmail-8.8.4/src/savemail.c sendmail-8.8.5/src/savemail.c *** sendmail-8.8.4/src/savemail.c Sun Nov 24 07:27:20 1996 --- sendmail-8.8.5/src/savemail.c Sat Jan 18 09:54:29 1997 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)savemail.c 8.101 (Berkeley) 11/24/96"; #endif /* not lint */ # include "sendmail.h" --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)savemail.c 8.103 (Berkeley) 1/18/97"; #endif /* not lint */ # include "sendmail.h" *************** *** 643,649 **** markstats(ee, NULLADDR); /* actually deliver the error message */ ! sendall(ee, SM_DEFAULT); /* restore state */ dropenvelope(ee, TRUE); --- 643,649 ---- markstats(ee, NULLADDR); /* actually deliver the error message */ ! sendall(ee, SM_DELIVER); /* restore state */ dropenvelope(ee, TRUE); *************** *** 1388,1394 **** ** XTEXTOK -- check if a string is legal xtext ** ** Xtext is used in Delivery Status Notifications. The spec was ! ** taken from draft-ietf-notary-mime-delivery-04.txt. ** ** Parameters: ** s -- the string to check. --- 1388,1395 ---- ** XTEXTOK -- check if a string is legal xtext ** ** Xtext is used in Delivery Status Notifications. The spec was ! ** taken from RFC 1891, ``SMTP Service Extension for Delivery ! ** Status Notifications''. ** ** Parameters: ** s -- the string to check. diff -r -c sendmail-8.8.4/src/sendmail.8 sendmail-8.8.5/src/sendmail.8 *** sendmail-8.8.4/src/sendmail.8 Fri Sep 20 09:55:00 1996 --- sendmail-8.8.5/src/sendmail.8 Thu Jan 16 15:26:10 1997 *************** *** 29,37 **** .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" ! .\" @(#)sendmail.8 8.10 (Berkeley) 9/20/96 .\" ! .Dd September 20, 1996 .Dt SENDMAIL 8 .Os BSD 4 .Sh NAME --- 29,37 ---- .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" ! .\" @(#)sendmail.8 8.11 (Berkeley) 1/16/97 .\" ! .Dd January 16, 1997 .Dt SENDMAIL 8 .Os BSD 4 .Sh NAME *************** *** 293,299 **** .Nm rmail . .It Fl V Ar envid Set the original envelope id. ! This is propogated across SMTP to servers that support DSNs and is returned in DSN-compliant error messages. .It Fl v Go into verbose mode. --- 293,299 ---- .Nm rmail . .It Fl V Ar envid Set the original envelope id. ! This is propagated across SMTP to servers that support DSNs and is returned in DSN-compliant error messages. .It Fl v Go into verbose mode. diff -r -c sendmail-8.8.4/src/sendmail.h sendmail-8.8.5/src/sendmail.h *** sendmail-8.8.4/src/sendmail.h Sun Dec 1 10:44:48 1996 --- sendmail-8.8.5/src/sendmail.h Tue Jan 14 17:51:49 1997 *************** *** 31,37 **** * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ! * @(#)sendmail.h 8.216 (Berkeley) 12/1/96 */ /* --- 31,37 ---- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ! * @(#)sendmail.h 8.219 (Berkeley) 1/14/97 */ /* *************** *** 41,47 **** # ifdef _DEFINE # define EXTERN # ifndef lint ! static char SmailSccsId[] = "@(#)sendmail.h 8.216 12/1/96"; # endif # else /* _DEFINE */ # define EXTERN extern --- 41,47 ---- # ifdef _DEFINE # define EXTERN # ifndef lint ! static char SmailSccsId[] = "@(#)sendmail.h 8.219 1/14/97"; # endif # else /* _DEFINE */ # define EXTERN extern *************** *** 1135,1141 **** EXTERN char SpaceSub; /* substitution for */ EXTERN int PrivacyFlags; /* privacy flags */ EXTERN char *ConfFile; /* location of configuration file [conf.c] */ ! extern char *PidFile; /* location of proc id file [conf.c] */ extern ADDRESS NullAddress; /* a null (template) address [main.c] */ EXTERN long WkClassFact; /* multiplier for message class -> priority */ EXTERN long WkRecipFact; /* multiplier for # of recipients -> priority */ --- 1135,1141 ---- EXTERN char SpaceSub; /* substitution for */ EXTERN int PrivacyFlags; /* privacy flags */ EXTERN char *ConfFile; /* location of configuration file [conf.c] */ ! EXTERN char *PidFile; /* location of proc id file [conf.c] */ extern ADDRESS NullAddress; /* a null (template) address [main.c] */ EXTERN long WkClassFact; /* multiplier for message class -> priority */ EXTERN long WkRecipFact; /* multiplier for # of recipients -> priority */ *************** *** 1165,1170 **** --- 1165,1173 ---- EXTERN bool UserSubmission; /* initial (user) mail submission */ EXTERN uid_t RunAsUid; /* UID to become for bulk of run */ EXTERN gid_t RunAsGid; /* GID to become for bulk of run */ + #ifdef _FFR_DSN_RRT + EXTERN bool RrtImpliesDsn; /* turn Return-Receipt-To: into DSN */ + #endif EXTERN bool IgnoreHostStatus; /* ignore long term host status files */ EXTERN bool SingleThreadDelivery; /* single thread hosts on delivery */ EXTERN bool UnsafeGroupWrites; /* group-writable files are unsafe */ *************** *** 1291,1297 **** extern void rebuildaliases __P((MAP *, bool)); extern void readaliases __P((MAP *, FILE *, bool, bool)); extern void finis __P(()); ! extern void setsender __P((char *, ENVELOPE *, char **, bool)); extern FILE *safefopen __P((char *, int, int, int)); extern void xputs __P((const char *)); extern void logsender __P((ENVELOPE *, char *)); --- 1294,1300 ---- extern void rebuildaliases __P((MAP *, bool)); extern void readaliases __P((MAP *, FILE *, bool, bool)); extern void finis __P(()); ! extern void setsender __P((char *, ENVELOPE *, char **, int, bool)); extern FILE *safefopen __P((char *, int, int, int)); extern void xputs __P((const char *)); extern void logsender __P((ENVELOPE *, char *)); diff -r -c sendmail-8.8.4/src/srvrsmtp.c sendmail-8.8.5/src/srvrsmtp.c *** sendmail-8.8.4/src/srvrsmtp.c Sun Dec 1 10:47:02 1996 --- sendmail-8.8.5/src/srvrsmtp.c Fri Jan 17 10:02:46 1997 *************** *** 36,44 **** #ifndef lint #if SMTP ! static char sccsid[] = "@(#)srvrsmtp.c 8.131 (Berkeley) 12/1/96 (with SMTP)"; #else ! static char sccsid[] = "@(#)srvrsmtp.c 8.131 (Berkeley) 12/1/96 (without SMTP)"; #endif #endif /* not lint */ --- 36,44 ---- #ifndef lint #if SMTP ! static char sccsid[] = "@(#)srvrsmtp.c 8.136 (Berkeley) 1/17/97 (with SMTP)"; #else ! static char sccsid[] = "@(#)srvrsmtp.c 8.136 (Berkeley) 1/17/97 (without SMTP)"; #endif #endif /* not lint */ *************** *** 121,127 **** static char *skipword(); ! #define MAXBADCOMMANDS 25 /* maximum number of bad commands */ void smtp(nullserver, e) --- 121,131 ---- static char *skipword(); ! #define MAXBADCOMMANDS 25 /* maximum number of bad commands */ ! #define MAXNOOPCOMMANDS 20 /* max "noise" commands before slowdown */ ! #define MAXHELOCOMMANDS 3 /* max HELO/EHLO commands before slowdown */ ! #define MAXVRFYCOMMANDS 6 /* max VRFY/EXPN commands before slowdown */ ! #define MAXETRNCOMMANDS 8 /* max ETRN commands before slowdown */ void smtp(nullserver, e) *************** *** 146,151 **** --- 150,157 ---- volatile int badcommands = 0; /* count of bad commands */ volatile int nverifies = 0; /* count of VRFY/EXPN commands */ volatile int n_etrn = 0; /* count of ETRN commands */ + volatile int n_noop = 0; /* count of NOOP/VERB/ONEX etc cmds */ + volatile int n_helo = 0; /* count of HELO/EHLO commands */ bool ok; char inp[MAXLINE]; char cmdbuf[MAXLINE]; *************** *** 154,159 **** --- 160,166 ---- extern void settime __P((ENVELOPE *)); extern bool enoughdiskspace __P((long)); extern int runinchild __P((char *, ENVELOPE *)); + extern void checksmtpattack __P((volatile int *, int, char *)); if (fileno(OutChannel) != fileno(stdout)) { *************** *** 303,312 **** ** to everything. */ ! if (nullserver && c->cmdcode != CMDQUIT) { ! message("550 Access denied"); ! continue; } /* non-null server */ --- 310,332 ---- ** to everything. */ ! if (nullserver) { ! switch (c->cmdcode) ! { ! case CMDQUIT: ! case CMDHELO: ! case CMDEHLO: ! case CMDNOOP: ! /* process normally */ ! break; ! ! default: ! if (++badcommands > MAXBADCOMMANDS) ! sleep(1); ! message("550 Access denied"); ! continue; ! } } /* non-null server */ *************** *** 325,330 **** --- 345,361 ---- SmtpPhase = "server HELO"; } + /* avoid denial-of-service */ + checksmtpattack(&n_helo, MAXHELOCOMMANDS, "HELO/EHLO"); + + /* check for duplicate HELO/EHLO per RFC 1651 4.2 */ + if (gothello) + { + message("503 %s Duplicate HELO/EHLO", + MyHostName); + break; + } + /* check for valid domain name (re 1123 5.2.5) */ if (*p == '\0' && !AllowBogusHELO) { *************** *** 355,374 **** if (!AllowBogusHELO) message("501 Invalid domain name"); else message("250 %s Invalid domain name, accepting anyway", MyHostName); break; } } - /* check for duplicate HELO/EHLO per RFC 1651 4.2 */ - if (gothello) - { - message("503 %s Duplicate HELO/EHLO", - MyHostName); - break; - } - sendinghost = newstr(p); gothello = TRUE; if (c->cmdcode != CMDEHLO) --- 386,400 ---- if (!AllowBogusHELO) message("501 Invalid domain name"); else + { message("250 %s Invalid domain name, accepting anyway", MyHostName); + gothello = TRUE; + } break; } } sendinghost = newstr(p); gothello = TRUE; if (c->cmdcode != CMDEHLO) *************** *** 484,490 **** /* must parse sender first */ delimptr = NULL; ! setsender(p, e, &delimptr, FALSE); if (delimptr != NULL && *delimptr != '\0') *delimptr++ = '\0'; --- 510,516 ---- /* must parse sender first */ delimptr = NULL; ! setsender(p, e, &delimptr, ' ', FALSE); if (delimptr != NULL && *delimptr != '\0') *delimptr++ = '\0'; *************** *** 775,792 **** case CMDVRFY: /* vrfy -- verify address */ case CMDEXPN: /* expn -- expand address */ ! if (++nverifies >= MAXBADCOMMANDS) ! { ! #ifdef LOG ! if (nverifies == MAXBADCOMMANDS && ! LogLevel > 5) ! { ! syslog(LOG_INFO, "%.100s: VRFY attack?", ! CurSmtpClient); ! } ! #endif ! sleep(1); ! } vrfy = c->cmdcode == CMDVRFY; if (bitset(vrfy ? PRIV_NOVRFY : PRIV_NOEXPN, PrivacyFlags)) --- 801,808 ---- case CMDVRFY: /* vrfy -- verify address */ case CMDEXPN: /* expn -- expand address */ ! checksmtpattack(&nverifies, MAXVRFYCOMMANDS, ! c->cmdcode == CMDVRFY ? "VRFY" : "EXPN"); vrfy = c->cmdcode == CMDVRFY; if (bitset(vrfy ? PRIV_NOVRFY : PRIV_NOEXPN, PrivacyFlags)) *************** *** 867,874 **** } /* crude way to avoid denial-of-service attacks */ ! if (n_etrn++ >= 3) ! sleep(3); id = p; if (*id == '@') id++; --- 883,890 ---- } /* crude way to avoid denial-of-service attacks */ ! checksmtpattack(&n_etrn, MAXETRNCOMMANDS, "ETRN"); ! id = p; if (*id == '@') id++; *************** *** 892,897 **** --- 908,914 ---- break; case CMDNOOP: /* noop -- do nothing */ + checksmtpattack(&n_noop, MAXNOOPCOMMANDS, "NOOP"); message("250 OK"); break; *************** *** 916,932 **** --- 933,952 ---- message("502 Verbose unavailable"); break; } + checksmtpattack(&n_noop, MAXNOOPCOMMANDS, "VERB"); Verbose = TRUE; e->e_sendmode = SM_DELIVER; message("250 Verbose mode"); break; case CMDONEX: /* doing one transaction only */ + checksmtpattack(&n_noop, MAXNOOPCOMMANDS, "ONEX"); OneXact = TRUE; message("250 Only one transaction"); break; case CMDXUSR: /* initial (user) submission */ + checksmtpattack(&n_noop, MAXNOOPCOMMANDS, "XUSR"); UserSubmission = TRUE; message("250 Initial submission"); break; *************** *** 973,978 **** --- 993,1032 ---- syserr("500 smtp: unknown code %d", c->cmdcode); break; } + } + } + /* + ** CHECKSMTPATTACK -- check for denial-of-service attack by repetition + ** + ** Parameters: + ** pcounter -- pointer to a counter for this command. + ** maxcount -- maximum value for this counter before we + ** slow down. + ** cname -- command name for logging. + ** + ** Returns: + ** none. + ** + ** Side Effects: + ** Slows down if we seem to be under attack. + */ + + void + checksmtpattack(pcounter, maxcount, cname) + volatile int *pcounter; + int maxcount; + char *cname; + { + if (++(*pcounter) >= maxcount) + { + #ifdef LOG + if (*pcounter == maxcount && LogLevel > 5) + { + syslog(LOG_INFO, "%.100s: %.40s attack?", + CurSmtpClient, cname); + } + #endif + sleep(*pcounter / maxcount); } } /* diff -r -c sendmail-8.8.4/src/udb.c sendmail-8.8.5/src/udb.c *** sendmail-8.8.4/src/udb.c Sun Dec 1 10:24:49 1996 --- sendmail-8.8.5/src/udb.c Fri Dec 6 06:56:42 1996 *************** *** 36,44 **** #ifndef lint #if USERDB ! static char sccsid [] = "@(#)udb.c 8.46 (Berkeley) 12/1/96 (with USERDB)"; #else ! static char sccsid [] = "@(#)udb.c 8.46 (Berkeley) 12/1/96 (without USERDB)"; #endif #endif --- 36,44 ---- #ifndef lint #if USERDB ! static char sccsid [] = "@(#)udb.c 8.47 (Berkeley) 12/6/96 (with USERDB)"; #else ! static char sccsid [] = "@(#)udb.c 8.47 (Berkeley) 12/6/96 (without USERDB)"; #endif #endif *************** *** 275,281 **** userleft--; } bcopy(info.data, p, info.size); ! user[info.size] = '\0'; userleft -= info.size; /* get the next record */ --- 275,281 ---- userleft--; } bcopy(info.data, p, info.size); ! p[info.size] = '\0'; userleft -= info.size; /* get the next record */ diff -r -c sendmail-8.8.4/src/usersmtp.c sendmail-8.8.5/src/usersmtp.c *** sendmail-8.8.4/src/usersmtp.c Sun Dec 1 10:47:01 1996 --- sendmail-8.8.5/src/usersmtp.c Sat Jan 18 09:55:16 1997 *************** *** 36,44 **** #ifndef lint #if SMTP ! static char sccsid[] = "@(#)usersmtp.c 8.79 (Berkeley) 12/1/96 (with SMTP)"; #else ! static char sccsid[] = "@(#)usersmtp.c 8.79 (Berkeley) 12/1/96 (without SMTP)"; #endif #endif /* not lint */ --- 36,44 ---- #ifndef lint #if SMTP ! static char sccsid[] = "@(#)usersmtp.c 8.80 (Berkeley) 1/18/97 (with SMTP)"; #else ! static char sccsid[] = "@(#)usersmtp.c 8.80 (Berkeley) 1/18/97 (without SMTP)"; #endif #endif /* not lint */ *************** *** 493,498 **** --- 493,504 ---- smtpquit(m, mci, e); return EX_TEMPFAIL; } + else if (r == 452 && bitset(MCIF_SIZE, mci->mci_flags) && + e->e_msgsize > 0) + { + mci_setstat(mci, EX_NOTSTICKY, smtptodsn(r), SmtpReplyBuffer); + return EX_TEMPFAIL; + } else if (REPLYTYPE(r) == 4) { mci_setstat(mci, EX_TEMPFAIL, smtptodsn(r), SmtpReplyBuffer); *************** *** 684,689 **** --- 690,696 ---- register int r; register EVENT *ev; int rstat; + int xstat; time_t timeout; /* *************** *** 790,806 **** return EX_TEMPFAIL; } mci->mci_state = MCIS_OPEN; ! if (REPLYTYPE(r) == 4) rstat = EX_TEMPFAIL; else if (REPLYCLASS(r) != 5) ! rstat = EX_PROTOCOL; else if (REPLYTYPE(r) == 2) ! rstat = EX_OK; else if (REPLYTYPE(r) == 5) ! rstat = EX_UNAVAILABLE; else rstat = EX_PROTOCOL; ! mci_setstat(mci, rstat, smtptodsn(r), SmtpReplyBuffer); if (e->e_statmsg != NULL) free(e->e_statmsg); e->e_statmsg = newstr(&SmtpReplyBuffer[4]); --- 797,818 ---- return EX_TEMPFAIL; } mci->mci_state = MCIS_OPEN; ! xstat = EX_NOTSTICKY; ! if (r == 452) rstat = EX_TEMPFAIL; + else if (r == 552) + rstat = EX_UNAVAILABLE; + else if (REPLYTYPE(r) == 4) + rstat = xstat = EX_TEMPFAIL; else if (REPLYCLASS(r) != 5) ! rstat = xstat = EX_PROTOCOL; else if (REPLYTYPE(r) == 2) ! rstat = xstat = EX_OK; else if (REPLYTYPE(r) == 5) ! rstat = xstat = EX_UNAVAILABLE; else rstat = EX_PROTOCOL; ! mci_setstat(mci, xstat, smtptodsn(r), SmtpReplyBuffer); if (e->e_statmsg != NULL) free(e->e_statmsg); e->e_statmsg = newstr(&SmtpReplyBuffer[4]); diff -r -c sendmail-8.8.4/src/util.c sendmail-8.8.5/src/util.c *** sendmail-8.8.4/src/util.c Sun Dec 1 09:56:29 1996 --- sendmail-8.8.5/src/util.c Sun Jan 5 08:46:04 1997 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)util.c 8.113 (Berkeley) 11/24/96"; #endif /* not lint */ # include "sendmail.h" --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)util.c 8.115 (Berkeley) 1/5/97"; #endif /* not lint */ # include "sendmail.h" *************** *** 313,319 **** { if (bitset(0200, *s)) printf("{%s}", macname(*s++ & 0377)); ! else printf("%c", *s++); } if (mp->metaname != '\0') --- 313,319 ---- { if (bitset(0200, *s)) printf("{%s}", macname(*s++ & 0377)); ! else if (*s != '\0') printf("%c", *s++); } if (mp->metaname != '\0') *************** *** 670,676 **** return EPERM; } ! if (uid == 0 && !bitset(SFF_ROOTOK, flags)) mode >>= 6; else if (st->st_uid != uid) { --- 670,678 ---- return EPERM; } ! if (uid == 0 && bitset(SFF_OPENASROOT, flags)) ! ; ! else if (uid == 0 && !bitset(SFF_ROOTOK, flags)) mode >>= 6; else if (st->st_uid != uid) { diff -r -c sendmail-8.8.4/src/version.c sendmail-8.8.5/src/version.c *** sendmail-8.8.4/src/version.c Mon Dec 2 08:05:30 1996 --- sendmail-8.8.5/src/version.c Tue Jan 21 07:48:10 1997 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)version.c 8.8.4.4 (Berkeley) 12/2/96"; #endif /* not lint */ ! char Version[] = "8.8.4"; --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)version.c 8.8.5.3 (Berkeley) 1/21/97"; #endif /* not lint */ ! char Version[] = "8.8.5";