aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Neil Shapiro <gshapiro@FreeBSD.org>2003-03-29 19:12:53 +0000
committerGregory Neil Shapiro <gshapiro@FreeBSD.org>2003-03-29 19:12:53 +0000
commit77b53d4402807220b7267e276366dcb0032c5a7d (patch)
treef5dfc93fac7c6539cc0234a51793f6fbae8dc06b
parent62f456b3159e00bb92fe7f341f151d6177e87f1f (diff)
parent5ef517c097100c80269c8a0e02678a89fde6b35e (diff)
downloadsrc-77b53d4402807220b7267e276366dcb0032c5a7d.tar.gz
src-77b53d4402807220b7267e276366dcb0032c5a7d.zip
This commit was generated by cvs2svn to compensate for changes in r112810,
which included commits to RCS files with non-trunk default branches.
Notes
Notes: svn path=/head/; revision=112811
-rw-r--r--contrib/sendmail/RELEASE_NOTES39
-rw-r--r--contrib/sendmail/cf/README5
-rw-r--r--contrib/sendmail/cf/cf/submit.cf12
-rw-r--r--contrib/sendmail/cf/m4/proto.m410
-rw-r--r--contrib/sendmail/cf/m4/version.m44
-rw-r--r--contrib/sendmail/cf/mailer/usenet.m46
-rwxr-xr-xcontrib/sendmail/contrib/buildvirtuser27
-rw-r--r--contrib/sendmail/doc/op/op.me19
-rw-r--r--contrib/sendmail/editmap/editmap.86
-rw-r--r--contrib/sendmail/include/sm/bdb.h10
-rw-r--r--contrib/sendmail/include/sm/conf.h5
-rw-r--r--contrib/sendmail/libmilter/docs/api.html4
-rw-r--r--contrib/sendmail/libmilter/docs/design.html4
-rw-r--r--contrib/sendmail/libmilter/docs/index.html6
-rw-r--r--contrib/sendmail/libmilter/docs/installation.html10
-rw-r--r--contrib/sendmail/libmilter/docs/other.html4
-rw-r--r--contrib/sendmail/libmilter/docs/overview.html6
-rw-r--r--contrib/sendmail/libmilter/docs/sample.html4
-rw-r--r--contrib/sendmail/libmilter/docs/smfi_addheader.html4
-rw-r--r--contrib/sendmail/libmilter/docs/smfi_addrcpt.html4
-rw-r--r--contrib/sendmail/libmilter/docs/smfi_chgheader.html4
-rw-r--r--contrib/sendmail/libmilter/docs/smfi_delrcpt.html4
-rw-r--r--contrib/sendmail/libmilter/docs/smfi_getpriv.html4
-rw-r--r--contrib/sendmail/libmilter/docs/smfi_getsymval.html4
-rw-r--r--contrib/sendmail/libmilter/docs/smfi_main.html4
-rw-r--r--contrib/sendmail/libmilter/docs/smfi_register.html4
-rw-r--r--contrib/sendmail/libmilter/docs/smfi_replacebody.html4
-rw-r--r--contrib/sendmail/libmilter/docs/smfi_setbacklog.html4
-rw-r--r--contrib/sendmail/libmilter/docs/smfi_setconn.html22
-rw-r--r--contrib/sendmail/libmilter/docs/smfi_setpriv.html4
-rw-r--r--contrib/sendmail/libmilter/docs/smfi_setreply.html4
-rw-r--r--contrib/sendmail/libmilter/docs/smfi_settimeout.html4
-rw-r--r--contrib/sendmail/libmilter/docs/xxfi_abort.html4
-rw-r--r--contrib/sendmail/libmilter/docs/xxfi_body.html4
-rw-r--r--contrib/sendmail/libmilter/docs/xxfi_close.html4
-rw-r--r--contrib/sendmail/libmilter/docs/xxfi_connect.html4
-rw-r--r--contrib/sendmail/libmilter/docs/xxfi_envfrom.html6
-rw-r--r--contrib/sendmail/libmilter/docs/xxfi_envrcpt.html6
-rw-r--r--contrib/sendmail/libmilter/docs/xxfi_eoh.html4
-rw-r--r--contrib/sendmail/libmilter/docs/xxfi_eom.html4
-rw-r--r--contrib/sendmail/libmilter/docs/xxfi_header.html6
-rw-r--r--contrib/sendmail/libmilter/docs/xxfi_helo.html4
-rw-r--r--contrib/sendmail/libsm/clock.c6
-rw-r--r--contrib/sendmail/libsm/config.c7
-rw-r--r--contrib/sendmail/src/README7
-rw-r--r--contrib/sendmail/src/collect.c7
-rw-r--r--contrib/sendmail/src/deliver.c17
-rw-r--r--contrib/sendmail/src/main.c11
-rw-r--r--contrib/sendmail/src/milter.c38
-rw-r--r--contrib/sendmail/src/parseaddr.c17
-rw-r--r--contrib/sendmail/src/queue.c12
-rw-r--r--contrib/sendmail/src/readcf.c28
-rw-r--r--contrib/sendmail/src/sendmail.h5
-rw-r--r--contrib/sendmail/src/sm_resolve.c21
-rw-r--r--contrib/sendmail/src/srvrsmtp.c4
-rw-r--r--contrib/sendmail/src/tls.c2
-rw-r--r--contrib/sendmail/src/usersmtp.c16
-rw-r--r--contrib/sendmail/src/version.c4
58 files changed, 329 insertions, 174 deletions
diff --git a/contrib/sendmail/RELEASE_NOTES b/contrib/sendmail/RELEASE_NOTES
index c499d543e0ed..16a2d98a3f5d 100644
--- a/contrib/sendmail/RELEASE_NOTES
+++ b/contrib/sendmail/RELEASE_NOTES
@@ -1,11 +1,48 @@
SENDMAIL RELEASE NOTES
- $Id: RELEASE_NOTES,v 8.1340.2.113 2003/02/11 19:17:41 gshapiro Exp $
+ $Id: RELEASE_NOTES,v 8.1340.2.132 2003/03/29 14:02:26 ca Exp $
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.12.9/8.12.9 2003/03/29
+ SECURITY: Fix a buffer overflow in address parsing due to
+ a char to int conversion problem which is potentially
+ remotely exploitable. Problem found by Michal Zalewski.
+ Note: an MTA that is not patched might be vulnerable to
+ data that it receives from untrusted sources, which
+ includes DNS.
+ To provide partial protection to internal, unpatched sendmail MTAs,
+ 8.12.9 changes by default (char)0xff to (char)0x7f in
+ headers etc. To turn off this conversion compile with
+ -DALLOW_255 or use the command line option -d82.101.
+ To provide partial protection for internal, unpatched MTAs that may be
+ performing 7->8 or 8->7 bit MIME conversions, the default
+ for MaxMimeHeaderLength has been changed to 2048/1024.
+ Note: this does have a performance impact, and it only
+ protects against frontal attacks from the outside.
+ To disable the checks and return to pre-8.12.9 defaults,
+ set MaxMimeHeaderLength to 0/0.
+ Do not complain about -ba when submitting mail. Problem noted
+ by Derek Wueppelmann.
+ Fix compilation with Berkeley DB 1.85 on systems that do not
+ have flock(2). Problem noted by Andy Harper of Kings
+ College London.
+ Properly initialize data structure for dns maps to avoid various
+ errors, e.g., looping processes. Problem noted by
+ Maurice Makaay.
+ CONFIG: Prevent multiple application of rule to add smart host.
+ Patch from Andrzej Filip.
+ CONFIG: Fix queue group declaration in MAILER(`usenet').
+ CONTRIB: buildvirtuser: New option -t builds the virtusertable
+ text file instead of the database map.
+ Portability:
+ Revert wrong change made in 8.12.7 and actually use the
+ builtin getopt() version in sendmail on Linux.
+ This can be overridden by using -DSM_CONF_GETOPT=0
+ in which case the OS supplied version will be used.
+
8.12.8/8.12.8 2003/02/11
SECURITY: Fix a remote buffer overflow in header parsing by
dropping sender and recipient header comments if the
diff --git a/contrib/sendmail/cf/README b/contrib/sendmail/cf/README
index dceb1bc5bb7c..1a59f9df54a1 100644
--- a/contrib/sendmail/cf/README
+++ b/contrib/sendmail/cf/README
@@ -3687,6 +3687,7 @@ confMAX_HEADERS_LENGTH MaxHeadersLength
confMAX_MIME_HEADER_LENGTH MaxMimeHeaderLength
[undefined] Maximum length of
certain MIME header field values.
+ If not set, sendmail uses 2048/1024.
confCONNECTION_RATE_THROTTLE ConnectionRateThrottle
[undefined] The maximum number of
connections permitted per second per
@@ -3849,8 +3850,6 @@ confRUN_AS_USER RunAsUser [undefined] If set, become this user
this user. Also, all programs will
be run as this user, and all output
files will be written as this user.
- Intended for use only on firewalls
- where users do not have accounts.
confMAX_RCPTS_PER_MESSAGE MaxRecipientsPerMessage
[infinite] If set, allow no more than
the specified number of recipients in
@@ -4375,4 +4374,4 @@ M4 DIVERSIONS
8 DNS based blacklists
9 special local rulesets (1 and 2)
-$Revision: 8.623.2.21 $, Last updated $Date: 2003/01/17 00:36:57 $
+$Revision: 8.623.2.23 $, Last updated $Date: 2003/03/28 17:28:26 $
diff --git a/contrib/sendmail/cf/cf/submit.cf b/contrib/sendmail/cf/cf/submit.cf
index 216716e0500b..84f25304871a 100644
--- a/contrib/sendmail/cf/cf/submit.cf
+++ b/contrib/sendmail/cf/cf/submit.cf
@@ -24,7 +24,7 @@
######################################################################
######################################################################
-##### $Id: cfhead.m4,v 8.108.2.1 2002/08/27 20:19:08 gshapiro Exp $ #####
+##### $Id: cfhead.m4,v 8.108.2.2 2003/03/11 21:24:20 ca Exp $ #####
##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ #####
##### $Id: submit.mc,v 8.6.2.4 2002/12/29 03:54:34 ca Exp $ #####
##### $Id: msp.m4,v 1.32 2002/03/26 22:02:03 ca Exp $ #####
@@ -32,7 +32,7 @@
##### $Id: no_default_msa.m4,v 8.2 2001/02/14 05:03:22 gshapiro Exp $ #####
-##### $Id: proto.m4,v 8.649.2.14 2002/12/30 15:46:02 ca Exp $ #####
+##### $Id: proto.m4,v 8.649.2.17 2003/03/28 17:20:53 ca Exp $ #####
# level 10 config file format
V10/Berkeley
@@ -110,7 +110,7 @@ D{MTAHost}[127.0.0.1]
# Configuration version number
-DZ8.12.8/Submit
+DZ8.12.9/Submit
###############
@@ -283,10 +283,12 @@ O Timeout.queuereturn=5d
#O Timeout.queuereturn.normal=5d
#O Timeout.queuereturn.urgent=2d
#O Timeout.queuereturn.non-urgent=7d
+
O Timeout.queuewarn=4h
#O Timeout.queuewarn.normal=4h
#O Timeout.queuewarn.urgent=1h
#O Timeout.queuewarn.non-urgent=12h
+
#O Timeout.hoststatus=30m
#O Timeout.resolver.retrans=5s
#O Timeout.resolver.retrans.first=5s
@@ -437,7 +439,7 @@ O TrustedUser=smmsp
#O ControlSocketName=/var/spool/mqueue/.control
# Maximum MIME header length to protect MUAs
-#O MaxMimeHeaderLength=0/0
+#O MaxMimeHeaderLength=2048/1024
# Maximum length of the sum of all headers
#O MaxHeadersLength=32768
@@ -754,7 +756,7 @@ SParse1
# handle numeric address spec
R$* < @ [ $+ ] > $* $: $>ParseLocal $1 < @ [ $2 ] > $3 numeric internet spec
-R$* < @ [ $+ ] > $* $1 < @ [ $2 ] : $S > $3 Add smart host to path
+R$* < @ [ $+ ] > $* $: $1 < @ [ $2 ] : $S > $3 Add smart host to path
R$* < @ [ $+ ] : > $* $#esmtp $@ [$2] $: $1 < @ [$2] > $3 no smarthost: send
R$* < @ [ $+ ] : $- : $*> $* $#$3 $@ $4 $: $1 < @ [$2] > $5 smarthost with mailer
R$* < @ [ $+ ] : $+ > $* $#esmtp $@ $3 $: $1 < @ [$2] > $4 smarthost without mailer
diff --git a/contrib/sendmail/cf/m4/proto.m4 b/contrib/sendmail/cf/m4/proto.m4
index f216b2a63d03..1b9481f2340c 100644
--- a/contrib/sendmail/cf/m4/proto.m4
+++ b/contrib/sendmail/cf/m4/proto.m4
@@ -13,7 +13,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`$Id: proto.m4,v 8.649.2.14 2002/12/30 15:46:02 ca Exp $')
+VERSIONID(`$Id: proto.m4,v 8.649.2.17 2003/03/28 17:20:53 ca Exp $')
# level CF_LEVEL config file format
V`'CF_LEVEL/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley')
@@ -424,10 +424,14 @@ _OPTION(Timeout.queuereturn, `confTO_QUEUERETURN', `5d')
_OPTION(Timeout.queuereturn.normal, `confTO_QUEUERETURN_NORMAL', `5d')
_OPTION(Timeout.queuereturn.urgent, `confTO_QUEUERETURN_URGENT', `2d')
_OPTION(Timeout.queuereturn.non-urgent, `confTO_QUEUERETURN_NONURGENT', `7d')
+ifdef(`confTO_QUEUERETURN_DSN', `dnl
+O Timeout.queuereturn.dsn=confTO_QUEUERETURN_DSN')
_OPTION(Timeout.queuewarn, `confTO_QUEUEWARN', `4h')
_OPTION(Timeout.queuewarn.normal, `confTO_QUEUEWARN_NORMAL', `4h')
_OPTION(Timeout.queuewarn.urgent, `confTO_QUEUEWARN_URGENT', `1h')
_OPTION(Timeout.queuewarn.non-urgent, `confTO_QUEUEWARN_NONURGENT', `12h')
+ifdef(`confTO_QUEUEWARN_DSN', `dnl
+O Timeout.queuewarn.dsn=confTO_QUEUEWARN_DSN')
_OPTION(Timeout.hoststatus, `confTO_HOSTSTATUS', `30m')
_OPTION(Timeout.resolver.retrans, `confTO_RESOLVER_RETRANS', `5s')
_OPTION(Timeout.resolver.retrans.first, `confTO_RESOLVER_RETRANS_FIRST', `5s')
@@ -582,7 +586,7 @@ _OPTION(TrustedUser, `confTRUSTED_USER', `root')
_OPTION(ControlSocketName, `confCONTROL_SOCKET_NAME', `/var/spool/mqueue/.control')
# Maximum MIME header length to protect MUAs
-_OPTION(MaxMimeHeaderLength, `confMAX_MIME_HEADER_LENGTH', `0/0')
+_OPTION(MaxMimeHeaderLength, `confMAX_MIME_HEADER_LENGTH', `2048/1024')
# Maximum length of the sum of all headers
_OPTION(MaxHeadersLength, `confMAX_HEADERS_LENGTH', `32768')
@@ -1017,7 +1021,7 @@ ifdef(`_MAILER_smtp_',
`# handle numeric address spec
dnl there is no check whether this is really an IP number
R$* < @ [ $+ ] > $* $: $>ParseLocal $1 < @ [ $2 ] > $3 numeric internet spec
-R$* < @ [ $+ ] > $* $1 < @ [ $2 ] : $S > $3 Add smart host to path
+R$* < @ [ $+ ] > $* $: $1 < @ [ $2 ] : $S > $3 Add smart host to path
R$* < @ [ $+ ] : > $* $#_SMTP_ $@ [$2] $: $1 < @ [$2] > $3 no smarthost: send
R$* < @ [ $+ ] : $- : $*> $* $#$3 $@ $4 $: $1 < @ [$2] > $5 smarthost with mailer
R$* < @ [ $+ ] : $+ > $* $#_SMTP_ $@ $3 $: $1 < @ [$2] > $4 smarthost without mailer',
diff --git a/contrib/sendmail/cf/m4/version.m4 b/contrib/sendmail/cf/m4/version.m4
index 2a886db57f0e..7989c5fdca6b 100644
--- a/contrib/sendmail/cf/m4/version.m4
+++ b/contrib/sendmail/cf/m4/version.m4
@@ -11,8 +11,8 @@ divert(-1)
# the sendmail distribution.
#
#
-VERSIONID(`$Id: version.m4,v 8.92.2.14 2003/01/15 17:55:43 ca Exp $')
+VERSIONID(`$Id: version.m4,v 8.92.2.15 2003/03/19 21:19:52 ca Exp $')
#
divert(0)
# Configuration version number
-DZ8.12.8`'ifdef(`confCF_VERSION', `/confCF_VERSION')
+DZ8.12.9`'ifdef(`confCF_VERSION', `/confCF_VERSION')
diff --git a/contrib/sendmail/cf/mailer/usenet.m4 b/contrib/sendmail/cf/mailer/usenet.m4
index d3ae38b94293..d28c3214d397 100644
--- a/contrib/sendmail/cf/mailer/usenet.m4
+++ b/contrib/sendmail/cf/mailer/usenet.m4
@@ -1,6 +1,6 @@
PUSHDIVERT(-1)
#
-# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2000, 2003 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@@ -21,8 +21,8 @@ POPDIVERT
### USENET Mailer specification ###
####################################
-VERSIONID(`$Id: usenet.m4,v 8.21 2000/10/26 02:08:19 ca Exp $')
+VERSIONID(`$Id: usenet.m4,v 8.21.4.1 2003/03/03 22:53:03 ca Exp $')
Musenet, P=USENET_MAILER_PATH, F=_MODMF_(USENET_MAILER_FLAGS, `USENET'), S=EnvFromL, R=EnvToL,
- _OPTINS(`USENET_MAILER_MAX', `M=', `, ')T=X-Usenet/X-Usenet/X-Unix,USENET_MAILER_QGRP
+ _OPTINS(`USENET_MAILER_MAX', `M=', `, ')T=X-Usenet/X-Usenet/X-Unix,_USENET_QGRP
A=USENET_MAILER_ARGS $u
diff --git a/contrib/sendmail/contrib/buildvirtuser b/contrib/sendmail/contrib/buildvirtuser
index dcf6d4424452..8c0aa44777aa 100755
--- a/contrib/sendmail/contrib/buildvirtuser
+++ b/contrib/sendmail/contrib/buildvirtuser
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
-# Copyright (c) 1999-2002 Gregory Neil Shapiro. All Rights Reserved.
+# Copyright (c) 1999-2003 Gregory Neil Shapiro. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -27,7 +27,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
-# $Id: buildvirtuser,v 1.5 2002/02/08 08:10:59 gshapiro Exp $
+# $Id: buildvirtuser,v 1.5.2.1 2003/03/15 23:30:26 gshapiro Exp $
=head1 NAME
@@ -35,7 +35,7 @@ buildvirtuser - Build virtusertable support from a directory of files
=head1 SYNOPSIS
- buildvirtuser [-f]
+ buildvirtuser [-f] [-t]
=head1 DESCRIPTION
@@ -53,6 +53,9 @@ the left hand side.
The -f option forces the database to be rebuilt regardless of whether
any file changes were detected.
+The -t option instructs the program to build a text file instead of a
+database. The text file can then be used with makemap.
+
=head1 CONFIGURATION
In order to function properly, sendmail must be configured to use these
@@ -114,7 +117,13 @@ my $newest = 0;
my ($lhs, $domain, $key, $value);
my $opts = {};
-getopts('f', $opts) || die "Usage: $0 [-f]\n";
+getopts('ft', $opts) || die "Usage: $0 [-f] [-t]\n";
+
+if ($opts->{t})
+{
+ $newvirt = "$maildir/virtusertable.new";
+ $virt = "$maildir/virtusertable";
+}
opendir(VIRTS, $virts) || die "Could not open directory $virts: $!\n";
my @virts = grep { -f "$virts/$_" } readdir(VIRTS);
@@ -168,7 +177,15 @@ if ($opts->{f} || $virtmtime < $newest)
{
print STDOUT "Rebuilding $virt\n";
# logger -s -t ${prog} -p mail.info "Rebuilding ${basedir}/virtusertable"
- open(MAKEMAP, "|$makemap $dbtype $newvirt") || die "Could not start makemap: $!\n";
+ if ($opts->{t})
+ {
+ open(MAKEMAP, ">$newvirt") || die "Could not open $newvirt: $!\n";
+ }
+ else
+ {
+ open(MAKEMAP, "|$makemap $dbtype $newvirt") || die "Could not start makemap: $!\n";
+ }
+
foreach $key (keys %virt)
{
print MAKEMAP "$key\t\t$virt{$key}\n";
diff --git a/contrib/sendmail/doc/op/op.me b/contrib/sendmail/doc/op/op.me
index ca967b2a8c03..6f49c9758f82 100644
--- a/contrib/sendmail/doc/op/op.me
+++ b/contrib/sendmail/doc/op/op.me
@@ -9,7 +9,7 @@
.\" the sendmail distribution.
.\"
.\"
-.\" $Id: op.me,v 8.609.2.20 2003/01/15 19:17:16 ca Exp $
+.\" $Id: op.me,v 8.609.2.23 2003/03/28 05:51:16 ca Exp $
.\"
.\" eqn op.me | pic | troff -me
.\"
@@ -90,7 +90,7 @@ Sendmail, Inc.
.de Ve
Version \\$2
..
-.Ve $Revision: 8.609.2.20 $
+.Ve $Revision: 8.609.2.23 $
.rm Ve
.sp
For Sendmail Version 8.12
@@ -6292,7 +6292,7 @@ Addr Address mask (defaults INADDR_ANY)
Family Address family (defaults to INET)
SndBufSize Size of TCP send buffer
RcvBufSize Size of TCP receive buffer
-Modifier Options (flags) for the daemon
+Modifier Options (flags) for the client
.)b
The
.i Addr ess
@@ -7012,6 +7012,10 @@ Defaults to 25.
Specify the maximum message size
to be advertised in the ESMTP EHLO response.
Messages larger than this will be rejected.
+If set to a value greater than zero,
+that value will be listed in the SIZE response,
+otherwise SIZE is advertised in the ESMTP EHLO response
+without a parameter.
.ip MaxMimeHeaderLength=\fIN[/M]\fP
[no short name]
Sets the maximum length of certain MIME header field values to
@@ -7029,7 +7033,8 @@ is not specified, one half of
.i N
will be used.
By default,
-these values are 0, meaning no checks are done.
+these values are 2048 and 1024, respectively.
+To allow any length, a value of 0 can be specified.
.ip MaxQueueChildren=\fIN\fP
[no short name]
When set, this limits the number of concurrent queue runner processes to
@@ -8954,6 +8959,10 @@ Reject connection if filter unavailable.
.ip T
Temporary fail connection if filter unavailable.
.pp
+If neither F=R nor F=T is specified, the message is passed through
+.i sendmail
+in case of filter errors as if the failing filters were not present.
+.pp
The timeouts can be set using the four fields inside of the
.b T=
equate:
@@ -10755,7 +10764,7 @@ replace it with a blank sheet for double-sided output.
.\".sz 10
.\"Eric Allman
.\".sp
-.\"Version $Revision: 8.609.2.20 $
+.\"Version $Revision: 8.609.2.23 $
.\".ce 0
.bp 3
.ce
diff --git a/contrib/sendmail/editmap/editmap.8 b/contrib/sendmail/editmap/editmap.8
index 9b450c5b242d..deb2f672ec8e 100644
--- a/contrib/sendmail/editmap/editmap.8
+++ b/contrib/sendmail/editmap/editmap.8
@@ -6,9 +6,9 @@
.\" the sendmail distribution.
.\"
.\"
-.\" $Id: editmap.8,v 1.8 2001/06/15 21:33:19 ca Exp $
+.\" $Id: editmap.8,v 1.8.4.1 2003/03/15 23:38:57 gshapiro Exp $
.\"
-.TH EDITMAP 8 "$Date: 2001/06/15 21:33:19 $"
+.TH EDITMAP 8 "$Date: 2003/03/15 23:38:57 $"
.SH NAME
.B editmap
\- query and edit single records in database maps for sendmail
@@ -23,7 +23,7 @@ maptype mapname
key [ "value ..." ]
.SH DESCRIPTION
.B Editmap
-queries or edits one record in a database maps used by the keyed map lookups in
+queries or edits one record in database maps used by the keyed map lookups in
sendmail(8).
Arguments are passed on the command line and output (for queries) is
directed to standard output.
diff --git a/contrib/sendmail/include/sm/bdb.h b/contrib/sendmail/include/sm/bdb.h
index 34b6f7bb4dcf..453eaa706c5e 100644
--- a/contrib/sendmail/include/sm/bdb.h
+++ b/contrib/sendmail/include/sm/bdb.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2002, 2003 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -7,7 +7,7 @@
* the sendmail distribution.
*
*
- * $Id: bdb.h,v 1.1.2.3 2002/12/05 05:07:44 ca Exp $
+ * $Id: bdb.h,v 1.1.2.4 2003/03/06 16:27:38 ca Exp $
*/
#ifndef SM_BDB_H
@@ -35,11 +35,11 @@
# else /* DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 */
# define DBTXN
-# if !HASFLOCK
+# if !HASFLOCK && defined(DB_FCNTL_LOCKING)
# define SM_DB_FLAG_ADD(flag) (flag) |= DB_FCNTL_LOCKING
-# else /* !HASFLOCK */
+# else /* !HASFLOCK && defined(DB_FCNTL_LOCKING) */
# define SM_DB_FLAG_ADD(flag) ((void) 0)
-# endif /* !HASFLOCK */
+# endif /* !HASFLOCK && defined(DB_FCNTL_LOCKING) */
# endif /* DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 */
#endif /* NEWDB */
diff --git a/contrib/sendmail/include/sm/conf.h b/contrib/sendmail/include/sm/conf.h
index c76ab0f0c5ba..b3863f14a524 100644
--- a/contrib/sendmail/include/sm/conf.h
+++ b/contrib/sendmail/include/sm/conf.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -10,7 +10,7 @@
* the sendmail distribution.
*
*
- * $Id: conf.h,v 1.90.2.13 2002/12/10 03:08:56 ca Exp $
+ * $Id: conf.h,v 1.90.2.14 2003/03/06 18:38:06 ca Exp $
*/
/*
@@ -1326,6 +1326,7 @@ extern void *malloc();
# ifndef USESETEUID
# define USESETEUID 0 /* has it due to POSIX, but doesn't work */
# endif /* USESETEUID */
+# define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */
# define HASUNAME 1 /* use System V uname(2) system call */
# define HASUNSETENV 1 /* has unsetenv(3) call */
# define ERRLIST_PREDEFINED /* don't declare sys_errlist */
diff --git a/contrib/sendmail/libmilter/docs/api.html b/contrib/sendmail/libmilter/docs/api.html
index af714efd3097..936abed0d0db 100644
--- a/contrib/sendmail/libmilter/docs/api.html
+++ b/contrib/sendmail/libmilter/docs/api.html
@@ -184,11 +184,11 @@ other callbacks are message-oriented.
<hr size="1">
<font size="-1">
-Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/design.html b/contrib/sendmail/libmilter/docs/design.html
index fbc74e65fd2a..91804861e0a0 100644
--- a/contrib/sendmail/libmilter/docs/design.html
+++ b/contrib/sendmail/libmilter/docs/design.html
@@ -134,11 +134,11 @@ filter process processing messages from two MTAs:
</div>
<hr size="1">
<font size="-1">
-Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/index.html b/contrib/sendmail/libmilter/docs/index.html
index 44c5f902769c..93eb3f83432b 100644
--- a/contrib/sendmail/libmilter/docs/index.html
+++ b/contrib/sendmail/libmilter/docs/index.html
@@ -4,7 +4,7 @@
</head>
<body>
<!--
-$Id: index.html,v 1.10 2001/06/01 00:05:03 ca Exp $
+$Id: index.html,v 1.10.4.1 2003/03/05 19:54:19 ca Exp $
-->
<h1>Filtering Mail with Sendmail</h1>
@@ -82,11 +82,11 @@ filters and the MTA.
<hr size="1">
<font size="-1">
-Copyright (c) 2000, 2001 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2001, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/installation.html b/contrib/sendmail/libmilter/docs/installation.html
index 8ce8611e6d09..370f1d3baf07 100644
--- a/contrib/sendmail/libmilter/docs/installation.html
+++ b/contrib/sendmail/libmilter/docs/installation.html
@@ -16,7 +16,7 @@ To compile a filter, modify the Makefile provided with the sample program, or:
<li>Put the include and Sendmail directories in your include path
(e.g. -I/path/to/include -I/path/to/sendmail).
- <li>Make sure libmilter.so is in your library path, and link your
+ <li>Make sure libmilter.a is in your library path, and link your
application with it (e.g. "-lmilter").
<li>Compile with pthreads, either by using -pthread for gcc, or
@@ -31,10 +31,6 @@ and your linking command line will look something like
cc -o myfilter [object-files] -L[library-location] -lmilter -pthread
</pre>
-<p>
-To run the filter, the Milter shared library must be available to the
-run-time linker.
-
<H2><a name="config">Configuring Sendmail</A></H2>
First, you must compile sendmail with MILTER defined.
@@ -161,10 +157,10 @@ For information about available macros and their meanings, please
consult the sendmail documentation.
<hr size="1">
<font size="-1">
-Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body> </html>
diff --git a/contrib/sendmail/libmilter/docs/other.html b/contrib/sendmail/libmilter/docs/other.html
index 8ec9ffdb00e5..4647c5380872 100644
--- a/contrib/sendmail/libmilter/docs/other.html
+++ b/contrib/sendmail/libmilter/docs/other.html
@@ -5,11 +5,11 @@
FAQ? Mailing list? More sample filters?
<hr size="1">
<font size="-1">
-Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/overview.html b/contrib/sendmail/libmilter/docs/overview.html
index 7f1c0361ab78..981856446c22 100644
--- a/contrib/sendmail/libmilter/docs/overview.html
+++ b/contrib/sendmail/libmilter/docs/overview.html
@@ -4,7 +4,7 @@
</head>
<body>
<!--
-$Id: overview.html,v 1.12 2001/06/01 00:05:03 ca Exp $
+$Id: overview.html,v 1.12.4.1 2003/03/05 19:54:20 ca Exp $
-->
<h1>Technical Overview</h1>
@@ -184,11 +184,11 @@ In the case of <TT>Abort</TT> the
<hr size="1">
<font size="-1">
-Copyright (c) 2000, 2001 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2001, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/sample.html b/contrib/sendmail/libmilter/docs/sample.html
index 879258c39df0..7f669b793de6 100644
--- a/contrib/sendmail/libmilter/docs/sample.html
+++ b/contrib/sendmail/libmilter/docs/sample.html
@@ -480,11 +480,11 @@ main(argc, argv)
</pre>
<hr size="1">
<font size="-1">
-Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/smfi_addheader.html b/contrib/sendmail/libmilter/docs/smfi_addheader.html
index 6f852aebf6ec..a49c648780ff 100644
--- a/contrib/sendmail/libmilter/docs/smfi_addheader.html
+++ b/contrib/sendmail/libmilter/docs/smfi_addheader.html
@@ -105,11 +105,11 @@ href="smfi_chgheader.html">smfi_chgheader</a>.
<hr size="1">
<font size="-1">
-Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/smfi_addrcpt.html b/contrib/sendmail/libmilter/docs/smfi_addrcpt.html
index d0a59638eb25..3b2eb56ccba6 100644
--- a/contrib/sendmail/libmilter/docs/smfi_addrcpt.html
+++ b/contrib/sendmail/libmilter/docs/smfi_addrcpt.html
@@ -70,11 +70,11 @@ in the smfiDesc_str passed to
<hr size="1">
<font size="-1">
-Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/smfi_chgheader.html b/contrib/sendmail/libmilter/docs/smfi_chgheader.html
index 89ce6f26ebfa..fc7ba97bd42d 100644
--- a/contrib/sendmail/libmilter/docs/smfi_chgheader.html
+++ b/contrib/sendmail/libmilter/docs/smfi_chgheader.html
@@ -107,11 +107,11 @@ Otherwise, it returns MI_SUCCESS.
<hr size="1">
<font size="-1">
-Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/smfi_delrcpt.html b/contrib/sendmail/libmilter/docs/smfi_delrcpt.html
index f86fd2efc394..451f36a6a945 100644
--- a/contrib/sendmail/libmilter/docs/smfi_delrcpt.html
+++ b/contrib/sendmail/libmilter/docs/smfi_delrcpt.html
@@ -69,11 +69,11 @@ The addresses to be removed must match exactly. For example, an address and its
<hr size="1">
<font size="-1">
-Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/smfi_getpriv.html b/contrib/sendmail/libmilter/docs/smfi_getpriv.html
index 8bb6efae9538..85c994cd89f5 100644
--- a/contrib/sendmail/libmilter/docs/smfi_getpriv.html
+++ b/contrib/sendmail/libmilter/docs/smfi_getpriv.html
@@ -49,11 +49,11 @@ Get the connection-specific data pointer for this connection.
<hr size="1">
<font size="-1">
-Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/smfi_getsymval.html b/contrib/sendmail/libmilter/docs/smfi_getsymval.html
index 8cbde7d7cb79..7f3db6ae0ce0 100644
--- a/contrib/sendmail/libmilter/docs/smfi_getsymval.html
+++ b/contrib/sendmail/libmilter/docs/smfi_getsymval.html
@@ -86,11 +86,11 @@ sendmail distribution.
<hr size="1">
<font size="-1">
-Copyright (c) 2000, 2002 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2002-2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/smfi_main.html b/contrib/sendmail/libmilter/docs/smfi_main.html
index 9652eaa48550..674ef69a282f 100644
--- a/contrib/sendmail/libmilter/docs/smfi_main.html
+++ b/contrib/sendmail/libmilter/docs/smfi_main.html
@@ -38,11 +38,11 @@ Hand control to libmilter event loop.
<hr size="1">
<font size="-1">
-Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/smfi_register.html b/contrib/sendmail/libmilter/docs/smfi_register.html
index 705b3a4a9dae..2e9ee3dbc956 100644
--- a/contrib/sendmail/libmilter/docs/smfi_register.html
+++ b/contrib/sendmail/libmilter/docs/smfi_register.html
@@ -150,11 +150,11 @@ the following values, describing the actions the filter may take:
<hr size="1">
<font size="-1">
-Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/smfi_replacebody.html b/contrib/sendmail/libmilter/docs/smfi_replacebody.html
index 204c2dc0eb31..2ef0f4933529 100644
--- a/contrib/sendmail/libmilter/docs/smfi_replacebody.html
+++ b/contrib/sendmail/libmilter/docs/smfi_replacebody.html
@@ -80,11 +80,11 @@ Otherwise, it will return MI_SUCCESS.
<hr size="1">
<font size="-1">
-Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/smfi_setbacklog.html b/contrib/sendmail/libmilter/docs/smfi_setbacklog.html
index 79f0fd02adeb..d55926619002 100644
--- a/contrib/sendmail/libmilter/docs/smfi_setbacklog.html
+++ b/contrib/sendmail/libmilter/docs/smfi_setbacklog.html
@@ -50,11 +50,11 @@ to zero.</td>
<hr size="1">
<font size="-1">
-Copyright (c) 2002 Sendmail, Inc. and its suppliers.
+Copyright (c) 2002-2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/smfi_setconn.html b/contrib/sendmail/libmilter/docs/smfi_setconn.html
index 0d46a5bc48e8..b0aed7c2a681 100644
--- a/contrib/sendmail/libmilter/docs/smfi_setconn.html
+++ b/contrib/sendmail/libmilter/docs/smfi_setconn.html
@@ -49,16 +49,26 @@ Set the socket through which this filter should communicate with sendmail.
<tr>
<th valign="top" align=left>RETURN VALUES</th>
-<td>smfi_setconn will not fail on an invalid address. The failure will
-only be detected in <a href="smfi_main.html">smfi_main</a></td>
+<td>smfi_setconn will not fail on an invalid address.
+The failure will only be detected in <a href="smfi_main.html">smfi_main</a></td>.
+Nevertheless, smfi_setconn may fail for other reasons, e.g.,
+due to a lack of memory.
</tr>
<tr>
<th valign="top" align=left>NOTES</th>
<td>
-<ul><li>If possible, filters should not run as root when communicating over unix/local domain sockets.
- <li>Unix/local sockets should have their permissions set to 0600 (read/write permission only for the socket's owner).
+<ul>
+ <li>If possible, filters should not run as root when communicating
+ over unix/local domain sockets.
+ <li>Unix/local sockets should have their permissions set to
+ 0600 (read/write permission only for the socket's owner) or
+ 0660 (read/write permission for the socket's owner and group)
+ which is useful if the sendmail RunAsUser option is used.
+ The permissions for a unix/local domain socket are determined as
+ usual by <code>umask</code>, which should be set to 007 or 077
+ before calling <code>smfi_setconn()</code>.
</ul>
</td>
</tr>
@@ -67,11 +77,11 @@ only be detected in <a href="smfi_main.html">smfi_main</a></td>
<hr size="1">
<font size="-1">
-Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/smfi_setpriv.html b/contrib/sendmail/libmilter/docs/smfi_setpriv.html
index e800cc8dcc0c..6bd79965da60 100644
--- a/contrib/sendmail/libmilter/docs/smfi_setpriv.html
+++ b/contrib/sendmail/libmilter/docs/smfi_setpriv.html
@@ -67,11 +67,11 @@ and set the pointer to NULL.
<hr size="1">
<font size="-1">
-Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/smfi_setreply.html b/contrib/sendmail/libmilter/docs/smfi_setreply.html
index 73852f21c4d3..87a47d7ad7ab 100644
--- a/contrib/sendmail/libmilter/docs/smfi_setreply.html
+++ b/contrib/sendmail/libmilter/docs/smfi_setreply.html
@@ -87,11 +87,11 @@ SMFI_TEMPFAIL is used for the message, the custom reply is not used.
<hr size="1">
<font size="-1">
-Copyright (c) 2000, 2002 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2002-2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/smfi_settimeout.html b/contrib/sendmail/libmilter/docs/smfi_settimeout.html
index 6fee16621d7c..c27f8176f5aa 100644
--- a/contrib/sendmail/libmilter/docs/smfi_settimeout.html
+++ b/contrib/sendmail/libmilter/docs/smfi_settimeout.html
@@ -53,11 +53,11 @@ no wait, <b>not</b> "wait forever".
<hr size="1">
<font size="-1">
-Copyright (c) 2000, 2002 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2002-2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/xxfi_abort.html b/contrib/sendmail/libmilter/docs/xxfi_abort.html
index aeddf6f37d34..d47b50518bff 100644
--- a/contrib/sendmail/libmilter/docs/xxfi_abort.html
+++ b/contrib/sendmail/libmilter/docs/xxfi_abort.html
@@ -70,11 +70,11 @@ message is later aborted outside its control.
<hr size="1">
<font size="-1">
-Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/xxfi_body.html b/contrib/sendmail/libmilter/docs/xxfi_body.html
index b19e0d4913d2..6aed207c8480 100644
--- a/contrib/sendmail/libmilter/docs/xxfi_body.html
+++ b/contrib/sendmail/libmilter/docs/xxfi_body.html
@@ -70,11 +70,11 @@ significantly impact filter performance.
<hr size="1">
<font size="-1">
-Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/xxfi_close.html b/contrib/sendmail/libmilter/docs/xxfi_close.html
index 07742be7682f..30db78643d7f 100644
--- a/contrib/sendmail/libmilter/docs/xxfi_close.html
+++ b/contrib/sendmail/libmilter/docs/xxfi_close.html
@@ -56,11 +56,11 @@ currently ignored.
<hr size="1">
<font size="-1">
-Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/xxfi_connect.html b/contrib/sendmail/libmilter/docs/xxfi_connect.html
index 17102856ba26..af58bf9cba80 100644
--- a/contrib/sendmail/libmilter/docs/xxfi_connect.html
+++ b/contrib/sendmail/libmilter/docs/xxfi_connect.html
@@ -80,11 +80,11 @@ routine, this filter's xxfi_connect() will not be called.</td>
<hr size="1">
<font size="-1">
-Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/xxfi_envfrom.html b/contrib/sendmail/libmilter/docs/xxfi_envfrom.html
index d023c404768e..5eeaa376fdc9 100644
--- a/contrib/sendmail/libmilter/docs/xxfi_envfrom.html
+++ b/contrib/sendmail/libmilter/docs/xxfi_envfrom.html
@@ -76,17 +76,17 @@ Handle the envelope FROM command.
<tr>
<th valign="top" align=left>NOTES</th>
<td>For more details on ESTMP responses, please see RFC
-<a href="http://www.cis.ohio-state.edu/rfc/rfc1869.txt">1869</a>.</td>
+<a href="http://www.rfc-editor.org/rfc/rfc1869.txt">1869</a>.</td>
</tr>
</table>
<hr size="1">
<font size="-1">
-Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/xxfi_envrcpt.html b/contrib/sendmail/libmilter/docs/xxfi_envrcpt.html
index f13626a2191f..9d32e90962c4 100644
--- a/contrib/sendmail/libmilter/docs/xxfi_envrcpt.html
+++ b/contrib/sendmail/libmilter/docs/xxfi_envrcpt.html
@@ -78,17 +78,17 @@ Handle the envelope RCPT command.
<tr>
<th valign="top" align=left>NOTES</th>
<td>For more details on ESTMP responses, please see RFC
-<a href="http://www.cis.ohio-state.edu/rfc/rfc1869.txt">1869</a>.</td>
+<a href="http://www.rfc-editor.org/rfc/rfc1869.txt">1869</a>.</td>
</tr>
</table>
<hr size="1">
<font size="-1">
-Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/xxfi_eoh.html b/contrib/sendmail/libmilter/docs/xxfi_eoh.html
index 46c7925f3080..b745959594c0 100644
--- a/contrib/sendmail/libmilter/docs/xxfi_eoh.html
+++ b/contrib/sendmail/libmilter/docs/xxfi_eoh.html
@@ -43,11 +43,11 @@ Handle the end of message headers.
<hr size="1">
<font size="-1">
-Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/xxfi_eom.html b/contrib/sendmail/libmilter/docs/xxfi_eom.html
index 40f6deec02a6..1c99103cd1e8 100644
--- a/contrib/sendmail/libmilter/docs/xxfi_eom.html
+++ b/contrib/sendmail/libmilter/docs/xxfi_eom.html
@@ -48,11 +48,11 @@ End of a message.
<hr size="1">
<font size="-1">
-Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/xxfi_header.html b/contrib/sendmail/libmilter/docs/xxfi_header.html
index a6c6322b13b7..1be49584c808 100644
--- a/contrib/sendmail/libmilter/docs/xxfi_header.html
+++ b/contrib/sendmail/libmilter/docs/xxfi_header.html
@@ -56,7 +56,7 @@ Handle a message header.
<ul>
<li>Later filters will see header changes/additions made by earlier ones.
<li>For much more detail about header format, please see
-RFC <a href="http://www.cis.ohio-state.edu/htbin/rfc/rfc822.html">822</a>
+RFC <a href="http://www.rfc-editor.org/rfc/rfc822.html">822</a>
</ul>
</td>
</tr>
@@ -64,11 +64,11 @@ RFC <a href="http://www.cis.ohio-state.edu/htbin/rfc/rfc822.html">822</a>
<hr size="1">
<font size="-1">
-Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libmilter/docs/xxfi_helo.html b/contrib/sendmail/libmilter/docs/xxfi_helo.html
index b1aa9e9a8ae9..0eb8df6703cb 100644
--- a/contrib/sendmail/libmilter/docs/xxfi_helo.html
+++ b/contrib/sendmail/libmilter/docs/xxfi_helo.html
@@ -49,11 +49,11 @@ three times</td>
<hr size="1">
<font size="-1">
-Copyright (c) 2000 Sendmail, Inc. and its suppliers.
+Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
By using this file, you agree to the terms and conditions set
-forth in the <a href="LICENSE.txt">LICENSE</a>.
+forth in the LICENSE.
</font>
</body>
</html>
diff --git a/contrib/sendmail/libsm/clock.c b/contrib/sendmail/libsm/clock.c
index 4a8bf3896d0d..970bb1fcf493 100644
--- a/contrib/sendmail/libsm/clock.c
+++ b/contrib/sendmail/libsm/clock.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -12,7 +12,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Id: clock.c,v 1.35.2.2 2002/06/27 23:24:20 gshapiro Exp $")
+SM_RCSID("@(#)$Id: clock.c,v 1.35.2.3 2003/03/03 19:57:40 ca Exp $")
#include <unistd.h>
#include <time.h>
#include <errno.h>
@@ -167,7 +167,7 @@ sm_sigsafe_seteventm(intvl, func, arg)
(void) setitimer(ITIMER_REAL, &itime, NULL);
# else /* SM_CONF_SETITIMER */
intvl = SmEventQueue->ev_time - now;
- (void) alarm((unsigned) intvl < 1 ? 1 : intvl);
+ (void) alarm((unsigned) (intvl < 1 ? 1 : intvl));
# endif /* SM_CONF_SETITIMER */
if (wasblocked == 0)
(void) sm_releasesignal(SIGALRM);
diff --git a/contrib/sendmail/libsm/config.c b/contrib/sendmail/libsm/config.c
index 53cbe3dca4ef..ea6aeb96bcb7 100644
--- a/contrib/sendmail/libsm/config.c
+++ b/contrib/sendmail/libsm/config.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -9,7 +9,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Id: config.c,v 1.27 2002/01/23 17:30:48 gshapiro Exp $")
+SM_RCSID("@(#)$Id: config.c,v 1.27.2.1 2003/03/06 02:16:24 ca Exp $")
#include <stdlib.h>
#include <sm/heap.h>
@@ -197,6 +197,9 @@ char *SmCompileOptions[] =
#if SM_CONF_SETITIMER
"SM_CONF_SETITIMER",
#endif /* SM_CONF_SETITIMER */
+#if SM_CONF_SIGSETJMP
+ "SM_CONF_SIGSETJMP",
+#endif /* SM_CONF_SIGSETJMP */
#if SM_CONF_SHM
"SM_CONF_SHM",
#endif /* SM_CONF_SHM */
diff --git a/contrib/sendmail/src/README b/contrib/sendmail/src/README
index ba9d12692462..7686b6c27947 100644
--- a/contrib/sendmail/src/README
+++ b/contrib/sendmail/src/README
@@ -9,7 +9,7 @@
# the sendmail distribution.
#
#
-# $Id: README,v 8.355.2.13 2003/01/15 19:17:15 ca Exp $
+# $Id: README,v 8.355.2.14 2003/03/27 21:39:29 ca Exp $
#
This directory contains the source files for sendmail(TM).
@@ -478,6 +478,9 @@ USE_ENVIRON Set this to 1 to access process environment variables from
parameter of main().
USE_DOUBLE_FORK By default this is on (1). Set it to 0 to suppress the
extra fork() used to avoid intermediate zombies.
+ALLOW_255 Do not convert (char)0xff to (char)0x7f in headers etc.
+ This can also be done at runtime with the command line
+ option -d82.101.
+-----------------------+
@@ -1794,4 +1797,4 @@ util.c Some general purpose routines used by sendmail.
version.c The version number and information about this
version of sendmail.
-(Version $Revision: 8.355.2.13 $, last update $Date: 2003/01/15 19:17:15 $ )
+(Version $Revision: 8.355.2.14 $, last update $Date: 2003/03/27 21:39:29 $ )
diff --git a/contrib/sendmail/src/collect.c b/contrib/sendmail/src/collect.c
index 6ebd049630ac..0e50ca0649d0 100644
--- a/contrib/sendmail/src/collect.c
+++ b/contrib/sendmail/src/collect.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Id: collect.c,v 8.242.2.3 2002/12/03 17:06:30 gshapiro Exp $")
+SM_RCSID("@(#)$Id: collect.c,v 8.242.2.4 2003/03/28 17:34:39 ca Exp $")
static void collecttimeout __P((time_t));
static void dferror __P((SM_FILE_T *volatile, char *, ENVELOPE *));
@@ -444,6 +444,7 @@ collect(fp, smtpmode, hdrp, e)
OpMode != MD_ARPAFTP))
{
+ SM_ASSERT(pbp < peekbuf + sizeof(peekbuf));
*pbp++ = c;
c = '.';
}
@@ -455,11 +456,14 @@ collect(fp, smtpmode, hdrp, e)
else
{
/* push back the ".\rx" */
+ SM_ASSERT(pbp < peekbuf + sizeof(peekbuf));
*pbp++ = c;
if (OpMode != MD_SMTP &&
OpMode != MD_DAEMON &&
OpMode != MD_ARPAFTP)
{
+ SM_ASSERT(pbp < peekbuf +
+ sizeof(peekbuf));
*pbp++ = '\r';
c = '.';
}
@@ -625,6 +629,7 @@ nextstate:
}
/* trim off trailing CRLF or NL */
+ SM_ASSERT(bp > buf);
if (*--bp != '\n' || *--bp != '\r')
bp++;
*bp = '\0';
diff --git a/contrib/sendmail/src/deliver.c b/contrib/sendmail/src/deliver.c
index 2cb6e3f6e001..af6e41f5201c 100644
--- a/contrib/sendmail/src/deliver.c
+++ b/contrib/sendmail/src/deliver.c
@@ -14,7 +14,7 @@
#include <sendmail.h>
#include <sys/time.h>
-SM_RCSID("@(#)$Id: deliver.c,v 8.940.2.15 2003/02/07 17:57:43 ca Exp $")
+SM_RCSID("@(#)$Id: deliver.c,v 8.940.2.18 2003/03/28 17:34:39 ca Exp $")
#if HASSETUSERCONTEXT
# include <login_cap.h>
@@ -1158,7 +1158,7 @@ coloncmp(a, b)
/* Need to account for IPv6 bracketed addresses */
if (*a == '[')
braclev++;
- else if (*a == '[' && braclev > 0)
+ else if (*a == ']' && braclev > 0)
braclev--;
else if (*a == ':' && braclev <= 0)
{
@@ -1626,7 +1626,7 @@ deliver(e, firstto)
}
#if _FFR_STRIPBACKSL
/*
- ** Strip one leading backslash if requesting and the
+ ** Strip one leading backslash if requested and the
** next character is alphanumerical (the latter can
** probably relaxed a bit, see RFC2821).
*/
@@ -4719,7 +4719,11 @@ putbody(mci, e, separator)
{
pos += bp - buf;
if (c != '\r')
+ {
+ SM_ASSERT(pbp < peekbuf +
+ sizeof(peekbuf));
*pbp++ = c;
+ }
}
bp = buf;
@@ -4759,6 +4763,7 @@ putbody(mci, e, separator)
}
/* had a naked carriage return */
+ SM_ASSERT(pbp < peekbuf + sizeof(peekbuf));
*pbp++ = c;
c = '\r';
ostate = OS_INLINE;
@@ -4787,7 +4792,11 @@ putch:
else if ((d = sm_io_getc(e->e_dfp,
SM_TIME_DEFAULT))
!= SM_IO_EOF)
+ {
+ SM_ASSERT(pbp < peekbuf +
+ sizeof(peekbuf));
*pbp++ = d;
+ }
if (d == '\n' || d == SM_IO_EOF)
{
@@ -4837,6 +4846,8 @@ putch:
mci->mci_mailer->m_eol);
}
ostate = OS_HEAD;
+ SM_ASSERT(pbp < peekbuf +
+ sizeof(peekbuf));
*pbp++ = c;
continue;
}
diff --git a/contrib/sendmail/src/main.c b/contrib/sendmail/src/main.c
index e79d92358b0f..dbe9ce56935c 100644
--- a/contrib/sendmail/src/main.c
+++ b/contrib/sendmail/src/main.c
@@ -25,7 +25,7 @@ SM_UNUSED(static char copyright[]) =
The Regents of the University of California. All rights reserved.\n";
#endif /* ! lint */
-SM_RCSID("@(#)$Id: main.c,v 8.887.2.20 2003/02/07 17:57:44 ca Exp $")
+SM_RCSID("@(#)$Id: main.c,v 8.887.2.22 2003/03/06 18:38:08 ca Exp $")
#if NETINET || NETINET6
@@ -128,6 +128,7 @@ int SyslogPrefixLen; /* estimated length of syslog prefix */
{ \
if (extraprivs && \
OpMode != MD_DELIVER && OpMode != MD_SMTP && \
+ OpMode != MD_ARPAFTP && \
OpMode != MD_VERIFY && OpMode != MD_TEST) \
{ \
(void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, \
@@ -392,6 +393,7 @@ main(argc, argv, envp)
# endif /* ! OPTIONS */
#endif /* _FFR_QUARANTINE */
+ /* Set to 0 to allow -b; need to check optarg before using it! */
opterr = 0;
while ((j = getopt(argc, argv, OPTIONS)) != -1)
{
@@ -442,6 +444,13 @@ main(argc, argv, envp)
break;
case 'L':
+ if (optarg == NULL)
+ {
+ (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT,
+ "option requires an argument -- '%c'",
+ (char) j);
+ return EX_USAGE;
+ }
j = SM_MIN(strlen(optarg), 24) + 1;
sysloglabel = xalloc(j);
(void) sm_strlcpy(sysloglabel, optarg, j);
diff --git a/contrib/sendmail/src/milter.c b/contrib/sendmail/src/milter.c
index 305c3041a93f..077578b60c85 100644
--- a/contrib/sendmail/src/milter.c
+++ b/contrib/sendmail/src/milter.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2003 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -10,7 +10,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Id: milter.c,v 8.197.2.6 2002/12/30 05:54:00 ca Exp $")
+SM_RCSID("@(#)$Id: milter.c,v 8.197.2.7 2003/03/22 18:54:25 ca Exp $")
#if MILTER
# include <libmilter/mfapi.h>
@@ -46,8 +46,18 @@ static char *MilterEnvRcptMacros[MAXFILTERMACROS + 1];
}
# if _FFR_QUARANTINE
-# define MILTER_CHECK_ERROR(action) \
- if (tTd(71, 101)) \
+# define MILTER_CHECK_ERROR(initial, action) \
+ if (!initial && tTd(71, 100)) \
+ { \
+ if (e->e_quarmsg == NULL) \
+ { \
+ e->e_quarmsg = sm_rpool_strdup_x(e->e_rpool, \
+ "filter failure"); \
+ macdefine(&e->e_macro, A_PERM, macid("{quarantine}"), \
+ e->e_quarmsg); \
+ } \
+ } \
+ else if (tTd(71, 101)) \
{ \
if (e->e_quarmsg == NULL) \
{ \
@@ -64,7 +74,7 @@ static char *MilterEnvRcptMacros[MAXFILTERMACROS + 1];
else \
action;
# else /* _FFR_QUARANTINE */
-# define MILTER_CHECK_ERROR(action) \
+# define MILTER_CHECK_ERROR(initial, action) \
if (bitnset(SMF_TEMPFAIL, m->mf_flags)) \
*state = SMFIR_TEMPFAIL; \
else if (bitnset(SMF_REJECT, m->mf_flags)) \
@@ -1915,7 +1925,7 @@ milter_send_command(m, command, data, sz, e, state)
m->mf_timeout[SMFTO_WRITE], e);
if (m->mf_state == SMFS_ERROR)
{
- MILTER_CHECK_ERROR(return NULL);
+ MILTER_CHECK_ERROR(false, return NULL);
return NULL;
}
@@ -1924,7 +1934,7 @@ milter_send_command(m, command, data, sz, e, state)
m->mf_timeout[SMFTO_READ], e);
if (m->mf_state == SMFS_ERROR)
{
- MILTER_CHECK_ERROR(return NULL);
+ MILTER_CHECK_ERROR(false, return NULL);
return NULL;
}
@@ -2043,7 +2053,7 @@ milter_command(command, data, sz, macros, e, state)
/* previous problem? */
if (m->mf_state == SMFS_ERROR)
{
- MILTER_CHECK_ERROR(continue);
+ MILTER_CHECK_ERROR(false, continue);
break;
}
@@ -2058,7 +2068,7 @@ milter_command(command, data, sz, macros, e, state)
milter_send_macros(m, macros, command, e);
if (m->mf_state == SMFS_ERROR)
{
- MILTER_CHECK_ERROR(continue);
+ MILTER_CHECK_ERROR(false, continue);
break;
}
}
@@ -3062,7 +3072,7 @@ milter_init(e, state)
m->mf_sock = milter_open(m, false, e);
if (m->mf_state == SMFS_ERROR)
{
- MILTER_CHECK_ERROR(continue);
+ MILTER_CHECK_ERROR(true, continue);
break;
}
@@ -3084,7 +3094,7 @@ milter_init(e, state)
/* if negotation failure, close socket */
milter_error(m, e);
- MILTER_CHECK_ERROR(continue);
+ MILTER_CHECK_ERROR(true, continue);
}
if (MilterLogLevel > 9)
sm_syslog(LOG_INFO, e->e_id,
@@ -3541,7 +3551,7 @@ milter_data(e, state)
/* previous problem? */
if (m->mf_state == SMFS_ERROR)
{
- MILTER_CHECK_ERROR(continue);
+ MILTER_CHECK_ERROR(false, continue);
break;
}
@@ -3602,7 +3612,7 @@ milter_data(e, state)
"milter_data(%s): EOM ACK/NAK timeout",
m->mf_name);
milter_error(m, e);
- MILTER_CHECK_ERROR(break);
+ MILTER_CHECK_ERROR(false, break);
break;
}
@@ -3790,7 +3800,7 @@ milter_data(e, state)
if (m->mf_state == SMFS_ERROR)
{
- MILTER_CHECK_ERROR(continue);
+ MILTER_CHECK_ERROR(false, continue);
goto finishup;
}
}
diff --git a/contrib/sendmail/src/parseaddr.c b/contrib/sendmail/src/parseaddr.c
index 296d01cfb119..6acc86de20fd 100644
--- a/contrib/sendmail/src/parseaddr.c
+++ b/contrib/sendmail/src/parseaddr.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Id: parseaddr.c,v 8.359.2.4 2003/01/18 00:41:48 gshapiro Exp $")
+SM_RCSID("@(#)$Id: parseaddr.c,v 8.359.2.6 2003/03/27 02:39:53 ca Exp $")
static void allocaddr __P((ADDRESS *, int, char *, ENVELOPE *));
static int callsubr __P((char**, int, ENVELOPE *));
@@ -608,7 +608,7 @@ unsigned char TokTypeNoC[256] =
};
-#define NOCHAR -1 /* signal nothing in lookahead token */
+#define NOCHAR (-1) /* signal nothing in lookahead token */
char **
prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab)
@@ -694,6 +694,7 @@ prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab)
/* see if there is room */
if (q >= &pvpbuf[pvpbsize - 5])
{
+ addrtoolong:
usrerr("553 5.1.1 Address too long");
if (strlen(addr) > MAXNAME)
addr[MAXNAME] = '\0';
@@ -705,11 +706,15 @@ prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab)
}
/* squirrel it away */
+#if !ALLOW_255
+ if ((char) c == (char) -1 && !tTd(82, 101))
+ c &= 0x7f;
+#endif /* !ALLOW_255 */
*q++ = c;
}
/* read a new input character */
- c = *p++;
+ c = (*p++) & 0x00ff;
if (c == '\0')
{
/* diagnose and patch up bad syntax */
@@ -764,6 +769,9 @@ prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab)
}
else if (c != '!' || state == QST)
{
+ /* see if there is room */
+ if (q >= &pvpbuf[pvpbsize - 5])
+ goto addrtoolong;
*q++ = '\\';
continue;
}
@@ -849,6 +857,9 @@ prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab)
/* new token */
if (tok != q)
{
+ /* see if there is room */
+ if (q >= &pvpbuf[pvpbsize - 5])
+ goto addrtoolong;
*q++ = '\0';
if (tTd(22, 36))
{
diff --git a/contrib/sendmail/src/queue.c b/contrib/sendmail/src/queue.c
index 0d618ed68ac2..b488b5f9f64e 100644
--- a/contrib/sendmail/src/queue.c
+++ b/contrib/sendmail/src/queue.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Id: queue.c,v 8.863.2.28 2003/02/11 17:17:22 ca Exp $")
+SM_RCSID("@(#)$Id: queue.c,v 8.863.2.30 2003/03/20 00:20:16 ca Exp $")
#include <dirent.h>
@@ -32,11 +32,11 @@ SM_RCSID("@(#)$Id: queue.c,v 8.863.2.28 2003/02/11 17:17:22 ca Exp $")
#if _FFR_QUEUEDELAY
# define QF_VERSION 7 /* version number of this queue format */
static time_t queuedelay __P((ENVELOPE *));
-#define queuedelay_qfver_unsupported(qfver) false
+# define queuedelay_qfver_unsupported(qfver) false
#else /* _FFR_QUEUEDELAY */
# define QF_VERSION 6 /* version number of this queue format */
# define queuedelay(e) MinQueueAge
-#define queuedelay_qfver_unsupported(qfver) ((qfver) == 5 || (qfver) == 7)
+# define queuedelay_qfver_unsupported(qfver) ((qfver) == 5 || (qfver) == 7)
#endif /* _FFR_QUEUEDELAY */
#if _FFR_QUARANTINE
static char queue_letter __P((ENVELOPE *, int));
@@ -219,7 +219,7 @@ int *PRSATmpCnt;
/* offset for queue_shm */
# define OFF_QUEUE_SHM(p) (((char *) (p)) + SHM_OFF_HEAD + sizeof(FileSys) + sizeof(int) * 2)
-#define QSHM_ENTRIES(i) QShm[i].qs_entries
+# define QSHM_ENTRIES(i) QShm[i].qs_entries
/* basic size of shared memory segment */
# define SM_T_SIZE (SHM_OFF_HEAD + sizeof(FileSys) + sizeof(int) * 2)
@@ -3316,8 +3316,8 @@ strrev(fwd)
#if _FFR_RHS
-#define NASCII 128
-#define NCHAR 256
+# define NASCII 128
+# define NCHAR 256
static unsigned char ShuffledAlphabet[NCHAR];
diff --git a/contrib/sendmail/src/readcf.c b/contrib/sendmail/src/readcf.c
index b52726540d92..f3e72ad71484 100644
--- a/contrib/sendmail/src/readcf.c
+++ b/contrib/sendmail/src/readcf.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Id: readcf.c,v 8.607.2.7 2002/11/10 19:13:11 ca Exp $")
+SM_RCSID("@(#)$Id: readcf.c,v 8.607.2.8 2003/03/12 22:42:52 gshapiro Exp $")
#if NETINET || NETINET6
# include <arpa/inet.h>
@@ -3976,6 +3976,12 @@ static struct timeoutinfo
{ "starttls", TO_STARTTLS },
#define TO_ACONNECT 0x23
{ "aconnect", TO_ACONNECT },
+#if _FFR_QUEUERETURN_DSN
+# define TO_QUEUEWARN_DSN 0x24
+ { "queuewarn.dsn", TO_QUEUEWARN_DSN },
+# define TO_QUEUERETURN_DSN 0x25
+ { "queuereturn.dsn", TO_QUEUERETURN_DSN },
+#endif /* _FFR_QUEUERETURN_DSN */
{ NULL, 0 },
};
@@ -4094,6 +4100,9 @@ settimeout(name, val, sticky)
TimeOuts.to_q_warning[TOC_NORMAL] = toval;
TimeOuts.to_q_warning[TOC_URGENT] = toval;
TimeOuts.to_q_warning[TOC_NONURGENT] = toval;
+#if _FFR_QUEUERETURN_DSN
+ TimeOuts.to_q_warning[TOC_DSN] = toval;
+#endif /* _FFR_QUEUERETURN_DSN */
addopts = 2;
break;
@@ -4112,11 +4121,21 @@ settimeout(name, val, sticky)
TimeOuts.to_q_warning[TOC_NONURGENT] = toval;
break;
+#if _FFR_QUEUERETURN_DSN
+ case TO_QUEUEWARN_DSN:
+ toval = convtime(val, 'h');
+ TimeOuts.to_q_warning[TOC_DSN] = toval;
+ break;
+#endif /* _FFR_QUEUERETURN_DSN */
+
case TO_QUEUERETURN:
toval = convtime(val, 'd');
TimeOuts.to_q_return[TOC_NORMAL] = toval;
TimeOuts.to_q_return[TOC_URGENT] = toval;
TimeOuts.to_q_return[TOC_NONURGENT] = toval;
+#if _FFR_QUEUERETURN_DSN
+ TimeOuts.to_q_return[TOC_DSN] = toval;
+#endif /* _FFR_QUEUERETURN_DSN */
addopts = 2;
break;
@@ -4135,6 +4154,13 @@ settimeout(name, val, sticky)
TimeOuts.to_q_return[TOC_NONURGENT] = toval;
break;
+#if _FFR_QUEUERETURN_DSN
+ case TO_QUEUERETURN_DSN:
+ toval = convtime(val, 'd');
+ TimeOuts.to_q_return[TOC_DSN] = toval;
+ break;
+#endif /* _FFR_QUEUERETURN_DSN */
+
case TO_HOSTSTATUS:
MciInfoTimeout = toval;
break;
diff --git a/contrib/sendmail/src/sendmail.h b/contrib/sendmail/src/sendmail.h
index 2bfad159428e..1092398132c7 100644
--- a/contrib/sendmail/src/sendmail.h
+++ b/contrib/sendmail/src/sendmail.h
@@ -48,7 +48,7 @@
#ifdef _DEFINE
# ifndef lint
-SM_UNUSED(static char SmailId[]) = "@(#)$Id: sendmail.h,v 8.919.2.16 2003/01/18 00:41:50 gshapiro Exp $";
+SM_UNUSED(static char SmailId[]) = "@(#)$Id: sendmail.h,v 8.919.2.17 2003/03/12 22:42:52 gshapiro Exp $";
# endif /* ! lint */
#endif /* _DEFINE */
@@ -2021,6 +2021,9 @@ EXTERN struct
#define TOC_NORMAL 0 /* normal delivery */
#define TOC_URGENT 1 /* urgent delivery */
#define TOC_NONURGENT 2 /* non-urgent delivery */
+#if _FFR_QUEUERETURN_DSN
+# define TOC_DSN 3 /* DSN delivery */
+#endif /* _FFR_QUEUERETURN_DSN */
/* resolver timeout specifiers */
#define RES_TO_FIRST 0 /* first attempt */
diff --git a/contrib/sendmail/src/sm_resolve.c b/contrib/sendmail/src/sm_resolve.c
index a6f5862262e8..8828fd162546 100644
--- a/contrib/sendmail/src/sm_resolve.c
+++ b/contrib/sendmail/src/sm_resolve.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -46,7 +46,7 @@
# if NAMED_BIND
# include "sm_resolve.h"
-SM_RCSID("$Id: sm_resolve.c,v 8.24.4.6 2002/06/25 04:22:41 ca Exp $")
+SM_RCSID("$Id: sm_resolve.c,v 8.24.4.7 2003/03/22 22:55:37 ca Exp $")
static struct stot
{
@@ -172,10 +172,10 @@ parse_dns_reply(data, len)
DNS_REPLY_T *r;
RESOURCE_RECORD_T **rr;
- r = (DNS_REPLY_T *) xalloc(sizeof(*r));
- memset(r, 0, sizeof(*r));
+ r = (DNS_REPLY_T *) sm_malloc(sizeof(*r));
if (r == NULL)
return NULL;
+ memset(r, 0, sizeof(*r));
p = data;
@@ -227,12 +227,13 @@ parse_dns_reply(data, len)
dns_free_data(r);
return NULL;
}
- *rr = (RESOURCE_RECORD_T *) xalloc(sizeof(**rr));
+ *rr = (RESOURCE_RECORD_T *) sm_malloc(sizeof(**rr));
if (*rr == NULL)
{
dns_free_data(r);
return NULL;
}
+ memset(*rr, 0, sizeof(**rr));
(*rr)->rr_domain = sm_strdup(host);
if ((*rr)->rr_domain == NULL)
{
@@ -274,7 +275,7 @@ parse_dns_reply(data, len)
}
l = strlen(host) + 1;
(*rr)->rr_u.rr_mx = (MX_RECORD_T *)
- xalloc(sizeof(*((*rr)->rr_u.rr_mx)) + l);
+ sm_malloc(sizeof(*((*rr)->rr_u.rr_mx)) + l);
if ((*rr)->rr_u.rr_mx == NULL)
{
dns_free_data(r);
@@ -295,7 +296,7 @@ parse_dns_reply(data, len)
}
l = strlen(host) + 1;
(*rr)->rr_u.rr_srv = (SRV_RECORDT_T*)
- xalloc(sizeof(*((*rr)->rr_u.rr_srv)) + l);
+ sm_malloc(sizeof(*((*rr)->rr_u.rr_srv)) + l);
if ((*rr)->rr_u.rr_srv == NULL)
{
dns_free_data(r);
@@ -330,7 +331,7 @@ parse_dns_reply(data, len)
dns_free_data(r);
return NULL;
}
- (*rr)->rr_u.rr_txt = (char *) xalloc(txtlen + 1);
+ (*rr)->rr_u.rr_txt = (char *) sm_malloc(txtlen + 1);
if ((*rr)->rr_u.rr_txt == NULL)
{
dns_free_data(r);
@@ -341,8 +342,8 @@ parse_dns_reply(data, len)
break;
default:
- (*rr)->rr_u.rr_data = (unsigned char*) xalloc(size);
- if (size != 0 && (*rr)->rr_u.rr_data == NULL)
+ (*rr)->rr_u.rr_data = (unsigned char*) sm_malloc(size);
+ if ((*rr)->rr_u.rr_data == NULL)
{
dns_free_data(r);
return NULL;
diff --git a/contrib/sendmail/src/srvrsmtp.c b/contrib/sendmail/src/srvrsmtp.c
index 2be4d65e018f..a7f03dd4a7af 100644
--- a/contrib/sendmail/src/srvrsmtp.c
+++ b/contrib/sendmail/src/srvrsmtp.c
@@ -16,7 +16,7 @@
# include <libmilter/mfdef.h>
#endif /* MILTER */
-SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.829.2.21 2003/01/15 19:17:14 ca Exp $")
+SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.829.2.22 2003/02/19 02:45:40 ca Exp $")
#if SASL || STARTTLS
# include <sys/time.h>
@@ -517,8 +517,6 @@ smtp(nullserver, d_flags, e)
}
hostname = macvalue('j', e);
-
-
#if SASL
sasl_ok = bitset(SRV_OFFER_AUTH, features);
n_mechs = 0;
diff --git a/contrib/sendmail/src/tls.c b/contrib/sendmail/src/tls.c
index 10a6fe2a7ed2..a74c69128375 100644
--- a/contrib/sendmail/src/tls.c
+++ b/contrib/sendmail/src/tls.c
@@ -10,7 +10,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Id: tls.c,v 8.79.4.2 2003/01/23 23:16:24 ca Exp $")
+SM_RCSID("@(#)$Id: tls.c,v 8.79.4.4 2003/03/20 00:03:42 ca Exp $")
#if STARTTLS
# include <openssl/err.h>
diff --git a/contrib/sendmail/src/usersmtp.c b/contrib/sendmail/src/usersmtp.c
index 3a7d54fdba3f..59a23e97bcf4 100644
--- a/contrib/sendmail/src/usersmtp.c
+++ b/contrib/sendmail/src/usersmtp.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Id: usersmtp.c,v 8.437.2.8 2002/12/12 17:40:07 ca Exp $")
+SM_RCSID("@(#)$Id: usersmtp.c,v 8.437.2.9 2003/03/15 23:57:52 gshapiro Exp $")
#include <sysexits.h>
@@ -2823,6 +2823,7 @@ smtpgetstat(m, mci, e)
ENVELOPE *e;
{
int r;
+ int off;
int status, xstat;
char *enhsc;
@@ -2844,13 +2845,12 @@ smtpgetstat(m, mci, e)
else
status = EX_PROTOCOL;
if (bitset(MCIF_ENHSTAT, mci->mci_flags) &&
- (r = isenhsc(SmtpReplyBuffer + 4, ' ')) > 0)
- r += 5;
+ (off = isenhsc(SmtpReplyBuffer + 4, ' ')) > 0)
+ off += 5;
else
- r = 4;
- e->e_statmsg = sm_rpool_strdup_x(e->e_rpool, &SmtpReplyBuffer[r]);
- mci_setstat(mci, xstat, ENHSCN(enhsc, smtptodsn(r)),
- SmtpReplyBuffer);
+ off = 4;
+ e->e_statmsg = sm_rpool_strdup_x(e->e_rpool, &SmtpReplyBuffer[off]);
+ mci_setstat(mci, xstat, ENHSCN(enhsc, smtptodsn(r)), SmtpReplyBuffer);
if (LogLevel > 1 && status == EX_PROTOCOL)
{
sm_syslog(LOG_CRIT, e->e_id,
diff --git a/contrib/sendmail/src/version.c b/contrib/sendmail/src/version.c
index d8a2983d3fd3..da877d7228a1 100644
--- a/contrib/sendmail/src/version.c
+++ b/contrib/sendmail/src/version.c
@@ -13,6 +13,6 @@
#include <sm/gen.h>
-SM_RCSID("@(#)$Id: version.c,v 8.104.2.14 2003/01/15 17:55:43 ca Exp $")
+SM_RCSID("@(#)$Id: version.c,v 8.104.2.15 2003/03/19 21:19:53 ca Exp $")
-char Version[] = "8.12.8";
+char Version[] = "8.12.9";