Merge sendmail 8.14.3 into HEAD.

Note: As the first merge since the conversion to svn, it includes many
propset changes to get the proper svn:eol-style and svn:mime-type on the
files (as merged from the fixed up vendor/dist area).

MFC after:	3 days
This commit is contained in:
gshapiro 2008-08-28 06:08:29 +00:00
parent db890a1eb5
commit b1e5c9c5e5
43 changed files with 416 additions and 156 deletions

View File

@ -47,6 +47,17 @@ This list is not guaranteed to be complete.
but some characters might be lost. Fix: obey RFC (2)822 and do not
send lines that are longer than 1000 characters.
* milter communication fails if a single header is larger than 64K.
If a single header is larger than 64KB (which is not possible in the
default configuration) then it cannot be transferred in one block to
libmilter and hence the communication fails. This can be avoided by
increasing the constant MILTER_CHUNK_SIZE in
include/libmilter/mfdef.h and recompiling sendmail, libmilter, and
all (statically linked) milters (or by using an undocumented compile
time option: _FFR_MAXDATASIZE; you have to read the source code in
order to use this properly).
* Sender addresses whose domain part cause a temporary A record lookup
failure but have a valid MX record will be temporarily rejected in
the default configuration. Solution: fix the DNS at the sender side.
@ -247,4 +258,4 @@ Kresolve sequence dnsmx canon
be used if set instead of LOCAL_RELAY ($R). This will be fixed in a
future version.
$Revision: 8.59 $, Last updated $Date: 2007/02/21 23:13:58 $
$Revision: 8.60 $, Last updated $Date: 2007/12/04 01:16:50 $

View File

@ -141,6 +141,69 @@ gpExpdV7qPrw9k01j5rod5PjZlG8zV0=
=SR28
-----END PGP PUBLIC KEY BLOCK-----
Type Bits KeyID Created Expires Algorithm Use
pub 1024 0xF6B30729 2008-01-18 ---------- RSA Sign & Encrypt
f16 Fingerprint16 = 07 FB 9A F9 F7 94 4B E4 0F 28 D1 8E 23 6F A2 B0
uid Sendmail Signing Key/2008 <sendmail@Sendmail.ORG>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.8 (Darwin)
mQCNA0eP9NsAAAEEAM5xPc5UXm01Mnqad8NPc5RkbeWcotxNOZXwrz4qQM6sr/E2
lEMGgo5FOjWJX3tjtys8gfXZJihz3XMD5RleniW3RIhc2tb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oJer1hTKCsu58Lqrv
=jDs3
-----END PGP PUBLIC KEY BLOCK-----
Type Bits KeyID Created Expires Algorithm Use
pub 1024 0x7093B841 2006-12-16 ---------- RSA Sign & Encrypt
f16 Fingerprint16 = D9 FD C5 6B EE 1E 7A A8 CE 27 D9 B9 55 8B 56 B6
@ -1729,4 +1792,4 @@ DnF3FZZEzV7oqPwC2jzv/1dD6GFhtgy0cnyoPGUJCyc=
=nES8
-----END PGP PUBLIC KEY BLOCK-----
$Revision: 8.25 $, Last updated $Date: 2007/01/02 22:38:08 $
$Revision: 8.26 $, Last updated $Date: 2008/01/22 06:20:27 $

View File

@ -312,7 +312,7 @@ nicer to animals and plants. If the Berkeley DB include files
are installed in a location other than those which your compiler searches,
you will need to provide that directory when building:
Build -I/path/to/include/directory
./Build -I/path/to/include/directory
If you are using Berkeley DB versions 1.85 or 1.86, you are *strongly*
urged to upgrade to DB version 2 or later, available from
@ -464,4 +464,4 @@ sendmail Source for the sendmail program itself.
test Some test scripts (currently only for compilation aids).
vacation Source for the vacation program. NOT PART OF SENDMAIL!
$Revision: 8.93 $, Last updated $Date: 2005/09/16 20:08:50 $
$Revision: 8.94 $, Last updated $Date: 2008/02/12 16:40:05 $

View File

