This commit was generated by cvs2svn to compensate for changes in r90792,

which included commits to RCS files with non-trunk default branches.
This commit is contained in:
Gregory Neil Shapiro 2002-02-17 21:56:45 +00:00
commit 5b587aff2d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90793
365 changed files with 68875 additions and 17195 deletions

View File

@ -1,9 +1,10 @@
Installing sendmail
Note: as of sendmail 8.9, a new build architecture is in place that allows
you to use the "Build" shell script in any of the program directories.
On many environments this will do everything for you, no fuss, no muss.
**Note**: Starting with sendmail 8.12, sendmail is no longer set-user-ID
root by default. As a result of this, you need to install two .cf files.
See steps 4 and 6 in this document. We also strongly recommend reading
sendmail/SECURITY for more installation information.
1. Read all the README files noted in the INTRODUCTION section of the README
file in this top-level directory.
@ -15,16 +16,22 @@ On many environments this will do everything for you, no fuss, no muss.
details).
4. Change to the cf/cf/ directory (that's not a typo): Copy whichever .mc
file best matches your environment to config.mc, where config can be any
name. Next, tailor it as explained in cf/README. Then run
"sh Build config.cf".
file best matches your environment to sendmail.mc. Next, tailor it
as explained in cf/README. Then run
"sh Build sendmail.cf".
5. Back up your current /etc/mail/sendmail.cf and the sendmail binary (whose
location varies from operating system to operating system, but is usually
in /usr/sbin or /usr/lib).
6. Install config.cf as /etc/mail/sendmail.cf and install the sendmail binary
built in step 3 by cd-ing back to sendmail/ and running "sh Build install".
6. Install sendmail.cf as /etc/mail/sendmail.cf and submit.cf as
/etc/mail/submit.cf. This can be done in the cf/cf by using
"sh Build install-cf".
Please read sendmail/SECURITY before continuing; you have to create a
new user smmsp and a new group smmsp for the default installation.
Then install the sendmail binary built in step 3 by cd-ing back to
sendmail/ and running "sh Build install".
7. For each of the associated sendmail utilities (makemap, mailstats, etc.),
read the README in the utility's directory. When you are ready to install
@ -35,4 +42,4 @@ On many environments this will do everything for you, no fuss, no muss.
in case you are now using a different (and thereby incompatible) version
of Berkeley DB.
$Revision: 8.3.16.2 $, Last updated $Date: 2000/12/30 06:24:03 $
$Revision: 8.14 $, Last updated $Date: 2001/11/04 20:59:11 $

View File

@ -3,7 +3,7 @@
K N O W N B U G S I N S E N D M A I L
The following are bugs or deficiencies in sendmail that I am aware of
The following are bugs or deficiencies in sendmail that we are aware of
but which have not been fixed in the current release. You probably
want to get the most up to date version of this from ftp.sendmail.org
in /pub/sendmail/KNOWNBUGS. For descriptions of bugs that have been
@ -13,7 +13,6 @@ distribution).
This list is not guaranteed to be complete.
* Delivery to programs that generate too much output may cause problems
(8.10, 8.11)
If e-mail is delivered to a program which generates too much
output, then sendmail may issue an error:
@ -35,7 +34,7 @@ This list is not guaranteed to be complete.
restructuring of the code -- for example, almost no C library support
could be used to handle strings.
* Header checks are not called if header value is too long.
* Header checks are not called if header value is too long or empty.
If the value of a header is longer than 1250 (MAXNAME + MAXATOM - 6)
characters or it contains a single word longer than 256 (MAXNAME)
@ -47,13 +46,12 @@ This list is not guaranteed to be complete.
Sometimes identical, duplicate error messages can be generated. As
near as I can tell, this is rare and relatively innocuous.
* $c (hop count) macro improperly set.
* Misleading error messages.
The $c macro is supposed to contain the current hop count, for use
when calling a mailer. This macro is initialized too early, and
is always zero (or the value of the -c command line flag, if any).
This macro will probably be removed entirely in a future release;
I don't believe there are any mailers left that require it.
If an illegal address is specified on the command line together
with at least one valid address and PostmasterCopy is set, the
DSN does not contain the illegal address, but only the valid
address(es).
* \231 considered harmful.
@ -121,6 +119,14 @@ This list is not guaranteed to be complete.
account for the SMTP on-the-wire \r\n expansion. It probably doesn't
allow for 8->7 bit MIME conversions either.
* Client ignores SIZE parameter.
When sendmail acts as client and the server specifies a limit
for the mail size, sendmail will ignore this and try to send the
mail anyway. The server will usually reject the MAIL command
which specifies the size of the message and hence this problem
is not significant.
* Paths to programs being executed and the mode of program files are
not checked. Essentially, the RunProgramInUnsafeDirPath and
RunWritableProgram bits in the DontBlameSendmail option are always
@ -150,7 +156,7 @@ This list is not guaranteed to be complete.
* MIME encoded full name phrases in the From: header
If a full name phrase includes characters from MustQuoteChars, sendmail
will quote the entire full name phrase. If MustQuoteChars includes
will quote the entire full name phrase. If MustQuoteChars includes
characters which are not special characters according to STD 11 (RFC
822), this quotation can interfere with MIME encoded full name phrases.
By default, sendmail includes the single quote character (') in
@ -200,22 +206,14 @@ This list is not guaranteed to be complete.
local mail delivery and NFS hard mounted home directories should be
avoided, as attempts to open the forward files could hang.
* Race condition for delivery to set-user-id files
* Race condition for delivery to set-user-ID files
Sendmail will deliver to a fail if the file is owned by the DefaultUser
or has the set-user-id bit set. Unfortunately, some systems clear that bit
or has the set-user-ID bit set. Unfortunately, some systems clear that bit
when a file is modified. Sendmail compensates by resetting the file mode
back to it's original settings. Unfortunately, there's still a
permission failure race as sendmail checks the permissions before locking
the file. This is unavoidable as sendmail must verify the file is safe
to open before opening it. A file can not be locked until it is open.
* Potential denial of service attack with AutoRebuildAliases
There is a potential for a denial of service attack if the
AutoRebuildAliases option is set as a user can kill the sendmail process
while it is rebuilding the aliases file leaving it in an inconsistent
state. This option and it's use is deprecated and will be removed from a
future version of sendmail.
$Revision: 8.43.16.2 $, Last updated $Date: 2001/07/31 22:42:46 $
$Revision: 8.54 $, Last updated $Date: 2001/12/17 16:07:51 $

View File

@ -76,4 +76,4 @@ each of the following conditions is met:
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
$Revision: 8.9.4.1 $, Last updated $Date: 2001/02/14 04:07:19 $
$Revision: 8.10 $, Last updated $Date: 2001/02/14 04:39:34 $

View File

@ -1,8 +1,9 @@
# $Id: Makefile.dist,v 8.9 1999/09/27 21:39:11 gshapiro Exp $
# $Id: Makefile.dist,v 8.15 2001/08/23 20:44:39 ca Exp $
SHELL= /bin/sh
SUBDIRS= libsmutil libsmdb sendmail mail.local mailstats makemap \
praliases rmail smrsh vacation
SUBDIRS= libsm libsmutil libsmdb sendmail editmap mail.local \
mailstats makemap praliases rmail smrsh vacation
# libmilter: requires pthread
BUILD= ./Build
OPTIONS= $(CONFIG) $(FLAGS)
@ -27,6 +28,13 @@ install: FRC
$(SHELL) $(BUILD) $(OPTIONS) $@); \
done
install-docs: FRC
@for x in $(SUBDIRS); \
do \
(cd $$x; echo Making $@ in:; pwd; \
$(SHELL) $(BUILD) $(OPTIONS) $@); \
done
fresh: FRC
@for x in $(SUBDIRS); \
do \

View File

@ -87,6 +87,80 @@ y+PVZ1MwnEXfTQReVSla0AAOIRirHEh4YnUVZzFSNEJqoDRZQwVd7Q==
=shxn
-----END PGP PUBLIC KEY BLOCK-----
Type Bits KeyID Created Expires Algorithm Use
sec+ 1024 0x678C0A03 2001-12-18 ---------- RSA Sign & Encrypt
f16 Fingerprint16 = 7B 02 F4 AA FC C0 22 DA 47 3E 2A 9A 9B 35 22 45
uid Sendmail Signing Key/2002 <sendmail@Sendmail.ORG>
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: PGPfreeware 5.0i for non-commercial use
mQCNAzwfgwEAAAEEALejONfYzPrNw5IhjBfjpkj1hCwVGCa91d0Pr9SyMgFdrEam
v4jWiz80rFoKdm3dr1bDqBhdiq4tH49Rul+RLLEXLyiPiLyRoldl54cPeOUoGafp
PvcCihSgWM2tFO1saYtf+/oM5/9S/TA+pb4hpXAZE4CfL4e7X4lpYrhnjAoDAAUR
tDFTZW5kbWFpbCBTaWduaW5nIEtleS8yMDAyIDxzZW5kbWFpbEBTZW5kbWFpbC5P
Ukc+iQCVAwUQPB+DAYlpYrhnjAoDAQFKqQP/YG77bGGhCqr8PxSpWSNxDuIPAmX4
VJdLsIQNUBqI/3noPfTec3553EsXMUvJh/4iiI/+6CYExQi4WQELZDPmfUUWQWUA
aiv6upSOKOAmuiVO2cjZzNaETswwyabk2rOE0RzmCuzMDCrkbFugoBRofuUjXwq6
FAnTaM5LkAgprfaJAJUDBRA8H4OufEtnbaAOFWMBAWP3A/9Y4JqmHQtcz0t/kIcE
ZwGwYd8+kyeo0/0voW07STq/C60hX3eFiegoqO6bqILIaswZ6djnYOMdOYhMtM+f
VzcMNTyJCRe3KcWvY4xRQMYc+zmwqqxY1cW6F1mWLT6fwZ6hlIRG/A91OfIDbnuh
WqNFOJR3NNMmC97nB3D36e4vWYkAlQMFEDwfg/jBnB0lEtNGHQEB9+sD/R6kEta/
JNgmBhnVRheM5+4ijQpz9csP0Y2Ccd5C2BFkURQztRxgldaTRdmzAltjG49ZmgAj
C15v0S5CunWI2gHNvNzh0odyKD5+FEcU2arz2TEqnEIzoDdAq4B6Qwf48EVBqtOa
rIY6LoLV2/POFqTZvP2fzdp1kju6KpfMLgeniQCVAwUQPB+EB+9YlmTUMuGdAQEp
fQP/faSN6UtxXPrEtnqF+9V+pEc77BJO6oa9lpI9Qdbupo1wqNtFH6ZmYhnLPD65
qAFnyKZU6VW58ulobd5nZqISdTV0CorPJ1I+7zTS4IuZkiDg6/YCTzWdcgs7M7W5
sI4mnDt4bPdIRvz0ffM8r6WmVQISuI78+9usnZMLGoJn2P+JAJUDBRA8H4Qmb1KT
2KObplUBAduAA/oDRlld+jlosLu1TDZD9J9srEK7mdT3+HIVohcfkqpAhXXcZrvd
avKucihNrCa+dj1u03A0xxMPQoeuFQRlL587M1sEtowVGuyMTyiVtut7zsta/eEQ
nkp0MYTqNftkRxoc7vMx98tqO4Xlfe2mLekV8w7TUQxGVi9JFIBx6ZATUYkAlQMF
EDwfhDWcHL3i41xWNQEBoGED+gIvGFmUUu7fkdEmaT559dapdxCCEJkV/dUZUrbo
EmYtllCo0yNxzfBdXVwlBlHFV7fAW+QZRhCQx9TBv0JrNf/AJp4XIo837PmKhoJr
C5UsbT5SIypBi9Ai8AX4HQrB5SQQMd53efjmsdOITtdM0Cp+/uMUVuO+7oFeEWtW
MvxaiQCVAwUQPB+ESDgi20fMN08tAQHyUAP/ajusqW//1Z6622HWr8GTVpTua/YG
H3qGW0ZdXoqnzUNBIc9lksOV62JL91pzfDWaTCqMTEYzT6W94e7n8SYFtbroemxb
kdSb8DO3C4bOa1w1dJsQfTeRYEuIMVHtjJmqw43J7pNn2HazVcnPf95YkMhGvs4b
P2zfvyWwhgRCbWOJAJUDBRA8H4SLwCnKQBb0zOkBAddvBACYxaTZc+HsPEMLpoHW
QIsntukJgdT/onZcTFZiVNmA6bYyQ0VPTiZ27HN7LjHkVgtdyEQceKq4T3iQ670h
/Pp0gwk4ZDpmA/k2oqgs4aE/C6KDy6nMCGaucJhC9I0/0EFD32skvkQ5fj65oeoC
2r/coIoA44Jp6ikzGA8i5aXuyIkAlQMFEDwfhK7W4KH+T74q3QEBwXED/1TiGmh1
lnvOLIyn2lG+HIM4fzjlU4EmEm9we+lTi/zKOz+3w/O+jZKPEeYXvhjFjEbWIYI7
XGtJQalipU4+Uhwv+bIliwWpYlFs0Roi6L/mN3CKXN8S62TI8RdArRKtPH9OxvGv
1AXnEM0DRFuvcRVEBkUlnZKEit+8ttu5rIx5iQCVAwUQPB+Igs8etQMiMnoBAQE7
hwQAtxoIqHHKs2IG8tTiNcjgfReeXovMeGttNua6rd6m2f8hA/UNt3U9houeGEsb
62iU4ahd3zRRrQyof2ZshLZ6kSNM/5KrRSP2YlpzLSGbXJjuQQdc6rbQItOxo2rz
lkQ4IlBj1XgYqO67GimlXk5GxpsTLhCFh2dfONxcgj3/P2OJAJUDBRA8H44OI+Ri
1L97pCEBARSeA/9Ep+EhBQUhnr0lq5PX/35uSfyaSFYVNnJ6KQqgoGJXIsktW47a
CIlGNireedg6t1TpjC6O4mWLZbromFYX6tq3ItNJopoMEN7kQjG+joWgYeBb5e3u
qDCThHonW552ev9HNGtCROG6Dvb8gDbjutlcKQMNygJdAdQquLdxAMWeeIkAlQMF
EDwfjdV3HZKuiXLHwQEBe74EAI8cKrwohEOLVUNRZSCmNpttwPQ1UddzPF0JtFLy
1CdaQWQpR85jarWCzYGioWWMpKrOHjQC2dzezaXbbaegWgC+NNylcgSuPlbAgexY
KCHy8zARQQR87XzRFyfSgG3eJaChSpqNxZ38MS81P3BXpLoKeUA7LOyQbLOAK9Dz
NCSqiQBGBBARAgAGBQI8H435AAoJENNJPvDSl6uOsq4AoIAKkPCRfhY4O/UMWlsC
JqX/dY7DAJsGrYZYJAYOM2uyi7UVpNM4XrpcKYkAlQMFEDwfjpVfHshviAyeVQEB
dNkD/2D9uVWeD9RD6eO1VLrMatDfqRrjVFa7S0tKkJSH2v2Kdes9cuFeUAXSRLOt
u7knPiGun++AfYCWCl6rr80sCHtT2Af84C7rhKSImkeTlxUOBYid5s9GiNAJXn7b
LZZBYylfdGrdU2wFeLULRhNvPB7hSmMSOloDulgJPk20Y7JfiQCVAwUQPB+PPKVT
ksHk9ElFAQEVkAQAnE/KrfYoCMeEHvbS0MVoCuVjPvbwshWzUF3kH9hKCG+0pIRl
mvMXLRtAx8DP2RxfCrzAMatyL80fd+vdAjh3TK+TXhJm0SK+KbYjbk8PhPxDN85l
mJkybMnUKAirjKcdyigCAKIzvc30NyadLyq08mGaYPjrK61LuLxr91KOKSWJAEYE
EBECAAYFAjwfkSgACgkQAm4U2qPreYqQJQCg6XPb/+6fZfkscGlAyqWICmv3Ir8A
oMdaGZp1kH901+GqmEA9yAm8FVnziQBGBBARAgAGBQI8H5GqAAoJEKK7+yQM+Vb3
czEAn2OCdDNEGlJt0wwUi37vvNJJXAvtAJ0SAOrKsE+jH0Hq/0Y181nCcjWafokA
lQMFEDwfnYXh1PwU5tB0cQEBlS0D/jnLmHQtNmKxV/CXWgyHwcfHP5QcbgGYJfLE
9SDVARN+VJnFQqXDAPI5qwcdAEOJal8AVs4cnoTwuJm5dnKSjPOPsPEVALFPyX2v
LZv3M/QF+FMuaUowqAM4HCIqPT+ksd+j4jBSRwGvYI6BeBYIWdmHvrIVkh9Cy6Mz
z8+sAZ4WiQBGBBARAgAGBQI8H55mAAoJEHAt5Vm009ew6SoAoPQHwI0VMEouunZD
kM/iWMdKPOLqAJ9+xhZHRCDTqaqrOcUV6LkvKAzvxYkAlQMFEDwgMQAA8tkJ67sb
QQEBEUcD/ROzXCXemtAui6WTjRKXbw0amx7XTxvbRWmhF9Q3d1OOgWMWQ4LAs4JG
irFdCjPn1sl/oDTLvU5YAUpRj/Eu9XGxqTlvJXoOE4Gfh1UMPoSxK7CIeuzQUgJ8
8JCRGmytKngupzQ1o0agAOsB96bM8H9UJiB/mo8iqHijotVbagntiQBGBBARAgAG
BQI8IIEQAAoJENvMSAFp0LW+8/oAoIgGzgkjm5zeOlHCl3vdeH7IMKC4AJ9Dg2VP
k0ouvT33gc0C1lvqHOuWMw==
=Yoii
-----END PGP PUBLIC KEY BLOCK-----
Type Bits KeyID Created Expires Algorithm Use
pub 1024 0xCC374F2D 2000-12-14 ---------- RSA Sign & Encrypt
f16 Fingerprint16 = 59 AF DC 3E A2 7D 29 56 89 FA 25 70 90 0D 7E C1
@ -830,4 +904,4 @@ SIXqPke2iCW6+zdG1T/gS5T9T9/Lf2c9FQf0FjURAi3ynDA2RBLA5FDsI8v3
=dbDm
-----END PGP PUBLIC KEY BLOCK-----
$Revision: 8.5.16.4 $, Last updated $Date: 2001/07/31 22:36:18 $
$Revision: 8.13 $, Last updated $Date: 2001/12/19 19:10:01 $

View File

@ -27,10 +27,12 @@ the latest updates.
You may also find these useful:
d. devtools/README
e. devtools/Site/README
f. mail.local/README
g. smrsh/README
d. sendmail/SECURITY
e. devtools/README
f. devtools/Site/README
g. libmilter/README
h. mail.local/README
i. smrsh/README
4. Read cf/README.
@ -93,7 +95,7 @@ the items in the file to be marked as safe for file and program
delivery.
Other files affected by this strengthened security include class
files (i.e. Fw /etc/mail/local-host-names), persistent host status files,
files (i.e., Fw /etc/mail/local-host-names), persistent host status files,
and the files specified by the ErrorHeader and HelpFile options. Similar
DontBlameSendmail flags are available for the class, ErrorHeader, and
HelpFile files.
@ -174,15 +176,13 @@ Important RFCs for electronic mail are:
RFC974 MX routing
RFC976 UUCP mail format
RFC1123 Host requirements (modifies 821, 822, and 974)
RFC1413 Identification server
RFC1869 SMTP Service Extensions (ESMTP spec)
RFC1652 SMTP Service Extension for 8bit-MIMEtransport
RFC1870 SMTP Service Extension for Message Size Declaration
RFC2045 Multipurpose Internet Mail Extensions (MIME) Part One:
Format of Internet Message Bodies
RFC1344 Implications of MIME for Internet Mail Gateways
RFC1413 Identification server
RFC1428 Transition of Internet Mail from Just-Send-8 to
8-bit SMTP/MIME
RFC1652 SMTP Service Extension for 8bit-MIMEtransport
RFC1869 SMTP Service Extensions (ESMTP spec)
RFC1870 SMTP Service Extension for Message Size Declaration
RFC1891 SMTP Service Extension for Delivery Status Notifications
RFC1892 Multipart/Report Content Type for the Reporting of
Mail System Administrative Messages
@ -192,9 +192,15 @@ Important RFCs for electronic mail are:
RFC1985 SMTP Service Extension for Remote Message Queue Starting
RFC2033 Local Mail Transfer Protocol (LMTP)
RFC2034 SMTP Service Extension for Returning Enhanced Error Codes
RFC2045 Multipurpose Internet Mail Extensions (MIME) Part One:
Format of Internet Message Bodies
RFC2476 Message Submission
RFC2487 SMTP Service Extension for Secure SMTP over TLS
RFC2554 SMTP Service Extension for Authentication
RFC2821 Simple Mail Transfer Protocol
RFC2822 Internet Message Format
RFC2852 Deliver By SMTP Service Extension
RFC2920 SMTP Service Extension for Command Pipelining
Other standards that may be of interest (but which are less directly
relevant to sendmail) are:
@ -221,8 +227,8 @@ PARTS OF THE WORLD. SO, WHEN YOU IMPORT THIS PACKAGE TO YOUR
COUNTRY, RE-DISTRIBUTE IT FROM THERE OR EVEN JUST EMAIL TECHNICAL
SUGGESTIONS OR EVEN SOURCE PATCHES TO THE AUTHOR OR OTHER PEOPLE
YOU ARE STRONGLY ADVISED TO PAY CLOSE ATTENTION TO ANY EXPORT/IMPORT
AND/OR USE LAWS WHICH APPLY TO YOU. THE AUTHORS ARE NOT LIABLE FOR
ANY VIOLATIONS YOU MAKE HERE. SO BE CAREFUL, IT IS YOUR RESPONSIBILITY.
AND/OR USE LAWS WHICH APPLY TO YOU. THE AUTHORS ARE NOT LIABLE FOR
ANY VIOLATIONS YOU MAKE HERE. SO BE CAREFUL, IT IS YOUR RESPONSIBILITY.
If you use OpenSSL then make sure you read their README file which
contains information about patents etc.
@ -360,6 +366,8 @@ contrib Some contributed tools to help with sendmail. THESE
devtools Build environment. See devtools/README.
doc Documentation. If you are getting source, read
op.me -- it's long, but worth it.
editmap A program to edit and query maps that have been created
with makemap, e.g., adding and deleting entries.
include Include files used by multiple programs in the distribution.
libsmdb sendmail database library with support for Berkeley DB 1.X,
Berkeley DB 2.X, Berkeley DB 3.X, and NDBM.
@ -392,4 +400,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.71.4.8 $, Last updated $Date: 2001/07/31 22:42:46 $
$Revision: 8.81 $, Last updated $Date: 2001/09/26 16:22:19 $

View File

