summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sendmail/RELEASE_NOTES141
-rw-r--r--usr.sbin/sendmail/cf/README10
-rw-r--r--usr.sbin/sendmail/cf/m4/version.m44
-rw-r--r--usr.sbin/sendmail/cf/ostype/sinix.m415
-rwxr-xr-xusr.sbin/sendmail/contrib/expn.pl52
-rw-r--r--usr.sbin/sendmail/doc/op/op.me8
-rw-r--r--usr.sbin/sendmail/src/READ_ME49
-rw-r--r--usr.sbin/sendmail/src/err.c6
-rw-r--r--usr.sbin/sendmail/src/map.c156
-rw-r--r--usr.sbin/sendmail/src/queue.c13
-rw-r--r--usr.sbin/sendmail/src/version.c4
-rw-r--r--usr.sbin/sendmail/test/t_exclopen.c2
12 files changed, 329 insertions, 131 deletions
diff --git a/usr.sbin/sendmail/RELEASE_NOTES b/usr.sbin/sendmail/RELEASE_NOTES
index 9f4f3ab..b3e1a8b 100644
--- a/usr.sbin/sendmail/RELEASE_NOTES
+++ b/usr.sbin/sendmail/RELEASE_NOTES
@@ -1,11 +1,150 @@
SENDMAIL RELEASE NOTES
- @(#)RELEASE_NOTES 8.8.7.7 (Berkeley) 8/3/97
+ @(#)RELEASE_NOTES 8.8.8.4 (Berkeley) 10/24/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.8/8.8.8 97/10/24
+ If the check_relay ruleset failed, the relay= field was logged
+ incorrectly. Problem noted by Kari Hurtta of the Finnish
+ Meteorological Institute.
+ If /usr/tmp/dead.letter already existed, sendmail could not
+ add additional bounces to it. Problem noted by Thomas J.
+ Arseneault of SRI International.
+ If an SMTP mailer used a non-standard port number for the outgoing
+ connection, it would be displayed incorrectly in verbose mode.
+ Problem noted by John Kennedy of Cal State University, Chico.
+ Log the ETRN parameter specified by the client before altering them
+ to internal form. Suggested by Bob Kupiec of GES-Verio.
+ EXPN and VRFY SMTP commands on malformed addresses were logging as
+ User unknown with bogus delay= values. Change them to log
+ the same as compliant addresses. Problem noted by Kari E.
+ Hurtta of the Finnish Meteorological Institute.
+ Ignore the debug resolver option unless using sendmail debug trace
+ option for resolver. Problem noted by Greg Nichols of Wind
+ River Systems.
+ If SingleThreadDelivery was enabled and the remote server returned a
+ protocol error on the DATA command, the connection would be
+ closed but the persistent host status file would not be
+ unlocked so other sendmail processes could not deliver to
+ that host. Problem noted by Peter Wemm of DIALix.
+ If queueing up a message due to an expensive mailer, don't increment
+ the number of delivery attempts or set the last delivery
+ attempt time so the message will be delivered on the next
+ queue run regardless of MinQueueAge. Problem noted by
+ Brian J. Coan of the Institute for Global Communications.
+ Authentication warnings of "Processed from queue _directory_" and
+ "Processed by _username_ with -C _filename_" would be logged
+ with the incorrect timestamp. Problem noted by Kari E. Hurtta
+ of the Finnish Meteorological Institute.
+ Use a better heuristic for detecting GDBM.
+ Log null connections on dropped connections. Problem noted by
+ Jon Lewis of Florida Digital Turnpike.
+ If class dbm maps are rebuilt, sendmail will now detect this and
+ reopen the map. Previously, they could give stale
+ results during a single message processing (but would
+ recover when the next message was received). Fix from
+ Joe Pruett of Q7 Enterprises.
+ Do not log failures such as "User unknown" on -bv or SMTP VRFY
+ requests. Problem noted by Kari E. Hurtta of the
+ Finnish Meteorological Institute.
+ Do not send a bounce message back to the sender regarding bad
+ recipients if the SMTP connection is dropped before the
+ message is accepted. Problem noted by Kari E. Hurtta of the
+ Finnish Meteorological Institute.
+ Use "localhost" instead of "[UNIX: localhost]" when connecting to
+ sendmail via a UNIX pipe. This will allow rulesets using
+ $&{client_name} to process without sending the string through
+ dequote. Problem noted by Alan Barrett of Internet Africa.
+ A combination of deferred delivery mode, a double bounce situation,
+ and the inability to save a bounce message to
+ /var/tmp/dead.letter would cause sendmail to send a bounce
+ to postmaster but not remove the offending envelope from the
+ queue causing it to create a new bounce message each time the
+ queue was run. Problem noted by Brad Doctor of Net Daemons
+ Associates.
+ Remove newlines from hostname information returned via DNS. There are
+ no known security implications of newlines in hostnames as
+ sendmail filters newlines in all vital areas; however, this
+ could cause confusing error messages.
+ Starting with sendmail 8.8.6, mail sent with the '-t' option would be
+ rejected if any of the specified addresses were bad. This
+ behavior was modified to only reject the bad addresses and not
+ the entire message. Problem noted by Jozsef Hollosi of
+ SuperNet, Inc.
+ Use Timeout.fileopen when delivering mail to a file. Suggested by
+ Bryan Costales of InfoBeat, Inc.
+ Display the proper Final-Recipient on DSN messages for non-SMTP
+ mailers. Problem noted by Kari E. Hurtta of the
+ Finnish Meteorological Institute.
+ An error in calculating the available space in the list of addresses
+ for logging deliveries could cause an address to be silently
+ dropped.
+ Include the initial user environment if sendmail is restarted via
+ a HUP signal. This will give room for the process title.
+ Problem noted by Jon Lewis of Florida Digital Turnpike.
+ Mail could be delivered without a body if the machine does not
+ support flock locking and runs out of processes during
+ delivery. Fix from Chuck Lever of the University of Michigan.
+ Drop recipient address from 251 and 551 SMTP responses per RFC 821.
+ Problem noted by Kari E. Hurtta of the Finnish Meteorological
+ Institute.
+ Make sure non-rebuildable database maps are opened before the
+ rebuildable maps (i.e. alias files) in case the database maps
+ are needed for verifying the left hand side of the aliases.
+ Problem noted by Lloyd Parkes of Victoria University.
+ Make sure sender RFC822 source route addresses are alias expanded for
+ bounce messages. Problem noted by Juergen Georgi of
+ RUS University of Stuttgart.
+ Minor lint fixes.
+ Return a temporary error instead of a permanent error if an LDAP map
+ search returns an error. This will allow sequenced maps which
+ use other LDAP servers to be checked. Fix from Booker Bense
+ of Stanford University.
+ When automatically converting from quoted printable to 8bit text do
+ not pad bare linefeeds with a space. Problem noted by Theo
+ Nolte of the University of Technology Aachen, Germany.
+ Portability:
+ Non-standard C compilers may have had a problem compiling
+ conf.c due to a standard C external declaration of
+ setproctitle(). Problem noted by Ted Roberts of
+ Electronic Data Systems.
+ AUX: has a broken O_EXCL implementation. Reported by Jim
+ Jagielski of jaguNET Access Services.
+ BSD/OS: didn't compile if HASSETUSERCONTEXT was defined.
+ Digital UNIX: Digital UNIX (and possibly others) moves
+ loader environment variables into the loader memory
+ area. If one of these environment variables (such as
+ LD_LIBRARY_PATH) was the last environment variable,
+ an invalid memory address would be used by the process
+ title routine causing memory corruption. Problem
+ noted by Sam Hartman of Mesa Internet Systems.
+ GNU libc: uses an enum for _PC_CHOWN_RESTRICTED which caused
+ chownsafe() to always return 0 even if the OS does
+ not permit file giveaways. Problem noted by
+ Yasutaka Sumi of The University of Tokyo.
+ IRIX6: Syslog buffer size set to 512 bytes. Reported by
+ Gerald Rinske of Siemens Business Services VAS.
+ Linux: Pad process title with NULLs. Problem noted by
+ Jon Lewis of Florida Digital Turnpike.
+ SCO OpenServer 5.0: SIOCGIFCONF ioctl call returns an
+ incorrect value for the number of interfaces.
+ Problem noted by Chris Loelke of JetStream Internet
+ Services.
+ SINIX: Update for Makefile and syslog buffer size from Gerald
+ Rinske of Siemens Business Services VAS.
+ Solaris: Make sure HASGETUSERSHELL setting for SunOS is not
+ used on a Solaris machine. Problem noted by
+ Stephen Ma of Jtec Pty Limited.
+ CONFIG: SINIX: Update from Gerald Rinske of Siemens Business
+ Services VAS.
+ MAKEMAP: Use a better heuristic for detecting GDBM.
+ CONTRIB: expn.pl: Updated version from the author, David Muir Sharnoff.
+ OP.ME: Document the F=i mailer flag. Problem noted by Per Hedeland of
+ Ericsson.
+
8.8.7/8.8.7 97/08/03
If using Berkeley DB on systems without O_EXLOCK (open a file with
an exclusive lock already set -- i.e., almost all systems
diff --git a/usr.sbin/sendmail/cf/README b/usr.sbin/sendmail/cf/README
index af8cdb1..184a353 100644
--- a/usr.sbin/sendmail/cf/README
+++ b/usr.sbin/sendmail/cf/README
@@ -4,7 +4,7 @@
Eric Allman <eric@CS.Berkeley.EDU>
- @(#)README 8.122 (Berkeley) 7/6/97
+ @(#)README 8.124 (Berkeley) 9/23/97
This document describes the sendmail configuration files being used
@@ -657,7 +657,7 @@ genericstable This feature will cause certain addresses originating in the
The key for this table is either the full address or the
unqualified username (the former is tried first); the
value is the new user address. If the new user address does
- not include a domain, $j is used. Note that the address must
+ not include a domain, $j is used. Note that the address
being looked up must be fully qualified. For local mail, it
is necessary to use FEATURE(always_add_domain) for the
addresses to be qualified.
@@ -1335,10 +1335,10 @@ confCF_VERSION $Z macro If defined, this is appended to the
confFROM_HEADER From: [$?x$x <$g>$|$g$.] The format of an
internally generated From: address.
confRECEIVED_HEADER Received:
- [$?sfrom $s .$?_($?s$|from $.$_)
+ [$?sfrom $s $.$?_($?s$|from $.$_)
$.by $j ($v/$Z)$?r with $r$. id $i$?u
- for $u$.;
- $b]
+ for $u; $|;
+ $.$b]
The format of the Received: header
in messages passed through this host.
It is unwise to try to change this.
diff --git a/usr.sbin/sendmail/cf/m4/version.m4 b/usr.sbin/sendmail/cf/m4/version.m4
index 0e03173..a2cbdc9 100644
--- a/usr.sbin/sendmail/cf/m4/version.m4
+++ b/usr.sbin/sendmail/cf/m4/version.m4
@@ -32,8 +32,8 @@ divert(-1)
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-VERSIONID(`@(#)version.m4 8.8.7.1 (Berkeley) 8/1/97')
+VERSIONID(`@(#)version.m4 8.8.8.1 (Berkeley) 10/24/97')
#
divert(0)
# Configuration version number
-DZ8.8.7`'ifdef(`confCF_VERSION', `/confCF_VERSION')
+DZ8.8.8`'ifdef(`confCF_VERSION', `/confCF_VERSION')
diff --git a/usr.sbin/sendmail/cf/ostype/sinix.m4 b/usr.sbin/sendmail/cf/ostype/sinix.m4
index 7b50e9e..278d4c8 100644
--- a/usr.sbin/sendmail/cf/ostype/sinix.m4
+++ b/usr.sbin/sendmail/cf/ostype/sinix.m4
@@ -34,12 +34,9 @@ divert(-1)
#
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
+VERSIONID(`@(#)sinix.m4 8.2 (Berkeley) 9/13/97')
+ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /var/spool/mqueue)')dnl
+define(`ALIAS_FILE', /etc/aliases)dnl
+define(`LOCAL_MAILER_PATH', `/bin/mail.local')dnl
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', /var/sendmail.st)')dnl
+ifdef(`HELP_FILE',, `define(`HELP_FILE', /etc/sendmail.hf)')dnl
diff --git a/usr.sbin/sendmail/contrib/expn.pl b/usr.sbin/sendmail/contrib/expn.pl
index 270f483..57f8515 100755
--- a/usr.sbin/sendmail/contrib/expn.pl
+++ b/usr.sbin/sendmail/contrib/expn.pl
@@ -6,19 +6,19 @@
# THIS PROGRAM IS ITS OWN MANUAL PAGE. INSTALL IN man & bin.
#
-# hardcoded constants, should work fine for BSD-based systems
-require 'sys/socket.ph';
-$sockaddr = 'S n a4 x8';
+use 5.001;
+use IO::Socket;
# system requirements:
# must have 'nslookup' and 'hostname' programs.
-# $Header: /home/muir/bin/RCS/expn,v 3.9 1995/10/02 17:51:35 muir Exp muir $
+# $Header: /home/muir/bin/RCS/expn,v 3.11 1997/09/10 08:14:02 muir Exp muir $
# TODO:
# less magic should apply to command-line addresses
# less magic should apply to local addresses
# add magic to deal with cross-domain cnames
+# disconnect & reconnect after 25 commands to the same sendmail 8.8.* host
# Checklist: (hard addresses)
# 250 Kimmo Suominen <"|/usr/local/mh/lib/slocal -user kim"@grendel.tac.nyc.ny.us>
@@ -96,7 +96,7 @@ $sockaddr = 'S n a4 x8';
# $debug : -d
# $valid : -a
# $levels : -1
-# S : the socket connection to $server
+# $S : the socket connection to $server
$have_nslookup = 1; # we have the nslookup program
$port = 'smtp';
@@ -143,12 +143,6 @@ if ($valid) {
}
}
-$0 = "$av0 - building local socket";
-($name,$aliases,$proto) = getprotobyname('tcp');
-($name,$aliases,$port) = getservbyname($port,'tcp')
- unless $port =~ /^\d+/;
-$this = pack($sockaddr, &AF_INET, 0, $thisaddr);
-
HOST:
while (@hosts) {
$server = shift(@hosts);
@@ -177,15 +171,13 @@ while (@hosts) {
# get a connection, or look for an mx
$0 = "$av0 - socket to $server";
- $that = pack($sockaddr, &AF_INET, $port, $thataddr);
- socket(S, &AF_INET, &SOCK_STREAM, $proto)
- || die "socket: $!";
- $0 = "$av0 - bind to $server";
- bind(S, $this)
- || die "bind $hostname,0: $!";
- $0 = "$av0 - connect to $server";
- print "debug = $debug server = $server\n" if $debug > 8;
- if (! connect(S, $that) || ($debug == 10 && $server =~ /relay\d.UU.NET$/i)) {
+
+ $S = new IO::Socket::INET (
+ 'PeerAddr' => $server,
+ 'PeerPort' => $port,
+ 'Proto' => 'tcp');
+
+ if (! $S || ($debug == 10 && $server =~ /relay\d.UU.NET$/i)) {
$0 = "$av0 - $server: could not connect: $!\n";
$emsg = $!;
unless (&mxlookup(0,$server,"$server: could not connect: $!",*users)) {
@@ -193,12 +185,12 @@ while (@hosts) {
}
next HOST;
}
- select((select(S),$| = 1)[0]); # don't buffer output to S
+ $S->autoflush(1);
# read the greeting
$0 = "$av0 - talking to $server";
&alarm("greeting with $server",'');
- while(<S>) {
+ while(<$S>) {
alarm(0);
print if $watch;
if (/^(\d+)([- ])/) {
@@ -210,7 +202,7 @@ while (@hosts) {
print STDERR "$server: NOT 220 greeting: $_"
if ($debug || $vw);
if (&mxlookup(0,$server,"$server: did not respond with a 220 greeting",*users)) {
- close(S);
+ close($S);
next HOST;
}
}
@@ -222,7 +214,7 @@ while (@hosts) {
unless (&mxlookup(0,$server,"$server: did not respond with SMTP codes",*users)) {
&giveup('',"$server: did not talk SMTP");
}
- close(S);
+ close($S);
next HOST;
}
&alarm("greeting with $server",'');
@@ -233,7 +225,7 @@ while (@hosts) {
$0 = "$av0 - sending helo to $server";
&alarm("sending helo to $server","");
&ps("helo $hostname");
- while(<S>) {
+ while(<$S>) {
print if $watch;
last if /^\d+ /;
}
@@ -395,11 +387,11 @@ while (@hosts) {
&alarm("sending 'quit' to $server",'');
$0 = "$av0 - sending 'quit' to $server";
&ps("quit");
- while(<S>) {
+ while(<$S>) {
print if $watch;
last if /^\d+ /;
}
- close(S);
+ close($S);
alarm(0);
}
@@ -604,7 +596,7 @@ sub expn_vrfy
&alarm("${c}'ing $try_u on $server",'',$u);
&ps("$c $try_u");
alarm(0);
- $s = <S>;
+ $s = <$S>;
if ($s eq '') {
return "$server: lost connection";
}
@@ -905,7 +897,7 @@ sub ps
{
local($p) = @_;
print ">>> $p\n" if $watch;
- print S "$p\n";
+ print $S "$p\n";
}
# return case-adjusted name for a host (for comparison purposes)
sub trhost
@@ -1207,7 +1199,7 @@ sub read_response
local($done,$watch) = @_;
local(@resp);
print $s if $watch;
- while(($done eq "-") && ($s = <S>) && ($s =~ /^\d+([- ])/)) {
+ while(($done eq "-") && ($s = <$S>) && ($s =~ /^\d+([- ])/)) {
print $s if $watch;
$done = $1;
push(@resp,$s);
diff --git a/usr.sbin/sendmail/doc/op/op.me b/usr.sbin/sendmail/doc/op/op.me
index fc8ca3a..60bc113 100644
--- a/usr.sbin/sendmail/doc/op/op.me
+++ b/usr.sbin/sendmail/doc/op/op.me
@@ -30,7 +30,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)op.me 8.105 (Berkeley) 7/3/97
+.\" @(#)op.me 8.106 (Berkeley) 10/20/97
.\"
.\" eqn op.me | pic | troff -me
.eh 'SMM:08-%''Sendmail Installation and Operation Guide'
@@ -67,7 +67,7 @@
Eric Allman
eric@Sendmail.ORG
.sp
-Version 8.105
+Version 8.106
.sp
For Sendmail Version 8.8
.)l
@@ -4128,6 +4128,8 @@ macro).
.ip h
Upper case should be preserved in host names
for this mailer.
+.ip i
+Do User Database rewriting on envelope sender address.
.ip I
This mailer will be speaking SMTP
to another
@@ -8185,7 +8187,7 @@ replace it with a blank sheet for double-sided output.
.\".sz 10
.\"Eric Allman
.\".sp
-.\"Version 8.105
+.\"Version 8.106
.\".ce 0
.bp 3
.ce
diff --git a/usr.sbin/sendmail/src/READ_ME b/usr.sbin/sendmail/src/READ_ME
index 154916a..7eea267 100644
--- a/usr.sbin/sendmail/src/READ_ME
+++ b/usr.sbin/sendmail/src/READ_ME
@@ -30,7 +30,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# @(#)READ_ME 8.148 (Berkeley) 8/1/97
+# @(#)READ_ME 8.156 (Berkeley) 10/23/97
#
This directory contains the source files for sendmail.
@@ -148,9 +148,10 @@ The options are:
NEWDB The new Berkeley DB package. Some systems (e.g., BSD/OS and
Digital UNIX 4.0) have this package pre-installed. If your
- system does not have NEWDB installed, get the latest version
+ system does not have NEWDB installed, get version 1.85
from http://www.sleepycat.com/packages/db.1.85.tar.gz.
- DO NOT use the version from the Net2 distribution. If you are
+ DO NOT use Berkeley DB version 2.X with sendmail. DO NOT
+ use the version from the Net2 distribution. If you are
still running BSD/386 1.x, you will also need to define
OLD_NEWDB.
NDBM The older NDBM implementation -- the very old V7 DBM
@@ -731,7 +732,13 @@ SunOS 4.1.3, 4.1.3_U1
101790-01 (SunOS 4.1.3_U1: TCP socket and reset problems).
Solaris 2.x (SunOS 5.x)
- To compile for Solaris, be sure you use -DSOLARIS.
+ To compile for Solaris, the Makefile chosen by makesendmail must
+ include a SOLARIS definition which reflects the Solaris version
+ (i.e. -DSOLARIS=20400 for 2.4 or -DSOLARIS=20501 for 2.5.1).
+ If you are using gcc, make sure -I/usr/include is not used (or
+ it might complain about TopFrame). If you are using Sun's cc,
+ make sure /opt/SUNWspro/bin/cc is used instead of /usr/ucb/cc
+ (or it might complain about tm_zone).
To the best of my knowledge, Solaris does not have the
gethostbyname problem described above. However, it does
@@ -828,22 +835,25 @@ Solaris 2.6 (SunOS 5.6)
incompatible snprintf(3s) calls. This problem is fixed in sendmail
8.8.5.
-Solaris 2.5.1 (SunOS 5.5.1)
- Apparently patch 103663-01 installs a new /usr/include/resolv.h
- file that defines the __P macro without checking to see if it is
- already defined. This causes compile warnings such as:
+Solaris 2.5.1 (SunOS 5.5.1) and 2.6 (SunOS 5.6)
+ Apparently Solaris 2.5.1 patch 103663-01 installs a new
+ /usr/include/resolv.h file that defines the __P macro without
+ checking to see if it is already defined. This new resolv.h is also
+ included in the Solaris 2.6 distribution. This causes compile
+ warnings such as:
In file included from daemon.c:51:
/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:
+ These warnings can be safely ignored or you can create a resolv.h
+ file in the obj.SunOS.5.5.1.* or obj.SunOS.5.6.* directory that reads:
#undef __P
#include "/usr/include/resolv.h"
- ... And then file a bug report with Sun.
+ Sun is aware of the problem (Sun bug ID 4081053) and it will be fixed
+ in a to-be-released patch.
Ultrix
By default, the IDENT protocol is turned off on Ultrix. If you
@@ -852,7 +862,7 @@ Ultrix
IDENT on in the configuration file by setting the "ident" timeout
to 30 seconds.
-OSF/1
+Digital UNIX (formerly DEC OSF/1)
If you are compiling on OSF/1 (DEC Alpha), you must use
-L/usr/shlib (otherwise it core dumps on startup). You may also
need -mld to get the nlist() function, although some versions
@@ -865,6 +875,19 @@ OSF/1
properly due to a bug in the getpw* routines. If you want to use
this, use -DDEC_OSF_BROKEN_GETPWENT=1. The problem is fixed in 3.2C.
+ On Digital UNIX 4.0 and later, Berkeley DB is included with the
+ operating system and already has the ndbm.o module removed. However,
+ Digital has modified the original Berkeley DB db.h include file.
+ This results in the following warning while compiling map.c and udb.c:
+
+ cc: Warning: /usr/include/db.h, line 74: The redefinition of the macro
+ "__signed" conflicts with a current definition because the replacement
+ lists differ. The redefinition is now in effect.
+ #define __signed signed
+ ------------------------^
+
+ This warning can be ignored.
+
IRIX
The header files on SGI IRIX are completely prototyped, and as
a result you can sometimes get some warning messages during
@@ -1439,4 +1462,4 @@ version.c The version number and information about this
Eric Allman
-(Version 8.148, last update 8/1/97 16:41:54)
+(Version 8.156, last update 10/23/97 12:53:12)
diff --git a/usr.sbin/sendmail/src/err.c b/usr.sbin/sendmail/src/err.c
index f4f95e6..f08d960 100644
--- a/usr.sbin/sendmail/src/err.c
+++ b/usr.sbin/sendmail/src/err.c
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)err.c 8.64 (Berkeley) 7/25/97";
+static char sccsid[] = "@(#)err.c 8.65 (Berkeley) 10/18/97";
#endif /* not lint */
# include "sendmail.h"
@@ -556,7 +556,9 @@ fmtmsg(eb, to, num, eno, fmt, ap)
}
/* output the "to" person */
- if (to != NULL && to[0] != '\0')
+ if (to != NULL && to[0] != '\0' &&
+ strncmp(num, "551", 3) != 0 &&
+ strncmp(num, "251", 3) != 0)
{
(void) snprintf(eb, spaceleft, "%s... ",
shortenstring(to, 203));
diff --git a/usr.sbin/sendmail/src/map.c b/usr.sbin/sendmail/src/map.c
index 88e82b1..e889736 100644
--- a/usr.sbin/sendmail/src/map.c
+++ b/usr.sbin/sendmail/src/map.c
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)map.c 8.181 (Berkeley) 7/9/97";
+static char sccsid[] = "@(#)map.c 8.186 (Berkeley) 10/21/97";
#endif /* not lint */
#include "sendmail.h"
@@ -402,8 +402,8 @@ map_rewrite(map, s, slen, av)
**
** Side Effects:
** initializes aliases:
-** if NDBM: opens the database.
-** if ~NDBM: reads the aliases into the symbol table.
+** if alias database: opens the database.
+** if no database available: reads aliases into the symbol table.
*/
void
@@ -417,25 +417,20 @@ initmaps(rebuild, e)
checkfd012("entering initmaps");
#endif
CurEnv = e;
- if (rebuild)
- {
- stabapply(map_init, 1);
- stabapply(map_init, 2);
- }
- else
- {
- stabapply(map_init, 0);
- }
+
+ stabapply(map_init, 0);
+ stabapply(map_init, rebuild ? 2 : 1);
#if XDEBUG
checkfd012("exiting initmaps");
#endif
}
void
-map_init(s, rebuild)
+map_init(s, pass)
register STAB *s;
- int rebuild;
+ int pass;
{
+ bool rebuildable;
register MAP *map;
/* has to be a map */
@@ -452,13 +447,23 @@ map_init(s, rebuild)
map->map_class->map_cname,
map->map_mname == NULL ? "NULL" : map->map_mname,
map->map_file == NULL ? "NULL" : map->map_file,
- rebuild);
+ pass);
+
+ /*
+ ** Pass 0 opens all non-rebuildable maps.
+ ** Pass 1 opens all rebuildable maps for read.
+ ** Pass 2 rebuilds all rebuildable maps.
+ */
+
+ rebuildable = (bitset(MF_ALIAS, map->map_mflags) &&
+ bitset(MCF_REBUILDABLE, map->map_class->map_cflags));
- if (rebuild == (bitset(MF_ALIAS, map->map_mflags) &&
- bitset(MCF_REBUILDABLE, map->map_class->map_cflags) ? 1 : 2))
+ if ((pass == 0 && rebuildable) ||
+ ((pass == 1 || pass == 2) && !rebuildable))
{
if (tTd(38, 3))
- printf("\twrong pass\n");
+ printf("\twrong pass (pass = %d, rebuildable = %d)\n",
+ pass, rebuildable);
return;
}
@@ -468,43 +473,42 @@ map_init(s, rebuild)
map->map_class->map_close(map);
map->map_mflags &= ~(MF_OPEN|MF_WRITABLE);
}
-
- if (rebuild == 2)
+
+ if (pass == 2)
{
rebuildaliases(map, FALSE);
+ return;
+ }
+
+ if (map->map_class->map_open(map, O_RDONLY))
+ {
+ if (tTd(38, 4))
+ printf("\t%s:%s %s: valid\n",
+ map->map_class->map_cname == NULL ? "NULL" :
+ map->map_class->map_cname,
+ map->map_mname == NULL ? "NULL" :
+ map->map_mname,
+ map->map_file == NULL ? "NULL" :
+ map->map_file);
+ map->map_mflags |= MF_OPEN;
}
else
{
- if (map->map_class->map_open(map, O_RDONLY))
- {
- if (tTd(38, 4))
- printf("\t%s:%s %s: valid\n",
- map->map_class->map_cname == NULL ? "NULL" :
- map->map_class->map_cname,
- map->map_mname == NULL ? "NULL" :
- map->map_mname,
- map->map_file == NULL ? "NULL" :
- map->map_file);
- map->map_mflags |= MF_OPEN;
- }
- else
+ if (tTd(38, 4))
+ printf("\t%s:%s %s: invalid: %s\n",
+ map->map_class->map_cname == NULL ? "NULL" :
+ map->map_class->map_cname,
+ map->map_mname == NULL ? "NULL" :
+ map->map_mname,
+ map->map_file == NULL ? "NULL" :
+ map->map_file,
+ errstring(errno));
+ if (!bitset(MF_OPTIONAL, map->map_mflags))
{
- if (tTd(38, 4))
- printf("\t%s:%s %s: invalid: %s\n",
- map->map_class->map_cname == NULL ? "NULL" :
- map->map_class->map_cname,
- map->map_mname == NULL ? "NULL" :
- map->map_mname,
- map->map_file == NULL ? "NULL" :
- map->map_file,
- errstring(errno));
- if (!bitset(MF_OPTIONAL, map->map_mflags))
- {
- extern MAPCLASS BogusMapClass;
+ extern MAPCLASS BogusMapClass;
- map->map_class = &BogusMapClass;
- map->map_mflags |= MF_OPEN;
- }
+ map->map_class = &BogusMapClass;
+ map->map_mflags |= MF_OPEN;
}
}
}
@@ -781,14 +785,6 @@ ndbm_map_open(map, mode)
if (std.st_mode == ST_MODE_NOFILE)
mode |= O_CREAT|O_EXCL;
- /* heuristic: if files are linked, this is actually gdbm */
- if (std.st_dev == stp.st_dev && std.st_ino == stp.st_ino)
- {
- syserr("dbm map \"%s\": cannot support GDBM",
- map->map_mname);
- return FALSE;
- }
-
#if LOCK_ON_OPEN
if (mode == O_RDONLY)
mode |= O_SHLOCK;
@@ -891,6 +887,20 @@ ndbm_map_open(map, mode)
}
dfd = dbm_dirfno(dbm);
pfd = dbm_pagfno(dbm);
+ if (dfd == pfd)
+ {
+ /* heuristic: if files are linked, this is actually gdbm */
+ dbm_close(dbm);
+#if !LOCK_ON_OPEN && !NOFTRUNCATE
+ if (map->map_lockfd >= 0)
+ close(map->map_lockfd);
+#endif
+ errno = 0;
+ syserr("dbm map \"%s\": cannot support GDBM",
+ map->map_mname);
+ return FALSE;
+ }
+
if (filechanged(dirfile, dfd, &std, sff) ||
filechanged(pagfile, pfd, &stp, sff))
{
@@ -944,6 +954,7 @@ ndbm_map_lookup(map, name, av, statp)
datum key, val;
int fd;
char keybuf[MAXNAME + 1];
+ struct stat stbuf;
if (tTd(38, 20))
printf("ndbm_map_lookup(%s, %s)\n",
@@ -960,9 +971,40 @@ ndbm_map_lookup(map, name, av, statp)
makelower(keybuf);
key.dptr = keybuf;
}
+lockdbm:
fd = dbm_dirfno((DBM *) map->map_db1);
if (fd >= 0 && !bitset(MF_LOCKED, map->map_mflags))
(void) lockfile(fd, map->map_file, ".dir", LOCK_SH);
+ if (fd < 0 || fstat(fd, &stbuf) < 0 || stbuf.st_mtime > map->map_mtime)
+ {
+ /* Reopen the database to sync the cache */
+ int omode = bitset(map->map_mflags, MF_WRITABLE) ? O_RDWR
+ : O_RDONLY;
+
+ map->map_class->map_close(map);
+ map->map_mflags &= ~(MF_OPEN|MF_WRITABLE);
+ if (map->map_class->map_open(map, omode))
+ {
+ map->map_mflags |= MF_OPEN;
+ if ((omode && O_ACCMODE) == O_RDWR)
+ map->map_mflags |= MF_WRITABLE;
+ goto lockdbm;
+ }
+ else
+ {
+ if (!bitset(MF_OPTIONAL, map->map_mflags))
+ {
+ extern MAPCLASS BogusMapClass;
+
+ *statp = EX_TEMPFAIL;
+ map->map_class = &BogusMapClass;
+ map->map_mflags |= MF_OPEN;
+ syserr("Cannot reopen NDBM database %s",
+ map->map_file);
+ }
+ return NULL;
+ }
+ }
val.dptr = NULL;
if (bitset(MF_TRY0NULL, map->map_mflags))
{
@@ -2489,7 +2531,7 @@ ldap_map_lookup(map, name, av, statp)
filter, map->map_mname);
}
result = NULL;
- *statp = EX_UNAVAILABLE;
+ *statp = EX_TEMPFAIL;
goto quick_exit;
}
}
diff --git a/usr.sbin/sendmail/src/queue.c b/usr.sbin/sendmail/src/queue.c
index 1d812b8..d48efb1 100644
--- a/usr.sbin/sendmail/src/queue.c
+++ b/usr.sbin/sendmail/src/queue.c
@@ -36,9 +36,9 @@
#ifndef lint
#if QUEUE
-static char sccsid[] = "@(#)queue.c 8.174 (Berkeley) 7/23/97 (with queueing)";
+static char sccsid[] = "@(#)queue.c 8.175 (Berkeley) 10/4/97 (with queueing)";
#else
-static char sccsid[] = "@(#)queue.c 8.174 (Berkeley) 7/23/97 (without queueing)";
+static char sccsid[] = "@(#)queue.c 8.175 (Berkeley) 10/4/97 (without queueing)";
#endif
#endif /* not lint */
@@ -474,7 +474,6 @@ printctladdr(a, tfp)
FILE *tfp;
{
char *uname;
- char *paddr;
register ADDRESS *q;
uid_t uid;
gid_t gid;
@@ -514,12 +513,12 @@ printctladdr(a, tfp)
lastuid = uid;
lastctladdr = a;
- paddr = denlstring(a->q_paddr, TRUE, FALSE);
if (uid == 0 || uname == NULL || uname[0] == '\0')
- fprintf(tfp, "C:%s\n", paddr);
+ fprintf(tfp, "C");
else
- fprintf(tfp, "C%s:%ld:%ld:%s\n",
- uname, (long) uid, (long) gid, paddr);
+ fprintf(tfp, "C%s:%ld:%ld",
+ denlstring(uname, TRUE, FALSE), (long) uid, (long) gid);
+ fprintf(tfp, ":%s\n", denlstring(a->q_paddr, TRUE, FALSE));
}
/*
** RUNQUEUE -- run the jobs in the queue.
diff --git a/usr.sbin/sendmail/src/version.c b/usr.sbin/sendmail/src/version.c
index c531c5b..dc041ba 100644
--- a/usr.sbin/sendmail/src/version.c
+++ b/usr.sbin/sendmail/src/version.c
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)version.c 8.8.7.3 (Berkeley) 8/3/97";
+static char sccsid[] = "@(#)version.c 8.8.8.1 (Berkeley) 10/24/97";
#endif /* not lint */
-char Version[] = "8.8.7";
+char Version[] = "8.8.8";
diff --git a/usr.sbin/sendmail/test/t_exclopen.c b/usr.sbin/sendmail/test/t_exclopen.c
index 54f7873..a42baa9 100644
--- a/usr.sbin/sendmail/test/t_exclopen.c
+++ b/usr.sbin/sendmail/test/t_exclopen.c
@@ -19,6 +19,8 @@
** HP-UX 10.20 OK
** Irix 5.3 OK
** Irix 6.2 OK
+** Irix 6.3 OK
+** Irix 6.4 OK
** Linux OK
** NeXT 2.1 OK
** Solaris 2.x OK
OpenPOWER on IntegriCloud