@ -1,11 +1,47 @@
SENDMAIL RELEASE NOTES
$Id: RELEASE_NOTES,v 8.1909 2007/10/31 16:04:13 ca Exp $
$Id: RELEASE_NOTES,v 8.1926 2008/05/03 03:34: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.14.3/8.14.3 2008/05/03
During ruleset processing the generation of a key for a map
lookup and the parsing of the default value was broken
for some macros, e.g., $|, which caused the BlankSub
character to be inserted into the workspace and thus
failures, e.g., rules that should have matched did not.
8.14.2 caused a regression: it accessed (macro) storage which was
freed before. First instance of the problem reported by
Matthew Dillon of DragonFlyBSD; variations of the same
bug reported by Todd C. Miller of OpenBSD, Moritz
Jodeit, and Dave Hayes.
Improve pathname length checks for persistent host status. Patch
from Joerg Sonnenberger of DragonFlyBSD.
Reword misleading SMTP reply text for FEATURE(`badmx'). Problem
noted by Beth Halsema.
The read timeout was fixed to be Timeout.datablock if STARTTLS
was activated. This may cause problems if that value
is lowered from its default. Problem noted by Jens Elkner.
CONFIG: Using LOCAL_TLS_CLIENT caused the tls_client ruleset
to operate incorrectly. Problem found by Werner Wiethege.
LIBMILTER: Omitting some protocol steps via the xxfi_negotiate()
callback did not work properly. The patchlevel of
libmilter has been set to 1 so a milter can determine
whether libmilter contains this fix.
MAKEMAP: If a delimiter is specified (-t) use that also when
dumping a map. Patch from Todd C. Miller of OpenBSD.
Portability:
Add support for Darwin 9.x (Mac OS X 10.5).
Support shared libraries in Darwin 8 and 9. Patch from
Chris Behrens of Concentric.
Add support for SCO OpenServer 6, patch from Boyd Gerber.
DEVTOOLS: Clarify that confSHAREDLIBDIR requires a trailing path.
Added Files:
devtools/OS/Darwin.9.x
devtools/OS/OSR.i386
8.14.2/8.14.2 2007/11/01
If a message was queued and it contained 8 bit characters in
a From: or To: header, then those characters could be
@ -24,7 +60,7 @@ summary of the changes in that release.
Prior to 8.14 this happened only if milter could delete
recipients.
ClientRate should trigger when the limit was exceeded (as
documented), not when it was reached. Patch from
documented), not when it was reached. Patch from
John Beck of Sun Microsystems.
Force a queue run for -qGqueuegroup even if no runners are
specified (R=0) and forking (F=f) is requested.

View File

@ -1008,7 +1008,9 @@ virtusertable A domain-specific form of aliasing, allowing multiple
MASQUERADE_DOMAIN_FILE, see below). If VIRTUSER_DOMAIN or
VIRTUSER_DOMAIN_FILE is used, then the entries of class
{VirtHost} are added to class {R}, i.e., relaying is allowed
to (and from) those domains. The default map definition is:
to (and from) those domains, which by default includes also
all subdomains (see relay_hosts_only). The default map
definition is:
hash /etc/mail/virtusertable
@ -4699,4 +4701,4 @@ M4 DIVERSIONS
8 DNS based blacklists
9 special local rulesets (1 and 2)
$Revision: 8.722 $, Last updated $Date: 2007/04/03 21:26:58 $
$Revision: 8.724 $, Last updated $Date: 2008/02/15 23:05:32 $

View File

@ -16,8 +16,8 @@
#####
##### SENDMAIL CONFIGURATION FILE
#####
##### built by ca@nother.smi.sendmail.com on Wed Oct 31 09:24:27 PDT 2007
##### in /extra/home/ca/sm-8.14.2/OpenSource/sendmail-8.14.2/cf/cf
##### built by ca@wiz.smi.sendmail.com on Fri May 2 20:39:00 PDT 2008
##### in /extra/home/ca/sm-8.14.3/OpenSource/sendmail-8.14.3/cf/cf
##### using ../ as configuration include directory
#####
######################################################################
@ -35,7 +35,7 @@
##### $Id: no_default_msa.m4,v 8.2 2001/02/14 05:03:22 gshapiro Exp $ #####
##### $Id: proto.m4,v 8.732 2007/04/20 00:53:30 ca Exp $ #####
##### $Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $ #####
# level 10 config file format
V10/Berkeley
@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1]
# Configuration version number
DZ8.14.2/Submit
DZ8.14.3/Submit
###############

View File

@ -13,7 +13,7 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: proto.m4,v 8.732 2007/04/20 00:53:30 ca Exp $')
VERSIONID(`$Id: proto.m4,v 8.734 2008/01/24 23:42:01 ca Exp $')
# level CF_LEVEL config file format
V`'CF_LEVEL/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley')
@ -1956,7 +1956,7 @@ R<MX><$+><:$*<TEMP>:><$*> $#error $@ 4.1.2 $: "450 MX lookup failure for "$1
# Recursively run badmx check on each mx.
R<MX><$*><:$+:$*><:$*> <MX><$1><:$3><: $4 $(badmx $2 $):>
# See if any of them fail.
R<MX><$*><$*><$*<BADMX>:$*> $#error $@ 5.1.2 $:"550 Illegal MX record for recipient host "$1
R<MX><$*><$*><$*<BADMX>:$*> $#error $@ 5.1.2 $:"550 Illegal MX record for host "$1
# Reverse the mxlists so we can use the same argument order again.
R<MX><$*><$*><$*> $:<MX><$1><$3><$2>
R<MX><$*><:$+:$*><:$*> <MX><$1><:$3><:$4 $(dnsA $2 $) :>
@ -1965,7 +1965,7 @@ R<MX><$*><:$+:$*><:$*> <MX><$1><:$3><:$4 $(dnsA $2 $) :>
R<MX><$*><$*><$*> $:<MX><$1><$3><$2>
R<MX><$*><:$+:$*><:$*> <MX><$1><:$3><:$4 $(BadMXIP $2 $) :>
R<MX><$*><$*><$*<BADMXIP>:$*> $#error $@ 5.1.2 $:"550 Invalid MX record for recipient host "$1',
R<MX><$*><$*><$*<BADMXIP>:$*> $#error $@ 5.1.2 $:"550 Invalid MX record for host "$1',
`dnl')
@ -2686,9 +2686,9 @@ dnl MAIL: called from check_mail
dnl STARTTLS: called from smtp() after STARTTLS has been accepted
Stls_client
ifdef(`_LOCAL_TLS_CLIENT_', `dnl
R$* $: $1 $| $>"Local_tls_client" $1
R$* $| $#$* $#$2
R$* $| $* $: $1', `dnl')
R$* $: $1 <?> $>"Local_tls_client" $1
R$* <?> $#$* $#$2
R$* <?> $* $: $1', `dnl')
ifdef(`_ACCESS_TABLE_', `dnl
dnl store name of other side
R$* $: $(macro {TLS_Name} $@ $&{server_name} $) $1

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2008 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -11,8 +11,8 @@ divert(-1)
# the sendmail distribution.
#
#
VERSIONID(`$Id: version.m4,v 8.186 2007/10/31 16:04:13 ca Exp $')
VERSIONID(`$Id: version.m4,v 8.195 2008/04/17 17:04:30 ca Exp $')
#
divert(0)
# Configuration version number
DZ8.14.2`'ifdef(`confCF_VERSION', `/confCF_VERSION')
DZ8.14.3`'ifdef(`confCF_VERSION', `/confCF_VERSION')

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999-2004, 2006 Sendmail, Inc. and its suppliers.
* Copyright (c) 1999-2004, 2006, 2008 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: mfapi.h,v 8.77 2006/11/02 02:44:07 ca Exp $
* $Id: mfapi.h,v 8.78 2008/02/27 22:30:34 ca Exp $
*/
/*
@ -18,7 +18,7 @@
# define _LIBMILTER_MFAPI_H 1
#ifndef SMFI_VERSION
# define SMFI_VERSION 0x01000000 /* libmilter version number */
# define SMFI_VERSION 0x01000001 /* libmilter version number */
#endif /* ! SMFI_VERSION */
#define SM_LM_VRS_MAJOR(v) (((v) & 0x7f000000) >> 24)

View File