@ -1,11 +1,907 @@
SENDMAIL RELEASE NOTES
$Id: RELEASE_NOTES,v 8.561.2.5.2.261 2001/08/20 14:45:32 gshapiro Exp $
$Id: RELEASE_NOTES,v 8.1218 2002/01/13 18:24:15 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.2/8.12.2 2002/01/13
Don't complain too much if stdin, stdout, or stderr are missing
at startup, only log an error message.
Fix potential problem if an unknown operation mode (character
following -b) has been specified.
Prevent purgestat from looping even if someone changes the
permissions or owner of hoststatus files. Problem noted
by Kari Hurtta of the Finnish Meteorological Institute.
Properly record dropped connections in persistent host status.
Problem noted by Ulrich Windl of the Universitat
Regensburg.
Remove newlines from recipients read via sendmail -t to prevent
SMTP protocol errors when sending the RCPT command.
Problem noted by William D. Colburn of the New Mexico
Institute of Mining and Technology.
Only log milter body replacements once instead of for each body
chunk sent by a filter. Problem noted by Kari Hurtta of
the Finnish Meteorological Institute.
In 8.12.0 and 8.12.1, the headers were mistakenly not included in
the message size calculation. Problem noted by Kari Hurtta
of the Finnish Meteorological Institute.
Since 8.12 no longer forks at the SMTP MAIL command, the daemon
needs to collect children status to avoid zombie processes.
Problem noted by Chris Adams of HiWAAY Informations Services.
Shut down "nullserver" and ETRN-only connections after 25 bad
commands are issued. This makes it consistent with normal
SMTP connections.
Avoid duplicate logging of milter rejections. Problem noted by
William D. Colburn of the New Mexico Institute of Mining
and Technology.
Error and delay DSNs were being sent to postmaster instead of the
message sender if the sender had used a deprecated RFC822
source route. Problem noted by Kari Hurtta of the Finnish
Meteorological Institute.
Fix FallbackMXhost behavior for temporary errors during address
parsing. Problem noted by Jorg Bielak from Coastal Web
Online.
For systems on which stat(2) does not return a value for st_blksize
that is the "optimal blocksize for I/O" three new compile
time flags are available: SM_IO_MAX_BUF_FILE, SM_IO_MIN_BUF,
and SM_IO_MAX_BUF, which define an upper limit for
regular files, and a lower and upper limit for other file
types, respectively.
Fix a potential deadlock if two events are supposed to occur at
exactly the same time. Problem noted by Valdis Kletnieks
of Virginia Tech.
Perform envelope splitting for aliases listed directly in the
alias file, not just for include/.forward files.
Problem noted by John Beck of Sun Microsystems.
Allow selection of queue group for mailq using -qGgroup.
Based on patch by John Beck of Sun Microsystems.
Make sure cached LDAP connections used my multiple maps in the same
process are closed. Patch from Taso N. Devetzis.
If running as root, allow reading of class files in protected
directories. Patch from Alexander Talos of the University
of Vienna.
Correct a few LDAP related memory leaks. Patch from David Powell
of Sun Microsystems.
Allow specification of an empty realm via the authinfo ruleset.
This is necessary to interoperate as an SMTP AUTH client
with servers that do not support realms when using
CRAM-MD5. Problem noted by Bjoern Voigt of TU Berlin.
Avoid a potential information leak if AUTH PLAIN is used and the
server gets stuck while processing that command. Problem
noted by Chris Adams from HiWAAY Informations Services.
In addition to printing errors when parsing recipients during
command line invocations log them to make it simpler
to understand possible DSNs to postmaster.
Do not use FallbackMXhost on mailers which have the F=0 flag set.
Allow local mailers (F=l) to specify a host for TCP connections
instead of forcing localhost.
Obey ${DESTDIR} for installation of the client mail queue and
submit.cf. Patch from Peter 'Luna' Runestig.
Re-enable support for -M option which was broken in 8.12.1. Problem
noted by Neil Rickert of Northern Illinois University.
If a remote server violates the SMTP standard by unexpectedly
dropping the connection during an SMTP transaction, stop
sending commands. This prevents bogus "Bad file number"
recipient status. Problem noted by Allan E Johannesen of
Worcester Polytechnic Institute.
Do not use a size estimate of 100 for postmaster bounces, it's
almost always too small; do not guess the size at all.
New VENDOR_DEC for Compaq/DEC. Requested by James Seagraves of
Compaq Computer Corp.
Fix DaemonPortOptions IPv6 address parsing such that ::1 works
properly. Problem noted by Valdis Kletnieks of Virginia
Tech.
Portability:
Fix IPv6 network interface probing on HP-UX 11.X. Based on
patch provided by HP.
Mac OS X (aka Darwin) has a broken setreuid() call, but a
working seteuid() call. From Daniel J. Luke.
Use proper type for a 32-bit integer on SINIX. From Ganu
Sachin of Siemens.
Set SM_IO_MIN_BUF (4K) and SM_IO_MAX_BUF (8K) for HP-UX.
Reduce optimization from +O3 to +O2 on HP-UX 11. This
fixes a problem that caused additional bogus
characters to be written to the qf file. Problem
noted by Tapani Tarvainen.
Set LDA_USE_LOCKF by default for UnixWare. Problem noted
by Boyd Lynn Gerber.
Add support for HP MPE/iX. See sendmail/README for port
information. From Mark Bixby of Hewlett-Packard.
New portability defines HASNICE, HASRRESVPORT, USE_ENVIRON,
USE_DOUBLE_FORK, and NEEDLINK. See sendmail/README
for more information. From Mark Bixby of
Hewlett-Packard.
If an OS doesn't have a method of finding free disk space
(SFS_NONE), lie and say there is plenty of space.
From Mark Bixby of Hewlett-Packard.
Add support for AIX 5.1. From Valdis Kletnieks of
Virginia Tech.
Fix man page location for NeXTSTEP. From Hisanori Gogota
of the NTT/InterCommunication Center.
Do not assume that strerror() always returns a string.
Problem noted by John Beck of Sun Microsystems.
CONFIG: Add OSTYPE(freebsd5) for FreeBSD 5.X, which has removed
UUCP from the base operating system. From Mark Murray of
FreeBSD Services, Ltd.
CONFIG: Add OSTYPE(mpeix) and a generic .mc file for HP MPE/iX
systems. From Mark Bixby of Hewlett-Packard.
CONFIG: Add support for selecting a queue group for all mailers.
Based on proposal by Stephen L. Ulmer of the University of
Florida.
CONFIG: Fix error reporting for compat_check.m4. Problem noted by
Altin Waldmann.
CONFIG: Do not override user selections for confRUN_AS_USER and
confTRUSTED_USER in FEATURE(msp). From Mark Bixby of
Hewlett-Packard.
LIBMILTER: Fix bug that prevented the removal of a socket after
libmilter terminated. Problem reported by Andrey V. Pevnev
of MSFU.
LIBMILTER: Fix configuration error that required libsm for linking.
Problem noted by Kari Hurtta of the Finnish Meteorological
Institute.
LIBMILTER: Portability fix for OpenUNIX. Patch from Larry Rosenman.
LIBMILTER: Fix a theoretical memory leak and a possible attempt
to free memory twice.
LIBSM: Fix a potential segmentation violation in the I/O library.
Problem found and analyzed by John Beck and Tim Haley
of Sun Microsystems.
LIBSM: Do not clear the LDAP configuration information when
terminating the mailbox database connection in the LDAP
example code. Problem noted by Nikos Voutsinas of the
University of Athens.
New Files:
cf/cf/generic-mpeix.cf
cf/cf/generic-mpeix.mc
cf/ostype/freebsd5.m4
cf/ostype/mpeix.m4
devtools/OS/AIX.5.1
devtools/OS/MPE-iX
include/sm/os/sm_os_mpeix.h
libsm/mpeix.c
8.12.1/8.12.1 2001/10/01
SECURITY: Check whether dropping group privileges actually succeeded
to avoid possible compromises of the mail system by
supplying bogus data. Add configuration options for
different set*gid() calls to reset saved gid. Problem
found by Michal Zalewski.
PRIVACY: Prevent information leakage when sendmail has extra
privileges by disabling debugging (command line -d flag)
during queue runs and disabling ETRN when sendmail -bs is
used. Suggested by Michal Zalewski.
Avoid memory corruption problems resulting from bogus .cf files.
Problem found by Michal Zalewski.
Set the ${server_addr} macro to name of mailer when doing LMTP
delivery. LMTP systems may offer SMTP Authentication or
STARTTLS causing sendmail to use this macro in rulesets.
If debugging is turned on (-d0.10) print not just the default
values for configuration file and pid file but also the
selected values. Problem noted by Brad Chapman.
Continue dealing with broken nameservers by ignoring SERVFAIL
errors returned on T_AAAA (IPv6) lookups at delivery time
if ResolverOptions=WorkAroundBrokenAAAA is set. Previously
this only applied to hostname canonification. Problem
noted by Bill Fenner of AT&T Research.
Ignore comments in NIS host records when trying to find the
canonical name for a host.
When sendmail has extra privileges, limit mail submission command
line flags (i.e., -G, -h, -F, etc.) to mail submission
operating modes (i.e., -bm, -bs, -bv, etc.). Idea based on
suggestion from Michal Zalewski.
Portability:
AIX: Use `oslevel` if available to determine OS version.
`uname` does not given complete information.
Problem noted by Keith Neufeld of the Cessna
Aircraft Company.
OpenUNIX: Use lockf() for LDA delivery (affects mail.local).
Problem noticed by Boyd Lynn Gerber of ZENEX.
Avoid compiler warnings by not using pointers to pass
integers. Problem noted by Todd C. Miller of
Courtesan Consulting.
CONFIG: Add restrictqrun to PrivacyOptions for the MSP to minimize
problems with potential misconfigurations.
CONFIG: Fix comment showing default value of MaxHopCount. Problem
noted by Greg Robinson of the Defence Science and
Technology Organisation of Australia.
CONFIG: dnsbl: If an argument specifies an error message in case
of temporary lookup failures for DNS based blacklists
then use it.
LIBMILTER: Install mfdef.h, required by mfapi.h. Problem noted by
Richard A. Nelson of Debian.
LIBMILTER: Add __P definition for OS that lack it. Problem noted
by Chris Adams from HiWAAY Informations Services.
LIBSMDB: Fix a lock race condition that affects makemap, praliases,
and vacation.
MAKEMAP: Avoid going beyond the end of an input line if it does
not contain a value for a key. Based on patch from
Mark Bixby from Hewlett-Packard.
New Files:
test/Build
test/Makefile
test/Makefile.m4
test/README
test/t_dropgid.c
test/t_setgid.c
Deleted Files:
include/sm/stdio.h
include/sm/sysstat.h
8.12.0/8.12.0 2001/09/08
*NOTICE*: The default installation of sendmail does not use
set-user-ID root anymore. You need to create a new user and
a new group before installing sendmail (both called smmsp by
default). The installation process tries to install
/etc/mail/submit.cf and creates /var/spool/clientmqueue by
default. Please see sendmail/SECURITY for details.
SECURITY: Check for group and world writable forward and :include:
files. These checks can be turned off if absolutely
necessary using the DontBlameSendmail option and the new
flags:
GroupWritableForwardFile
WorldWritableForwardFile
GroupWritableIncludeFile
WorldWritableIncludeFile
Problem noted by Slawek Zak of Politechnika Warszawska,
SECURITY: Drop privileges when using address test mode. Suggested
by Michal Zalewski of the "Internet for Schools" project
(IdS).
Fixed problem of a global variable being used for a timeout jump
point where the variable could become overused for more than
one timeout concurrently. This erroneous behavior resulted in
a corrupted stack causing a core dump. The timeout is now
handled via libsm. Problem noted by Michael Shapiro,
John Beck, and Carl Smith of Sun Microsystems.
If sendmail is set-group-ID then that group ID is used for permission
checks (group ID of RunAsUser). This allows use of a
set-group-ID sendmail binary for initial message submission
and no set-user-ID root sendmail is needed. For details
see sendmail/SECURITY.
Log a warning if a non-trusted user changes the syslog label.
Based on notice from Bryan Costales of SL3D, Inc.
If sendmail is called for initial delivery, try to use submit.cf
with a fallback of sendmail.cf as configuration file. See
sendmail/SECURITY.
New configuration file option UseMSP to allow group writable queue
files if the group is the same as that of a set-group-ID
sendmail binary. See sendmail/SECURITY.
The .cf file is chosen based on the operation mode. For -bm (default),
-bs, and -t it is submit.cf if it exists for all others it
is sendmail.cf (to be backward compatible). This selection
can be changed by the new option -Ac or -Am (alternative .cf
file: client or mta). See sendmail/SECURITY.
The SMTP server no longer forks on each MAIL command. The ONEX
command has been removed.
Implement SMTP PIPELINING per RFC 2920. It can be turned off
at compile time or per host (ruleset).
New option MailboxDatabase specifies the type of mailbox database
used to look up local mail recipients; the default value
is "pw", which means to use getpwnam(). New mailbox database
types can be added by adding custom code to libsm/mbdb.c.
Queue file names are now 15 characters long, rather than 14 characters
long, to accomodate envelope splitting. File systems with
a 14 character file name length limit are no longer
supported.
Recipient list used for delivery now gets internally ordered by
hostsignature (character string version of MX RR). This orders
recipients for the same MX RR's together meaning smaller
portions of the list need to be scanned (instead of the whole
list) each delivery() pass to determine piggybacking. The
significance of the change is better the larger the recipient
list. Hostsignature is now created during recipient list
creation rather than just before delivery.
Enhancements for more opportunistic piggybacking. Previous
piggybacking (called coincidental) extended to coattail
piggybacking. Rather than complete MX RR matching
(coincidental) piggybacking is done if just the lowest value
preference matches (coattail).
If sendmail receives a temporary error on a RCPT TO: command, it will
try other MX hosts if available.
DefaultAuthInfo can contain a list of mechanisms to be used for
outgoing (client-side) SMTP Authentication.
New modifier 'A' for DaemonPortOptions/ClientPortOptions to disable
AUTH (overrides 'a' modifier in DaemonPortOptions). Based
on patch from Lyndon Nerenberg of Messaging Direct.
Enable AUTH mechanism EXTERNAL if STARTTLS is used.
A new ruleset authinfo can be used to return client side
authentication information for AUTH instead of DefaultAuthInfo.
Therefore the DefaultAuthInfo option is deprecated and will be
removed in future versions.
Accept any SMTP continuation code 3xy for AUTH even though RFC 2554
requires 334. Mercury 1.48 is a known offender.
Add new option AuthMaxBits to limit the overall encryption strength
for the security layer in SMTP AUTH (SASL). See
doc/op/op.me for details.
Introduce new STARTTLS related macros {cn_issuer}, {cn_subject},
{cert_md5} which hold the CN (common name) of the CA that
signed the presented certificate, the CN and the MD5 hash
of the presented certificate, respectively.
New ruleset try_tls to decide whether to try (as client) STARTTLS.
New ruleset srv_features to enable/disable certain features in the
server per connection. See doc/op/op.me for details.
New ruleset tls_rcpt to decide whether to send e-mail to a particular
recipient; useful to decide whether a conection is secure
enough on a per recipient basis.
New option TLSSrvOptions to modify some aspects of the server
for STARTTLS.
If no certificate has been requested, the macro {verify} has the
value "NOT".
New M=S modifier for ClientPortOptions/DaemonPortOptions to turn off
using/offering STARTTLS when delivering/receiving e-mail.
Macro expand filenames/directories for certs and keys in the .cf file.
Proposed by Neil Rickert of Northern Illinois University.
Generate an ephemeral RSA key for a STARTTLS connection only if
really required. This change results in a noticable
performance gains on most machines. Moreover, if shared
memory is in use, reuse the key several times.
Add queue groups which can be used to group queue directories with
the same behavior together. See doc/op/op.me for details.
If the new option FastSplit (defaults to one) has a value greater
than zero, it suppresses the MX lookups on addresses when they
are initially sorted which may result in faster envelope
splitting. If the mail is submitted directly from the
command line, then the value also limits the number of
processes to deliver the envelopes; if more envelopes are
created they are only queued up and must be taken care of
by a queue run.
The check for 'enough disk space' now pays attention to which file
system each queue directory resides in.
All queue runners can be cleanly terminated via SIGTERM to parent.
New option QueueFileMode for the default permissions of queue files.
Add parallel queue runner code. Allows multiple queue runners per work
group (one or more queues in a multi-queue environment
collected together) to process the same work list at the
same time.
Option MaxQueueChildren added to limit the number of concurrently
active queue runner processes.
New option MaxRunnersPerQueue to specify the maximum number of queue
runners per queue group.
Queue member selection by substring pattern matching now allows
the pattern to be negated. For -qI, -qR and -qS it is
permissible for -q!I, -q!R and -q!S to mean remove members
of the queue that match during processing.
New -qp[time] option is similar to -qtime, except that instead of
periodically forking a child to process the queue, a single
child is forked for each queue that sleeps between queue
runs. A SIGHUP signal can be sent to restart this
persistent queue runner.
The SIGHUP signal now restarts a timed queue run process (i.e., a
sendmail process which only runs the queue at an interval:
sendmail -q15m).
New option NiceQueueRun to set the priority of queue runners.
Proposed by Thom O'Connor.
sendmail will run the queue(s) in the background when invoked with -q
unless the new -qf option or -v is used.
QueueSortOrder=Random sorts the queue randomly, which is useful if
several queue runners are started by hand to avoid contention.
QueueSortOrder=Modification sorts the queue by the modification time
of the qf file (older entries first).
Support Deliver By SMTP Service Extension (RFC 2852) which allows
a client to specify an amount of time within which an e-mail
should be delivered. New option DeliverByMin added to set the
minimum amount of time or disable the extension.
Non-printable characters (ASCII: 0-31, 127) in mailbox addresses are
not allowed unless escaped or quoted.
Add support for a generic DNS map. Based on a patch contributed
by Leif Johansson of Stockholm University, which was based on
work by Assar Westerlund of Swedish Institute of Computer
Science, Kista, and Johan Danielsson of Royal Institute of
Technology, Stockholm, Sweden.
MX records will be looked up for FallBackMXhost. To use the old
behavior (no MX lookups), put the name in square brackets.
Proposed by Thom O'Connor.
Use shared memory to store free space of filesystems that are used
for queues, if shared memory is available and if a key is set
via SharedMemoryKey. This minimizes the number of system
calls to check the available space. See doc/op/op.me for
details.
If shared memory is compiled in the option -bP can be used to print
the number of entries in the queue(s).
Enable generic mail filter API (milter). See libmilter/README
and the usual documentation for details.
Remove AutoRebuildAliases option, deprecated since 8.10.
Remove '-U' (initial user submission) command line option as
announced in 8.10.
Remove support for non-standard SMTP command XUSR. Use an MSA instead.
New macro {addr_type} which contains whether the current address is
an envelope sender or recipient address. Suggested by
Neil Rickert of Northern Illinois University.
Two new options for host maps: -d (retransmission timeout),
-r (number of retries).
New option for LDAP maps: the -V<sep> allows you to specify a
separator such that a lookup can return both an attribute
and value separated by the given separator.
Add new operators '%', '|', '&' (modulo, binary or, binary and)
to map class arith.
If DoubleBounceAddress expands to an empty string, ``double bounces''
(errors that occur when sending an error message) are dropped.
New DontBlameSendmail options GroupReadableSASLDBFile and
GroupWritableSASLDBFile to relax requirements for sasldb files.
New DontBlameSendmail options GroupReadableKeyFile to relax
requirements for files containing secret keys. This is
necessary for the MSP if client authentification is used.
Properly handle quoted filenames for class files (to allow for
filenames with spaces).
Honor the resolver option RES_NOALIASES when canonifying hostnames.
Add macros to avoid the reuse of {if_addr} etc:
{if_name_out} hostname of interface of outgoing connection.
{if_addr_out} address of interface of outgoing connection.
{if_family_out} family of interface of outgoing connection.
The latter two are only set if the interface does not belong
to the loopback net.
Add macro {nrcpts} which holds the number of (validated) recipients.
DialDelay option applies only to mailers with flag 'Z'. Patch from
Juergen Georgi of RUS University of Stuttgart.
New Timeout.lhlo,auth,starttls options to limit the time waiting for
an answer to the LMTP LHLO, SMTP AUTH or STARTTLS command.
New Timeout.aconnect option to limit the overall waiting time for
all connections for a single delivery attempt to succeed.
Limit the rate recipients in the SMTP envelope are accepted once
a threshold number of recipients has been rejected (option
BadRcptThrottle). From Gregory A Lundberg of the WU-FTPD
Development Group.
New option DelayLA to delay connections if the load averages
exceeds the specified value. The default of 0 does not
change the previous behavior. A value greater than 0
will cause sendmail to sleep for one second on most
SMTP commands and before accepting connections if that
load average is exceeded.
Use a dynamic (instead of fixed-size) buffer for the list of
recipients that are sent during a connection to a mailer.
This also introduces a new mailer field 'r' which defines
the maximum number of recipients (defaults to 100).
Based on patch by Motonori Nakamura of Kyoto University.
Add new F=1 mailer flag to disable sending of null characters ('\0').
Add new F=2 mailer flag to disable use of ESMTP, using SMTP instead.
The deprecated [TCP] builtin mailer pathname (P=) is gone. Use [IPC]
instead.
IPC is no longer available as first mailer argument (A=) for [IPC]
builtin mailer pathnames. Use TCP instead.
PH map code updated to use the new libphclient API instead of the
old libqiapi library. Contributed by Mark Roth of the
University of Illinois at Urbana-Champaign.
New option DirectSubmissionModifiers to define {daemon_flags}
for direct (command line) submissions.
New M=O modifier for DaemonPortOptions to ignore the socket in
case of failures. Based on patch by Jun-ichiro itojun
Hagino of the KAME Project.
Add Disposition-Notification-To: (RFC 2298) to the list of headers
whose content is rewritten similar to Reply-To:.
Proposed by Andrzej Filip.
Use STARTTLS/AUTH=server/client for logging incoming/outgoing
STARTTLS/AUTH connections; log incoming connections at level
9 or higher. Use AUTH/STARTTLS instead of SASL/TLS for SMTP
AUTH/STARTTLS related logfile entries.
Convert unprintable characters (and backslash) into octal or C format
before logging.
Log recipients if no message is transferred but QUIT/RSET is given
(at LogLevel 9/10 or higher).
Log discarded recipients at LogLevel 10 or higher.
Do not log "did not issue MAIL/EXPN/VRFY/ETRN" for connections
in which most commands are rejected due to check_relay or
TCP Wrappers if the host tries one of those commands anyway.
Change logging format for cloned envelopes to be similar to that for
DSNs ("old id: new id: clone"). Suggested by Ulrich Windl
of the Universitat Regensburg.
Added libsm, a C library of general purpose abstractions including
assertions, tracing and debugging with named debug categories,
exception handling, malloc debugging, resource pools,
portability abstractions, and an extensible buffered I/O
package. It will at some point replace libsmutil.
See libsm/index.html for details.
Fixed most memory leaks in sendmail which were previously taken
care of by fork() and exit().
Use new sm_io*() functions in place of stdio calls. Allows for
more consistent portablity amongst different platforms
new and old (from new libsm).
Common I/O pkg means just one buffering method needed instead of two
('bf_portable' and 'bf_torek' now just 'bf').
Sfio no longer needed as SASL/TLS code uses sm_io*() API's.
New possible value 'interactive' for SuperSafe which can be used
together with DeliveryMode=interactive is to avoid some disk
synchronizations calls.
Add per-recipient status information to mailq -v output.
T_ANY queries are no longer used by sendmail.
When compiling with "gcc -O -Wall" specify "-DSM_OMIT_BOGUS_WARNINGS"
too (see include/sm/cdefs.h for more info).
sendmail -d now has general support for named debug categories.
See libsm/debug.html and section 3.4 of doc/op/op.me
for details.
Eliminate the "postmaster warning" DSNs on address parsing errors
such as unbalanced angle brackets or parentheses. The DSNs
generated by this condition were illegal (not RFC conform).
Problem noted by Ulrich Windl of the Universitaet Regensburg.
Do not issue a DSN if the ruleset localaddr resolves to the $#error
mailer and the recipient has hence been rejected during the
SMTP dialogue. Problem reported by Larry Greenfield of CMU.
Deal with a case of multiple deliveries on misconfigured systems
that do not have postmaster defined. If an email was sent
from an address to which a DSN cannot be returned and
in which at least one recipient address is non-deliverable,
then that email had been delivered in each queue run.
Problem reported by Matteo HCE Valsasna of Universita
degli Studi dell'Insubria.
The compilation options SMTP, DAEMON, and QUEUE have been removed,
i.e., the corresponding code is always compiled in now.
Log the command line in daemon/queue-run mode at LogLevel 10 and
higher. Suggested by Robert Harker of Harker Systems.
New ResolverOptions setting: WorkAroundBrokenAAAA. When
attempting to canonify a hostname, some broken nameservers
will return SERVFAIL (a temporary failure) on T_AAAA (IPv6)
lookups. If you want to excuse this behavior, use this new
flag. Suggested by Chris Foote of SE Network Access and
Mark Roth of the University of Illinois at
Urbana-Champaign.
Free the memory allocated by getipnodeby{addr,name}(). Problem
noted by Joy Latten of IBM.
ConnectionRateThrottle limits the number of connections per second
to each daemon individually, not the overall number of
connections.
Specifying only "ldap:" as an AliasFile specification will force
sendmail to use a default alias schema as outlined in the
``USING LDAP FOR ALIASES, MAPS, and CLASSES'' section of
cf/README.
Add a new syntax for the 'F' (file class) sendmail.cf command. If
the first character after the class name is not a '/' or a
'|' and it contains an '@' (e.g., F{X}key@class:spec), the
rest of the line will be parsed as a map lookup. This
allows classes to be filled via a map lookup. See op.me
for more syntax information. Specifically, this can be
used for commands such as VIRTUSER_DOMAIN_FILE() to read
the list of domains via LDAP (see the ``USING LDAP FOR
ALIASES, MAPS, and CLASSES'' section of cf/README for an
example).
The new macro ${sendmailMTACluster} determines the LDAP cluster for
the default schema used in the above two items.
Unless DontBlameSendmail=RunProgramInUnsafeDirPath is set, log a
warning if a program being run from a mailer or file class
(e.g., F|/path/to/prog) is in an unsafe directory path.
Unless DontBlameSendmail=RunWritableProgram is set, log a warning
if a program being run from a mailer or file class
(e.g., F|/path/to/prog) is group or world writable.
Loopback interfaces (e.g., "lo0") are now probed for class {w}
hostnames. Setting DontProbeInterfaces to "loopback"
(without quotes) will disable this and return to the
pre-8.12 behavior of only probing non-loopback interfaces.
Suggested by Bryan Stansell of GNAC.
In accordance with RFC 2821 section 4.1.4, accept multiple
HELO/EHLO commands.
Multiple ClientPortOptions settings are now allowed, one for each
possible protocol family which may be used for outgoing
connections. Restrictions placed on one family only affect
outgoing connections on that particular family. Because of
this change, the ${client_flags} macro is not set until the
connection is established. Based on patch from Motonori
Nakamura of Kyoto University.
PrivacyOptions=restrictexpand instructs sendmail to drop privileges
when the -bv option is given by users who are neither root
nor the TrustedUser so users can not read private aliases,
forwards, or :include: files. It also will override the -v
(verbose) command line option.
If the M=b modifier is set in DaemonPortOptions and the interface
address can't be used for the outgoing connection, fall
back to the settings in ClientPortOptions (if set).
Problem noted by John Beck of Sun Microsystems.
New named config file rule check_data for DATA command (input:
number of recipients). Based on patch from Mark Roth of
the University of Illinois at Urbana-Champaign.
Add support for ETRN queue selection per RFC 1985. The queue group
can be specified using the '#' option character. For
example, 'ETRN #queuegroup'.
If an LDAP server times out or becomes unavailable, close the
current connection and reopen to get to one of the fallback
servers. Patch from Paul Hilchey of the University of
British Columbia.
Make default error number on $#error messages 550 instead of 501
because 501 is not allowed on all commands.
The .cf file option UnsafeGroupWrites is deprecated, it should be
replaced with the settings GroupWritableForwardFileSafe
and GroupWritableIncludeFileSafe in DontBlameSendmail
if required.
The deprecated ldapx map class has been removed. Use the ldap map
class instead.
Any IPv6 addresses used in configuration should be prefixed by the
"IPv6:" tag to identify the address properly. For example,
if you want to add the IPv6 address [2002:c0a8:51d2::23f4] to
class {w}, you would need to add [IPv6:2002:c0a8:51d2::23f4].
Change the $&{opMode} macro if the operation mode changes while the
MTA is running. For example, during a queue run.
Add "use_inet6" as a new ResolverOptions flag to control the
RES_USE_INET6 resolver option. Based on patch from Rick
Nelson of IBM.
The maximum number of commands before the MTA slows down when too
many "light weight" commands have been received are now
configurable during compile time. The current values and
their defaults are:
MAXBADCOMMANDS 25 unknown commands
MAXNOOPCOMMANDS 20 NOOP, VERB, ONEX, XUSR
MAXHELOCOMMANDS 3 HELO, EHLO
MAXVRFYCOMMANDS 6 VRFY, EXPN
MAXETRNCOMMANDS 8 ETRN
Setting a value to 0 disables the check. Patch from Bryan
Costales of SL3D, Inc.
The header syntax H?${MyMacro}?X-My-Header: now not only checks if
${MyMacro} is defined but also that it is not empty.
Properly quote usernames with special characters if they are used
in headers. Problem noted by Kari Hurtta of the Finnish
Meteorological Institute.
Be sure to include the proper Final-Recipient: DSN header in bounce
messages for messages for mailing list expanded addresses
which are not delivered on the initial attempt.
Do not treat errors as sticky when doing delivery via LMTP after
the final dot has been sent to avoid affecting future
deliveries. Problem reported by Larry Greenfield of CMU.
New compile time flag REQUIRES_DIR_FSYNC which turns on support for
file systems that require to call fsync() for a directory
if the meta-data in it has been changed. This should be
set at least for ReiserFS; it is enabled by default for Linux.
See sendmail/README for further information.
Avoid file locking deadlock when updating the statistics file if
sendmail is signaled to terminate. Problem noted by
Christophe Wolfhugel of France Telecom.
Set the $c macro (hop count) as it is being set instead of when the
envelope is initialized. Problem noted by Kari Hurtta of
the Finnish Meteorological Institute.
Properly count recipients for DeliveryMode defer and queue. Fix
from Peter A. Friend of EarthLink.
Treat invalid hesiod lookups as permanent errors instead of
temporary errors. Problem noted by Russell McOrmond of
flora.ca.
Portability:
Remove support for AIX 2, which supports only 14 character
filenames and is outdated anyway. Suggested by
Valdis Kletnieks of Virginia Tech.
Change several settings for Irix 6: remove confSBINDIR,
i.e., use default /usr/sbin, change owner/group
of man pages and user-executable to root/sys, set
optimization limit to 0 (unlimited). Based on patch
from Ayamura Kikuchi, M.D, and proposal from Kari
Hurtta of the Finnish Meteorological Institute.
Do not assume LDAP support is installed by default under
Solaris 8 and later.
Add support for OpenUNIX.
CONFIG: Increment version number of config file to 10.
CONFIG: Add an install target and a README file in cf/cf.
CONFIG: Don't accept addresses of the form a@b@, a@b@c, a@[b]c, etc.
CONFIG: Reject empty recipient addresses (in check_rcpt).
CONFIG: The access map uses an option of -T<TMPF> to deal with
temporary lookup failures.
CONFIG: New value for access map: SKIP, which causes the default
action to be taken by aborting the search for domain names
or IP nets.
CONFIG: check_rcpt can deal with TEMPFAIL for either recipient or
relay address as long as the other part allows the email
to get through.
CONFIG: Entries for virtusertable can make use of a third parameter
"%3" which contains "+detail" of a wildcard match, i.e., an
entry like user+*@domain. This allows handling of details by
using %1%3 as the RHS. Additionally, a "+" wildcard has been
introduced to match only non-empty details of addresses.
CONFIG: Numbers for rulesets used by MAILERs have been removed
and hence there is no required order within the MAILER
section anymore except for MAILER(`uucp') which must come
after MAILER(`smtp') if uucp-dom and uucp-uudom are used.
CONFIG: Hosts listed in the generics domain class {G}
(GENERICS_DOMAIN() and GENERICS_DOMAIN_FILE()) are treated
as canonical. Suggested by Per Hedeland of Ericsson.
CONFIG: If FEATURE(`delay_checks') is used, make sure that a lookup
in the access map which returns OK or RELAY actually
terminates check_* ruleset checking.
CONFIG: New tag TLS_Rcpt: for access map to be used by ruleset
tls_rcpt, see cf/README for details.
CONFIG: Change format of Received: header line which reveals whether
STARTTLS has been used to "(version=${tls_version}
cipher=${cipher} bits=${cipher_bits} verify=${verify})".
CONFIG: Use "Spam:" as tag for lookups for FEATURE(`delay_checks')
options friends/haters instead of "To:" and enable
specification of whole domains instead of just users.
Notice: this change is not backward compatible.
Suggested by Chris Adams from HiWAAY Informations Services.
CONFIG: Allow for local extensions for most new rulesets, see
cf/README for details.
CONFIG: New FEATURE(`lookupdotdomain') to lookup also .domain in
the access map. Proposed by Randall Winchester of the
University of Maryland.
CONFIG: New FEATURE(`local_no_masquerade') to avoid masquerading for
the local mailer. Proposed by Ingo Brueckl of Wupper Online.
CONFIG: confRELAY_MSG/confREJECT_MSG can override the default
messages for an unauthorized relaying attempt/for access
map entries with RHS REJECT, respectively.
CONFIG: FEATURE(`always_add_domain') takes an optional argument
to specify another domain to be added instead of the local one.
Suggested by Richard H. Gumpertz of Computer Problem
Solving.
CONFIG: confAUTH_OPTIONS allows setting of Cyrus-SASL specific
options, see doc/op/op.me for details.
CONFIG: confAUTH_MAX_BITS sets the maximum encryption strength for
the security layer in SMTP AUTH (SASL).
CONFIG: If Local_localaddr resolves to $#ok, localaddr is terminated
immediately.
CONFIG: FEATURE(`enhdnsbl') is an enhanced version of dnsbl which
allows checking of the return values of the DNS lookups.
See cf/README for details.
CONFIG: FEATURE(`dnsbl') allows now to specify the behavior for
temporary lookup failures.
CONFIG: New option confDELIVER_BY_MIN to specify minimum time for
Deliver By (RFC 2852) or to turn off the extension.
CONFIG: New option confSHARED_MEMORY_KEY to set the key for shared
memory use.
CONFIG: New FEATURE(`compat_check') to look up a key consisting
of the sender and the recipient address delimited by the
string "<@>", e.g., sender@sdomain<@>recipient@rdomain,
in the access map. Based on code contributed by Mathias
Koerber of Singapore Telecommunications Ltd.
CONFIG: Add EXPOSED_USER_FILE() command to allow an exposed user
file. Suggested by John Beck of Sun Microsystems.
CONFIG: Don't use MAILER-DAEMON for error messages delivered
via LMTP. Problem reported by Larry Greenfield of CMU.
CONFIG: New FEATURE(`preserve_luser_host') to preserve the name of
the recipient host if LUSER_RELAY is used.
CONFIG: New FEATURE(`preserve_local_plus_detail') to preserve the
+detail portion of the address when passing address to
local delivery agent. Disables alias and .forward +detail
stripping. Only use if LDA supports this.
CONFIG: Removed deprecated FEATURE(`rbl').
CONFIG: Add LDAPROUTE_EQUIVALENT() and LDAPROUTE_EQUIVALENT_FILE()
which allow you to specify 'equivalent' hosts for LDAP
Routing lookups. Equivalent hostnames are replaced by the
masquerade domain name for lookups. See cf/README for
additional details.
CONFIG: Add a fourth argument to FEATURE(`ldap_routing') which
instructs the rulesets on what to do if the address being
looked up has +detail information. See cf/README for more
information.
CONFIG: When chosing a new destination via LDAP Routing, also look
up the new routing address/host in the mailertable. Based
on patch from Don Badrak of the United States Census Bureau.
CONFIG: Do not reject the SMTP Mail from: command if LDAP Routing
is in use and the bounce option is enabled. Only reject
recipients as user unknown.
CONFIG: Provide LDAP support for the remaining database map
features. See the ``USING LDAP FOR ALIASES AND MAPS''
section of cf/README for more information.
CONFIG: Add confLDAP_CLUSTER which defines the ${sendmailMTACluster}
macro used for LDAP searches as described above in ``USING
LDAP FOR ALIASES, MAPS, AND CLASSES''.
CONFIG: confCLIENT_OPTIONS has been replaced by CLIENT_OPTIONS(),
which takes the options as argument and can be used
multiple times; see cf/README for details.
CONFIG: Add configuration macros for new options:
confBAD_RCPT_THROTTLE BadRcptThrottle
confDIRECT_SUBMISSION_MODIFIERS DirectSubmissionModifiers
confMAILBOX_DATABASE MailboxDatabase
confMAX_QUEUE_CHILDREN MaxQueueChildren
confMAX_RUNNERS_PER_QUEUE MaxRunnersPerQueue
confNICE_QUEUE_RUN NiceQueueRun
confQUEUE_FILE_MODE QueueFileMode
confFAST_SPLIT FastSplit
confTLS_SRV_OPTIONS TLSSrvOptions
See above (and related documentation) for further information.
CONFIG: Add configuration variables for new timeout options:
confTO_ACONNECT Timeout.aconnect
confTO_AUTH Timeout.auth
confTO_LHLO Timeout.lhlo
confTO_STARTTLS Timeout.starttls
CONFIG: Add configuration macros for mail filter API:
confINPUT_MAIL_FILTERS InputMailFilters
confMILTER_LOG_LEVEL Milter.LogLevel
confMILTER_MACROS_CONNECT Milter.macros.connect
confMILTER_MACROS_HELO Milter.macros.helo
confMILTER_MACROS_ENVFROM Milter.macros.envfrom
confMILTER_MACROS_ENVRCPT Milter.macros.envrcpt
Mail filters can be defined via INPUT_MAIL_FILTER() and
MAIL_FILTER(). See libmilter/README, cf/README, and
doc/op/op.me for details.
CONFIG: Add support for accepting temporarily unresolvable domains.
See cf/README for details. Based on patch by Motonori
Nakamura of Kyoto University.
CONFIG: confDEQUOTE_OPTS can be used to specify options for the
dequote map.
CONFIG: New macro QUEUE_GROUP() to define queue groups.
CONFIG: New FEATURE(`queuegroup') to select a queue group based
on the full e-mail address or the domain of the recipient.
CONFIG: Any IPv6 addresses used in configuration should be prefixed
by the "IPv6:" tag to identify the address properly. For
example, if you want to use the IPv6 address
2002:c0a8:51d2::23f4 in the access database, you would need
to use IPv6:2002:c0a8:51d2::23f4 on the left hand side.
This affects the access database as well as the
relay-domains and local-host-names files.
CONFIG: OSTYPE(aux) has been renamed to OSTYPE(a-ux).
CONFIG: Avoid expansion of m4 keywords in SMART_HOST.
CONFIG: Add MASQUERADE_EXCEPTION_FILE() for reading masquerading
exceptions from a file. Suggested by Trey Breckenridge of
Mississippi State University.
CONFIG: Add LOCAL_USER_FILE() for reading local users
(LOCAL_USER() -- $={L}) entries from a file.
CONTRIB: dnsblaccess.m4 is a further enhanced version of enhdnsbl.m4
which allows to lookup error codes in the access map.
Contributed by Neil Rickert of Northern Illinois University.
DEVTOOLS: Add new options for installation of include and library
files: confINCGRP, confINCMODE, confINCOWN, confLIBGRP,
confLIBMODE, confLIBOWN.
DEVTOOLS: Add new option confDONT_INSTALL_CATMAN to turn off
installation of the the formatted man pages on operating
systems which don't include cat directories.
EDITMAP: New program for editing maps as supplement to makemap.
MAIL.LOCAL: Mail.local now uses the libsm mbdb package to look up
local mail recipients. New option -D mbdb specifies the
mailbox database type.
MAIL.LOCAL: New option "-h filename" which instructs mail.local to
deliver the mail to the named file in the user's home
directory instead of the system mail spool area. Based on
patch from Doug Hardie of the Los Angeles Free-Net.
MAILSTATS: New command line option -P which acts the same as -p but
doesn't truncate the statistics file.
MAKEMAP: Add new option -t to specify a different delimiter
instead of white space.
RMAIL: Invoke sendmail with '-G' to indicate this is a gateway
submission. Problem noted by Kari Hurtta of the Finnish
Meteorological Institute.
SMRSH: Use the vendor supplied directory on FreeBSD 3.3 and later.
VACATION: Change Auto-Submitted: header value from auto-generated to
auto-replied. From Kenneth Murchison of Oceana Matrix Ltd.
VACATION: New option -d to send error/debug messages to stdout
instead of syslog.
VACATION: New option -U which prevents the attempt to lookup login
in the password file. The -f and -m options must be used
to specify the database and message file since there is no
home directory for the default settings for these options.
VACATION: Vacation now uses the libsm mbdb package to look up
local mail recipients; it reads the MailboxDatabase option
from the sendmail.cf file. New option -C cffile which
specifies the path of the sendmail.cf file.
New Directories:
libmilter/docs
New Files:
cf/cf/README
cf/cf/submit.cf
cf/cf/submit.mc
cf/feature/authinfo.m4
cf/feature/compat_check.m4
cf/feature/enhdnsbl.m4
cf/feature/msp.m4
cf/feature/local_no_masquerade.m4
cf/feature/lookupdotdomain.m4
cf/feature/preserve_luser_host.m4
cf/feature/preserve_local_plus_detail.m4
cf/feature/queuegroup.m4
cf/sendmail.schema
contrib/dnsblaccess.m4
devtools/M4/UNIX/sm-test.m4
devtools/OS/OpenUNIX.5.i386
editmap/*
include/sm/*
libsm/*
libsmutil/cf.c
libsmutil/err.c
sendmail/SECURITY
sendmail/TUNING
sendmail/bf.c
sendmail/bf.h
sendmail/sasl.c
sendmail/sm_resolve.c
sendmail/sm_resolve.h
sendmail/tls.c
Deleted Files:
cf/feature/rbl.m4
cf/ostype/aix2.m4
devtools/OS/AIX.2
include/sendmail/cdefs.h
include/sendmail/errstring.h
include/sendmail/useful.h
libsmutil/errstring.c
sendmail/bf_portable.c
sendmail/bf_portable.h
sendmail/bf_torek.c
sendmail/bf_torek.h
sendmail/clock.c
Renamed Files:
cf/cf/generic-solaris2.mc => cf/cf/generic-solaris.mc
cf/cf/generic-solaris2.cf => cf/cf/generic-solaris.cf
cf/ostype/aux.m4 => cf/ostype/a-ux.m4
8.11.6/8.11.6 2001/08/20
SECURITY: Fix a possible memory access violation when specifying
out-of-bounds debug parameters. Problem detected by
@ -1643,7 +2539,7 @@ summary of the changes in that release.
CONFIG: OSTYPE(`bsdi1.0') and OSTYPE(`bsdi2.0') have been
deprecated and may be removed from a future release.
BSD/OS users should begin using OSTYPE(`bsdi').
CONFIG: OpenBSD 2.4 installs mail.local non-set-user-id root. This
CONFIG: OpenBSD 2.4 installs mail.local non-set-user-ID root. This
requires a new OSTYPE(`openbsd'). From Todd C. Miller of
Courtesan Consulting.
CONFIG: New OSTYPE(`hpux11') for HP/UX 11.X.
@ -1903,7 +2799,7 @@ summary of the changes in that release.
the others (if it exists).
DEVTOOLS: Change order of LIBS: first product specific libraries
then the default ones.
MAIL.LOCAL: Will not be installed set-user-id root. To use mail.local
MAIL.LOCAL: Will not be installed set-user-ID root. To use mail.local
as local delivery agent without LMTP mode, use
MODIFY_MAILER_FLAGS(`LOCAL', `+S')
to set the S flag.
@ -2458,7 +3354,7 @@ summary of the changes in that release.
uid and gid for user bin instead of daemon. If DefaultUser
is set in the configuration file, that value overrides this
default.
SECURITY: Since 8.8.7, the check for non-set-user-id binaries
SECURITY: Since 8.8.7, the check for non-set-user-ID binaries
interfered with setting an alternate group id for the
RunAsUser option. Problem noted by Randall Winchester of
the University of Maryland.
@ -3126,7 +4022,7 @@ summary of the changes in that release.
In some cases, errors during an SMTP session could leave files
open or locked.
Better handling of missing file descriptors (0, 1, 2) on startup.
Better handling of non-set-user-id binaries -- avoids certain obnoxious
Better handling of non-set-user-ID binaries -- avoids certain obnoxious
errors during testing.
Errors in file locking of NEWDB maps had the incorrect file name
printed in the error message.
@ -3518,7 +4414,7 @@ summary of the changes in that release.
change to the sendmail map code was made in 8.8.3. Problem
noted by Gregory Neil Shapiro.
MAKEMAP: Give warnings on file problems such as map files that are
symbolic links; although makemap is not set-user-id root, it is
symbolic links; although makemap is not set-user-ID root, it is
often run as root and hence has the potential for the same
sorts of problems as alias rebuilds.
MAKEMAP: Change compilation so that it will link properly on
@ -4304,7 +5200,7 @@ summary of the changes in that release.
Fix problem finding network interface addresses. Patch from
Motonori Nakamura.
Don't reject qf entries that are not owned by your effective uid if
you are not running set-user-id; this makes management of
you are not running set-user-ID; this makes management of
certain kinds of firewall setups difficult. Patch
suggested by Eamonn Coleman of Qualcomm.
Add persistent host status. This keeps the information normally
@ -4674,7 +5570,7 @@ summary of the changes in that release.
failure in the hosts.files map. This error caused hard
bounces when it should have requeued.
Aliases to files such as /users/bar/foo/inbox, with /users/bar/foo
owned by bar mode 700 and inbox being set-user-id bar stopped
owned by bar mode 700 and inbox being set-user-ID bar stopped
working properly due to excessive paranoia. Pointed out by
John Hawkinson of Panix.
An SMTP RCPT command referencing a host that gave a nameserver
@ -5348,7 +6244,7 @@ summary of the changes in that release.
the aliases file: use the default uid/gid instead of the
real uid/gid. This allows you to create a file owned by
and writable only by the default uid/gid that will work
all the time (without having the set-user-id bit set). Change
all the time (without having the set-user-ID bit set). Change
suggested by Shau-Ping Lo and Andrew Cheng of Sun
Microsystems.
Add "DialDelay" option (no short name) to provide an "extra"

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
#
# Makefile for configuration files.
#
# $Id: Makefile,v 8.40.8.5 2001/04/12 22:39:52 gshapiro Exp $
# $Id: Makefile,v 8.56 2001/12/13 23:56:37 gshapiro Exp $
#
#
@ -11,11 +11,24 @@
# /usr/5bin/m4.
#
# name of source for sendmail.cf (without extension)
CF= sendmail
# name of source for submit.cf (without extension)
SUBMIT= submit
# directory for .cf files
MAILDIR=/etc/mail
M4= m4
CFDIR= ..
CHMOD= chmod
ROMODE= 444
RM= rm -f
# use our own install program; should be really confINSTALL
INSTALL=../../devtools/bin/install.sh
# CF file ownership/permissions
CFOWN=root
CFGRP=bin
CFMODE=0444
.SUFFIXES: .mc .cf
@ -25,16 +38,16 @@ RM= rm -f
$(CHMOD) $(ROMODE) $@
GENERIC=generic-bsd4.4.cf generic-hpux9.cf generic-hpux10.cf \
generic-linux.cf generic-nextstep3.3.cf \
generic-osf1.cf generic-solaris2.cf \
generic-linux.cf generic-mpeix.cf generic-nextstep3.3.cf \
generic-osf1.cf generic-solaris.cf \
generic-sunos4.1.cf generic-ultrix4.cf
BERKELEY=cs-hpux9.cf cs-hpux10.cf cs-osf1.cf cs-solaris2.cf \
BERKELEY=cs-hpux9.cf cs-hpux10.cf cs-osf1.cf cs-solaris.cf \
cs-sunos4.1.cf cs-ultrix4.cf \
s2k-osf1.cf s2k-ultrix4.cf \
chez.cs.cf huginn.cs.cf mail.cs.cf mail.eecs.cf mailspool.cs.cf \
python.cs.cf ucbarpa.cf ucbvax.cf vangogh.cs.cf
OTHER= knecht.cf
ALL= $(GENERIC) $(BERKELEY) $(OTHER)
ALL= submit.cf $(GENERIC) $(OTHER)
all: $(ALL)
@ -45,7 +58,30 @@ other: $(OTHER)
clean cleandir:
$(RM) $(ALL) core
depend install:
install:
@echo "Before installing the .cf files please make sure you have read the"
@echo "instructions in the file ../../INSTALL. You should have prepared the"
@echo "files \"submit.mc\" (supplied) and \"sendmail.mc\". Then you can use"
@echo ""
@echo " make install-cf"
@echo ""
@echo "If you use a different name than \"sendmail\" for your main .mc file"
@echo "then you should use"
@echo ""
@echo " make install-cf CF=config"
@echo ""
@echo "where \"config\" is the name of your main .mc file."
install-cf: install-sendmail-cf install-submit-cf
install-sendmail-cf: $(CF).cf
$(INSTALL) -c -o $(CFOWN) -g $(CFGRP) -m $(CFMODE) $(CF).cf ${DESTDIR}$(MAILDIR)/sendmail.cf
install-submit-cf: $(SUBMIT).cf
$(INSTALL) -c -o $(CFOWN) -g $(CFGRP) -m $(CFMODE) $(SUBMIT).cf ${DESTDIR}$(MAILDIR)/submit.cf
depend:
# this is overkill, but....
M4FILES=\
@ -82,7 +118,6 @@ M4FILES=\
${CFDIR}/feature/nouucp.m4 \
${CFDIR}/feature/nullclient.m4 \
${CFDIR}/feature/promiscuous_relay.m4 \
${CFDIR}/feature/rbl.m4 \
${CFDIR}/feature/redirect.m4 \
${CFDIR}/feature/relay_based_on_MX.m4 \
${CFDIR}/feature/relay_entire_domain.m4 \
@ -112,11 +147,11 @@ M4FILES=\
${CFDIR}/mailer/smtp.m4 \
${CFDIR}/mailer/usenet.m4 \
${CFDIR}/mailer/uucp.m4 \
${CFDIR}/ostype/aix2.m4 \
${CFDIR}/ostype/aix3.m4 \
${CFDIR}/ostype/aix4.m4 \
${CFDIR}/ostype/altos.m4 \
${CFDIR}/ostype/amdahl-uts.m4 \
${CFDIR}/ostype/a-ux.m4 \
${CFDIR}/ostype/bsd4.3.m4 \
${CFDIR}/ostype/bsd4.4.m4 \
${CFDIR}/ostype/bsdi.m4 \
@ -125,6 +160,8 @@ M4FILES=\
${CFDIR}/ostype/dgux.m4 \
${CFDIR}/ostype/domainos.m4 \
${CFDIR}/ostype/dynix3.2.m4 \
${CFDIR}/ostype/freebsd4.m4 \
${CFDIR}/ostype/freebsd5.m4 \
${CFDIR}/ostype/gnu.m4 \
${CFDIR}/ostype/hpux10.m4 \
${CFDIR}/ostype/hpux11.m4 \
@ -136,6 +173,7 @@ M4FILES=\
${CFDIR}/ostype/linux.m4 \
${CFDIR}/ostype/maxion.m4 \
${CFDIR}/ostype/mklinux.m4 \
${CFDIR}/ostype/mpeix.m4 \
${CFDIR}/ostype/nextstep.m4 \
${CFDIR}/ostype/openbsd.m4 \
${CFDIR}/ostype/osf1.m4 \

View File

@ -0,0 +1,34 @@
SENDMAIL CONFIGURATION FILES INSTALLATION
This document describes how to install the sendmail configuration files.
Please see ../README about the sendmail configuration files themselves.
By default you need two .mc files: sendmail.mc and submit.mc. The
latter is a copy of msp.mc in which OSTYPE() has been filled in
according to the host OS. For the former see ../README.
Installation of these two files can be done via:
make install-cf
If you use a different name than "sendmail" for your main .mc file"
then you should use
make install-cf CF=config
where "config" is the name of your main .mc file.
The default installation directory is /etc/mail and can be changed
by specifying
MAILDIR=/other/dir
The name of the source file for "submit.cf" can be overridden by
SUBMIT=msp
For more details see Makefile.
$Revision: 1.1 $, Last updated $Date: 2001/04/26 15:43:20 $

View File

@ -20,7 +20,7 @@ divert(-1)
#
divert(0)dnl
VERSIONID(`$Id: generic-hpux10.mc,v 8.11.22.2 2001/05/29 17:30:18 ca Exp $')
VERSIONID(`$Id: generic-hpux10.mc,v 8.13 2001/05/29 17:29:52 ca Exp $')
OSTYPE(hpux10)dnl
DOMAIN(generic)dnl
MAILER(local)dnl

View File

@ -0,0 +1,25 @@
divert(-1)
#
# Copyright (c) 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
#
# This is a generic configuration file for HP MPE/iX.
# It has support for local and SMTP mail only. If you want to
# customize it, copy it to a name appropriate for your environment
# and do the modifications there.
#
divert(0)dnl
VERSIONID(`$Id: generic-mpeix.mc,v 8.1 2001/12/13 23:56:37 gshapiro Exp $')
OSTYPE(mpeix)dnl
DOMAIN(generic)dnl
define(`confFORWARD_PATH', `$z/.forward')dnl
MAILER(local)dnl
MAILER(smtp)dnl

View File

@ -0,0 +1,29 @@
divert(-1)
#
# Copyright (c) 1998, 1999, 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
#
# This is a generic configuration file for SunOS 5.x (a.k.a. Solaris 2.x
# and Solaris 7 through the present version).
#
# It has support for local and SMTP mail only. If you want to
# customize it, copy it to a name appropriate for your environment
# and do the modifications there.
#
divert(0)dnl
VERSIONID(`$Id: generic-solaris.mc,v 8.13 2001/06/27 21:46:30 gshapiro Exp $')
OSTYPE(solaris2)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
MAILER(smtp)dnl

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999, 2001 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -15,31 +15,54 @@ divert(-1)
#
# This is specific to Eric's home machine.
#
# Run daemon with -bd -q5m
#
divert(0)dnl
VERSIONID(`$Id: knecht.mc,v 8.37.16.3 2001/02/22 22:38:39 ca Exp $')
OSTYPE(bsd4.4)dnl
DOMAIN(generic)dnl
define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward+$h:$z/.forward')dnl
define(`confDEF_USER_ID', `mailnull')dnl
define(`confHOST_STATUS_DIRECTORY', `.hoststat')dnl
define(`confTO_ICONNECT', `10s')dnl
define(`confCOPY_ERRORS_TO', `Postmaster')dnl
define(`confTO_QUEUEWARN', `8h')dnl
define(`confTRUSTED_USERS', `www')dnl
define(`confPRIVACY_FLAGS', ``authwarnings,noexpn,novrfy'')dnl
define(`CERT_DIR', `MAIL_SETTINGS_DIR`'certs')dnl
define(`confCACERT_PATH', `CERT_DIR')dnl
define(`confCACERT', `CERT_DIR/CAcert.pem')dnl
define(`confSERVER_CERT', `CERT_DIR/MYcert.pem')dnl
define(`confSERVER_KEY', `CERT_DIR/MYkey.pem')dnl
define(`confCLIENT_CERT', `CERT_DIR/MYcert.pem')dnl
define(`confCLIENT_KEY', `CERT_DIR/MYkey.pem')dnl
FEATURE(virtusertable)dnl
FEATURE(access_db)dnl
FEATURE(local_lmtp)dnl
MAILER(local)dnl
MAILER(smtp)dnl
divert(0)
VERSIONID(`$Id: knecht.mc,v 8.55 2001/08/01 22:20:40 eric Exp $')
OSTYPE(bsd4.4)
DOMAIN(generic)
define(`ALIAS_FILE', ``/etc/mail/aliases, /var/listmanager/aliases'')
define(`confFORWARD_PATH', `$z/.forward.$w:$z/.forward+$h:$z/.forward')
define(`confDEF_USER_ID', `mailnull')
define(`confHOST_STATUS_DIRECTORY', `.hoststat')
define(`confTO_ICONNECT', `10s')
define(`confCOPY_ERRORS_TO', `Postmaster')
define(`confTO_QUEUEWARN', `8h')
define(`confMIN_QUEUE_AGE', `27m')
define(`confTRUSTED_USERS', ``www listmgr'')
define(`confPRIVACY_FLAGS', ``authwarnings,noexpn,novrfy'')
define(`CERT_DIR', `MAIL_SETTINGS_DIR`'certs')
define(`confCACERT_PATH', `CERT_DIR')
define(`confCACERT', `CERT_DIR/CAcert.pem')
define(`confSERVER_CERT', `CERT_DIR/MYcert.pem')
define(`confSERVER_KEY', `CERT_DIR/MYkey.pem')
define(`confCLIENT_CERT', `CERT_DIR/MYcert.pem')
define(`confCLIENT_KEY', `CERT_DIR/MYkey.pem')
FEATURE(access_db)
FEATURE(local_lmtp)
FEATURE(virtusertable)
FEATURE(`nocanonify', `canonify_hosts')
CANONIFY_DOMAIN(`sendmail.org')
CANONIFY_DOMAIN_FILE(`/etc/mail/canonify-domains')
dnl # at most 10 queue runners
define(`confMAX_QUEUE_CHILDREN', `20')
define(`confMAX_RUNNERS_PER_QUEUE', `5')
dnl # run at most 10 concurrent processes for initial submission
define(`confFAST_SPLIT', `10')
dnl # 10 runners, split into at most 15 recipients per envelope
QUEUE_GROUP(`mqueue', `P=/var/spool/mqueue, R=5, r=15, F=f')
MAILER(local)
MAILER(smtp)
LOCAL_CONFIG
#
@ -69,9 +92,80 @@ SCheckMessageId
R< $+ @ $+ > $@ OK
R$* $#error $: "554 Header error"
HReceived: $>CheckReceived
SCheckReceived
R$* ......................................................... $*
$#error $: "554 Header error"
#
# Reject certain senders
# Regex match to catch things in quotes
#
HFrom: $>+CheckFrom
KCheckFrom regex -a@MATCH
[^a-z]?(Net-Pa)[^a-z]
SCheckFrom
R$* $: $( CheckFrom $1 $)
R@MATCH $#error $: "553 Header error"
LOCAL_RULESETS
SLocal_check_mail
# check address against various regex checks
R$* $: $>Parse0 $>3 $1
R$+ $: $(checkaddress $1 $)
R@MATCH $#error $: "553 Header error"
#
# Following code from Anthony Howe <achowe@snert.com>. The check
# for the Outlook Express marker may hit some legal messages, but
# the Content-Disposition is clearly illegal.
#
#########################################################################
#
# w32.sircam.worm@mm
#
# There are serveral patterns that appear common ONLY to SirCam worm and
# not to Outlook Express, which claims to have sent the worm. There are
# four headers that always appear together and in this order:
#
# X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
# X-Mailer: Microsoft Outlook Express 5.50.4133.2400
# Content-Type: multipart/mixed; boundary="----27AA9124_Outlook_Express_message_boundary"
# Content-Disposition: Multipart message
#
# Empirical study of the worm message headers vs. true Outlook Express
# (5.50.4133.2400 & 5.50.4522.1200) messages with multipart/mixed attachments
# shows Outlook Express does:
#
# a) NOT supply a Content-Disposition header for multipart/mixed messages.
# b) NOT specify the header X-MimeOLE header name in all-caps
# c) NOT specify boundary tag with the expression "_Outlook_Express_message_boundary"
#
# The solution below catches any one of this three issues. This is not an ideal
# solution, but a temporary measure. A correct solution would be to check for
# the presence of ALL three header attributes. Also the solution is incomplete
# since Outlook Express 5.0 and 4.0 were not compared.
#
# NOTE regex keys are first dequoted and spaces removed before matching.
# This caused me no end of grief.
#
#########################################################################
LOCAL_RULESETS
KSirCamWormMarker regex -f -aSUSPECT multipart/mixed;boundary=----.+_Outlook_Express_message_boundary
HContent-Type: $>CheckContentType
SCheckContentType
R$+ $: $(SirCamWormMarker $1 $)
RSUSPECT $#error $: "553 Possible virus, see http://www.symantec.com/avcenter/venc/data/w32.sircam.worm@mm.html"
HContent-Disposition: $>CheckContentDisposition
SCheckContentDisposition
R$- $@ OK
R$- ; $+ $@ OK
R$* $#error $: "553 Illegal Content-Disposition"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,22 @@
divert(-1)
#
# Copyright (c) 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
#
# This is the prototype file for a set-group-ID sm-msp sendmail that
# acts as a initial mail submission program.
#
divert(0)dnl
VERSIONID(`$Id: submit.mc,v 8.5 2001/09/08 01:20:53 gshapiro Exp $')
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
FEATURE(`msp')dnl

View File

@ -26,7 +26,7 @@ divert(-1)
#
divert(0)dnl
VERSIONID(`$Id: tcpproto.mc,v 8.13.22.1 2000/08/03 15:25:20 ca Exp $')
VERSIONID(`$Id: tcpproto.mc,v 8.14 2000/08/03 15:26:50 ca Exp $')
OSTYPE(`unknown')
FEATURE(`nouucp', `reject')
MAILER(`local')

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@ -10,14 +10,28 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: access_db.m4,v 8.15 1999/07/22 17:55:34 gshapiro Exp $')
VERSIONID(`$Id: access_db.m4,v 8.23 2001/03/16 00:51:25 gshapiro Exp $')
divert(-1)
define(`_ACCESS_TABLE_', `')
define(`_TAG_DELIM_', `:')dnl should be in OperatorChars
ifelse(lower(_ARG2_),`skip',`define(`_ACCESS_SKIP_', `1')')
ifelse(lower(_ARG2_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')')
ifelse(lower(_ARG3_),`skip',`define(`_ACCESS_SKIP_', `1')')
ifelse(lower(_ARG3_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')')
define(`_ATMPF_', `<TMPF>')dnl
dnl check whether arg contains -T`'_ATMPF_
ifelse(defn(`_ARG_'), `', `',
defn(`_ARG_'), `LDAP', `',
`ifelse(index(_ARG_, _ATMPF_), `-1',
`errprint(`*** WARNING: missing -T'_ATMPF_` in argument of FEATURE(`access_db',' defn(`_ARG_')`)
')
define(`_ABP_', index(_ARG_, ` '))
define(`_NARG_', `substr(_ARG_, 0, _ABP_) -T'_ATMPF_` substr(_ARG_, _ABP_)')
')')
LOCAL_CONFIG
# Access list database (for spam stomping)
Kaccess ifelse(defn(`_ARG_'), `',
DATABASE_MAP_TYPE MAIL_SETTINGS_DIR`access',
`_ARG_')
Kaccess ifelse(defn(`_ARG_'), `', DATABASE_MAP_TYPE -T`'_ATMPF_ MAIL_SETTINGS_DIR`access',
defn(`_ARG_'), `LDAP', `ldap -T`'_ATMPF_ -1 -v sendmailMTAMapValue -k (&(objectClass=sendmailMTAMapObject)(|(sendmailMTACluster=${sendmailMTACluster})(sendmailMTAHost=$j))(sendmailMTAMapName=access)(sendmailMTAKey=%0))',
defn(`_NARG_'), `', `_ARG_', `_NARG_')

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -13,7 +13,13 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: allmasquerade.m4,v 8.11 1999/08/06 01:28:26 gshapiro Exp $')
VERSIONID(`$Id: allmasquerade.m4,v 8.13 2000/09/12 22:00:53 ca Exp $')
divert(-1)
ifdef(`_MAILER_local_',
`errprint(`*** MAILER(`local') must appear after FEATURE(`allmasquerade')')
')dnl
ifdef(`_MAILER_uucp_',
`errprint(`*** MAILER(`uucp') must appear after FEATURE(`allmasquerade')')
')dnl
define(`_ALL_MASQUERADE_', 1)

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -13,7 +13,10 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: always_add_domain.m4,v 8.9 1999/02/07 07:26:08 gshapiro Exp $')
VERSIONID(`$Id: always_add_domain.m4,v 8.11 2000/09/12 22:00:53 ca Exp $')
divert(-1)
define(`_ALWAYS_ADD_DOMAIN_', 1)
ifdef(`_MAILER_local_',
`errprint(`*** MAILER(`local') must appear after FEATURE(`always_add_domain')')
')dnl
define(`_ALWAYS_ADD_DOMAIN_', ifelse(len(X`'_ARG_),`1',`',_ARG_))

View File

@ -0,0 +1,22 @@
divert(-1)
#
# Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
divert(0)
VERSIONID(`$Id: authinfo.m4,v 1.7 2001/03/16 00:51:25 gshapiro Exp $')
divert(-1)
define(`_AUTHINFO_TABLE_', `')
LOCAL_CONFIG
# authinfo list database: contains info for authentication as client
Kauthinfo ifelse(defn(`_ARG_'), `', DATABASE_MAP_TYPE MAIL_SETTINGS_DIR`authinfo',
defn(`_ARG_'), `LDAP', `ldap -1 -v sendmailMTAMapValue -k (&(objectClass=sendmailMTAMapObject)(|(sendmailMTACluster=${sendmailMTACluster})(sendmailMTAHost=$j))(sendmailMTAMapName=authinfo)(sendmailMTAKey=%0))',
`_ARG_')

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -13,10 +13,10 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: bestmx_is_local.m4,v 8.24 1999/10/18 21:50:24 ca Exp $')
VERSIONID(`$Id: bestmx_is_local.m4,v 8.26 2000/09/17 17:30:00 gshapiro Exp $')
divert(-1)
define(_BESTMX_IS_LOCAL_, _ARG_)
define(`_BESTMX_IS_LOCAL_', _ARG_)
LOCAL_CONFIG
# turn on bestMX lookup table

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998, 1999, 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -13,13 +13,13 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: bitdomain.m4,v 8.23 1999/07/22 17:55:34 gshapiro Exp $')
VERSIONID(`$Id: bitdomain.m4,v 8.28 2001/03/16 00:51:25 gshapiro Exp $')
divert(-1)
define(`_BITDOMAIN_TABLE_', `')
LOCAL_CONFIG
# BITNET mapping table
Kbitdomain ifelse(defn(`_ARG_'), `',
DATABASE_MAP_TYPE MAIL_SETTINGS_DIR`bitdomain',
Kbitdomain ifelse(defn(`_ARG_'), `', DATABASE_MAP_TYPE MAIL_SETTINGS_DIR`bitdomain',
defn(`_ARG_'), `LDAP', `ldap -1 -v sendmailMTAMapValue -k (&(objectClass=sendmailMTAMapObject)(|(sendmailMTACluster=${sendmailMTACluster})(sendmailMTAHost=$j))(sendmailMTAMapName=bitdomain)(sendmailMTAKey=%0))',
`_ARG_')

View File

@ -0,0 +1,33 @@
divert(-1)
#
# Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
divert(0)
VERSIONID(`$Id: compat_check.m4,v 1.3 2001/11/21 18:40:06 ca Exp $')
divert(-1)
ifdef(`_ACCESS_TABLE_', `',
`errprint(`FEATURE(`compat_check') requires FEATURE(`access_db')
')')
LOCAL_RULESETS
Scheck_compat
# look up the pair of addresses
# (we use <@> as the separator. Note this in the map too!)
R< $+ > $| $+ $: $1 $| $2
R$+ $| < $+ > $: $1 $| $2
R$+ $| $+ $: <$(access Compat:$1<@>$2 $:OK $)>
R$* $| $* $@ ok
# act on the result,
# it must be one of the following... anything else will be allowed..
dnl for consistency with the other two even though discard does not take an
dnl reply code
R< DISCARD:$* > $#discard $: $1 " - discarded by check_compat"
R< DISCARD $* > $#discard $: $1 " - discarded by check_compat"
R< TEMP:$* > $#error $@ TEMPFAIL $: $1 " error from check_compat. Try again later"
R< ERROR:$* > $#error $@ UNAVAILABLE $: $1 " error from check_compat"

View File

@ -10,7 +10,7 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: delay_checks.m4,v 8.7 2000/02/26 01:32:02 gshapiro Exp $')
VERSIONID(`$Id: delay_checks.m4,v 8.8 2000/12/05 18:50:45 ca Exp $')
divert(-1)
define(`_DELAY_CHECKS_', 1)
@ -20,3 +20,6 @@ ifelse(defn(`_ARG_'), `', `',
`errprint(`*** ERROR: illegal argument _ARG_ for FEATURE(delay_checks)
')
')
dnl be backward compatible by default
ifelse(len(X`'_ARG2_), `1', `define(`_DELAY_COMPAT_8_10_', 1)', `')

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@ -11,15 +11,22 @@ divert(-1)
divert(0)
ifdef(`_DNSBL_R_',`dnl',`dnl
VERSIONID(`$Id: dnsbl.m4,v 8.18.16.1 2000/11/22 01:13:21 ca Exp $')')
VERSIONID(`$Id: dnsbl.m4,v 8.26 2001/11/12 16:04:14 ca Exp $')
define(`_DNSBL_R_',`')
LOCAL_CONFIG
# map for DNS based blacklist lookups
Kdnsbl host -T<TMP>ifdef(`DNSBL_MAP_OPT',` DNSBL_MAP_OPT')')
divert(-1)
define(`_DNSBL_SRV_', `ifelse(len(X`'_ARG_),`1',`blackholes.mail-abuse.org',_ARG_)')dnl
define(`_DNSBL_MSG_', `ifelse(len(X`'_ARG2_),`1',`"550 Mail from " $`'&{client_addr} " refused by blackhole site '_DNSBL_SRV_`"',`_ARG2_')')dnl
define(`_DNSBL_MSG_TMP_', `ifelse(_ARG3_,`t',`"451 Temporary lookup failure of " $`'&{client_addr} " at '_DNSBL_SRV_`"',`_ARG3_')')dnl
divert(8)
# DNS based IP address spam list _DNSBL_SRV_
R$* $: $&{client_addr}
R::ffff:$-.$-.$-.$- $: <?> $(host $4.$3.$2.$1._DNSBL_SRV_. $: OK $)
R$-.$-.$-.$- $: <?> $(host $4.$3.$2.$1._DNSBL_SRV_. $: OK $)
R$-.$-.$-.$- $: <?> $(dnsbl $4.$3.$2.$1._DNSBL_SRV_. $: OK $)
R<?>OK $: OKSOFAR
ifelse(len(X`'_ARG3_),`1',
`R<?>$+<TMP> $: TMPOK',
`R<?>$+<TMP> $#error $@ 4.7.1 $: _DNSBL_MSG_TMP_')
R<?>$+ $#error $@ 5.7.1 $: _DNSBL_MSG_
divert(-1)

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998, 1999, 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -13,13 +13,13 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: domaintable.m4,v 8.17 1999/07/22 17:55:35 gshapiro Exp $')
VERSIONID(`$Id: domaintable.m4,v 8.22 2001/03/16 00:51:25 gshapiro Exp $')
divert(-1)
define(`_DOMAIN_TABLE_', `')
LOCAL_CONFIG
# Domain table (adding domains)
Kdomaintable ifelse(defn(`_ARG_'), `',
DATABASE_MAP_TYPE MAIL_SETTINGS_DIR`domaintable',
Kdomaintable ifelse(defn(`_ARG_'), `', DATABASE_MAP_TYPE MAIL_SETTINGS_DIR`domaintable',
defn(`_ARG_'), `LDAP', `ldap -1 -v sendmailMTAMapValue -k (&(objectClass=sendmailMTAMapObject)(|(sendmailMTACluster=${sendmailMTACluster})(sendmailMTAHost=$j))(sendmailMTAMapName=domain)(sendmailMTAKey=%0))',
`_ARG_')

View File

@ -0,0 +1,44 @@
divert(-1)
#
# Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
divert(0)
ifdef(`_EDNSBL_R_',`dnl',`dnl
VERSIONID(`$Id: enhdnsbl.m4,v 1.7 2001/07/22 18:02:52 ca Exp $')
LOCAL_CONFIG
define(`_EDNSBL_R_',`')dnl
# map for enhanced DNS based blacklist lookups
Kednsbl dns -R A -a. -T<TMP> -r`'ifdef(`EDNSBL_TO',`EDNSBL_TO',`5')
')
divert(-1)
define(`_EDNSBL_SRV_', `ifelse(len(X`'_ARG_),`1',`blackholes.mail-abuse.org',_ARG_)')dnl
define(`_EDNSBL_MSG_', `ifelse(len(X`'_ARG2_),`1',`"550 Mail from " $`'&{client_addr} " refused by blackhole site '_EDNSBL_SRV_`"',`_ARG2_')')dnl
define(`_EDNSBL_MSG_TMP_', `ifelse(_ARG3_,`t',`"451 Temporary lookup failure of " $`'&{client_addr} " at '_EDNSBL_SRV_`"',`_ARG3_')')dnl
define(`_EDNSBL_MATCH_', `ifelse(len(X`'_ARG4_),`1',`$`'+',_ARG4_)')dnl
divert(8)
# DNS based IP address spam list _EDNSBL_SRV_
R$* $: $&{client_addr}
R$-.$-.$-.$- $: <?> $(ednsbl $4.$3.$2.$1._EDNSBL_SRV_. $: OK $)
R<?>OK $: OKSOFAR
ifelse(len(X`'_ARG3_),`1',
`R<?>$+<TMP> $: TMPOK',
`R<?>$+<TMP> $#error $@ 4.7.1 $: _EDNSBL_MSG_TMP_')
R<?>_EDNSBL_MATCH_ $#error $@ 5.7.1 $: _EDNSBL_MSG_
ifelse(len(X`'_ARG5_),`1',`dnl',
`R<?>_ARG5_ $#error $@ 5.7.1 $: _EDNSBL_MSG_')
ifelse(len(X`'_ARG6_),`1',`dnl',
`R<?>_ARG6_ $#error $@ 5.7.1 $: _EDNSBL_MSG_')
ifelse(len(X`'_ARG7_),`1',`dnl',
`R<?>_ARG7_ $#error $@ 5.7.1 $: _EDNSBL_MSG_')
ifelse(len(X`'_ARG8_),`1',`dnl',
`R<?>_ARG8_ $#error $@ 5.7.1 $: _EDNSBL_MSG_')
ifelse(len(X`'_ARG9_),`1',`dnl',
`R<?>_ARG9_ $#error $@ 5.7.1 $: _EDNSBL_MSG_')
divert(-1)

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998, 1999, 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -13,13 +13,13 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: genericstable.m4,v 8.16 1999/07/22 17:55:35 gshapiro Exp $')
VERSIONID(`$Id: genericstable.m4,v 8.21 2001/03/16 00:51:26 gshapiro Exp $')
divert(-1)
define(`_GENERICS_TABLE_', `')
LOCAL_CONFIG
# Generics table (mapping outgoing addresses)
Kgenerics ifelse(defn(`_ARG_'), `',
DATABASE_MAP_TYPE MAIL_SETTINGS_DIR`genericstable',
Kgenerics ifelse(defn(`_ARG_'), `', DATABASE_MAP_TYPE MAIL_SETTINGS_DIR`genericstable',
defn(`_ARG_'), `LDAP', `ldap -1 -v sendmailMTAMapValue -k (&(objectClass=sendmailMTAMapObject)(|(sendmailMTACluster=${sendmailMTACluster})(sendmailMTAHost=$j))(sendmailMTAMapName=generics)(sendmailMTAKey=%0))',
`_ARG_')

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1999-2000 Sendmail, Inc. and its suppliers.
# Copyright (c) 1999-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@ -10,7 +10,7 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: ldap_routing.m4,v 8.5.4.1 2000/07/15 18:05:05 gshapiro Exp $')
VERSIONID(`$Id: ldap_routing.m4,v 8.8 2001/06/27 21:46:31 gshapiro Exp $')
divert(-1)
# Check first two arguments. If they aren't set, may need to warn in proto.m4
@ -23,6 +23,11 @@ ifelse(len(X`'_ARG3_), `1', `define(`_LDAP_ROUTING_', `_PASS_THROUGH_')',
_ARG3_, `passthru', `define(`_LDAP_ROUTING_', `_PASS_THROUGH_')',
`define(`_LDAP_ROUTING_', `_MUST_EXIST_')')
# Check for fouth argument to indicate how to deal with +detail info
ifelse(len(X`'_ARG4_), `1', `',
_ARG4_, `strip', `define(`_LDAP_ROUTE_DETAIL_', `_STRIP_')',
_ARG4_, `preserve', `define(`_LDAP_ROUTE_DETAIL_', `_PRESERVE_')')
LOCAL_CONFIG
# LDAP routing maps
Kldapmh ifelse(len(X`'_ARG1_), `1',

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@ -10,7 +10,7 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: local_lmtp.m4,v 8.15 1999/11/18 05:06:22 ca Exp $')
VERSIONID(`$Id: local_lmtp.m4,v 8.16 2000/08/18 18:58:45 ca Exp $')
divert(-1)
ifdef(`_MAILER_local_',
@ -24,3 +24,4 @@ define(`LOCAL_MAILER_PATH',
define(`LOCAL_MAILER_FLAGS', `PSXfmnz9')
define(`LOCAL_MAILER_ARGS', `mail.local -l')
define(`LOCAL_MAILER_DSN_DIAGNOSTIC_CODE', `SMTP')
define(`_LOCAL_LMTP_', `1')

View File

@ -0,0 +1,18 @@
divert(-1)
#
# Copyright (c) 2000 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
divert(0)
VERSIONID(`$Id: local_no_masquerade.m4,v 1.2 2000/08/03 15:54:59 ca Exp $')
divert(-1)
ifdef(`_MAILER_local_',
`errprint(`*** MAILER(`local') must appear after FEATURE(`local_no_masquerade')')
')dnl
define(`_LOCAL_NO_MASQUERADE_', `1')

View File

@ -0,0 +1,22 @@
divert(-1)
#
# Copyright (c) 2000 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
divert(0)
VERSIONID(`$Id: lookupdotdomain.m4,v 1.1 2000/04/13 22:32:49 ca Exp $')
divert(-1)
ifdef(`_ACCESS_TABLE_',
`define(`_LOOKUPDOTDOMAIN_')',
`errprint(`*** ERROR: FEATURE(`lookupdotdomain') requires FEATURE(`access_db')
')')
ifdef(`_RELAY_HOSTS_ONLY_',
`errprint(`*** WARNING: FEATURE(`lookupdotdomain') does not work well with FEATURE(`relay_hosts_only')
')')

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998, 1999, 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -13,13 +13,13 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: mailertable.m4,v 8.18 1999/07/22 17:55:35 gshapiro Exp $')
VERSIONID(`$Id: mailertable.m4,v 8.23 2001/03/16 00:51:26 gshapiro Exp $')
divert(-1)
define(`_MAILER_TABLE_', `')
LOCAL_CONFIG
# Mailer table (overriding domains)
Kmailertable ifelse(defn(`_ARG_'), `',
DATABASE_MAP_TYPE MAIL_SETTINGS_DIR`mailertable',
Kmailertable ifelse(defn(`_ARG_'), `', DATABASE_MAP_TYPE MAIL_SETTINGS_DIR`mailertable',
defn(`_ARG_'), `LDAP', `ldap -1 -v sendmailMTAMapValue -k (&(objectClass=sendmailMTAMapObject)(|(sendmailMTACluster=${sendmailMTACluster})(sendmailMTAHost=$j))(sendmailMTAMapName=mailer)(sendmailMTAKey=%0))',
`_ARG_')

View File

@ -0,0 +1,76 @@
divert(-1)
#
# Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
divert(0)dnl
VERSIONID(`$Id: msp.m4,v 1.29 2001/12/13 23:56:38 gshapiro Exp $')
divert(-1)
define(`ALIAS_FILE', `')
define(`confDELIVERY_MODE', `i')
define(`confUSE_MSP', `True')
define(`confFORWARD_PATH', `')
define(`confPRIVACY_FLAGS', `goaway,noetrn,restrictqrun')
define(`confDONT_PROBE_INTERFACES', `True')
dnl ---------------------------------------------
dnl run as this user (even if called by root)
ifdef(`confRUN_AS_USER',,`define(`confRUN_AS_USER', `smmsp')')
ifdef(`confTRUSTED_USER',,`define(`confTRUSTED_USER', confRUN_AS_USER)')
dnl ---------------------------------------------
dnl This queue directory must have the same group
dnl as sendmail and it must be group-writable.
dnl notice: do not test for QUEUE_DIR, it is set in some ostype/*.m4 files
ifdef(`MSP_QUEUE_DIR',
`define(`QUEUE_DIR', `MSP_QUEUE_DIR')',
`define(`QUEUE_DIR', `/var/spool/clientmqueue')')
define(`_MTA_HOST_', ifelse(defn(`_ARG_'), `', `localhost', `_ARG_'))
define(`_MSP_FQHN_',`dnl used to qualify addresses
ifdef(`MASQUERADE_NAME', ifdef(`_MASQUERADE_ENVELOPE_', `$M', `$j'), `$j')')
define(`RELAY_MAILER_ARGS', `TCP $h'ifelse(_ARG2_, `MSA', ` 587'))
dnl ---------------------------------------------
ifdef(`confPID_FILE', `dnl',
`define(`confPID_FILE', QUEUE_DIR`/sm-client.pid')')
define(`confQUEUE_FILE_MODE', `0660')dnl
ifdef(`STATUS_FILE',
`define(`_F_',
`define(`_b_', index(STATUS_FILE, `sendmail.st'))ifelse(_b_, `-1', `STATUS_FILE', `substr(STATUS_FILE, 0, _b_)sm-client.st')')
define(`STATUS_FILE', _F_)
undefine(`_b_') undefine(`_F_')',
`define(`STATUS_FILE', QUEUE_DIR`/sm-client.st')')
FEATURE(`no_default_msa')dnl
ifelse(defn(`_DPO_'), `',
`DAEMON_OPTIONS(`Name=NoMTA, Addr=127.0.0.1, M=E')dnl')
define(`_DEF_LOCAL_MAILER_FLAGS', `')dnl
define(`_DEF_LOCAL_SHELL_FLAGS', `')dnl
define(`LOCAL_MAILER_PATH', `[IPC]')dnl
define(`LOCAL_MAILER_FLAGS', `lmDFMuXkw5')dnl
define(`LOCAL_MAILER_ARGS', `TCP $h')dnl
define(`LOCAL_MAILER_DSN_DIAGNOSTIC_CODE', `SMTP')dnl
define(`LOCAL_SHELL_PATH', `[IPC]')dnl
define(`LOCAL_SHELL_FLAGS', `lmDFMuXk5')dnl
define(`LOCAL_SHELL_ARGS', `TCP $h')dnl
MODIFY_MAILER_FLAGS(`SMTP', `+k05')dnl
MODIFY_MAILER_FLAGS(`ESMTP', `+k05')dnl
MODIFY_MAILER_FLAGS(`DSMTP', `+k05')dnl
MODIFY_MAILER_FLAGS(`SMTP8', `+k05')dnl
MODIFY_MAILER_FLAGS(`RELAY', `+k0')dnl
MAILER(`local')dnl
MAILER(`smtp')dnl
LOCAL_CONFIG
D{MTAHost}_MTA_HOST_
LOCAL_RULESETS
SLocal_localaddr
R$+ $: $>ParseRecipient $1
R$* < @ $+ > $* $#relay $@ ${MTAHost} $: $1 < @ $2 > $3
ifdef(`_USE_DECNET_SYNTAX_',
`# DECnet
R$+ :: $+ $#relay $@ ${MTAHost} $: $1 :: $2', `dnl')
R$* $#relay $@ ${MTAHost} $: $1 < @ _MSP_FQHN_ >

View File

@ -10,7 +10,7 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: no_default_msa.m4,v 8.1.10.1 2000/09/17 17:04:22 gshapiro Exp $')
VERSIONID(`$Id: no_default_msa.m4,v 8.2 2001/02/14 05:03:22 gshapiro Exp $')
divert(-1)
define(`_NO_MSA_', `1')

View File

@ -22,7 +22,7 @@ ifelse(defn(`_ARG_'), `', `errprint(`Feature "nullclient" requires argument')',
#
divert(0)
VERSIONID(`$Id: nullclient.m4,v 8.21.16.3 2000/09/17 17:04:22 gshapiro Exp $')
VERSIONID(`$Id: nullclient.m4,v 8.24 2000/09/17 17:30:00 gshapiro Exp $')
divert(-1)
undefine(`ALIAS_FILE')

View File

@ -0,0 +1,16 @@
divert(-1)
#
# Copyright (c) 2000 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
divert(0)
VERSIONID(`$Id: preserve_local_plus_detail.m4,v 8.1 2000/04/10 05:48:05 gshapiro Exp $')
divert(-1)
define(`_PRESERVE_LOCAL_PLUS_DETAIL_', `1')

View File

@ -0,0 +1,19 @@
divert(-1)
#
# Copyright (c) 2000 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
divert(0)
VERSIONID(`$Id: preserve_luser_host.m4,v 1.2 2000/11/10 18:50:30 ca Exp $')
divert(-1)
ifdef(`LUSER_RELAY', `',
`errprint(`*** LUSER_RELAY should be defined before FEATURE(`preserve_luser_host')
')')
define(`_PRESERVE_LUSER_HOST_', `1')

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-1999, 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@ -10,7 +10,10 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: promiscuous_relay.m4,v 8.10 1999/02/07 07:26:11 gshapiro Exp $')
VERSIONID(`$Id: promiscuous_relay.m4,v 8.12 2001/02/06 17:14:35 ca Exp $')
divert(-1)
define(`_PROMISCUOUS_RELAY_', 1)
errprint(`*** WARNING: FEATURE(`promiscuous_relay') configures your system as open
relay. Do NOT use it on a server that is connected to the Internet!
')

View File

@ -0,0 +1,27 @@
divert(-1)
#
# Copyright (c) 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
divert(0)
VERSIONID(`$Id: queuegroup.m4,v 1.4 2001/03/28 00:39:39 ca Exp $')
divert(-1)
ifdef(`_ACCESS_TABLE_', `',
`errprint(`*** ERROR: FEATURE(`queuegroup') requires FEATURE(`access_db')
')')
LOCAL_RULESETS
Squeuegroup
R< $+ > $1
R $+ @ $+ $: $>SearchList <! qgrp> $| <F:$1@$2> <D:$2> <>
ifelse(len(X`'_ARG_),`1',
`R<?> $@',
`R<?> $# _ARG_')
R<$+> $# $1

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-1999, 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@ -10,7 +10,11 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: relay_local_from.m4,v 8.5 1999/02/07 07:26:12 gshapiro Exp $')
VERSIONID(`$Id: relay_local_from.m4,v 8.6 2001/02/06 15:55:21 ca Exp $')
divert(-1)
define(`_RELAY_LOCAL_FROM_', 1)
errprint(`*** WARNING: FEATURE(`relay_local_from') may cause your system to act as open
relay. Use SMTP AUTH or STARTTLS instead. If you cannot use those,
try FEATURE(`relay_mail_from').
')

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1999, 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@ -10,11 +10,14 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: relay_mail_from.m4,v 8.2 1999/04/02 02:25:13 gshapiro Exp $')
VERSIONID(`$Id: relay_mail_from.m4,v 8.3 2001/02/06 16:07:12 ca Exp $')
divert(-1)
ifdef(`_ACCESS_TABLE_',
`define(`_RELAY_DB_FROM_', 1)
ifelse(_ARG_,`domain',`define(`_RELAY_DB_FROM_DOMAIN_', 1)')',
`errprint(`*** ERROR: FEATURE(relay_mail_from) requires FEATURE(access_db)
`errprint(`*** ERROR: FEATURE(`relay_mail_from') requires FEATURE(`access_db')
')')
errprint(`*** WARNING: FEATURE(`relay_mail_from') may cause your system to act as open
relay. Use SMTP AUTH or STARTTLS instead.
')

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998, 1999, 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -13,12 +13,11 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: use_ct_file.m4,v 8.9 1999/02/07 07:26:13 gshapiro Exp $')
VERSIONID(`$Id: use_ct_file.m4,v 8.11 2001/08/26 20:58:57 gshapiro Exp $')
divert(-1)
# if defined, the sendmail.cf will read the /etc/sendmail.ct file
# to find the names of trusted users. There should only be a few
# of these, and normally this is done directly in the .cf file.
# if defined, the sendmail.cf will read the /etc/mail/trusted-users file to
# find the names of trusted users. There should only be a few of these.
define(`_USE_CT_FILE_', `')

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998, 1999, 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -13,12 +13,12 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: use_cw_file.m4,v 8.9 1999/02/07 07:26:13 gshapiro Exp $')
VERSIONID(`$Id: use_cw_file.m4,v 8.11 2001/08/26 20:58:57 gshapiro Exp $')
divert(-1)
# if defined, the sendmail.cf will read the /etc/sendmail.cw file
# to find alternate names for this host. Typically only used when
# several hosts have been squashed into one another at high speed.
# if defined, the sendmail.cf will read the /etc/mail/local-host-names file
# to find alternate names for this host. Typically only used when several
# hosts have been squashed into one another at high speed.
define(`USE_CW_FILE', `')

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998, 1999, 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -13,13 +13,13 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: uucpdomain.m4,v 8.22 1999/07/22 17:55:35 gshapiro Exp $')
VERSIONID(`$Id: uucpdomain.m4,v 8.27 2001/03/16 00:51:26 gshapiro Exp $')
divert(-1)
define(`_UUDOMAIN_TABLE_', `')
LOCAL_CONFIG
# UUCP domain table
Kuudomain ifelse(defn(`_ARG_'), `',
DATABASE_MAP_TYPE MAIL_SETTINGS_DIR`uudomain',
Kuudomain ifelse(defn(`_ARG_'), `', DATABASE_MAP_TYPE MAIL_SETTINGS_DIR`uudomain',
defn(`_ARG_'), `LDAP', `ldap -1 -v sendmailMTAMapValue -k (&(objectClass=sendmailMTAMapObject)(|(sendmailMTACluster=${sendmailMTACluster})(sendmailMTAHost=$j))(sendmailMTAMapName=uucpdomain)(sendmailMTAKey=%0))',
`_ARG_')

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998, 1999, 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -13,13 +13,13 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: virtusertable.m4,v 8.16 1999/07/22 17:55:36 gshapiro Exp $')
VERSIONID(`$Id: virtusertable.m4,v 8.21 2001/03/16 00:51:26 gshapiro Exp $')
divert(-1)
define(`_VIRTUSER_TABLE_', `')
LOCAL_CONFIG
# Virtual user table (maps incoming users)
Kvirtuser ifelse(defn(`_ARG_'), `',
DATABASE_MAP_TYPE MAIL_SETTINGS_DIR`virtusertable',
Kvirtuser ifelse(defn(`_ARG_'), `', DATABASE_MAP_TYPE MAIL_SETTINGS_DIR`virtusertable',
defn(`_ARG_'), `LDAP', `ldap -1 -v sendmailMTAMapValue -k (&(objectClass=sendmailMTAMapObject)(|(sendmailMTACluster=${sendmailMTACluster})(sendmailMTAHost=$j))(sendmailMTAMapName=virtuser)(sendmailMTAKey=%0))',
`_ARG_')

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
divert(-1)
#
# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2002 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.39.4.35 2001/08/20 14:45:34 gshapiro Exp $')
VERSIONID(`$Id: version.m4,v 8.81 2002/01/13 18:23:32 ca Exp $')
#
divert(0)
# Configuration version number
DZ8.11.6`'ifdef(`confCF_VERSION', `/confCF_VERSION')
DZ8.12.2`'ifdef(`confCF_VERSION', `/confCF_VERSION')

View File

@ -1,6 +1,6 @@
PUSHDIVERT(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@ -35,15 +35,13 @@ PUSHDIVERT(-1)
# Contributed to Berkeley by John Gardiner Myers <jgm+@CMU.EDU>.
#
ifdef(`_MAILER_local_', `',
`errprint(`*** MAILER(`local') must appear before MAILER(`cyrus')')')dnl
_DEFIFNOT(`CYRUS_MAILER_FLAGS', `Ah5@/:|')
ifdef(`CYRUS_MAILER_PATH',, `define(`CYRUS_MAILER_PATH', /usr/cyrus/bin/deliver)')
ifdef(`CYRUS_MAILER_ARGS',, `define(`CYRUS_MAILER_ARGS', `deliver -e -m $h -- $u')')
ifdef(`CYRUS_MAILER_USER',, `define(`CYRUS_MAILER_USER', `cyrus:mail')')
_DEFIFNOT(`CYRUS_BB_MAILER_FLAGS', `u')
ifdef(`CYRUS_BB_MAILER_ARGS',, `define(`CYRUS_BB_MAILER_ARGS', `deliver -e -m $u')')
define(`_CYRUS_QGRP', `ifelse(defn(`CYRUS_MAILER_QGRP'),`',`', ` Q=CYRUS_MAILER_QGRP,')')dnl
POPDIVERT
@ -51,12 +49,12 @@ POPDIVERT
### Cyrus Mailer specification ###
##################################################
VERSIONID(`$Id: cyrus.m4,v 8.21 1999/10/18 04:57:52 gshapiro Exp $ (Carnegie Mellon)')
VERSIONID(`$Id: cyrus.m4,v 8.23 2001/11/12 23:11:34 ca Exp $ (Carnegie Mellon)')
Mcyrus, P=CYRUS_MAILER_PATH, F=_MODMF_(CONCAT(`lsDFMnPq', CYRUS_MAILER_FLAGS), `CYRUS'), S=EnvFromL, R=EnvToL/HdrToL,
ifdef(`CYRUS_MAILER_MAX', `M=CYRUS_MAILER_MAX, ')U=CYRUS_MAILER_USER, T=DNS/RFC822/X-Unix,
ifdef(`CYRUS_MAILER_MAX', `M=CYRUS_MAILER_MAX, ')U=CYRUS_MAILER_USER, T=DNS/RFC822/X-Unix,_CYRUS_QGRP
A=CYRUS_MAILER_ARGS
Mcyrusbb, P=CYRUS_MAILER_PATH, F=_MODMF_(CONCAT(`lsDFMnP', CYRUS_BB_MAILER_FLAGS), `CYRUS'), S=EnvFromL, R=EnvToL/HdrToL,
ifdef(`CYRUS_MAILER_MAX', `M=CYRUS_MAILER_MAX, ')U=CYRUS_MAILER_USER, T=DNS/RFC822/X-Unix,
ifdef(`CYRUS_MAILER_MAX', `M=CYRUS_MAILER_MAX, ')U=CYRUS_MAILER_USER, T=DNS/RFC822/X-Unix,_CYRUS_QGRP
A=CYRUS_BB_MAILER_ARGS

View File

@ -1,6 +1,6 @@
PUSHDIVERT(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998, 1999, 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -22,15 +22,16 @@ ifdef(`FAX_MAILER_PATH',,
`define(`FAX_MAILER_PATH', /usr/local/bin/faxmail)')
ifdef(`FAX_MAILER_MAX',,
`define(`FAX_MAILER_MAX', 100000)')
define(`_FAX_QGRP', `ifelse(defn(`FAX_MAILER_QGRP'),`',`', ` Q=FAX_MAILER_QGRP,')')dnl
POPDIVERT
####################################
### FAX Mailer specification ###
####################################
VERSIONID(`$Id: fax.m4,v 8.15 1999/10/18 04:57:53 gshapiro Exp $')
VERSIONID(`$Id: fax.m4,v 8.16 2001/11/12 23:11:34 ca Exp $')
Mfax, P=FAX_MAILER_PATH, F=DFMhu, S=14, R=24,
M=FAX_MAILER_MAX, T=X-Phone/X-FAX/X-Unix,
M=FAX_MAILER_MAX, T=X-Phone/X-FAX/X-Unix,_FAX_QGRP
A=FAX_MAILER_ARGS
LOCAL_CONFIG

View File

@ -21,65 +21,73 @@ _DEFIFNOT(`LOCAL_SHELL_FLAGS', `eu9')
ifdef(`LOCAL_SHELL_PATH',, `define(`LOCAL_SHELL_PATH', /bin/sh)')
ifdef(`LOCAL_SHELL_ARGS',, `define(`LOCAL_SHELL_ARGS', `sh -c $u')')
ifdef(`LOCAL_SHELL_DIR',, `define(`LOCAL_SHELL_DIR', `$z:/')')
define(`LOCAL_RWR', `ifdef(`_LOCAL_LMTP_',
`S=EnvFromSMTP/HdrFromL, R=EnvToL/HdrToL',
`S=EnvFromL/HdrFromL, R=EnvToL/HdrToL')')
define(`_LOCAL_QGRP', `ifelse(defn(`LOCAL_MAILER_QGRP'),`',`', ` Q=LOCAL_MAILER_QGRP,')')dnl
define(`_PROG_QGRP', `ifelse(defn(`LOCAL_PROG_QGRP'),`',`', ` Q=LOCAL_PROG_QGRP,')')dnl
POPDIVERT
##################################################
### Local and Program Mailer specification ###
##################################################
VERSIONID(`$Id: local.m4,v 8.50.16.2 2000/09/17 17:04:22 gshapiro Exp $')
VERSIONID(`$Id: local.m4,v 8.58 2000/10/26 01:58:29 ca Exp $')
#
# Envelope sender rewriting
#
SEnvFromL=10
SEnvFromL
R<@> $n errors to mailer-daemon
R@ <@ $*> $n temporarily bypass Sun bogosity
R$+ $: $>AddDomain $1 add local domain if needed
R$* $: $>MasqEnv $1 do masquerading
ifdef(`_LOCAL_NO_MASQUERADE_', `dnl', `dnl
R$* $: $>MasqEnv $1 do masquerading')
#
# Envelope recipient rewriting
#
SEnvToL=20
SEnvToL
R$+ < @ $* > $: $1 strip host part
ifdef(`_FFR_ADDR_TYPE', `dnl
ifdef(`confUSERDB_SPEC', `dnl',
`dnl Do not forget to bump V9 to V10 before removing _FFR_ADDR_TYPE check
ifdef(`confUSERDB_SPEC', `dnl', `dnl
R$+ + $* $: < $&{addr_type} > $1 + $2 mark with addr type
R<e s> $+ + $* $: $1 remove +detail for sender
R< $* > $+ $: $2 else remove mark')', `dnl')
R< $* > $+ $: $2 else remove mark')
#
# Header sender rewriting
#
SHdrFromL=30
SHdrFromL
R<@> $n errors to mailer-daemon
R@ <@ $*> $n temporarily bypass Sun bogosity
R$+ $: $>AddDomain $1 add local domain if needed
R$* $: $>MasqHdr $1 do masquerading
ifdef(`_LOCAL_NO_MASQUERADE_', `dnl', `dnl
R$* $: $>MasqHdr $1 do masquerading')
#
# Header recipient rewriting
#
SHdrToL=40
SHdrToL
R$+ $: $>AddDomain $1 add local domain if needed
ifdef(`_ALL_MASQUERADE_',
`R$* $: $>MasqHdr $1 do all-masquerading',
ifdef(`_ALL_MASQUERADE_', `dnl
ifdef(`_LOCAL_NO_MASQUERADE_', `dnl', `dnl
R$* $: $>MasqHdr $1 do all-masquerading')',
`R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2')
#
# Common code to add local domain name (only if always-add-domain)
#
SAddDomain=50
SAddDomain
ifdef(`_ALWAYS_ADD_DOMAIN_', `dnl
R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified
ifelse(len(X`'_ALWAYS_ADD_DOMAIN_),`1',`
R$+ $@ $1 < @ *LOCAL* > add local qualification',
`R$+ $@ $1 < @ _ALWAYS_ADD_DOMAIN_ > add qualification')',
`dnl')
Mlocal, P=LOCAL_MAILER_PATH, F=_MODMF_(CONCAT(_DEF_LOCAL_MAILER_FLAGS, LOCAL_MAILER_FLAGS), `LOCAL'), S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,_OPTINS(`LOCAL_MAILER_EOL', ` E=', `, ')
_OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')_OPTINS(`LOCAL_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`LOCAL_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`LOCAL_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/LOCAL_MAILER_DSN_DIAGNOSTIC_CODE,
Mlocal, P=LOCAL_MAILER_PATH, F=_MODMF_(CONCAT(_DEF_LOCAL_MAILER_FLAGS, LOCAL_MAILER_FLAGS), `LOCAL'), LOCAL_RWR,_OPTINS(`LOCAL_MAILER_EOL', ` E=', `, ')
_OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')_OPTINS(`LOCAL_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`LOCAL_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`LOCAL_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/LOCAL_MAILER_DSN_DIAGNOSTIC_CODE,_LOCAL_QGRP
A=LOCAL_MAILER_ARGS
Mprog, P=LOCAL_SHELL_PATH, F=CONCAT(_DEF_LOCAL_SHELL_FLAGS, LOCAL_SHELL_FLAGS), S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, D=LOCAL_SHELL_DIR,
_OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')T=X-Unix/X-Unix/X-Unix,
_OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')T=X-Unix/X-Unix/X-Unix,_PROG_QGRP
A=LOCAL_SHELL_ARGS

View File

@ -1,6 +1,6 @@
PUSHDIVERT(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@ -24,6 +24,7 @@ _DEFIFNOT(`MAIL11_MAILER_FLAGS', `nsFx')
ifdef(`MAIL11_MAILER_ARGS',, `define(`MAIL11_MAILER_ARGS', mail11 $g $x $h $u)')
define(`_USE_DECNET_SYNTAX_')
define(`_LOCAL_', ifdef(`confLOCAL_MAILER', confLOCAL_MAILER, `local'))
define(`_MAIL11_QGRP', `ifelse(defn(`MAIL11_MAILER_QGRP'),`',`', ` Q=MAIL11_MAILER_QGRP,')')dnl
POPDIVERT
@ -41,13 +42,9 @@ POPDIVERT
### UTK-MAIL11 Mailer specification ###
###########################################
VERSIONID(`$Id: mail11.m4,v 8.19 1999/10/18 04:57:54 gshapiro Exp $')
VERSIONID(`$Id: mail11.m4,v 8.22 2001/11/12 23:11:34 ca Exp $')
SMail11From=15
R$+ $: $>25 $1 preprocess
R$w :: $+ $@ $w :: $1 ready to go
SMail11To=25
SMail11To
R$+ < @ $- .UUCP > $: $2 ! $1 back to old style
R$+ < @ $- .DECNET > $: $2 :: $1 convert to DECnet style
R$+ < @ $- .LOCAL > $: $2 :: $1 convert to DECnet style
@ -55,6 +52,10 @@ R$+ < @ $=w. > $: $2 :: $1 convert to DECnet style
R$=w :: $+ $2 strip local names
R$+ :: $+ $@ $1 :: $2 already qualified
SMail11From
R$+ $: $>Mail11To $1 preprocess
R$w :: $+ $@ $w :: $1 ready to go
Mmail11, P=MAIL11_MAILER_PATH, F=_MODMF_(MAIL11_MAILER_FLAGS, `MAIL11'), S=Mail11From, R=Mail11To,
T=DNS/X-DECnet/X-Unix,
T=DNS/X-DECnet/X-Unix,_MAIL11_QGRP
A=MAIL11_MAILER_ARGS

View File

@ -1,6 +1,6 @@
PUSHDIVERT(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -14,12 +14,10 @@ PUSHDIVERT(-1)
# Contributed by Kimmo Suominen <kim@tac.nyc.ny.us>.
#
ifdef(`_MAILER_local_', `',
`errprint(`*** MAILER(`local') must appear before MAILER(`phquery')')')dnl
ifdef(`PH_MAILER_PATH',, `define(`PH_MAILER_PATH', /usr/local/etc/phquery)')
_DEFIFNOT(`PH_MAILER_FLAGS', `ehmu')
ifdef(`PH_MAILER_ARGS',, `define(`PH_MAILER_ARGS', `phquery -- $u')')
define(`_PH_QGRP', `ifelse(defn(`PH_MAILER_QGRP'),`',`', ` Q=PH_MAILER_QGRP,')')dnl
POPDIVERT
@ -27,8 +25,8 @@ POPDIVERT
### PH Mailer specification ###
####################################
VERSIONID(`$Id: phquery.m4,v 8.15 1999/10/18 04:57:54 gshapiro Exp $')
VERSIONID(`$Id: phquery.m4,v 8.17 2001/11/12 23:11:34 ca Exp $')
Mph, P=PH_MAILER_PATH, F=_MODMF_(CONCAT(`nrDFM', PH_MAILER_FLAGS), `PH'), S=EnvFromL, R=EnvToL/HdrToL,
T=DNS/RFC822/X-Unix,
T=DNS/RFC822/X-Unix,_PH_QGRP
A=PH_MAILER_ARGS

View File

@ -1,6 +1,6 @@
PUSHDIVERT(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -12,12 +12,10 @@ PUSHDIVERT(-1)
#
#
ifdef(`_MAILER_local_', `',
`errprint(`*** MAILER(`local') must appear before MAILER(`pop')')')dnl
ifdef(`POP_MAILER_PATH',, `define(`POP_MAILER_PATH', /usr/lib/mh/spop)')
_DEFIFNOT(`POP_MAILER_FLAGS', `Penu')
ifdef(`POP_MAILER_ARGS',, `define(`POP_MAILER_ARGS', `pop $u')')
define(`_POP_QGRP', `ifelse(defn(`POP_MAILER_QGRP'),`',`', ` Q=POP_MAILER_QGRP,')')dnl
POPDIVERT
@ -25,10 +23,10 @@ POPDIVERT
### POP Mailer specification ###
####################################
VERSIONID(`$Id: pop.m4,v 8.20 1999/10/18 04:57:54 gshapiro Exp $')
VERSIONID(`$Id: pop.m4,v 8.22 2001/11/12 23:11:34 ca Exp $')
Mpop, P=POP_MAILER_PATH, F=_MODMF_(CONCAT(`lsDFMq', POP_MAILER_FLAGS), `POP'), S=EnvFromL, R=EnvToL/HdrToL,
T=DNS/RFC822/X-Unix,
T=DNS/RFC822/X-Unix,_POP_QGRP
A=POP_MAILER_ARGS
LOCAL_CONFIG

View File

@ -1,6 +1,6 @@
PUSHDIVERT(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -12,9 +12,6 @@ PUSHDIVERT(-1)
#
#
ifdef(`_MAILER_smtp_', `',
`errprint(`*** MAILER(`smtp') must appear before MAILER(`procmail')')')dnl
ifdef(`PROCMAIL_MAILER_PATH',,
`ifdef(`PROCMAIL_PATH',
`define(`PROCMAIL_MAILER_PATH', PROCMAIL_PATH)',
@ -22,6 +19,7 @@ ifdef(`PROCMAIL_MAILER_PATH',,
_DEFIFNOT(`PROCMAIL_MAILER_FLAGS', `SPhnu9')
ifdef(`PROCMAIL_MAILER_ARGS',,
`define(`PROCMAIL_MAILER_ARGS', `procmail -Y -m $h $f $u')')
define(`_PROCMAIL_QGRP', `ifelse(defn(`PROCMAIL_MAILER_QGRP'),`',`', ` Q=PROCMAIL_MAILER_QGRP,')')dnl
POPDIVERT
@ -29,8 +27,8 @@ POPDIVERT
### PROCMAIL Mailer specification ###
##################*****##################
VERSIONID(`$Id: procmail.m4,v 8.20 1999/10/18 04:57:54 gshapiro Exp $')
VERSIONID(`$Id: procmail.m4,v 8.22 2001/11/12 23:11:34 ca Exp $')
Mprocmail, P=PROCMAIL_MAILER_PATH, F=_MODMF_(CONCAT(`DFM', PROCMAIL_MAILER_FLAGS), `PROCMAIL'), S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP/HdrFromSMTP,
ifdef(`PROCMAIL_MAILER_MAX', `M=PROCMAIL_MAILER_MAX, ')T=DNS/RFC822/X-Unix,
ifdef(`PROCMAIL_MAILER_MAX', `M=PROCMAIL_MAILER_MAX, ')T=DNS/RFC822/X-Unix,_PROCMAIL_QGRP
A=PROCMAIL_MAILER_ARGS

View File

@ -3,7 +3,7 @@ PUSHDIVERT(-1)
# Copyright (C) 1997, Philip A. Prindeville and Enteka Enterprise Technology
# Services
#
# Copyright (c) 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1999, 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
@ -16,6 +16,7 @@ ifdef(`QPAGE_MAILER_PATH', `', `define(`QPAGE_MAILER_PATH', `/usr/local/bin/qpag
_DEFIFNOT(`QPAGE_MAILER_FLAGS', `mDFMs')
ifdef(`QPAGE_MAILER_ARGS', `', `define(`QPAGE_MAILER_ARGS', `qpage -l0 -m -P$u')')
ifdef(`QPAGE_MAILER_MAX', `', `define(`QPAGE_MAILER_MAX', `4096')')
define(`_QPAGE_QGRP', `ifelse(defn(`QPAGE_MAILER_QGRP'),`',`', ` Q=QPAGE_MAILER_QGRP,')')dnl
POPDIVERT
@ -23,8 +24,8 @@ POPDIVERT
### QPAGE Mailer specification ###
######################################
VERSIONID(`$Id: qpage.m4,v 8.9 1999/11/16 03:33:04 gshapiro Exp $')
VERSIONID(`$Id: qpage.m4,v 8.10 2001/11/12 23:11:34 ca Exp $')
Mqpage, P=QPAGE_MAILER_PATH, F=_MODMF_(QPAGE_MAILER_FLAGS, `QPAGE'),
M=QPAGE_MAILER_MAX, T=DNS/RFC822/X-Unix,
M=QPAGE_MAILER_MAX, T=DNS/RFC822/X-Unix,_QPAGE_QGRP
A=QPAGE_MAILER_ARGS

View File

@ -1,6 +1,6 @@
PUSHDIVERT(-1)
#
# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -19,24 +19,29 @@ ifdef(`ESMTP_MAILER_ARGS',, `define(`ESMTP_MAILER_ARGS', `TCP $h')')
ifdef(`SMTP8_MAILER_ARGS',, `define(`SMTP8_MAILER_ARGS', `TCP $h')')
ifdef(`DSMTP_MAILER_ARGS',, `define(`DSMTP_MAILER_ARGS', `TCP $h')')
ifdef(`RELAY_MAILER_ARGS',, `define(`RELAY_MAILER_ARGS', `TCP $h')')
define(`_SMTP_QGRP', `ifelse(defn(`SMTP_MAILER_QGRP'),`',`', ` Q=SMTP_MAILER_QGRP,')')dnl
define(`_ESMTP_QGRP', `ifelse(defn(`ESMTP_MAILER_QGRP'),`',`', ` Q=ESMTP_MAILER_QGRP,')')dnl
define(`_SMTP8_QGRP', `ifelse(defn(`SMTP8_MAILER_QGRP'),`',`', ` Q=SMTP8_MAILER_QGRP,')')dnl
define(`_DSMTP_QGRP', `ifelse(defn(`DSMTP_MAILER_QGRP'),`',`', ` Q=DSMTP_MAILER_QGRP,')')dnl
define(`_RELAY_QGRP', `ifelse(defn(`RELAY_MAILER_QGRP'),`',`', ` Q=RELAY_MAILER_QGRP,')')dnl
POPDIVERT
#####################################
### SMTP Mailer specification ###
#####################################
VERSIONID(`$Id: smtp.m4,v 8.56.2.1.2.3 2000/09/25 13:53:27 ca Exp $')
VERSIONID(`$Id: smtp.m4,v 8.64 2001/04/03 01:52:54 gshapiro Exp $')
#
# common sender and masquerading recipient rewriting
#
SMasqSMTP=61
SMasqSMTP
R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified
R$+ $@ $1 < @ *LOCAL* > add local qualification
#
# convert pseudo-domain addresses to real domain addresses
#
SPseudoToReal=51
SPseudoToReal
# pass <route-addr>s through
R< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr>
@ -44,7 +49,7 @@ R< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr>
# output fake domains as user%fake@relay
ifdef(`BITNET_RELAY',
`R$+ <@ $+ .BITNET. > $: $1 % $2 .BITNET < @ $B > user@host.BITNET
R$+.BITNET <@ $+:$+ > $: $1 .BITNET < @ $3 > strip mailer: part',
R$+.BITNET <@ $~[ $*:$+ > $: $1 .BITNET < @ $4 > strip mailer: part',
`dnl')
ifdef(`_NO_UUCP_', `dnl', `
# do UUCP heuristics; note that these are shared with UUCP mailers
@ -56,14 +61,14 @@ R< $&h ! > $- ! $+ $@ $2 < @ $1 .UUCP. >
R< $&h ! > $-.$+ ! $+ $@ $3 < @ $1.$2 >
R< $&h ! > $+ $@ $1 < @ $&h .UUCP. >
R< $+ ! > $+ $: $1 ! $2 < @ $Y > use UUCP_RELAY
R$+ < @ $+ : $+ > $@ $1 < @ $3 > strip mailer: part
R$+ < @ $~[ $* : $+ > $@ $1 < @ $4 > strip mailer: part
R$+ < @ > $: $1 < @ *LOCAL* > if no UUCP_RELAY')
#
# envelope sender rewriting
#
SEnvFromSMTP=11
SEnvFromSMTP
R$+ $: $>PseudoToReal $1 sender/recipient common
R$* :; <@> $@ list:; special case
R$* $: $>MasqSMTP $1 qualify unqual'ed names
@ -74,7 +79,7 @@ R$+ $: $>MasqEnv $1 do masquerading
# envelope recipient rewriting --
# also header recipient if not masquerading recipients
#
SEnvToSMTP=21
SEnvToSMTP
R$+ $: $>PseudoToReal $1 sender/recipient common
R$+ $: $>MasqSMTP $1 qualify unqual'ed names
R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
@ -82,7 +87,7 @@ R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
#
# header sender and masquerading header recipient rewriting
#
SHdrFromSMTP=31
SHdrFromSMTP
R$+ $: $>PseudoToReal $1 sender/recipient common
R:; <@> $@ list:; special case
@ -96,22 +101,22 @@ R$+ $: $>MasqHdr $1 do masquerading
#
# relay mailer header masquerading recipient rewriting
#
SMasqRelay=71
SMasqRelay
R$+ $: $>MasqSMTP $1
R$+ $: $>MasqHdr $1
Msmtp, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, SMTP_MAILER_FLAGS), `SMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=990,
_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,
_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,_SMTP_QGRP
A=SMTP_MAILER_ARGS
Mesmtp, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a', SMTP_MAILER_FLAGS), `SMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=990,
_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,
Mesmtp, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a', SMTP_MAILER_FLAGS), `ESMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=990,
_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,_ESMTP_QGRP
A=ESMTP_MAILER_ARGS
Msmtp8, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `8', SMTP_MAILER_FLAGS), `SMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=990,
_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,
Msmtp8, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `8', SMTP_MAILER_FLAGS), `SMTP8'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=990,
_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,_SMTP8_QGRP
A=SMTP8_MAILER_ARGS
Mdsmtp, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a%', SMTP_MAILER_FLAGS), `SMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=990,
_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,
Mdsmtp, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a%', SMTP_MAILER_FLAGS), `DSMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=990,
_OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,_DSMTP_QGRP
A=DSMTP_MAILER_ARGS
Mrelay, P=[IPC], F=_MODMF_(CONCAT(_DEF_SMTP_MAILER_FLAGS, `a8', RELAY_MAILER_FLAGS), `RELAY'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `MasqSMTP/MasqRelay', `MasqSMTP'), E=\r\n, L=2040,
_OPTINS(`RELAY_MAILER_CHARSET', `C=', `, ')_OPTINS(`RELAY_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')T=DNS/RFC822/SMTP,
_OPTINS(`RELAY_MAILER_CHARSET', `C=', `, ')_OPTINS(`RELAY_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`SMTP_MAILER_MAXRCPTS', `r=', `, ')T=DNS/RFC822/SMTP,_RELAY_QGRP
A=RELAY_MAILER_ARGS

View File

@ -1,6 +1,6 @@
PUSHDIVERT(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -12,19 +12,17 @@ PUSHDIVERT(-1)
#
#
ifdef(`_MAILER_local_', `',
`errprint(`*** MAILER(`local') must appear before MAILER(`usenet')')')dnl
ifdef(`USENET_MAILER_PATH',, `define(`USENET_MAILER_PATH', /usr/lib/news/inews)')
_DEFIFNOT(`USENET_MAILER_FLAGS', `rsDFMmn')
ifdef(`USENET_MAILER_ARGS',, `define(`USENET_MAILER_ARGS', `inews -m -h -n')')
define(`_USENET_QGRP', `ifelse(defn(`USENET_MAILER_QGRP'),`',`', ` Q=USENET_MAILER_QGRP,')')dnl
POPDIVERT
####################################
### USENET Mailer specification ###
####################################
VERSIONID(`$Id: usenet.m4,v 8.19 1999/11/16 03:33:04 gshapiro Exp $')
VERSIONID(`$Id: usenet.m4,v 8.21 2000/10/26 02:08:19 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,
_OPTINS(`USENET_MAILER_MAX', `M=', `, ')T=X-Usenet/X-Usenet/X-Unix,USENET_MAILER_QGRP
A=USENET_MAILER_ARGS $u

View File

@ -1,6 +1,6 @@
PUSHDIVERT(-1)
#
# Copyright (c) 1998, 1999 Sendmail, Inc. and its suppliers.
# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@ -11,8 +11,6 @@ PUSHDIVERT(-1)
# the sendmail distribution.
#
#
ifdef(`_MAILER_smtp_', `',
`errprint(`*** MAILER(`smtp') must appear before MAILER(`uucp')')')dnl
ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g -gC $h!rmail ($u)')')
@ -20,17 +18,18 @@ _DEFIFNOT(`UUCP_MAILER_FLAGS', `')
ifdef(`UUCP_MAILER_MAX',,
`define(`UUCP_MAILER_MAX',
`ifdef(`UUCP_MAX_SIZE', `UUCP_MAX_SIZE', 100000)')')
define(`_UUCP_QGRP', `ifelse(defn(`UUCP_MAILER_QGRP'),`',`', ` Q=UUCP_MAILER_QGRP,')')dnl
POPDIVERT
#####################################
### UUCP Mailer specification ###
#####################################
VERSIONID(`$Id: uucp.m4,v 8.38 1999/10/18 04:57:55 gshapiro Exp $')
VERSIONID(`$Id: uucp.m4,v 8.44 2001/08/24 19:49:08 ca Exp $')
#
# envelope and header sender rewriting
#
SFromU=12
SFromU
# handle error address as a special case
R<@> $n errors to mailer-daemon
@ -52,7 +51,7 @@ R! $+ $: $k ! $1 in case $U undefined
#
# envelope recipient rewriting
#
SEnvToU=22
SEnvToU
# list:; should disappear
R:; <@> $@
@ -67,7 +66,7 @@ R$* < @ $+ > $2 ! $1 convert to UUCP format
#
# header recipient rewriting
#
SHdrToU=42
SHdrToU
# list:; syntax should disappear
R:; <@> $@
@ -88,7 +87,7 @@ ifdef(`_MAILER_smtp_',
`#
# envelope sender rewriting for uucp-dom mailer
#
SEnvFromUD=52
SEnvFromUD
# handle error address as a special case
R<@> $n errors to mailer-daemon
@ -99,7 +98,7 @@ R$* $@ $>EnvFromSMTP $1
#
# envelope sender rewriting for uucp-uudom mailer
#
SEnvFromUUD=72
SEnvFromUUD
# handle error address as a special case
R<@> $n errors to mailer-daemon
@ -111,8 +110,10 @@ R$* < @ $* . > $* $1 < @ $2 > $3 strip trailing dots
R<@ $- . UUCP > : $+ $@ $1 ! $2 convert to UUCP format
R<@ $+ > : $+ $@ $1 ! $2 convert to UUCP format
R$* < @ $- . UUCP > $@ $2 ! $1 convert to UUCP format
R$* < @ $+ > $@ $2 ! $1 convert to UUCP format')
R$* < @ $+ > $@ $2 ! $1 convert to UUCP format',
`errprint(`*** MAILER(`smtp') must appear before MAILER(`uucp')
if uucp-dom should be included.')
')
PUSHDIVERT(4)
# resolve locally connected UUCP links
@ -128,29 +129,29 @@ POPDIVERT
# old UUCP mailer (two names)
Muucp, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`DFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU,
M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,
M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP
A=UUCP_MAILER_ARGS
Muucp-old, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`DFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU,
M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,
M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP
A=UUCP_MAILER_ARGS
# smart UUCP mailer (handles multiple addresses) (two names)
Msuucp, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU,
M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,
M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP
A=UUCP_MAILER_ARGS
Muucp-new, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhuUd', UUCP_MAILER_FLAGS), `UUCP'), S=FromU, R=EnvToU/HdrToU,
M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,
M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP
A=UUCP_MAILER_ARGS
ifdef(`_MAILER_smtp_',
`# domain-ized UUCP mailer
Muucp-dom, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhud', UUCP_MAILER_FLAGS), `UUCP'), S=EnvFromUD/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'),
M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,
M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP
A=UUCP_MAILER_ARGS
# domain-ized UUCP mailer with UUCP-style sender envelope
Muucp-uudom, P=UUCP_MAILER_PATH, F=_MODMF_(CONCAT(`mDFMhud', UUCP_MAILER_FLAGS), `UUCP'), S=EnvFromUUD/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'),
M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,
M=UUCP_MAILER_MAX, _OPTINS(`UUCP_MAILER_CHARSET', `C=', `, ')T=X-UUCP/X-UUCP/X-Unix,_UUCP_QGRP
A=UUCP_MAILER_ARGS')

View File

@ -0,0 +1,21 @@
divert(-1)
#
# Copyright (c) 1998, 1999, 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
# The Regents of the University of California. All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
divert(0)
VERSIONID(`$Id: a-ux.m4,v 8.2 2001/07/23 16:19:36 gshapiro Exp $')
ifdef(`QUEUE_DIR',, `define(`QUEUE_DIR', /usr/spool/mqueue)')dnl
ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', /usr/bin/uux)')dnl
_DEFIFNOT(`LOCAL_MAILER_FLAGS', `mn9')dnl
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail -d -r $f $u')')dnl
define(`confEBINDIR', `/usr/lib')dnl

View File

@ -10,7 +10,7 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: aix5.m4,v 1.1.2.1 2000/12/09 03:32:08 ca Exp $')
VERSIONID(`$Id: aix5.m4,v 1.1 2000/12/08 21:53:36 ca Exp $')
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /bin/bellmail)')dnl
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', mail -F $g $u)')dnl
_DEFIFNOT(`LOCAL_MAILER_FLAGS', `mn9')dnl

View File

@ -11,7 +11,7 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: darwin.m4,v 8.1.2.1 2000/06/15 06:37:04 gshapiro Exp $')
VERSIONID(`$Id: darwin.m4,v 8.1 2000/06/15 06:36:30 gshapiro Exp $')
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', `/var/log/sendmail.st')')dnl
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/libexec/mail.local)')dnl
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -z -a$g $h!rmail ($u)')')dnl

View File

@ -0,0 +1,20 @@
divert(-1)
#
# Copyright (c) 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
divert(0)
VERSIONID(`$Id: freebsd5.m4,v 1.1 2001/10/08 22:25:34 gshapiro Exp $')
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', `/var/log/sendmail.st')')dnl
dnl turn on S flag for local mailer
MODIFY_MAILER_FLAGS(`LOCAL', `+S')dnl
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/libexec/mail.local)')dnl
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail $u')')dnl
ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', `/usr/local/bin/uux')')dnl
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -z -a$g $h!rmail ($u)')')dnl

View File

@ -13,7 +13,7 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: linux.m4,v 8.11.16.2 2000/09/17 17:04:22 gshapiro Exp $')
VERSIONID(`$Id: linux.m4,v 8.13 2000/09/17 17:30:00 gshapiro Exp $')
define(`confEBINDIR', `/usr/sbin')
ifdef(`PROCMAIL_MAILER_PATH',,
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail'))

View File

@ -15,7 +15,7 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: mklinux.m4,v 8.14.4.1 2000/05/09 18:48:58 gshapiro Exp $')
VERSIONID(`$Id: mklinux.m4,v 8.15 2000/05/09 18:48:56 gshapiro Exp $')
define(`confEBINDIR', `/usr/sbin')
ifdef(`STATUS_FILE',,
`define(`STATUS_FILE', `/var/log/sendmail.st')')

View File

@ -0,0 +1,22 @@
divert(-1)
#
# Copyright (c) 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
divert(0)
VERSIONID(`$Id: mpeix.m4,v 1.1 2001/12/13 23:56:40 gshapiro Exp $')
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', `/bin/tsmail')')dnl
_DEFIFNOT(`LOCAL_MAILER_FLAGS', `mu9')dnl
ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `tsmail $u')')dnl
ifdef(`LOCAL_SHELL_PATH',, `define(`LOCAL_SHELL_PATH', `/bin/sh')')dnl
ifdef(`confDEF_USER_ID',, `define(`confDEF_USER_ID', `SERVER.SENDMAIL')')dnl
ifdef(`confTRUSTED_USER',, `define(`confTRUSTED_USER', `SERVER.SENDMAIL')')dnl
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confDONT_BLAME_SENDMAIL', `ForwardFileInGroupWritableDirPath')dnl

View File

@ -15,7 +15,7 @@ divert(-1)
#
divert(0)
VERSIONID(`$Id: solaris8.m4,v 8.1.2.2 2000/08/23 16:10:01 gshapiro Exp $')
VERSIONID(`$Id: solaris8.m4,v 8.2 2000/08/23 16:10:49 gshapiro Exp $')
divert(-1)
ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -a$g $h!rmail ($u)')')

View File

@ -0,0 +1,216 @@
# Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
# $Id: sendmail.schema,v 8.14 2001/08/31 17:18:18 gshapiro Exp $
# Note that this schema is experimental at this point as it has had little
# public review. Therefore, it may change in future versions. Feedback
# via sendmail@sendmail.org is encouraged.
# OID arcs for Sendmail
# enterprise: 1.3.6.1.4.1
# sendmail: enterprise.6152
# sendmail-at: sendmail.3.1
# sendmail-oc: sendmail.3.2
###########################################################################
#
# The Sendmail MTA attributes and objectclass
#
###########################################################################
# attribute sendmailMTACluster cis
attributetype ( 1.3.6.1.4.1.6152.10.3.1.10
NAME 'sendmailMTACluster'
DESC 'cluster name associated with a set of MTAs'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
# attribute sendmailMTAHost cis
attributetype ( 1.3.6.1.4.1.6152.10.3.1.11
NAME 'sendmailMTAHost'
DESC 'host name associated with a MTA cluster'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
#objectClass sendmailMTA
# requires
# objectClass
# allows
# sendmailMTACluster,
# sendmailMTAHost,
# Description
objectclass ( 1.3.6.1.4.1.6152.10.3.2.10
NAME 'sendmailMTA'
SUP top STRUCTURAL
DESC 'Sendmail MTA definition'
MAY ( sendmailMTACluster $ sendmailMTAHost $ Description ) )
###########################################################################
#
# The Sendmail MTA shared attributes
#
###########################################################################
# attribute sendmailMTAKey cis
attributetype ( 1.3.6.1.4.1.6152.10.3.1.13
NAME 'sendmailMTAKey'
DESC 'key (left hand side) of an aliases or map entry'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )
###########################################################################
#
# The Sendmail MTA Map attributes and objectclasses
#
###########################################################################
# attribute sendmailMTAMapName cis
attributetype ( 1.3.6.1.4.1.6152.10.3.1.14
NAME 'sendmailMTAMapName'
DESC 'identifier for the particular map'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE )
# attribute sendmailMTAMapValue cis
attributetype ( 1.3.6.1.4.1.6152.10.3.1.16
NAME 'sendmailMTAMapValue'
DESC 'value (right hand side) of a map entry'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
#objectClass sendmailMTAMap
# requires
# objectClass,
# sendmailMTAMapName,
# allows
# sendmailMTACluster,
# sendmailMTAHost,
# Description
objectclass ( 1.3.6.1.4.1.6152.10.3.2.11
NAME 'sendmailMTAMap'
SUP sendmailMTA STRUCTURAL
DESC 'Sendmail MTA map definition'
MUST sendmailMTAMapName
MAY ( sendmailMTACluster $ sendmailMTAHost $ Description ) )
#objectClass sendmailMTAObject
# requires
# objectClass,
# sendmailMTAMapName,
# sendmailMTAKey,
# sendmailMTAMapValue,
# allows
# sendmailMTACluster,
# sendmailMTAHost,
# Description
objectclass ( 1.3.6.1.4.1.6152.10.3.2.12
NAME 'sendmailMTAMapObject'
SUP sendmailMTAMap STRUCTURAL
DESC 'Sendmail MTA map object'
MUST ( sendmailMTAMapName $ sendmailMTAKey $ sendmailMTAMapValue )
MAY ( sendmailMTACluster $ sendmailMTAHost $ Description ) )
###########################################################################
#
# The Sendmail MTA Alias attributes and objectclasses
#
###########################################################################
# attribute sendmailMTAAliasGrouping cis
attributetype ( 1.3.6.1.4.1.6152.10.3.1.18
NAME 'sendmailMTAAliasGrouping'
DESC 'name that identifies a particular aliases grouping'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
# attribute sendmailMTAAliasValue cis
attributetype ( 1.3.6.1.4.1.6152.10.3.1.20
NAME 'sendmailMTAAliasValue'
DESC 'value (right hand side) of an alias'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
#objectClass sendmailMTAAlias
# requires
# objectClass,
# allows
# sendmailMTAAliasGrouping,
# sendmailMTACluster,
# sendmailMTAHost,
# Description
objectclass ( 1.3.6.1.4.1.6152.10.3.2.13
NAME 'sendmailMTAAlias'
SUP sendmailMTA STRUCTURAL
DESC 'Sendmail MTA alias definition'
MAY ( sendmailMTAAliasGrouping $
sendmailMTACluster $ sendmailMTAHost $ Description ) )
#objectClass sendmailMTAAliasObject
# requires
# objectClass,
# sendmailMTAKey,
# sendmailMTAAliasValue,
# allows
# sendmailMTAAliasGrouping,
# sendmailMTACluster,
# sendmailMTAHost,
# Description
objectclass ( 1.3.6.1.4.1.6152.10.3.2.14
NAME 'sendmailMTAAliasObject'
SUP sendmailMTAAlias STRUCTURAL
DESC 'Sendmail MTA alias object'
MUST ( sendmailMTAKey $ sendmailMTAAliasValue )
MAY ( sendmailMTAAliasGrouping $
sendmailMTACluster $ sendmailMTAHost $ Description ) )
###########################################################################
#
# The Sendmail MTA Class attributes and objectclass
#
###########################################################################
# attribute sendmailMTAClassName cis
attributetype ( 1.3.6.1.4.1.6152.10.3.1.22
NAME 'sendmailMTAClassName'
DESC 'identifier for the class'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} SINGLE-VALUE )
# attribute sendmailMTAClassValue cis
attributetype ( 1.3.6.1.4.1.6152.10.3.1.23
NAME 'sendmailMTAClassValue'
DESC 'member of a class'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
#objectClass sendmailMTAClass
# requires
# objectClass,
# sendmailMTAClassName,
# sendmailMTAClassValue,
# allows
# sendmailMTACluster,
# sendmailMTAHost,
# Description
objectclass ( 1.3.6.1.4.1.6152.10.3.2.15
NAME 'sendmailMTAClass'
SUP sendmailMTA STRUCTURAL
DESC 'Sendmail MTA class definition'
MUST ( sendmailMTAClassName $ sendmailMTAClassValue )
MAY ( sendmailMTACluster $ sendmailMTAHost $ Description ) )

View File

@ -27,7 +27,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# $Id: buildvirtuser,v 1.1.2.3 2001/02/12 02:57:13 gshapiro Exp $
# $Id: buildvirtuser,v 1.3 2001/02/12 02:58:20 gshapiro Exp $
=head1 NAME

View File

@ -0,0 +1,94 @@
divert(-1)
#
# Copyright (c) 2001 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#
dnl ## This is a modified enhdnsbl, loosely based on the
dnl ## original.
dnl ##
dnl ## Use it as follows
dnl ##
dnl ## HACK(dnsblaccess, domain, optional-message, tempfail-message, keytag)
dnl ##
dnl ## The first argument (domain) is required. The other arguments
dnl ## are optional and have reasonable defaults. The
dnl ## optional-message is the error message given in case of a
dnl ## match. The default behavior for a tempfail is to accept the
dnl ## email. A tempfail-message value of `t' temporarily rejects
dnl ## with a default message. Otherwise the value should be your
dnl ## own message. The keytag is used to lookup the access map to
dnl ## further refine the result. I recommend a qualified keytag
dnl ## (containing a ".") as less likely to accidently conflict with
dnl ## other access tags.
dnl ##
dnl ## This is best illustrated with an example. Please do not use
dnl ## the example, as it refers to a bogus lookup list.
dnl ##
dnl ## Suppose that you use
dnl ##
dnl ## HACK(dnsblaccess, `rbl.bogus.org',`',`t',bogus.tag)
dnl ##
dnl ## and suppose that your access map contains the entries
dnl ##
dnl ## bogus.tag:127.0.0.2 REJECT
dnl ## bogus.tag:127.0.0.3 error:dialup mail from %1 rejected by %2
dnl ## bogus.tag:127.0.0.4 OK
dnl ## bogus.tag:127 REJECT
dnl ## bogus.tag: OK
dnl ##
dnl ## If an SMTP connection is received from 123.45.6.7, sendmail
dnl ## will lookup the A record for 7.6.45.123.bogus.org. If there
dnl ## is a temp failure for the lookup, sendmail will generate a
dnl ## temporary failure with a default message. If there is no
dnl ## A-record for this lookup, then the mail is treated as if the
dnl ## HACK line were not present. If the lookup returns 127.0.0.2,
dnl ## then a default message rejects the mail. If it returns
dnl ## 127.0.0.3, then the message
dnl ## "dialup mail from 123.45.6.7 rejected by rbl.bogus.org"
dnl ## is used to reject the mail. If it returns 127.0.0.4, the
dnl ## mail is processed as if there were no HACK line. If the
dnl ## address returned is something else beginning with 127.*, the
dnl ## mail is rejected with a default error message. If the
dnl ## address returned does not begin 127, then the mail is
dnl ## processed as if the HACK line were not present.
divert(0)
VERSIONID(`$Id: dnsblaccess.m4,v 1.2 2001/07/23 00:24:04 ca Exp $')
ifdef(`_ACCESS_TABLE_', `dnl',
`errprint(`*** ERROR: dnsblaccess requires FEATURE(`access_db')
')')
ifdef(`_EDNSBL_R_',`dnl',`dnl
define(`_EDNSBL_R_', `1')dnl ## prevent multiple redefines of the map.
LOCAL_CONFIG
# map for enhanced DNS based blacklist lookups
Kednsbl dns -R A -a. -T<TMP> -r`'ifdef(`EDNSBL_TO',`EDNSBL_TO',`5')
')
divert(-1)
define(`_EDNSBL_SRV_', `ifelse(len(X`'_ARG_),`1',`blackholes.mail-abuse.org',_ARG_)')dnl
define(`_EDNSBL_MSG_', `ifelse(len(X`'_ARG2_),`1',`"550 Mail from " $`'&{client_addr} " refused by blackhole site '_EDNSBL_SRV_`"',`_ARG2_')')dnl
define(`_EDNSBL_MSG_TMP_', `ifelse(_ARG3_,`t',`"451 Temporary lookup failure of " $`'&{client_addr} " at '_EDNSBL_SRV_`"',`_ARG3_')')dnl
define(`_EDNSBL_KEY_', `ifelse(len(X`'_ARG4_),`1',`dnsblaccess',_ARG4_)')dnl
divert(8)
# DNS based IP address spam list _EDNSBL_SRV_
R$* $: $&{client_addr}
dnl IPv6?
R$-.$-.$-.$- $: <?> $(ednsbl $4.$3.$2.$1._EDNSBL_SRV_. $: OK $) <>$1.$2.$3.$4
R<?>OK<>$* $: OKSOFAR
R<?>$+<TMP><>$* $: <? <TMPF>>
R<?>$* $- .<>$* <$(access _EDNSBL_KEY_`:'$1$2 $@$3 $@`'_EDNSBL_SRV_ $: ? $)> $1 <>$3
R<?>$* <>$* $:<$(access _EDNSBL_KEY_`:' $@$2 $@`'_EDNSBL_SRV_ $: ? $)> <>$2
ifelse(len(X`'_ARG3_),`1',
`R<$*<TMPF>>$* $: TMPOK',
`R<$*<TMPF>>$* $#error $@ 4.7.1 $: _EDNSBL_MSG_TMP_')
R<$={Accept}>$* $: OKSOFAR
R<ERROR:$-.$-.$-:$+> $* $#error $@ $1.$2.$3 $: $4
R<ERROR:$+> $* $#error $: $1
R<DISCARD> $* $#discard $: discard
R<$*> $* $#error $@ 5.7.1 $: _EDNSBL_MSG_
divert(-1)

View File

@ -46,7 +46,7 @@ divert(-1)changequote(<<, >>)<<
in the sendmail source tree. For more information, please see the
following URL:
http://www-wsg.cso.uiuc.edu/sendmail/patches/domainmap.html
http://www-dev.cso.uiuc.edu/sendmail/domainmap/
Feedback is welcome.
@ -69,14 +69,16 @@ LOCAL_RULESETS
SDomainMapLookup
R $=L <@ $=w .> $@ $1 <@ $2 .> weed out local users, in case
# Cw contains a mapped domain
R $+ <@ $+> $: $1 <@ $2 > <$&{addr_type}> check if sender
R $+ <@ $+> <e s> $#smtp $@ $2 $: $1 @ $2 do not process sender
ifdef(`DOMAINMAP_NO_REGEX',`dnl
R $+ <@ $+> $: $1 <@ $2> <$2> find domain
R $+ <@ $+> <$*> $: $1 <@ $2> <$2> find domain
R $+ <$+> <$+ . $+> $1 <$2> < $(dequote $3 "_" $4 $) >
# change "." to "_"
R $+ <$+> <$+ .> $: $1 <$2> < $(dequote "domain_" $3 $) >
# prepend "domain_"
dnl',`dnl
R $+ <@ $+> $: $1 <@ $2> <$2 :NOTDONE:> find domain
R $+ <@ $+> <$*> $: $1 <@ $2> <$2 :NOTDONE:> find domain
R $+ <$+> <$+ . :NOTDONE:> $1 <$2> < $(domainmap_regex $3 $: $3 $) >
# change "." and "-" to "_"
R $+ <$+> <$+> $: $1 <$2> < $(dequote "domain_" $3 $) >

View File

@ -3,7 +3,7 @@
## Copyright (c) 2000 Sendmail, Inc. and its suppliers.
## All rights reserved.
##
## $Id: link_hash.sh,v 1.1.2.1 2000/04/25 00:10:47 ca Exp $
## $Id: link_hash.sh,v 1.2 2000/04/25 00:12:28 ca Exp $
##
#
# ln a certificate to its hash

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1999 Sendmail, Inc. and its suppliers.
.\" Copyright (c) 1999, 2001 Sendmail, Inc. and its suppliers.
.\" All rights reserved.
.\"
.\" By using this file, you agree to the terms and conditions set
@ -6,18 +6,18 @@
.\" the sendmail distribution.
.\"
.\"
.\" $Id: qtool.8,v 8.9.16.2 2000/12/15 19:50:41 gshapiro Exp $
.\" $Id: qtool.8,v 8.16 2001/11/21 19:21:20 gshapiro Exp $
.\"
.TH QTOOL 8 "$Date: 2000/12/15 19:50:41 $"
.TH QTOOL 8 "$Date: 2001/11/21 19:21:20 $"
.SH NAME
qtool
\- manipulate sendmail queues
.SH SYNOPSIS
.B qtool.pl
.RB [options]
.RB [options]
target_directory source [source ...]
.PP
.B qtool.pl [-d/-b]
.B qtool.pl [-Q][-d|-b]
.RB [options]
source [source ...]
.SH DESCRIPTION
@ -28,8 +28,8 @@ running.
.PP
With no options,
.B qtool
will move any queue files as specified by \fIsource\fP into
\fItarget_directory\fP. \fISource\fP can be either an individual
will move any queue files as specified by \fIsource\fP into
\fItarget_directory\fP. \fISource\fP can be either an individual
queue control file, a queue file id, or a queue directory.
.PP
If the -d option is specified, qtool will delete the messages specified by
@ -38,19 +38,27 @@ source instead of moving them.
If the -b option is specified, the selected messages will be bounced by
running sendmail with the -OTimeout.queuereturn=now option.
.SS Options
.TP
.TP
\fB\-b\fP
Bounce all of the messages specified by source. The messages will be bounced
immediately. No attempt will be made to deliver the messages.
.TP
\fB\-C\fP configfile
Specify the sendmail config file.
Defaults to /etc/mail/sendmail.cf.
.TP
\fB\-d\fP
Delete all of the messages specified by source.
.TP
.TP
\fB\-e\fP \fIperl_expression\fP
Evalute \fIperl_expression\fP for each queue file as specified
by \fIsource\fP. If \fIperl_expression\fP evaluates to true, then that
Evalute \fIperl_expression\fP for each queue file as specified
by \fIsource\fP. If \fIperl_expression\fP evaluates to true, then that
queue file is moved. See below for more detail on \fIperl_expression\fP.
.TP
.TP
\fB\-Q\fP
Operate on quarantined items
(queue control file begins with hf instead of qf).
.TP
\fB\-s\fP \fIseconds\fP
Move only the queue files specified by \fIsource\fP that have a
modification time older than \fIseconds\fP.
@ -74,9 +82,6 @@ The last time the body was modified since the epoch in seconds.
\fBbody_size\fP
The size of the body file in bytes.
.TP
\fBcharset\fP
Character set (for future use).
.TP
\fBcontent-length\fP
Content-Length: header value (Solaris sendmail only).
.TP
@ -84,7 +89,7 @@ Content-Length: header value (Solaris sendmail only).
The controlling user.
.TP
\fBcontrol_last_mod_time\fP
The last time the body was modified since the epoch in seconds.
The last time the control file was modified since the epoch in seconds.
.TP
\fBcontrol_size\fP
The size of the control file in bytes.
@ -92,15 +97,24 @@ The size of the control file in bytes.
\fBcreation_time\fP
The time when the control file was created.
.TP
\fBcurrent_delay\fP
Current delay for queue delay algorithm if _FFR_QUEUEDELAY is enabled.
.TP
\fBdata_file_name\fP
The data file name (deprecated).
.TP
\fBdeliver_by\fP
Deliver by flag and deadline for DELIVERBY ESMTP extension.
.TP
\fBenvid\fP
Original envelope id form ESMTP.
.TP
\fBerror_recipient\fP
The error recipient (deprecated).
.TP
\fBfinal_recipient\fP
Final recipient (for DSNs).
.TP
\fBflags\fP
Array of characters that can be the following values:
.PD 0
@ -110,7 +124,7 @@ w
warning message has been sent
.TP 8
r
This is an error respone or DSN
This is an error response or DSN
.TP 8
8
has 8 bit data in body
@ -153,6 +167,13 @@ Original recipient (ORCPT= parameter).
\fBpriority\fP
Adjusted priority of message.
.TP
\fBquarantine_reason\fP
Quarantine reason for quarantined (held) envelopes if _FFR_QUARANTINE is
enabled.
.TP
\fBqueue_delay\fP
Queue delay algorithm if _FFR_QUEUEDELAY is enabled.
.TP
\fBrecipient\fP
Array of character flags followed by colon and recipient name. Flags:
.PD 0
@ -191,16 +212,19 @@ Moves the message with id d6CLQh100847 in queue q1 to queue q2.
\fBqtool.pl q2 q1/qfd6CLQh100847\fP
Moves the message with id d6CLQh100847 in queue q1 to queue q2.
.TP
\fBqtool.pl q2 q1/dfd6CLQh100847\fP
Moves the message with id d6CLQh100847 in queue q1 to queue q2.
.TP
\fBqtool.pl -e '$msg{num_delivery_attempts} == 3' /q2 /q1\fP
Moves all of the queue files that have had three attempted deliveries from
queue q1 to queue q2.
.SH BUGS
In sendmail 8.12, it is possible for a message's queue and data files (df)
to be stored in different queues.
In this situation, you must give qtool the pathname of the queue file,
not of the data file (df).
To be safe, never feed qtool the pathname of a data file (df).
.SH SEE ALSO
sendmail(8)
.SH HISTORY
The
.B qtool
command appeared in
command appeared in
sendmail 8.10.

View File

@ -1,9 +1,9 @@
#!/usr/bin/env perl
##
## Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
## All rights reserved.
## Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
## All rights reserved.
##
## $Id: qtool.pl,v 8.15.16.4 2000/11/30 07:14:01 gshapiro Exp $
## $Id: qtool.pl,v 8.26 2001/11/21 19:26:17 gshapiro Exp $
##
use strict;
use File::Basename;
@ -43,7 +43,7 @@ use Getopt::Std;
## queue message. This lets you check for any value in the message
## headers or the control file. Here's an example:
##
## ./qtool.pl -e '$msg->{num_delivery_attempts} >= 2' /q1 /q2
## ./qtool.pl -e '$msg{num_delivery_attempts} >= 2' /q1 /q2
##
## This would move any queue files whose number of delivery attempts
## is greater than or equal to 2 from the queue 'q2' to the queue 'q1'.
@ -61,9 +61,10 @@ my $source;
my $result;
my $action;
my $new_condition;
my $qprefix;
my $conditions = new Compound();
Getopt::Std::getopts('bde:s:', \%opts);
Getopt::Std::getopts('bC:de:Qs:', \%opts);
sub move_action
{
@ -113,6 +114,15 @@ if (defined $opts{e})
$conditions->add($new_condition);
}
if (defined $opts{Q})
{
$qprefix = "hf";
}
else
{
$qprefix = "qf";
}
if ($action == \&move_action)
{
$dst_name = shift(@ARGV);
@ -126,6 +136,37 @@ if ($action == \&move_action)
$destination = new Queue($dst_name);
}
# determine queue_root by reading config file
my $queue_root;
{
my $config_file = "/etc/mail/sendmail.cf";
if (defined $opts{C})
{
$config_file = $opts{C};
}
my $line;
open(CONFIG_FILE, $config_file) or die "$config_file: $!";
while ($line = <CONFIG_FILE>)
{
chomp $line;
if ($line =~ m/^O QueueDirectory=(.*)/)
{
$queue_root = $1;
if ($queue_root =~ m/(.*)\/[^\/]+\*$/)
{
$queue_root = $1;
}
last;
}
}
close(CONFIG_FILE);
if (!defined $queue_root)
{
die "QueueDirectory option not defined in $config_file";
}
}
while (@ARGV)
{
$source_name = shift(@ARGV);
@ -157,13 +198,18 @@ while (($source_name, $source) = each(%sources))
sub usage
{
print("Usage: $0 [options] directory source ...\n");
print(" $0 [-d|-b] source ...\n");
print("options:\n");
print(" -b Bounce the messages specified by source.\n");
print(" -d Delete the messages specified by source.\n");
print(" -e [perl expression] Move only messages for which perl expression returns true.\n");
print(" -s [seconds] Move only messages whose qf file is older than seconds.\n");
print("Usage:\t$0 [options] directory source ...\n");
print("\t$0 [-Q][-d|-b] source ...\n");
print("Options:\n");
print("\t-b\t\tBounce the messages specified by source.\n");
print("\t-C configfile\tSpecify sendmail config file.\n");
print("\t-d\t\tDelete the messages specified by source.\n");
print("\t-e [perl expression]\n");
print("\t\t\tMove only messages for which perl expression\n");
print("\t\t\treturns true.\n");
print("\t-Q\t\tOperate on quarantined files.\n");
print("\t-s [seconds]\tMove only messages whose queue file is older\n");
print("\t\t\tthan seconds.\n");
}
##
@ -204,10 +250,10 @@ sub add_source
$data_dir_name = $source_dir_name;
$source_prefix = substr($source_base_name, 0, 2);
if (!-d $source_name && $source_prefix ne 'qf' &&
if (!-d $source_name && $source_prefix ne $qprefix &&
$source_prefix ne 'df')
{
$source_base_name = "qf$source_base_name";
$source_base_name = "$qprefix$source_base_name";
$source_name = File::Spec->catfile("$source_dir_name",
"$source_base_name");
}
@ -216,12 +262,16 @@ sub add_source
if (!-e $source_name)
{
$source_name = File::Spec->catfile("$source_dir_name", "qf",
"qf$source_id");
"$qprefix$source_id");
if (!-e $source_name)
{
return "'$source_name' does not exist";
}
$data_dir_name = File::Spec->catfile("$source_dir_name", "df");
if (!-d $data_dir_name)
{
$data_dir_name = $source_dir_name;
}
$source_dir_name = File::Spec->catfile("$source_dir_name",
"qf");
}
@ -377,7 +427,7 @@ sub initialize
my $queue_dir = shift;
$self->{id} = shift;
$self->{file_name} = $queue_dir . '/qf' . $self->{id};
$self->{file_name} = $queue_dir . '/' . $qprefix . $self->{id};
$self->{headers} = {};
}
@ -402,9 +452,11 @@ sub parse
'B' => 'body_type',
'C' => 'controlling_user',
'D' => 'data_file_name',
'd' => 'data_file_directory',
'E' => 'error_recipient',
'F' => 'flags',
'H' => 'parse_header',
'G' => 'queue_delay',
'I' => 'inode_number',
'K' => 'next_delivery_time',
'L' => 'content-length',
@ -413,11 +465,14 @@ sub parse
'P' => 'priority',
'Q' => 'original_recipient',
'R' => 'recipient',
'q' => 'quarantine_reason',
'r' => 'final_recipient',
'S' => 'sender',
'T' => 'creation_time',
'V' => 'version',
'X' => 'charset',
'Y' => 'current_delay',
'Z' => 'envid',
'!' => 'deliver_by',
'$' => 'macro'
);
my $line;
@ -488,7 +543,7 @@ sub parse_header
if (ref($headers->{$last_header}) eq 'ARRAY')
{
$headers->{$last_header}[-1] =
$headers->{$last_header}[-1] . $line;
$headers->{$last_header}[-1] . $line;
}
else
{
@ -621,10 +676,21 @@ sub new
sub initialize
{
my $self = shift;
my $queue_dir = shift;
my $data_dir = shift;
$self->{id} = shift;
my $control_file = shift;
$self->{file_name} = $queue_dir . '/df' . $self->{id};
$self->{file_name} = $data_dir . '/df' . $self->{id};
return if -e $self->{file_name};
$control_file->parse();
return if !defined $control_file->{data_file_directory};
$data_dir = $queue_root . '/' . $control_file->{data_file_directory};
chomp $data_dir;
if (-d ($data_dir . '/df'))
{
$data_dir .= '/df';
}
$self->{file_name} = $data_dir . '/df' . $self->{id};
}
sub do_stat
@ -694,14 +760,11 @@ sub initialize
$self->{id} = $id;
$self->{control_file} = new ControlFile($queue_dir, $id);
if ($data_dir)
if (!$data_dir)
{
$self->{data_file} = new DataFile($data_dir, $id);
}
else
{
$self->{data_file} = new DataFile($queue_dir, $id);
$data_dir = $queue_dir;
}
$self->{data_file} = new DataFile($data_dir, $id, $self->{control_file});
}
sub last_modified_time
@ -780,7 +843,7 @@ sub move
$df_dest = $destination;
}
if (-e File::Spec->catfile($qf_dest, "qf$self->{id}"))
if (-e File::Spec->catfile($qf_dest, "$qprefix$self->{id}"))
{
$result = "There is already a queued message with id '$self->{id}' in '$destination'";
}
@ -884,7 +947,8 @@ sub initialize
## READ - Loads the queue with all of the objects that reside in it.
##
## This reads the queue's directory and creates QueuedMessage objects
## for every file in the queue that starts with 'qf'.
## for every file in the queue that starts with 'qf' or 'hf'
## (depending on the -Q option).
##
sub read
@ -920,7 +984,7 @@ sub read
return "Unable to open directory '$control_dir'";
}
@control_files = grep { /^qf.*/ && -f "$control_dir/$_" } readdir(QUEUE_DIR);
@control_files = grep { /^$qprefix.*/ && -f "$control_dir/$_" } readdir(QUEUE_DIR);
closedir(QUEUE_DIR);
foreach $file_name (@control_files)
{

View File

@ -1,4 +1,4 @@
# $Id: Makefile,v 8.7.8.4 2001/07/01 18:34:56 gshapiro Exp $
# $Id: Makefile,v 8.14 2002/01/07 22:24:36 gshapiro Exp $
DIR= smm/08.sendmailop
SRCS= op.me
@ -8,12 +8,14 @@ ROFF_CMD= groff
PIC_CMD= pic
EQN_CMD= eqn
UL_CMD= ul
PS2PDF_CMD= ps2pdf
PIC= ${PIC_CMD} -C
EQNASCII= ${EQN_CMD} -C -Tascii
EQNPS= ${EQN_CMD} -C -Tps
ROFFASCII= ${ROFF_CMD} -Tascii ${MACROS}
ROFFPS= ${ROFF_CMD} -Tps -mps ${MACROS}
ULASCII= ${UL_CMD} -t dumb
PS2PDF= ${PS2PDF_CMD}
all: ${OBJS}
@ -25,7 +27,11 @@ op.txt: ${SRCS}
rm -f $@
${PIC} ${SRCS} | ${EQNASCII} | ${ROFFASCII} | ${ULASCII} > $@
op.pdf: op.ps
rm -f $@
${PS2PDF} op.ps op.pdf
clean:
rm -f op.ps op.txt
rm -f op.ps op.txt op.pdf
install: ${OBJS}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,17 @@
# $Id: Makefile,v 1.1 2000/08/31 16:19:25 ca Exp $
SHELL= /bin/sh
BUILD= ./Build
OPTIONS= $(CONFIG) $(FLAGS)
all: FRC
$(SHELL) $(BUILD) $(OPTIONS) $@
clean: FRC
$(SHELL) $(BUILD) $(OPTIONS) $@
install: FRC
$(SHELL) $(BUILD) $(OPTIONS) $@
fresh: FRC
$(SHELL) $(BUILD) $(OPTIONS) -c
FRC:

View File

@ -0,0 +1,22 @@
include(confBUILDTOOLSDIR`/M4/switch.m4')
define(`confREQUIRE_LIBSM', `true')
# sendmail dir
SMSRCDIR= ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
PREPENDDEF(`confENVDEF', `confMAPDEF')
PREPENDDEF(`confINCDIRS', `-I${SMSRCDIR} ')
bldPRODUCT_START(`executable', `editmap')
define(`bldSOURCES', `editmap.c ')
define(`bldINSTALL_DIR', `S')
bldPUSH_SMLIB(`sm')
bldPUSH_SMLIB(`smutil')
bldPUSH_SMLIB(`smdb')
APPENDDEF(`confENVDEF', `-DNOT_SENDMAIL')
bldPRODUCT_END
bldPRODUCT_START(`manpage', `editmap')
define(`bldSOURCES', `editmap.8')
bldPRODUCT_END
bldFINISH

View File

@ -0,0 +1,106 @@
.\" Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
.\" All rights reserved.
.\"
.\" By using this file, you agree to the terms and conditions set
.\" forth in the LICENSE file which can be found at the top level of
.\" the sendmail distribution.
.\"
.\"
.\" $Id: editmap.8,v 1.8 2001/06/15 21:33:19 ca Exp $
.\"
.TH EDITMAP 8 "$Date: 2001/06/15 21:33:19 $"
.SH NAME
.B editmap
\- query and edit single records in database maps for sendmail
.SH SYNOPSIS
.B editmap
.RB [ \-C
.IR file ]
.RB [ \-N ]
.RB [ \-f ]
.RB [ \-q|\-u|\-x ]
maptype mapname
key [ "value ..." ]
.SH DESCRIPTION
.B Editmap
queries or edits one record in a 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.
.PP
Depending on how it is compiled,
.B editmap
handles up to three different database formats,
selected using the
.I maptype
parameter.
They may be
.TP
dbm
DBM format maps.
This requires the
ndbm(3)
library.
.TP
btree
B-Tree format maps.
This requires the new Berkeley DB
library.
.TP
hash
Hash format maps.
This also requires the Berkeley DB
library.
.PP
If the
.I TrustedUser
option is set in the sendmail configuration file and
.B editmap
is invoked as root, the generated files will be owned by
the specified
.IR TrustedUser.
.SS Flags
.TP
.B \-C
Use the specified
.B sendmail
configuration file for looking up the TrustedUser option.
.TP
.B \-N
Include the null byte that terminates strings
in the map (for alias maps).
.TP
.B \-f
Normally all upper case letters in the key
are folded to lower case.
This flag disables that behaviour.
This is intended to mesh with the
\-f flag in the
.B K
line in sendmail.cf.
The value is never case folded.
.TP
.B \-q
Query the map for the specified key. If found, print value to standard
output and exit with 0. If not found then print an error
message to stdout and exit with EX_UNAVAILABLE.
.TP
.B \-u
Update the record for
.I key
with
.I value
or inserts a new record if one doesn't exist. Exits with 0 on success
or EX_IOERR on failure.
.TP
.B \-x
Deletes the specific key from the map. Exits with 0 on success or
EX_IOERR on failure.
.TP
.SH SEE ALSO
sendmail(8),
makemap(8)
.SH HISTORY
The
.B editmap
command has no history.

View File

@ -0,0 +1,420 @@
/*
* Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1992 Eric P. Allman. All rights reserved.
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
*/
#include <sm/gen.h>
#ifndef lint
SM_UNUSED(static char copyright[]) =
"@(#) Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.\n\
All rights reserved.\n\
Copyright (c) 1992 Eric P. Allman. All rights reserved.\n\
Copyright (c) 1992, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* ! lint */
#ifndef lint
SM_UNUSED(static char id[]) = "@(#)$Id: editmap.c,v 1.22 2002/01/11 23:52:27 gshapiro Exp $";
#endif /* ! lint */
#include <sys/types.h>
#ifndef ISC_UNIX
# include <sys/file.h>
#endif /* ! ISC_UNIX */
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
#ifdef EX_OK
# undef EX_OK /* unistd.h may have another use for this */
#endif /* EX_OK */
#include <sysexits.h>
#include <assert.h>
#include <sendmail/sendmail.h>
#include <sendmail/pathnames.h>
#include <libsmdb/smdb.h>
uid_t RealUid;
gid_t RealGid;
char *RealUserName;
uid_t RunAsUid;
uid_t RunAsGid;
char *RunAsUserName;
int Verbose = 2;
bool DontInitGroups = false;
uid_t TrustedUid = 0;
BITMAP256 DontBlameSendmail;
#define BUFSIZE 1024
#define ISSEP(c) (isascii(c) && isspace(c))
static void
usage(progname)
char *progname;
{
fprintf(stderr,
"Usage: %s [-C cffile] [-N] [-f] [-q|-u|-x] maptype mapname key [ \"value ...\" ]\n",
progname);
exit(EX_USAGE);
}
int
main(argc, argv)
int argc;
char **argv;
{
char *progname;
char *cfile;
bool verbose = false;
bool query = false;
bool update = false;
bool remove = false;
bool inclnull = false;
bool foldcase = true;
unsigned int nops = 0;
int exitstat;
int opt;
char *typename = NULL;
char *mapname = NULL;
char *keyname = NULL;
char *value = NULL;
int mode;
int smode;
int putflags = 0;
long sff = SFF_ROOTOK|SFF_REGONLY;
struct passwd *pw;
SMDB_DATABASE *database;
SMDB_DBENT db_key, db_val;
SMDB_DBPARAMS params;
SMDB_USER_INFO user_info;
#if HASFCHOWN
FILE *cfp;
char buf[MAXLINE];
#endif /* HASFCHOWN */
static char rnamebuf[MAXNAME]; /* holds RealUserName */
extern char *optarg;
extern int optind;
memset(&params, '\0', sizeof params);
params.smdbp_cache_size = 1024 * 1024;
progname = strrchr(argv[0], '/');
if (progname != NULL)
progname++;
else
progname = argv[0];
cfile = _PATH_SENDMAILCF;
clrbitmap(DontBlameSendmail);
RunAsUid = RealUid = getuid();
RunAsGid = RealGid = getgid();
pw = getpwuid(RealUid);
if (pw != NULL)
(void) sm_strlcpy(rnamebuf, pw->pw_name, sizeof rnamebuf);
else
(void) sm_snprintf(rnamebuf, sizeof rnamebuf,
"Unknown UID %d", (int) RealUid);
RunAsUserName = RealUserName = rnamebuf;
user_info.smdbu_id = RunAsUid;
user_info.smdbu_group_id = RunAsGid;
(void) sm_strlcpy(user_info.smdbu_name, RunAsUserName,
SMDB_MAX_USER_NAME_LEN);
#define OPTIONS "C:fquxvN"
while ((opt = getopt(argc, argv, OPTIONS)) != -1)
{
switch (opt)
{
case 'C':
cfile = optarg;
break;
case 'f':
foldcase = false;
break;
case 'q':
query = true;
nops++;
break;
case 'u':
update = true;
nops++;
break;
case 'x':
remove = true;
nops++;
break;
case 'v':
verbose = true;
break;
case 'N':
inclnull = true;
break;
default:
usage(progname);
assert(0); /* NOTREACHED */
}
}
if (!bitnset(DBS_WRITEMAPTOSYMLINK, DontBlameSendmail))
sff |= SFF_NOSLINK;
if (!bitnset(DBS_WRITEMAPTOHARDLINK, DontBlameSendmail))
sff |= SFF_NOHLINK;
if (!bitnset(DBS_LINKEDMAPINWRITABLEDIR, DontBlameSendmail))
sff |= SFF_NOWLINK;
argc -= optind;
argv += optind;
if ((nops != 1) ||
(query && argc != 3) ||
(remove && argc != 3) ||
(update && argc <= 3))
{
usage(progname);
assert(0); /* NOTREACHED */
}
typename = argv[0];
mapname = argv[1];
keyname = argv[2];
if (update)
value = argv[3];
if (foldcase)
{
char *p;
for (p = keyname; *p != '\0'; p++)
{
if (isascii(*p) && isupper(*p))
*p = tolower(*p);
}
}
#if HASFCHOWN
/* Find TrustedUser value in sendmail.cf */
if ((cfp = fopen(cfile, "r")) == NULL)
{
fprintf(stderr, "%s: %s: %s\n", progname,
cfile, sm_errstring(errno));
exit(EX_NOINPUT);
}
while (fgets(buf, sizeof(buf), cfp) != NULL)
{
register char *b;
if ((b = strchr(buf, '\n')) != NULL)
*b = '\0';
b = buf;
switch (*b++)
{
case 'O': /* option */
if (strncasecmp(b, " TrustedUser", 12) == 0 &&
!(isascii(b[12]) && isalnum(b[12])))
{
b = strchr(b, '=');
if (b == NULL)
continue;
while (isascii(*++b) && isspace(*b))
continue;
if (isascii(*b) && isdigit(*b))
TrustedUid = atoi(b);
else
{
TrustedUid = 0;
pw = getpwnam(b);
if (pw == NULL)
fprintf(stderr,
"TrustedUser: unknown user %s\n", b);
else
TrustedUid = pw->pw_uid;
}
# ifdef UID_MAX
if (TrustedUid > UID_MAX)
{
fprintf(stderr,
"TrustedUser: uid value (%ld) > UID_MAX (%ld)",
(long) TrustedUid,
(long) UID_MAX);
TrustedUid = 0;
}
# endif /* UID_MAX */
break;
}
default:
continue;
}
}
(void) fclose(cfp);
#endif /* HASFCHOWN */
if (query)
{
mode = O_RDONLY;
smode = S_IRUSR;
}
else
{
mode = O_RDWR | O_CREAT;
sff |= SFF_CREAT|SFF_NOTEXCL;
smode = S_IWUSR;
}
params.smdbp_num_elements = 4096;
errno = smdb_open_database(&database, mapname, mode, smode, sff,
typename, &user_info, &params);
if (errno != SMDBE_OK)
{
char *hint;
if (errno == SMDBE_UNSUPPORTED_DB_TYPE &&
(hint = smdb_db_definition(typename)) != NULL)
fprintf(stderr,
"%s: Need to recompile with -D%s for %s support\n",
progname, hint, typename);
else
fprintf(stderr,
"%s: error opening type %s map %s: %s\n",
progname, typename, mapname,
sm_errstring(errno));
exit(EX_CANTCREAT);
}
(void) database->smdb_sync(database, 0);
if (geteuid() == 0 && TrustedUid != 0)
{
errno = database->smdb_set_owner(database, TrustedUid, -1);
if (errno != SMDBE_OK)
{
fprintf(stderr,
"WARNING: ownership change on %s failed %s",
mapname, sm_errstring(errno));
}
}
exitstat = EX_OK;
if (query)
{
memset(&db_key, '\0', sizeof db_key);
memset(&db_val, '\0', sizeof db_val);
db_key.data = keyname;
db_key.size = strlen(keyname);
if (inclnull)
db_key.size++;
errno = database->smdb_get(database, &db_key, &db_val, 0);
if (errno != SMDBE_OK)
{
/* XXX - Need to distinguish between not found */
fprintf(stderr,
"%s: couldn't find key %s in map %s\n",
progname, keyname, mapname);
exitstat = EX_UNAVAILABLE;
}
else
{
printf("%.*s\n", (int) db_val.size,
(char *) db_val.data);
}
}
else if (update)
{
memset(&db_key, '\0', sizeof db_key);
memset(&db_val, '\0', sizeof db_val);
db_key.data = keyname;
db_key.size = strlen(keyname);
if (inclnull)
db_key.size++;
db_val.data = value;
db_val.size = strlen(value);
if (inclnull)
db_val.size++;
errno = database->smdb_put(database, &db_key, &db_val,
putflags);
if (errno != SMDBE_OK)
{
fprintf(stderr,
"%s: error updating (%s, %s) in map %s: %s\n",
progname, keyname, value, mapname,
sm_errstring(errno));
exitstat = EX_IOERR;
}
}
else if (remove)
{
memset(&db_key, '\0', sizeof db_key);
memset(&db_val, '\0', sizeof db_val);
db_key.data = keyname;
db_key.size = strlen(keyname);
if (inclnull)
db_key.size++;
errno = database->smdb_del(database, &db_key, 0);
switch (errno)
{
case SMDBE_NOT_FOUND:
fprintf(stderr,
"%s: key %s doesn't exist in map %s\n",
progname, keyname, mapname);
/* Don't set exitstat */
break;
case SMDBE_OK:
/* All's well */
break;
default:
fprintf(stderr,
"%s: couldn't remove key %s in map %s (error)\n",
progname, keyname, mapname);
exitstat = EX_IOERR;
break;
}
}
else
{
assert(0); /* NOT REACHED */
}
/*
** Now close the database.
*/
errno = database->smdb_close(database);
if (errno != SMDBE_OK)
{
fprintf(stderr, "%s: close(%s): %s\n",
progname, mapname, sm_errstring(errno));
exitstat = EX_IOERR;
}
smdb_free_database(database);
exit(exitstat);
/* NOTREACHED */
return exitstat;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999-2000 Sendmail, Inc. and its suppliers.
* Copyright (c) 1999-2001 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.13.4.12 2000/09/09 02:11:48 ca Exp $
* $Id: mfapi.h,v 8.35 2001/10/09 19:05:24 gshapiro Exp $
*/
/*
@ -17,13 +17,14 @@
#ifndef _LIBMILTER_MFAPI_H
# define _LIBMILTER_MFAPI_H 1
# define LIBMILTER_API extern
# include <sys/socket.h>
# include "libmilter/mfdef.h"
# define LIBMILTER_API extern
# include <sys/types.h>
#ifndef _SOCK_ADDR
# include <sys/socket.h>
# define _SOCK_ADDR struct sockaddr
#endif /* ! _SOCK_ADDR */
@ -42,24 +43,6 @@ typedef struct smfi_str *SMFICTX_PTR;
typedef struct smfiDesc smfiDesc_str;
typedef struct smfiDesc *smfiDesc_ptr;
#define SMFI_VERSION 2 /* version number */
/*
** What the filter might do -- values to be ORed together for
** smfiDesc.xxfi_flags.
*/
#define SMFIF_ADDHDRS 0x00000001L /* filter may add headers */
#define SMFIF_CHGBODY 0x00000002L /* filter may replace body */
#define SMFIF_MODBODY SMFIF_CHGBODY /* backwards compatible */
#define SMFIF_ADDRCPT 0x00000004L /* filter may add recipients */
#define SMFIF_DELRCPT 0x00000008L /* filter may delete recipients */
#define SMFIF_CHGHDRS 0x00000010L /* filter may change/delete headers */
#define SMFI_V1_ACTS 0x0000000FL /* The actions of V1 filter */
#define SMFI_V2_ACTS 0x0000001FL /* The actions of V2 filter */
#define SMFI_CURR_ACTS SMFI_V2_ACTS /* The current version */
/*
** Type which callbacks should return to indicate message status.
** This may take on one of the SMFIS_* values listed below.
@ -67,10 +50,6 @@ typedef struct smfiDesc *smfiDesc_ptr;
typedef int sfsistat;
/*
** structure describing one milter
*/
#if defined(__linux__) && defined(__GNUC__) && defined(__cplusplus) && __GNUC_MINOR__ >= 8
# define SM__P(X) __PMT(X)
#else /* __linux__ && __GNUC__ && __cplusplus && _GNUC_MINOR__ >= 8 */
@ -86,11 +65,15 @@ typedef int sfsistat;
# endif /* __STDC__ */
#endif /* __P */
/*
** structure describing one milter
*/
struct smfiDesc
{
char *xxfi_name; /* filter name */
int xxfi_version; /* version code -- do not change */
u_long xxfi_flags; /* flags */
unsigned long xxfi_flags; /* flags */
/* connection info filter */
sfsistat (*xxfi_connect) SM__P((SMFICTX *, char *, _SOCK_ADDR *));
@ -111,7 +94,7 @@ struct smfiDesc
sfsistat (*xxfi_eoh) SM__P((SMFICTX *));
/* body block */
sfsistat (*xxfi_body) SM__P((SMFICTX *, u_char *, size_t));
sfsistat (*xxfi_body) SM__P((SMFICTX *, unsigned char *, size_t));
/* end of message */
sfsistat (*xxfi_eom) SM__P((SMFICTX *));
@ -130,6 +113,24 @@ LIBMILTER_API int smfi_settimeout __P((int));
LIBMILTER_API int smfi_setconn __P((char *));
LIBMILTER_API int smfi_stop __P((void));
#define SMFI_VERSION 2 /* version number */
/*
** What the filter might do -- values to be ORed together for
** smfiDesc.xxfi_flags.
*/
#define SMFIF_NONE 0x00000000L /* no flags */
#define SMFIF_ADDHDRS 0x00000001L /* filter may add headers */
#define SMFIF_CHGBODY 0x00000002L /* filter may replace body */
#define SMFIF_MODBODY SMFIF_CHGBODY /* backwards compatible */
#define SMFIF_ADDRCPT 0x00000004L /* filter may add recipients */
#define SMFIF_DELRCPT 0x00000008L /* filter may delete recipients */
#define SMFIF_CHGHDRS 0x00000010L /* filter may change/delete headers */
#if _FFR_QUARANTINE
# define SMFIF_QUARANTINE 0x00000020L /* filter may quarantine envelope */
#endif /* _FFR_QUARANTINE */
/*
** Continue processing message/connection.
*/
@ -244,14 +245,14 @@ extern sfsistat xxfi_eoh __P((SMFICTX *));
*/
/* body block */
extern sfsistat xxfi_body __P((SMFICTX *, u_char *, size_t));
extern sfsistat xxfi_body __P((SMFICTX *, unsigned char *, size_t));
/*
** xxfi_body(ctx, bodyp, bodylen) Invoked for each body chunk. There may
** be multiple body chunks passed to the filter. End-of-lines are
** represented as received from SMTP (normally Carriage-Return/Line-Feed).
**
** u_char *bodyp; Pointer to body data
** unsigned char *bodyp; Pointer to body data
** size_t bodylen; Length of body data
*/
@ -305,6 +306,15 @@ LIBMILTER_API char * smfi_getsymval __P((SMFICTX *, char *));
LIBMILTER_API int smfi_setreply __P((SMFICTX *, char *, char *, char *));
#if _FFR_MULTILINE
/*
** Alternatively, smfi_setmlreply can be called if a multi-line SMTP reply
** is needed.
*/
LIBMILTER_API int smfi_setmlreply __P((SMFICTX *, const char *, const char *, ...));
#endif /* _FFR_MULTILINE */
/*
** Set the specific reply code to be used in response to the active
** command. If not specified, a generic reply code is used.
@ -370,7 +380,7 @@ LIBMILTER_API int smfi_delrcpt __P((SMFICTX *, char *));
** not be deleted.
*/
LIBMILTER_API int smfi_replacebody __P((SMFICTX *, u_char *, int));
LIBMILTER_API int smfi_replacebody __P((SMFICTX *, unsigned char *, int));
/*
** Replace the body of the message. This routine may be called multiple
@ -387,6 +397,16 @@ LIBMILTER_API int smfi_replacebody __P((SMFICTX *, u_char *, int));
** xxfi_abort is called. This can be used to reset state.
*/
#if _FFR_QUARANTINE
/*
** Quarantine an envelope
**
** SMFICTX *ctx; Opaque context structure
** char *reason: explanation
*/
LIBMILTER_API int smfi_quarantine __P((SMFICTX *ctx, char *reason));
#endif /* _FFR_QUARANTINE */
/*
** Connection-private data (specific to an SMTP connection) can be

View File

@ -0,0 +1,84 @@
/*
* Copyright (c) 1999-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
*
* $Id: mfdef.h,v 8.11 2001/09/12 18:02:19 gshapiro Exp $
*/
/*
** mfdef.h -- Global definitions for mail filter and MTA.
*/
#ifndef _LIBMILTER_MFDEF_H
# define _LIBMILTER_MFDEF_H 1
/* Shared protocol constants */
# define MILTER_LEN_BYTES 4 /* length of 32 bit integer in bytes */
# define MILTER_OPTLEN (MILTER_LEN_BYTES * 3) /* length of options */
# define MILTER_CHUNK_SIZE 65535 /* body chunk size */
/* These apply to SMFIF_* flags */
#define SMFI_V1_ACTS 0x0000000FL /* The actions of V1 filter */
#if _FFR_QUARANTINE
# define SMFI_V2_ACTS 0x0000003FL /* The actions of V2 filter */
#else /* _FFR_QUARANTINE */
# define SMFI_V2_ACTS 0x0000001FL /* The actions of V2 filter */
#endif /* _FFR_QUARANTINE */
#define SMFI_CURR_ACTS SMFI_V2_ACTS /* The current version */
/* address families */
# define SMFIA_UNKNOWN 'U' /* unknown */
# define SMFIA_UNIX 'L' /* unix/local */
# define SMFIA_INET '4' /* inet */
# define SMFIA_INET6 '6' /* inet6 */
/* commands: don't use anything smaller than ' ' */
# define SMFIC_ABORT 'A' /* Abort */
# define SMFIC_BODY 'B' /* Body chunk */
# define SMFIC_CONNECT 'C' /* Connection information */
# define SMFIC_MACRO 'D' /* Define macro */
# define SMFIC_BODYEOB 'E' /* final body chunk (End) */
# define SMFIC_HELO 'H' /* HELO/EHLO */
# define SMFIC_HEADER 'L' /* Header */
# define SMFIC_MAIL 'M' /* MAIL from */
# define SMFIC_EOH 'N' /* EOH */
# define SMFIC_OPTNEG 'O' /* Option negotiation */
# define SMFIC_QUIT 'Q' /* QUIT */
# define SMFIC_RCPT 'R' /* RCPT to */
/* actions (replies) */
# define SMFIR_ADDRCPT '+' /* add recipient */
# define SMFIR_DELRCPT '-' /* remove recipient */
# define SMFIR_ACCEPT 'a' /* accept */
# define SMFIR_REPLBODY 'b' /* replace body (chunk) */
# define SMFIR_CONTINUE 'c' /* continue */
# define SMFIR_DISCARD 'd' /* discard */
# define SMFIR_CHGHEADER 'm' /* change header */
# define SMFIR_PROGRESS 'p' /* progress */
# define SMFIR_REJECT 'r' /* reject */
# define SMFIR_TEMPFAIL 't' /* tempfail */
# define SMFIR_ADDHEADER 'h' /* add header */
# define SMFIR_REPLYCODE 'y' /* reply code etc */
# if _FFR_QUARANTINE
# define SMFIR_QUARANTINE 'q' /* quarantine */
# endif /* _FFR_QUARANTINE */
/* What the MTA can send/filter wants in protocol */
# define SMFIP_NOCONNECT 0x00000001L /* MTA should not send connect info */
# define SMFIP_NOHELO 0x00000002L /* MTA should not send HELO info */
# define SMFIP_NOMAIL 0x00000004L /* MTA should not send MAIL info */
# define SMFIP_NORCPT 0x00000008L /* MTA should not send RCPT info */
# define SMFIP_NOBODY 0x00000010L /* MTA should not send body */
# define SMFIP_NOHDRS 0x00000020L /* MTA should not send headers */
# define SMFIP_NOEOH 0x00000040L /* MTA should not send EOH */
# define SMFI_V1_PROT 0x0000003FL /* The protocol of V1 filter */
# define SMFI_V2_PROT 0x0000007FL /* The protocol of V2 filter */
# define SMFI_CURR_PROT SMFI_V2_PROT /* The current version */
#endif /* !_LIBMILTER_MFDEF_H */

View File

@ -7,70 +7,18 @@
* the sendmail distribution.
*
*
* $Id: milter.h,v 8.24.16.10 2001/07/20 04:19:35 gshapiro Exp $
* $Id: milter.h,v 8.35 2001/06/27 21:46:44 gshapiro Exp $
*/
/*
** MILTER.H -- Global definitions for mail filter and MTA.
** MILTER.H -- Global definitions for mail filter.
*/
#ifndef _LIBMILTER_MILTER_H
# define _LIBMILTER_MILTER_H 1
#include "libmilter/mfapi.h"
#include "sendmail.h"
/* Shared protocol constants */
# define MILTER_LEN_BYTES 4 /* length of 32 bit integer in bytes */
# define MILTER_OPTLEN (MILTER_LEN_BYTES * 3) /* length of options */
# define MILTER_CHUNK_SIZE 65535 /* body chunk size */
/* address families */
# define SMFIA_UNKNOWN 'U' /* unknown */
# define SMFIA_UNIX 'L' /* unix/local */
# define SMFIA_INET '4' /* inet */
# define SMFIA_INET6 '6' /* inet6 */
/* commands: don't use anything smaller than ' ' */
# define SMFIC_ABORT 'A' /* Abort */
# define SMFIC_BODY 'B' /* Body chunk */
# define SMFIC_CONNECT 'C' /* Connection information */
# define SMFIC_MACRO 'D' /* Define macro */
# define SMFIC_BODYEOB 'E' /* final body chunk (End) */
# define SMFIC_HELO 'H' /* HELO/EHLO */
# define SMFIC_HEADER 'L' /* Header */
# define SMFIC_MAIL 'M' /* MAIL from */
# define SMFIC_EOH 'N' /* EOH */
# define SMFIC_OPTNEG 'O' /* Option negotiation */
# define SMFIC_QUIT 'Q' /* QUIT */
# define SMFIC_RCPT 'R' /* RCPT to */
/* actions (replies) */
# define SMFIR_ADDRCPT '+' /* add recipient */
# define SMFIR_DELRCPT '-' /* remove recipient */
# define SMFIR_ACCEPT 'a' /* accept */
# define SMFIR_REPLBODY 'b' /* replace body (chunk) */
# define SMFIR_CONTINUE 'c' /* continue */
# define SMFIR_DISCARD 'd' /* discard */
# define SMFIR_CHGHEADER 'm' /* change header */
# define SMFIR_PROGRESS 'p' /* progress */
# define SMFIR_REJECT 'r' /* reject */
# define SMFIR_TEMPFAIL 't' /* tempfail */
# define SMFIR_ADDHEADER 'h' /* add header */
# define SMFIR_REPLYCODE 'y' /* reply code etc */
/* What the MTA can send/filter wants in protocol */
# define SMFIP_NOCONNECT 0x00000001L /* MTA should not send connect info */
# define SMFIP_NOHELO 0x00000002L /* MTA should not send HELO info */
# define SMFIP_NOMAIL 0x00000004L /* MTA should not send MAIL info */
# define SMFIP_NORCPT 0x00000008L /* MTA should not send RCPT info */
# define SMFIP_NOBODY 0x00000010L /* MTA should not send body */
# define SMFIP_NOHDRS 0x00000020L /* MTA should not send headers */
# define SMFIP_NOEOH 0x00000040L /* MTA should not send EOH */
# define SMFI_V1_PROT 0x0000003FL /* The protocol of V1 filter */
# define SMFI_V2_PROT 0x0000007FL /* The protocol of V2 filter */
# define SMFI_CURR_PROT SMFI_V2_PROT /* The current version */
#include "libmilter/mfapi.h"
/* socket and thread portability */
# include <pthread.h>
@ -97,7 +45,7 @@ struct smfi_str
time_t ctx_timeout; /* timeout */
int ctx_state; /* state */
smfiDesc_ptr ctx_smfi; /* filter description */
u_long ctx_pflags; /* protocol flags */
unsigned long ctx_pflags; /* protocol flags */
char **ctx_mac_ptr[MAX_MACROS_ENTRIES];
char *ctx_mac_buf[MAX_MACROS_ENTRIES];
char *ctx_reply; /* reply code */

View File

@ -1,28 +1,22 @@
/*
** Copyright (c) 1999-2000 Sendmail, Inc. and its suppliers.
** All rights reserved.
**
** By using this file, you agree to the terms and conditions set
** forth in the LICENSE file which can be found at the top level of
** the sendmail distribution.
**
** $Id: smdb.h,v 8.29.2.1.2.2 2000/10/05 22:23:55 gshapiro Exp $
*/
* Copyright (c) 1999-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: smdb.h,v 8.38 2001/11/19 19:30:03 gshapiro Exp $
*
*/
#ifndef _SMDB_H_
# define _SMDB_H_
# include <sys/types.h>
# include <sys/stat.h>
# ifndef __P
# include "sendmail/cdefs.h"
# endif /* __P */
# ifndef NDBM
# ifndef NEWDB
ERROR NDBM or NEWDB must be defined.
# endif /* ! NEWDB */
# endif /* ! NDBM */
# include <sm/gen.h>
# include <sm/errstring.h>
# ifdef NDBM
# include <ndbm.h>
@ -36,28 +30,28 @@ ERROR NDBM or NEWDB must be defined.
# endif /* NEWDB */
/*
** Some size constants
** Some size constants
*/
#define SMDB_MAX_USER_NAME_LEN 1024
#define SMDB_MAX_NAME_LEN 1024
/*
** This file defines the abstraction for database lookups. It is pretty
** much a copy of the db2 interface with the exception that every function
** returns 0 on success and non-zero on failure. The non-zero return code
** is meaningful.
** This file defines the abstraction for database lookups. It is pretty
** much a copy of the db2 interface with the exception that every function
** returns 0 on success and non-zero on failure. The non-zero return code
** is meaningful.
**
** I'm going to put the function comments in this file since the interface
** MUST be the same for all inheritors of this interface.
** I'm going to put the function comments in this file since the interface
** MUST be the same for all inheritors of this interface.
*/
typedef struct database_struct SMDB_DATABASE;
typedef struct cursor_struct SMDB_CURSOR;
typedef struct entry_struct SMDB_DBENT;
/*
** DB_CLOSE_FUNC -- close the database
** DB_CLOSE_FUNC -- close the database
**
** Parameters:
** db -- The database to close.
@ -66,12 +60,11 @@ typedef struct entry_struct SMDB_DBENT;
** 0 - Success, otherwise errno.
**
*/
typedef int (*db_close_func) __P((SMDB_DATABASE *db));
/*
** DB_DEL_FUNC -- removes a key and data pair from the database
** DB_DEL_FUNC -- removes a key and data pair from the database
**
** Parameters:
** db -- The database to close.
@ -83,13 +76,12 @@ typedef int (*db_close_func) __P((SMDB_DATABASE *db));
** 0 - Success, otherwise errno.
**
*/
typedef int (*db_del_func) __P((SMDB_DATABASE *db,
SMDB_DBENT *key, u_int flags));
SMDB_DBENT *key, unsigned int flags));
/*
** DB_FD_FUNC -- Returns a pointer to a file used for the database.
** DB_FD_FUNC -- Returns a pointer to a file used for the database.
**
** Parameters:
** db -- The database to close.
@ -99,12 +91,11 @@ typedef int (*db_del_func) __P((SMDB_DATABASE *db,
** 0 - Success, otherwise errno.
**
*/
typedef int (*db_fd_func) __P((SMDB_DATABASE *db, int* fd));
/*
** DB_GET_FUNC -- Gets the data associated with a key.
** DB_GET_FUNC -- Gets the data associated with a key.
**
** Parameters:
** db -- The database to close.
@ -117,14 +108,13 @@ typedef int (*db_fd_func) __P((SMDB_DATABASE *db, int* fd));
** 0 - Success, otherwise errno.
**
*/
typedef int (*db_get_func) __P((SMDB_DATABASE *db,
SMDB_DBENT *key,
SMDB_DBENT *data, u_int flags));
SMDB_DBENT *data, unsigned int flags));
/*
** DB_PUT_FUNC -- Sets some data according to the key.
** DB_PUT_FUNC -- Sets some data according to the key.
**
** Parameters:
** db -- The database to close.
@ -139,13 +129,13 @@ typedef int (*db_get_func) __P((SMDB_DATABASE *db,
** 0 - Success, otherwise errno.
**
*/
typedef int (*db_put_func) __P((SMDB_DATABASE *db,
SMDB_DBENT *key,
SMDB_DBENT *data, u_int flags));
SMDB_DBENT *data, unsigned int flags));
/*
** DB_SYNC_FUNC -- Flush any cached information to disk.
** DB_SYNC_FUNC -- Flush any cached information to disk.
**
** Parameters:
** db -- The database to sync.
@ -155,11 +145,11 @@ typedef int (*db_put_func) __P((SMDB_DATABASE *db,
** 0 - Success, otherwise errno.
**
*/
typedef int (*db_sync_func) __P((SMDB_DATABASE *db, u_int flags));
typedef int (*db_sync_func) __P((SMDB_DATABASE *db, unsigned int flags));
/*
** DB_SET_OWNER_FUNC -- Set the owner and group of the database files.
** DB_SET_OWNER_FUNC -- Set the owner and group of the database files.
**
** Parameters:
** db -- The database to set.
@ -170,12 +160,11 @@ typedef int (*db_sync_func) __P((SMDB_DATABASE *db, u_int flags));
** 0 - Success, otherwise errno.
**
*/
typedef int (*db_set_owner_func) __P((SMDB_DATABASE *db, uid_t uid,
gid_t gid));
typedef int (*db_set_owner_func) __P((SMDB_DATABASE *db, uid_t uid, gid_t gid));
/*
** DB_CURSOR -- Obtain a cursor for sequential access
** DB_CURSOR -- Obtain a cursor for sequential access
**
** Parameters:
** db -- The database to use.
@ -186,8 +175,9 @@ typedef int (*db_set_owner_func) __P((SMDB_DATABASE *db, uid_t uid,
** 0 - Success, otherwise errno.
**
*/
typedef int (*db_cursor_func) __P((SMDB_DATABASE *db,
SMDB_CURSOR **cursor, u_int flags));
SMDB_CURSOR **cursor, unsigned int flags));
typedef int (*db_lockfd_func) __P((SMDB_DATABASE *db));
@ -204,11 +194,8 @@ struct database_struct
db_lockfd_func smdb_lockfd;
void *smdb_impl;
};
/*
** DB_CURSOR_CLOSE -- Close a cursor
** DB_CURSOR_CLOSE -- Close a cursor
**
** Parameters:
** cursor -- The cursor to close.
@ -217,11 +204,11 @@ struct database_struct
** 0 - Success, otherwise errno.
**
*/
typedef int (*db_cursor_close_func) __P((SMDB_CURSOR *cursor));
/*
** DB_CURSOR_DEL -- Delete the key/value pair of this cursor
** DB_CURSOR_DEL -- Delete the key/value pair of this cursor
**
** Parameters:
** cursor -- The cursor.
@ -231,11 +218,12 @@ typedef int (*db_cursor_close_func) __P((SMDB_CURSOR *cursor));
** 0 - Success, otherwise errno.
**
*/
typedef int (*db_cursor_del_func) __P((SMDB_CURSOR *cursor, u_int flags));
typedef int (*db_cursor_del_func) __P((SMDB_CURSOR *cursor,
unsigned int flags));
/*
** DB_CURSOR_GET -- Get the key/value of this cursor.
** DB_CURSOR_GET -- Get the key/value of this cursor.
**
** Parameters:
** cursor -- The cursor.
@ -250,22 +238,23 @@ typedef int (*db_cursor_del_func) __P((SMDB_CURSOR *cursor, u_int flags));
** database is hit.
**
*/
typedef int (*db_cursor_get_func) __P((SMDB_CURSOR *cursor,
SMDB_DBENT *key,
SMDB_DBENT *data,
u_int flags));
unsigned int flags));
/*
** Flags for DB_CURSOR_GET
** Flags for DB_CURSOR_GET
*/
#define SMDB_CURSOR_GET_FIRST 0
#define SMDB_CURSOR_GET_LAST 1
#define SMDB_CURSOR_GET_NEXT 2
#define SMDB_CURSOR_GET_RANGE 3
/*
** DB_CURSOR_PUT -- Put the key/value at this cursor.
** DB_CURSOR_PUT -- Put the key/value at this cursor.
**
** Parameters:
** cursor -- The cursor.
@ -277,10 +266,11 @@ typedef int (*db_cursor_get_func) __P((SMDB_CURSOR *cursor,
** 0 - Success, otherwise errno.
**
*/
typedef int (*db_cursor_put_func) __P((SMDB_CURSOR *cursor,
SMDB_DBENT *key,
SMDB_DBENT *data,
u_int flags));
unsigned int flags));
@ -296,9 +286,9 @@ struct cursor_struct
struct database_params_struct
{
u_int smdbp_num_elements;
u_int smdbp_cache_size;
bool smdbp_allow_dup;
unsigned int smdbp_num_elements;
unsigned int smdbp_cache_size;
bool smdbp_allow_dup;
};
typedef struct database_params_struct SMDB_DBPARAMS;
@ -319,10 +309,10 @@ struct entry_struct
};
typedef char *SMDB_DBTYPE;
typedef u_int SMDB_FLAG;
typedef unsigned int SMDB_FLAG;
/*
** These are types of databases.
** These are types of databases.
*/
# define SMDB_TYPE_DEFAULT NULL
@ -335,8 +325,9 @@ typedef u_int SMDB_FLAG;
# define SMDB_TYPE_NDBM_LEN 4
/*
** These are flags
** These are flags
*/
/* Flags for put */
# define SMDBF_NO_OVERWRITE 0x00000001
# define SMDBF_ALLOW_DUP 0x00000002

View File

@ -10,10 +10,14 @@
* the sendmail distribution.
*
*
* $Id: mailstats.h,v 8.13 1999/05/22 02:29:10 ca Exp $
* $Id: mailstats.h,v 8.18 2001/11/21 13:39:10 gshapiro Exp $
*/
#define STAT_VERSION 3
#if _FFR_QUARANTINE
# define STAT_VERSION 4
#else /* _FFR_QUARANTINE */
# define STAT_VERSION 3
#endif /* _FFR_QUARANTINE */
#define STAT_MAGIC 0x1B1DE
/*
@ -35,4 +39,7 @@ struct statistics
long stat_bt[MAXMAILERS]; /* kbytes to each mailer */
long stat_nr[MAXMAILERS]; /* # rejects by each mailer */
long stat_nd[MAXMAILERS]; /* # discards by each mailer */
#if _FFR_QUARANTINE
long stat_nq[MAXMAILERS]; /* # quarantines by each mailer */
#endif /* _FFR_QUARANTINE */
};

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
* Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@ -9,28 +9,54 @@
* the sendmail distribution.
*
*
* $Id: pathnames.h,v 8.16.8.8 2000/09/28 21:26:39 gshapiro Exp $
* $Id: pathnames.h,v 8.35 2001/03/23 22:09:44 ca Exp $
*/
# ifndef _PATH_SENDMAILCF
# if defined(USE_VENDOR_CF_PATH) && defined(_PATH_VENDOR_CF)
# define _PATH_SENDMAILCF _PATH_VENDOR_CF
# else /* defined(USE_VENDOR_CF_PATH) && defined(_PATH_VENDOR_CF) */
# define _PATH_SENDMAILCF "/etc/mail/sendmail.cf"
# endif /* defined(USE_VENDOR_CF_PATH) && defined(_PATH_VENDOR_CF) */
# endif /* ! _PATH_SENDMAILCF */
# ifndef _PATH_SENDMAILPID
# ifdef BSD4_4
# define _PATH_SENDMAILPID "/var/run/sendmail.pid"
# else /* BSD4_4 */
# define _PATH_SENDMAILPID "/etc/mail/sendmail.pid"
# endif /* BSD4_4 */
# endif /* ! _PATH_SENDMAILPID */
# ifndef _PATH_HOSTS
# define _PATH_HOSTS "/etc/hosts"
# endif /* ! _PATH_HOSTS */
#ifndef SM_PATHNAMES_H
# define SM_PATHNAMES_H
# ifndef _PATH_SENDMAILCF
# if defined(USE_VENDOR_CF_PATH) && defined(_PATH_VENDOR_CF)
# define _PATH_SENDMAILCF _PATH_VENDOR_CF
# else /* defined(USE_VENDOR_CF_PATH) && defined(_PATH_VENDOR_CF) */
# define _PATH_SENDMAILCF "/etc/mail/sendmail.cf"
# endif /* defined(USE_VENDOR_CF_PATH) && defined(_PATH_VENDOR_CF) */
# endif /* ! _PATH_SENDMAILCF */
# ifndef _PATH_SENDMAILPID
# ifdef BSD4_4
# define _PATH_SENDMAILPID "/var/run/sendmail.pid"
# else /* BSD4_4 */
# define _PATH_SENDMAILPID "/etc/mail/sendmail.pid"
# endif /* BSD4_4 */
# endif /* ! _PATH_SENDMAILPID */
# ifndef _PATH_SENDMAIL
# define _PATH_SENDMAIL "/usr/lib/sendmail"
# endif /* ! _PATH_SENDMAIL */
# ifndef _PATH_MAILDIR
# define _PATH_MAILDIR "/var/spool/mail"
# endif /* ! _PATH_MAILDIR */
# ifndef _PATH_LOCTMP
# define _PATH_LOCTMP "/tmp/local.XXXXXX"
# endif /* ! _PATH_LOCTMP */
# ifndef _PATH_HOSTS
# define _PATH_HOSTS "/etc/hosts"
# endif /* ! _PATH_HOSTS */
# ifndef _DIR_SENDMAILCF
# define _DIR_SENDMAILCF "/etc/mail/"
# endif /* ! _DIR_SENDMAILCF */
# define SM_GET_RIGHT_CF 0 /* get "right" .cf */
# define SM_GET_SENDMAIL_CF 1 /* always use sendmail.cf */
# define SM_GET_SUBMIT_CF 2 /* always use submit.cf */
extern char *getcfname __P((int, int, int, char *));
#endif /* ! SM_PATHNAMES_H */

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
* Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@ -10,23 +10,18 @@
* the sendmail distribution.
*
*
* $Id: sendmail.h,v 8.34.4.8 2001/06/01 05:06:51 gshapiro Exp $
* $Id: sendmail.h,v 8.67 2001/09/08 01:20:57 gshapiro Exp $
*/
/*
** SENDMAIL.H -- Global definitions for sendmail.
*/
#if SFIO
# include <sfio/stdio.h>
#else /* SFIO */
# include <stdio.h>
#endif /* SFIO */
#include <string.h>
#include <stdio.h>
#include <sm/bitops.h>
#include <sm/io.h>
#include <sm/string.h>
#include "conf.h"
#include "sendmail/errstring.h"
#include "sendmail/useful.h"
/**********************************************************************
** Table sizes, etc....
@ -36,45 +31,6 @@
# define MAXMAILERS 25 /* maximum mailers known to system */
#endif /* ! MAXMAILERS */
/*
** Data structure for bit maps.
**
** Each bit in this map can be referenced by an ascii character.
** This is 256 possible bits, or 32 8-bit bytes.
*/
#define BITMAPBITS 256 /* number of bits in a bit map */
#define BYTEBITS 8 /* number of bits in a byte */
#define BITMAPBYTES (BITMAPBITS / BYTEBITS) /* number of bytes in bit map */
/* internal macros */
#define _BITWORD(bit) ((bit) / (BYTEBITS * sizeof (int)))
#define _BITBIT(bit) ((unsigned int)1 << ((bit) % (BYTEBITS * sizeof (int))))
typedef unsigned int BITMAP256[BITMAPBYTES / sizeof (int)];
/* properly case and truncate bit */
#define bitidx(bit) ((unsigned int) (bit) & 0xff)
/* test bit number N */
#define bitnset(bit, map) ((map)[_BITWORD(bit)] & _BITBIT(bit))
/* set bit number N */
#define setbitn(bit, map) (map)[_BITWORD(bit)] |= _BITBIT(bit)
/* clear bit number N */
#define clrbitn(bit, map) (map)[_BITWORD(bit)] &= ~_BITBIT(bit)
/* clear an entire bit map */
#define clrbitmap(map) memset((char *) map, '\0', BITMAPBYTES)
/*
** Utility macros
*/
/* return number of bytes left in a buffer */
#define SPACELEFT(buf, ptr) (sizeof buf - ((ptr) - buf))
/*
** Flags passed to safefile/safedirpath.
*/
@ -85,7 +41,7 @@ typedef unsigned int BITMAP256[BITMAPBYTES / sizeof (int)];
#define SFF_ROOTOK 0x00000004L /* ok for root to own this file */
#define SFF_RUNASREALUID 0x00000008L /* if no ctladdr, run as real uid */
#define SFF_NOPATHCHECK 0x00000010L /* don't bother checking dir path */
#define SFF_SETUIDOK 0x00000020L /* setuid files are ok */
#define SFF_SETUIDOK 0x00000020L /* set-user-ID files are ok */
#define SFF_CREAT 0x00000040L /* ok to create file if necessary */
#define SFF_REGONLY 0x00000080L /* regular files only */
#define SFF_SAFEDIRPATH 0x00000100L /* no writable directories allowed */
@ -108,6 +64,7 @@ typedef unsigned int BITMAP256[BITMAPBYTES / sizeof (int)];
extern int safefile __P((char *, UID_T, GID_T, char *, long, int, struct stat *));
extern int safedirpath __P((char *, UID_T, GID_T, char *, long, int, int));
extern int safeopen __P((char *, int, int, long));
extern SM_FILE_T*safefopen __P((char *, int, int, long));
extern int dfopen __P((char *, int, int, long));
extern bool filechanged __P((char *, int, struct stat *));
@ -116,6 +73,7 @@ extern bool filechanged __P((char *, int, struct stat *));
**
** Hopefully nobody uses these.
*/
#define DBS_SAFE 0
#define DBS_ASSUMESAFECHOWN 1
#define DBS_GROUPWRITABLEDIRPATHSAFE 2
@ -144,42 +102,33 @@ extern bool filechanged __P((char *, int, struct stat *));
#define DBS_HELPFILEINUNSAFEDIRPATH 25
#define DBS_FORWARDFILEINUNSAFEDIRPATHSAFE 26
#define DBS_INCLUDEFILEINUNSAFEDIRPATHSAFE 27
#define DBS_RUNPROGRAMINUNSAFEDIRPATH 28 /* Not used yet */
#define DBS_RUNPROGRAMINUNSAFEDIRPATH 28
#define DBS_RUNWRITABLEPROGRAM 29
#define DBS_INCLUDEFILEINUNSAFEDIRPATH 30
#define DBS_NONROOTSAFEADDR 31
#define DBS_TRUSTSTICKYBIT 32
#define DBS_DONTWARNFORWARDFILEINUNSAFEDIRPATH 33
#define DBS_INSUFFICIENTENTROPY 34
#if _FFR_UNSAFE_SASL
# define DBS_GROUPREADABLESASLFILE 35
#endif /* _FFR_UNSAFE_SASL */
#if _FFR_UNSAFE_WRITABLE_INCLUDE
# define DBS_GROUPWRITABLEFORWARDFILE 36
# define DBS_GROUPWRITABLEINCLUDEFILE 37
# define DBS_WORLDWRITABLEFORWARDFILE 38
# define DBS_WORLDWRITABLEINCLUDEFILE 39
#endif /* _FFR_UNSAFE_WRITABLE_INCLUDE */
#define DBS_GROUPREADABLESASLDBFILE 35
#define DBS_GROUPWRITABLESASLDBFILE 36
#define DBS_GROUPWRITABLEFORWARDFILE 37
#define DBS_GROUPWRITABLEINCLUDEFILE 38
#define DBS_WORLDWRITABLEFORWARDFILE 39
#define DBS_WORLDWRITABLEINCLUDEFILE 40
#define DBS_GROUPREADABLEKEYFILE 41
#if _FFR_GROUPREADABLEAUTHINFOFILE
# define DBS_GROUPREADABLEAUTHINFOFILE 42
#endif /* _FFR_GROUPREADABLEAUTHINFOFILE */
/* struct defining such things */
struct dbsval
{
char *dbs_name; /* name of DontBlameSendmail flag */
u_char dbs_flag; /* numeric level */
char *dbs_name; /* name of DontBlameSendmail flag */
unsigned char dbs_flag; /* numeric level */
};
#if _FFR_DPRINTF
extern void dprintf __P((const char *, ...));
extern int dflush __P((void));
#else /* _FFR_DPRINTF */
#define dprintf printf
#define dflush() fflush(stdout)
#endif /* _FFR_DPRINTF */
extern int sm_snprintf __P((char *, size_t, const char *, ...));
extern int sm_vsnprintf __P((char *, size_t, const char *, va_list));
extern char *quad_to_string __P((QUAD_T));
extern size_t strlcpy __P((char *, const char *, size_t));
extern size_t strlcat __P((char *, const char *, size_t));
/* Flags for submitmode */
#define SUBMIT_UNKNOWN 0x0000 /* unknown agent type */
#define SUBMIT_MTA 0x0001 /* act like a message transfer agent */
#define SUBMIT_MSA 0x0002 /* act like a message submission agent */

View File

@ -0,0 +1,113 @@
/*
* Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: assert.h,v 1.10 2001/06/07 20:04:53 ca Exp $
*/
/*
** libsm abnormal program termination and assertion checking
** See libsm/assert.html for documentation.
*/
#ifndef SM_ASSERT_H
# define SM_ASSERT_H
# include <sm/gen.h>
# include <sm/debug.h>
/*
** abnormal program termination
*/
typedef void (*SM_ABORT_HANDLER_T) __P((const char *, int, const char *));
extern SM_DEAD(void
sm_abort_at __P((
const char *,
int,
const char *)));
extern void
sm_abort_sethandler __P((
SM_ABORT_HANDLER_T));
extern SM_DEAD(void PRINTFLIKE(1, 2)
sm_abort __P((
char *,
...)));
/*
** assertion checking
*/
# ifndef SM_CHECK_ALL
# define SM_CHECK_ALL 1
# endif /* ! SM_CHECK_ALL */
# ifndef SM_CHECK_REQUIRE
# define SM_CHECK_REQUIRE SM_CHECK_ALL
# endif /* ! SM_CHECK_REQUIRE */
# ifndef SM_CHECK_ENSURE
# define SM_CHECK_ENSURE SM_CHECK_ALL
# endif /* ! SM_CHECK_ENSURE */
# ifndef SM_CHECK_ASSERT
# define SM_CHECK_ASSERT SM_CHECK_ALL
# endif /* ! SM_CHECK_ASSERT */
# if SM_CHECK_REQUIRE
# if defined(__STDC__) || defined(__cplusplus)
# define SM_REQUIRE(cond) \
((void) ((cond) || (sm_abort_at(__FILE__, __LINE__, \
"SM_REQUIRE(" #cond ") failed"), 0)))
# else /* defined(__STDC__) || defined(__cplusplus) */
# define SM_REQUIRE(cond) \
((void) ((cond) || (sm_abort_at(__FILE__, __LINE__, \
"SM_REQUIRE(cond) failed"), 0)))
# endif /* defined(__STDC__) || defined(__cplusplus) */
# else /* SM_CHECK_REQUIRE */
# define SM_REQUIRE(cond) ((void) 0)
# endif /* SM_CHECK_REQUIRE */
# define SM_REQUIRE_ISA(obj, magic) \
SM_REQUIRE((obj) != NULL && (obj)->sm_magic == (magic))
# if SM_CHECK_ENSURE
# if defined(__STDC__) || defined(__cplusplus)
# define SM_ENSURE(cond) \
((void) ((cond) || (sm_abort_at(__FILE__, __LINE__, \
"SM_ENSURE(" #cond ") failed"), 0)))
# else /* defined(__STDC__) || defined(__cplusplus) */
# define SM_ENSURE(cond) \
((void) ((cond) || (sm_abort_at(__FILE__, __LINE__, \
"SM_ENSURE(cond) failed"), 0)))
# endif /* defined(__STDC__) || defined(__cplusplus) */
# else /* SM_CHECK_ENSURE */
# define SM_ENSURE(cond) ((void) 0)
# endif /* SM_CHECK_ENSURE */
# if SM_CHECK_ASSERT
# if defined(__STDC__) || defined(__cplusplus)
# define SM_ASSERT(cond) \
((void) ((cond) || (sm_abort_at(__FILE__, __LINE__, \
"SM_ASSERT(" #cond ") failed"), 0)))
# else /* defined(__STDC__) || defined(__cplusplus) */
# define SM_ASSERT(cond) \
((void) ((cond) || (sm_abort_at(__FILE__, __LINE__, \
"SM_ASSERT(cond) failed"), 0)))
# endif /* defined(__STDC__) || defined(__cplusplus) */
# else /* SM_CHECK_ASSERT */
# define SM_ASSERT(cond) ((void) 0)
# endif /* SM_CHECK_ASSERT */
extern SM_DEBUG_T SmExpensiveRequire;
extern SM_DEBUG_T SmExpensiveEnsure;
extern SM_DEBUG_T SmExpensiveAssert;
#endif /* ! SM_ASSERT_H */

View File

@ -0,0 +1,57 @@
/*
* Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
*
* $Id: bitops.h,v 1.2 2001/09/22 22:05:42 ca Exp $
*/
#ifndef SM_BITOPS_H
# define SM_BITOPS_H
/*
** Data structure for bit maps.
**
** Each bit in this map can be referenced by an ascii character.
** This is 256 possible bits, or 32 8-bit bytes.
*/
# define BITMAPBITS 256 /* number of bits in a bit map */
# define BYTEBITS 8 /* number of bits in a byte */
# define BITMAPBYTES (BITMAPBITS / BYTEBITS) /* number of bytes in bit map */
# define BITMAPMAX ((BITMAPBYTES / sizeof (int)) - 1)
/* internal macros */
/* make sure this index never leaves the allowed range: 0 to BITMAPMAX */
# define _BITWORD(bit) (((unsigned char)(bit) / (BYTEBITS * sizeof (int))) & BITMAPMAX)
# define _BITBIT(bit) ((unsigned int)1 << ((unsigned char)(bit) % (BYTEBITS * sizeof (int))))
typedef unsigned int BITMAP256[BITMAPBYTES / sizeof (int)];
/* properly case and truncate bit */
# define bitidx(bit) ((unsigned int) (bit) & 0xff)
/* test bit number N */
# define bitnset(bit, map) ((map)[_BITWORD(bit)] & _BITBIT(bit))
/* set bit number N */
# define setbitn(bit, map) (map)[_BITWORD(bit)] |= _BITBIT(bit)
/* clear bit number N */
# define clrbitn(bit, map) (map)[_BITWORD(bit)] &= ~_BITBIT(bit)
/* clear an entire bit map */
# define clrbitmap(map) memset((char *) map, '\0', BITMAPBYTES)
/* bit hacking */
# define bitset(bit, word) (((word) & (bit)) != 0)
#endif /* ! SM_BITOPS_H */

View File

@ -0,0 +1,142 @@
/*
* Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: cdefs.h,v 1.14 2001/06/07 20:04:53 ca Exp $
*/
/*
** libsm C language portability macros
** See libsm/cdefs.html for documentation.
*/
#ifndef SM_CDEFS_H
# define SM_CDEFS_H
# include <sm/config.h>
/*
** BSD and Linux have <sys/cdefs.h> which defines a set of C language
** portability macros that are a defacto standard in the open source
** community.
*/
# if SM_CONF_SYS_CDEFS_H
# include <sys/cdefs.h>
# endif /* SM_CONF_SYS_CDEFS_H */
/*
** Define the standard C language portability macros
** for platforms that lack <sys/cdefs.h>.
*/
# if !SM_CONF_SYS_CDEFS_H
# if defined(__cplusplus)
# define __BEGIN_DECLS extern "C" {
# define __END_DECLS };
# else /* defined(__cplusplus) */
# define __BEGIN_DECLS
# define __END_DECLS
# endif /* defined(__cplusplus) */
# if defined(__STDC__) || defined(__cplusplus)
# define __P(protos) protos
# define __CONCAT(x,y) x ## y
# define __STRING(x) #x
# else /* defined(__STDC__) || defined(__cplusplus) */
# define __P(protos) ()
# define __CONCAT(x,y) x/**/y
# define __STRING(x) "x"
# define const
# define signed
# define volatile
# endif /* defined(__STDC__) || defined(__cplusplus) */
# endif /* !SM_CONF_SYS_CDEFS_H */
/*
** Define SM_DEAD, a macro used to declare functions that do not return
** to their caller.
*/
# ifndef SM_DEAD
# if __GNUC__ >= 2
# if __GNUC__ == 2 && __GNUC_MINOR__ < 5
# define SM_DEAD(proto) volatile proto
# else /* __GNUC__ == 2 && __GNUC_MINOR__ < 5 */
# define SM_DEAD(proto) proto __attribute__((__noreturn__))
# endif /* __GNUC__ == 2 && __GNUC_MINOR__ < 5 */
# else /* __GNUC__ >= 2 */
# define SM_DEAD(proto) proto
# endif /* __GNUC__ >= 2 */
# endif /* SM_DEAD */
/*
** Define SM_UNUSED, a macro used to declare variables that may be unused.
*/
# ifndef SM_UNUSED
# if __GNUC__ >= 2
# if __GNUC__ == 2 && __GNUC_MINOR__ < 7
# define SM_UNUSED(decl) decl
# else /* __GNUC__ == 2 && __GNUC_MINOR__ < 7 */
# define SM_UNUSED(decl) decl __attribute__((__unused__))
# endif /* __GNUC__ == 2 && __GNUC_MINOR__ < 7 */
# else /* __GNUC__ >= 2 */
# define SM_UNUSED(decl) decl
# endif /* __GNUC__ >= 2 */
# endif /* SM_UNUSED */
/*
** The SM_NONVOLATILE macro is used to declare variables that are not
** volatile, but which must be declared volatile when compiling with
** gcc -O -Wall in order to suppress bogus warning messages.
**
** Variables that actually are volatile should be declared volatile
** using the "volatile" keyword. If a variable actually is volatile,
** then SM_NONVOLATILE should not be used.
**
** To compile sendmail with gcc and see all non-bogus warnings,
** you should use
** gcc -O -Wall -DSM_OMIT_BOGUS_WARNINGS ...
** Do not use -DSM_OMIT_BOGUS_WARNINGS when compiling the production
** version of sendmail, because there is a performance hit.
*/
# ifdef SM_OMIT_BOGUS_WARNINGS
# define SM_NONVOLATILE volatile
# else /* SM_OMIT_BOGUS_WARNINGS */
# define SM_NONVOLATILE
# endif /* SM_OMIT_BOGUS_WARNINGS */
/*
** Turn on format string argument checking.
*/
# ifndef SM_CONF_FORMAT_TEST
# if __GNUC__ == 2 && __GNUC_MINOR__ >= 7
# define SM_CONF_FORMAT_TEST 1
# else /* __GNUC__ == 2 && __GNUC_MINOR__ >= 7 */
# define SM_CONF_FORMAT_TEST 0
# endif /* __GNUC__ == 2 && __GNUC_MINOR__ >= 7 */
# endif /* SM_CONF_FORMAT_TEST */
# ifndef PRINTFLIKE
# if SM_CONF_FORMAT_TEST
# define PRINTFLIKE(x,y) __attribute__ ((__format__ (__printf__, x, y)))
# else /* SM_CONF_FORMAT_TEST */
# define PRINTFLIKE(x,y)
# endif /* SM_CONF_FORMAT_TEST */
# endif /* ! PRINTFLIKE */
# ifndef SCANFLIKE
# if SM_CONF_FORMAT_TEST
# define SCANFLIKE(x,y) __attribute__ ((__format__ (__scanf__, x, y)))
# else /* SM_CONF_FORMAT_TEST */
# define SCANFLIKE(x,y)
# endif /* SM_CONF_FORMAT_TEST */
# endif /* ! SCANFLIKE */
#endif /* ! SM_CDEFS_H */

View File

@ -0,0 +1,29 @@
/*
* Copyright (c) 2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: cf.h,v 1.2 2001/03/08 03:23:07 ca Exp $
*/
#ifndef SM_CF_H
# define SM_CF_H
#include <sm/gen.h>
typedef struct
{
char *opt_name;
char *opt_val;
} SM_CF_OPT_T;
extern int
sm_cf_getopt __P((
char *path,
int optc,
SM_CF_OPT_T *optv));
#endif /* ! SM_CF_H */

View File

@ -0,0 +1,81 @@
/*
* Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: clock.h,v 1.11 2001/05/14 23:25:37 gshapiro Exp $
*/
/*
** CLOCK.H -- for co-ordinating timed events
*/
#ifndef _SM_CLOCK_H
# define _SM_CLOCK_H 1
# include <sm/signal.h>
# if SM_CONF_SETITIMER
# include <sys/time.h>
# endif /* SM_CONF_SETITIMER */
/*
** STRUCT SM_EVENT -- event queue.
**
** Maintained in sorted order.
**
** We store the pid of the process that set this event to insure
** that when we fork we will not take events intended for the parent.
*/
struct sm_event
{
# if SM_CONF_SETITIMER
struct timeval ev_time; /* time of the call (microseconds) */
# else /* SM_CONF_SETITIMER */
time_t ev_time; /* time of the call (seconds) */
# endif /* SM_CONF_SETITIMER */
void (*ev_func)__P((int));
/* function to call */
int ev_arg; /* argument to ev_func */
pid_t ev_pid; /* pid that set this event */
struct sm_event *ev_link; /* link to next item */
};
typedef struct sm_event SM_EVENT;
/* functions */
extern void sm_clrevent __P((SM_EVENT *));
extern void sm_clear_events __P((void));
extern SM_EVENT *sm_setevent __P((time_t, void(*)(), int));
extern SM_EVENT *sm_seteventm __P((int, void(*)(), int));
extern SM_EVENT *sm_sigsafe_seteventm __P((int, void(*)(), int));
extern SIGFUNC_DECL sm_tick __P((int));
/*
** SM_SETEVENT -- set an event to happen at a specific time in seconds.
**
** Translates the seconds into millseconds and calls sm_seteventm()
** to get a specific event to happen in the future at a specific time.
**
** Parameters:
** t -- intvl until next event occurs (seconds).
** f -- function to call on event.
** a -- argument to func on event.
**
** Returns:
** result of sm_seteventm().
**
** Side Effects:
** Any that sm_seteventm() have.
*/
#define sm_setevent(t, f, a) sm_seteventm((int)((t) * 1000), (f), (a))
#define sm_sigsafe_setevent(t, f, a) sm_sigsafe_seteventm((int)((t) * 1000), (f), (a))
#endif /* _SM_CLOCK_H */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,146 @@
/*
* Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: config.h,v 1.42 2001/06/17 21:31:11 ca Exp $
*/
/*
** libsm configuration macros.
** The values of these macros are platform dependent.
** The default values are given here.
** If the default is incorrect, then the correct value can be specified
** in the m4 configuration file in devtools/OS.
*/
#ifndef SM_CONFIG_H
# define SM_CONFIG_H
# include "sm_os.h"
/*
** SM_CONF_STDBOOL_H is 1 if <stdbool.h> exists
*/
# ifndef SM_CONF_STDBOOL_H
# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
# define SM_CONF_STDBOOL_H 1
# else /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
# define SM_CONF_STDBOOL_H 0
# endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
# endif /* ! SM_CONF_STDBOOL_H */
/*
** Configuration macros that specify how __P is defined.
*/
# ifndef SM_CONF_SYS_CDEFS_H
# define SM_CONF_SYS_CDEFS_H 0
# endif /* ! SM_CONF_SYS_CDEFS_H */
/*
** SM_CONF_STDDEF_H is 1 if <stddef.h> exists
*/
# ifndef SM_CONF_STDDEF_H
# define SM_CONF_STDDEF_H 1
# endif /* ! SM_CONF_STDDEF_H */
/*
** Configuration macro that specifies whether strlcpy/strlcat are available.
** Note: this is the default so that the libsm version (optimized) will
** be used by default (sm_strlcpy/sm_strlcat).
*/
# ifndef SM_CONF_STRL
# define SM_CONF_STRL 0
# endif /* ! SM_CONF_STRL */
/*
** Configuration macro indicating that setitimer is available
*/
# ifndef SM_CONF_SETITIMER
# define SM_CONF_SETITIMER 1
# endif /* ! SM_CONF_SETITIMER */
/*
** Does <sys/types.h> define uid_t and gid_t?
*/
# ifndef SM_CONF_UID_GID
# define SM_CONF_UID_GID 1
# endif /* ! SM_CONF_UID_GID */
/*
** Does <sys/types.h> define ssize_t?
*/
# ifndef SM_CONF_SSIZE_T
# define SM_CONF_SSIZE_T 1
# endif /* ! SM_CONF_SSIZE_T */
/*
** Does the C compiler support long long?
*/
# ifndef SM_CONF_LONGLONG
# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
# define SM_CONF_LONGLONG 1
# else /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
# if defined(__GNUC__)
# define SM_CONF_LONGLONG 1
# else /* defined(__GNUC__) */
# define SM_CONF_LONGLONG 0
# endif /* defined(__GNUC__) */
# endif /* defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L */
# endif /* ! SM_CONF_LONGLONG */
/*
** Does <sys/types.h> define quad_t and u_quad_t?
** We only care if long long is not available.
*/
# ifndef SM_CONF_QUAD_T
# define SM_CONF_QUAD_T 0
# endif /* ! SM_CONF_QUAD_T */
/*
** Configuration macro indicating that shared memory is available
*/
# ifndef SM_CONF_SHM
# define SM_CONF_SHM 0
# endif /* ! SM_CONF_SHM */
/*
** Does <setjmp.h> define sigsetjmp?
*/
# ifndef SM_CONF_SIGSETJMP
# define SM_CONF_SIGSETJMP 1
# endif /* ! SM_CONF_SIGSETJMP */
/*
** Does <sysexits.h> exist, and define the EX_* macros with values
** that differ from the default BSD values in <sm/sysexits.h>?
*/
# ifndef SM_CONF_SYSEXITS_H
# define SM_CONF_SYSEXITS_H 0
# endif /* ! SM_CONF_SYSEXITS_H */
/* has memchr() prototype? (if not: needs memory.h) */
# ifndef SM_CONF_MEMCHR
# define SM_CONF_MEMCHR 1
# endif /* ! SM_CONF_MEMCHR */
/* try LLONG tests in libsm/t-types.c? */
# ifndef SM_CONF_TEST_LLONG
# define SM_CONF_TEST_LLONG 1
# endif /* !SM_CONF_TEST_LLONG */
#endif /* ! SM_CONFIG_H */

View File

@ -0,0 +1,141 @@
/*
* Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: debug.h,v 1.15 2001/03/08 03:23:07 ca Exp $
*/
/*
** libsm debugging and tracing
** See libsm/debug.html for documentation.
*/
#ifndef SM_DEBUG_H
# define SM_DEBUG_H
# include <sm/gen.h>
# include <sm/io.h>
/*
** abstractions for printing trace messages
*/
extern SM_FILE_T *
sm_debug_file __P((void));
extern void
sm_debug_setfile __P((
SM_FILE_T *));
extern void PRINTFLIKE(1, 2)
sm_dprintf __P((
char *_fmt,
...));
extern void
sm_dflush __P((void));
/*
** abstractions for setting and testing debug activation levels
*/
extern void
sm_debug_addsettings_x __P((
const char *));
extern void
sm_debug_addsetting_x __P((
const char *,
int));
# define SM_DEBUG_UNKNOWN ((SM_ATOMIC_UINT_T)(-1))
extern const char SmDebugMagic[];
typedef struct sm_debug SM_DEBUG_T;
struct sm_debug
{
const char *sm_magic; /* points to SmDebugMagic */
/*
** debug_level is the activation level of this debug
** object. Level 0 means no debug activity.
** It is initialized to SM_DEBUG_UNKNOWN, which indicates
** that the true value is unknown. If debug_level ==
** SM_DEBUG_UNKNOWN, then the access functions will look up
** its true value in the internal table of debug settings.
*/
SM_ATOMIC_UINT_T debug_level;
/*
** debug_name is the name used to reference this SM_DEBUG
** structure via the sendmail -d option.
*/
char *debug_name;
/*
** debug_desc is a literal character string of the form
** "@(#)$Debug: <name> - <short description> $"
*/
char *debug_desc;
/*
** We keep a linked list of initialized SM_DEBUG structures
** so that when sm_debug_addsetting is called, we can reset
** them all back to the uninitialized state.
*/
SM_DEBUG_T *debug_next;
};
# ifndef SM_DEBUG_CHECK
# define SM_DEBUG_CHECK 1
# endif /* ! SM_DEBUG_CHECK */
# if SM_DEBUG_CHECK
/*
** This macro is cleverly designed so that if the debug object is below
** the specified level, then the only overhead is a single comparison
** (except for the first time this macro is invoked).
*/
# define sm_debug_active(debug, level) \
((debug)->debug_level >= (level) && \
((debug)->debug_level != SM_DEBUG_UNKNOWN || \
sm_debug_loadactive(debug, level)))
# define sm_debug_level(debug) \
((debug)->debug_level == SM_DEBUG_UNKNOWN \
? sm_debug_loadlevel(debug) : (debug)->debug_level)
# define sm_debug_unknown(debug) ((debug)->debug_level == SM_DEBUG_UNKNOWN)
# else /* SM_DEBUG_CHECK */
# define sm_debug_active(debug, level) 0
# define sm_debug_level(debug) 0
# define sm_debug_unknown(debug) 0
# endif /* SM_DEBUG_CHECK */
extern bool
sm_debug_loadactive __P((
SM_DEBUG_T *,
int));
extern int
sm_debug_loadlevel __P((
SM_DEBUG_T *));
# define SM_DEBUG_INITIALIZER(name, desc) { \
SmDebugMagic, \
SM_DEBUG_UNKNOWN, \
name, \
desc, \
NULL}
#endif /* ! SM_DEBUG_H */

View File

@ -0,0 +1,79 @@
/*
* Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
*
* $Id: errstring.h,v 1.4 2001/06/07 20:04:53 ca Exp $
*/
/*
** Error codes.
*/
#ifndef SM_ERRSTRING_H
# define SM_ERRSTRING_H
#include <errno.h>
extern int errno;
/*
** These are used in a few cases where we need some special
** error codes, but where the system doesn't provide something
** reasonable. They are printed in sm_errstring.
*/
#ifndef E_PSEUDOBASE
# define E_PSEUDOBASE 256
#endif /* ! E_PSEUDOBASE */
#define E_SM_OPENTIMEOUT (E_PSEUDOBASE + 0) /* Timeout on file open */
#define E_SM_NOSLINK (E_PSEUDOBASE + 1) /* Symbolic links not allowed */
#define E_SM_NOHLINK (E_PSEUDOBASE + 2) /* Hard links not allowed */
#define E_SM_REGONLY (E_PSEUDOBASE + 3) /* Regular files only */
#define E_SM_ISEXEC (E_PSEUDOBASE + 4) /* Executable files not allowed */
#define E_SM_WWDIR (E_PSEUDOBASE + 5) /* World writable directory */
#define E_SM_GWDIR (E_PSEUDOBASE + 6) /* Group writable directory */
#define E_SM_FILECHANGE (E_PSEUDOBASE + 7) /* File changed after open */
#define E_SM_WWFILE (E_PSEUDOBASE + 8) /* World writable file */
#define E_SM_GWFILE (E_PSEUDOBASE + 9) /* Group writable file */
#define E_SM_GRFILE (E_PSEUDOBASE + 10) /* g readable file */
#define E_SM_WRFILE (E_PSEUDOBASE + 11) /* o readable file */
#define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */
#define E_SMDBBASE (E_PSEUDOBASE + 40) /* base for libsmdb errors */
#define E_LDAPBASE (E_PSEUDOBASE + 70) /* base for LDAP errors */
/* libsmdb */
#define SMDBE_OK 0
#define SMDBE_MALLOC (E_SMDBBASE + 1)
#define SMDBE_GDBM_IS_BAD (E_SMDBBASE + 2)
#define SMDBE_UNSUPPORTED (E_SMDBBASE + 3)
#define SMDBE_DUPLICATE (E_SMDBBASE + 4)
#define SMDBE_BAD_OPEN (E_SMDBBASE + 5)
#define SMDBE_NOT_FOUND (E_SMDBBASE + 6)
#define SMDBE_UNKNOWN_DB_TYPE (E_SMDBBASE + 7)
#define SMDBE_UNSUPPORTED_DB_TYPE (E_SMDBBASE + 8)
#define SMDBE_INCOMPLETE (E_SMDBBASE + 9)
#define SMDBE_KEY_EMPTY (E_SMDBBASE + 10)
#define SMDBE_KEY_EXIST (E_SMDBBASE + 11)
#define SMDBE_LOCK_DEADLOCK (E_SMDBBASE + 12)
#define SMDBE_LOCK_NOT_GRANTED (E_SMDBBASE + 13)
#define SMDBE_LOCK_NOT_HELD (E_SMDBBASE + 14)
#define SMDBE_RUN_RECOVERY (E_SMDBBASE + 15)
#define SMDBE_IO_ERROR (E_SMDBBASE + 16)
#define SMDBE_READ_ONLY (E_SMDBBASE + 17)
#define SMDBE_DB_NAME_TOO_LONG (E_SMDBBASE + 18)
#define SMDBE_INVALID_PARAMETER (E_SMDBBASE + 19)
#define SMDBE_ONLY_SUPPORTS_ONE_CURSOR (E_SMDBBASE + 20)
#define SMDBE_NOT_A_VALID_CURSOR (E_SMDBBASE + 21)
#define SMDBE_LAST_ENTRY (E_SMDBBASE + 22)
#define SMDBE_OLD_VERSION (E_SMDBBASE + 23)
extern const char *
sm_errstring __P((
int _errno));
#endif /* SM_ERRSTRING_H */

View File

@ -0,0 +1,186 @@
/*
* Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: exc.h,v 1.23 2001/06/07 20:04:53 ca Exp $
*/
/*
** libsm exception handling
** See libsm/exc.html for documentation.
*/
#ifndef SM_EXC_H
# define SM_EXC_H
#include <sm/setjmp.h>
#include <sm/io.h>
#include <sm/gen.h>
#include <sm/assert.h>
typedef struct sm_exc SM_EXC_T;
typedef struct sm_exc_type SM_EXC_TYPE_T;
typedef union sm_val SM_VAL_T;
/*
** Exception types
*/
extern const char SmExcTypeMagic[];
struct sm_exc_type
{
const char *sm_magic;
const char *etype_category;
const char *etype_argformat;
void (*etype_print) __P((SM_EXC_T *, SM_FILE_T *));
const char *etype_printcontext;
};
extern const SM_EXC_TYPE_T SmEtypeOs;
extern const SM_EXC_TYPE_T SmEtypeErr;
extern void
sm_etype_printf __P((
SM_EXC_T *_exc,
SM_FILE_T *_stream));
/*
** Exception objects
*/
extern const char SmExcMagic[];
union sm_val
{
int v_int;
long v_long;
char *v_str;
SM_EXC_T *v_exc;
};
struct sm_exc
{
const char *sm_magic;
size_t exc_refcount;
const SM_EXC_TYPE_T *exc_type;
SM_VAL_T *exc_argv;
};
# define SM_EXC_INITIALIZER(type, argv) \
{ \
SmExcMagic, \
0, \
type, \
argv, \
}
extern SM_EXC_T *
sm_exc_new_x __P((
const SM_EXC_TYPE_T *_type,
...));
extern SM_EXC_T *
sm_exc_addref __P((
SM_EXC_T *_exc));
extern void
sm_exc_free __P((
SM_EXC_T *_exc));
extern bool
sm_exc_match __P((
SM_EXC_T *_exc,
const char *_pattern));
extern void
sm_exc_write __P((
SM_EXC_T *_exc,
SM_FILE_T *_stream));
extern void
sm_exc_print __P((
SM_EXC_T *_exc,
SM_FILE_T *_stream));
extern SM_DEAD(void
sm_exc_raise_x __P((
SM_EXC_T *_exc)));
extern SM_DEAD(void
sm_exc_raisenew_x __P((
const SM_EXC_TYPE_T *_type,
...)));
/*
** Exception handling
*/
typedef void (*SM_EXC_DEFAULT_HANDLER_T) __P((SM_EXC_T *));
extern void
sm_exc_newthread __P((
SM_EXC_DEFAULT_HANDLER_T _handle));
typedef struct sm_exc_handler SM_EXC_HANDLER_T;
struct sm_exc_handler
{
SM_EXC_T *eh_value;
SM_JMPBUF_T eh_context;
SM_EXC_HANDLER_T *eh_parent;
int eh_state;
};
/* values for eh_state */
enum
{
SM_EH_PUSHED = 2,
SM_EH_POPPED = 0,
SM_EH_HANDLED = 1
};
extern SM_EXC_HANDLER_T *SmExcHandler;
# define SM_TRY { SM_EXC_HANDLER_T _h; \
do { \
_h.eh_value = NULL; \
_h.eh_parent = SmExcHandler; \
_h.eh_state = SM_EH_PUSHED; \
SmExcHandler = &_h; \
if (sm_setjmp_nosig(_h.eh_context) == 0) {
# define SM_FINALLY SM_ASSERT(SmExcHandler == &_h); \
} \
if (sm_setjmp_nosig(_h.eh_context) == 0) {
# define SM_EXCEPT(e,pat) } \
if (_h.eh_state == SM_EH_HANDLED) \
break; \
if (_h.eh_state == SM_EH_PUSHED) { \
SM_ASSERT(SmExcHandler == &_h); \
SmExcHandler = _h.eh_parent; \
} \
_h.eh_state = sm_exc_match(_h.eh_value,pat) \
? SM_EH_HANDLED : SM_EH_POPPED; \
if (_h.eh_state == SM_EH_HANDLED) { \
SM_UNUSED(SM_EXC_T *e) = _h.eh_value;
# define SM_END_TRY } \
} while (0); \
if (_h.eh_state == SM_EH_PUSHED) { \
SM_ASSERT(SmExcHandler == &_h); \
SmExcHandler = _h.eh_parent; \
if (_h.eh_value != NULL) \
sm_exc_raise_x(_h.eh_value); \
} else if (_h.eh_state == SM_EH_POPPED) { \
if (_h.eh_value != NULL) \
sm_exc_raise_x(_h.eh_value); \
} else \
sm_exc_free(_h.eh_value); \
}
#endif /* SM_EXC_H */

View File

@ -0,0 +1,19 @@
/*
* Copyright (c) 2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: fdset.h,v 1.3 2001/03/30 23:45:31 geir Exp $
*/
#ifndef SM_FDSET_H
# define SM_FDSET_H
# define SM_FD_SET(fd, pfdset) FD_SET(fd, pfdset)
# define SM_FD_ISSET(fd, pfdset) FD_ISSET(fd, pfdset)
# define SM_FD_SETSIZE FD_SETSIZE
#endif /* SM_FDSET_H */

View File

@ -0,0 +1,79 @@
/*
* Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
* $Id: gen.h,v 1.19 2001/09/11 04:04:43 gshapiro Exp $
*/
/*
** libsm general definitions
** See libsm/gen.html for documentation.
*/
#ifndef SM_GEN_H
# define SM_GEN_H
# include <sm/config.h>
# include <sm/cdefs.h>
# include <sm/types.h>
/*
** Define SM_RCSID and SM_IDSTR,
** macros used to embed RCS and SCCS identification strings in object files.
*/
# ifdef lint
# define SM_RCSID(str)
# define SM_IDSTR(id,str)
# else /* lint */
# define SM_RCSID(str) SM_UNUSED(static const char RcsId[]) = str;
# define SM_IDSTR(id,str) SM_UNUSED(static const char id[]) = str;
# endif /* lint */
/*
** Define NULL and offsetof (from the C89 standard)
*/
# if SM_CONF_STDDEF_H
# include <stddef.h>
# else /* SM_CONF_STDDEF_H */
# ifndef NULL
# define NULL 0
# endif
# define offsetof(type, member) ((size_t)(&((type *)0)->member))
# endif /* SM_CONF_STDDEF_H */
/*
** Define bool, true, false (from the C99 standard)
*/
# if SM_CONF_STDBOOL_H
# include <stdbool.h>
# else /* SM_CONF_STDBOOL_H */
# ifndef __cplusplus
typedef int bool;
# define false 0
# define true 1
# endif
# endif /* SM_CONF_STDBOOL_H */
/*
** Define SM_MAX and SM_MIN
*/
# define SM_MAX(a, b) ((a) > (b) ? (a) : (b))
# define SM_MIN(a, b) ((a) < (b) ? (a) : (b))
/* Define SM_SUCCESS and SM_FAILURE */
# define SM_SUCCESS 0
# define SM_FAILURE (-1)
/* XXX This needs to be fixed when we start to use threads: */
typedef int SM_ATOMIC_INT_T;
typedef unsigned int SM_ATOMIC_UINT_T;
#endif /* SM_GEN_H */

Some files were not shown because too many files have changed in this diff Show More