@ -1,4 +1,4 @@
dnl $Id: Makefile.m4,v 8.78 2007/02/05 19:21:29 ca Exp $
dnl $Id: Makefile.m4,v 8.80 2008/04/08 05:23:44 ca Exp $
include(confBUILDTOOLSDIR`/M4/switch.m4')
dnl only required for compilation of EXTRAS

View File

@ -2,7 +2,7 @@
<HEAD><TITLE>smfi_opensocket</TITLE></HEAD>
<BODY>
<!--
$Id: smfi_opensocket.html,v 1.6 2006/12/21 18:30:35 ca Exp $
$Id: smfi_opensocket.html,v 1.7 2008/01/31 17:29:33 ca Exp $
-->
<H1>smfi_opensocket</H1>
@ -24,16 +24,21 @@ filter.
<TABLE border="1" cellspacing=1 cellpadding=4>
<TR align="left" valign=top>
<TH width="80">Called When</TH>
<TD>Called only from program mainline, before calling
<TT>smfi_main()</TT>.</TD>
<TD>Called only from program mainline,
after calling <TT>smfi_setconn()</TT> and <TT>smfi_register()</TT>,
but before calling <TT>smfi_main()</TT>.
</TD>
</TR>
<TR align="left" valign=top>
<TH width="80">Effects</TH>
<TD>smfi_opensocket attempts to create the socket specified previously by
a call to <TT>smfi_setconn()</TT> which will be the interface between MTAs
and the filter. This allows the calling application to ensure that the
socket can be created. If this is not called, <TT>smfi_main()</TT> will
do so implicitly. </TD>
and the filter.
This allows the calling application to ensure that the
socket can be created.
If this is not called,
<TT>smfi_main()</TT> will do so implicitly.
</TD>
</TR>
</TABLE>
@ -58,7 +63,8 @@ do so implicitly. </TD>
<LI>The interface socket could not be created for any reason.
<LI><TT>rmsocket</TT> was <TT>true</TT>, and either the socket could
not be examined, or exists and could not be removed.
<LI><TT>smfi_setconn()</TT> has not been called.
<LI><TT>smfi_setconn()</TT> or <TT>smfi_register()</TT>
have not been called.
</UL>
Otherwise, it will return MI_SUCCESS
</TD>
@ -68,7 +74,7 @@ Otherwise, it will return MI_SUCCESS
<HR size="1">
<FONT size="-1">
Copyright (c) 2003 Sendmail, Inc. and its suppliers.
Copyright (c) 2003, 2008 Sendmail, Inc. and its suppliers.
All rights reserved.
<BR>
By using this file, you agree to the terms and conditions set

View File

@ -2,7 +2,7 @@
<HEAD><TITLE>smfi_version()</TITLE></HEAD>
<BODY>
<!--
$Id: smfi_version.html,v 1.5 2007/03/22 17:30:57 ca Exp $
$Id: smfi_version.html,v 1.6 2008/05/02 23:06:26 ca Exp $
-->
<H1>smfi_version()</H1>
@ -59,24 +59,30 @@ Get the (runtime) version of libmilter.
Note: the compile time version of libmilter is available in the macro
<CODE>SMFI_VERSION</CODE>.
A milter can check this macro to determine which functions to use
(at compile time via C preprocessor statements).
Using this macro and the
<CODE>smfi_version()</CODE>
function,
a milter can determine at runtime whether it has been (dynamically)
linked against the expected libmilter version.
To extract the major and minor version as well as the current patch level
from this macro, the macros
<CODE>SM_LM_VRS_MAJOR(v)</CODE>,
<CODE>SM_LM_VRS_MINOR(v)</CODE>, and
<CODE>SM_LM_VRS_PLVL(v)</CODE>
can be used, respectively.
A milter can check the
<CODE>SMFI_VERSION</CODE>
macro to determine which functions to use
(at compile time via C preprocessor statements).
Using this macro and the
<CODE>smfi_version()</CODE>
function,
a milter can determine at runtime whether it has been (dynamically)
linked against the expected libmilter version.
Such a function should only compare the major and minor version,
not the patch level,
i.e., the libmilter library will be compatible despite
different patch levels.
<HR SIZE="1">
<FONT SIZE="-1">
Copyright (c) 2006, 2007 Sendmail, Inc. and its suppliers.
Copyright (c) 2006-2008 Sendmail, Inc. and its suppliers.
All rights reserved.
<BR>
By using this file, you agree to the terms and conditions set

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999-2004, 2006, 2007 Sendmail, Inc. and its suppliers.
* Copyright (c) 1999-2004, 2006-2008 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: engine.c,v 8.159 2007/04/23 22:22:50 ca Exp $")
SM_RCSID("@(#)$Id: engine.c,v 8.162 2008/02/27 01:34:14 ca Exp $")
#include "libmilter.h"
@ -1001,6 +1001,7 @@ st_optionneg(g)
(long) ctx->ctx_id, ctx->ctx_mta_pflags, i);
return _SMFIS_ABORT;
}
fix_stm(ctx);
if (ctx->ctx_dbg > 3)
sm_dprintf("[%ld] milter_negotiate:"
@ -1725,9 +1726,9 @@ mi_rd_socket_ready (sd)
int n;
int nerr = 0;
#if SM_CONF_POLL
struct pollfd pfd;
struct pollfd pfd;
#else /* SM_CONF_POLL */
fd_set rd_set, exc_set;
fd_set rd_set, exc_set;
#endif /* SM_CONF_POLL */
do

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003-2004, 2006 Sendmail, Inc. and its suppliers.
* Copyright (c) 2003-2004, 2007 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@ -11,7 +11,7 @@
*/
#include <sm/gen.h>
SM_RCSID("@(#)$Id: worker.c,v 8.9 2006/12/18 18:26:51 ca Exp $")
SM_RCSID("@(#)$Id: worker.c,v 8.10 2007/12/03 22:06:05 ca Exp $")
#include "libmilter.h"
@ -263,8 +263,6 @@ mi_pool_controller_init()
return MI_FAILURE;
}
POOL_LEV_DPRINTF(4, ("PIPE r=[%d] w=[%d]", RD_PIPE, WR_PIPE));
(void) smutex_init(&Tskmgr.tm_w_mutex);
(void) scond_init(&Tskmgr.tm_w_cond);

View File

@ -20,7 +20,7 @@ SM_IDSTR(copyright,
Copyright (c) 1990, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n")
SM_IDSTR(id, "@(#)$Id: mail.local.c,v 8.254 2006/10/12 22:23:45 ca Exp $")
SM_IDSTR(id, "@(#)$Id: mail.local.c,v 8.256 2008/02/19 07:13:30 gshapiro Exp $")
#include <stdlib.h>
#include <sm/errstring.h>
@ -81,6 +81,15 @@ SM_IDSTR(id, "@(#)$Id: mail.local.c,v 8.254 2006/10/12 22:23:45 ca Exp $")
# endif /* HASHSPOOLMD5 */
#endif /* HASHSPOOL */
#if _FFR_SPOOL_PATH
/*
** Override path to mail store at run time (using -p).
** From: Eugene Grosbein of Svyaz Service JSC
** See: http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/114195
** NOTE: Update man page before adding this to a release.
*/
#endif /* _FFR_SPOOL_PATH */
#ifndef LOCKTO_RM
# define LOCKTO_RM 300 /* timeout for stale lockfile removal */
@ -231,7 +240,11 @@ main(argc, argv)
#if HASHSPOOL
while ((ch = getopt(argc, argv, "7BbdD:f:h:r:lH:p:ns")) != -1)
#else /* HASHSPOOL */
# if _FFR_SPOOL_PATH
while ((ch = getopt(argc, argv, "7BbdD:f:h:r:lp:s")) != -1)
# else /* _FFR_SPOOL_PATH */
while ((ch = getopt(argc, argv, "7BbdD:f:h:r:ls")) != -1)
# endif /* _FFR_SPOOL_PATH */
#endif /* HASHSPOOL */
{
switch(ch)
@ -319,6 +332,12 @@ main(argc, argv)
}
break;
case 'n':
StripRcptDomain = false;
break;
#endif /* HASHSPOOL */
#if HASHSPOOL || _FFR_SPOOL_PATH
case 'p':
if (optarg == NULL || *optarg == '\0')
{
@ -332,11 +351,7 @@ main(argc, argv)
usage();
}
break;
case 'n':
StripRcptDomain = false;
break;
#endif /* HASHSPOOL */
#endif /* HASHSPOOL || _FFR_SPOOL_PATH */
case '?':
default:
@ -1582,7 +1597,11 @@ void
usage()
{
ExitVal = EX_USAGE;
# if _FFR_SPOOL_PATH
mailerr(NULL, "usage: mail.local [-7] [-B] [-b] [-d] [-l] [-s] [-f from|-r from] [-h filename] [-p path] user ...");
# else /* _FFR_SPOOL_PATH */
mailerr(NULL, "usage: mail.local [-7] [-B] [-b] [-d] [-l] [-s] [-f from|-r from] [-h filename] user ...");
# endif /* _FFR_SPOOL_PATH */
sm_exit(ExitVal);
}

View File

@ -8,9 +8,9 @@
.\" the sendmail distribution.
.\"
.\"
.\" $Id: makemap.8,v 8.30 2002/06/27 23:41:04 gshapiro Exp $
.\" $Id: makemap.8,v 8.31 2008/05/02 23:07:48 ca Exp $
.\"
.TH MAKEMAP 8 "$Date: 2002/06/27 23:41:04 $"
.TH MAKEMAP 8 "$Date: 2008/05/02 23:07:48 $"
.SH NAME
makemap
\- create database maps for sendmail
@ -156,7 +156,8 @@ This includes checking for hard or symbolic
links in world writable directories.
.TP
.B \-t
Use the specified delimiter instead of white space.
Use the specified delimiter instead of white space
(also for dumping a map).
.TP
.B \-u
dump (unmap) the content of the database to standard output.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998-2002, 2004 Sendmail, Inc. and its suppliers.
* Copyright (c) 1998-2002, 2004, 2008 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1992 Eric P. Allman. All rights reserved.
* Copyright (c) 1992, 1993
@ -20,7 +20,7 @@ SM_IDSTR(copyright,
Copyright (c) 1992, 1993\n\
The Regents of the University of California. All rights reserved.\n")
SM_IDSTR(id, "@(#)$Id: makemap.c,v 8.178 2007/05/11 18:45:39 ca Exp $")
SM_IDSTR(id, "@(#)$Id: makemap.c,v 8.179 2008/04/14 02:06:16 ca Exp $")
#include <sys/types.h>
@ -378,9 +378,10 @@ main(argc, argv)
break;
(void) sm_io_fprintf(smioout, SM_TIME_DEFAULT,
"%.*s\t%.*s\n",
"%.*s%c%.*s\n",
(int) db_key.size,
(char *) db_key.data,
(sep != '\0') ? sep : '\t',
(int) db_val.size,
(char *)db_val.data);

View File

@ -24,7 +24,7 @@ Unix C compilers.
smrsh should build on most systems with the enclosed Build script:
host.domain% sh Build
host.domain% sh ./Build
To compile smrsh.c by hand, use the following command:
@ -36,13 +36,13 @@ compiler, you should compile with the -Bstatic option.
host.domain% cc -Bstatic -o smrsh smrsh.c
or
host.domain% sh Build LDOPTS=-Bstatic
host.domain% sh ./Build LDOPTS=-Bstatic
With gcc, the GNU C compiler, use the -static option.
host.domain% cc -static -o smrsh smrsh.c
or
host.domain% sh Build LDOPTS=-static
host.domain% sh ./Build LDOPTS=-static
The following C defines can be set defined to change the search path and
the bin directory used by smrsh.
@ -58,7 +58,7 @@ conf_smrsh_ENVDEF.
As root, install smrsh in /usr/libexec. Using the Build script:
host.domain# sh Build install
host.domain# sh ./Build install
For manual installation: install smrsh in the /usr/libexec
directory, with mode 511.
@ -163,4 +163,4 @@ a typical system follows:
host.domain# /usr/sbin/sendmail -bd -q30m
$Revision: 8.9 $, Last updated $Date: 2003/05/26 04:30:58 $
$Revision: 8.10 $, Last updated $Date: 2008/02/12 16:40:06 $

View File

@ -9,7 +9,6 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $FreeBSD$
*/
#include <sm/gen.h>

View File

@ -1,4 +1,4 @@
dnl $Id: Makefile.m4,v 8.112 2007/10/17 21:29:43 ca Exp $
dnl $Id: Makefile.m4,v 8.115 2008/03/27 16:13:33 ca Exp $
include(confBUILDTOOLSDIR`/M4/switch.m4')
define(`confREQUIRE_LIBSM', `true')

View File

@ -9,7 +9,7 @@
# the sendmail distribution.
#
#
# $Id: README,v 8.390 2006/11/13 22:27:27 ca Exp $
# $Id: README,v 8.391 2008/02/12 16:38:21 ca Exp $
#
This directory contains the source files for sendmail(TM).
@ -41,7 +41,7 @@ Sendmail is a trademark of Sendmail, Inc.
By far, the easiest way to compile sendmail is to use the "Build"
script:
sh Build
sh ./Build
This uses the "uname" command to figure out what architecture you are
on and creates a proper Makefile accordingly. It also creates a
@ -52,7 +52,7 @@ read the note below in the OPERATING SYSTEM AND COMPILE QUIRKS section.
If you need to look at other include or library directories, use the
-I or -L flags on the command line, e.g.,
sh Build -I/usr/sww/include -L/usr/sww/lib
sh ./Build -I/usr/sww/include -L/usr/sww/lib
It's also possible to create local site configuration in the file
site.config.m4 (or another file settable with the -f flag). This
@ -1847,4 +1847,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.390 $, last update $Date: 2006/11/13 22:27:27 $ )
(Version $Revision: 8.391 $, last update $Date: 2008/02/12 16:38:21 $ )

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998-2006 Sendmail, Inc. and its suppliers.
* Copyright (c) 1998-2006, 2008 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: collect.c,v 8.280 2006/11/29 00:20:40 ca Exp $")
SM_RCSID("@(#)$Id: collect.c,v 8.282 2008/01/31 18:48:29 ca Exp $")
static void eatfrom __P((char *volatile, ENVELOPE *));
static void collect_doheader __P((ENVELOPE *));
@ -308,6 +308,7 @@ collect(fp, smtpmode, hdrp, e, rsetsize)
dbto = smtpmode ? ((int) TimeOuts.to_datablock * 1000)
: SM_TIME_FOREVER;
sm_io_setinfo(fp, SM_IO_WHAT_TIMEOUT, &dbto);
set_tls_rd_tmo(TimeOuts.to_datablock);
c = SM_IO_EOF;
inputerr = false;
headeronly = hdrp != NULL;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers.
* Copyright (c) 1998-2008 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@ -9,12 +9,11 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $FreeBSD$
*/
#include <sendmail.h>
SM_RCSID("@(#)$Id: conf.c,v 8.1136 2007/10/10 00:06:45 ca Exp $")
SM_RCSID("@(#)$Id: conf.c,v 8.1141 2008/04/14 02:09:35 ca Exp $")
#include <sm/sendmail.h>
#include <sendmail/pathnames.h>
@ -1514,7 +1513,7 @@ getla()
sm_dprintf("getla: symbol address = %#lx\n",
(unsigned long) Nl[X_AVENRUN].n_value);
if (lseek(kmem, (off_t) Nl[X_AVENRUN].n_value, SEEK_SET) == -1 ||
read(kmem, (char *) avenrun, sizeof(avenrun)) < sizeof(avenrun))
read(kmem, (char *) avenrun, sizeof(avenrun)) != sizeof(avenrun))
{
/* thank you Ian */
if (tTd(3, 1))
@ -1836,7 +1835,7 @@ getla(void)
if (lseek(kmem, CAST_SYSMP(sysmp(MP_KERNADDR, MPKA_AVENRUN)), SEEK_SET)
== -1 ||
read(kmem, (char *) avenrun, sizeof(avenrun)) < sizeof(avenrun))
read(kmem, (char *) avenrun, sizeof(avenrun)) != sizeof(avenrun))
{
if (tTd(3, 1))
sm_dprintf("getla: lseek or read: %s\n",
@ -1944,6 +1943,13 @@ getla()
}
r = read(afd, &avenrun, sizeof(avenrun));
if (r != sizeof(avenrun))
{
sm_syslog(LOG_ERR, NOQID,
"can't read %s: %s", _PATH_AVENRUN,
r == -1 ? sm_errstring(errno) : "short read");
return -1;
}
if (tTd(3, 5))
sm_dprintf("getla: avenrun = %d\n", avenrun);
@ -6025,6 +6031,10 @@ char *FFRCompileOptions[] =
/* DefaultAuthInfo doesn't really work in 8.13 anymore. */
"_FFR_ALLOW_SASLINFO",
#endif /* _FFR_ALLOW_SASLINFO */
#if _FFR_BADRCPT_SHUTDOWN
/* shut down connection (421) if there are too many bad RCPTs */
"_FFR_BADRCPT_SHUTDOWN",
#endif /* _FFR_BADRCPT_SHUTDOWN */
#if _FFR_BESTMX_BETTER_TRUNCATION
/* Better truncation of list of MX records for dns map. */
"_FFR_BESTMX_BETTER_TRUNCATION",
@ -6165,6 +6175,10 @@ char *FFRCompileOptions[] =
/* Ignore extensions offered in response to HELO */
"_FFR_IGNORE_EXT_ON_HELO",
#endif /* _FFR_IGNORE_EXT_ON_HELO */
#if _FFR_LOCAL_DAEMON
/* Local daemon mode (-bl) which only accepts loopback connections */
"_FFR_LOCAL_DAEMON",
#endif /* _FFR_LOCAL_DAEMON */
#if _FFR_MAXDATASIZE
/*
** It is possible that a header is larger than MILTER_CHUNK_SIZE,

View File

@ -11,9 +11,6 @@
*
*
* $Id: conf.h,v 8.574 2006/11/29 00:36:06 ca Exp $
*
* $FreeBSD$
*
*/
/*

View File

@ -14,7 +14,7 @@
#include <sendmail.h>
#include "map.h"
SM_RCSID("@(#)$Id: daemon.c,v 8.678 2007/03/08 00:33:40 ca Exp $")
SM_RCSID("@(#)$Id: daemon.c,v 8.680 2008/02/14 00:20:26 ca Exp $")
#if defined(SOCK_STREAM) || defined(__GNU_LIBRARY__)
# define USE_SOCK_STREAM 1
@ -1257,7 +1257,8 @@ setupdaemon(daemonaddr)
#if NETINET
case AF_INET:
if (daemonaddr->sin.sin_addr.s_addr == 0)
daemonaddr->sin.sin_addr.s_addr = INADDR_ANY;
daemonaddr->sin.sin_addr.s_addr =
LocalDaemon ? htonl(INADDR_LOOPBACK) : INADDR_ANY;
port = daemonaddr->sin.sin_port;
break;
#endif /* NETINET */
@ -1265,7 +1266,8 @@ setupdaemon(daemonaddr)
#if NETINET6
case AF_INET6:
if (IN6_IS_ADDR_UNSPECIFIED(&daemonaddr->sin6.sin6_addr))
daemonaddr->sin6.sin6_addr = in6addr_any;
daemonaddr->sin6.sin6_addr =
LocalDaemon ? in6addr_loopback : in6addr_any;
port = daemonaddr->sin6.sin6_port;
break;
#endif /* NETINET6 */
@ -2204,7 +2206,8 @@ makeconnection(host, port, mci, e, enough)
#if NETINET
case AF_INET:
if (clt_addr.sin.sin_addr.s_addr == 0)
clt_addr.sin.sin_addr.s_addr = INADDR_ANY;
clt_addr.sin.sin_addr.s_addr = LocalDaemon ?
htonl(INADDR_LOOPBACK) : INADDR_ANY;
else
clt_bind = true;
if (clt_addr.sin.sin_port != 0)
@ -2215,7 +2218,8 @@ makeconnection(host, port, mci, e, enough)
#if NETINET6
case AF_INET6:
if (IN6_IS_ADDR_UNSPECIFIED(&clt_addr.sin6.sin6_addr))
clt_addr.sin6.sin6_addr = in6addr_any;
clt_addr.sin6.sin6_addr = LocalDaemon ?
in6addr_loopback : in6addr_any;
else
clt_bind = true;
socksize = sizeof(struct sockaddr_in6);
@ -3274,7 +3278,7 @@ myhostname(hostbuf, size)
if (strchr(hostbuf, '.') == NULL &&
!getcanonname(hostbuf, size, true, NULL))
{
sm_syslog(LOG_CRIT, NOQID,
sm_syslog(LocalDaemon ? LOG_WARNING : LOG_CRIT, NOQID,
"My unqualified host name (%s) unknown; sleeping for retry",
hostbuf);
message("My unqualified host name (%s) unknown; sleeping for retry",
@ -3282,7 +3286,7 @@ myhostname(hostbuf, size)
(void) sleep(60);
if (!getcanonname(hostbuf, size, true, NULL))
{
sm_syslog(LOG_ALERT, NOQID,
sm_syslog(LocalDaemon ? LOG_WARNING : LOG_ALERT, NOQID,
"unable to qualify my own domain name (%s) -- using short name",
hostbuf);
message("WARNING: unable to qualify my own domain name (%s) -- using short name",

View File

@ -13,7 +13,7 @@
#include <sendmail.h>
SM_RCSID("@(#)$Id: envelope.c,v 8.304 2007/04/18 17:15:49 ca Exp $")
SM_RCSID("@(#)$Id: envelope.c,v 8.305 2008/03/31 16:32:13 ca Exp $")
/*
** CLRSESSENVELOPE -- clear session oriented data in an envelope
@ -75,7 +75,7 @@ newenvelope(e, parent, rpool)
register ENVELOPE *parent;
SM_RPOOL_T *rpool;
{
int sendmode, dm;
int sendmode;
/*
** This code used to read:
@ -86,16 +86,8 @@ newenvelope(e, parent, rpool)
** This meant macvalue() could go into an infinite loop.
*/
dm = DM_NOTSET;
if (parent != NULL)
{
char *str;
sendmode = parent->e_sendmode;
str = macvalue(macid("{deliveryMode}"), parent);
if (str != NULL)
dm = (int) str[0];
}
else
sendmode = DM_NOTSET;
@ -144,9 +136,7 @@ newenvelope(e, parent, rpool)
if (CurEnv->e_xfp != NULL)
(void) sm_io_flush(CurEnv->e_xfp, SM_TIME_DEFAULT);
if (sendmode != DM_NOTSET)
e->e_sendmode = sendmode;
if (dm != DM_NOTSET)
set_delivery_mode(dm, e);
set_delivery_mode(sendmode, e);
return e;
}

View File

@ -9,7 +9,6 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $FreeBSD$
*/
#include <sendmail.h>

View File

@ -9,7 +9,6 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $FreeBSD$
*/
#include <sendmail.h>

View File

@ -133,4 +133,3 @@ The
.B mailq
command appeared in
4.0BSD.
.\" $FreeBSD$

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998-2006 Sendmail, Inc. and its suppliers.
* Copyright (c) 1998-2006, 2008 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@ -26,7 +26,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.963 2007/06/29 20:07:37 ca Exp $")
SM_RCSID("@(#)$Id: main.c,v 8.967 2008/03/31 16:32:13 ca Exp $")
#if NETINET || NETINET6
@ -302,6 +302,9 @@ main(argc, argv, envp)
ExitStat = EX_OK;
SubmitMode = SUBMIT_UNKNOWN;
#if _FFR_LOCAL_DAEMON
LocalDaemon = false;
#endif /* _FFR_LOCAL_DAEMON */
#if XDEBUG
checkfd012("after openlog");
#endif /* XDEBUG */
@ -401,6 +404,13 @@ main(argc, argv, envp)
OpMode = j;
break;
#if _FFR_LOCAL_DAEMON
case MD_LOCAL:
OpMode = MD_DAEMON;
LocalDaemon = true;
break;
#endif /* _FFR_LOCAL_DAEMON */
case MD_FREEZE:
(void) sm_io_fprintf(smioout, SM_TIME_DEFAULT,
"Frozen configurations unsupported\n");

View File

@ -9,12 +9,11 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $FreeBSD$
*/
#include <sendmail.h>
SM_RCSID("@(#)$Id: mci.c,v 8.218 2006/08/15 23:24:57 ca Exp $")
SM_RCSID("@(#)$Id: mci.c,v 8.221 2007/11/13 23:44:25 gshapiro Exp $")
#if NETINET || NETINET6
# include <arpa/inet.h>
@ -1144,16 +1143,27 @@ mci_traverse_persistent(action, pathname)
pathname, sm_errstring(errno));
return -1;
}
len = sizeof(newpath) - MAXNAMLEN - 3;
/*
** Reserve space for trailing '/', at least one
** character, and '\0'
*/
len = sizeof(newpath) - 3;
if (sm_strlcpy(newpath, pathname, len) >= len)
{
int save_errno = errno;
if (tTd(56, 2))
sm_dprintf("mci_traverse: path \"%s\" too long",
pathname);
(void) closedir(d);
errno = save_errno;
return -1;
}
newptr = newpath + strlen(newpath);
*newptr++ = '/';
len = sizeof(newpath) - (newptr - newpath);
/*
** repeat until no file has been removed
@ -1170,9 +1180,17 @@ mci_traverse_persistent(action, pathname)
if (e->d_name[0] == '.')
continue;
(void) sm_strlcpy(newptr, e->d_name,
sizeof(newpath) -
(newptr - newpath));
if (sm_strlcpy(newptr, e->d_name, len) >= len)
{
/* Skip truncated copies */
if (tTd(56, 4))
{
*newptr = '\0';
sm_dprintf("mci_traverse: path \"%s%s\" too long",
newpath, e->d_name);
}
continue;
}
if (StopRequest)
stop_sendmail();

View File

@ -13,7 +13,7 @@
#include <sendmail.h>
SM_RCSID("@(#)$Id: parseaddr.c,v 8.401 2007/09/27 23:33:59 ca Exp $")
SM_RCSID("@(#)$Id: parseaddr.c,v 8.403 2008/02/08 02:27:35 ca Exp $")
#include <sm/sendmail.h>
#include "map.h"
@ -1460,6 +1460,7 @@ rewrite(pvp, ruleset, reclevel, e, maxatom)
size_t trsize;
char *replac;
int endtoken;
bool external;
STAB *map;
char *mapname;
char **key_rvp;
@ -1575,6 +1576,7 @@ rewrite(pvp, ruleset, reclevel, e, maxatom)
true);
argvect[0] = cbuf;
replac = map_lookup(map, cbuf, argvect, &rstat, e);
external = replac != NULL;
/* if no replacement, use default */
if (replac == NULL && default_rvp != NULL)
@ -1599,7 +1601,8 @@ rewrite(pvp, ruleset, reclevel, e, maxatom)
{
/* scan the new replacement */
xpvp = prescan(replac, '\0', pvpbuf,
sizeof(pvpbuf), NULL, NULL,
sizeof(pvpbuf), NULL,
external ? NULL : IntTokenTab,
false);
if (xpvp == NULL)
{
@ -2263,7 +2266,7 @@ cataddr(pvp, evp, buf, sz, spacesub, external)
{
char *q;
natomtok = (ExtTokenTab[**pvp & 0xff] == ATM);
natomtok = (IntTokenTab[**pvp & 0xff] == ATM);
if (oatomtok && natomtok)
{
*p++ = spacesub;

View File

@ -14,7 +14,7 @@
#include <sendmail.h>
#include <sm/sem.h>
SM_RCSID("@(#)$Id: queue.c,v 8.975 2007/06/18 20:08:40 ca Exp $")
SM_RCSID("@(#)$Id: queue.c,v 8.977 2008/02/15 23:19:58 ca Exp $")
#include <dirent.h>
@ -4514,7 +4514,7 @@ readqf(e, openonly)
(void) sm_io_close(qfp, SM_TIME_DEFAULT);
return false;
}
#if _FFR_QF_PARANOIA
/* Check to make sure key fields were read */
if (e->e_from.q_mailer == NULL)
@ -6596,8 +6596,8 @@ init_sem(owner)
if (SemId < 0)
{
sm_syslog(LOG_ERR, NOQID,
"func=init_sem, sem_key=%ld, sm_sem_start=%d",
(long) SemKey, SemId);
"func=init_sem, sem_key=%ld, sm_sem_start=%d, error=%s",
(long) SemKey, SemId, sm_errstring(-SemId));
return;
}
#endif /* SM_CONF_SEM */

View File

@ -45,7 +45,7 @@
*/
#include <sendmail.h>
SM_RCSID("@(#)$Id: ratectrl.c,v 8.11 2006/08/15 23:24:57 ca Exp $")
SM_RCSID("@(#)$Id: ratectrl.c,v 8.12 2008/02/11 22:56:05 ca Exp $")
/*
** stuff included - given some warnings (inet_ntoa)
@ -114,7 +114,7 @@ connection_rate_check(hostaddr, e)
/* update server connection rate */
totalrate = total_rate(now, e == NULL);
#if RATECTL_DEBUG
sm_syslog(LOG_INFO, NOQID, "global connection rate: %d", globalRate);
sm_syslog(LOG_INFO, NOQID, "global connection rate: %d", totalrate);
#endif /* RATECTL_DEBUG */
/* update client connection rate */

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998-2006 Sendmail, Inc. and its suppliers.
* Copyright (c) 1998-2006, 2008 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@ -14,7 +14,7 @@
#include <sendmail.h>
#include <sm/sendmail.h>
SM_RCSID("@(#)$Id: readcf.c,v 8.664 2007/07/10 17:01:22 ca Exp $")
SM_RCSID("@(#)$Id: readcf.c,v 8.666 2008/02/14 17:25:14 ca Exp $")
#if NETINET || NETINET6
# include <arpa/inet.h>
@ -2249,6 +2249,12 @@ static struct optioninfo
# define O_ADDR_TYPE_MODES 0xe0
{ "AddrTypeModes", O_ADDR_TYPE_MODES, OI_NONE },
#endif /* _FFR_ADDR_TYPE_MODES */
#if _FFR_BADRCPT_SHUTDOWN
# define O_RCPTSHUTD 0xe1
{ "BadRcptShutdown", O_RCPTSHUTD, OI_SAFE },
# define O_RCPTSHUTDG 0xe2
{ "BadRcptShutdownGood", O_RCPTSHUTDG, OI_SAFE },
#endif /* _FFR_BADRCPT_SHUTDOWN */
{ NULL, '\0', OI_NONE }
};
@ -3817,6 +3823,16 @@ setoption(opt, val, safe, sticky, e)
break;
#endif /* _FFR_ADDR_TYPE_MODES */
#if _FFR_BADRCPT_SHUTDOWN
case O_RCPTSHUTD:
BadRcptShutdown = atoi(val);
break;
case O_RCPTSHUTDG:
BadRcptShutdownGood = atoi(val);
break;
#endif /* _FFR_BADRCPT_SHUTDOWN */
default:
if (tTd(37, 1))
{

View File

@ -9,8 +9,6 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $FreeBSD$
*
*/
#include <sendmail.h>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers.
* Copyright (c) 1998-2008 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@ -52,7 +52,7 @@
#ifdef _DEFINE
# ifndef lint
SM_UNUSED(static char SmailId[]) = "@(#)$Id: sendmail.h,v 8.1052 2007/10/05 23:06:30 ca Exp $";
SM_UNUSED(static char SmailId[]) = "@(#)$Id: sendmail.h,v 8.1059 2008/02/15 23:19:58 ca Exp $";
# endif /* ! lint */
#endif /* _DEFINE */
@ -1551,6 +1551,7 @@ extern void stabapply __P((void (*)(STAB *, int), int));
#define MD_ARPAFTP 'a' /* obsolete ARPANET mode (Grey Book) */
#define MD_DAEMON 'd' /* run as a daemon */
#define MD_FGDAEMON 'D' /* run daemon in foreground */
#define MD_LOCAL 'l' /* like daemon, but localhost only */
#define MD_VERIFY 'v' /* verify: don't collect or deliver */
#define MD_TEST 't' /* test mode: resolve addrs only */
#define MD_INITALIAS 'i' /* initialize alias database */
@ -1561,6 +1562,12 @@ extern void stabapply __P((void (*)(STAB *, int), int));
#define MD_PURGESTAT 'H' /* purge persistent host stat info */
#define MD_QUEUERUN 'q' /* queue run */
#if _FFR_LOCAL_DAEMON
EXTERN bool LocalDaemon;
#else /* _FFR_LOCAL_DAEMON */
# define LocalDaemon false
#endif /* _FFR_LOCAL_DAEMON */
/* Note: see also include/sendmail/pathnames.h: GET_CLIENT_CF */
/* values for e_sendmode -- send modes */
@ -2229,6 +2236,10 @@ EXTERN char InetMode; /* default network for daemon mode */
EXTERN char OpMode; /* operation mode, see below */
EXTERN char SpaceSub; /* substitution for <lwsp> */
EXTERN int BadRcptThrottle; /* Throttle rejected RCPTs per SMTP message */
#if _FFR_BADRCPT_SHUTDOWN
EXTERN int BadRcptShutdown; /* Shutdown connection for rejected RCPTs */
EXTERN int BadRcptShutdownGood; /* above even when there are good RCPTs */
#endif /* _FFR_BADRCPT_SHUTDOWN */
EXTERN int CheckpointInterval; /* queue file checkpoint interval */
EXTERN int ConfigLevel; /* config file level */
EXTERN int ConnRateThrottle; /* throttle for SMTP connection rate */
@ -2590,6 +2601,11 @@ extern void setoption __P((int, char *, bool, bool, ENVELOPE *));
extern sigfunc_t setsignal __P((int, sigfunc_t));
extern void sm_setuserenv __P((const char *, const char *));
extern void settime __P((ENVELOPE *));
#if STARTTLS
extern void set_tls_rd_tmo __P((int));
#else /* STARTTLS */
#define set_tls_rd_tmo(rd_tmo)
#endif /* STARTTLS */
extern char *sfgets __P((char *, int, SM_FILE_T *, time_t, char *));
extern char *shortenstring __P((const char *, size_t));
extern char *shorten_hostname __P((char []));

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999-2006 Sendmail, Inc. and its suppliers.
* Copyright (c) 1999-2006, 2008 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: sfsasl.c,v 8.115 2006/04/18 21:34:07 ca Exp $")
SM_RCSID("@(#)$Id: sfsasl.c,v 8.117 2008/01/31 18:48:29 ca Exp $")
#include <stdlib.h>
#include <sendmail.h>
#include <sm/time.h>
@ -674,6 +674,26 @@ tls_retry(ssl, rfd, wfd, tlsstart, timeout, err, where)
# define SM_ERR_TIMEOUT EIO
#endif /* ETIMEDOUT */
/*
** SET_TLS_RD_TMO -- read secured information for the caller
**
** Parameters:
** rd_tmo -- read timeout
**
** Results:
** none
** This is a hack: there is no way to pass it in
*/
static int tls_rd_tmo = -1;
void
set_tls_rd_tmo(rd_tmo)
int rd_tmo;
{
tls_rd_tmo = rd_tmo;
}
/*
** TLS_READ -- read secured information for the caller
**
@ -725,7 +745,9 @@ tls_read(fp, buf, size)
rfd = SSL_get_rfd(so->con);
wfd = SSL_get_wfd(so->con);
try = tls_retry(so->con, rfd, wfd, tlsstart,
TimeOuts.to_datablock, ssl_err, "read");
(tls_rd_tmo < 0) ? TimeOuts.to_datablock
: tls_rd_tmo,
ssl_err, "read");
if (try > 0)
goto retry;
errno = SM_ERR_TIMEOUT;

View File

@ -46,7 +46,7 @@
# if NAMED_BIND
# include "sm_resolve.h"
SM_RCSID("$Id: sm_resolve.c,v 8.35 2007/06/25 16:20:14 ca Exp $")
SM_RCSID("$Id: sm_resolve.c,v 8.36 2008/02/11 23:04:16 ca Exp $")
static struct stot
{
@ -168,7 +168,7 @@ parse_dns_reply(data, len)
int len;
{
unsigned char *p;
ushort ans_cnt, ui;
unsigned short ans_cnt, ui;
int status;
size_t l;
char host[MAXHOSTNAMELEN];
@ -198,7 +198,7 @@ parse_dns_reply(data, len)
return NULL;
}
ans_cnt = ntohs((ushort) r->dns_r_h.ancount);
ans_cnt = ntohs((unsigned short) r->dns_r_h.ancount);
p += status;
GETSHORT(r->dns_r_q.dns_q_type, p);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers.
* Copyright (c) 1998-2008 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@ -17,7 +17,7 @@
# include <libmilter/mfdef.h>
#endif /* MILTER */
SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.967 2007/10/01 16:22:14 ca Exp $")
SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.975 2008/03/31 16:32:13 ca Exp $")
#include <sm/time.h>
#include <sm/fdset.h>
@ -637,6 +637,9 @@ smtp(nullserver, d_flags, e)
# define p_addr_st NULL
#endif /* MILTER */
size_t inplen;
#if _FFR_BADRCPT_SHUTDOWN
int n_badrcpts_adj;
#endif /* _FFR_BADRCPT_SHUTDOWN */
SevenBitInput_Saved = SevenBitInput;
smtp.sm_nrcpts = 0;
@ -903,6 +906,8 @@ smtp(nullserver, d_flags, e)
#endif /* SASL */
#if STARTTLS
set_tls_rd_tmo(TimeOuts.to_nextcommand);
#endif /* STARTTLS */
#if MILTER
@ -942,6 +947,7 @@ smtp(nullserver, d_flags, e)
/* arrange to ignore send list */
e->e_sendqueue = NULL;
lognullconnection = false;
goto doquit;
}
}
@ -1054,10 +1060,10 @@ smtp(nullserver, d_flags, e)
if (select(fd + 1, FDSET_CAST &readfds,
NULL, NULL, &timeout) > 0 &&
FD_ISSET(fd, &readfds) &&
(eoftest = sm_io_getc(InChannel, SM_TIME_DEFAULT))
(eoftest = sm_io_getc(InChannel, SM_TIME_DEFAULT))
!= SM_IO_EOF)
{
sm_io_ungetc(InChannel, SM_TIME_DEFAULT,
sm_io_ungetc(InChannel, SM_TIME_DEFAULT,
eoftest);
gettimeofday(&ep, NULL);
timersub(&ep, &bp, &tp);
@ -2523,6 +2529,36 @@ smtp(nullserver, d_flags, e)
milter_rcpt_added = false;
smtp.sm_e_nrcpts_orig = e->e_nrcpts;
#endif
#if _FFR_BADRCPT_SHUTDOWN
/*
** hack to deal with hack, see below:
** n_badrcpts is increased is limit is reached.
*/
n_badrcpts_adj = (BadRcptThrottle > 0 &&
n_badrcpts > BadRcptThrottle &&
LogLevel > 5)
? n_badrcpts - 1 : n_badrcpts;
if (BadRcptShutdown > 0 &&
n_badrcpts_adj >= BadRcptShutdown &&
(BadRcptShutdownGood == 0 ||
smtp.sm_nrcpts == 0 ||
(n_badrcpts_adj * 100 /
(smtp.sm_nrcpts + n_badrcpts) >=
BadRcptShutdownGood)))
{
if (LogLevel > 5)
sm_syslog(LOG_INFO, e->e_id,
"%s: Possible SMTP RCPT flood, shutting down connection.",
CurSmtpClient);
message("421 4.7.0 %s Too many bad recipients; closing connection",
MyHostName);
/* arrange to ignore any current send list */
e->e_sendqueue = NULL;
goto doquit;
}
#endif /* _FFR_BADRCPT_SHUTDOWN */
if (BadRcptThrottle > 0 &&
n_badrcpts >= BadRcptThrottle)
{
@ -3775,17 +3811,10 @@ smtp_data(smtp, e)
dropenvelope(ee, true, false);
}
}
sm_rpool_free(e->e_rpool);
/*
** At this point, e == &MainEnvelope, but if we did splitting,
** then CurEnv may point to an envelope structure that was just
** freed with the rpool. So reset CurEnv *before* calling
** newenvelope.
*/
CurEnv = e;
features = e->e_features;
sm_rpool_free(e->e_rpool);
newenvelope(e, e, sm_rpool_new_x(NULL));
e->e_flags = BlankEnvelope.e_flags;
e->e_features = features;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998-2006 Sendmail, Inc. and its suppliers.
* Copyright (c) 1998-2006, 2008 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.470 2007/10/17 21:35:30 ca Exp $")
SM_RCSID("@(#)$Id: usersmtp.c,v 8.472 2008/01/31 18:48:29 ca Exp $")
#include <sysexits.h>
@ -3077,6 +3077,7 @@ reply(m, mci, e, timeout, pfunc, enhstat, rtype)
*/
bufp = SmtpReplyBuffer;
set_tls_rd_tmo(timeout);
for (;;)
{
register char *p;

View File

@ -13,7 +13,7 @@
#include <sendmail.h>
SM_RCSID("@(#)$Id: util.c,v 8.413 2007/09/26 23:29:11 ca Exp $")
SM_RCSID("@(#)$Id: util.c,v 8.414 2007/11/02 17:30:38 ca Exp $")
#include <sm/sendmail.h>
#include <sysexits.h>
@ -2823,9 +2823,10 @@ count_open_connections(hostaddr)
return 0;
/*
** Initialize to 1 instead of 0 because this code gets called
** before proc_list_add() gets called, so we (the daemon child
** for this connection) don't count ourselves.
** This code gets called before proc_list_add() gets called,
** so we (the daemon child for this connection) have not yet
** counted ourselves. Hence initialize the counter to 1
** instead of 0 to compensate.
*/
n = 1;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers.
* Copyright (c) 1998-2008 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@ -13,6 +13,6 @@
#include <sm/gen.h>
SM_RCSID("@(#)$Id: version.c,v 8.199 2007/10/31 16:04:12 ca Exp $")
SM_RCSID("@(#)$Id: version.c,v 8.208 2008/04/17 17:04:30 ca Exp $")
char Version[] = "8.14.2";
char Version[] = "8.14.3";