mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-31 12:56:10 +01:00
Compare commits
116
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd1be22e3c | ||
|
|
c86ddc1591 | ||
|
|
03de911985 | ||
|
|
30a6ffb333 | ||
|
|
b553967807 | ||
|
|
179097ca57 | ||
|
|
17511421a0 | ||
|
|
2b73814796 | ||
|
|
0ab3a30098 | ||
|
|
203cefd966 | ||
|
|
5f3579a055 | ||
|
|
b80159036b | ||
|
|
0676aec44c | ||
|
|
b00fd6139f | ||
|
|
c8e77e814f | ||
|
|
2c8aa4e428 | ||
|
|
317ea1e1e0 | ||
|
|
0c180226e7 | ||
|
|
7b06159f38 | ||
|
|
7158f23c2a | ||
|
|
c7be66d190 | ||
|
|
e0b13f5132 | ||
|
|
b02227bd7c | ||
|
|
e137478c40 | ||
|
|
f08630026f | ||
|
|
04293d7d1a | ||
|
|
a84f9c8c4d | ||
|
|
672c020ccb | ||
|
|
1ad8babf96 | ||
|
|
53887285f9 | ||
|
|
6600f49b59 | ||
|
|
a09a226a43 | ||
|
|
3945a8c709 | ||
|
|
1b82bcc329 | ||
|
|
cfe58f08a5 | ||
|
|
cd7892f523 | ||
|
|
6ed973283d | ||
|
|
dea4a87bd1 | ||
|
|
99b361af69 | ||
|
|
35391b0ab8 | ||
|
|
7c378b035f | ||
|
|
84311d7439 | ||
|
|
89cf65c9b8 | ||
|
|
ff056c2ab1 | ||
|
|
7207f98338 | ||
|
|
01ca612ace | ||
|
|
56fa421a15 | ||
|
|
2e85ae4673 | ||
|
|
3c5c01cc50 | ||
|
|
20a58379dd | ||
|
|
c1fc798db7 | ||
|
|
52101c3a7e | ||
|
|
d372cbc1e8 | ||
|
|
bfe60c7f04 | ||
|
|
f2466b8548 | ||
|
|
4e2f30561f | ||
|
|
89ce5d04a2 | ||
|
|
27476a4f5a | ||
|
|
f492c7a6d2 | ||
|
|
5e90ebc723 | ||
|
|
088d027cc7 | ||
|
|
21face7b5d | ||
|
|
788b83c80f | ||
|
|
4ff6474464 | ||
|
|
5aaac9b285 | ||
|
|
4cf393bc35 | ||
|
|
e3aa7b06bc | ||
|
|
1aaf832ab0 | ||
|
|
494de3e294 | ||
|
|
d3da343a40 | ||
|
|
7c2b2199f5 | ||
|
|
5cfc82abb3 | ||
|
|
427cb6c8fd | ||
|
|
598282ec8f | ||
|
|
ecab39b16c | ||
|
|
d53d301616 | ||
|
|
3637dc0593 | ||
|
|
16afe00491 | ||
|
|
00004d3d3e | ||
|
|
616b9b4592 | ||
|
|
a5689e9fc7 | ||
|
|
2ca8ad93ea | ||
|
|
b68959d6b2 | ||
|
|
0ed4117fd6 | ||
|
|
7b24683892 | ||
|
|
2da4750852 | ||
|
|
0e6870c21a | ||
|
|
ef45c2bac3 | ||
|
|
b4eab319b1 | ||
|
|
007cd988ab | ||
|
|
dc91dc3fc2 | ||
|
|
1f06fd7254 | ||
|
|
2d028e843b | ||
|
|
172993189c | ||
|
|
8cbb2bd53c | ||
|
|
9d72e45d98 | ||
|
|
dae1a46598 | ||
|
|
78582b1c5f | ||
|
|
ae4c32a4c1 | ||
|
|
ba478b5b5b | ||
|
|
797c627590 | ||
|
|
25ed376446 | ||
|
|
8d94620d78 | ||
|
|
ecc9da252c | ||
|
|
1ebd54dc13 | ||
|
|
9a619c24fe | ||
|
|
2700c9511d | ||
|
|
8adeb5ea7b | ||
|
|
664e539c55 | ||
|
|
fb40c863c0 | ||
|
|
b0f916ae0c | ||
|
|
f75af3eaf5 | ||
|
|
9f89468396 | ||
|
|
31d8b16f9b | ||
|
|
5d5c995d23 | ||
|
|
ebdd70512c |
No files matched your search
@@ -4,7 +4,7 @@
|
||||
The compilation of software known as FreeBSD is distributed under the
|
||||
following terms:
|
||||
|
||||
Copyright (C) 1992-2007 The FreeBSD Project. All rights reserved.
|
||||
Copyright (C) 1992-2005 The FreeBSD Project. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
||||
+1
-1
@@ -554,7 +554,7 @@ update:
|
||||
@echo "--------------------------------------------------------------"
|
||||
@echo ">>> Updating ${.CURDIR} from cvs repository" ${CVSROOT}
|
||||
@echo "--------------------------------------------------------------"
|
||||
cd ${.CURDIR}; cvs -R -q update -rRELENG_4 -P -d
|
||||
cd ${.CURDIR}; cvs -R -q update -rRELENG_4_11 -P -d
|
||||
.endif
|
||||
|
||||
#
|
||||
|
||||
@@ -8,21 +8,123 @@ A reverse chronology since 4.0 was released is included, followed by
|
||||
the common items quick how-tos, followed by entries for versions of
|
||||
-current prior to 4.0 Release.
|
||||
|
||||
20070426:
|
||||
The ABI breakage in sendmail(8)'s libmilter has been repaired
|
||||
so it is no longer necessary to recompile mail filters (aka,
|
||||
milters). If you recompiled mail filters after the 20070411
|
||||
note, it is not necessary to recompile them again.
|
||||
This is for the 4.11 release branch. All entries since 4.11 are an
|
||||
itemized list of commits to this branch, numbered from the beginning.
|
||||
|
||||
20070411:
|
||||
sendmail(8) has been updated to version 8.14.1. Mail filters
|
||||
(aka, milters) compiled against the libmilter included in the
|
||||
base operating system should be recompiled.
|
||||
The security advisories related to various patches contain information
|
||||
on how to build/install a minimal set of binaries and start/stop a
|
||||
minimal number of processes, if possible, for that patch. For those
|
||||
updates that don't have an advisory, or to be safe, you can do a full
|
||||
build and install as described in the COMMON ITEMS section.
|
||||
|
||||
20050513:
|
||||
Intel Hyper-Threading is now disabled by default due to a
|
||||
security issue, but can be re-enabled by setting the
|
||||
machdep.hyperthreading_allowed tunable in /boot/loader.conf.
|
||||
20061206: p26 FreeBSD-SA-06:25.kmem, FreeBSD-SA-06.26.gtar
|
||||
Correct a signedness bug which allowed members of the operator
|
||||
group to read kernel memory. [06:25]
|
||||
|
||||
Disable handling of GNUTYPE_NAMES tar file entries by default,
|
||||
since they can be used to extract files outside of the cwd. [06:26]
|
||||
|
||||
20060930: p25 FreeBSD-SA-06:22.openssh
|
||||
Correct multiple vulnerabilities in sshd(8).
|
||||
|
||||
20060929: p24 FreeBSD-SA-06:23.openssl
|
||||
Correct problem in the 2006-09-28 patch concerning the handling of
|
||||
excessively large DH moduli.
|
||||
|
||||
20060928: p23 FreeBSD-SA-06:23.openssl
|
||||
Correct multiple vulnerabilities in crypto(3).
|
||||
Limit the size of public keys used in order to protect applications
|
||||
from a denial of service via insane key sizes.
|
||||
|
||||
20060919: p22 FreeBSD-SA-06:21.gzip
|
||||
Correct multiple vulnerabilities in gzip(1).
|
||||
|
||||
20060906: p21 FreeBSD-SA-06:19.openssl
|
||||
Correct incorrect PKCS#1 v1.5 padding validation in
|
||||
crypto(3).
|
||||
|
||||
20060823: p20 FreeBSD-SA-06:18.ppp
|
||||
Correct buffer overflow in the handling of LCP options in ppp(4).
|
||||
|
||||
20060614: p19 FreeBSD-SA-06:17.sendmail
|
||||
Correct a bug in the handling of multipart messages by sendmail(8)
|
||||
which can allow a malformed message to crash a sendmail queue
|
||||
processing process.
|
||||
|
||||
20060531: p18 FreeBSD-SA-06:16.smbfs
|
||||
Correct a bug in the handling of backslash characters in smbfs
|
||||
which can allow an attacker to escape from a chroot(2).
|
||||
|
||||
20060419: p17 FreeBSD-SA-06:14.fpu
|
||||
Correct a local information leakage bug affecting AMD FPUs.
|
||||
|
||||
20060322: p16 FreeBSD-SA-06:11.ipsec, FreeBSD-SA-06:12.opie,
|
||||
FreeBSD-SA-06:13.sendmail
|
||||
Add missing code needed for the detection of IPSec packet
|
||||
replays. [06:11]
|
||||
|
||||
Correctly identify the user running opiepasswd(1) when the login
|
||||
name differs from the account name. [06:12]
|
||||
|
||||
Modify timeout handling logic in sendmail(8) to correct a reported
|
||||
signal handling race condition. [06:13]
|
||||
|
||||
20060301: p15 FreeBSD-SA-06:10.nfs
|
||||
Correct a remote kernel panic when processing zero-length RPC
|
||||
records via TCP.
|
||||
|
||||
20060111: p14 FreeBSD-SA-06:01.texindex, FreeBSD-SA-06:02.ee,
|
||||
FreeBSD-SA-06:03.cpio
|
||||
Correct insecure temporary file usage in texindex. [06:01]
|
||||
|
||||
Correct insecure temporary file usage in ee. [06:02]
|
||||
|
||||
Correct a race condition when setting file permissions,
|
||||
sanitize file names by default, and fix a buffer overflow
|
||||
when handling files larger than 4GB in cpio. [06:03]
|
||||
|
||||
20051011: p13 FreeBSD-SA-05:21.openssl
|
||||
Correct a man-in-the-middle SSL version rollback vulnerability.
|
||||
|
||||
20050907: p12 FreeBSD-SA-05:20.cvsbug
|
||||
Correct insecure temporary file usage.
|
||||
|
||||
20050629: p11 FreeBSD-SA-05:14.bzip2, FreeBSD-SA-05:15.tcp
|
||||
Correct bzip2 denial of service and permission race vulnerabilities.
|
||||
|
||||
Correct TCP connection stall denial of service vulnerabilities.
|
||||
|
||||
20050608: p10 FreeBSD-SA-05:11.gzip
|
||||
Correct directory traversal and race condition vulnerabilities in gzip.
|
||||
|
||||
20050513: p9 FreeBSD-SA-05:09.htt
|
||||
Add a knob for disabling/enabling HTT. Default off due to information
|
||||
disclosure on multi-user systems.
|
||||
|
||||
20050508: p8 FreeBSD-SA-05:08.kmem
|
||||
Correct two issues which were missed from the earlier commit.
|
||||
|
||||
20050506: p7 FreeBSD-SA-05:08.kmem
|
||||
Correct several local kernel memory disclosure bugs.
|
||||
|
||||
20050506: p6 FreeBSD-SA-05:07.ldt
|
||||
Correctly validate inputs to the i386_get_ldt syscall.
|
||||
|
||||
20050506: p5 FreeBSD-SA-05:06.iir
|
||||
Correct overly liberal permissions on /dev/iir.
|
||||
|
||||
20050422: p4 FreeBSD-SA-05:05.cvs
|
||||
Correct several vulnerabilities in CVS.
|
||||
|
||||
20050414: p3 FreeBSD-SA-05:04.ifconf
|
||||
Zero a buffer in ifconf() in order to avoid accidental
|
||||
disclosure of kernel memory to userland.
|
||||
|
||||
20050404: p2 FreeBSD-SA-05:02.sendfile
|
||||
Correct kernel memory disclosure bug in sendfile(2).
|
||||
|
||||
20050328: p1 FreeBSD-SA-05:01.telnet
|
||||
Correct buffer overflows in telnet(1).
|
||||
|
||||
20050124:
|
||||
FreeBSD 4.11-RELEASE.
|
||||
@@ -870,7 +972,7 @@ versions of -stable/-current.
|
||||
Changes to the pccardd kernel interface require that you recompile
|
||||
pccardd for new kernel.
|
||||
|
||||
19990725:
|
||||
19980725:
|
||||
The ipfw interface to the kernel has changed. You will need to
|
||||
recompile ipfw programs for the new kernel.
|
||||
|
||||
|
||||
@@ -130,8 +130,6 @@
|
||||
/* we want to use the system malloc when we install as /bin/csh */
|
||||
#define SYSMALLOC
|
||||
#define BSD_STYLE_COLORLS
|
||||
/* Use LC_MESSAGES locale category to open the message catalog */
|
||||
#define MCLoadBySet NL_CAT_LOCALE
|
||||
#endif
|
||||
|
||||
#if defined(__bsdi__)
|
||||
|
||||
+15
-22
@@ -112,7 +112,7 @@ unit_t unitp [] = { NONE, KILO, MEGA, GIGA, TERA, PETA };
|
||||
int bread(off_t, void *, int);
|
||||
int checkvfsname(const char *, char **);
|
||||
char *getmntpt(char *);
|
||||
int int64width(int64_t);
|
||||
int longwidth(long);
|
||||
char *makenetvfslist(void);
|
||||
char **makevfslist(char *);
|
||||
void prthuman(struct statfs *, long);
|
||||
@@ -376,15 +376,9 @@ prthumanval(double bytes)
|
||||
* Convert statfs returned filesystem size into BLOCKSIZE units.
|
||||
* Attempts to avoid overflow for large filesystems.
|
||||
*/
|
||||
static int64_t
|
||||
fsbtoblk(int64_t num, uint64_t fsbs, u_long bs)
|
||||
{
|
||||
|
||||
if (fsbs != 0 && fsbs < bs)
|
||||
return (num / (int64_t)(bs / fsbs));
|
||||
else
|
||||
return (num * (int64_t)(fsbs / bs));
|
||||
}
|
||||
#define fsbtoblk(num, fsbs, bs) \
|
||||
(((fsbs) != 0 && (fsbs) < (bs)) ? \
|
||||
(num) / ((bs) / (fsbs)) : (num) * ((fsbs) / (bs)))
|
||||
|
||||
/*
|
||||
* Print out status about a filesystem.
|
||||
@@ -426,12 +420,11 @@ prtstat(struct statfs *sfsp, struct maxwidths *mwp)
|
||||
if (hflag) {
|
||||
prthuman(sfsp, used);
|
||||
} else {
|
||||
(void)printf(" %*lld %*lld %*lld", mwp->total,
|
||||
(long long)fsbtoblk(sfsp->f_blocks, sfsp->f_bsize,
|
||||
blocksize), mwp->used,
|
||||
(long long)fsbtoblk(used, sfsp->f_bsize, blocksize),
|
||||
mwp->avail, (long long)fsbtoblk(sfsp->f_bavail,
|
||||
sfsp->f_bsize, blocksize));
|
||||
(void)printf(" %*ld %*ld %*ld", mwp->total,
|
||||
fsbtoblk(sfsp->f_blocks, sfsp->f_bsize, blocksize),
|
||||
mwp->used, fsbtoblk(used, sfsp->f_bsize, blocksize),
|
||||
mwp->avail, fsbtoblk(sfsp->f_bavail, sfsp->f_bsize,
|
||||
blocksize));
|
||||
}
|
||||
(void)printf(" %5.0f%%",
|
||||
availblks == 0 ? 100.0 : (double)used / (double)availblks * 100.0);
|
||||
@@ -460,20 +453,20 @@ update_maxwidths(struct maxwidths *mwp, struct statfs *sfsp)
|
||||
getbsize(&dummy, &blocksize);
|
||||
|
||||
mwp->mntfrom = imax(mwp->mntfrom, strlen(sfsp->f_mntfromname));
|
||||
mwp->total = imax(mwp->total, int64width(fsbtoblk(sfsp->f_blocks,
|
||||
mwp->total = imax(mwp->total, longwidth(fsbtoblk(sfsp->f_blocks,
|
||||
sfsp->f_bsize, blocksize)));
|
||||
mwp->used = imax(mwp->used, int64width(fsbtoblk(sfsp->f_blocks -
|
||||
mwp->used = imax(mwp->used, longwidth(fsbtoblk(sfsp->f_blocks -
|
||||
sfsp->f_bfree, sfsp->f_bsize, blocksize)));
|
||||
mwp->avail = imax(mwp->avail, int64width(fsbtoblk(sfsp->f_bavail,
|
||||
mwp->avail = imax(mwp->avail, longwidth(fsbtoblk(sfsp->f_bavail,
|
||||
sfsp->f_bsize, blocksize)));
|
||||
mwp->iused = imax(mwp->iused, int64width(sfsp->f_files -
|
||||
mwp->iused = imax(mwp->iused, longwidth(sfsp->f_files -
|
||||
sfsp->f_ffree));
|
||||
mwp->ifree = imax(mwp->ifree, int64width(sfsp->f_ffree));
|
||||
mwp->ifree = imax(mwp->ifree, longwidth(sfsp->f_ffree));
|
||||
}
|
||||
|
||||
/* Return the width in characters of the specified long. */
|
||||
int
|
||||
int64width(int64_t val)
|
||||
longwidth(long val)
|
||||
{
|
||||
int len;
|
||||
|
||||
|
||||
+3
-5
@@ -35,7 +35,7 @@
|
||||
.\" @(#)ls.1 8.7 (Berkeley) 7/29/94
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd January 11, 2005
|
||||
.Dd July 8, 2002
|
||||
.Dt LS 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -188,9 +188,7 @@ This option overrides the environment variable
|
||||
.Dq ell . )
|
||||
List in long format.
|
||||
(See below.)
|
||||
A total sum (in blocks, see the
|
||||
.Fl s
|
||||
option for the block size unit) for all the file
|
||||
If the output is to a terminal, a total sum for all the file
|
||||
sizes is output on a line before the long listing.
|
||||
.It Fl m
|
||||
Stream output format; list files across the page, separated by commas.
|
||||
@@ -218,7 +216,7 @@ lexicographical order or the oldest entries first.
|
||||
.It Fl s
|
||||
Display the number of file system blocks actually used by each file, in units
|
||||
of 512 bytes, where partial units are rounded up to the next integer value.
|
||||
A total sum for all the file
|
||||
If the output is to a terminal, a total sum for all the file
|
||||
sizes is output on a line before the listing.
|
||||
The environment variable
|
||||
.Ev BLOCKSIZE
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PROG= rm
|
||||
WARNS?= 2
|
||||
SRCS= rm.c
|
||||
|
||||
LINKS= ${BINDIR}/rm ${BINDIR}/unlink
|
||||
MLINKS= rm.1 unlink.1
|
||||
|
||||
+26
-37
@@ -1,4 +1,3 @@
|
||||
.\"-
|
||||
.\" Copyright (c) 1990, 1993, 1994
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
.\"
|
||||
@@ -13,6 +12,10 @@
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\" 3. All advertising materials mentioning features or use of this software
|
||||
.\" must display the following acknowledgement:
|
||||
.\" This product includes software developed by the University of
|
||||
.\" California, Berkeley and its contributors.
|
||||
.\" 4. Neither the name of the University nor the names of its contributors
|
||||
.\" may be used to endorse or promote products derived from this software
|
||||
.\" without specific prior written permission.
|
||||
@@ -32,7 +35,7 @@
|
||||
.\" @(#)rm.1 8.5 (Berkeley) 12/5/94
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd September 29, 2005
|
||||
.Dd January 28, 1999
|
||||
.Dt RM 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -41,8 +44,7 @@
|
||||
.Nd remove directory entries
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl f | i
|
||||
.Op Fl dIPRrvW
|
||||
.Op Fl dfiPRrvW
|
||||
.Ar
|
||||
.Nm unlink
|
||||
.Ar file
|
||||
@@ -78,20 +80,10 @@ The
|
||||
option overrides any previous
|
||||
.Fl f
|
||||
options.
|
||||
.It Fl I
|
||||
Request confirmation once if more than three files are being removed or if a
|
||||
directory is being recursively removed.
|
||||
This is a far less intrusive option than
|
||||
.Fl i
|
||||
yet provides almost the same level of protection against mistakes.
|
||||
.It Fl P
|
||||
Overwrite regular files before deleting them.
|
||||
Files are overwritten three times, first with the byte pattern 0xff,
|
||||
then 0x00, and then 0xff again, before they are deleted.
|
||||
Specifying this flag for a read only file will cause
|
||||
.Nm
|
||||
to generate an error message and exit.
|
||||
The file wil not be removed or overwritten.
|
||||
.It Fl R
|
||||
Attempt to remove the file hierarchy rooted in each file argument.
|
||||
The
|
||||
@@ -123,10 +115,9 @@ The
|
||||
utility removes symbolic links, not the files referenced by the links.
|
||||
.Pp
|
||||
It is an error to attempt to remove the files
|
||||
.Pa / ,
|
||||
.Pa .\&
|
||||
.Dq .\&
|
||||
or
|
||||
.Pa .. .
|
||||
.Dq .. .
|
||||
.Pp
|
||||
When the utility is called as
|
||||
.Nm unlink ,
|
||||
@@ -157,17 +148,31 @@ to parse its arguments, which allows it to accept
|
||||
the
|
||||
.Sq Li --
|
||||
option which will cause it to stop processing flag options at that
|
||||
point.
|
||||
This will allow the removal of file names that begin
|
||||
point. This will allow the removal of file names that begin
|
||||
with a dash
|
||||
.Pq Sq - .
|
||||
For example:
|
||||
.Dl rm -- -filename
|
||||
The same behavior can be obtained by using an absolute or relative
|
||||
path reference.
|
||||
For example:
|
||||
path reference. For example:
|
||||
.Dl rm /home/user/-filename
|
||||
.Dl rm ./-filename
|
||||
.Sh SEE ALSO
|
||||
.Xr chflags 1 ,
|
||||
.Xr rmdir 1 ,
|
||||
.Xr undelete 2 ,
|
||||
.Xr unlink 2 ,
|
||||
.Xr fts 3 ,
|
||||
.Xr getopt 3 ,
|
||||
.Xr symlink 7
|
||||
.Sh BUGS
|
||||
The
|
||||
.Fl P
|
||||
option assumes that the underlying file system is a fixed-block file
|
||||
system.
|
||||
UFS is a fixed-block file system, LFS is not.
|
||||
In addition, only regular files are overwritten, other types of files
|
||||
are not.
|
||||
.Sh COMPATIBILITY
|
||||
The
|
||||
.Nm
|
||||
@@ -183,14 +188,6 @@ Also, historical
|
||||
.Bx
|
||||
implementations prompted on the standard output,
|
||||
not the standard error output.
|
||||
.Sh SEE ALSO
|
||||
.Xr chflags 1 ,
|
||||
.Xr rmdir 1 ,
|
||||
.Xr undelete 2 ,
|
||||
.Xr unlink 2 ,
|
||||
.Xr fts 3 ,
|
||||
.Xr getopt 3 ,
|
||||
.Xr symlink 7
|
||||
.Sh STANDARDS
|
||||
The
|
||||
.Nm
|
||||
@@ -206,11 +203,3 @@ A
|
||||
.Nm
|
||||
command appeared in
|
||||
.At v1 .
|
||||
.Sh BUGS
|
||||
The
|
||||
.Fl P
|
||||
option assumes that the underlying file system is a fixed-block file
|
||||
system.
|
||||
UFS is a fixed-block file system, LFS is not.
|
||||
In addition, only regular files are overwritten, other types of files
|
||||
are not.
|
||||
+28
-129
@@ -10,6 +10,10 @@
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
@@ -27,7 +31,6 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
#ifndef lint
|
||||
static const char copyright[] =
|
||||
"@(#) Copyright (c) 1990, 1993, 1994\n\
|
||||
@@ -35,9 +38,10 @@ static const char copyright[] =
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)rm.c 8.5 (Berkeley) 4/18/94";
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
@@ -49,8 +53,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <fts.h>
|
||||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -58,29 +60,26 @@ __FBSDID("$FreeBSD$");
|
||||
#include <unistd.h>
|
||||
|
||||
int dflag, eval, fflag, iflag, Pflag, vflag, Wflag, stdin_ok;
|
||||
int rflag, Iflag;
|
||||
uid_t uid;
|
||||
|
||||
int check(char *, char *, struct stat *);
|
||||
int check2(char **);
|
||||
void checkdot(char **);
|
||||
void checkslash(char **);
|
||||
void rm_file(char **);
|
||||
int rm_overwrite(char *, struct stat *);
|
||||
void rm_overwrite(char *, struct stat *);
|
||||
void rm_tree(char **);
|
||||
void usage(void);
|
||||
|
||||
/*
|
||||
* rm --
|
||||
* This rm is different from historic rm's, but is expected to match
|
||||
* POSIX 1003.2 behavior. The most visible difference is that -f
|
||||
* POSIX 1003.2 behavior. The most visible difference is that -f
|
||||
* has two specific effects now, ignore non-existent files and force
|
||||
* file removal.
|
||||
* file removal.
|
||||
*/
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int ch;
|
||||
int ch, rflag;
|
||||
char *p;
|
||||
|
||||
/*
|
||||
@@ -104,7 +103,7 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
Pflag = rflag = 0;
|
||||
while ((ch = getopt(argc, argv, "dfiIPRrvW")) != -1)
|
||||
while ((ch = getopt(argc, argv, "dfiPRrvW")) != -1)
|
||||
switch(ch) {
|
||||
case 'd':
|
||||
dflag = 1;
|
||||
@@ -117,9 +116,6 @@ main(int argc, char *argv[])
|
||||
fflag = 0;
|
||||
iflag = 1;
|
||||
break;
|
||||
case 'I':
|
||||
Iflag = 1;
|
||||
break;
|
||||
case 'P':
|
||||
Pflag = 1;
|
||||
break;
|
||||
@@ -141,22 +137,16 @@ main(int argc, char *argv[])
|
||||
|
||||
if (argc < 1) {
|
||||
if (fflag)
|
||||
return (0);
|
||||
return 0;
|
||||
usage();
|
||||
}
|
||||
|
||||
checkdot(argv);
|
||||
if (getenv("POSIXLY_CORRECT") == NULL)
|
||||
checkslash(argv);
|
||||
uid = geteuid();
|
||||
|
||||
if (*argv) {
|
||||
stdin_ok = isatty(STDIN_FILENO);
|
||||
|
||||
if (Iflag) {
|
||||
if (check2(argv) == 0)
|
||||
exit (1);
|
||||
}
|
||||
if (rflag)
|
||||
rm_tree(argv);
|
||||
else
|
||||
@@ -192,11 +182,8 @@ rm_tree(char **argv)
|
||||
flags |= FTS_NOSTAT;
|
||||
if (Wflag)
|
||||
flags |= FTS_WHITEOUT;
|
||||
if (!(fts = fts_open(argv, flags, NULL))) {
|
||||
if (fflag && errno == ENOENT)
|
||||
return;
|
||||
err(1, "fts_open");
|
||||
}
|
||||
if (!(fts = fts_open(argv, flags, NULL)))
|
||||
err(1, NULL);
|
||||
while ((p = fts_read(fts)) != NULL) {
|
||||
switch (p->fts_info) {
|
||||
case FTS_DNR:
|
||||
@@ -210,8 +197,8 @@ rm_tree(char **argv)
|
||||
errx(1, "%s: %s", p->fts_path, strerror(p->fts_errno));
|
||||
case FTS_NS:
|
||||
/*
|
||||
* Assume that since fts_read() couldn't stat the
|
||||
* file, it can't be unlinked.
|
||||
* FTS_NS: assume that if can't stat the file, it
|
||||
* can't be unlinked.
|
||||
*/
|
||||
if (!needstat)
|
||||
break;
|
||||
@@ -280,18 +267,9 @@ rm_tree(char **argv)
|
||||
}
|
||||
break;
|
||||
|
||||
case FTS_NS:
|
||||
/*
|
||||
* Assume that since fts_read() couldn't stat
|
||||
* the file, it can't be unlinked.
|
||||
*/
|
||||
if (fflag)
|
||||
continue;
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
if (Pflag)
|
||||
if (!rm_overwrite(p->fts_accpath, NULL))
|
||||
continue;
|
||||
rm_overwrite(p->fts_accpath, NULL);
|
||||
rval = unlink(p->fts_accpath);
|
||||
if (rval == 0 || (fflag && errno == ENOENT)) {
|
||||
if (rval == 0 && vflag)
|
||||
@@ -357,8 +335,7 @@ rm_file(char **argv)
|
||||
rval = rmdir(f);
|
||||
else {
|
||||
if (Pflag)
|
||||
if (!rm_overwrite(f, &sb))
|
||||
continue;
|
||||
rm_overwrite(f, &sb);
|
||||
rval = unlink(f);
|
||||
}
|
||||
}
|
||||
@@ -378,11 +355,11 @@ rm_file(char **argv)
|
||||
* XXX
|
||||
* This is a cheap way to *really* delete files. Note that only regular
|
||||
* files are deleted, directories (and therefore names) will remain.
|
||||
* Also, this assumes a fixed-block file system (like FFS, or a V7 or a
|
||||
* System V file system). In a logging file system, you'll have to have
|
||||
* Also, this assumes a fixed-block filesystem (like FFS, or a V7 or a
|
||||
* System V filesystem). In a logging filesystem, you'll have to have
|
||||
* kernel support.
|
||||
*/
|
||||
int
|
||||
void
|
||||
rm_overwrite(char *file, struct stat *sbp)
|
||||
{
|
||||
struct stat sb;
|
||||
@@ -398,14 +375,14 @@ rm_overwrite(char *file, struct stat *sbp)
|
||||
sbp = &sb;
|
||||
}
|
||||
if (!S_ISREG(sbp->st_mode))
|
||||
return (1);
|
||||
return;
|
||||
if ((fd = open(file, O_WRONLY, 0)) == -1)
|
||||
goto err;
|
||||
if (fstatfs(fd, &fsb) == -1)
|
||||
goto err;
|
||||
bsize = MAX(fsb.f_iosize, 1024);
|
||||
if ((buf = malloc(bsize)) == NULL)
|
||||
err(1, "%s: malloc", file);
|
||||
err(1, "malloc");
|
||||
|
||||
#define PASS(byte) { \
|
||||
memset(buf, byte, bsize); \
|
||||
@@ -424,16 +401,13 @@ rm_overwrite(char *file, struct stat *sbp)
|
||||
PASS(0xff);
|
||||
if (!fsync(fd) && !close(fd)) {
|
||||
free(buf);
|
||||
return (1);
|
||||
return;
|
||||
}
|
||||
|
||||
err: eval = 1;
|
||||
if (buf)
|
||||
free(buf);
|
||||
if (fd != -1)
|
||||
close(fd);
|
||||
warn("%s", file);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
@@ -449,7 +423,7 @@ check(char *path, char *name, struct stat *sp)
|
||||
else {
|
||||
/*
|
||||
* If it's not a symbolic link and it's unwritable and we're
|
||||
* talking to a terminal, ask. Symbolic links are excluded
|
||||
* talking to a terminal, ask. Symbolic links are excluded
|
||||
* because their permissions are meaningless. Check stdin_ok
|
||||
* first because we may not have stat'ed the file.
|
||||
*/
|
||||
@@ -460,16 +434,12 @@ check(char *path, char *name, struct stat *sp)
|
||||
return (1);
|
||||
strmode(sp->st_mode, modep);
|
||||
if ((flagsp = fflagstostr(sp->st_flags)) == NULL)
|
||||
err(1, "fflagstostr");
|
||||
if (Pflag)
|
||||
errx(1,
|
||||
"%s: -P was specified, but file is not writable",
|
||||
path);
|
||||
err(1, NULL);
|
||||
(void)fprintf(stderr, "override %s%s%s/%s %s%sfor %s? ",
|
||||
modep + 1, modep[9] == ' ' ? "" : " ",
|
||||
user_from_uid(sp->st_uid, 0),
|
||||
group_from_gid(sp->st_gid, 0),
|
||||
*flagsp ? flagsp : "", *flagsp ? " " : "",
|
||||
*flagsp ? flagsp : "", *flagsp ? " " : "",
|
||||
path);
|
||||
free(flagsp);
|
||||
}
|
||||
@@ -481,77 +451,6 @@ check(char *path, char *name, struct stat *sp)
|
||||
return (first == 'y' || first == 'Y');
|
||||
}
|
||||
|
||||
#define ISSLASH(a) ((a)[0] == '/' && (a)[1] == '\0')
|
||||
void
|
||||
checkslash(char **argv)
|
||||
{
|
||||
char **t, **u;
|
||||
int complained;
|
||||
|
||||
complained = 0;
|
||||
for (t = argv; *t;) {
|
||||
if (ISSLASH(*t)) {
|
||||
if (!complained++)
|
||||
warnx("\"/\" may not be removed");
|
||||
eval = 1;
|
||||
for (u = t; u[0] != NULL; ++u)
|
||||
u[0] = u[1];
|
||||
} else {
|
||||
++t;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
check2(char **argv)
|
||||
{
|
||||
struct stat st;
|
||||
int first;
|
||||
int ch;
|
||||
int fcount = 0;
|
||||
int dcount = 0;
|
||||
int i;
|
||||
const char *dname = NULL;
|
||||
|
||||
for (i = 0; argv[i]; ++i) {
|
||||
if (lstat(argv[i], &st) == 0) {
|
||||
if (S_ISDIR(st.st_mode)) {
|
||||
++dcount;
|
||||
dname = argv[i]; /* only used if 1 dir */
|
||||
} else {
|
||||
++fcount;
|
||||
}
|
||||
}
|
||||
}
|
||||
first = 0;
|
||||
while (first != 'n' && first != 'N' && first != 'y' && first != 'Y') {
|
||||
if (dcount && rflag) {
|
||||
fprintf(stderr, "recursively remove");
|
||||
if (dcount == 1)
|
||||
fprintf(stderr, " %s", dname);
|
||||
else
|
||||
fprintf(stderr, " %d dirs", dcount);
|
||||
if (fcount == 1)
|
||||
fprintf(stderr, " and 1 file");
|
||||
else if (fcount > 1)
|
||||
fprintf(stderr, " and %d files", fcount);
|
||||
} else if (dcount + fcount > 3) {
|
||||
fprintf(stderr, "remove %d files", dcount + fcount);
|
||||
} else {
|
||||
return(1);
|
||||
}
|
||||
fprintf(stderr, "? ");
|
||||
fflush(stderr);
|
||||
|
||||
first = ch = getchar();
|
||||
while (ch != '\n' && ch != EOF)
|
||||
ch = getchar();
|
||||
if (ch == EOF)
|
||||
break;
|
||||
}
|
||||
return (first == 'y' || first == 'Y');
|
||||
}
|
||||
|
||||
#define ISDOT(a) ((a)[0] == '.' && (!(a)[1] || ((a)[1] == '.' && !(a)[2])))
|
||||
void
|
||||
checkdot(char **argv)
|
||||
@@ -582,7 +481,7 @@ usage(void)
|
||||
{
|
||||
|
||||
(void)fprintf(stderr, "%s\n%s\n",
|
||||
"usage: rm [-f | -i] [-dIPRrvW] file ...",
|
||||
"usage: rm [-f | -i] [-dPRrvW] file ...",
|
||||
" unlink file");
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
+1
-1
@@ -1164,7 +1164,7 @@ expmeta(char *enddir, char *name)
|
||||
if (*p == '\0')
|
||||
break;
|
||||
}
|
||||
if (metaflag == 0 || lstat(expdir, &statb) >= 0)
|
||||
if (metaflag == 0 || stat(expdir, &statb) >= 0)
|
||||
addfname(expdir);
|
||||
return;
|
||||
}
|
||||
|
||||
+1
-2
@@ -930,8 +930,7 @@ dowait(int block, struct job *job)
|
||||
in_dowait--;
|
||||
if (breakwaitcmd != 0) {
|
||||
breakwaitcmd = 0;
|
||||
if (pid <= 0)
|
||||
return -1;
|
||||
return -1;
|
||||
}
|
||||
if (pid <= 0)
|
||||
return pid;
|
||||
|
||||
@@ -969,7 +969,6 @@ readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs)
|
||||
USTPUTC('\\', out);
|
||||
pungetc();
|
||||
} else if (c == '\n') {
|
||||
plinno++;
|
||||
if (doprompt)
|
||||
setprompt(2);
|
||||
else
|
||||
|
||||
+1
-1
@@ -262,7 +262,7 @@ When waiting for a child, execute traps immediately.
|
||||
If this option is not set,
|
||||
traps are executed after the child exits,
|
||||
as specified in
|
||||
.St -p1003.2 .
|
||||
.St -p1003.2
|
||||
This nonstandard option is useful for putting guarding shells around
|
||||
children that block signals. The surrounding shell may kill the child
|
||||
or it may just return control to the tty and leave the child alone,
|
||||
|
||||
@@ -429,16 +429,6 @@ warning: this CVS does not support PreservePermissions");
|
||||
else if (strcmp (p, "stat") == 0)
|
||||
RereadLogAfterVerify = LOGMSG_REREAD_STAT;
|
||||
}
|
||||
else if (strcmp(line, "LocalKeyword") == 0)
|
||||
{
|
||||
/* Recognize cvs-1.12-style keyword control rather than erroring out. */
|
||||
RCS_setlocalid(p);
|
||||
}
|
||||
else if (strcmp(line, "KeywordExpand") == 0)
|
||||
{
|
||||
/* Recognize cvs-1.12-style keyword control rather than erroring out. */
|
||||
RCS_setincexc(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We may be dealing with a keyword which was added in a
|
||||
|
||||
@@ -551,6 +551,10 @@
|
||||
.ds doc-date-12 December
|
||||
.
|
||||
.de Dd
|
||||
. \" XXX: why do we need gX?
|
||||
. if "\*[doc-date-string]"" \
|
||||
. nr gX 1
|
||||
.
|
||||
. ie \n[.$] \{\
|
||||
. ie (\n[.$] == 3) \
|
||||
. ds doc-date-string \$1\~\$2 \$3
|
||||
|
||||
@@ -180,6 +180,8 @@
|
||||
.ds Ba \f[R]|\f[]
|
||||
.ds Am &
|
||||
.
|
||||
.nr gX 0
|
||||
.
|
||||
.
|
||||
.\" NS doc-header-string global string
|
||||
.\" NS the final string used for the manual page header
|
||||
@@ -201,8 +203,12 @@
|
||||
. wh 0 doc-header
|
||||
. wh -1.25i doc-footer
|
||||
.
|
||||
. if \n[gX] \
|
||||
. ds doc-command-name
|
||||
.
|
||||
. br
|
||||
.
|
||||
. nr gX 0
|
||||
. e@ doc-end-macro
|
||||
..
|
||||
.
|
||||
|
||||
@@ -697,7 +697,6 @@
|
||||
.ds doc-str-Lb-libmagic Magic Number Recognition Library (libmagic, \-lmagic)
|
||||
.ds doc-str-Lb-libmenu Curses Menu Library (libmenu, \-lmenu)
|
||||
.ds doc-str-Lb-libossaudio OSS Audio Emulation Library (libossaudio, \-lossaudio)
|
||||
.ds doc-str-Lb-libpam Pluggable Authentication Module Library (libpam, \-lpam)
|
||||
.ds doc-str-Lb-libpcap Packet Capture Library (libpcap, \-lpcap)
|
||||
.ds doc-str-Lb-libpci PCI Bus Access Library (libpci, \-lpci)
|
||||
.ds doc-str-Lb-libpmc Performance Counters Library (libpmc, \-lpmc)
|
||||
|
||||
+26
-43
@@ -2179,21 +2179,10 @@
|
||||
. doc-parse-args \$@
|
||||
. \}
|
||||
. el \{\
|
||||
. ie \n[doc-space-mode] \{\
|
||||
. ds doc-saved-space "\*[doc-space]
|
||||
. ds doc-space
|
||||
. ie \n[doc-space-mode] \
|
||||
. nr doc-space-mode 0
|
||||
. \}
|
||||
. el \{\
|
||||
. ds doc-space "\*[doc-saved-space]
|
||||
. el \
|
||||
. nr doc-space-mode 1
|
||||
.
|
||||
. \" finish line only if it is interrupted and `doc-have-space'
|
||||
. \" isn't set
|
||||
. if \n[doc-reg-Sm] \
|
||||
. if \n[.int] \
|
||||
. nop \)
|
||||
. \}
|
||||
. \}\}
|
||||
.
|
||||
. if !\n[doc-arg-limit] \
|
||||
@@ -2218,15 +2207,10 @@
|
||||
. el \{\
|
||||
. \" no argument for Sm
|
||||
. nr doc-arg-ptr -1
|
||||
. ie \n[doc-space-mode] \{\
|
||||
. ds doc-saved-space "\*[doc-space]
|
||||
. ds doc-space
|
||||
. ie \n[doc-space-mode] \
|
||||
. nr doc-space-mode 0
|
||||
. \}
|
||||
. el \{\
|
||||
. ds doc-space "\*[doc-saved-space]
|
||||
. el \
|
||||
. nr doc-space-mode 1
|
||||
. \}
|
||||
. \}\}
|
||||
.
|
||||
. ie \n[doc-space-mode] \{\
|
||||
@@ -2253,13 +2237,18 @@
|
||||
. \}
|
||||
.
|
||||
. \" do we have parameters to print?
|
||||
. ie (\n[doc-arg-limit] > \n[doc-arg-ptr]) \{\
|
||||
. ie (\n[doc-arg-limit] <= \n[doc-arg-ptr]) \{\
|
||||
. \" ignore `.Sm on' and `.Sm off' without additional parameters
|
||||
. ie (\n[doc-arg-ptr] > 1) \
|
||||
. doc-print-and-reset
|
||||
. el \
|
||||
. doc-reset-args
|
||||
. \}
|
||||
. el \{\
|
||||
. \" skip `Sm' argument
|
||||
. nr doc-arg-ptr +1
|
||||
. doc-print-recursive
|
||||
. \}
|
||||
. el \
|
||||
. doc-reset-args
|
||||
..
|
||||
.
|
||||
.
|
||||
@@ -2512,9 +2501,7 @@
|
||||
. nop \)\s[\n[doc-fontmode-size-stack\n[doc-fontmode-depth]]u]\c
|
||||
.
|
||||
. nr doc-fontmode-font-stack\n[doc-fontmode-depth] 0
|
||||
. nr doc-curr-font \n[.f]
|
||||
. nr doc-fontmode-size-stack\n[doc-fontmode-depth] 0
|
||||
. nr doc-curr-size \n[.ps]
|
||||
. nr doc-fontmode-depth -1
|
||||
. \}
|
||||
. el \
|
||||
@@ -5157,10 +5144,6 @@
|
||||
. ie \n[.$] \
|
||||
. tm Usage: .Re (does not take arguments) (#\n[.c])
|
||||
. el \{\
|
||||
. if !\n[doc-is-reference] \{\
|
||||
. tm mdoc warning: Extraneous .Re (#\n[.c])
|
||||
. return
|
||||
. \}
|
||||
. doc-print-reference
|
||||
. doc-reset-reference
|
||||
. nr doc-is-reference 0
|
||||
@@ -5239,7 +5222,7 @@
|
||||
.\" NS doc-reference-count
|
||||
.
|
||||
.de doc-finish-reference
|
||||
. nr doc-reference-count -\$1
|
||||
. nr doc-reference-count -1
|
||||
. ie \n[doc-reference-count] \
|
||||
. nop \),
|
||||
. el \
|
||||
@@ -5269,81 +5252,81 @@
|
||||
. chop doc-reference-title-name-for-book
|
||||
. ie ((\n[doc-journal-count] == 1) : (\n[doc-book-count] == 1)) \{\
|
||||
. nop \)\*[q]\)\*[doc-reference-title-name-for-book]\)\*[q]\c
|
||||
. doc-finish-reference \n[doc-reference-title-count]
|
||||
. doc-finish-reference
|
||||
. \}
|
||||
. el \{\
|
||||
. nop \*[doc-reference-title-name]\c
|
||||
. doc-finish-reference \n[doc-reference-title-count]
|
||||
. doc-finish-reference
|
||||
. \}\}
|
||||
.
|
||||
. if \n[doc-book-count] \{\
|
||||
. unformat doc-book-name
|
||||
. chop doc-book-name
|
||||
. nop \*[doc-book-name]\c
|
||||
. doc-finish-reference \n[doc-book-count]
|
||||
. doc-finish-reference
|
||||
. \}
|
||||
.
|
||||
. if \n[doc-publisher-count] \{\
|
||||
. unformat doc-publisher-name
|
||||
. chop doc-publisher-name
|
||||
. nop \*[doc-publisher-name]\c
|
||||
. doc-finish-reference \n[doc-publisher-count]
|
||||
. doc-finish-reference
|
||||
. \}
|
||||
.
|
||||
. if \n[doc-journal-count] \{\
|
||||
. unformat doc-journal-name
|
||||
. chop doc-journal-name
|
||||
. nop \*[doc-journal-name]\c
|
||||
. doc-finish-reference \n[doc-journal-count]
|
||||
. doc-finish-reference
|
||||
. \}
|
||||
.
|
||||
. if \n[doc-report-count] \{\
|
||||
. unformat doc-report-name
|
||||
. chop doc-report-name
|
||||
. nop \*[doc-report-name]\c
|
||||
. doc-finish-reference \n[doc-report-count]
|
||||
. doc-finish-reference
|
||||
. \}
|
||||
.
|
||||
. if \n[doc-issue-count] \{\
|
||||
. unformat doc-issue-name
|
||||
. chop doc-issue-name
|
||||
. nop \*[doc-issue-name]\c
|
||||
. doc-finish-reference \n[doc-issue-count]
|
||||
. doc-finish-reference
|
||||
. \}
|
||||
.
|
||||
. if \n[doc-volume-count] \{\
|
||||
. unformat doc-volume-name
|
||||
. chop doc-volume-name
|
||||
. nop \*[doc-volume-name]\c
|
||||
. doc-finish-reference \n[doc-volume-count]
|
||||
. doc-finish-reference
|
||||
. \}
|
||||
.
|
||||
. if \n[doc-page-number-count] \{\
|
||||
. unformat doc-page-number-string
|
||||
. chop doc-page-number-string
|
||||
. nop \*[doc-page-number-string]\c
|
||||
. doc-finish-reference \n[doc-page-number-count]
|
||||
. doc-finish-reference
|
||||
. \}
|
||||
.
|
||||
. if \n[doc-corporate-count] \{\
|
||||
. unformat doc-corporate-name
|
||||
. chop doc-corporate-name
|
||||
. nop \*[doc-corporate-name]\c
|
||||
. doc-finish-reference \n[doc-corporate-count]
|
||||
. doc-finish-reference
|
||||
. \}
|
||||
.
|
||||
. if \n[doc-date-count] \{\
|
||||
. unformat doc-date
|
||||
. chop doc-date
|
||||
. nop \*[doc-date]\c
|
||||
. doc-finish-reference \n[doc-date-count]
|
||||
. doc-finish-reference
|
||||
. \}
|
||||
.
|
||||
. if \n[doc-optional-count] \{\
|
||||
. unformat doc-optional-string
|
||||
. chop doc-optional-string
|
||||
. nop \*[doc-optional-string]\c
|
||||
. doc-finish-reference \n[doc-optional-count]
|
||||
. doc-finish-reference
|
||||
. \}
|
||||
.
|
||||
. if \n[doc-reference-count] \
|
||||
@@ -6173,7 +6156,7 @@
|
||||
. \}\}\}
|
||||
. el \{\
|
||||
. tm1 "Usage: .An {-nosplit | -split}
|
||||
. tm1 " .An author_name ... (#\n[.c])
|
||||
. tm1 .An author_name ... (#\n[.c])
|
||||
. \}\}
|
||||
.
|
||||
. if \n[doc-in-authors-section] \{\
|
||||
|
||||
@@ -1677,6 +1677,8 @@ and their results are:
|
||||
.Lb libcurses
|
||||
.It Li libedit
|
||||
.Lb libedit
|
||||
.It Li libedit
|
||||
.Lb libedit
|
||||
.It Li libevent
|
||||
.Lb libevent
|
||||
.It Li libform
|
||||
@@ -1699,8 +1701,6 @@ and their results are:
|
||||
.Lb libmenu
|
||||
.It Li libossaudio
|
||||
.Lb libossaudio
|
||||
.It Li libpam
|
||||
.Lb libpam
|
||||
.It Li libpcap
|
||||
.Lb libpcap
|
||||
.It Li libpci
|
||||
|
||||
+139
-73
@@ -1,4 +1,4 @@
|
||||
# $Id: CACerts,v 8.3 2007/06/11 22:04:46 ca Exp $
|
||||
# $Id: CACerts,v 8.1 2004/03/01 22:05:47 ca Exp $
|
||||
# This file contains some CA certificates that are used to sign the
|
||||
# certificates of mail servers of members of the sendmail consortium
|
||||
# who may reply to questions etc sent to sendmail.org.
|
||||
@@ -73,6 +73,73 @@ iTMZxC4pWjmnDueb0kzHuX1qPrQAg4bTFij9rVVlYE4UAkbT
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
|
||||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number: 0 (0x0)
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
Issuer: C=US, ST=California, L=Emeryville, O=gshapiro.net, CN=Certificate Authority/[email protected]
|
||||
Validity
|
||||
Not Before: Jan 1 04:39:54 2002 GMT
|
||||
Not After : Dec 31 04:39:54 2006 GMT
|
||||
Subject: C=US, ST=California, L=Emeryville, O=gshapiro.net, CN=Certificate Authority/[email protected]
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
RSA Public Key: (1024 bit)
|
||||
Modulus (1024 bit):
|
||||
00:aa:dd:a2:fe:3b:fa:2f:5c:3d:f1:e1:d4:1d:55:
|
||||
04:27:6b:01:62:00:d7:02:cb:74:47:69:84:d7:c6:
|
||||
c5:71:55:79:35:3a:a8:ce:de:48:23:53:80:3c:cd:
|
||||
54:2e:e9:fe:b1:76:5a:be:cb:fd:2d:dc:a3:36:c5:
|
||||
c7:1e:4e:ef:76:f0:55:8f:a0:a5:f8:07:c5:52:1d:
|
||||
a2:42:81:4d:8a:c8:42:3f:f3:01:80:f9:46:35:a6:
|
||||
bc:c0:9b:9f:33:8b:49:9b:1d:87:8f:19:48:15:21:
|
||||
23:57:df:6e:4d:03:ed:ae:9f:0b:91:b7:a9:47:66:
|
||||
f1:0d:1b:1c:5d:b4:57:60:c7
|
||||
Exponent: 65537 (0x10001)
|
||||
X509v3 extensions:
|
||||
X509v3 Subject Key Identifier:
|
||||
A0:6D:E0:06:AF:61:94:B4:C6:84:15:B4:8B:74:22:67:4A:43:60:CA
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:A0:6D:E0:06:AF:61:94:B4:C6:84:15:B4:8B:74:22:67:4A:43:60:CA
|
||||
DirName:/C=US/ST=California/L=Emeryville/O=gshapiro.net/CN=Certificate Authority/[email protected]
|
||||
serial:00
|
||||
|
||||
X509v3 Basic Constraints:
|
||||
CA:TRUE
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
87:27:d2:2a:3a:dc:04:cd:ef:e8:7b:1c:34:47:2e:13:34:a5:
|
||||
08:f9:4d:df:d8:e1:6d:e6:9a:db:38:ee:20:6d:4a:ae:6f:1e:
|
||||
bc:71:61:a4:b4:d6:40:24:ee:65:ca:e9:81:5a:ef:ee:62:57:
|
||||
70:05:46:91:6b:d0:c6:a6:e9:38:65:ae:ea:50:b3:5c:27:c4:
|
||||
7a:bd:95:8c:cb:45:ef:fc:fc:99:e5:6a:61:c3:44:77:d8:1f:
|
||||
d6:b4:17:44:15:9a:bc:26:5b:ec:4e:29:5d:fd:cf:61:f3:be:
|
||||
91:a4:3b:51:e6:73:5b:17:82:9d:5a:56:2c:63:c2:f1:d6:a2:
|
||||
4c:5a
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDoTCCAwqgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBmDELMAkGA1UEBhMCVVMx
|
||||
EzARBgNVBAgTCkNhbGlmb3JuaWExEzARBgNVBAcTCkVtZXJ5dmlsbGUxFTATBgNV
|
||||
BAoTDGdzaGFwaXJvLm5ldDEeMBwGA1UEAxMVQ2VydGlmaWNhdGUgQXV0aG9yaXR5
|
||||
MSgwJgYJKoZIhvcNAQkBFhljZXJ0aWZpY2F0ZXNAZ3NoYXBpcm8ubmV0MB4XDTAy
|
||||
MDEwMTA0Mzk1NFoXDTA2MTIzMTA0Mzk1NFowgZgxCzAJBgNVBAYTAlVTMRMwEQYD
|
||||
VQQIEwpDYWxpZm9ybmlhMRMwEQYDVQQHEwpFbWVyeXZpbGxlMRUwEwYDVQQKEwxn
|
||||
c2hhcGlyby5uZXQxHjAcBgNVBAMTFUNlcnRpZmljYXRlIEF1dGhvcml0eTEoMCYG
|
||||
CSqGSIb3DQEJARYZY2VydGlmaWNhdGVzQGdzaGFwaXJvLm5ldDCBnzANBgkqhkiG
|
||||
9w0BAQEFAAOBjQAwgYkCgYEAqt2i/jv6L1w98eHUHVUEJ2sBYgDXAst0R2mE18bF
|
||||
cVV5NTqozt5II1OAPM1ULun+sXZavsv9LdyjNsXHHk7vdvBVj6Cl+AfFUh2iQoFN
|
||||
ishCP/MBgPlGNaa8wJufM4tJmx2HjxlIFSEjV99uTQPtrp8LkbepR2bxDRscXbRX
|
||||
YMcCAwEAAaOB+DCB9TAdBgNVHQ4EFgQUoG3gBq9hlLTGhBW0i3QiZ0pDYMowgcUG
|
||||
A1UdIwSBvTCBuoAUoG3gBq9hlLTGhBW0i3QiZ0pDYMqhgZ6kgZswgZgxCzAJBgNV
|
||||
BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRMwEQYDVQQHEwpFbWVyeXZpbGxl
|
||||
MRUwEwYDVQQKEwxnc2hhcGlyby5uZXQxHjAcBgNVBAMTFUNlcnRpZmljYXRlIEF1
|
||||
dGhvcml0eTEoMCYGCSqGSIb3DQEJARYZY2VydGlmaWNhdGVzQGdzaGFwaXJvLm5l
|
||||
dIIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4GBAIcn0io63ATN7+h7
|
||||
HDRHLhM0pQj5Td/Y4W3mmts47iBtSq5vHrxxYaS01kAk7mXK6YFa7+5iV3AFRpFr
|
||||
0Mam6ThlrupQs1wnxHq9lYzLRe/8/JnlamHDRHfYH9a0F0QVmrwmW+xOKV39z2Hz
|
||||
vpGkO1Hmc1sXgp1aVixjwvHWokxa
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
|
||||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
@@ -143,94 +210,93 @@ xBJlUbs98fcltM0L9lt6YSWtBgoBVdxxBSkNc+kwUb7T4bKJ/A8o9wZ1lhs0deAH
|
||||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number:
|
||||
fa:7c:2c:80:29:3f:c2:64
|
||||
Serial Number: 0 (0x0)
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org
|
||||
Issuer: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2003/emailAddress=ca+ca-rsa2003@esmtp.org
|
||||
Validity
|
||||
Not Before: May 4 02:07:56 2007 GMT
|
||||
Not After : May 3 02:07:56 2010 GMT
|
||||
Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org
|
||||
Not Before: Aug 7 15:56:45 2003 GMT
|
||||
Not After : Aug 6 15:56:45 2006 GMT
|
||||
Subject: C=US, ST=California, L=Berkeley, O=Endmail Org, OU=MTA, CN=Claus Assmann CA RSA 2003/emailAddress=ca+ca-rsa2003@esmtp.org
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
RSA Public Key: (2048 bit)
|
||||
Modulus (2048 bit):
|
||||
00:b0:28:91:31:af:82:ce:72:ef:36:ab:7d:e9:b1:
|
||||
f5:77:66:38:4b:38:1f:5f:3d:12:d3:c8:fd:9a:f4:
|
||||
d4:f6:b8:90:f9:26:5f:29:f7:43:f9:34:ec:65:62:
|
||||
01:bb:64:f1:5d:ea:75:04:3d:92:65:60:a2:06:62:
|
||||
fa:88:ca:d8:20:50:c8:1e:38:53:b5:18:dd:b7:bd:
|
||||
c7:08:35:4c:d9:dc:c6:97:56:37:b6:65:33:74:5a:
|
||||
b2:c3:85:08:2b:b7:26:70:ff:38:02:1a:67:6a:d0:
|
||||
49:18:10:4b:f8:db:af:06:9c:b1:a8:82:a1:b1:75:
|
||||
d2:52:9b:53:0c:ca:a7:e3:15:38:79:6d:a1:f5:ef:
|
||||
7c:8b:fd:bd:04:78:f9:e8:1e:b9:92:ea:74:d7:45:
|
||||
1e:4c:c8:bd:f4:5c:fc:1a:7f:e7:31:c6:ab:cb:78:
|
||||
c7:4d:2f:b5:72:10:35:27:4a:1a:fa:53:19:f8:a7:
|
||||
59:63:eb:e9:15:ab:dc:71:69:8c:42:1c:96:4e:89:
|
||||
80:66:c9:9e:21:d5:3d:08:19:74:a5:f5:07:a0:ae:
|
||||
de:79:af:fd:42:c2:79:7e:8c:f8:39:22:3b:c3:c4:
|
||||
58:3b:d0:0d:e6:a9:11:b6:a2:cd:2e:e5:16:66:fd:
|
||||
7e:65:33:94:b0:36:80:27:f5:80:76:a9:e5:df:f2:
|
||||
cf:ef
|
||||
00:aa:37:0f:09:a9:1c:e3:1a:0c:fe:bd:6c:37:a4:
|
||||
cf:87:db:af:6b:b4:19:d4:11:db:c6:56:ca:39:80:
|
||||
c6:a4:38:b0:bc:ac:7e:be:71:30:86:2c:dc:fa:b5:
|
||||
fd:58:23:a0:c1:ad:11:53:85:ca:fb:e6:d8:7e:28:
|
||||
eb:84:3b:cd:a3:fa:28:a5:cb:c7:b2:54:99:3e:40:
|
||||
2a:27:43:4b:0c:26:4b:af:97:3d:92:82:d9:eb:2c:
|
||||
7f:77:fd:b8:cd:7e:1e:04:81:17:3c:e2:44:68:ce:
|
||||
88:66:02:90:24:35:24:c4:4c:ad:77:04:1a:3a:d5:
|
||||
59:28:28:03:da:03:9d:f4:2e:52:6e:b5:36:96:4b:
|
||||
14:f8:fc:8e:c6:d3:9b:e2:80:90:8b:71:d7:d0:5c:
|
||||
43:b2:49:f1:5a:26:f3:5d:9e:3b:01:98:db:e3:ed:
|
||||
5e:8d:dd:cf:aa:68:9d:0b:c9:e2:4e:fc:16:44:72:
|
||||
93:07:62:18:05:c1:47:81:3c:3d:e4:e4:22:da:2c:
|
||||
d6:4a:44:52:06:7a:83:b5:e9:52:38:97:2f:75:a6:
|
||||
5c:6f:87:8a:8d:83:f4:d0:04:a5:34:18:5e:a1:06:
|
||||
16:b3:54:ce:64:47:ca:70:56:a3:6f:b9:7f:af:91:
|
||||
76:78:70:b4:ab:ae:8e:d5:22:26:57:b1:ba:e7:4b:
|
||||
18:21
|
||||
Exponent: 65537 (0x10001)
|
||||
X509v3 extensions:
|
||||
X509v3 Subject Key Identifier:
|
||||
B2:49:6B:52:45:EE:90:36:D2:79:47:03:33:D9:A0:BA:80:50:DA:1C
|
||||
3A:12:03:DB:0F:9E:28:45:A6:34:8D:38:AB:BA:47:8C:2A:A0:E4:2E
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:B2:49:6B:52:45:EE:90:36:D2:79:47:03:33:D9:A0:BA:80:50:DA:1C
|
||||
DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2007/emailAddress=ca+ca-rsa2007@esmtp.org
|
||||
serial:FA:7C:2C:80:29:3F:C2:64
|
||||
keyid:3A:12:03:DB:0F:9E:28:45:A6:34:8D:38:AB:BA:47:8C:2A:A0:E4:2E
|
||||
DirName:/C=US/ST=California/L=Berkeley/O=Endmail Org/OU=MTA/CN=Claus Assmann CA RSA 2003/emailAddress=ca+ca-rsa2003@esmtp.org
|
||||
serial:00
|
||||
|
||||
X509v3 Basic Constraints:
|
||||
CA:TRUE
|
||||
CA:TRUE
|
||||
X509v3 Subject Alternative Name:
|
||||
email:ca+ca-rsa2007@esmtp.org
|
||||
email:ca+ca-rsa2003@esmtp.org
|
||||
X509v3 Issuer Alternative Name:
|
||||
email:ca+ca-rsa2007@esmtp.org
|
||||
email:ca+ca-rsa2003@esmtp.org
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
98:98:7c:d3:d0:5b:72:47:15:e6:22:68:bb:78:0e:78:66:e9:
|
||||
56:16:d8:bc:9d:5a:dc:27:29:fb:91:2d:6a:21:35:18:56:b4:
|
||||
4f:2a:09:c0:08:6f:9a:59:2b:2e:72:9a:fb:50:ba:c7:a9:91:
|
||||
a0:f9:6c:be:cf:78:42:43:02:70:53:97:ba:6a:e3:da:17:e8:
|
||||
1f:c7:3a:5b:e7:bc:eb:e5:24:4c:f5:cf:61:34:1e:20:ed:17:
|
||||
63:ef:81:d3:9e:25:fe:cc:05:19:cc:8a:82:c9:4c:3a:b5:6b:
|
||||
49:51:76:46:02:aa:60:bb:c4:b9:61:48:33:da:79:8d:46:a3:
|
||||
06:20:98:f3:b2:db:3b:ad:c9:1d:0e:97:3d:b7:14:19:d3:7d:
|
||||
04:8b:6a:81:e0:11:5b:e1:35:a3:ff:2f:11:86:1c:31:85:7a:
|
||||
fd:3f:36:ef:99:25:46:2e:b0:cb:43:45:4a:ec:be:d3:3f:a4:
|
||||
77:9b:79:cc:ce:92:63:a5:d9:ed:db:a0:9d:5d:7c:d7:80:f6:
|
||||
c9:41:fb:02:96:8e:fd:f3:da:05:9d:81:a7:25:da:26:35:3b:
|
||||
a9:0c:8c:f5:a7:5d:48:ec:87:c7:7a:60:51:76:f2:de:9b:14:
|
||||
2b:55:8a:43:df:99:19:f3:eb:e7:03:e6:a7:a2:a2:28:dd:d5:
|
||||
07:6a:3f:f7
|
||||
96:83:b6:54:93:df:38:d0:48:a7:a1:c8:08:c9:0f:e9:80:05:
|
||||
e3:7e:c3:61:51:88:7b:7a:bb:24:b0:69:a3:22:e4:98:38:da:
|
||||
c8:c3:eb:52:70:63:e2:66:f2:59:ef:56:be:aa:7c:87:6e:94:
|
||||
85:d4:71:ba:35:f7:ee:d0:6e:52:1d:1f:e4:fd:2f:e2:70:31:
|
||||
5d:b7:8b:13:cc:70:10:21:fa:34:29:8f:8d:d8:4a:c7:0f:b2:
|
||||
36:e7:1e:1e:46:d1:11:84:80:7c:bb:24:c4:63:be:2a:24:53:
|
||||
74:0c:89:e0:6a:f4:08:63:bf:54:d3:0a:d9:fc:fe:6c:de:4f:
|
||||
97:61:08:a0:10:92:eb:af:06:ec:50:86:c4:cc:6b:31:32:60:
|
||||
25:7a:09:47:f8:42:7a:a2:d5:90:fa:48:be:bf:0a:e1:03:b8:
|
||||
56:24:b9:12:e9:ba:09:30:47:be:a5:8e:a2:92:a4:dc:a6:a7:
|
||||
c6:29:39:65:6e:64:4a:1b:b2:c3:07:29:f5:c0:7e:78:e0:22:
|
||||
9b:98:d4:87:91:ca:e1:66:9d:2f:70:f1:4c:a5:8e:2e:68:52:
|
||||
b3:bd:95:76:56:40:0e:46:47:e4:b3:ec:aa:3c:e8:86:96:5a:
|
||||
ed:fa:c9:10:95:53:04:13:71:01:91:ce:cd:3a:51:c6:30:e9:
|
||||
48:49:64:a3
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFJzCCBA+gAwIBAgIJAPp8LIApP8JkMA0GCSqGSIb3DQEBBAUAMIGlMQswCQYD
|
||||
MIIFFzCCA/+gAwIBAgIBADANBgkqhkiG9w0BAQQFADCBpTELMAkGA1UEBhMCVVMx
|
||||
EzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCEJlcmtlbGV5MRQwEgYDVQQK
|
||||
EwtFbmRtYWlsIE9yZzEMMAoGA1UECxMDTVRBMSIwIAYDVQQDExlDbGF1cyBBc3Nt
|
||||
YW5uIENBIFJTQSAyMDAzMSYwJAYJKoZIhvcNAQkBFhdjYStjYS1yc2EyMDAzQGVz
|
||||
bXRwLm9yZzAeFw0wMzA4MDcxNTU2NDVaFw0wNjA4MDYxNTU2NDVaMIGlMQswCQYD
|
||||
VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8GA1UEBxMIQmVya2VsZXkx
|
||||
FDASBgNVBAoTC0VuZG1haWwgT3JnMQwwCgYDVQQLEwNNVEExIjAgBgNVBAMTGUNs
|
||||
YXVzIEFzc21hbm4gQ0EgUlNBIDIwMDcxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz
|
||||
YTIwMDdAZXNtdHAub3JnMB4XDTA3MDUwNDAyMDc1NloXDTEwMDUwMzAyMDc1Nlow
|
||||
gaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMREwDwYDVQQHEwhC
|
||||
ZXJrZWxleTEUMBIGA1UEChMLRW5kbWFpbCBPcmcxDDAKBgNVBAsTA01UQTEiMCAG
|
||||
A1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwNzEmMCQGCSqGSIb3DQEJARYX
|
||||
Y2ErY2EtcnNhMjAwN0Blc210cC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
|
||||
ggEKAoIBAQCwKJExr4LOcu82q33psfV3ZjhLOB9fPRLTyP2a9NT2uJD5Jl8p90P5
|
||||
NOxlYgG7ZPFd6nUEPZJlYKIGYvqIytggUMgeOFO1GN23vccINUzZ3MaXVje2ZTN0
|
||||
WrLDhQgrtyZw/zgCGmdq0EkYEEv4268GnLGogqGxddJSm1MMyqfjFTh5baH173yL
|
||||
/b0EePnoHrmS6nTXRR5MyL30XPwaf+cxxqvLeMdNL7VyEDUnShr6Uxn4p1lj6+kV
|
||||
q9xxaYxCHJZOiYBmyZ4h1T0IGXSl9Qegrt55r/1Cwnl+jPg5IjvDxFg70A3mqRG2
|
||||
os0u5RZm/X5lM5SwNoAn9YB2qeXf8s/vAgMBAAGjggFWMIIBUjAdBgNVHQ4EFgQU
|
||||
sklrUkXukDbSeUcDM9mguoBQ2hwwgdoGA1UdIwSB0jCBz4AUsklrUkXukDbSeUcD
|
||||
M9mguoBQ2hyhgaukgagwgaUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9y
|
||||
bmlhMREwDwYDVQQHEwhCZXJrZWxleTEUMBIGA1UEChMLRW5kbWFpbCBPcmcxDDAK
|
||||
BgNVBAsTA01UQTEiMCAGA1UEAxMZQ2xhdXMgQXNzbWFubiBDQSBSU0EgMjAwNzEm
|
||||
MCQGCSqGSIb3DQEJARYXY2ErY2EtcnNhMjAwN0Blc210cC5vcmeCCQD6fCyAKT/C
|
||||
ZDAMBgNVHRMEBTADAQH/MCIGA1UdEQQbMBmBF2NhK2NhLXJzYTIwMDdAZXNtdHAu
|
||||
b3JnMCIGA1UdEgQbMBmBF2NhK2NhLXJzYTIwMDdAZXNtdHAub3JnMA0GCSqGSIb3
|
||||
DQEBBAUAA4IBAQCYmHzT0FtyRxXmImi7eA54ZulWFti8nVrcJyn7kS1qITUYVrRP
|
||||
KgnACG+aWSsucpr7ULrHqZGg+Wy+z3hCQwJwU5e6auPaF+gfxzpb57zr5SRM9c9h
|
||||
NB4g7Rdj74HTniX+zAUZzIqCyUw6tWtJUXZGAqpgu8S5YUgz2nmNRqMGIJjzsts7
|
||||
rckdDpc9txQZ030Ei2qB4BFb4TWj/y8RhhwxhXr9PzbvmSVGLrDLQ0VK7L7TP6R3
|
||||
m3nMzpJjpdnt26CdXXzXgPbJQfsClo7989oFnYGnJdomNTupDIz1p11I7IfHemBR
|
||||
dvLemxQrVYpD35kZ8+vnA+anoqIo3dUHaj/3
|
||||
YXVzIEFzc21hbm4gQ0EgUlNBIDIwMDMxJjAkBgkqhkiG9w0BCQEWF2NhK2NhLXJz
|
||||
YTIwMDNAZXNtdHAub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
|
||||
qjcPCakc4xoM/r1sN6TPh9uva7QZ1BHbxlbKOYDGpDiwvKx+vnEwhizc+rX9WCOg
|
||||
wa0RU4XK++bYfijrhDvNo/oopcvHslSZPkAqJ0NLDCZLr5c9koLZ6yx/d/24zX4e
|
||||
BIEXPOJEaM6IZgKQJDUkxEytdwQaOtVZKCgD2gOd9C5SbrU2lksU+PyOxtOb4oCQ
|
||||
i3HX0FxDsknxWibzXZ47AZjb4+1ejd3PqmidC8niTvwWRHKTB2IYBcFHgTw95OQi
|
||||
2izWSkRSBnqDtelSOJcvdaZcb4eKjYP00ASlNBheoQYWs1TOZEfKcFajb7l/r5F2
|
||||
eHC0q66O1SImV7G650sYIQIDAQABo4IBTjCCAUowHQYDVR0OBBYEFDoSA9sPnihF
|
||||
pjSNOKu6R4wqoOQuMIHSBgNVHSMEgcowgceAFDoSA9sPnihFpjSNOKu6R4wqoOQu
|
||||
oYGrpIGoMIGlMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTERMA8G
|
||||
A1UEBxMIQmVya2VsZXkxFDASBgNVBAoTC0VuZG1haWwgT3JnMQwwCgYDVQQLEwNN
|
||||
VEExIjAgBgNVBAMTGUNsYXVzIEFzc21hbm4gQ0EgUlNBIDIwMDMxJjAkBgkqhkiG
|
||||
9w0BCQEWF2NhK2NhLXJzYTIwMDNAZXNtdHAub3JnggEAMAwGA1UdEwQFMAMBAf8w
|
||||
IgYDVR0RBBswGYEXY2ErY2EtcnNhMjAwM0Blc210cC5vcmcwIgYDVR0SBBswGYEX
|
||||
Y2ErY2EtcnNhMjAwM0Blc210cC5vcmcwDQYJKoZIhvcNAQEEBQADggEBAJaDtlST
|
||||
3zjQSKehyAjJD+mABeN+w2FRiHt6uySwaaMi5Jg42sjD61JwY+Jm8lnvVr6qfIdu
|
||||
lIXUcbo19+7QblIdH+T9L+JwMV23ixPMcBAh+jQpj43YSscPsjbnHh5G0RGEgHy7
|
||||
JMRjviokU3QMieBq9Ahjv1TTCtn8/mzeT5dhCKAQkuuvBuxQhsTMazEyYCV6CUf4
|
||||
Qnqi1ZD6SL6/CuEDuFYkuRLpugkwR76ljqKSpNymp8YpOWVuZEobssMHKfXAfnjg
|
||||
IpuY1IeRyuFmnS9w8Uylji5oUrO9lXZWQA5GR+Sz7Ko86IaWWu36yRCVUwQTcQGR
|
||||
zs06UcYw6UhJZKM=
|
||||
-----END CERTIFICATE-----
|
||||
@@ -1,6 +1,6 @@
|
||||
$FreeBSD$
|
||||
|
||||
sendmail 8.14.2
|
||||
sendmail 8.13.1
|
||||
originals can be found at: ftp://ftp.sendmail.org/pub/sendmail/
|
||||
|
||||
For the import of sendmail, the following files were removed:
|
||||
@@ -21,13 +21,9 @@ The following directories were renamed:
|
||||
|
||||
Imported using:
|
||||
|
||||
cvs import -m 'Import sendmail 8.14.2' \
|
||||
src/contrib/sendmail SENDMAIL v8_14_2
|
||||
cvs import -m 'Import sendmail 8.13.1' \
|
||||
src/contrib/sendmail SENDMAIL v8_13_1
|
||||
|
||||
After importing, bump the version of src/etc/sendmail/freebsd*mc
|
||||
so mergemaster will merge /etc/mail/freebsd*cf:
|
||||
|
||||
cvs commit -f src/etc/sendmail/freebsd*mc
|
||||
|
||||
To make local changes to sendmail, simply patch and commit to the main
|
||||
branch (aka HEAD). Never make local changes on the vendor (SENDMAIL)
|
||||
@@ -97,4 +93,4 @@ infrastructure in FreeBSD:
|
||||
usr.sbin/mailwrapper/Makefile
|
||||
|
||||
[email protected]
|
||||
11-November-2007
|
||||
31-July-2004
|
||||
@@ -12,13 +12,13 @@ sendmail/SECURITY for more installation information.
|
||||
2. Create any necessary site configuration build files, as noted in
|
||||
devtools/Site/README.
|
||||
|
||||
3. In the sendmail/ directory, run "sh ./Build" (see sendmail/README for
|
||||
3. In the sendmail/ directory, run "sh Build" (see sendmail/README for
|
||||
details).
|
||||
|
||||
4. Change to the cf/cf/ directory (that's not a typo): Copy whichever .mc
|
||||
file best matches your environment to sendmail.mc. Next, tailor it
|
||||
as explained in cf/README. Then run
|
||||
"sh ./Build sendmail.cf".
|
||||
"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
|
||||
@@ -26,21 +26,21 @@ sendmail/SECURITY for more installation information.
|
||||
|
||||
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".
|
||||
"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".
|
||||
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 if it exists. When
|
||||
you are ready to install it, back up your installed version and type
|
||||
"sh ./Build install".
|
||||
you are ready to install it, back up your installed version and type "sh
|
||||
Build install".
|
||||
|
||||
8. If you are upgrading from an older version of sendmail and are using any
|
||||
database maps, be sure to rebuild them with the new version of makemap,
|
||||
in case you are now using a different (and thereby incompatible) version
|
||||
of Berkeley DB.
|
||||
|
||||
$Revision: 8.16 $, Last updated $Date: 2007/10/03 21:00:28 $
|
||||
$Revision: 8.15 $, Last updated $Date: 2002/05/28 18:09:25 $
|
||||
@@ -29,10 +29,10 @@ This list is not guaranteed to be complete.
|
||||
* Null bytes are not handled properly in headers.
|
||||
|
||||
Sendmail should handle full binary data. As it stands, it handles
|
||||
all values in the body, but not 0x00 in the header. Changing
|
||||
this would require a major restructuring of the code -- for
|
||||
example, almost no C library support could be used to handle
|
||||
strings.
|
||||
all values in the body, but only 0x01-0x80 and 0xA0-0xFF in
|
||||
the header. Notably missing is 0x00, which would require a major
|
||||
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 or empty.
|
||||
|
||||
@@ -41,12 +41,6 @@ This list is not guaranteed to be complete.
|
||||
characters then no header check is done even if one is configured for
|
||||
the header.
|
||||
|
||||
* Header lines which are too long will be split incorrectly.
|
||||
|
||||
Header lines which are longer than 2045 characters will be split
|
||||
but some characters might be lost. Fix: obey RFC (2)822 and do not
|
||||
send lines that are longer than 1000 characters.
|
||||
|
||||
* Sender addresses whose domain part cause a temporary A record lookup
|
||||
failure but have a valid MX record will be temporarily rejected in
|
||||
the default configuration. Solution: fix the DNS at the sender side.
|
||||
@@ -170,7 +164,7 @@ Kresolve sequence dnsmx canon
|
||||
|
||||
When sendmail is doing 8->7 bit MIME conversions, and the message
|
||||
contains certain MIME body types that cannot be converted to 7-bit,
|
||||
sendmail will pass the message as 8-bit.
|
||||
sendmail will strip the message to 7-bit.
|
||||
|
||||
* 7->8 bit MIME conversion
|
||||
|
||||
@@ -235,9 +229,9 @@ Kresolve sequence dnsmx canon
|
||||
|
||||
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
|
||||
when a file is modified. Sendmail compensates by resetting the file mode
|
||||
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
|
||||
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.
|
||||
|
||||
@@ -247,4 +241,4 @@ Kresolve sequence dnsmx canon
|
||||
be used if set instead of LOCAL_RELAY ($R). This will be fixed in a
|
||||
future version.
|
||||
|
||||
$Revision: 8.59 $, Last updated $Date: 2007/02/21 23:13:58 $
|
||||
$Revision: 8.56 $, Last updated $Date: 2002/12/18 22:39:06 $
|
||||
+558
-1265
File diff suppressed because it is too large.
Load diff
@@ -3,18 +3,17 @@
|
||||
|
||||
This directory has the latest sendmail(TM) software from Sendmail, Inc.
|
||||
|
||||
Report any bugs to sendmail-bugs-YYYY@support.sendmail.org
|
||||
where YYYY is the current year, e.g., 2005.
|
||||
Report any bugs to sendmail-bugs@sendmail.ORG
|
||||
|
||||
There is a web site at http://www.sendmail.org/ -- see that site for
|
||||
There is a web site at http://WWW.Sendmail.ORG/ -- see that site for
|
||||
the latest updates.
|
||||
|
||||
+--------------+
|
||||
| INTRODUCTION |
|
||||
+--------------+
|
||||
|
||||
0. The vast majority of queries about sendmail are answered in the
|
||||
README files noted below.
|
||||
0. The vast majority of queries to <sendmail[email protected]>
|
||||
are answered in the README files noted below.
|
||||
|
||||
1. Read this README file, especially this introduction, and the DIRECTORY
|
||||
PERMISSIONS sections.
|
||||
@@ -464,4 +463,4 @@ sendmail Source for the sendmail program itself.
|
||||
test Some test scripts (currently only for compilation aids).
|
||||
vacation Source for the vacation program. NOT PART OF SENDMAIL!
|
||||
|
||||
$Revision: 8.93 $, Last updated $Date: 2005/09/16 20:08:50 $
|
||||
$Revision: 8.91 $, Last updated $Date: 2002/11/09 23:33:07 $
|
||||
@@ -1,642 +1,11 @@
|
||||
SENDMAIL RELEASE NOTES
|
||||
$Id: RELEASE_NOTES,v 8.1909 2007/10/31 16:04:13 ca Exp $
|
||||
$Id: RELEASE_NOTES,v 8.1679 2004/07/30 18:03:07 ca Exp $
|
||||
|
||||
|
||||
This listing shows the version of the sendmail binary, the version
|
||||
of the sendmail configuration files, the date of release, and a
|
||||
summary of the changes in that release.
|
||||
|
||||
8.14.2/8.14.2 2007/11/01
|
||||
If a message was queued and it contained 8 bit characters in
|
||||
a From: or To: header, then those characters could be
|
||||
"mistaken" for internal control characters during a queue
|
||||
run and trigger various consistency checks. Problem
|
||||
noted by Neil Rickert of Northern Illinois University.
|
||||
If MaxMimeHeaderLength is set to a value greater than 0 (which
|
||||
it is by default) then even if the Linelimit parameter
|
||||
is 0, sendmail corrupted in the non-transfer-encoding
|
||||
case every MAXLINE-1 characters. Patch from John Gardiner
|
||||
Myers of Proofpoint.
|
||||
Setting the suboption DeliveryMode for DaemonPortOptions did not
|
||||
work in earlier 8.14 versions.
|
||||
Note: DeliveryMode=interactive is silently converted to
|
||||
background if a milter can reject or delete a recipient.
|
||||
Prior to 8.14 this happened only if milter could delete
|
||||
recipients.
|
||||
ClientRate should trigger when the limit was exceeded (as
|
||||
documented), not when it was reached. Patch from
|
||||
John Beck of Sun Microsystems.
|
||||
Force a queue run for -qGqueuegroup even if no runners are
|
||||
specified (R=0) and forking (F=f) is requested.
|
||||
When multiple results are requested for a DNS map lookup
|
||||
(-z and -Z), return only those that are relevant for
|
||||
the query (not also those in the "additional section".)
|
||||
If the message transfer time to sendmail (when acting as server)
|
||||
exceeds Timeout.queuewarn or Timeout.queuereturn and
|
||||
the message is refused (by a milter), sendmail previously
|
||||
created a delivery status notification (DSN). Patch
|
||||
from Doug Heath of The Hertz Corporation.
|
||||
A code change in Cyrus-SASL 2.1.22 for sasl_decode64() requires
|
||||
the MTA to deal with some input (i.e., "=") itself.
|
||||
Problem noted by Eliot Lear.
|
||||
sendmail counted a delivery as successful if PIPELINING is
|
||||
compiled in but not offered by the server and the
|
||||
delivery failed temporarily. Patch from Werner Wiethege.
|
||||
If getting the result of an LDAP query times out then close the
|
||||
map so it will be reopened on the next lookup. This
|
||||
should help "failover" configurations that specify more
|
||||
than one LDAP server.
|
||||
If check_compat returns $#discard then a "savemail panic" could
|
||||
be triggered under some circumstances (e.g., requiring
|
||||
a system which does not have the compile time flag
|
||||
HASFLOCK set). Based on patch by Motonori Nakamura
|
||||
of National Institute of Informatics, Japan.
|
||||
If a milter rejected a recipient, the count for nrcpts= in the
|
||||
logfile entry might have been wrong. Problem found by
|
||||
Petra Humann of TU Dresden.
|
||||
If a milter invoked smfi_chgfrom() where ESMTP arguments are not
|
||||
NULL, the message body was lost. Patch from Motonori
|
||||
Nakamura of National Institute of Informatics, Japan.
|
||||
sendmail(8) had a bogus space in -qGname. Patch from Peng Haitao.
|
||||
CONTRIB: buildvirtuser: Preserve ownership and permissions when
|
||||
replacing files.
|
||||
CONTRIB: buildvirtuser: Skip dot-files (e.g., .cvsignore) when
|
||||
reading the /etc/mail/virtusers/ directory.
|
||||
CONTRIB: buildvirtuser: Emit warnings instead of exiting where
|
||||
appropriate.
|
||||
LIBMILTER: Fix ABI backwards compatibility so milters compiled
|
||||
against an older libmilter.so shared library can use an
|
||||
8.14 libmilter.so shared library.
|
||||
LIBMILTER: smfi_version() did not properly extract the patchlevel
|
||||
from the version number, however, the returned value was
|
||||
correct for the current libmilter version.
|
||||
|
||||
8.14.1/8.14.1 2007/04/03
|
||||
Even though a milter rejects a recipient the MTA will still keep
|
||||
it in its list of recipients and deliver to it if the
|
||||
transaction is accepted. This is a regression introduced
|
||||
in 8.14.0 due to the change for SMFIP_RCPT_REJ. Bug
|
||||
found by Andy Fiddaman.
|
||||
The new DaemonPortOptions which begin with a lower case character
|
||||
could not be set in 8.14.0.
|
||||
If a server shut down the connection in response to a STARTTLS
|
||||
command, sendmail would log a misleading error message
|
||||
due to an internal inconsistency. Problem found by
|
||||
Werner Wiethege.
|
||||
Document how some sendmail.cf options change the behavior of mailq.
|
||||
Noted by Paul Menchini of the North Carolina School of
|
||||
Science and Mathematics.
|
||||
CONFIG: Add confSOFT_BOUNCE m4 option for setting SoftBounce.
|
||||
CONFIG: 8.14.0's RELEASE_NOTES failed to mention the addition
|
||||
of the confMAX_NOOP_COMMANDS and confSHARED_MEMORY_KEY_FILE
|
||||
m4 options for setting MaxNOOPCommands and
|
||||
SharedMemoryKeyFile.
|
||||
CONFIG: Add confMILTER_MACROS_EOH and confMILTER_MACROS_DATA m4
|
||||
options for setting Milter.macros.eoh and Milter.macros.data.
|
||||
CONTRIB: Use flock() and fcntl() in qtool.pl if necessary.
|
||||
Patch from Daniel Carroll of Mesa State College.
|
||||
LIBMILTER: Make sure an unknown command does not affect the
|
||||
currently available macros. Problem found by Andy Fiddaman.
|
||||
LIBMILTER: The MTA did not offer SMFIF_SETSYMLIST during option
|
||||
negotiation. Problem reported by Bryan Costales.
|
||||
LIBMILTER: Fix several minor errors in the documentation.
|
||||
Patches from Bryan Costales.
|
||||
PORTABILITY FIXES:
|
||||
AIX 5.{1,2}: libsm/util.c failed to compile due to
|
||||
redefinition of several macros, e.g., SIG_ERR.
|
||||
Patch from Jim Pirzyk with assistance by Bob
|
||||
Booth, University of Illinois at Urbana-Champaign.
|
||||
Add support for QNX.6. Patch from Sean Boudreau of QNX
|
||||
Software Systems.
|
||||
New Files:
|
||||
devtools/M4/depend/QNX6.m4
|
||||
devtools/OS/QNX.6.x
|
||||
include/sm/os/sm_os_qnx.h
|
||||
|
||||
New Files added in 8.14.0, but not shown in the release notes entry:
|
||||
libmilter/docs/smfi_chgfrom.html
|
||||
libmilter/docs/smfi_version.html
|
||||
|
||||
8.14.0/8.14.0 2007/01/31
|
||||
Header field values are now 8 bit clean. Notes:
|
||||
- header field names are still restricted to 7 bit.
|
||||
- RFC 2822 allows only 7 bit (US-ASCII) characters in
|
||||
headers.
|
||||
Preserve spaces after the colon in a header. Previously, any
|
||||
number of spaces after the colon would be changed to
|
||||
exactly one space.
|
||||
In some cases of deeply nested aliases/forwarding, mail can
|
||||
be silently lost. Moreover, the MaxAliasRecursion
|
||||
limit may be reached too early, e.g., the counter
|
||||
may be off by a factor of 4 in case of a sequence of
|
||||
.forward files that refer to others. Patch from
|
||||
Motonori Nakamura of Kyoto University.
|
||||
Fix a regression in 8.13.8: if InputMailFilters is set then
|
||||
"sendmail -bs" can trigger an assertion because the
|
||||
hostname of the client is undefined. It is now set
|
||||
to "localhost" for the xxfi_connect() callback.
|
||||
Avoid referencing a freed variable during cleanup when terminating.
|
||||
Problem reported and diagnosed by Joe Maimon.
|
||||
New option HeloName to set the name for the HELO/EHLO command.
|
||||
Patch from Nik Clayton.
|
||||
New option SoftBounce to issue temporary errors (4xy) instead of
|
||||
permanent errors (5xy). This can be useful for testing.
|
||||
New suboptions for DaemonPortOptions to set them individually
|
||||
per daemon socket:
|
||||
DeliveryMode DeliveryMode
|
||||
refuseLA RefuseLA
|
||||
delayLA DelayLA
|
||||
queueLA QueueLA
|
||||
children MaxDaemonChildren
|
||||
New option -K for LDAP maps to replace %1 through %9 in the
|
||||
lookup key with the LDAP escaped contents of the
|
||||
arguments specified in the map lookup. Loosely based
|
||||
on patch from Wolfgang Hottgenroth.
|
||||
Log the time after which a greet_pause delay triggered. Patch
|
||||
from Nik Clayton.
|
||||
If a client is rejected via TCP wrapper or some other check
|
||||
performed by validate_connection() (in conf.c) then do
|
||||
not also invoke greet_pause. Problem noted by Jim Pirzyk
|
||||
of the University of Illinois at Urbana-Champaign.
|
||||
If a client terminates the SMTP connection during a pause
|
||||
introduced by greet_pause, then a misleading message
|
||||
was logged previously. Problem noted by Vernon Schryver
|
||||
et.al., patch from Matej Vela.
|
||||
New command "mstat" for control socket to provide "machine
|
||||
readable" status.
|
||||
New named config file rule check_eom which is called at the end
|
||||
of a message, its parameter is the size of the message.
|
||||
If the macro {addr_type} indicates that the current address
|
||||
is a header address it also distinguishes between
|
||||
recipient and sender addresses (as it is done for
|
||||
envelope addresses).
|
||||
When a macro is set in check_relay, then its value is accessible
|
||||
by all transactions in the same SMTP session.
|
||||
Increase size of key for ldap lookups to 1024 (MAXKEY).
|
||||
New option MaxNOOPCommands to override default of 20 for the
|
||||
number of "useless" commands before the SMTP server will
|
||||
slow down responding.
|
||||
New option SharedMemoryKeyFile: if shared memory support is
|
||||
enabled, the MTA can be asked to select a shared memory
|
||||
key itself by setting SharedMemoryKey to -1 and specifying
|
||||
a file where to store the selected key.
|
||||
Try to deal with open HTTP proxies that are used to send spam
|
||||
by recognizing some commands from them. If the first command
|
||||
from the client is GET, POST, CONNECT, or USER, then the
|
||||
connection is terminated immediately.
|
||||
New PrivacyOptions noactualrecipient to avoid putting
|
||||
X-Actual-Recipient lines in DSNs revealing the actual
|
||||
account that addresses map to. Patch from Dan Harkless.
|
||||
New options B, z, and Z for DNS maps:
|
||||
-B: specify a domain that is always appended to queries.
|
||||
-z: specify the delimiter at which to cut off the result of
|
||||
a query if it is too long.
|
||||
-Z: specify the maximum number of entries to be concatenated
|
||||
to form the result of a lookup.
|
||||
New target "check" in the Makefile of libsm: instead of running tests
|
||||
implicitly while building libsm, they must be explicitly
|
||||
started by using "make check".
|
||||
Fixed some inconsistent checks for NULL pointers that have been
|
||||
reported by the SATURN tool which has been developed by
|
||||
Isil Dillig and Thomas Dillig of Stanford University.
|
||||
Fix a potential race condition caused by a signal handler for
|
||||
terminated child processes. Problem noted by David F. Skoll.
|
||||
When a milter deleted a recipient, that recipient could cause a
|
||||
queue group selection. This has been disabled as it was not
|
||||
intended.
|
||||
New operator 'r' for the arith map to return a random number.
|
||||
Patch from Motonori Nakamura of Kyoto University.
|
||||
New compile time option MILTER_NO_NAGLE to turn off the Nagle
|
||||
algorithm for communication with libmilter ("cork" on Linux),
|
||||
which may improve the communication performance on some
|
||||
operating systems. Patch from John Gardiner Myers of
|
||||
Proofpoint.
|
||||
If sendmail received input that contained a CR without subsequent LF
|
||||
(thus violating RFC 2821 (2.3.7)), it could previously
|
||||
generate an additional blank line in the output as the last
|
||||
line.
|
||||
Restarting persistent queue runners by sending a HUP signal to
|
||||
the "queue control process" (QCP) works now.
|
||||
Increase the length of an input line to 12288 to deal with
|
||||
really long lines during SMTP AUTH negotiations.
|
||||
Problem noted by Werner Wiethege.
|
||||
If ARPANET mode (-ba) was selected STARTTLS would fail (due to
|
||||
a missing initialization call for that case). Problem
|
||||
noted by Neil Rickert of Northern Illinois University.
|
||||
If sendmail is linked against a library that initializes Cyrus-SASL
|
||||
before sendmail did it (such as libnss-ldap), then SMTP AUTH
|
||||
could fail for the sendmail client. A patch by Moritz Both
|
||||
works around the API design flaw of Cyrus-SASLv2.
|
||||
CONFIG: Make it possible to unset the StatusFile option by
|
||||
undefining STATUS_FILE. By not setting StatusFile,
|
||||
the MTA will not attempt to open a statistics file on
|
||||
each delivery.
|
||||
CONFIG: New FEATURE(`require_rdns') to reject messages from SMTP
|
||||
clients whose IP address does not have proper reverse DNS.
|
||||
Contributed by Neil Rickert of Northern Illinois University
|
||||
and John Beck of Sun Microsystems.
|
||||
CONFIG: New FEATURE(`block_bad_helo') to reject messages from SMTP
|
||||
clients which provide a HELO/EHLO argument which is either
|
||||
unqualified, or is one of our own names (i.e., the server
|
||||
name instead of the client name). Contributed by Neil
|
||||
Rickert of Northern Illinois University and John Beck of
|
||||
Sun Microsystems.
|
||||
CONFIG: New FEATURE(`badmx') to reject envelope sender addresses
|
||||
(MAIL) whose domain part resolves to a "bad" MX record.
|
||||
Based on contribution from William Dell Wisner.
|
||||
CONFIG: New macros SMTP_MAILER_LL and RELAY_MAILER_LL to override
|
||||
the maximum line length of the smtp mailers.
|
||||
CONFIG: New option `relaytofulladdress' for FEATURE(`access_db')
|
||||
to allow entries in the access map to be of the form
|
||||
To:[email protected] RELAY
|
||||
CONFIG: New subsuboptions eoh and data to specify the list of
|
||||
macros a milter should receive at those stages in the
|
||||
SMTP dialogue.
|
||||
CONFIG: New option confHELO_NAME for HeloName to set the name
|
||||
for the HELO/EHLO command.
|
||||
CONFIG: dnsbl and enhdnsbl can now also discard or quarantine
|
||||
messages by using those values as second argument.
|
||||
Patches from Nelson Fung.
|
||||
CONTRIB: cidrexpand uses a hash symbol as comment character and
|
||||
ignores everything after it unless it is in quotes or
|
||||
preceeded by a backslash.
|
||||
DEVTOOLS: New macro confMKDIR: if set to a program that creates
|
||||
directories, then it used for "make install" to create
|
||||
the required installation directories.
|
||||
DEVTOOLS: New macro confCCLINK to specify the linker to use for
|
||||
executables (defaults to confCC).
|
||||
LIBMILTER: A new version of the milter API has been created that
|
||||
has several changes which are listed below and documented
|
||||
in the webpages reachable via libmilter/docs/index.html.
|
||||
LIBMILTER: The meaning of the version macro SMFI_VERSION has been
|
||||
changed. It now refers only to the version of libmilter,
|
||||
not to the protocol version (which is used only internally,
|
||||
it is not user/milter-programmer visible). Additionally,
|
||||
a version function smfi_version() has been introduced such
|
||||
that a milter program can check the libmilter version also
|
||||
at runtime which is useful if a shared library is used.
|
||||
LIBMILTER: A new callback xxfi_negotiate() can be used to
|
||||
dynamically (i.e., at runtime) determine the available
|
||||
protocol actions and features of the MTA and also to
|
||||
specify which of these a milter wants to use. This allows
|
||||
for more flexibility than hardcoding these flags in the
|
||||
xxfi_flags field of the smfiDesc structure.
|
||||
LIBMILTER: A new callback xxfi_data() is available so milters
|
||||
can act on the DATA command.
|
||||
LIBMILTER: A new callback xxfi_unknown() is available so milters
|
||||
can receive also unknown SMTP commands.
|
||||
LIBMILTER: A new return code SMFIS_NOREPLY has been added which
|
||||
can be used by the xxfi_header() callback provided the
|
||||
milter requested the SMFIP_NOHREPL protocol action.
|
||||
LIBMILTER: The new return code SMFIS_SKIP can be used in the
|
||||
xxfi_body() callback to skip over further body chunks
|
||||
and directly advance to the xxfi_eom() callback. This
|
||||
is useful if a milter can make a decision based on the
|
||||
body chunks it already received without reading the entire
|
||||
rest of the body and the milter wants to invoke functions
|
||||
that are only available from the xxfi_eom() callback.
|
||||
LIBMILTER: A new function smfi_addrcpt_par() can be used to add
|
||||
new recipients including ESMTP parameters.
|
||||
LIBMILTER: A new function smfi_chgfrom() can be used to change the
|
||||
envelope sender including ESMTP parameters.
|
||||
LIBMILTER: A milter can now request to be informed about rejected
|
||||
recipients (RCPT) too. This requires to set the protocol
|
||||
flag SMFIP_RCPT_REJ during option negotiation. Whether
|
||||
a RCPT has been rejected can be checked by comparing the
|
||||
value of the macro {rcpt_mailer} with "error".
|
||||
LIBMILTER: A milter can now override the list of macros that it
|
||||
wants to receive from the MTA for each protocol step
|
||||
by invoking the function smfi_setsymlist() during option
|
||||
negotiation.
|
||||
LIBMILTER: A milter can receive header field values with all
|
||||
leading spaces by requesting the SMFIP_HDR_LEADSPC
|
||||
protocol action. Also, if the flag is set then the MTA
|
||||
does not add a leading space to headers that are added,
|
||||
inserted, or replaced.
|
||||
LIBMILTER: If a milter sets the reply code to "421" for the HELO
|
||||
callback, the SMTP server will terminate the SMTP session
|
||||
with that error to match the behavior of all other callbacks.
|
||||
New Files:
|
||||
cf/feature/badmx.m4
|
||||
cf/feature/block_bad_helo.m4
|
||||
cf/feature/require_rdns.m4
|
||||
devtools/M4/UNIX/check.m4
|
||||
include/sm/misc.h
|
||||
include/sm/sendmail.h
|
||||
include/sm/tailq.h
|
||||
libmilter/docs/smfi_addrcpt_par.html
|
||||
libmilter/docs/smfi_setsymlist.html
|
||||
libmilter/docs/xxfi_data.html
|
||||
libmilter/docs/xxfi_negotiate.html
|
||||
libmilter/docs/xxfi_unknown.html
|
||||
libmilter/example.c
|
||||
libmilter/monitor.c
|
||||
libmilter/worker.c
|
||||
libsm/memstat.c
|
||||
libsm/t-memstat.c
|
||||
libsm/t-qic.c
|
||||
libsm/util.c
|
||||
sendmail/daemon.h
|
||||
sendmail/map.h
|
||||
|
||||
8.13.8/8.13.8 2006/08/09
|
||||
Fix a regression in 8.13.7: if shared memory is activated, then
|
||||
the server can erroneously report that there is
|
||||
insufficient disk space. Additionally make sure that
|
||||
an internal variable is set properly to avoid those
|
||||
misleading errors. Based on patch from Steve Hubert
|
||||
of University of Washington.
|
||||
Fix a regression in 8.13.7: the PidFile could be removed after
|
||||
the process that forks the daemon exited, i.e., if
|
||||
sendmail -bd is invoked. Problem reported by Kan Sasaki
|
||||
of Fusion Communications Corp. and Werner Wiethege.
|
||||
Avoid opening qf files if QueueSortOrder is "none". Patch from
|
||||
David F. Skoll.
|
||||
Avoid a crash when finishing due to referencing a freed variable.
|
||||
Problem reported and diagnosed by Moritz Jodeit.
|
||||
CONTRIB: cidrexpand now deals with /0 by issuing the entire IPv4
|
||||
range (0..255).
|
||||
LIBMILTER: The "hostname" argument of the xxfi_connect() callback
|
||||
previously was the equivalent of {client_ptr}. However,
|
||||
this did not match the documentation of the function, hence
|
||||
it has been changed to {client_name}. See doc/op/op.*
|
||||
about these macros.
|
||||
|
||||
8.13.7/8.13.7 2006/06/14
|
||||
A malformed MIME structure with many parts can cause sendmail to
|
||||
crash while trying to send a mail due to a stack overflow,
|
||||
e.g., if the stack size is limited (ulimit -s). This
|
||||
happens because the recursion of the function mime8to7()
|
||||
was not restricted. The function is called for MIME 8 to
|
||||
7 bit conversion and also to enforce MaxMimeHeaderLength.
|
||||
To work around this problem, recursive calls are limited to
|
||||
a depth of MAXMIMENESTING (20); message content after this
|
||||
limit is treated as opaque and is not checked further.
|
||||
Problem noted by Frank Sheiness.
|
||||
The changes to the I/O layer in 8.13.6 caused a regression for
|
||||
SASL mechanisms that use the security layer, e.g.,
|
||||
DIGEST-MD5. Problem noted by Robert Stampfli.
|
||||
If a timeout occurs while reading a message (during the DATA phase)
|
||||
a df file might have been left behind in the queue.
|
||||
This was another side effect of the changes to the I/O
|
||||
layer made in 8.13.6.
|
||||
Several minor problems have been fixed that were found by a
|
||||
Coverity scan of sendmail 8 as part of the NetBSD
|
||||
distribution. See http://scan.coverity.com/
|
||||
Note: the scan generated also a lot of "false positives",
|
||||
e.g., "error" reports about situations that cannot happen.
|
||||
Most of those code places are marked with lint(1) comments
|
||||
like NOTREACHED, but Coverity does not understand those.
|
||||
Hence an explicit assertion has been added in some cases
|
||||
to avoid those false positives.
|
||||
If the start of the sendmail daemon fails due to a configuration
|
||||
error then in some cases shared memory segments or pid
|
||||
files were not removed.
|
||||
If DSN support is disabled via access_db, then related ESMTP
|
||||
parameters for MAIL and RCPT should be rejected. Problem
|
||||
reported by Akihiro Sagawa.
|
||||
Enabling zlib compression in OpenSSL 0.9.8[ab] breaks the padding
|
||||
bug work-around. Hence if sendmail is linked against
|
||||
either of these versions and compression is available,
|
||||
the padding bug work-around is turned off. Based on
|
||||
patch from Victor Duchovni of Morgan Stanley.
|
||||
CONFIG: FEATURE(`dnsbl') and FEATURE(`enhdnsbl') used
|
||||
blackholes.mail-abuse.org as default domain for lookups,
|
||||
however, that list is no longer available. To avoid
|
||||
further problems, no default value is available anymore,
|
||||
but an argument must be specified.
|
||||
Portability:
|
||||
Fix compilation on OSF/1 for sfsasl.c. Patch from
|
||||
Pieter Bowman of the University of Utah.
|
||||
|
||||
8.13.6/8.13.6 2006/03/22
|
||||
SECURITY: Replace unsafe use of setjmp(3)/longjmp(3) in the server
|
||||
and client side of sendmail with timeouts in the libsm I/O
|
||||
layer and fix problems in that code. Also fix handling of
|
||||
a buffer in sm_syslog() which could have been used as an
|
||||
attack vector to exploit the unsafe handling of
|
||||
setjmp(3)/longjmp(3) in combination with signals.
|
||||
Problem detected by Mark Dowd of ISS X-Force.
|
||||
Handle theoretical integer overflows that could triggered if
|
||||
the server accepted headers larger than the maximum
|
||||
(signed) integer value. This is prevented in the default
|
||||
configuration by restricting the size of a header, and on
|
||||
most machines memory allocations would fail before reaching
|
||||
those values. Problems found by Phil Brass of ISS.
|
||||
If a server returns 421 for an RSET command when trying to start
|
||||
another transaction in a session while sending mail, do
|
||||
not trigger an internal consistency check. Problem found
|
||||
by Allan E Johannesen of Worcester Polytechnic Institute.
|
||||
If a server returns a 5xy error code (other than 501) in response
|
||||
to a STARTTLS command despite the fact that it advertised
|
||||
STARTTLS and that the code is not valid according to RFC
|
||||
2487 treat it nevertheless as a permanent failure instead
|
||||
of a protocol error (which has been changed to a
|
||||
temporary error in 8.13.5). Problem reported by Jeff
|
||||
A. Earickson of Colby College.
|
||||
Clear SMTP state after a HELO/EHLO command. Patch from John
|
||||
Myers of Proofpoint.
|
||||
Observe MinQueueAge option when gathering entries from the queue
|
||||
for sorting etc instead of waiting until the entries are
|
||||
processed. Patch from Brian Fundakowski Feldman.
|
||||
Set up TLS session cache to properly handle clients that try to
|
||||
resume a stored TLS session.
|
||||
Properly count the number of (direct) child processes such that
|
||||
a configured value (MaxDaemonChildren) is not exceeded.
|
||||
Based on patch from Attila Bruncsak.
|
||||
LIBMILTER: Remove superfluous backslash in macro definition
|
||||
(libmilter.h). Based on patch from Mike Kupfer of
|
||||
Sun Microsystems.
|
||||
LIBMILTER: Don't try to set SO_REUSEADDR on UNIX domain sockets.
|
||||
This generates an error message from libmilter on
|
||||
Solaris, though other systems appear to just discard the
|
||||
request silently.
|
||||
LIBMILTER: Deal with sigwait(2) implementations that return
|
||||
-1 and set errno instead of returning an error code
|
||||
directly. Patch from Chris Adams of HiWAAY Informations
|
||||
Services.
|
||||
Portability:
|
||||
Fix compilation checks for closefrom(3) and statvfs(2)
|
||||
in NetBSD. Problem noted by S. Moonesamy, patch from
|
||||
Andrew Brown.
|
||||
|
||||
8.13.5/8.13.5 2005/09/16
|
||||
Store the filesystem identifier of the df/ subdirectory (if it
|
||||
exists) in an internal structure instead of the base
|
||||
directory. This structure is used decide whether there
|
||||
is enough free disk space when selecting a queue, hence
|
||||
without this change queue selection could fail if a df/
|
||||
subdirectory exists and is on a different filesystem
|
||||
than the base directory.
|
||||
Use the queue index of the df file (instead of the qf file) for
|
||||
checking whether a link(2) operation can be used to split
|
||||
an envelope across queue groups. Problem found by
|
||||
Werner Wiethege.
|
||||
If the list of items in the queue is larger than the maximum
|
||||
number of items to process, sort the queue first and
|
||||
then cut the list off instead of the other way around.
|
||||
Patch from Matej Vela of Rudjer Boskovic Institute.
|
||||
Fix helpfile to show full entry for ETRN. Problem noted by
|
||||
Penelope Fudd, patch from Neil Rickert of Northern Illinois
|
||||
University.
|
||||
FallbackSmartHost should also be tried on temporary errors.
|
||||
From John Beck of Sun Microsystems.
|
||||
When a server responds with 421 to the STARTTLS command then treat
|
||||
it as a temporary error, not as protocol error. Problem
|
||||
noted by Andrey J. Melnikoff.
|
||||
Properly define two functions in libsm as static because their
|
||||
prototype used static too. Patch from Peter Klein.
|
||||
Fix syntax errors in helpfile for MAIL and RCPT commands.
|
||||
LIBMILTER: When smfi_replacebody() is called with bodylen equals
|
||||
zero then do not silently ignore that call. Patch from
|
||||
Gurusamy Sarathy of Active State.
|
||||
LIBMILTER: Recognize "421" also in a multi-line reply to terminate
|
||||
the SMTP session with that error. Fix from Brian Kantor.
|
||||
Portability: New option HASSNPRINTF which can be set if the OS
|
||||
has a properly working snprintf(3) to get rid
|
||||
of the last two (safe) sprintf(3) calls in the
|
||||
source code.
|
||||
Add support for AIX 5.3.
|
||||
Add support for SunOS 5.11 (aka Solaris 11).
|
||||
Add support for Darwin 8.x. Patch from Lyndon Nerenberg.
|
||||
OpenBSD 3.7 has removed support for NETISO.
|
||||
CONFIG: Add OSTYPE(freebsd6) for FreeBSD 6.X.
|
||||
Set DontBlameSendmail to AssumeSafeChown and
|
||||
GroupWritableDirPathSafe for OSTYPE(darwin).
|
||||
Patch from Lyndon Nerenberg.
|
||||
Some features still used 4.7.1 as enhanced status code which
|
||||
was supposed to be eliminated in 8.13.0 because some
|
||||
broken systems misinterpret it as a permanent error.
|
||||
Patch from Matej Vela of Rudjer Boskovic Institute.
|
||||
Some default values in a generated cf file did not match
|
||||
the defaults in the sendmail binary. Problem noted
|
||||
by Mike Pechkin.
|
||||
New Files:
|
||||
cf/ostype/freebsd6.m4
|
||||
devtools/OS/AIX.5.3
|
||||
devtools/OS/Darwin.8.x
|
||||
devtools/OS/SunOS.5.11
|
||||
include/sm/time.h
|
||||
|
||||
8.13.4/8.13.4 2005/03/27
|
||||
The bug fixes in 8.13.3 for connection handling uncovered a
|
||||
different error which could result in connections that
|
||||
stay in CLOSE_WAIT state due to a variable that was not
|
||||
properly initialized. Problem noted by Michael Sims.
|
||||
Deal with empty hostnames in hostsignature(). This bug could lead
|
||||
to an endless loop when doing LMTP deliveries to another
|
||||
host. Problem first reported by Martin Lathoud and
|
||||
tracked down by Gael Roualland.
|
||||
Make sure return parameters are initialized in getmxrr(). Problem
|
||||
found by Gael Roualland using valgrind.
|
||||
If shared memory is used and the RunAsUser option is set, then the
|
||||
owner and group of the shared memory segment is set to
|
||||
the ids specified RunAsUser and the access mode is set
|
||||
to 0660 to allow for updates by sendmail processes.
|
||||
The number of queue entries that is (optionally) kept in shared
|
||||
memory was wrong in some cases, e.g., envelope splitting
|
||||
and bounce generation.
|
||||
Undo a change made in 8.13.0 to silently truncate long strings
|
||||
in address rewriting because the message can be triggered
|
||||
for header checks where long strings are legitimate.
|
||||
Problem reported by Mary Verge DeSisto, and tracked
|
||||
down with the help of John Beck of Sun Microsystems.
|
||||
The internal stab map did not obey the -m flag. Patch from
|
||||
Rob McMahon of Warwick University, England.
|
||||
The socket map did not obey the -f flag. Problem noted by
|
||||
Dan Ringdahl, forwarded by Andrzej Filip.
|
||||
The addition of LDAP recursion in 8.13.0 broke enforcement of
|
||||
the LDAP map -1 argument which tells the MTA to only
|
||||
return success if and only if a single LDAP match is found.
|
||||
Add additional error checks in the MTA for milter communication
|
||||
to avoid a possible segmentation fault. Based on patch
|
||||
by Joe Maimon.
|
||||
Do not trigger an assertion if X509_digest() returns success but
|
||||
does not assign a value to its output parameter. Based
|
||||
on patch by Brian Kantor.
|
||||
Add more checks when resetting internal AUTH data (applies only
|
||||
to Cyrus SASL version 2). Otherwise an SMTP session might
|
||||
be dropped after an AUTH failure.
|
||||
Portability:
|
||||
Add LA_LONGLONG as valid LA_TYPE type for systems that use
|
||||
"long long" to read load average data, e.g.,
|
||||
AIX 5.1 in 32 bit mode. Note: this has to be set
|
||||
"by hand", it is not (yet) automatically detected.
|
||||
Problem noted by Burak Bilen.
|
||||
Use socklen_t for accept(), etc. on AIX 5.x. This should
|
||||
fix problems when compiling in 64 bit mode.
|
||||
Problem first reported by Harry Meiert of
|
||||
University of Bremen.
|
||||
New Files:
|
||||
include/sm/sem.h
|
||||
libsm/sem.c
|
||||
libsm/t-sem.c
|
||||
|
||||
8.13.3/8.13.3 2005/01/11
|
||||
Enhance handling of I/O errors, especially EOF, when STARTTLS
|
||||
is active.
|
||||
Make sure a connection is not reused after it has been closed
|
||||
due to a 421 error. Problem found by Allan E Johannesen
|
||||
of Worcester Polytechnic Institute.
|
||||
Avoid triggering an assertion when sendmail is interrupted while
|
||||
closing a connection. Problem found by Allan E Johannesen
|
||||
of Worcester Polytechnic Institute.
|
||||
Regression: a change in 8.13.2 caused sendmail not to try the
|
||||
next MX host (or FallbackMXhost if configured) when, at
|
||||
connection open, the current server returns a 4xy or 5xy
|
||||
SMTP reply code. Problem noted by Mark Tranchant.
|
||||
|
||||
8.13.2/8.13.2 2004/12/15
|
||||
Do not split the first header even if it exceeds the internal
|
||||
buffer size. Previously a part of such a header would
|
||||
end up in the body of the message. Problem noted by
|
||||
Simple Nomad of BindView.
|
||||
Do not complain about "cataddr: string too long" when checking
|
||||
headers that do not contain RFC 2822 addresses.
|
||||
Problem noted by Rich Graves of Brandeis University.
|
||||
If a server returns a 421 reply to the RSET command between
|
||||
message deliveries, do not attempt to deliver any more
|
||||
messages on that connection. This prevents bogus "Bad
|
||||
file number" recipient status. Problem noted by
|
||||
Allan E Johannesen of Worcester Polytechnic Institute.
|
||||
Allow trailing white space in EHLO command as recommended by RFC
|
||||
2821. Problem noted by Ralph Santagato of SBC Services.
|
||||
Deal with clients which use AUTH but negotiate a smaller buffer size
|
||||
for data exchanges than the value used by sendmail, e.g.,
|
||||
Cyrus IMAP lmtp server. Based on patch by Jamie Clark.
|
||||
When passing ESMTP arguments for RCPT to a milter, do not cut
|
||||
them off at a comma. Problem noted by Krzysztof Oledzki.
|
||||
Add more logging to milter change header functions to
|
||||
complement existing logging. Based on patch from
|
||||
Gurusamy Sarathy of Active State.
|
||||
Include <lber.h> in include/sm/config.h when LDAPMAP is defined.
|
||||
Patch from Edgar Hoch of the University of Stuttgart.
|
||||
Fix DNS lookup if IPv6 is enabled when converting an IP address
|
||||
to a hostname for use with SASL. Problem noted by Ken Jones;
|
||||
patch from Hajimu UMEMOTO.
|
||||
CONFIG: For consistency enable MODIFY_MAILER_FLAGS for the prog
|
||||
mailer. Patch from John Beck of Sun Microsystems.
|
||||
LIBMILTER: It was possible that xxfi_abort() was called after
|
||||
xxfi_eom() for a message if some timeouts were triggered.
|
||||
Patch from Alexey Kravchuk.
|
||||
LIBMILTER: Slightly rearrange mutex use in listener.c to allow
|
||||
different threads to call smfi_opensocket() and smfi_main().
|
||||
Patch from Jordan Ritter of Cloudmark.
|
||||
MAIL.LOCAL: Properly terminate MBDB before exiting. Problem
|
||||
noted by Nelson Fung.
|
||||
MAIL.LOCAL: make strip-mail.local used a wrong path to access
|
||||
mail.local. Problem noted by William Park.
|
||||
VACATION: Properly terminate MBDB before exiting. Problem noted
|
||||
by Nelson Fung.
|
||||
Portability:
|
||||
Add support for DragonFly BSD.
|
||||
New Files:
|
||||
cf/ostype/dragonfly.m4
|
||||
devtools/OS/DragonFly
|
||||
include/sm/os/sm_os_dragonfly.h
|
||||
Deleted Files:
|
||||
libsm/vsscanf.c
|
||||
|
||||
8.13.1/8.13.1 2004/07/30
|
||||
Using the default AliasFile ldap: specification would cause the
|
||||
objectClasses of the LDAP response to be included in the
|
||||
@@ -752,7 +121,7 @@ summary of the changes in that release.
|
||||
sendmail will now remove its pidfile when it exits. This was done
|
||||
to prevent confusion caused by running sendmail stop
|
||||
scripts two or more times, where the second and subsequent
|
||||
runs would report misleading error messages about sendmail's
|
||||
runs would report misleading error messages about sendmail's
|
||||
pid no longer existing. See section 1.3.15 of doc/op/op.me
|
||||
for a discussion of the implications of this, including
|
||||
how to correct broken scripts which may have depended on
|
||||
@@ -1650,7 +1019,7 @@ summary of the changes in that release.
|
||||
Properly count message size for mailstats during mail collection.
|
||||
Problem noted by Werner Wiethege.
|
||||
Log complete response from LMTP delivery agent on failure. Based on
|
||||
patch from Motonori Nakamura of Kyoto University.
|
||||
patch from by Motonori Nakamura of Kyoto University.
|
||||
Provide workaround for getopt() implementations that do not catch
|
||||
missing arguments.
|
||||
Fix the message size calculation if the message body is replaced by
|
||||
|
||||
+76
-188
@@ -77,7 +77,7 @@ Let's examine a typical .mc file:
|
||||
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1998-2005 Sendmail, Inc. and its suppliers.
|
||||
# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
|
||||
# Copyright (c) 1988, 1993
|
||||
@@ -397,9 +397,6 @@ SMTP_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data
|
||||
that ARRIVE from an address that resolves to one of
|
||||
the SMTP mailers and which are converted to MIME will
|
||||
be labeled with this character set.
|
||||
SMTP_MAILER_LL [990] The maximum line length for SMTP mailers
|
||||
(except the relay mailer).
|
||||
RELAY_MAILER_LL [2040] The maximum line length for the relay mailer.
|
||||
UUCP_MAILER_PATH [/usr/bin/uux] The program used to send UUCP mail.
|
||||
UUCP_MAILER_FLAGS [undefined] Flags added to UUCP mailer. Default
|
||||
flags are `DFMhuU' (and `m' for uucp-new mailer,
|
||||
@@ -495,12 +492,11 @@ QPAGE_MAILER_QGRP [undefined] The queue group for the qpage mailer.
|
||||
LOCAL_PROG_QGRP [undefined] The queue group for the prog mailer.
|
||||
|
||||
Note: to tweak Name_MAILER_FLAGS use the macro MODIFY_MAILER_FLAGS:
|
||||
MODIFY_MAILER_FLAGS(`Name', `change') where Name is the first part
|
||||
of the macro Name_MAILER_FLAGS (note: that means Name is entirely in
|
||||
upper case) and change can be: flags that should be used directly
|
||||
(thus overriding the default value), or if it starts with `+' (`-')
|
||||
then those flags are added to (removed from) the default value.
|
||||
Example:
|
||||
MODIFY_MAILER_FLAGS(`Name', `change') where Name is the first part of
|
||||
the macro Name_MAILER_FLAGS and change can be: flags that should
|
||||
be used directly (thus overriding the default value), or if it
|
||||
starts with `+' (`-') then those flags are added to (removed from)
|
||||
the default value. Example:
|
||||
|
||||
MODIFY_MAILER_FLAGS(`LOCAL', `+e')
|
||||
|
||||
@@ -962,7 +958,7 @@ generics_entire_domain
|
||||
|
||||
virtusertable A domain-specific form of aliasing, allowing multiple
|
||||
virtual domains to be hosted on one machine. For example,
|
||||
if the virtuser table contains:
|
||||
if the virtuser table contained:
|
||||
|
||||
[email protected] foo-info
|
||||
[email protected] bar-info
|
||||
@@ -1034,6 +1030,12 @@ ldap_routing Implement LDAP-based e-mail recipient routing according to
|
||||
|
||||
See the LDAP ROUTING section below for more information.
|
||||
|
||||
nodns If you aren't running DNS at your site (for example,
|
||||
you are UUCP-only connected). It's hard to consider
|
||||
this a "feature", but hey, it had to go somewhere.
|
||||
Actually, as of 8.7 this is a no-op -- remove "dns" from
|
||||
the hosts service switch entry instead.
|
||||
|
||||
nullclient This is a special case -- it creates a configuration file
|
||||
containing nothing but support for forwarding all mail to a
|
||||
central hub via a local SMTP-based network. The argument
|
||||
@@ -1184,7 +1186,7 @@ accept_unqualified_senders
|
||||
Normally, MAIL FROM: commands in the SMTP session will be
|
||||
refused if the connection is a network connection and the
|
||||
sender address does not include a domain name. If your
|
||||
setup sends local mail unqualified (i.e., MAIL FROM:<joe>),
|
||||
setup sends local mail unqualified (i.e., MAIL FROM: <joe>),
|
||||
you will need to use this feature to accept unqualified
|
||||
sender addresses. Setting the DaemonPortOptions modifier
|
||||
'u' overrides the default behavior, i.e., unqualified
|
||||
@@ -1238,15 +1240,15 @@ use_client_ptr If this feature is enabled then check_relay will override
|
||||
versions when delay_checks was not in use. See doc/op/op.*
|
||||
about check_relay, {client_name}, and {client_ptr}.
|
||||
|
||||
dnsbl Turns on rejection, discarding, or quarantining of hosts
|
||||
found in a DNS based list. The first argument is used as
|
||||
the domain in which blocked hosts are listed. A second
|
||||
argument can be used to change the default error message,
|
||||
or select one of the operations `discard' and `quarantine'.
|
||||
Without that second argument, the error message will be
|
||||
|
||||
dnsbl Turns on rejection of hosts found in an DNS based rejection
|
||||
list. If an argument is provided it is used as the domain
|
||||
in which blocked hosts are listed; otherwise it defaults to
|
||||
blackholes.mail-abuse.org. An explanation for an DNS based
|
||||
rejection list can be found at http://mail-abuse.org/rbl/.
|
||||
A second argument can be used to change the default error
|
||||
message. Without that second argument, the error message
|
||||
will be
|
||||
Rejected: IP-ADDRESS listed at SERVER
|
||||
|
||||
where IP-ADDRESS and SERVER are replaced by the appropriate
|
||||
information. By default, temporary lookup failures are
|
||||
ignored. This behavior can be changed by specifying a
|
||||
@@ -1276,6 +1278,13 @@ dnsbl Turns on rejection, discarding, or quarantining of hosts
|
||||
|
||||
See below (EDNSBL_TO) for an explanation.
|
||||
|
||||
NOTE: The default DNS blacklist, blackholes.mail-abuse.org,
|
||||
is a service offered by the Mail Abuse Prevention System
|
||||
(MAPS). As of July 31, 2001, MAPS is a subscription
|
||||
service, so using that network address won't work if you
|
||||
haven't subscribed. Contact MAPS to subscribe
|
||||
(http://mail-abuse.org/).
|
||||
|
||||
enhdnsbl Enhanced version of dnsbl (see above). Further arguments
|
||||
(up to 5) can be used to specify specific return values
|
||||
from lookups. Temporary lookup failures are ignored unless
|
||||
@@ -1485,81 +1494,6 @@ greet_pause Adds the greet_pause ruleset which enables open proxy
|
||||
R$* $: $&{daemon_flags}
|
||||
R$* a $* $# 0
|
||||
|
||||
block_bad_helo Reject messages from SMTP clients which provide a HELO/EHLO
|
||||
argument which is either unqualified, or is one of our own
|
||||
names (i.e., the server name instead of the client name).
|
||||
This check is performed at RCPT stage and disabled for the
|
||||
following cases:
|
||||
- authenticated sessions,
|
||||
- connections from IP addresses in class $={R}.
|
||||
Currently access_db lookups can not be used to
|
||||
(selectively) disable this test, moreover,
|
||||
FEATURE(`delay_checks')
|
||||
is required.
|
||||
|
||||
require_rdns Reject mail from connecting SMTP clients without proper
|
||||
rDNS (reverse DNS), functional gethostbyaddr() resolution.
|
||||
Note: this feature will cause false positives, i.e., there
|
||||
are legitimate MTAs that do not have proper DNS entries.
|
||||
Rejecting mails from those MTAs is a local policy decision.
|
||||
|
||||
The basic policy is to reject message with a 5xx error if
|
||||
the IP address fails to resolve. However, if this is a
|
||||
temporary failure, a 4xx temporary failure is returned.
|
||||
If the look-up succeeds, but returns an apparently forged
|
||||
value, this is treated as a temporary failure with a 4xx
|
||||
error code.
|
||||
|
||||
EXCEPTIONS:
|
||||
|
||||
Exceptions based on access entries are discussed below.
|
||||
Any IP address matched using $=R (the "relay-domains" file)
|
||||
is excepted from the rules. Since we have explicitly
|
||||
allowed relaying for this host, based on IP address, we
|
||||
ignore the rDNS failure.
|
||||
|
||||
The philosophical assumption here is that most users do
|
||||
not control their rDNS. They should be able to send mail
|
||||
through their ISP, whether or not they have valid rDNS.
|
||||
The class $=R, roughly speaking, contains those IP addresses
|
||||
and address ranges for which we are the ISP, or are acting
|
||||
as if the ISP.
|
||||
|
||||
If `delay_checks' is in effect (recommended), then any
|
||||
sender who has authenticated is also excepted from the
|
||||
restrictions. This happens because the rules produced by
|
||||
this FEATURE() will not be applied to authenticated senders
|
||||
(assuming `delay_checks').
|
||||
|
||||
ACCESS MAP ENTRIES:
|
||||
|
||||
Entries such as
|
||||
Connect:1.2.3.4 OK
|
||||
Connect:1.2 RELAY
|
||||
will whitelist IP address 1.2.3.4, so that the rDNS
|
||||
blocking does apply to that IP address
|
||||
|
||||
Entries such as
|
||||
Connect:1.2.3.4 REJECT
|
||||
will have the effect of forcing a temporary failure for
|
||||
that address to be treated as a permanent failure.
|
||||
|
||||
badmx Reject envelope sender addresses (MAIL) whose domain part
|
||||
resolves to a "bad" MX record. By default these are
|
||||
MX records which resolve to A records that match the
|
||||
regular expression:
|
||||
|
||||
^(127\.|10\.|0\.0\.0\.0)
|
||||
|
||||
This default regular expression can be overridden by
|
||||
specifying an argument, e.g.,
|
||||
|
||||
FEATURE(`badmx', `^127\.0\.0\.1')
|
||||
|
||||
Note: this feature requires that the sendmail binary
|
||||
has been compiled with the options MAP_REGEX and
|
||||
DNSMAP.
|
||||
|
||||
+-------+
|
||||
| HACKS |
|
||||
+-------+
|
||||
@@ -1659,7 +1593,7 @@ The four mailers are:
|
||||
|
||||
uucp-old (obsolete name: "uucp")
|
||||
This is the oldest, the worst (but the closest to UUCP) way of
|
||||
sending messages across UUCP connections. It does bangify
|
||||
sending messages accros UUCP connections. It does bangify
|
||||
everything and prepends $U (your UUCP name) to the sender's
|
||||
address (which can already be a bang path itself). It can
|
||||
only send to one address at a time, so it spends a lot of
|
||||
@@ -1938,8 +1872,7 @@ sections below).
|
||||
See the file cf/sendmail.schema for the actual LDAP schemas. Note that
|
||||
this schema (and therefore the lookups and examples below) is experimental
|
||||
at this point as it has had little public review. Therefore, it may change
|
||||
in future versions. Feedback via sendmail-YYYY@support.sendmail.org is
|
||||
encouraged (replace YYYY with the current year, e.g., 2005).
|
||||
in future versions. Feedback via sendmail@sendmail.org is encouraged.
|
||||
|
||||
-------
|
||||
Aliases
|
||||
@@ -2403,7 +2336,7 @@ without any prior arrangement). Along the same lines,
|
||||
FEATURE(`relay_local_from')
|
||||
|
||||
will allow relaying if the sender specifies a return path (i.e.
|
||||
MAIL FROM:<user@domain>) domain which is a local domain. This is a
|
||||
MAIL FROM: <user@domain>) domain which is a local domain. This is a
|
||||
dangerous feature as it will allow spammers to spam using your mail
|
||||
server by simply specifying a return address of [email protected].
|
||||
It should not be used unless absolutely necessary.
|
||||
@@ -2424,7 +2357,7 @@ allow relaying for roaming users.
|
||||
|
||||
|
||||
If source routing is used in the recipient address (e.g.,
|
||||
RCPT TO:<user%[email protected]>), sendmail will check
|
||||
RCPT TO: <user%[email protected]>), sendmail will check
|
||||
[email protected] for relaying if othersite.com is an allowed relay host
|
||||
in either class {R}, class {m} if FEATURE(`relay_entire_domain') is used,
|
||||
or the access database if FEATURE(`access_db') is used. To prevent
|
||||
@@ -2501,15 +2434,10 @@ definition for the database; for example
|
||||
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access_map')
|
||||
|
||||
Notice: If a second argument is specified it must contain the option
|
||||
`-T<TMPF>' as shown above. The optional parameters may be
|
||||
|
||||
`skip' enables SKIP as value part (see below).
|
||||
`lookupdotdomain' another way to enable the feature of the
|
||||
same name (see above).
|
||||
`relaytofulladdress' enable entries of the form
|
||||
To:[email protected] RELAY
|
||||
to allow relaying to just a specific
|
||||
e-mail address instead of an entire domain.
|
||||
`-T<TMPF>' as shown above. The optional third and fourth parameters
|
||||
may be `skip' or `lookupdotdomain'. The former enables SKIP as
|
||||
value part (see below), the latter is another way to enable the
|
||||
feature of the same name (see above).
|
||||
|
||||
Remember, since /etc/mail/access is a database, after creating the text
|
||||
file as described below, you must use makemap to create the database
|
||||
@@ -2577,8 +2505,7 @@ The value part of the map can contain:
|
||||
name is unresolvable. "Accept" does not mean
|
||||
"relay", but at most acceptance for local
|
||||
recipients. That is, OK allows less than RELAY.
|
||||
RELAY Accept mail addressed to the indicated domain
|
||||
(or address if `relaytofulladdress' is set) or
|
||||
RELAY Accept mail addressed to the indicated domain or
|
||||
received from the indicated domain for relaying
|
||||
through your SMTP server. RELAY also serves as
|
||||
an implicit OK for the other checks.
|
||||
@@ -2595,30 +2522,15 @@ The value part of the map can contain:
|
||||
it but causing the default action.
|
||||
### any text where ### is an RFC 821 compliant error code and
|
||||
"any text" is a message to return for the command.
|
||||
The entire string should be quoted to avoid
|
||||
surprises:
|
||||
|
||||
"### any text"
|
||||
|
||||
Otherwise sendmail formats the text as email
|
||||
addresses, e.g., it may remove spaces.
|
||||
The string should be quoted to avoid surprises,
|
||||
e.g., sendmail may remove spaces otherwise.
|
||||
This type is deprecated, use one of the two
|
||||
ERROR: entries below instead.
|
||||
ERROR:### any text
|
||||
as above, but useful to mark error messages as such.
|
||||
If quotes need to be used to avoid modifications
|
||||
(see above), they should be placed like this:
|
||||
|
||||
ERROR:"### any text"
|
||||
|
||||
ERROR:D.S.N:### any text
|
||||
where D.S.N is an RFC 1893 compliant error code
|
||||
and the rest as above. If quotes need to be used
|
||||
to avoid modifications, they should be placed
|
||||
like this:
|
||||
|
||||
ERROR:D.S.N:"### any text"
|
||||
|
||||
and the rest as above.
|
||||
QUARANTINE:any text
|
||||
Quarantine the message using the given text as the
|
||||
quarantining reason.
|
||||
@@ -2702,33 +2614,31 @@ as value part in the access map. Taking the example from above:
|
||||
Mail can't be sent to [email protected] or anyone at cyberspammer.com.
|
||||
That's why tagged entries should be used.
|
||||
|
||||
There are several DNS based blacklists which can be found by
|
||||
querying a search engine. These are databases of spammers
|
||||
There are several DNS based blacklists, the first of which was
|
||||
the RBL (``Realtime Blackhole List'') run by the MAPS project,
|
||||
see http://mail-abuse.org/. These are databases of spammers
|
||||
maintained in DNS. To use such a database, specify
|
||||
|
||||
FEATURE(`dnsbl', `dnsbl.example.com')
|
||||
FEATURE(`dnsbl')
|
||||
|
||||
This will cause sendmail to reject mail from any site listed in the
|
||||
DNS based blacklist. You must select a DNS based blacklist domain
|
||||
to check by specifying an argument to the FEATURE. The default
|
||||
error message is
|
||||
This will cause sendmail to reject mail from any site in the original
|
||||
Realtime Blackhole List database. This default DNS blacklist,
|
||||
blackholes.mail-abuse.org, is a service offered by the Mail Abuse
|
||||
Prevention System (MAPS). As of July 31, 2001, MAPS is a subscription
|
||||
service, so using that network address won't work if you haven't
|
||||
subscribed. Contact MAPS to subscribe (http://mail-abuse.org/).
|
||||
|
||||
You can specify an alternative RBL server to check by specifying an
|
||||
argument to the FEATURE. The default error message is
|
||||
|
||||
Rejected: IP-ADDRESS listed at SERVER
|
||||
|
||||
where IP-ADDRESS and SERVER are replaced by the appropriate
|
||||
information. A second argument can be used to specify a different
|
||||
text or action. For example,
|
||||
|
||||
FEATURE(`dnsbl', `dnsbl.example.com', `quarantine')
|
||||
|
||||
would quarantine the message if the client IP address is listed
|
||||
at `dnsbl.example.com'.
|
||||
|
||||
By default, temporary lookup failures are ignored
|
||||
and hence cause the connection not to be rejected by the DNS based
|
||||
rejection list. This behavior can be changed by specifying a third
|
||||
argument, which must be either `t' or a full error message. For
|
||||
example:
|
||||
text. By default, temporary lookup failures are ignored and hence
|
||||
cause the connection not to be rejected by the DNS based rejection
|
||||
list. This behavior can be changed by specifying a third argument,
|
||||
which must be either `t' or a full error message. For example:
|
||||
|
||||
FEATURE(`dnsbl', `dnsbl.example.com', `',
|
||||
`"451 Temporary lookup failure for " $&{client_addr} " in dnsbl.example.com"')
|
||||
@@ -2741,7 +2651,8 @@ where IP-ADDRESS and SERVER are replaced by the appropriate
|
||||
information.
|
||||
|
||||
This FEATURE can be included several times to query different
|
||||
DNS based rejection lists.
|
||||
DNS based rejection lists, e.g., the dial-up user list (see
|
||||
http://mail-abuse.org/dul/).
|
||||
|
||||
Notice: to avoid checking your own local domains against those
|
||||
blacklists, use the access_db feature and add:
|
||||
@@ -2751,7 +2662,7 @@ blacklists, use the access_db feature and add:
|
||||
|
||||
to the access map, where 10.1 is your local network. You may
|
||||
want to use "RELAY" instead of "OK" to allow also relaying
|
||||
instead of just disabling the DNS lookups in the blacklists.
|
||||
instead of just disabling the DNS lookups in the backlists.
|
||||
|
||||
|
||||
The features described above make use of the check_relay, check_mail,
|
||||
@@ -2885,9 +2796,9 @@ That may cause problems with simple header checks due to the
|
||||
tokenization. It might be simpler to use a regex map and apply it
|
||||
to $&{currHeader}.
|
||||
2. There are no default rulesets coming with this distribution of
|
||||
sendmail. You can write your own, can search the WWW for examples,
|
||||
or take a look at cf/cf/knecht.mc.
|
||||
3. When using a default ruleset for headers, the name of the header
|
||||
sendmail. You can either write your own or you can search the
|
||||
WWW for examples, e.g., http://www.digitalanswers.org/check_local/
|
||||
3. When using a default ruleset for headers, the name of the header
|
||||
currently being checked can be found in the $&{hdr_name} macro.
|
||||
|
||||
After all of the headers are read, the check_eoh ruleset will be called for
|
||||
@@ -2959,12 +2870,12 @@ the previous paragraph. Example:
|
||||
| STARTTLS |
|
||||
+----------+
|
||||
|
||||
In this text, cert will be used as an abbreviation for X.509 certificate,
|
||||
In this text, cert will be used as an abreviation for X.509 certificate,
|
||||
DN (CN) is the distinguished (common) name of a cert, and CA is a
|
||||
certification authority, which signs (issues) certs.
|
||||
|
||||
For STARTTLS to be offered by sendmail you need to set at least
|
||||
these variables (the file names and paths are just examples):
|
||||
this variables (the file names and paths are just examples):
|
||||
|
||||
define(`confCACERT_PATH', `/etc/mail/certs/')
|
||||
define(`confCACERT', `/etc/mail/certs/CA.cert.pem')
|
||||
@@ -4100,17 +4011,12 @@ confDONT_INIT_GROUPS DontInitGroups [False] If set, the initgroups(3)
|
||||
will only have their primary
|
||||
(/etc/passwd) group permissions.
|
||||
confUNSAFE_GROUP_WRITES UnsafeGroupWrites
|
||||
[True] If set, group-writable
|
||||
[False] If set, group-writable
|
||||
:include: and .forward files are
|
||||
considered "unsafe", that is, programs
|
||||
and files cannot be directly referenced
|
||||
from such files. World-writable files
|
||||
are always considered unsafe.
|
||||
Notice: this option is deprecated and
|
||||
will be removed in future versions;
|
||||
Set GroupWritableForwardFileSafe
|
||||
and GroupWritableIncludeFileSafe in
|
||||
DontBlameSendmail if required.
|
||||
confCONNECT_ONLY_TO ConnectOnlyTo [undefined] override connection
|
||||
address (for testing).
|
||||
confCONTROL_SOCKET_NAME ControlSocketName
|
||||
@@ -4122,11 +4028,6 @@ confDOUBLE_BOUNCE_ADDRESS DoubleBounceAddress
|
||||
"double bounce" error message to this
|
||||
address. If it expands to an empty
|
||||
string, double bounces are dropped.
|
||||
confSOFT_BOUNCE SoftBounce [False] If set, issue temporary errors
|
||||
(4xy) instead of permanent errors
|
||||
(5xy). This can be useful during
|
||||
testing of a new configuration to
|
||||
avoid erroneous bouncing of mails.
|
||||
confDEAD_LETTER_DROP DeadLetterDrop [undefined] Filename to save bounce
|
||||
messages which could not be returned
|
||||
to the user or sent to postmaster.
|
||||
@@ -4226,8 +4127,12 @@ confAUTH_OPTIONS AuthOptions [undefined] If this option is 'A'
|
||||
then the AUTH= parameter for the
|
||||
MAIL FROM command is only issued
|
||||
when authentication succeeded.
|
||||
See doc/op/op.me for more options
|
||||
and details.
|
||||
Other values (which should be listed
|
||||
one after the other without any
|
||||
intervening characters except for
|
||||
space or comma) are a, c, d, f, p,
|
||||
and y. See doc/op/op.me for
|
||||
details.
|
||||
confAUTH_MAX_BITS AuthMaxBits [INT_MAX] Limit the maximum encryption
|
||||
strength for the security layer in
|
||||
SMTP AUTH (SASL). Default is
|
||||
@@ -4282,7 +4187,7 @@ confNICE_QUEUE_RUN NiceQueueRun [undefined] If set, the priority of
|
||||
confDIRECT_SUBMISSION_MODIFIERS DirectSubmissionModifiers
|
||||
[undefined] Defines {daemon_flags}
|
||||
for direct submissions.
|
||||
confUSE_MSP UseMSP [undefined] Use as mail submission
|
||||
confUSE_MSP UseMSP [false] Use as mail submission
|
||||
program, see sendmail/SECURITY.
|
||||
confDELIVER_BY_MIN DeliverByMin [0] Minimum time for Deliver By
|
||||
SMTP Service Extension (RFC 2852).
|
||||
@@ -4291,11 +4196,6 @@ confREQUIRES_DIR_FSYNC RequiresDirfsync [true] RequiresDirfsync can
|
||||
flag REQUIRES_DIR_FSYNC at runtime.
|
||||
See sendmail/README for details.
|
||||
confSHARED_MEMORY_KEY SharedMemoryKey [0] Key for shared memory.
|
||||
confSHARED_MEMORY_KEY_FILE
|
||||
SharedMemoryKeyFile
|
||||
[undefined] File where the
|
||||
automatically selected key for
|
||||
shared memory is stored.
|
||||
confFAST_SPLIT FastSplit [1] If set to a value greater than
|
||||
zero, the initial MX lookups on
|
||||
addresses is suppressed when they
|
||||
@@ -4309,11 +4209,6 @@ confMAILBOX_DATABASE MailboxDatabase [pw] Type of lookup to find
|
||||
information about local mailboxes.
|
||||
confDEQUOTE_OPTS - [empty] Additional options for the
|
||||
dequote map.
|
||||
confMAX_NOOP_COMMANDS MaxNOOPCommands [20] Maximum number of "useless"
|
||||
commands before the SMTP server
|
||||
will slow down responding.
|
||||
confHELO_NAME HeloName If defined, use as name for EHLO/HELO
|
||||
command (instead of $j).
|
||||
confINPUT_MAIL_FILTERS InputMailFilters
|
||||
A comma separated list of filters
|
||||
which determines which filters and
|
||||
@@ -4345,14 +4240,7 @@ confMILTER_MACROS_ENVRCPT Milter.macros.envrcpt
|
||||
milters after RCPT TO command.
|
||||
confMILTER_MACROS_EOM Milter.macros.eom
|
||||
[{msg_id}] Macros to transmit to
|
||||
milters after the terminating
|
||||
DATA '.' is received.
|
||||
confMILTER_MACROS_EOH Milter.macros.eoh
|
||||
Macros to transmit to milters
|
||||
after the end of headers.
|
||||
confMILTER_MACROS_DATA Milter.macros.data
|
||||
Macros to transmit to milters
|
||||
after DATA command is received.
|
||||
milters after DATA command.
|
||||
|
||||
|
||||
See also the description of OSTYPE for some parameters that can be
|
||||
@@ -4699,4 +4587,4 @@ M4 DIVERSIONS
|
||||
8 DNS based blacklists
|
||||
9 special local rulesets (1 and 2)
|
||||
|
||||
$Revision: 8.722 $, Last updated $Date: 2007/04/03 21:26:58 $
|
||||
$Revision: 8.691 $, Last updated $Date: 2004/07/19 17:47:34 $
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# Makefile for configuration files.
|
||||
#
|
||||
# $Id: Makefile,v 8.60 2005/06/14 02:16:34 gshapiro Exp $
|
||||
# $Id: Makefile,v 8.58 2003/10/20 22:01:00 ca Exp $
|
||||
#
|
||||
|
||||
#
|
||||
@@ -164,11 +164,9 @@ M4FILES=\
|
||||
${CFDIR}/ostype/bsdi2.0.m4 \
|
||||
${CFDIR}/ostype/dgux.m4 \
|
||||
${CFDIR}/ostype/domainos.m4 \
|
||||
${CFDIR}/ostype/dragonfly.m4 \
|
||||
${CFDIR}/ostype/dynix3.2.m4 \
|
||||
${CFDIR}/ostype/freebsd4.m4 \
|
||||
${CFDIR}/ostype/freebsd5.m4 \
|
||||
${CFDIR}/ostype/freebsd6.m4 \
|
||||
${CFDIR}/ostype/gnu.m4 \
|
||||
${CFDIR}/ostype/hpux10.m4 \
|
||||
${CFDIR}/ostype/hpux11.m4 \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1998-2001, 2004, 2005 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,7 +19,7 @@ divert(-1)
|
||||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`$Id: knecht.mc,v 8.62 2006/09/27 19:48:59 eric Exp $')
|
||||
VERSIONID(`$Id: knecht.mc,v 8.58 2004/01/28 00:54:41 eric Exp $')
|
||||
OSTYPE(bsd4.4)
|
||||
DOMAIN(generic)
|
||||
|
||||
@@ -30,7 +30,6 @@ define(`confHOST_STATUS_DIRECTORY', `.hoststat')
|
||||
define(`confTO_ICONNECT', `10s')
|
||||
define(`confTO_QUEUEWARN', `8h')
|
||||
define(`confMIN_QUEUE_AGE', `27m')
|
||||
define(`confTRUSTED_USER', `smtrust')
|
||||
define(`confTRUSTED_USERS', ``www listmgr'')
|
||||
define(`confPRIVACY_FLAGS', ``authwarnings,noexpn,novrfy'')
|
||||
|
||||
@@ -43,13 +42,11 @@ define(`confCLIENT_CERT', `CERT_DIR/MYcert.pem')
|
||||
define(`confCLIENT_KEY', `CERT_DIR/MYkey.pem')
|
||||
|
||||
define(`CYRUS_MAILER_PATH', `/usr/local/cyrus/bin/deliver')
|
||||
define(`CYRUS_MAILER_FLAGS', `fAh5@/:|')
|
||||
|
||||
FEATURE(`access_db')
|
||||
FEATURE(`blacklist_recipients')
|
||||
FEATURE(`local_lmtp')
|
||||
FEATURE(`virtusertable')
|
||||
FEATURE(`mailertable')
|
||||
FEATURE(access_db)
|
||||
FEATURE(local_lmtp)
|
||||
FEATURE(virtusertable)
|
||||
FEATURE(mailertable)
|
||||
|
||||
FEATURE(`nocanonify', `canonify_hosts')
|
||||
CANONIFY_DOMAIN(`sendmail.org')
|
||||
@@ -66,26 +63,13 @@ 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')
|
||||
|
||||
|
||||
dnl # enable spam assassin
|
||||
INPUT_MAIL_FILTER(`spamassassin', `S=local:/var/run/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')
|
||||
|
||||
dnl # enable DomainKeys and DKIM
|
||||
INPUT_MAIL_FILTER(`dkim-filter', `S=unix:/var/run/smtrust/dkim.sock, F=T, T=R:2m')
|
||||
dnl INPUT_MAIL_FILTER(`dk-filter', `S=unix:/var/run/smtrust/dk.sock, F=T, T=R:2m')
|
||||
|
||||
define(`confMILTER_MACROS_CONNECT', `j, {daemon_name}')
|
||||
define(`confMILTER_MACROS_ENVFROM', `i, {auth_type}')
|
||||
|
||||
dnl # enable some DNSBLs
|
||||
dnl FEATURE(`dnsbl', `dnsbl.sorbs.net', `"550 Mail from " $`'&{client_addr} " refused - see http://www.dnsbl.sorbs.net/"')
|
||||
FEATURE(`dnsbl', `sbl-xbl.spamhaus.org', `"550 Mail from " $`'&{client_addr} " refused - see http://www.spamhaus.org/sbl/"')
|
||||
FEATURE(`dnsbl', `list.dsbl.org', `"550 Mail from " $`'&{client_addr} " refused - see http://dsbl.org/"')
|
||||
FEATURE(`dnsbl', `bl.spamcop.net', `"450 Mail from " $`'&{client_addr} " refused - see http://spamcop.net/bl.shtml"')
|
||||
|
||||
|
||||
MAILER(`local')
|
||||
MAILER(`smtp')
|
||||
MAILER(`cyrus')
|
||||
MAILER(local)
|
||||
MAILER(smtp)
|
||||
MAILER(cyrus)
|
||||
|
||||
LOCAL_RULE_0
|
||||
Rcyrus.$+ + $+ < @ $=w . > $#cyrus $@ $2 $: $1
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
#####
|
||||
##### SENDMAIL CONFIGURATION FILE
|
||||
#####
|
||||
##### built by ca@nother.smi.sendmail.com on Wed Oct 31 09:24:27 PDT 2007
|
||||
##### in /extra/home/ca/sm-8.14.2/OpenSource/sendmail-8.14.2/cf/cf
|
||||
##### built by ca@wiz.smi.sendmail.com on Fri Jul 30 11:06:26 PDT 2004
|
||||
##### in /extra/home/ca/sm-8.13.1/OpenSource/sendmail-8.13.1/cf/cf
|
||||
##### using ../ as configuration include directory
|
||||
#####
|
||||
######################################################################
|
||||
@@ -29,13 +29,13 @@
|
||||
|
||||
##### $Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $ #####
|
||||
##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ #####
|
||||
##### $Id: submit.mc,v 8.14 2006/04/05 05:54:41 ca Exp $ #####
|
||||
##### $Id: submit.mc,v 8.13 2003/09/10 22:12:48 ca Exp $ #####
|
||||
##### $Id: msp.m4,v 1.33 2004/02/09 22:32:38 ca Exp $ #####
|
||||
|
||||
##### $Id: no_default_msa.m4,v 8.2 2001/02/14 05:03:22 gshapiro Exp $ #####
|
||||
|
||||
|
||||
##### $Id: proto.m4,v 8.732 2007/04/20 00:53:30 ca Exp $ #####
|
||||
##### $Id: proto.m4,v 8.710 2004/07/27 17:32:48 ca Exp $ #####
|
||||
|
||||
# level 10 config file format
|
||||
V10/Berkeley
|
||||
@@ -114,7 +114,7 @@ D{MTAHost}[127.0.0.1]
|
||||
|
||||
|
||||
# Configuration version number
|
||||
DZ8.14.2/Submit
|
||||
DZ8.13.1/Submit
|
||||
|
||||
|
||||
###############
|
||||
@@ -252,7 +252,7 @@ O PrivacyOptions=goaway,noetrn,restrictqrun
|
||||
#O MinQueueAge=30m
|
||||
|
||||
# how many jobs can you process in the queue?
|
||||
#O MaxQueueRunSize=0
|
||||
#O MaxQueueRunSize=10000
|
||||
|
||||
# perform initial split of envelope without checking MX records
|
||||
#O FastSplit=1
|
||||
@@ -260,11 +260,10 @@ O PrivacyOptions=goaway,noetrn,restrictqrun
|
||||
# queue directory
|
||||
O QueueDirectory=/var/spool/clientmqueue
|
||||
|
||||
# key for shared memory; 0 to turn off, -1 to auto-select
|
||||
# key for shared memory; 0 to turn off
|
||||
#O SharedMemoryKey=0
|
||||
|
||||
# file to store auto-selected key for shared memory (SharedMemoryKey = -1)
|
||||
#O SharedMemoryKeyFile
|
||||
|
||||
|
||||
# timeouts (many of these)
|
||||
#O Timeout.initial=5m
|
||||
@@ -372,7 +371,7 @@ O TimeZoneSpec=
|
||||
#O RetryFactor=90000
|
||||
|
||||
# default character set
|
||||
#O DefaultCharSet=unknown-8bit
|
||||
#O DefaultCharSet=iso-8859-1
|
||||
|
||||
# service switch file (name hardwired on Solaris, Ultrix, OSF/1, others)
|
||||
#O ServiceSwitchFile=/etc/mail/service.switch
|
||||
@@ -381,13 +380,13 @@ O TimeZoneSpec=
|
||||
#O HostsFile=/etc/hosts
|
||||
|
||||
# dialup line delay on connection failure
|
||||
#O DialDelay=0s
|
||||
#O DialDelay=10s
|
||||
|
||||
# action to take if there are no recipients in the message
|
||||
#O NoRecipientAction=none
|
||||
#O NoRecipientAction=add-to-undisclosed
|
||||
|
||||
# chrooted environment for writing to files
|
||||
#O SafeFileEnvironment
|
||||
#O SafeFileEnvironment=/arch
|
||||
|
||||
# are colons OK in addresses?
|
||||
#O ColonOkInAddr=True
|
||||
@@ -424,9 +423,6 @@ O DontInitGroups=True
|
||||
# where do errors that occur when sending errors get sent?
|
||||
#O DoubleBounceAddress=postmaster
|
||||
|
||||
# issue temporary errors (4xy) instead of permanent errors (5xy)?
|
||||
#O SoftBounce=False
|
||||
|
||||
# where to save bounces if all else fails
|
||||
#O DeadLetterDrop=/var/tmp/dead.letter
|
||||
|
||||
@@ -523,12 +519,6 @@ O PidFile=/var/spool/clientmqueue/sm-client.pid
|
||||
# Random data source (required for systems without /dev/urandom under OpenSSL)
|
||||
#O RandFile
|
||||
|
||||
# Maximum number of "useless" commands before slowing down
|
||||
#O MaxNOOPCommands=20
|
||||
|
||||
# Name to use for EHLO (defaults to $j)
|
||||
#O HeloName
|
||||
|
||||
############################
|
||||
# QUEUE GROUP DEFINITIONS #
|
||||
############################
|
||||
@@ -1052,12 +1042,10 @@ R<? $+> $* $#error $@ 5.5.4 $: "553 Domain name required for sender address " $
|
||||
...remote is not
|
||||
# check results
|
||||
R<?> $* $: @ $1 mark address: nothing known about it
|
||||
R<$={ResOk}> $* $: @ $2 domain ok
|
||||
R<$={ResOk}> $* $@ <OKR> domain ok: stop
|
||||
R<TEMP> $* $#error $@ 4.1.8 $: "451 Domain of sender address " $&f " does not resolve"
|
||||
R<PERM> $* $#error $@ 5.1.8 $: "553 Domain of sender address " $&f " does not exist"
|
||||
|
||||
|
||||
|
||||
######################################################################
|
||||
### check_rcpt -- check SMTP `RCPT TO:' command argument
|
||||
######################################################################
|
||||
@@ -1160,7 +1148,6 @@ R<?> $* $=R $@ RELAY
|
||||
|
||||
|
||||
|
||||
|
||||
######################################################################
|
||||
### trust_auth: is user trusted to authenticate as someone else?
|
||||
###
|
||||
@@ -1296,7 +1283,7 @@ R$* $#relay $@ ${MTAHost} $: $1 < @ $j >
|
||||
### Local and Program Mailer specification ###
|
||||
##################################################
|
||||
|
||||
##### $Id: local.m4,v 8.59 2004/11/23 00:37:25 ca Exp $ #####
|
||||
##### $Id: local.m4,v 8.58 2000/10/26 01:58:29 ca Exp $ #####
|
||||
|
||||
#
|
||||
# Envelope sender rewriting
|
||||
@@ -1348,7 +1335,7 @@ Mprog, P=[IPC], F=lmDFMuXk5, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, D=$z:/,
|
||||
### SMTP Mailer specification ###
|
||||
#####################################
|
||||
|
||||
##### $Id: smtp.m4,v 8.65 2006/07/12 21:08:10 ca Exp $ #####
|
||||
##### $Id: smtp.m4,v 8.64 2001/04/03 01:52:54 gshapiro Exp $ #####
|
||||
|
||||
#
|
||||
# common sender and masquerading recipient rewriting
|
||||
@@ -1454,7 +1441,7 @@ Mrelay, P=[IPC], F=mDFMuXa8k, S=EnvFromSMTP/HdrFromSMTP, R=MasqSMTP, E=\r\n, L=
|
||||
# #
|
||||
#
|
||||
# divert(0)dnl
|
||||
# VERSIONID(`$Id: submit.mc,v 8.14 2006/04/05 05:54:41 ca Exp $')
|
||||
# VERSIONID(`$Id: submit.mc,v 8.13 2003/09/10 22:12:48 ca 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
|
||||
|
||||
@@ -15,7 +15,7 @@ divert(-1)
|
||||
#
|
||||
|
||||
divert(0)dnl
|
||||
VERSIONID(`$Id: submit.mc,v 8.14 2006/04/05 05:54:41 ca Exp $')
|
||||
VERSIONID(`$Id: submit.mc,v 8.13 2003/09/10 22:12:48 ca 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1998-2002, 2004, 2006 Sendmail, Inc. and its suppliers.
|
||||
# Copyright (c) 1998-2002, 2004 Sendmail, Inc. and its suppliers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# By using this file, you agree to the terms and conditions set
|
||||
@@ -10,20 +10,15 @@ divert(-1)
|
||||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`$Id: access_db.m4,v 8.27 2006/07/06 21:10:10 ca Exp $')
|
||||
VERSIONID(`$Id: access_db.m4,v 8.26 2004/06/24 18:10:02 ca 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(_ARG2_),`relaytofulladdress',`define(`_RELAY_FULL_ADDR_', `1')')
|
||||
ifelse(lower(_ARG3_),`skip',`define(`_ACCESS_SKIP_', `1')')
|
||||
ifelse(lower(_ARG3_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')')
|
||||
ifelse(lower(_ARG3_),`relaytofulladdress',`define(`_RELAY_FULL_ADDR_', `1')')
|
||||
ifelse(lower(_ARG4_),`skip',`define(`_ACCESS_SKIP_', `1')')
|
||||
ifelse(lower(_ARG4_),`lookupdotdomain',`define(`_LOOKUPDOTDOMAIN_', `1')')
|
||||
ifelse(lower(_ARG4_),`relaytofulladdress',`define(`_RELAY_FULL_ADDR_', `1')')
|
||||
define(`_ATMPF_', `<TMPF>')dnl
|
||||
dnl check whether arg contains -T`'_ATMPF_
|
||||
dnl unless it is a sequence map
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 2006 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: badmx.m4,v 1.1 2006/12/16 00:56:32 ca Exp $')
|
||||
divert(-1)
|
||||
|
||||
define(`_BADMX_CHK_', 1)
|
||||
|
||||
LOCAL_CONFIG
|
||||
Kmxlist bestmx -z: -T<TEMP>
|
||||
Kbadmx regex -a<BADMX> ^(([0-9]{1,3}\.){3}[0-9]){0,1}\.$
|
||||
KdnsA dns -R A -a. -T<TEMP>
|
||||
KBadMXIP regex -a<BADMXIP> ifelse(defn(`_ARG_'), `', `^(127\.|10\.|0\.0\.0\.0)', `_ARG_')
|
||||
@@ -1,18 +0,0 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 2006 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: block_bad_helo.m4,v 1.1 2006/06/15 22:49:30 ca Exp $')
|
||||
divert(-1)
|
||||
|
||||
define(`_BLOCK_BAD_HELO_', `')dnl
|
||||
RELAY_DOMAIN(`127.0.0.1')dnl
|
||||
LOCAL_DOMAIN(`[127.0.0.1]')dnl
|
||||
@@ -1,6 +1,6 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1998-2002, 2005-2007 Sendmail, Inc. and its suppliers.
|
||||
# Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# By using this file, you agree to the terms and conditions set
|
||||
@@ -12,15 +12,13 @@ divert(-1)
|
||||
ifdef(`DNSBL_MAP', `', `define(`DNSBL_MAP', `dns -R A')')
|
||||
divert(0)
|
||||
ifdef(`_DNSBL_R_',`dnl',`dnl
|
||||
VERSIONID(`$Id: dnsbl.m4,v 8.33 2007/01/05 18:49:29 ca Exp $')
|
||||
VERSIONID(`$Id: dnsbl.m4,v 8.29 2002/08/09 21:02:08 ca Exp $')
|
||||
define(`_DNSBL_R_',`')
|
||||
ifelse(defn(`_ARG_'), `',
|
||||
`errprint(`*** ERROR: missing argument for FEATURE(`dnsbl')')')
|
||||
LOCAL_CONFIG
|
||||
# map for DNS based blacklist lookups
|
||||
Kdnsbl DNSBL_MAP -T<TMP>ifdef(`DNSBL_MAP_OPT',` DNSBL_MAP_OPT')')
|
||||
divert(-1)
|
||||
define(`_DNSBL_SRV_', `_ARG_')dnl
|
||||
define(`_DNSBL_SRV_', `ifelse(len(X`'_ARG_),`1',`blackholes.mail-abuse.org',_ARG_)')dnl
|
||||
define(`_DNSBL_MSG_', `ifelse(len(X`'_ARG2_),`1',`"550 Rejected: " $`'&{client_addr} " listed at '_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)
|
||||
@@ -30,10 +28,6 @@ R$-.$-.$-.$- $: <?> $(dnsbl $4.$3.$2.$1._DNSBL_SRV_. $: OK $)
|
||||
R<?>OK $: OKSOFAR
|
||||
ifelse(len(X`'_ARG3_),`1',
|
||||
`R<?>$+<TMP> $: TMPOK',
|
||||
`R<?>$+<TMP> $#error $@ 4.4.3 $: _DNSBL_MSG_TMP_')
|
||||
ifelse(`X'_ARG2_,`Xquarantine',
|
||||
`R<?>$+ $#error $@ quarantine $: _DNSBL_SRV_',
|
||||
`X'_ARG2_,`Xdiscard',
|
||||
`R<?>$+ $#discard $: _DNSBL_SRV_',
|
||||
`R<?>$+ $#error $@ 5.7.1 $: _DNSBL_MSG_')
|
||||
`R<?>$+<TMP> $#error $@ 4.7.1 $: _DNSBL_MSG_TMP_')
|
||||
R<?>$+ $#error $@ 5.7.1 $: _DNSBL_MSG_
|
||||
divert(-1)
|
||||
@@ -1,6 +1,6 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 2000-2002, 2005-2007 Sendmail, Inc. and its suppliers.
|
||||
# Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# By using this file, you agree to the terms and conditions set
|
||||
@@ -9,28 +9,19 @@ divert(-1)
|
||||
#
|
||||
#
|
||||
|
||||
ifelse(defn(`_ARG_'), `',
|
||||
`errprint(`*** ERROR: missing argument for FEATURE(`enhdnsbl')')')
|
||||
divert(0)
|
||||
ifdef(`_EDNSBL_R_',`dnl',`dnl
|
||||
VERSIONID(`$Id: enhdnsbl.m4,v 1.12 2007/01/08 18:22:05 ca Exp $')
|
||||
VERSIONID(`$Id: enhdnsbl.m4,v 1.9 2002/05/19 21:27:29 gshapiro 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_', `_ARG_')dnl
|
||||
define(`_EDNSBL_MSG_',
|
||||
`ifelse(len(X`'_ARG2_),`1',`"550 Rejected: " $`'&{client_addr} " listed at '_EDNSBL_SRV_`"',
|
||||
X`'_ARG2_,`Xquarantine',`_EDNSBL_SRV_',
|
||||
`_ARG2_')')dnl
|
||||
define(`_EDNSBL_SRV_', `ifelse(len(X`'_ARG_),`1',`blackholes.mail-abuse.org',_ARG_)')dnl
|
||||
define(`_EDNSBL_MSG_', `ifelse(len(X`'_ARG2_),`1',`"550 Rejected: " $`'&{client_addr} " listed at '_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
|
||||
define(`_EDNSBL_ACTION_',
|
||||
`ifelse(X`'_ARG2_,`Xquarantine',`$`'#error $`'@ quarantine',
|
||||
X`'_ARG2_,`Xdiscard',`$`'#discard',
|
||||
`$`'#error $`'@ 5.7.1')')dnl
|
||||
divert(8)
|
||||
# DNS based IP address spam list _EDNSBL_SRV_
|
||||
R$* $: $&{client_addr}
|
||||
@@ -38,16 +29,16 @@ R$-.$-.$-.$- $: <?> $(ednsbl $4.$3.$2.$1._EDNSBL_SRV_. $: OK $)
|
||||
R<?>OK $: OKSOFAR
|
||||
ifelse(len(X`'_ARG3_),`1',
|
||||
`R<?>$+<TMP> $: TMPOK',
|
||||
`R<?>$+<TMP> $#error $@ 4.4.3 $: _EDNSBL_MSG_TMP_')
|
||||
R<?>_EDNSBL_MATCH_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_
|
||||
`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_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
|
||||
`R<?>_ARG5_ $#error $@ 5.7.1 $: _EDNSBL_MSG_')
|
||||
ifelse(len(X`'_ARG6_),`1',`dnl',
|
||||
`R<?>_ARG6_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
|
||||
`R<?>_ARG6_ $#error $@ 5.7.1 $: _EDNSBL_MSG_')
|
||||
ifelse(len(X`'_ARG7_),`1',`dnl',
|
||||
`R<?>_ARG7_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
|
||||
`R<?>_ARG7_ $#error $@ 5.7.1 $: _EDNSBL_MSG_')
|
||||
ifelse(len(X`'_ARG8_),`1',`dnl',
|
||||
`R<?>_ARG8_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
|
||||
`R<?>_ARG8_ $#error $@ 5.7.1 $: _EDNSBL_MSG_')
|
||||
ifelse(len(X`'_ARG9_),`1',`dnl',
|
||||
`R<?>_ARG9_ _EDNSBL_ACTION_ $: _EDNSBL_MSG_')
|
||||
`R<?>_ARG9_ $#error $@ 5.7.1 $: _EDNSBL_MSG_')
|
||||
divert(-1)
|
||||
@@ -1,6 +1,6 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1999-2002, 2004, 2007 Sendmail, Inc. and its suppliers.
|
||||
# Copyright (c) 1999-2002, 2004 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.15 2007/05/01 17:38:25 ca Exp $')
|
||||
VERSIONID(`$Id: ldap_routing.m4,v 8.14 2004/02/18 02:45:11 gshapiro Exp $')
|
||||
divert(-1)
|
||||
|
||||
# Check first two arguments. If they aren't set, may need to warn in proto.m4
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 2004, 2005 Sendmail, Inc. and its suppliers.
|
||||
# Copyright (c) 2004 Sendmail, Inc. and its suppliers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# By using this file, you agree to the terms and conditions set
|
||||
@@ -11,7 +11,7 @@ divert(-1)
|
||||
|
||||
divert(0)
|
||||
ifdef(`_MTAMARK_R',`dnl',`dnl
|
||||
VERSIONID(`$Id: mtamark.m4,v 1.2 2005/07/25 20:56:53 ca Exp $')
|
||||
VERSIONID(`$Id: mtamark.m4,v 1.1 2004/03/22 19:22:40 ca Exp $')
|
||||
LOCAL_CONFIG
|
||||
define(`_MTAMARK_R',`')dnl
|
||||
# map for MTA mark
|
||||
@@ -29,5 +29,5 @@ R<?>1. $: OKSOFAR
|
||||
R<?>0. $#error $@ 5.7.1 $: _MTAMARK_MSG_
|
||||
ifelse(len(X`'_ARG2_),`1',
|
||||
`R<?>$+<TMP> $: TMPOK',
|
||||
`R<?>$+<TMP> $#error $@ 4.4.3 $: _MTAMARK_MSG_TMP_')
|
||||
`R<?>$+<TMP> $#error $@ 4.7.1 $: _MTAMARK_MSG_TMP_')
|
||||
divert(-1)
|
||||
@@ -1,16 +0,0 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 2006 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: require_rdns.m4,v 1.1 2006/06/15 22:49:30 ca Exp $')
|
||||
divert(-1)
|
||||
|
||||
define(`_REQUIRE_RDNS_', `')
|
||||
@@ -1,6 +1,6 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers.
|
||||
# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
|
||||
# Copyright (c) 1988, 1993
|
||||
@@ -13,7 +13,7 @@ divert(-1)
|
||||
#
|
||||
divert(0)
|
||||
|
||||
VERSIONID(`$Id: proto.m4,v 8.732 2007/04/20 00:53:30 ca Exp $')
|
||||
VERSIONID(`$Id: proto.m4,v 8.710 2004/07/27 17:32:48 ca Exp $')
|
||||
|
||||
# level CF_LEVEL config file format
|
||||
V`'CF_LEVEL/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley')
|
||||
@@ -388,7 +388,7 @@ _OPTION(QueueSortOrder, `confQUEUE_SORT_ORDER', `priority')
|
||||
_OPTION(MinQueueAge, `confMIN_QUEUE_AGE', `30m')
|
||||
|
||||
# how many jobs can you process in the queue?
|
||||
_OPTION(MaxQueueRunSize, `confMAX_QUEUE_RUN_SIZE', `0')
|
||||
_OPTION(MaxQueueRunSize, `confMAX_QUEUE_RUN_SIZE', `10000')
|
||||
|
||||
# perform initial split of envelope without checking MX records
|
||||
_OPTION(FastSplit, `confFAST_SPLIT', `1')
|
||||
@@ -396,11 +396,12 @@ _OPTION(FastSplit, `confFAST_SPLIT', `1')
|
||||
# queue directory
|
||||
O QueueDirectory=ifdef(`QUEUE_DIR', QUEUE_DIR, `/var/spool/mqueue')
|
||||
|
||||
# key for shared memory; 0 to turn off, -1 to auto-select
|
||||
# key for shared memory; 0 to turn off
|
||||
_OPTION(SharedMemoryKey, `confSHARED_MEMORY_KEY', `0')
|
||||
|
||||
# file to store auto-selected key for shared memory (SharedMemoryKey = -1)
|
||||
_OPTION(SharedMemoryKeyFile, `confSHARED_MEMORY_KEY_FILE', `')
|
||||
ifdef(`confSHARED_MEMORY_KEY_FILE', `dnl
|
||||
# file to store key for shared memory (if SharedMemoryKey = -1)
|
||||
O SharedMemoryKeyFile=confSHARED_MEMORY_KEY_FILE')
|
||||
|
||||
# timeouts (many of these)
|
||||
_OPTION(Timeout.initial, `confTO_INITIAL', `5m')
|
||||
@@ -451,7 +452,7 @@ _OPTION(DontPruneRoutes, `confDONT_PRUNE_ROUTES', `False')
|
||||
_OPTION(SuperSafe, `confSAFE_QUEUE', `True')
|
||||
|
||||
# status file
|
||||
_OPTION(StatusFile, `STATUS_FILE')
|
||||
O StatusFile=ifdef(`STATUS_FILE', `STATUS_FILE', `MAIL_SETTINGS_DIR`'statistics')
|
||||
|
||||
# time zone handling:
|
||||
# if undefined, use system default
|
||||
@@ -510,7 +511,7 @@ _OPTION(ClassFactor, `confWORK_CLASS_FACTOR', `1800')
|
||||
_OPTION(RetryFactor, `confWORK_TIME_FACTOR', `90000')
|
||||
|
||||
# default character set
|
||||
_OPTION(DefaultCharSet, `confDEF_CHAR_SET', `unknown-8bit')
|
||||
_OPTION(DefaultCharSet, `confDEF_CHAR_SET', `iso-8859-1')
|
||||
|
||||
# service switch file (name hardwired on Solaris, Ultrix, OSF/1, others)
|
||||
_OPTION(ServiceSwitchFile, `confSERVICE_SWITCH_FILE', `MAIL_SETTINGS_DIR`'service.switch')
|
||||
@@ -519,13 +520,13 @@ _OPTION(ServiceSwitchFile, `confSERVICE_SWITCH_FILE', `MAIL_SETTINGS_DIR`'servic
|
||||
_OPTION(HostsFile, `confHOSTS_FILE', `/etc/hosts')
|
||||
|
||||
# dialup line delay on connection failure
|
||||
_OPTION(DialDelay, `confDIAL_DELAY', `0s')
|
||||
_OPTION(DialDelay, `confDIAL_DELAY', `10s')
|
||||
|
||||
# action to take if there are no recipients in the message
|
||||
_OPTION(NoRecipientAction, `confNO_RCPT_ACTION', `none')
|
||||
_OPTION(NoRecipientAction, `confNO_RCPT_ACTION', `add-to-undisclosed')
|
||||
|
||||
# chrooted environment for writing to files
|
||||
_OPTION(SafeFileEnvironment, `confSAFE_FILE_ENV', `')
|
||||
_OPTION(SafeFileEnvironment, `confSAFE_FILE_ENV', `/arch')
|
||||
|
||||
# are colons OK in addresses?
|
||||
_OPTION(ColonOkInAddr, `confCOLON_OK_IN_ADDR', `True')
|
||||
@@ -564,9 +565,6 @@ ifdef(`confUNSAFE_GROUP_WRITES',
|
||||
# where do errors that occur when sending errors get sent?
|
||||
_OPTION(DoubleBounceAddress, `confDOUBLE_BOUNCE_ADDRESS', `postmaster')
|
||||
|
||||
# issue temporary errors (4xy) instead of permanent errors (5xy)?
|
||||
_OPTION(SoftBounce, `confSOFT_BOUNCE', `False')
|
||||
|
||||
# where to save bounces if all else fails
|
||||
_OPTION(DeadLetterDrop, `confDEAD_LETTER_DROP', `/var/tmp/dead.letter')
|
||||
|
||||
@@ -650,9 +648,7 @@ _OPTION(Milter.macros.connect, `confMILTER_MACROS_CONNECT', `')
|
||||
_OPTION(Milter.macros.helo, `confMILTER_MACROS_HELO', `')
|
||||
_OPTION(Milter.macros.envfrom, `confMILTER_MACROS_ENVFROM', `')
|
||||
_OPTION(Milter.macros.envrcpt, `confMILTER_MACROS_ENVRCPT', `')
|
||||
_OPTION(Milter.macros.eom, `confMILTER_MACROS_EOM', `')
|
||||
_OPTION(Milter.macros.eoh, `confMILTER_MACROS_EOH', `')
|
||||
_OPTION(Milter.macros.data, `confMILTER_MACROS_DATA', `')')
|
||||
_OPTION(Milter.macros.eom, `confMILTER_MACROS_EOM', `')')
|
||||
|
||||
# CA directory
|
||||
_OPTION(CACertPath, `confCACERT_PATH', `')
|
||||
@@ -673,12 +669,6 @@ _OPTION(DHParameters, `confDH_PARAMETERS', `')
|
||||
# Random data source (required for systems without /dev/urandom under OpenSSL)
|
||||
_OPTION(RandFile, `confRAND_FILE', `')
|
||||
|
||||
# Maximum number of "useless" commands before slowing down
|
||||
_OPTION(MaxNOOPCommands, `confMAX_NOOP_COMMANDS', `20')
|
||||
|
||||
# Name to use for EHLO (defaults to $j)
|
||||
_OPTION(HeloName, `confHELO_NAME')
|
||||
|
||||
############################
|
||||
`# QUEUE GROUP DEFINITIONS #'
|
||||
############################
|
||||
@@ -1792,14 +1782,6 @@ ifdef(`_CONN_CONTROL_IMMEDIATE_',`',`dnl
|
||||
dnl workspace: ignored...
|
||||
R$* $: $>"ConnControl" dummy')', `dnl')
|
||||
undivert(8)
|
||||
ifdef(`_REQUIRE_RDNS_', `dnl
|
||||
R$* $: $&{client_addr} $| $&{client_resolve}
|
||||
R$=R $* $@ RELAY We relay for these
|
||||
R$* $| OK $@ OK Resolves.
|
||||
R$* $| FAIL $#error $@ 5.7.1 $: 550 Fix reverse DNS for $1
|
||||
R$* $| TEMP $#error $@ 4.1.8 $: 451 Client IP address $1 does not resolve
|
||||
R$* $| FORGED $#error $@ 4.1.8 $: 451 Possibly forged hostname for $1
|
||||
', `dnl')
|
||||
|
||||
######################################################################
|
||||
### check_mail -- check SMTP ``MAIL FROM:'' command argument
|
||||
@@ -1925,7 +1907,7 @@ R<? $+> $* $#error $@ 5.5.4 $: "_CODE553 Domain name required for sender addres
|
||||
...remote is not')
|
||||
# check results
|
||||
R<?> $* $: @ $1 mark address: nothing known about it
|
||||
R<$={ResOk}> $* $: @ $2 domain ok
|
||||
R<$={ResOk}> $* $@ <_RES_OK_> domain ok: stop
|
||||
R<TEMP> $* $#error $@ 4.1.8 $: "451 Domain of sender address " $&f " does not resolve"
|
||||
R<PERM> $* $#error $@ 5.1.8 $: "_CODE553 Domain of sender address " $&f " does not exist"
|
||||
ifdef(`_ACCESS_TABLE_', `dnl
|
||||
@@ -1940,34 +1922,6 @@ ifdef(`_ATMPF_', `R<_ATMPF_> $* $#error $@ 4.3.0 $: "451 Temporary system failu
|
||||
dnl generic error from access map
|
||||
R<$+> $* $#error $: $1 error from access db',
|
||||
`dnl')
|
||||
dnl workspace: @ CanonicalAddress (i.e. address in canonical form localpart<@host>)
|
||||
|
||||
ifdef(`_BADMX_CHK_', `dnl
|
||||
R@ $*<@$+>$* $: $1<@$2>$3 $| $>BadMX $2
|
||||
R$* $| $#$* $#$2
|
||||
|
||||
SBadMX
|
||||
# Look up MX records and ferret away a copy of the original address.
|
||||
# input: domain part of address to check
|
||||
R$+ $:<MX><$1><:$(mxlist $1$):><:>
|
||||
# workspace: <MX><domain><: mxlist-result $><:>
|
||||
R<MX><$+><:$*<TEMP>:><$*> $#error $@ 4.1.2 $: "450 MX lookup failure for "$1
|
||||
# workspace: <MX> <original destination> <unchecked mxlist> <checked mxlist>
|
||||
# Recursively run badmx check on each mx.
|
||||
R<MX><$*><:$+:$*><:$*> <MX><$1><:$3><: $4 $(badmx $2 $):>
|
||||
# See if any of them fail.
|
||||
R<MX><$*><$*><$*<BADMX>:$*> $#error $@ 5.1.2 $:"550 Illegal MX record for recipient host "$1
|
||||
# Reverse the mxlists so we can use the same argument order again.
|
||||
R<MX><$*><$*><$*> $:<MX><$1><$3><$2>
|
||||
R<MX><$*><:$+:$*><:$*> <MX><$1><:$3><:$4 $(dnsA $2 $) :>
|
||||
|
||||
# Reverse the lists so we can use the same argument order again.
|
||||
R<MX><$*><$*><$*> $:<MX><$1><$3><$2>
|
||||
R<MX><$*><:$+:$*><:$*> <MX><$1><:$3><:$4 $(BadMXIP $2 $) :>
|
||||
|
||||
R<MX><$*><$*><$*<BADMXIP>:$*> $#error $@ 5.1.2 $:"550 Invalid MX record for recipient host "$1',
|
||||
`dnl')
|
||||
|
||||
|
||||
######################################################################
|
||||
### check_rcpt -- check SMTP ``RCPT TO:'' command argument
|
||||
@@ -2005,7 +1959,7 @@ R<@> < $* @ $+ . $+ > $: < $1 @ $2 . $3 >
|
||||
dnl prepend daemon_flags
|
||||
R<@> $* $: $&{daemon_flags} $| <@> $1
|
||||
dnl workspace: ${daemon_flags} $| <@> <address>
|
||||
dnl _r_equire qual.rcpt: ok
|
||||
dnl 'r'equire qual.rcpt: ok
|
||||
R$* r $* $| <@> < $+ @ $+ > $: < $3 @ $4 >
|
||||
dnl do not allow these at all or only from local systems?
|
||||
R$* r $* $| <@> < $* > $: < ? $&{client_name} > < $3 >
|
||||
@@ -2358,7 +2312,6 @@ ifdef(`_SPAM_HATER_',
|
||||
R<HATER> $+ $: $1 spam hater: continue checks
|
||||
R<$*> $+ $@ $>"Delay_TLS_Clt2" NOSPAMHATER everyone else: stop
|
||||
dnl',`dnl')
|
||||
|
||||
dnl run further checks: check_mail
|
||||
dnl should we "clean up" $&f?
|
||||
ifdef(`_FFR_MAIL_MACRO',
|
||||
@@ -2372,27 +2325,6 @@ R$* $| $#$* $#$2
|
||||
R$* $| $* $: $1
|
||||
', `dnl')
|
||||
|
||||
ifdef(`_BLOCK_BAD_HELO_', `dnl
|
||||
R$* $: $1 $| <$&{auth_authen}> Get auth info
|
||||
dnl Bypass the test for users who have authenticated.
|
||||
R$* $| <$+> $: $1 skip if auth
|
||||
R$* $| <$*> $: $1 $| <$&{client_addr}> [$&s] Get connection info
|
||||
dnl Bypass for local clients -- IP address starts with $=R
|
||||
R$* $| <$=R $*> [$*] $: $1 skip if local client
|
||||
dnl Bypass a "sendmail -bs" session, which use 0 for client ip address
|
||||
R$* $| <0> [$*] $: $1 skip if sendmail -bs
|
||||
dnl Reject our IP - assumes "[ip]" is in class $=w
|
||||
R$* $| <$*> $=w $#error $@ 5.7.1 $:"550 bogus HELO name used: " $&s
|
||||
dnl Reject our hostname
|
||||
R$* $| <$*> [$=w] $#error $@ 5.7.1 $:"550 bogus HELO name used: " $&s
|
||||
dnl Pass anything else with a "." in the domain parameter
|
||||
R$* $| <$*> [$+.$+] $: $1 qualified domain ok
|
||||
dnl Reject if there was no "." or only an initial or final "."
|
||||
R$* $| <$*> [$*] $#error $@ 5.7.1 $:"550 bogus HELO name used: " $&s
|
||||
dnl Clean up the workspace
|
||||
R$* $| $* $: $1
|
||||
', `dnl')
|
||||
|
||||
ifdef(`_ACCESS_TABLE_', `dnl', `divert(-1)')
|
||||
######################################################################
|
||||
### F: LookUpFull -- search for an entry in access database
|
||||
@@ -2766,11 +2698,6 @@ RSOFTWARE $| <$-:$+> $* $#error $@ $2 $: $1 " TLS handshake failed."
|
||||
dnl no <reply:dns> i.e. not requirements in the access map
|
||||
dnl use default error
|
||||
RSOFTWARE $| $* $#error $@ ifdef(`TLS_PERM_ERR', `5.7.0', `4.7.0') $: "ifdef(`TLS_PERM_ERR', `503', `403') TLS handshake failed."
|
||||
# deal with TLS protocol errors: abort
|
||||
RPROTOCOL $| <$-:$+> $* $#error $@ $2 $: $1 " STARTTLS failed."
|
||||
dnl no <reply:dns> i.e. not requirements in the access map
|
||||
dnl use default error
|
||||
RPROTOCOL $| $* $#error $@ ifdef(`TLS_PERM_ERR', `5.7.0', `4.7.0') $: "ifdef(`TLS_PERM_ERR', `503', `403') STARTTLS failed."
|
||||
R$* $| <$*> <VERIFY> $: <$2> <VERIFY> <> $1
|
||||
dnl separate optional requirements
|
||||
R$* $| <$*> <VERIFY + $+> $: <$2> <VERIFY> <$3> $1
|
||||
@@ -2962,9 +2889,9 @@ ifdef(`_ATMPF_', `dnl tempfail?
|
||||
R<$* _ATMPF_> $#error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."', `dnl')
|
||||
dnl use the generic routine (for now)
|
||||
R<0> $@ OK no limit
|
||||
R<$+> $: <$1> $| $(arith l $@ $1 $@ $&{client_rate} $)
|
||||
R<$+> $: <$1> $| $(arith l $@ $&{client_rate} $@ $1 $)
|
||||
dnl log this? Connection rate $&{client_rate} exceeds limit $1.
|
||||
R<$+> $| TRUE $#error $@ 4.3.2 $: _RATE_CONTROL_REPLY Connection rate limit exceeded.
|
||||
R<$+> $| FALSE $#error $@ 4.3.2 $: _RATE_CONTROL_REPLY Connection rate limit exceeded.
|
||||
')')
|
||||
|
||||
ifdef(`_CONN_CONTROL_',`dnl
|
||||
@@ -2984,9 +2911,9 @@ ifdef(`_ATMPF_', `dnl tempfail?
|
||||
R<$* _ATMPF_> $#error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."', `dnl')
|
||||
dnl use the generic routine (for now)
|
||||
R<0> $@ OK no limit
|
||||
R<$+> $: <$1> $| $(arith l $@ $1 $@ $&{client_connections} $)
|
||||
R<$+> $: <$1> $| $(arith l $@ $&{client_connections} $@ $1 $)
|
||||
dnl log this: Open connections $&{client_connections} exceeds limit $1.
|
||||
R<$+> $| TRUE $#error $@ 4.3.2 $: _CONN_CONTROL_REPLY Too many open connections.
|
||||
R<$+> $| FALSE $#error $@ 4.3.2 $: _CONN_CONTROL_REPLY Too many open connections.
|
||||
')')
|
||||
|
||||
undivert(9)dnl LOCAL_RULESETS
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers.
|
||||
# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
|
||||
# Copyright (c) 1988, 1993
|
||||
@@ -11,8 +11,8 @@ divert(-1)
|
||||
# the sendmail distribution.
|
||||
#
|
||||
#
|
||||
VERSIONID(`$Id: version.m4,v 8.186 2007/10/31 16:04:13 ca Exp $')
|
||||
VERSIONID(`$Id: version.m4,v 8.117 2004/07/30 18:03:07 ca Exp $')
|
||||
#
|
||||
divert(0)
|
||||
# Configuration version number
|
||||
DZ8.14.2`'ifdef(`confCF_VERSION', `/confCF_VERSION')
|
||||
DZ8.13.1`'ifdef(`confCF_VERSION', `/confCF_VERSION')
|
||||
@@ -1,6 +1,6 @@
|
||||
PUSHDIVERT(-1)
|
||||
#
|
||||
# Copyright (c) 1998-2000, 2004 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
|
||||
@@ -32,7 +32,7 @@ POPDIVERT
|
||||
### Local and Program Mailer specification ###
|
||||
##################################################
|
||||
|
||||
VERSIONID(`$Id: local.m4,v 8.59 2004/11/23 00:37:25 ca Exp $')
|
||||
VERSIONID(`$Id: local.m4,v 8.58 2000/10/26 01:58:29 ca Exp $')
|
||||
|
||||
#
|
||||
# Envelope sender rewriting
|
||||
@@ -88,6 +88,6 @@ R$+ $@ $1 < @ *LOCAL* > add local qualification',
|
||||
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=_MODMF_(CONCAT(_DEF_LOCAL_SHELL_FLAGS, LOCAL_SHELL_FLAGS), `SHELL'), S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, D=LOCAL_SHELL_DIR,
|
||||
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,_PROG_QGRP
|
||||
A=LOCAL_SHELL_ARGS
|
||||
@@ -1,6 +1,6 @@
|
||||
PUSHDIVERT(-1)
|
||||
#
|
||||
# Copyright (c) 1998-2001, 2006 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
|
||||
@@ -13,8 +13,6 @@ PUSHDIVERT(-1)
|
||||
#
|
||||
_DEFIFNOT(`_DEF_SMTP_MAILER_FLAGS', `mDFMuX')
|
||||
_DEFIFNOT(`SMTP_MAILER_FLAGS',`')
|
||||
_DEFIFNOT(`SMTP_MAILER_LL',`990')
|
||||
_DEFIFNOT(`RELAY_MAILER_LL',`2040')
|
||||
_DEFIFNOT(`RELAY_MAILER_FLAGS', `SMTP_MAILER_FLAGS')
|
||||
ifdef(`SMTP_MAILER_ARGS',, `define(`SMTP_MAILER_ARGS', `TCP $h')')
|
||||
ifdef(`ESMTP_MAILER_ARGS',, `define(`ESMTP_MAILER_ARGS', `TCP $h')')
|
||||
@@ -31,7 +29,7 @@ POPDIVERT
|
||||
### SMTP Mailer specification ###
|
||||
#####################################
|
||||
|
||||
VERSIONID(`$Id: smtp.m4,v 8.65 2006/07/12 21:08:10 ca Exp $')
|
||||
VERSIONID(`$Id: smtp.m4,v 8.64 2001/04/03 01:52:54 gshapiro Exp $')
|
||||
|
||||
#
|
||||
# common sender and masquerading recipient rewriting
|
||||
@@ -107,18 +105,18 @@ 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=SMTP_MAILER_LL,
|
||||
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,_SMTP_QGRP
|
||||
A=SMTP_MAILER_ARGS
|
||||
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=SMTP_MAILER_LL,
|
||||
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), `SMTP8'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=SMTP_MAILER_LL,
|
||||
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), `DSMTP'), S=EnvFromSMTP/HdrFromSMTP, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), E=\r\n, L=SMTP_MAILER_LL,
|
||||
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=RELAY_MAILER_LL,
|
||||
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,_RELAY_QGRP
|
||||
A=RELAY_MAILER_ARGS
|
||||
@@ -10,10 +10,9 @@ divert(-1)
|
||||
#
|
||||
|
||||
divert(0)
|
||||
VERSIONID(`$Id: darwin.m4,v 8.4 2005/06/30 01:16:04 ca Exp $')
|
||||
VERSIONID(`$Id: darwin.m4,v 8.3 2002/03/05 01:55:40 ca 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(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -z -a$g $h!rmail ($u)')')dnl
|
||||
define(`confDONT_BLAME_SENDMAIL', `AssumeSafeChown,GroupWritableDirPathSafe')dnl
|
||||
@@ -1,20 +0,0 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 2001, 2004 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: dragonfly.m4,v 1.1 2004/08/06 03:54:05 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
|
||||
@@ -1,20 +0,0 @@
|
||||
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: freebsd6.m4,v 1.1 2005/06/14 02:16:35 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
|
||||
@@ -1,16 +1,15 @@
|
||||
# Copyright (c) 2000-2002, 2005 Sendmail, Inc. and its suppliers.
|
||||
# Copyright (c) 2000-2002 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.22 2005/09/16 20:18:14 ca Exp $
|
||||
# $Id: sendmail.schema,v 8.21 2002/11/20 23:13:50 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-YYYY@support.sendmail.org is encouraged (replace YYYY with
|
||||
# the current year, e.g., 2005).
|
||||
# via sendmail@sendmail.org is encouraged.
|
||||
|
||||
# OID arcs for Sendmail
|
||||
# enterprise: 1.3.6.1.4.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# Copyright (c) 1999-2004, 2007 Gregory Neil Shapiro. All Rights Reserved.
|
||||
# Copyright (c) 1999-2003 Gregory Neil Shapiro. All Rights Reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@@ -27,7 +27,7 @@
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
|
||||
# $Id: buildvirtuser,v 1.8 2007/10/08 18:44:15 gshapiro Exp $
|
||||
# $Id: buildvirtuser,v 1.6 2003/03/15 23:30:09 gshapiro Exp $
|
||||
|
||||
=head1 NAME
|
||||
|
||||
@@ -70,21 +70,30 @@ to take affect.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
Here is an example file from the /etc/mail/virtusers/ directory:
|
||||
Here are some example files from the /etc/mail/virtusers/ directory:
|
||||
|
||||
=head2 /etc/mail/virtusers/example.org:
|
||||
=head2 /etc/mail/virtusers/bsdunix.org:
|
||||
|
||||
# Services
|
||||
MAILER-DAEMON gshapiro+bounce.$DOMAIN@example.net
|
||||
postmaster gshapiro+$LHS.$DOMAIN@example.net
|
||||
webmaster gshapiro+$LHS.$DOMAIN@example.net
|
||||
MAILER-DAEMON gshapiro+bounce.$DOMAIN@gshapiro.net
|
||||
postmaster gshapiro+$LHS.$DOMAIN@gshapiro.net
|
||||
webmaster gshapiro+$LHS.$DOMAIN@gshapiro.net
|
||||
|
||||
# Defaults
|
||||
error:nouser No such user
|
||||
|
||||
# Users
|
||||
gshapiro gshapiro+$DOMAIN@example.net
|
||||
zoe [email protected]
|
||||
gshapiro gshapiro+$DOMAIN@gshapiro.net
|
||||
bob [email protected]
|
||||
|
||||
=head2 /etc/mail/virtusers/smtp.org:
|
||||
|
||||
# Defaults
|
||||
[email protected]
|
||||
|
||||
# Users
|
||||
john [email protected]
|
||||
nancy [email protected]
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
@@ -93,7 +102,6 @@ Gregory Neil Shapiro E<lt>F<[email protected]>E<gt>
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use File::stat;
|
||||
use Getopt::Std;
|
||||
|
||||
my $makemap = "/usr/sbin/makemap";
|
||||
@@ -109,18 +117,6 @@ my $newest = 0;
|
||||
my ($lhs, $domain, $key, $value);
|
||||
my $opts = {};
|
||||
|
||||
sub preserve_perms ($$)
|
||||
{
|
||||
my $old = shift;
|
||||
my $new = shift;
|
||||
my $st;
|
||||
|
||||
$st = stat($old);
|
||||
return if (!defined($st));
|
||||
chmod($st->mode, $new) || warn "Could not chmod($st->mode, $new): $!\n";
|
||||
chown($st->uid, $st->gid, $new) || warn "Could not chmod($st->uid, $st->gid, $new): $!\n";
|
||||
}
|
||||
|
||||
getopts('ft', $opts) || die "Usage: $0 [-f] [-t]\n";
|
||||
|
||||
if ($opts->{t})
|
||||
@@ -135,12 +131,9 @@ closedir(VIRTS) || die "Could not close directory $virts: $!\n";
|
||||
|
||||
foreach $domain (@virts)
|
||||
{
|
||||
next if ($domain =~ m/^\./);
|
||||
open(DOMAIN, "$virts/$domain") || die "Could not open file $virts/$domain: $!\n";
|
||||
my $line = 0;
|
||||
my $mtime = 0;
|
||||
my $st = stat("$virts/$domain");
|
||||
$mtime = $st->mtime if (defined($st));
|
||||
my $mtime = (stat(DOMAIN))[9] || 0;
|
||||
if ($mtime > $newest)
|
||||
{
|
||||
$newest = $mtime;
|
||||
@@ -167,7 +160,7 @@ LINE: while (<DOMAIN>)
|
||||
}
|
||||
else
|
||||
{
|
||||
warn "Bogus line $line in $virts/$domain\n";
|
||||
die "Bogus line $line in $virts/$domain\n";
|
||||
}
|
||||
|
||||
# Variable subsitution
|
||||
@@ -179,9 +172,7 @@ LINE: while (<DOMAIN>)
|
||||
close(DOMAIN) || die "Could not close $virts/$domain: $!\n";
|
||||
}
|
||||
|
||||
my $virtmtime = 0;
|
||||
my $st = stat($virt);
|
||||
$virtmtime = $st->mtime if (defined($st));
|
||||
my $virtmtime = (stat($virt))[9] || 0;
|
||||
if ($opts->{f} || $virtmtime < $newest)
|
||||
{
|
||||
print STDOUT "Rebuilding $virt\n";
|
||||
@@ -200,17 +191,14 @@ if ($opts->{f} || $virtmtime < $newest)
|
||||
print MAKEMAP "$key\t\t$virt{$key}\n";
|
||||
}
|
||||
close(MAKEMAP) || die "Could not close makemap ($?): $!\n";
|
||||
preserve_perms($virt, $newvirt);
|
||||
rename($newvirt, $virt) || die "Could not rename $newvirt to $virt: $!\n";
|
||||
|
||||
open(VIRTHOST, ">$newvirthosts") || die "Could not open file $newvirthosts: $!\n";
|
||||
foreach $domain (sort @virts)
|
||||
{
|
||||
next if ($domain =~ m/^\./);
|
||||
print VIRTHOST "$domain\n";
|
||||
}
|
||||
close(VIRTHOST) || die "Could not close $newvirthosts: $!\n";
|
||||
preserve_perms($virthosts, $newvirthosts);
|
||||
rename($newvirthosts, $virthosts) || die "Could not rename $newvirthosts to $virthosts: $!\n";
|
||||
}
|
||||
exit 0;
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
# $Id: cidrexpand,v 8.8 2006/08/07 17:18:37 ca Exp $
|
||||
# $Id: cidrexpand,v 8.4 2002/11/22 21:13:14 ca Exp $
|
||||
#
|
||||
# v 0.4
|
||||
#
|
||||
@@ -28,21 +28,6 @@
|
||||
# Added clarification in the notes for what to do if you have
|
||||
# exceptions to a larger CIDR block.
|
||||
#
|
||||
# 26 Jul 2006 Richard Rognlie ([email protected]>
|
||||
# Added code to strip "comments" (anything after a non-escaped #)
|
||||
# # characters after a \ or within quotes (single and double) are
|
||||
# left intact.
|
||||
#
|
||||
# e.g.
|
||||
# From:1.2.3.4 550 Die spammer # spammed us 2006.07.26
|
||||
# becomes
|
||||
# From:1.2.3.4 550 Die spammer
|
||||
#
|
||||
# 3 August 2006
|
||||
#
|
||||
# Corrected a bug to have it handle the special case of "0.0.0.0/0"
|
||||
# since Net::CIDR doesn't handle it properly.
|
||||
#
|
||||
# usage:
|
||||
# cidrexpand < /etc/mail/access | makemap -r hash /etc/mail/access
|
||||
#
|
||||
@@ -53,59 +38,32 @@
|
||||
|
||||
use strict;
|
||||
use Net::CIDR;
|
||||
use Getopt::Std;
|
||||
|
||||
our ($opt_c,$opt_t);
|
||||
getopts('ct:');
|
||||
|
||||
my $spaceregex = '\s+';
|
||||
if ($opt_t)
|
||||
|
||||
while (my $arg = shift @ARGV)
|
||||
{
|
||||
$spaceregex = $opt_t;
|
||||
if ($arg eq '-t')
|
||||
{
|
||||
$spaceregex = shift;
|
||||
}
|
||||
}
|
||||
|
||||
use strict;
|
||||
|
||||
my $SENDMAIL = 1;
|
||||
|
||||
while (<>)
|
||||
{
|
||||
chomp;
|
||||
my ($prefix,$left,$right,$space);
|
||||
|
||||
if ( (/\#/) && $opt_c )
|
||||
{
|
||||
# print "checking...\n";
|
||||
my $i;
|
||||
my $qtype='';
|
||||
for ($i=0 ; $i<length($_) ; $i++)
|
||||
{
|
||||
my $ch = substr($_,$i,1);
|
||||
if ($ch eq '\\')
|
||||
{
|
||||
$i++;
|
||||
next;
|
||||
}
|
||||
elsif ($qtype eq '' && $ch eq '#')
|
||||
{
|
||||
substr($_,$i) = '';
|
||||
last;
|
||||
}
|
||||
elsif ($qtype ne '' && $ch eq $qtype)
|
||||
{
|
||||
$qtype = '';
|
||||
}
|
||||
elsif ($qtype eq '' && $ch =~ /[\'\"]/)
|
||||
{
|
||||
$qtype = $ch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! /^(|\S\S*:)(\d+\.){3}\d+\/\d\d?$spaceregex.*/ )
|
||||
{
|
||||
print "$_\n";
|
||||
print;
|
||||
}
|
||||
else
|
||||
{
|
||||
($prefix,$left,$space,$right) =
|
||||
/^(|\S\S*:)((?:\d+\.){3}\d+\/\d\d?)($spaceregex)(.*)$/;
|
||||
($prefix,$left,$space,$right) = /^(|\S\S*:)((?:\d+\.){3}\d+\/\d\d?)($spaceregex)(.*)$/;
|
||||
|
||||
my @new_lefts = expand_network($left);
|
||||
foreach my $nl (@new_lefts)
|
||||
@@ -122,8 +80,6 @@ sub expand_network
|
||||
my ($network,$mask) = split /\//, $left_input;
|
||||
if (defined $mask)
|
||||
{
|
||||
return (0..255) if $mask == 0;
|
||||
|
||||
my @parts = split /\./, $network;
|
||||
while ($#parts < 3)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
divert(-1)
|
||||
#
|
||||
# Copyright (c) 2001-2002, 2005 Sendmail, Inc. and its suppliers.
|
||||
# Copyright (c) 2001-2002 Sendmail, Inc. and its suppliers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# By using this file, you agree to the terms and conditions set
|
||||
@@ -59,7 +59,7 @@ 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.6 2005/07/25 23:32:05 ca Exp $')
|
||||
VERSIONID(`$Id: dnsblaccess.m4,v 1.5 2002/05/19 21:30:06 gshapiro Exp $')
|
||||
ifdef(`_ACCESS_TABLE_', `dnl',
|
||||
`errprint(`*** ERROR: dnsblaccess requires FEATURE(`access_db')
|
||||
')')
|
||||
@@ -85,7 +85,7 @@ R<?>$* $- .<>$* <$(access _EDNSBL_KEY_`:'$1$2 $@$3 $@`'_EDNSBL_SRV_ $: ? $)> $1
|
||||
R<?>$* <>$* $:<$(access _EDNSBL_KEY_`:' $@$2 $@`'_EDNSBL_SRV_ $: ? $)> <>$2
|
||||
ifelse(len(X`'_ARG3_),`1',
|
||||
`R<$*<TMPF>>$* $: TMPOK',
|
||||
`R<$*<TMPF>>$* $#error $@ 4.4.3 $: _EDNSBL_MSG_TMP_')
|
||||
`R<$*<TMPF>>$* $#error $@ 4.7.1 $: _EDNSBL_MSG_TMP_')
|
||||
R<$={Accept}>$* $: OKSOFAR
|
||||
R<ERROR:$-.$-.$-:$+> $* $#error $@ $1.$2.$3 $: $4
|
||||
R<ERROR:$+> $* $#error $: $1
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
|
||||
## All rights reserved.
|
||||
##
|
||||
## $Id: qtool.pl,v 8.29 2007/02/16 01:12:08 ca Exp $
|
||||
## $Id: qtool.pl,v 8.28 2002/06/27 23:06:16 gshapiro Exp $
|
||||
##
|
||||
use strict;
|
||||
use File::Basename;
|
||||
@@ -69,12 +69,6 @@ my $new_condition;
|
||||
my $qprefix;
|
||||
my $queuegroups = 0;
|
||||
my $conditions = new Compound();
|
||||
my $fcntl_struct = 's H60';
|
||||
my $fcntl_structlockp = pack($fcntl_struct, Fcntl::F_WRLCK,
|
||||
"000000000000000000000000000000000000000000000000000000000000");
|
||||
my $fcntl_structunlockp = pack($fcntl_struct, Fcntl::F_UNLCK,
|
||||
"000000000000000000000000000000000000000000000000000000000000");
|
||||
my $lock_both = -1;
|
||||
|
||||
Getopt::Std::getopts('bC:de:Qs:', \%opts);
|
||||
|
||||
@@ -346,9 +340,7 @@ sub add_source
|
||||
## Opens a file for read/write and uses flock to obtain a lock on the
|
||||
## file. The flock is Perl's flock which defaults to flock on systems
|
||||
## that support it. On systems without flock it falls back to fcntl
|
||||
## locking. This script will also call fcntl explicitly if flock
|
||||
## uses BSD semantics (i.e. if both flock() and fcntl() can successfully
|
||||
## lock the file at the same time)
|
||||
## locking.
|
||||
##
|
||||
## Parameters:
|
||||
## file_name -- The name of the file to open and lock.
|
||||
@@ -366,24 +358,6 @@ sub lock_file
|
||||
my $file_name = shift;
|
||||
my $result;
|
||||
|
||||
if ($lock_both == -1)
|
||||
{
|
||||
if (open(DEVNULL, '>/dev/null'))
|
||||
{
|
||||
my $flock_status = flock(DEVNULL, Fcntl::LOCK_EX | Fcntl::LOCK_NB);
|
||||
my $fcntl_status = fcntl (DEVNULL, Fcntl::F_SETLK, $fcntl_structlockp);
|
||||
close(DEVNULL);
|
||||
|
||||
$lock_both = ($flock_status && $fcntl_status);
|
||||
}
|
||||
else
|
||||
{
|
||||
# Couldn't open /dev/null. Windows system?
|
||||
$lock_both = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$result = sysopen(FILE_TO_LOCK, $file_name, Fcntl::O_RDWR);
|
||||
if (!$result)
|
||||
{
|
||||
@@ -396,15 +370,6 @@ sub lock_file
|
||||
return (undef, "Could not obtain lock on '$file_name': $!");
|
||||
}
|
||||
|
||||
if ($lock_both)
|
||||
{
|
||||
my $result2 = fcntl (FILE_TO_LOCK, Fcntl::F_SETLK, $fcntl_structlockp);
|
||||
if (!$result2)
|
||||
{
|
||||
return (undef, "Could not obtain fcntl lock on '$file_name': $!");
|
||||
}
|
||||
}
|
||||
|
||||
return (\*FILE_TO_LOCK, undef);
|
||||
}
|
||||
|
||||
@@ -431,14 +396,6 @@ sub unlock_file
|
||||
{
|
||||
return "Unlock failed on '$result': $!";
|
||||
}
|
||||
if ($lock_both)
|
||||
{
|
||||
my $result2 = fcntl ($file, Fcntl::F_SETLK, $fcntl_structunlockp);
|
||||
if (!$result2)
|
||||
{
|
||||
return (undef, "Fcntl unlock failed on '$result': $!");
|
||||
}
|
||||
}
|
||||
|
||||
return undef;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile,v 8.16 2006/01/05 22:03:31 ca Exp $
|
||||
# $Id: Makefile,v 8.15 2004/07/20 20:25:10 ca Exp $
|
||||
|
||||
DIR= smm/08.sendmailop
|
||||
SRCS= op.me
|
||||
@@ -22,7 +22,6 @@ all: ${OBJS}
|
||||
op.ps: ${SRCS}
|
||||
rm -f $@
|
||||
${PIC} ${SRCS} | ${EQNPS} | ${ROFFPS} > $@
|
||||
test -s $@ || ${ROFFPS} -p -e ${SRCS} > $@
|
||||
|
||||
op.txt: ${SRCS}
|
||||
rm -f $@
|
||||
|
||||
+47
-172
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (c) 1998-2005 Sendmail, Inc. and its suppliers.
|
||||
.\" Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
|
||||
.\" All rights reserved.
|
||||
.\" Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
|
||||
.\" Copyright (c) 1983, 1993
|
||||
@@ -9,7 +9,7 @@
|
||||
.\" the sendmail distribution.
|
||||
.\"
|
||||
.\"
|
||||
.\" $Id: op.me,v 8.741 2007/06/22 23:08:59 ca Exp $
|
||||
.\" $Id: op.me,v 8.699 2004/06/03 18:29:01 ca Exp $
|
||||
.\"
|
||||
.\" eqn op.me | pic | troff -me
|
||||
.\"
|
||||
@@ -90,10 +90,10 @@ Sendmail, Inc.
|
||||
.de Ve
|
||||
Version \\$2
|
||||
..
|
||||
.Ve $Revision: 8.741 $
|
||||
.Ve $Revision: 8.699 $
|
||||
.rm Ve
|
||||
.sp
|
||||
For Sendmail Version 8.14
|
||||
For Sendmail Version 8.13
|
||||
.)l
|
||||
.(f
|
||||
Sendmail is a trademark of Sendmail, Inc.
|
||||
@@ -982,7 +982,7 @@ This should be a link to /usr/\*(SD/sendmail.
|
||||
.sh 3 "sendmail.pid"
|
||||
.pp
|
||||
.i sendmail
|
||||
stores its current pid in the file specified by the
|
||||
stores its current pid in the file specifed by the
|
||||
.b PidFile
|
||||
option (default is _PATH_SENDMAILPID).
|
||||
.i sendmail
|
||||
@@ -1475,18 +1475,6 @@ option, so that it may be shared between several invocations of
|
||||
.i sendmail .
|
||||
This allows mail to be queued immediately or skipped during a queue run if
|
||||
there has been a recent failure in connecting to a remote machine.
|
||||
Note: information about a remote system is stored in a file
|
||||
whose pathname consists of the components of the hostname in reverse order.
|
||||
For example, the information for
|
||||
.b host.example.com
|
||||
is stored in
|
||||
.b com./example./host .
|
||||
For top-level domains like
|
||||
.b com
|
||||
this can create a large number of subdirectories
|
||||
which on some filesystems can exhaust some limits.
|
||||
Moreover, the performance of lookups in directory with thousands of entries
|
||||
can be fairly slow depending on the filesystem implementation.
|
||||
.pp
|
||||
Additionally enabling
|
||||
.b SingleThreadDelivery
|
||||
@@ -1633,7 +1621,7 @@ the
|
||||
.i address
|
||||
part of the triple is looked up as the key
|
||||
(i.e., the left hand side)
|
||||
in the alias database.
|
||||
into the alias database.
|
||||
If there is a match, the address is deleted from the send queue
|
||||
and all addresses on the right hand side of the alias
|
||||
are added in place of the alias that was found.
|
||||
@@ -3928,11 +3916,6 @@ The complete syntax for ruleset 0 is:
|
||||
This specifies the
|
||||
{mailer, host, user}
|
||||
3-tuple necessary to direct the mailer.
|
||||
Note: the third element (
|
||||
.i user
|
||||
) is often also called
|
||||
.i address
|
||||
part.
|
||||
If the mailer is local
|
||||
the host part may be omitted\**.
|
||||
.(f
|
||||
@@ -4259,13 +4242,6 @@ It can accept or reject mail transfer between these two addresses
|
||||
much like the
|
||||
.i checkcompat()
|
||||
function.
|
||||
Note:
|
||||
while other
|
||||
.i check_*
|
||||
rulesets are invoked during the SMTP mail receiption stage
|
||||
(i.e., in the SMTP server),
|
||||
.i check_compat
|
||||
is invoked during the mail delivery stage.
|
||||
.sh 4 "check_eoh"
|
||||
.pp
|
||||
The
|
||||
@@ -4317,13 +4293,6 @@ Keep in mind the Message-Id: header is not a required header and
|
||||
is not a guaranteed spam indicator.
|
||||
This ruleset is an example and
|
||||
should probably not be used in production.
|
||||
.sh 4 "check_eom"
|
||||
.pp
|
||||
The
|
||||
.i check_eom
|
||||
ruleset is called after the end of a message,
|
||||
its parameter is the message size.
|
||||
It can accept or reject the message.
|
||||
.sh 4 "check_etrn"
|
||||
.pp
|
||||
The
|
||||
@@ -4812,8 +4781,7 @@ command line flag or by the SMTP server code.
|
||||
Sender's host name.
|
||||
Set from the
|
||||
.b \-p
|
||||
command line flag or by the SMTP server code
|
||||
(in which case it is set to the EHLO/HELO parameter).
|
||||
command line flag or by the SMTP server code.
|
||||
.ip $t
|
||||
A numeric representation of the current time in the format YYYYMMDDHHmm
|
||||
(4 digit year 1900-9999, 2 digit month 01-12, 2 digit day 01-31,
|
||||
@@ -4841,6 +4809,9 @@ This macro contains up to three characters, the first
|
||||
is either `e' or `h' for envelope/header address,
|
||||
the second is a space,
|
||||
and the third is either `s' or `r' for sender/recipient address.
|
||||
Notice: for header addresses no distinction is currently made
|
||||
between sender and recipient addresses, i.e., the macro contains
|
||||
only `h'.
|
||||
.ip ${alg_bits}
|
||||
The maximum keylength (in bits) of the symmetric encryption algorithm
|
||||
used for a TLS connection.
|
||||
@@ -4889,18 +4860,6 @@ IPv6 addresses are tagged with "IPv6:" before the address.
|
||||
Defined in the SMTP server only.
|
||||
.ip ${client_connections}
|
||||
The number of open connections in the SMTP server for the client IP address.
|
||||
.ip ${client_flags}
|
||||
The flags specified by the
|
||||
Modifier= part of
|
||||
.b ClientPortOptions
|
||||
where flags are separated from each other by spaces
|
||||
and upper case flags are doubled.
|
||||
That is,
|
||||
Modifier=hA
|
||||
will be represented as
|
||||
"h AA" in
|
||||
.b ${client_flags} ,
|
||||
which is required for testing the flags in rulesets.
|
||||
.ip ${client_name}
|
||||
The host name of the SMTP client.
|
||||
This may be the client's bracketed IP address
|
||||
@@ -5555,7 +5514,7 @@ set to be the set of all names
|
||||
this host is known by.
|
||||
This can be used to match local hostnames.
|
||||
.ip $={persistentMacros}
|
||||
set to the macros that should be saved across queue runs.
|
||||
set to the macros would should be saved across queue runs.
|
||||
Care should be taken when adding macro names to this class.
|
||||
.pp
|
||||
.i Sendmail
|
||||
@@ -5637,8 +5596,7 @@ Run Extended SMTP (ESMTP) protocol (defined in RFCs 1869, 1652, and 1870).
|
||||
This flag defaults on if the SMTP greeting message includes the word
|
||||
.q ESMTP .
|
||||
.ip A
|
||||
Look up the user (address) part of the resolved mailer triple,
|
||||
in the alias database.
|
||||
Look up the user part of the address in the alias database.
|
||||
Normally this is only set for local mailers.
|
||||
.ip b
|
||||
Force a blank line on the end of a message.
|
||||
@@ -6689,7 +6647,6 @@ A running
|
||||
daemon can be controlled through this named socket.
|
||||
Available commands are:
|
||||
.i help,
|
||||
.i mstat,
|
||||
.i restart,
|
||||
.i shutdown,
|
||||
and
|
||||
@@ -6735,11 +6692,6 @@ Listen Size of listen queue (defaults to 10)
|
||||
Modifier Options (flags) for the daemon
|
||||
SndBufSize Size of TCP send buffer
|
||||
RcvBufSize Size of TCP receive buffer
|
||||
children maximum number of children per daemon, see \fBMaxDaemonChildren\fP.
|
||||
DeliveryMode Delivery mode per daemon, see \fBDeliveryMode\fP.
|
||||
refuseLA RefuseLA per daemon
|
||||
delayLA DelayLA per daemon
|
||||
queueLA QueueLA per daemon
|
||||
.)b
|
||||
The
|
||||
.i Name
|
||||
@@ -6939,10 +6891,6 @@ The
|
||||
.b \-v
|
||||
command line flag sets this to
|
||||
.b i .
|
||||
Note: for internal reasons,
|
||||
``i'' does not work
|
||||
if a milter is enabled which can reject or delete recipients.
|
||||
In that case the mode will be changed to ``b''.
|
||||
.ip DialDelay=\fIsleeptime\fP
|
||||
[no short name]
|
||||
Dial-on-demand network connections can see timeouts
|
||||
@@ -7209,9 +7157,11 @@ will search first in /var/forward/\c
|
||||
and then in
|
||||
.i ~username /.forward
|
||||
(but only if the first file does not exist).
|
||||
.ip HeloName=\fIname\fP
|
||||
[no short name]
|
||||
Set the name to be used for HELO/EHLO (instead of $j).
|
||||
.ip HelpFile=\fIfile\fP
|
||||
[H]
|
||||
Specify the help file
|
||||
for SMTP.
|
||||
If no file name is specified, "helpfile" is used.
|
||||
.ip HoldExpensive
|
||||
[c]
|
||||
If an outgoing mailer is marked as being expensive,
|
||||
@@ -7325,18 +7275,8 @@ will refuse connections when it has more than
|
||||
.i N
|
||||
children processing incoming mail or automatic queue runs.
|
||||
This does not limit the number of outgoing connections.
|
||||
If the default
|
||||
.b DeliveryMode
|
||||
(background) is used, then
|
||||
.i sendmail
|
||||
may create an almost unlimited number of children
|
||||
(depending on the number of transactions and the
|
||||
relative execution times of mail receiption and mail delivery).
|
||||
If the limit should be enforced, then a
|
||||
.b DeliveryMode
|
||||
other than background must be used.
|
||||
If not set, there is no limit to the number of children --
|
||||
that is, the system load average controls this.
|
||||
that is, the system load averaging controls this.
|
||||
.ip MaxHeadersLength=\fIN\fP
|
||||
[no short name]
|
||||
The maximum length of the sum of all headers.
|
||||
@@ -7377,13 +7317,6 @@ will be used.
|
||||
By default,
|
||||
these values are 2048 and 1024, respectively.
|
||||
To allow any length, a value of 0 can be specified.
|
||||
.ip MaxNOOPCommands=\fIN\fP
|
||||
Override the default of
|
||||
.b MAXNOOPCOMMANDS
|
||||
for the number of
|
||||
.i useless
|
||||
commands, see Section
|
||||
"Measures against Denial of Service Attacks".
|
||||
.ip MaxQueueChildren=\fIN\fP
|
||||
[no short name]
|
||||
When set, this limits the number of concurrent queue runner processes to
|
||||
@@ -7423,16 +7356,6 @@ highest priority jobs)
|
||||
this should be set as high as possible to avoid
|
||||
.q losing
|
||||
jobs that happen to fall late in the queue directory.
|
||||
Note: this option also restricts the number of entries printed by
|
||||
.i mailq .
|
||||
That is, if
|
||||
.i MaxQueueRunSize
|
||||
is set to a value
|
||||
.b N
|
||||
larger than zero,
|
||||
then only
|
||||
.b N
|
||||
entries are printed per queue group.
|
||||
.ip MaxRecipientsPerMessage=\fIN\fP
|
||||
[no short name]
|
||||
The maximum number of recipients that will be accepted per message
|
||||
@@ -7476,11 +7399,9 @@ after a certain event occurred.
|
||||
.(b
|
||||
.ta \w'envfrom'u+3n
|
||||
connect After session connection start
|
||||
helo After EHLO/HELO command
|
||||
envfrom After MAIL From command
|
||||
envrcpt After RCPT To command
|
||||
data After DATA command.
|
||||
eoh After DATA command and header
|
||||
helo After HELO command
|
||||
envfrom After MAIL FROM command
|
||||
envrcpt After RCPT TO command
|
||||
eom After DATA command and terminating ``.''
|
||||
.)b
|
||||
By default the lists of macros are empty.
|
||||
@@ -7610,7 +7531,7 @@ The
|
||||
.i opt ions
|
||||
can be selected from:
|
||||
.(b
|
||||
.ta \w'noactualrecipient'u+3n
|
||||
.ta \w'needvrfyhelo'u+3n
|
||||
public Allow open access
|
||||
needmailhelo Insist on HELO or EHLO command before MAIL
|
||||
needexpnhelo Insist on HELO or EHLO command before EXPN
|
||||
@@ -7627,8 +7548,6 @@ nobodyreturn Don't return the body of a message with DSNs
|
||||
goaway Disallow essentially all SMTP status queries
|
||||
authwarnings Put X-Authentication-Warning: headers in messages
|
||||
and log warnings
|
||||
noactualrecipient Don't put X-Actual-Recipient lines in DSNs
|
||||
which reveal the actual account that addresses map to.
|
||||
.)b
|
||||
.(f
|
||||
\**N.B.:
|
||||
@@ -7966,6 +7885,20 @@ UNIX-style
|
||||
lines at the front of headers.
|
||||
Normally they are assumed redundant
|
||||
and discarded.
|
||||
.ip SharedMemoryKey
|
||||
[no short name]
|
||||
Key to use for shared memory segment;
|
||||
if not set (or 0), shared memory will not be used.
|
||||
Requires support for shared memory to be compiled into
|
||||
.i sendmail .
|
||||
If this option is set,
|
||||
.i sendmail
|
||||
can share some data between different instances.
|
||||
For example, the number of entries in a queue directory
|
||||
or the available space in a file system.
|
||||
This allows for more efficient program execution, since only
|
||||
one process needs to update the data instead of each individual
|
||||
process gathering the data each time it is required.
|
||||
.ip SendMimeErrors
|
||||
[j]
|
||||
If set, send error messages in MIME format
|
||||
@@ -8024,34 +7957,6 @@ The default file is
|
||||
[7]
|
||||
Strip input to seven bits for compatibility with old systems.
|
||||
This shouldn't be necessary.
|
||||
.ip SharedMemoryKey
|
||||
[no short name]
|
||||
Key to use for shared memory segment;
|
||||
if not set (or 0), shared memory will not be used.
|
||||
If set to
|
||||
-1
|
||||
.i sendmail
|
||||
can select a key itself provided that also
|
||||
.b SharedMemoryKeyFile
|
||||
is set.
|
||||
Requires support for shared memory to be compiled into
|
||||
.i sendmail .
|
||||
If this option is set,
|
||||
.i sendmail
|
||||
can share some data between different instances.
|
||||
For example, the number of entries in a queue directory
|
||||
or the available space in a file system.
|
||||
This allows for more efficient program execution, since only
|
||||
one process needs to update the data instead of each individual
|
||||
process gathering the data each time it is required.
|
||||
.ip SharedMemoryKeyFile
|
||||
[no short name]
|
||||
If
|
||||
.b SharedMemoryKey
|
||||
is set to
|
||||
-1
|
||||
then the automatically selected shared memory key will be stored
|
||||
in the specified file.
|
||||
.ip SingleLineFromHeader
|
||||
[no short name]
|
||||
If set, From: lines that have embedded newlines are unwrapped
|
||||
@@ -8089,10 +7994,6 @@ option.
|
||||
The message printed when the SMTP server starts up.
|
||||
Defaults to
|
||||
.q "$j Sendmail $v ready at $b".
|
||||
.ip SoftBounce
|
||||
If set, issue temporary errors (4xy) instead of permanent errors (5xy).
|
||||
This can be useful during testing of a new configuration to avoid
|
||||
erroneous bouncing of mails.
|
||||
.ip StatusFile=\fIfile\fP
|
||||
[S]
|
||||
Log summary statistics in the named
|
||||
@@ -8887,21 +8788,16 @@ R$\- $: $(storage {MyMacro} $) $1
|
||||
.)b
|
||||
.ip arith
|
||||
Perform simple arithmetic operations.
|
||||
The operation is given as key, currently
|
||||
+, -, *, /, %,
|
||||
The operation is given as key, currently +, -, *, /, %,
|
||||
|, & (bitwise OR, AND),
|
||||
l (for less than), =,
|
||||
and r (for random) are supported.
|
||||
l (for less than), and = are supported.
|
||||
The two operands are given as arguments.
|
||||
The lookup returns the result of the computation,
|
||||
i.e.,
|
||||
i.e.
|
||||
.sm TRUE
|
||||
or
|
||||
.sm FALSE
|
||||
for comparisons, integer values otherwise.
|
||||
The r operator returns a pseudo-random number whose value
|
||||
lies between the first and second operand
|
||||
(which requires that the first operand is smaller than the second).
|
||||
All options which are possible for maps are ignored.
|
||||
A simple example is:
|
||||
.(b
|
||||
@@ -8936,8 +8832,7 @@ The server responds with a status indicator and the result (if any):
|
||||
<status> ' ' <result>
|
||||
.)b
|
||||
|
||||
The status indicator specifies the result of the lookup operation itself
|
||||
and is one of the following upper case words:
|
||||
The status indicator is one of the following upper case words:
|
||||
.(b
|
||||
.ta 9n
|
||||
OK the key was found, result contains the looked up value
|
||||
@@ -8949,19 +8844,13 @@ PERM a permanent failure occured
|
||||
|
||||
In case of errors (status TEMP, TIMEOUT or PERM) the result field may
|
||||
contain an explanatory message.
|
||||
However, the explanatory message is not used any further by
|
||||
.i sendmail .
|
||||
|
||||
Example replies:
|
||||
.(b
|
||||
31:OK [email protected],
|
||||
.)b
|
||||
|
||||
.(b
|
||||
56:OK error:550 5.7.1 User does not accept mail from sender,
|
||||
.)b
|
||||
|
||||
in case of successful lookups, or:
|
||||
in case of a successful lookup, or:
|
||||
.(b
|
||||
8:NOTFOUND,
|
||||
.)b
|
||||
@@ -8971,7 +8860,7 @@ in case the key was not found, or:
|
||||
55:TEMP this text explains that we had a temporary failure,
|
||||
.)b
|
||||
|
||||
in case of a temporary map lookup failure.
|
||||
in case of a failure.
|
||||
|
||||
The socket map uses the same syntax as milters
|
||||
(see Section "X \*- Mail Filter (Milter) Definitions")
|
||||
@@ -9065,10 +8954,6 @@ For LDAP maps this is an LDAP filter string
|
||||
in which %s is replaced with the literal contents of the lookup key
|
||||
and %0 is replaced with the LDAP escaped contents of the lookup key
|
||||
according to RFC 2254.
|
||||
If the flag
|
||||
.b \-K
|
||||
is used, then %1 through %9 are replaced with the LDAP escaped contents
|
||||
of the arguments specified in the map lookup.
|
||||
.ip "\-v\fIvalcol\fP"
|
||||
The value column name (for NIS+) or number
|
||||
(for text lookups).
|
||||
@@ -9093,8 +8978,6 @@ to combine multiple values
|
||||
into a single return string.
|
||||
If not set,
|
||||
the LDAP lookup will only return the first match found.
|
||||
For DNS maps this is the separator character at which
|
||||
the result of a query is cut off if is too long.
|
||||
.ip "\-t"
|
||||
Normally, when a map attempts to do a lookup
|
||||
and the server fails
|
||||
@@ -9160,10 +9043,6 @@ delay: specify the resolver's retransmission time interval (in seconds).
|
||||
.ip "\-r"
|
||||
retry: specify the number of times to retransmit a resolver query.
|
||||
.pp
|
||||
The dns map has another flag:
|
||||
.ip "\-B"
|
||||
basedomain: specify a domain that is always appended to queries.
|
||||
.pp
|
||||
The following additional flags are present in the ldap map only:
|
||||
.ip "\-R"
|
||||
Do not auto chase referrals. sendmail must be compiled with
|
||||
@@ -9200,7 +9079,7 @@ For example,
|
||||
.)b
|
||||
is equivalent to
|
||||
.(b
|
||||
-H ldap://server.example.com:389 -b dc=example,dc=com
|
||||
-H ldap://server.example.com:389/dc=example,dc=com
|
||||
.)b
|
||||
If the LDAP library supports it,
|
||||
the LDAP URI format however can also request LDAP over SSL by using
|
||||
@@ -9209,20 +9088,20 @@ instead of
|
||||
.b ldap:// .
|
||||
For example:
|
||||
.(b
|
||||
O LDAPDefaultSpec=-H ldaps://ldap.example.com -b dc=example,dc=com
|
||||
O LDAPDefaultSpec=-H ldaps://ldap.example.com/dc=example,dc=com
|
||||
.)b
|
||||
Similarly, if the LDAP library supports it,
|
||||
It can also be used to specify a UNIX domain socket using
|
||||
.b ldapi:// :
|
||||
.(b
|
||||
O LDAPDefaultSpec=-H ldapi://socketfile -b dc=example,dc=com
|
||||
O LDAPDefaultSpec=-H ldapi://socketfile/dc=example,dc=com
|
||||
.)b
|
||||
.ip "\-b\fIbase\fP"
|
||||
LDAP search base.
|
||||
.ip "\-l\fItimelimit\fP"
|
||||
Time limit for LDAP queries.
|
||||
.ip "\-Z\fIsizelimit\fP"
|
||||
Size (number of matches) limit for LDAP or DNS queries.
|
||||
Size (number of matches) limit for LDAP queries.
|
||||
.ip "\-d\fIdistinguished_name\fP"
|
||||
The distinguished name to use to login to the LDAP server.
|
||||
.ip "\-M\fImethod\fP"
|
||||
@@ -9250,10 +9129,6 @@ For example,
|
||||
will cause
|
||||
.i sendmail
|
||||
to use LDAPv3 when communicating with the LDAP server.
|
||||
.ip "\-K"
|
||||
Treat the LDAP search key as multi-argument and
|
||||
replace %1 through %9 in the key with
|
||||
the LDAP escaped contents of the lookup arguments specified in the map lookup.
|
||||
.pp
|
||||
The
|
||||
.i dbm
|
||||
@@ -11435,7 +11310,7 @@ replace it with a blank sheet for double-sided output.
|
||||
.\".sz 10
|
||||
.\"Eric Allman
|
||||
.\".sp
|
||||
.\"Version $Revision: 8.741 $
|
||||
.\"Version $Revision: 8.699 $
|
||||
.\".ce 0
|
||||
.bp 3
|
||||
.ce
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
dnl $Id: Makefile.m4,v 1.6 2006/06/28 21:08:01 ca Exp $
|
||||
dnl $Id: Makefile.m4,v 1.5 2002/06/21 22:01:30 ca Exp $
|
||||
include(confBUILDTOOLSDIR`/M4/switch.m4')
|
||||
|
||||
define(`confREQUIRE_LIBSM', `true')
|
||||
define(`confREQUIRE_SM_OS_H', `true')
|
||||
# sendmail dir
|
||||
SMSRCDIR= ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
|
||||
PREPENDDEF(`confENVDEF', `confMAPDEF')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2002, 2004 Sendmail, Inc. and its suppliers.
|
||||
* 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
|
||||
@@ -22,7 +22,7 @@ SM_UNUSED(static char copyright[]) =
|
||||
#endif /* ! lint */
|
||||
|
||||
#ifndef lint
|
||||
SM_UNUSED(static char id[]) = "@(#)$Id: editmap.c,v 1.25 2007/05/11 18:50:35 ca Exp $";
|
||||
SM_UNUSED(static char id[]) = "@(#)$Id: editmap.c,v 1.23 2002/03/28 17:49:33 gshapiro Exp $";
|
||||
#endif /* ! lint */
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ uid_t RealUid;
|
||||
gid_t RealGid;
|
||||
char *RealUserName;
|
||||
uid_t RunAsUid;
|
||||
gid_t RunAsGid;
|
||||
uid_t RunAsGid;
|
||||
char *RunAsUserName;
|
||||
int Verbose = 2;
|
||||
bool DontInitGroups = false;
|
||||
@@ -57,8 +57,6 @@ BITMAP256 DontBlameSendmail;
|
||||
#define ISSEP(c) (isascii(c) && isspace(c))
|
||||
|
||||
|
||||
static void usage __P((char *));
|
||||
|
||||
static void
|
||||
usage(progname)
|
||||
char *progname;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999-2004, 2006 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1999-2004 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* By using this file, you agree to the terms and conditions set
|
||||
@@ -7,7 +7,7 @@
|
||||
* the sendmail distribution.
|
||||
*
|
||||
*
|
||||
* $Id: mfapi.h,v 8.77 2006/11/02 02:44:07 ca Exp $
|
||||
* $Id: mfapi.h,v 8.59 2004/07/07 21:41:31 ca Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -18,13 +18,9 @@
|
||||
# define _LIBMILTER_MFAPI_H 1
|
||||
|
||||
#ifndef SMFI_VERSION
|
||||
# define SMFI_VERSION 0x01000000 /* libmilter version number */
|
||||
# define SMFI_VERSION 2 /* version number */
|
||||
#endif /* ! SMFI_VERSION */
|
||||
|
||||
#define SM_LM_VRS_MAJOR(v) (((v) & 0x7f000000) >> 24)
|
||||
#define SM_LM_VRS_MINOR(v) (((v) & 0x007fff00) >> 8)
|
||||
#define SM_LM_VRS_PLVL(v) ((v) & 0x0000007f)
|
||||
|
||||
# include <sys/types.h>
|
||||
# include <sys/socket.h>
|
||||
|
||||
@@ -44,14 +40,11 @@ extern "C" {
|
||||
|
||||
/*
|
||||
** libmilter functions return one of the following to indicate
|
||||
** success/failure(/continue):
|
||||
** success/failure:
|
||||
*/
|
||||
|
||||
#define MI_SUCCESS 0
|
||||
#define MI_FAILURE (-1)
|
||||
#if _FFR_WORKERS_POOL
|
||||
# define MI_CONTINUE 1
|
||||
#endif /* _FFR_WORKERS_POOL */
|
||||
|
||||
/* "forward" declarations */
|
||||
typedef struct smfi_str SMFICTX;
|
||||
@@ -135,24 +128,15 @@ struct smfiDesc
|
||||
/* connection cleanup */
|
||||
sfsistat (*xxfi_close) SM__P((SMFICTX *));
|
||||
|
||||
#if SMFI_VERSION > 2
|
||||
/* any unrecognized or unimplemented command filter */
|
||||
sfsistat (*xxfi_unknown) SM__P((SMFICTX *, const char *));
|
||||
sfsistat (*xxfi_unknown) SM__P((SMFICTX *, char *));
|
||||
#endif /* SMFI_VERSION > 2 */
|
||||
|
||||
/* SMTP DATA command filter */
|
||||
#if SMFI_VERSION > 3
|
||||
/* any unrecognized or unimplemented command filter */
|
||||
sfsistat (*xxfi_data) SM__P((SMFICTX *));
|
||||
|
||||
/* negotiation callback */
|
||||
sfsistat (*xxfi_negotiate) SM__P((SMFICTX *,
|
||||
unsigned long, unsigned long,
|
||||
unsigned long, unsigned long,
|
||||
unsigned long *, unsigned long *,
|
||||
unsigned long *, unsigned long *));
|
||||
|
||||
#if 0
|
||||
/* signal handler callback, not yet implemented. */
|
||||
int (*xxfi_signal) SM__P((int));
|
||||
#endif
|
||||
|
||||
#endif /* SMFI_VERSION > 3 */
|
||||
};
|
||||
|
||||
LIBMILTER_API int smfi_opensocket __P((bool));
|
||||
@@ -166,7 +150,6 @@ LIBMILTER_API int smfi_stop __P((void));
|
||||
#if _FFR_MAXDATASIZE
|
||||
LIBMILTER_API size_t smfi_setmaxdatasize __P((size_t));
|
||||
#endif /* _FFR_MAXDATASIZE */
|
||||
LIBMILTER_API int smfi_version __P((unsigned int *, unsigned int *, unsigned int *));
|
||||
|
||||
/*
|
||||
** What the filter might do -- values to be ORed together for
|
||||
@@ -182,33 +165,6 @@ LIBMILTER_API int smfi_version __P((unsigned int *, unsigned int *, unsigned int
|
||||
#define SMFIF_CHGHDRS 0x00000010L /* filter may change/delete headers */
|
||||
#define SMFIF_QUARANTINE 0x00000020L /* filter may quarantine envelope */
|
||||
|
||||
/* filter may change "from" (envelope sender) */
|
||||
#define SMFIF_CHGFROM 0x00000040L
|
||||
#define SMFIF_ADDRCPT_PAR 0x00000080L /* add recipients incl. args */
|
||||
|
||||
/* filter can send set of symbols (macros) that it wants */
|
||||
#define SMFIF_SETSYMLIST 0x00000100L
|
||||
|
||||
|
||||
/*
|
||||
** Macro "places";
|
||||
** Notes:
|
||||
** - must be coordinated with libmilter/engine.c and sendmail/milter.c
|
||||
** - the order MUST NOT be changed as it would break compatibility between
|
||||
** different versions. It's ok to append new entries however
|
||||
** (hence the list is not sorted by the SMT protocol steps).
|
||||
*/
|
||||
|
||||
#define SMFIM_FIRST 0 /* Do NOT use, internal marker only */
|
||||
#define SMFIM_CONNECT 0 /* connect */
|
||||
#define SMFIM_HELO 1 /* HELO/EHLO */
|
||||
#define SMFIM_ENVFROM 2 /* MAIL From */
|
||||
#define SMFIM_ENVRCPT 3 /* RCPT To */
|
||||
#define SMFIM_DATA 4 /* DATA */
|
||||
#define SMFIM_EOM 5 /* end of message (final dot) */
|
||||
#define SMFIM_EOH 6 /* end of header */
|
||||
#define SMFIM_LAST 6 /* Do NOT use, internal marker only */
|
||||
|
||||
/*
|
||||
** Continue processing message/connection.
|
||||
*/
|
||||
@@ -253,21 +209,6 @@ LIBMILTER_API int smfi_version __P((unsigned int *, unsigned int *, unsigned int
|
||||
|
||||
#define SMFIS_TEMPFAIL 4
|
||||
|
||||
/*
|
||||
** Do not send a reply to the MTA
|
||||
*/
|
||||
|
||||
#define SMFIS_NOREPLY 7
|
||||
|
||||
/*
|
||||
** Skip over rest of same callbacks, e.g., body.
|
||||
*/
|
||||
|
||||
#define SMFIS_SKIP 8
|
||||
|
||||
/* xxfi_negotiate: use all existing protocol options/actions */
|
||||
#define SMFIS_ALL_OPTS 10
|
||||
|
||||
#if 0
|
||||
/*
|
||||
** Filter Routine Details
|
||||
@@ -320,12 +261,12 @@ extern sfsistat xxfi_envrcpt __P((SMFICTX *, char **));
|
||||
|
||||
/* unknown command filter */
|
||||
|
||||
extern sfsistat *xxfi_unknown __P((SMFICTX *, const char *));
|
||||
extern sfsistat *xxfi_unknown __P((SMFICTX *, char *));
|
||||
|
||||
/*
|
||||
** xxfi_unknown(ctx, arg) Invoked when SMTP command is not recognized or not
|
||||
** implemented.
|
||||
** const char *arg; Null-terminated SMTP command
|
||||
** char *arg; Null-terminated SMTP command
|
||||
*/
|
||||
|
||||
/* header filter */
|
||||
@@ -473,17 +414,6 @@ LIBMILTER_API int smfi_insheader __P((SMFICTX *, int, char *, char *));
|
||||
** char *headerv; Header field value
|
||||
*/
|
||||
|
||||
LIBMILTER_API int smfi_chgfrom __P((SMFICTX *, char *, char *));
|
||||
|
||||
/*
|
||||
** Modify envelope sender address
|
||||
**
|
||||
** SMFICTX *ctx; Opaque context structure
|
||||
** char *mail; New envelope sender address
|
||||
** char *args; ESMTP arguments
|
||||
*/
|
||||
|
||||
|
||||
LIBMILTER_API int smfi_addrcpt __P((SMFICTX *, char *));
|
||||
|
||||
/*
|
||||
@@ -493,19 +423,9 @@ LIBMILTER_API int smfi_addrcpt __P((SMFICTX *, char *));
|
||||
** char *rcpt; Recipient to be added
|
||||
*/
|
||||
|
||||
LIBMILTER_API int smfi_addrcpt_par __P((SMFICTX *, char *, char *));
|
||||
|
||||
/*
|
||||
** Add a recipient to the envelope
|
||||
**
|
||||
** SMFICTX *ctx; Opaque context structure
|
||||
** char *rcpt; Recipient to be added
|
||||
** char *args; ESMTP arguments
|
||||
*/
|
||||
|
||||
|
||||
LIBMILTER_API int smfi_delrcpt __P((SMFICTX *, char *));
|
||||
|
||||
#if _FFR_SMFI_PROGRESS
|
||||
/*
|
||||
** Send a "no-op" up to the MTA to tell it we're still alive, so long
|
||||
** milter-side operations don't time out.
|
||||
@@ -514,6 +434,7 @@ LIBMILTER_API int smfi_delrcpt __P((SMFICTX *, char *));
|
||||
*/
|
||||
|
||||
LIBMILTER_API int smfi_progress __P((SMFICTX *));
|
||||
#endif /* _FFR_SMFI_PROGRESS */
|
||||
|
||||
/*
|
||||
** Delete a recipient from the envelope
|
||||
@@ -567,27 +488,6 @@ LIBMILTER_API int smfi_setpriv __P((SMFICTX *, void *));
|
||||
|
||||
LIBMILTER_API void *smfi_getpriv __P((SMFICTX *));
|
||||
|
||||
/*
|
||||
** Get the private data pointer
|
||||
**
|
||||
** SMFICTX *ctx; Opaque context structure
|
||||
** void *privatedata; Pointer to private data area
|
||||
*/
|
||||
|
||||
LIBMILTER_API int smfi_setsymlist __P((SMFICTX *, int, char *));
|
||||
|
||||
/*
|
||||
** Set list of symbols (macros) to receive
|
||||
**
|
||||
** SMFICTX *ctx; Opaque context structure
|
||||
** int where; where in the SMTP dialogue should the macros be sent
|
||||
** char *macros; list of macros (space separated)
|
||||
*/
|
||||
|
||||
#if _FFR_THREAD_MONITOR
|
||||
LIBMILTER_API int smfi_set_max_exec_time __P((unsigned int));
|
||||
#endif /* _FFR_THREAD_MONITOR */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999-2007 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1999-2004 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: mfdef.h,v 8.38 2007/03/27 18:53:48 ca Exp $
|
||||
* $Id: mfdef.h,v 8.21 2004/07/07 21:41:31 ca Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -17,94 +17,78 @@
|
||||
#ifndef _LIBMILTER_MFDEF_H
|
||||
# define _LIBMILTER_MFDEF_H 1
|
||||
|
||||
#ifndef SMFI_PROT_VERSION
|
||||
# define SMFI_PROT_VERSION 6 /* MTA - libmilter protocol version */
|
||||
#endif /* SMFI_PROT_VERSION */
|
||||
|
||||
/* 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 */
|
||||
#define MILTER_MAX_DATA_SIZE 65535 /* default milter command data limit */
|
||||
# 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 */
|
||||
# define MILTER_MAX_DATA_SIZE 65535 /* default milter command data limit */
|
||||
|
||||
/* These apply to SMFIF_* flags */
|
||||
#define SMFI_V1_ACTS 0x0000000FL /* The actions of V1 filter */
|
||||
#define SMFI_V2_ACTS 0x0000003FL /* The actions of V2 filter */
|
||||
#define SMFI_CURR_ACTS 0x000001FFL /* actions of current version */
|
||||
#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 */
|
||||
# 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_QUIT_NC 'K' /* QUIT but new connection follows */
|
||||
#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 */
|
||||
#define SMFIC_DATA 'T' /* DATA */
|
||||
#define SMFIC_UNKNOWN 'U' /* Any unknown command */
|
||||
# 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 */
|
||||
# if SMFI_VERSION > 3
|
||||
# define SMFIC_DATA 'T' /* DATA */
|
||||
# endif /* SMFI_VERSION > 3 */
|
||||
# if SMFI_VERSION > 2
|
||||
# define SMFIC_UNKNOWN 'U' /* Any unknown command */
|
||||
# endif /* SMFI_VERSION > 2 */
|
||||
|
||||
/* actions (replies) */
|
||||
#define SMFIR_ADDRCPT '+' /* add recipient */
|
||||
#define SMFIR_DELRCPT '-' /* remove recipient */
|
||||
#define SMFIR_ADDRCPT_PAR '2' /* add recipient (incl. ESMTP args) */
|
||||
#define SMFIR_SHUTDOWN '4' /* 421: shutdown (internal to MTA) */
|
||||
#define SMFIR_ACCEPT 'a' /* accept */
|
||||
#define SMFIR_REPLBODY 'b' /* replace body (chunk) */
|
||||
#define SMFIR_CONTINUE 'c' /* continue */
|
||||
#define SMFIR_DISCARD 'd' /* discard */
|
||||
#define SMFIR_CHGFROM 'e' /* change envelope sender (from) */
|
||||
#define SMFIR_CONN_FAIL 'f' /* cause a connection failure */
|
||||
#define SMFIR_ADDHEADER 'h' /* add header */
|
||||
#define SMFIR_INSHEADER 'i' /* insert header */
|
||||
#define SMFIR_SETSYMLIST 'l' /* set list of symbols (macros) */
|
||||
#define SMFIR_CHGHEADER 'm' /* change header */
|
||||
#define SMFIR_PROGRESS 'p' /* progress */
|
||||
#define SMFIR_QUARANTINE 'q' /* quarantine */
|
||||
#define SMFIR_REJECT 'r' /* reject */
|
||||
#define SMFIR_SKIP 's' /* skip */
|
||||
#define SMFIR_TEMPFAIL 't' /* tempfail */
|
||||
#define SMFIR_REPLYCODE 'y' /* reply code etc */
|
||||
# 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_SHUTDOWN '4' /* 421: shutdown (internal to MTA) */
|
||||
# define SMFIR_ADDHEADER 'h' /* add header */
|
||||
# define SMFIR_INSHEADER 'i' /* insert header */
|
||||
# define SMFIR_REPLYCODE 'y' /* reply code etc */
|
||||
# define SMFIR_QUARANTINE 'q' /* 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 SMFIP_NR_HDR 0x00000080L /* No reply for headers */
|
||||
#define SMFIP_NOHREPL SMFIP_NR_HDR /* No reply for headers */
|
||||
#define SMFIP_NOUNKNOWN 0x00000100L /* MTA should not send unknown commands */
|
||||
#define SMFIP_NODATA 0x00000200L /* MTA should not send DATA */
|
||||
#define SMFIP_SKIP 0x00000400L /* MTA understands SMFIS_SKIP */
|
||||
#define SMFIP_RCPT_REJ 0x00000800L /* MTA should also send rejected RCPTs */
|
||||
#define SMFIP_NR_CONN 0x00001000L /* No reply for connect */
|
||||
#define SMFIP_NR_HELO 0x00002000L /* No reply for HELO */
|
||||
#define SMFIP_NR_MAIL 0x00004000L /* No reply for MAIL */
|
||||
#define SMFIP_NR_RCPT 0x00008000L /* No reply for RCPT */
|
||||
#define SMFIP_NR_DATA 0x00010000L /* No reply for DATA */
|
||||
#define SMFIP_NR_UNKN 0x00020000L /* No reply for UNKN */
|
||||
#define SMFIP_NR_EOH 0x00040000L /* No reply for eoh */
|
||||
#define SMFIP_NR_BODY 0x00080000L /* No reply for body chunk */
|
||||
#define SMFIP_HDR_LEADSPC 0x00100000L /* header value leading space */
|
||||
# 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 */
|
||||
# if _FFR_MILTER_NOHDR_RESP
|
||||
# define SMFIP_NOHREPL 0x00000080L /* No reply for headers */
|
||||
# endif /* _FFR_MILTER_NOHDR_RESP */
|
||||
|
||||
#define SMFI_V1_PROT 0x0000003FL /* The protocol of V1 filter */
|
||||
#define SMFI_V2_PROT 0x0000007FL /* The protocol of V2 filter */
|
||||
|
||||
/* all defined protocol bits */
|
||||
#define SMFI_CURR_PROT 0x001FFFFFL
|
||||
# define SMFI_V1_PROT 0x0000003FL /* The protocol of V1 filter */
|
||||
# define SMFI_V2_PROT 0x0000007FL /* The protocol of V2 filter */
|
||||
# if _FFR_MILTER_NOHDR_RESP
|
||||
# define SMFI_CURR_PROT 0x000000FFL /* The current version */
|
||||
# else /* _FFR_MILTER_NOHDR_RESP */
|
||||
# define SMFI_CURR_PROT SMFI_V2_PROT /* The current version */
|
||||
# endif /* _FFR_MILTER_NOHDR_RESP */
|
||||
|
||||
#endif /* !_LIBMILTER_MFDEF_H */
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999-2003, 2006 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1999-2003 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* By using this file, you agree to the terms and conditions set
|
||||
@@ -7,7 +7,7 @@
|
||||
* the sendmail distribution.
|
||||
*
|
||||
*
|
||||
* $Id: milter.h,v 8.41 2006/05/22 23:23:55 ca Exp $
|
||||
* $Id: milter.h,v 8.39 2003/12/02 00:21:42 msk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -25,4 +25,31 @@
|
||||
typedef pthread_t sthread_t;
|
||||
typedef int socket_t;
|
||||
|
||||
# define MAX_MACROS_ENTRIES 5 /* max size of macro pointer array */
|
||||
|
||||
/*
|
||||
** context for milter
|
||||
** implementation hint:
|
||||
** macros are stored in mac_buf[] as sequence of:
|
||||
** macro_name \0 macro_value
|
||||
** (just as read from the MTA)
|
||||
** mac_ptr is a list of pointers into mac_buf to the beginning of each
|
||||
** entry, i.e., macro_name, macro_value, ...
|
||||
*/
|
||||
|
||||
struct smfi_str
|
||||
{
|
||||
sthread_t ctx_id; /* thread id */
|
||||
socket_t ctx_sd; /* socket descriptor */
|
||||
int ctx_dbg; /* debug level */
|
||||
time_t ctx_timeout; /* timeout */
|
||||
int ctx_state; /* state */
|
||||
smfiDesc_ptr ctx_smfi; /* filter description */
|
||||
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 */
|
||||
void *ctx_privdata; /* private data */
|
||||
};
|
||||
|
||||
#endif /* ! _LIBMILTER_MILTER_H */
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2001, 2004 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
|
||||
@@ -9,7 +9,7 @@
|
||||
* forth in the LICENSE file which can be found at the top level of
|
||||
* the sendmail distribution.
|
||||
*
|
||||
* $Id: clock.h,v 1.12 2004/08/03 19:57:21 ca Exp $
|
||||
* $Id: clock.h,v 1.11 2001/05/14 23:25:37 gshapiro Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -52,8 +52,9 @@ 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_seteventm __P((int, void(*)__P((int)), int));
|
||||
extern SM_EVENT *sm_sigsafe_seteventm __P((int, void(*)__P((int)), int));
|
||||
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));
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998-2007 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
|
||||
* Copyright (c) 1988, 1993
|
||||
@@ -10,16 +10,14 @@
|
||||
* the sendmail distribution.
|
||||
*
|
||||
*
|
||||
* $Id: conf.h,v 1.134 2007/09/24 23:05:37 ca Exp $
|
||||
* $Id: conf.h,v 1.116 2004/07/26 18:08:35 ca Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
** CONF.H -- All user-configurable parameters for sendmail
|
||||
**
|
||||
** Send updates to Sendmail.ORG so they will be
|
||||
** included in the next release; see
|
||||
** http://www.sendmail.org/email-addresses.html
|
||||
** for current e-mail address.
|
||||
** Send updates to sendmail@Sendmail.ORG so they will be
|
||||
** included in the next release.
|
||||
*/
|
||||
|
||||
#ifndef SM_CONF_H
|
||||
@@ -162,11 +160,7 @@ extern void hard_syslog();
|
||||
*/
|
||||
|
||||
# ifdef _AIX5
|
||||
# include <sys/signal.h>
|
||||
# include <sys/wait.h>
|
||||
# define _AIX4 40300
|
||||
# define SOCKADDR_LEN_T socklen_t /* e.g., arg#3 to accept, getsockname */
|
||||
# define SOCKOPT_LEN_T socklen_t /* arg#5 to getsockopt */
|
||||
# if _AIX5 >= 50200
|
||||
# define HASUNSETENV 1 /* has unsetenv(3) call */
|
||||
# endif /* _AIX5 >= 50200 */
|
||||
@@ -181,14 +175,10 @@ extern void hard_syslog();
|
||||
# define BSD4_4_SOCKADDR /* has sa_len */
|
||||
# define USESETEUID 1 /* seteuid(2) works */
|
||||
# define TZ_TYPE TZ_NAME /* use tzname[] vector */
|
||||
# ifndef SOCKOPT_LEN_T
|
||||
# define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */
|
||||
# endif /* SOCKOPT_LEN_T */
|
||||
# define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */
|
||||
# if _AIX4 >= 40200
|
||||
# define HASSETREUID 1 /* setreuid(2) works as of AIX 4.2 */
|
||||
# ifndef SOCKADDR_LEN_T
|
||||
# define SOCKADDR_LEN_T size_t /* e.g., arg#3 to accept, getsockname */
|
||||
# endif /* SOCKADDR_LEN_T */
|
||||
# define SOCKADDR_LEN_T size_t /* e.g., arg#3 to accept, getsockname */
|
||||
# endif /* _AIX4 >= 40200 */
|
||||
# if defined(_ILS_MACROS) /* IBM versions aren't side-effect clean */
|
||||
# undef isascii
|
||||
@@ -218,9 +208,7 @@ extern void hard_syslog();
|
||||
# define GIDSET_T gid_t
|
||||
# define SFS_TYPE SFS_STATFS /* use <sys/statfs.h> statfs() impl */
|
||||
# define SPT_PADCHAR '\0' /* pad process title with nulls */
|
||||
# ifndef LA_TYPE
|
||||
# define LA_TYPE LA_INT
|
||||
# endif /* LA_TYPE */
|
||||
# define LA_TYPE LA_INT
|
||||
# define FSHIFT 16
|
||||
# define LA_AVENRUN "avenrun"
|
||||
# if !defined(_AIX4) || _AIX4 < 40300
|
||||
@@ -410,9 +398,6 @@ typedef int pid_t;
|
||||
# if SOLARIS >= 20500 || (SOLARIS < 10000 && SOLARIS >= 205)
|
||||
# define HASSETREUID 1 /* setreuid works as of 2.5 */
|
||||
# define HASSETREGID 1 /* use setregid(2) to set saved gid */
|
||||
# if SOLARIS >= 20600 || (SOLARIS < 10000 && SOLARIS >= 206)
|
||||
# define HASSNPRINTF 1 /* has snprintf(3c) starting in 2.6 */
|
||||
# endif /* SOLARIS >= 20600 || (SOLARIS < 10000 && SOLARIS >= 206) */
|
||||
# if SOLARIS < 207 || (SOLARIS > 10000 && SOLARIS < 20700)
|
||||
# ifndef LA_TYPE
|
||||
# define LA_TYPE LA_KSTAT /* use kstat(3k) -- may work in < 2.5 */
|
||||
@@ -448,7 +433,6 @@ typedef int pid_t;
|
||||
# define SMRSH_CMDDIR "/var/adm/sm.bin"
|
||||
# endif /* ! SMRSH_CMDDIR */
|
||||
# define SL_FUDGE 34 /* fudge offset for SyslogPrefixLen */
|
||||
# define HASLDAPGETALIASBYNAME 1 /* added in S8 */
|
||||
# endif /* SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208) */
|
||||
# if SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209)
|
||||
# define HASURANDOMDEV 1 /* /dev/[u]random added in S9 */
|
||||
@@ -458,9 +442,6 @@ typedef int pid_t;
|
||||
# if SOLARIS >= 21000 || (SOLARIS < 10000 && SOLARIS >= 210)
|
||||
# define HASUNSETENV 1 /* unsetenv() added in S10 */
|
||||
# endif /* SOLARIS >= 21000 || (SOLARIS < 10000 && SOLARIS >= 210) */
|
||||
# if SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211)
|
||||
# define GETLDAPALIASBYNAME_VERSION 2 /* changed in S11 */
|
||||
# endif /* SOLARIS >= 21100 || (SOLARIS < 10000 && SOLARIS >= 211) */
|
||||
# ifndef HASGETUSERSHELL
|
||||
# define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps pre-2.7 */
|
||||
# endif /* ! HASGETUSERSHELL */
|
||||
@@ -745,8 +726,8 @@ typedef int pid_t;
|
||||
# define HASFLOCK 1 /* has flock(2) */
|
||||
# define HASUNAME 1 /* has uname(2) */
|
||||
# define HASUNSETENV 1 /* has unsetenv(3) */
|
||||
# define HASSETSID 1 /* has POSIX setsid(2) call */
|
||||
# define HASINITGROUPS 1 /* has initgroups(3) */
|
||||
# define HASSETSID 1 /* has POSIX setsid(2) call */
|
||||
# define HASINITGROUPS 1 /* has initgroups(3) */
|
||||
# define HASSETVBUF 1 /* has setvbuf (3) */
|
||||
# define HASSETREUID 0 /* setreuid(2) unusable */
|
||||
# define HASSETEUID 1 /* has seteuid(2) */
|
||||
@@ -759,22 +740,13 @@ typedef int pid_t;
|
||||
# define HASWAITPID 1 /* has waitpid(2) */
|
||||
# define HASGETDTABLESIZE 1 /* has getdtablesize(2) */
|
||||
# define HAS_ST_GEN 1 /* has st_gen field in struct stat */
|
||||
# define HASURANDOMDEV 1 /* has urandom(4) */
|
||||
# define HASURANDOMDEV 1 /* has urandom(4) */
|
||||
# define HASSTRERROR 1 /* has strerror(3) */
|
||||
# define HASGETUSERSHELL 1 /* had getusershell(3) */
|
||||
# define GIDSET_T gid_t /* getgroups(2) takes gid_t */
|
||||
# define LA_TYPE LA_SUBR /* use getloadavg(3) */
|
||||
# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
|
||||
# if DARWIN >= 70000
|
||||
# define SOCKADDR_LEN_T socklen_t
|
||||
# endif
|
||||
# if DARWIN >= 80000
|
||||
# define SPT_TYPE SPT_REUSEARGV
|
||||
# define SPT_PADCHAR '\0'
|
||||
# define SOCKOPT_LEN_T socklen_t
|
||||
# else
|
||||
# define SPT_TYPE SPT_PSSTRINGS /* use magic PS_STRINGS pointer for setproctitle */
|
||||
# endif
|
||||
# define SPT_TYPE SPT_PSSTRINGS /* use magic PS_STRINGS pointer for setproctitle */
|
||||
# define ERRLIST_PREDEFINED /* don't declare sys_errlist */
|
||||
# define BSD4_4_SOCKADDR /* struct sockaddr has sa_len */
|
||||
# define SAFENFSPATHCONF 0 /* unverified: pathconf(2) doesn't work on NFS */
|
||||
@@ -793,7 +765,7 @@ extern unsigned int sleepX __P((unsigned int seconds));
|
||||
** See also BSD defines.
|
||||
*/
|
||||
|
||||
# if defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__) && !defined(DARWIN)
|
||||
# if defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__)
|
||||
# include <paths.h>
|
||||
# define HASUNSETENV 1 /* has unsetenv(3) call */
|
||||
# define USESETEUID 1 /* has usable seteuid(2) call */
|
||||
@@ -811,7 +783,7 @@ extern unsigned int sleepX __P((unsigned int seconds));
|
||||
# endif /* ! LA_TYPE */
|
||||
# define SFS_TYPE SFS_MOUNT /* use <sys/mount.h> statfs() impl */
|
||||
# define SPT_TYPE SPT_PSSTRINGS /* use PS_STRINGS pointer */
|
||||
# endif /* defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__) && !defined(DARWIN)*/
|
||||
# endif /* defined(BSD4_4) && !defined(__bsdi__) && !defined(__GNU__) */
|
||||
|
||||
|
||||
/*
|
||||
@@ -860,69 +832,41 @@ extern unsigned int sleepX __P((unsigned int seconds));
|
||||
# endif /* __bsdi__ */
|
||||
|
||||
|
||||
# if defined(__QNX__)
|
||||
# if defined(__QNXNTO__)
|
||||
/* QNX 6 */
|
||||
# include <unix.h>
|
||||
# define HASUNSETENV 1 /* has unsetenv(3) call */
|
||||
# define HASINITGROUPS 1 /* has initgroups(3) call */
|
||||
# define HASSETSID 1 /* has POSIX setsid(2) call */
|
||||
# define USESETEUID 1 /* has usable seteuid(2) call */
|
||||
# define HASFCHMOD 1 /* has fchmod(2) syscall */
|
||||
# define HASFCHOWN 1 /* has fchown(2) syscall */
|
||||
# define HASUNAME 1 /* has uname(2) syscall */
|
||||
# define HASSTRERROR 1 /* has strerror(3) */
|
||||
# define BSD4_4_SOCKADDR /* has sa_len */
|
||||
# define ERRLIST_PREDEFINED /* don't declare sys_errlist */
|
||||
# define NETLINK 1 /* supports AF_LINK */
|
||||
# define GIDSET_T gid_t
|
||||
# define QUAD_T uint64_t
|
||||
# define HASSNPRINTF 1 /* has snprintf(3) (all versions?) */
|
||||
# define HASGETUSERSHELL 0
|
||||
|
||||
/*
|
||||
** We have a strrev() that doesn't allocate anything.
|
||||
** Make sure the one here is used.
|
||||
*/
|
||||
|
||||
# define strrev strrev_sendmail
|
||||
|
||||
# else /* defined(__QNXNTO__) */
|
||||
|
||||
/*
|
||||
** QNX 4.2x
|
||||
** Contributed by Glen McCready <glen@qnx.com>.
|
||||
**
|
||||
** Should work with all versions of QNX 4.
|
||||
** Should work with all versions of QNX.
|
||||
*/
|
||||
|
||||
# include <unix.h>
|
||||
# include <sys/select.h>
|
||||
# undef NGROUPS_MAX
|
||||
# define HASSETSID 1 /* has POSIX setsid(2) call */
|
||||
# define USESETEUID 1 /* has usable seteuid(2) call */
|
||||
# define HASFCHMOD 1 /* has fchmod(2) syscall */
|
||||
# define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */
|
||||
# define HASSETREUID 1 /* has setreuid(2) call */
|
||||
# define HASSTRERROR 1 /* has strerror(3) */
|
||||
# define HASFLOCK 0
|
||||
# undef HASINITGROUPS /* has initgroups(3) call */
|
||||
# define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */
|
||||
# define IP_SRCROUTE 1 /* can check IP source routing */
|
||||
# define TZ_TYPE TZ_TMNAME /* use tmname variable */
|
||||
# define GIDSET_T gid_t
|
||||
# define LA_TYPE LA_ZERO
|
||||
# define SFS_TYPE SFS_NONE
|
||||
# define SPT_TYPE SPT_REUSEARGV
|
||||
# define SPT_PADCHAR '\0' /* pad process title with nulls */
|
||||
# define HASGETUSERSHELL 0
|
||||
# define _FILE_H_INCLUDED
|
||||
# endif /* defined(__QNXNTO__) */
|
||||
# if defined(__QNX__)
|
||||
# include <unix.h>
|
||||
# include <sys/select.h>
|
||||
# undef NGROUPS_MAX
|
||||
# define HASSETSID 1 /* has POSIX setsid(2) call */
|
||||
# define USESETEUID 1 /* has usable seteuid(2) call */
|
||||
# define HASFCHMOD 1 /* has fchmod(2) syscall */
|
||||
# define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */
|
||||
# define HASSETREUID 1 /* has setreuid(2) call */
|
||||
# define HASSTRERROR 1 /* has strerror(3) */
|
||||
# define HASFLOCK 0
|
||||
# undef HASINITGROUPS /* has initgroups(3) call */
|
||||
# define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */
|
||||
# define IP_SRCROUTE 1 /* can check IP source routing */
|
||||
# define TZ_TYPE TZ_TMNAME /* use tmname variable */
|
||||
# define GIDSET_T gid_t
|
||||
# define LA_TYPE LA_ZERO
|
||||
# define SFS_TYPE SFS_NONE
|
||||
# define SPT_TYPE SPT_REUSEARGV
|
||||
# define SPT_PADCHAR '\0' /* pad process title with nulls */
|
||||
# define HASGETUSERSHELL 0
|
||||
# define E_PSEUDOBASE 512
|
||||
# define _FILE_H_INCLUDED
|
||||
# endif /* defined(__QNX__) */
|
||||
|
||||
|
||||
/*
|
||||
** DragonFly BSD/ FreeBSD / NetBSD / OpenBSD (all architectures, all versions)
|
||||
** FreeBSD / NetBSD / OpenBSD (all architectures, all versions)
|
||||
**
|
||||
** 4.3BSD clone, closer to 4.4BSD for FreeBSD 1.x and NetBSD 0.9x
|
||||
** 4.4BSD-Lite based for FreeBSD 2.x and NetBSD 1.x
|
||||
@@ -930,7 +874,7 @@ extern unsigned int sleepX __P((unsigned int seconds));
|
||||
** See also BSD defines.
|
||||
*/
|
||||
|
||||
# if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
# include <paths.h>
|
||||
# define HASUNSETENV 1 /* has unsetenv(3) call */
|
||||
# define HASSETSID 1 /* has POSIX setsid(2) call */
|
||||
@@ -947,14 +891,11 @@ extern unsigned int sleepX __P((unsigned int seconds));
|
||||
# define NETLINK 1 /* supports AF_LINK */
|
||||
# define SAFENFSPATHCONF 1 /* pathconf(2) pessimizes on NFS filesystems */
|
||||
# define GIDSET_T gid_t
|
||||
# define QUAD_T unsigned long long
|
||||
# define HASSNPRINTF 1 /* has snprintf(3) (all versions?) */
|
||||
# define QUAD_T unsigned long long
|
||||
# ifndef LA_TYPE
|
||||
# define LA_TYPE LA_SUBR
|
||||
# endif /* ! LA_TYPE */
|
||||
# if defined(__NetBSD__) && defined(__NetBSD_Version__) && \
|
||||
((__NetBSD_Version__ >= 200040000 && __NetBSD_Version__ < 200090000) || \
|
||||
(__NetBSD_Version__ >= 299000900))
|
||||
# if defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 200040000
|
||||
# undef SFS_TYPE
|
||||
# define SFS_TYPE SFS_STATVFS
|
||||
# else
|
||||
@@ -970,9 +911,7 @@ extern unsigned int sleepX __P((unsigned int seconds));
|
||||
# if defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104170000
|
||||
# define HASSETUSERCONTEXT 1 /* BSDI-style login classes */
|
||||
# endif
|
||||
# if defined(__NetBSD__) && defined(__NetBSD_Version__) && \
|
||||
((__NetBSD_Version__ >= 200060000 && __NetBSD_Version__ < 200090000) || \
|
||||
(__NetBSD_Version__ >= 299000900))
|
||||
# if defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 200060000
|
||||
# define HASCLOSEFROM 1 /* closefrom(3) added in 2.0F */
|
||||
# endif
|
||||
# if defined(__NetBSD__)
|
||||
@@ -980,23 +919,6 @@ extern unsigned int sleepX __P((unsigned int seconds));
|
||||
# include <sys/param.h>
|
||||
# include <sys/sysctl.h>
|
||||
# endif
|
||||
# if defined(__DragonFly__)
|
||||
# define HASSETLOGIN 1 /* has setlogin(2) */
|
||||
# define HASSRANDOMDEV 1 /* has srandomdev(3) */
|
||||
# define HASURANDOMDEV 1 /* has /dev/urandom(4) */
|
||||
# undef SPT_TYPE
|
||||
# include <libutil.h>
|
||||
# define SPT_TYPE SPT_BUILTIN
|
||||
# define HASSETUSERCONTEXT 1 /* BSDI-style login classes */
|
||||
# ifndef SMRSH_CMDDIR
|
||||
# define SMRSH_CMDDIR "/usr/libexec/sm.bin"
|
||||
# endif /* ! SMRSH_CMDDIR */
|
||||
# ifndef SMRSH_PATH
|
||||
# define SMRSH_PATH "/bin:/usr/bin"
|
||||
# endif /* ! SMRSH_PATH */
|
||||
# define USESYSCTL 1 /* use sysctl(3) for getting ncpus */
|
||||
# include <sys/sysctl.h>
|
||||
# endif /* defined(__DragonFly__) */
|
||||
# if defined(__FreeBSD__)
|
||||
# define HASSETLOGIN 1 /* has setlogin(2) */
|
||||
# if __FreeBSD_version >= 227001
|
||||
@@ -1047,11 +969,8 @@ extern unsigned int sleepX __P((unsigned int seconds));
|
||||
# if OpenBSD >= 200405
|
||||
# define HASCLOSEFROM 1 /* closefrom(3) added in 3.5 */
|
||||
# endif /* OpenBSD >= 200405 */
|
||||
# if OpenBSD >= 200505
|
||||
# undef NETISO /* iso.h removed in 3.7 */
|
||||
# endif /* OpenBSD >= 200505 */
|
||||
# endif /* defined(__OpenBSD__) */
|
||||
# endif /* defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */
|
||||
# endif /* defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */
|
||||
|
||||
|
||||
/*
|
||||
@@ -1189,7 +1108,7 @@ typedef short pid_t;
|
||||
# define _SCO_unix_4_2
|
||||
# else /* ! _SCO_unix_4_2 */
|
||||
# define SOCKADDR_LEN_T size_t /* e.g., arg#3 to accept, getsockname */
|
||||
# define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */
|
||||
# define SOCKOPT_LEN_T size_t /* arg#5 to getsockopt */
|
||||
# endif /* ! _SCO_unix_4_2 */
|
||||
# endif /* _SCO_DS >= 1 */
|
||||
|
||||
@@ -1883,7 +1802,7 @@ extern struct passwd * sendmail_mpe_getpwuid __P((uid_t));
|
||||
# define HASWAITPID 1
|
||||
# define HASGETDTABLESIZE 1
|
||||
# define GIDSET_T gid_t
|
||||
# define SOCKADDR_LEN_T size_t
|
||||
# define SOCKADDR_LEN_T size_t
|
||||
# define SOCKOPT_LEN_T size_t
|
||||
# ifndef _PATH_UNIX
|
||||
# define _PATH_UNIX "/stand/unix"
|
||||
@@ -3005,7 +2924,7 @@ struct sm_align
|
||||
long al_l;
|
||||
void *al_p;
|
||||
double al_d;
|
||||
void (*al_f) __P((void));
|
||||
void (*al_f)();
|
||||
} al_u;
|
||||
};
|
||||
# define SM_ALIGN_SIZE offsetof(struct sm_align, al_u)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* forth in the LICENSE file which can be found at the top level of
|
||||
* the sendmail distribution.
|
||||
*
|
||||
* $Id: config.h,v 1.47 2004/10/26 21:41:07 gshapiro Exp $
|
||||
* $Id: config.h,v 1.46 2003/12/10 03:19:06 gshapiro Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -145,7 +145,6 @@
|
||||
|
||||
/* LDAP Checks */
|
||||
# if LDAPMAP
|
||||
# include <lber.h>
|
||||
# include <ldap.h>
|
||||
|
||||
/* Does the LDAP library have ldap_memfree()? */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* forth in the LICENSE file which can be found at the top level of
|
||||
* the sendmail distribution.
|
||||
*
|
||||
* $Id: errstring.h,v 1.10 2007/03/21 23:56:19 ca Exp $
|
||||
* $Id: errstring.h,v 1.9 2003/12/10 03:19:06 gshapiro Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -16,10 +16,6 @@
|
||||
#ifndef SM_ERRSTRING_H
|
||||
# define SM_ERRSTRING_H
|
||||
|
||||
#if defined(__QNX__)
|
||||
# define E_PSEUDOBASE 512
|
||||
#endif /* defined(__QNX__) */
|
||||
|
||||
#include <errno.h>
|
||||
#if NEEDINTERRNO
|
||||
extern int errno;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2001, 2006 Sendmail, Inc. and its suppliers.
|
||||
* 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: heap.h,v 1.23 2006/08/15 00:53:46 ca Exp $
|
||||
* $Id: heap.h,v 1.22 2001/09/04 22:41:55 ca Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -91,16 +91,6 @@ sm_fcalloc __P((
|
||||
# define sm_heap_setgroup(g) (SmHeapGroup = (g))
|
||||
# define sm_heap_newgroup() (SmHeapGroup = ++SmHeapMaxGroup)
|
||||
|
||||
#define SM_FREE(ptr) \
|
||||
do \
|
||||
{ \
|
||||
if ((ptr) != NULL) \
|
||||
{ \
|
||||
sm_free(ptr); \
|
||||
(ptr) = NULL; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
extern int SmHeapGroup;
|
||||
extern int SmHeapMaxGroup;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2001-2003, 2005-2007 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 2001-2002 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: ldap.h,v 1.33 2007/10/10 00:06:44 ca Exp $
|
||||
* $Id: ldap.h,v 1.27 2003/12/20 09:23:47 gshapiro Exp $
|
||||
*/
|
||||
|
||||
#ifndef SM_LDAP_H
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
/*
|
||||
** NOTE: These should be changed from LDAPMAP_* to SM_LDAP_*
|
||||
** in the next major release (8.x+1) of sendmail.
|
||||
** in the next major release (8.13) of sendmail.
|
||||
*/
|
||||
|
||||
# ifndef LDAPMAP_MAX_ATTR
|
||||
@@ -32,13 +32,6 @@
|
||||
|
||||
# if LDAPMAP
|
||||
|
||||
/* maximum number of arguments in a map lookup, see sendmail.h: MAX_MAP_ARGS */
|
||||
# define SM_LDAP_ARGS 10
|
||||
|
||||
/* error codes from sm_ldap_search*() */
|
||||
# define SM_LDAP_ERR (-1) /* generic error: ldap_search(3) */
|
||||
# define SM_LDAP_ERR_ARG_MISS (-2) /* an argument is missing */
|
||||
|
||||
/* Attribute types */
|
||||
# define SM_LDAP_ATTR_NONE (-1)
|
||||
# define SM_LDAP_ATTR_OBJCLASS 0
|
||||
@@ -51,7 +44,6 @@
|
||||
# define SM_LDAP_SINGLEMATCH 0x0001
|
||||
# define SM_LDAP_MATCHONLY 0x0002
|
||||
# define SM_LDAP_USE_ALLATTR 0x0004
|
||||
# define SM_LDAP_SINGLEDN 0x0008
|
||||
|
||||
struct sm_ldap_struct
|
||||
{
|
||||
@@ -82,7 +74,6 @@ struct sm_ldap_struct
|
||||
int ldap_attr_type[LDAPMAP_MAX_ATTR + 1];
|
||||
char *ldap_attr_needobjclass[LDAPMAP_MAX_ATTR + 1];
|
||||
bool ldap_attrsonly;
|
||||
bool ldap_multi_args;
|
||||
|
||||
/* args for ldap_result */
|
||||
struct timeval ldap_timeout;
|
||||
@@ -91,10 +82,6 @@ struct sm_ldap_struct
|
||||
/* ldapmap_lookup options */
|
||||
char ldap_attrsep;
|
||||
|
||||
# if _FFR_LDAP_NETWORK_TIMEOUT
|
||||
struct timeval ldap_networktmo;
|
||||
# endif /* _FFR_LDAP_NETWORK_TIMEOUT */
|
||||
|
||||
/* Linked list of maps sharing the same LDAP binding */
|
||||
void *ldap_next;
|
||||
};
|
||||
@@ -103,18 +90,18 @@ typedef struct sm_ldap_struct SM_LDAP_STRUCT;
|
||||
|
||||
struct sm_ldap_recurse_entry
|
||||
{
|
||||
char *lr_search;
|
||||
int lr_type;
|
||||
LDAPURLDesc *lr_ludp;
|
||||
char **lr_attrs;
|
||||
bool lr_done;
|
||||
char *lr_search;
|
||||
int lr_type;
|
||||
LDAPURLDesc *lr_ludp;
|
||||
char **lr_attrs;
|
||||
bool lr_done;
|
||||
};
|
||||
|
||||
struct sm_ldap_recurse_list
|
||||
{
|
||||
int lrl_size;
|
||||
int lrl_cnt;
|
||||
struct sm_ldap_recurse_entry **lrl_data;
|
||||
int lr_size;
|
||||
int lr_cnt;
|
||||
struct sm_ldap_recurse_entry **lr_data;
|
||||
};
|
||||
|
||||
typedef struct sm_ldap_recurse_entry SM_LDAP_RECURSE_ENTRY;
|
||||
@@ -124,7 +111,6 @@ typedef struct sm_ldap_recurse_list SM_LDAP_RECURSE_LIST;
|
||||
extern void sm_ldap_clear __P((SM_LDAP_STRUCT *));
|
||||
extern bool sm_ldap_start __P((char *, SM_LDAP_STRUCT *));
|
||||
extern int sm_ldap_search __P((SM_LDAP_STRUCT *, char *));
|
||||
extern int sm_ldap_search_m __P((SM_LDAP_STRUCT *, char **));
|
||||
extern int sm_ldap_results __P((SM_LDAP_STRUCT *, int, int, int,
|
||||
SM_RPOOL_T *, char **, int *, int *,
|
||||
SM_LDAP_RECURSE_LIST *));
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2006 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: misc.h,v 1.1 2006/06/28 23:57:59 ca Exp $
|
||||
*/
|
||||
|
||||
#ifndef SM_MISC_H
|
||||
# define SM_MISC_H 1
|
||||
|
||||
int sm_memstat_open __P((void));
|
||||
int sm_memstat_close __P((void));
|
||||
int sm_memstat_get __P((char *, long *));
|
||||
|
||||
#endif /* ! SM_MISC_H */
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2001, 2004 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: sm_os_dragonfly.h,v 1.1 2004/08/06 03:54:07 gshapiro Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
** Platform definitions for DragonFly BSD
|
||||
*/
|
||||
|
||||
#define SM_OS_NAME "dragonfly"
|
||||
|
||||
#define SM_CONF_SYS_CDEFS_H 1
|
||||
|
||||
#define MI_SOMAXCONN -1 /* listen() max backlog for milter */
|
||||
|
||||
#ifndef SM_CONF_STRL
|
||||
# define SM_CONF_STRL 1
|
||||
#endif /* SM_CONF_STRL */
|
||||
#ifndef SM_CONF_SHM
|
||||
# define SM_CONF_SHM 1
|
||||
#endif /* SM_CONF_SHM */
|
||||
#ifndef SM_CONF_SEM
|
||||
# define SM_CONF_SEM 1
|
||||
#endif /* SM_CONF_SEM */
|
||||
#ifndef SM_CONF_MSG
|
||||
# define SM_CONF_MSG 1
|
||||
#endif /* SM_CONF_MSG */
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2007 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: sm_os_qnx.h,v 1.1 2007/03/21 23:56:20 ca Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
** sm_os_qnx.h -- platform definitions for QNX
|
||||
*/
|
||||
|
||||
#define SM_CONF_SYS_CDEFS_H 1
|
||||
|
||||
#ifndef SM_CONF_SETITIMER
|
||||
# define SM_CONF_SETITIMER 0
|
||||
#endif /* SM_CONF_SETITIMER */
|
||||
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2001, 2005 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: sem.h,v 1.9 2005/02/17 22:08:58 ca Exp $
|
||||
*/
|
||||
|
||||
#ifndef SM_SEM_H
|
||||
# define SM_SEM_H 1
|
||||
|
||||
#include <sm/gen.h>
|
||||
|
||||
/* key for semaphores */
|
||||
# define SM_SEM_KEY (41L)
|
||||
# define SM_SEM_NO_ID (-1)
|
||||
# define SM_NO_SEM(id) ((id) < 0)
|
||||
|
||||
# if SM_CONF_SEM > 0
|
||||
# include <sys/types.h>
|
||||
# include <sys/ipc.h>
|
||||
# include <sys/sem.h>
|
||||
|
||||
# if SM_CONF_SEM == 2
|
||||
union semun
|
||||
{
|
||||
int val;
|
||||
struct semid_ds *buf;
|
||||
ushort *array;
|
||||
};
|
||||
# endif /* SM_CONF_SEM == 2 */
|
||||
|
||||
# ifndef SEM_A
|
||||
# define SEM_A 0200
|
||||
# endif /* SEM_A */
|
||||
# ifndef SEM_R
|
||||
# define SEM_R 0400
|
||||
# endif /* SEM_R */
|
||||
|
||||
# define SM_NSEM 1
|
||||
|
||||
extern int sm_sem_start __P((key_t, int, int, bool));
|
||||
extern int sm_sem_stop __P((int));
|
||||
extern int sm_sem_acq __P((int, int, int));
|
||||
extern int sm_sem_rel __P((int, int, int));
|
||||
extern int sm_sem_get __P((int, int));
|
||||
|
||||
# else /* SM_CONF_SEM > 0 */
|
||||
# define sm_sem_start(key, nsem, semflg, owner) 0
|
||||
# define sm_sem_stop(semid) 0
|
||||
# define sm_sem_acq(semid, semnum, timeout) 0
|
||||
# define sm_sem_rel(semid, semnum, timeout) 0
|
||||
# define sm_sem_get(semid, semnum) 0
|
||||
# endif /* SM_CONF_SEM > 0 */
|
||||
|
||||
#endif /* ! SM_SEM_H */
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2006 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
** SENDMAIL.H -- MTA-specific definitions for sendmail.
|
||||
*/
|
||||
|
||||
#ifndef _SM_SENDMAIL_H
|
||||
# define _SM_SENDMAIL_H 1
|
||||
|
||||
/* "out of band" indicator */
|
||||
#define METAQUOTE ((unsigned char)0377) /* quotes the next octet */
|
||||
|
||||
extern int dequote_internal_chars __P((char *, char *, int));
|
||||
extern char *quote_internal_chars __P((char *, char *, int *));
|
||||
extern char *str2prt __P((char *));
|
||||
|
||||
#endif /* ! _SM_SENDMAIL_H */
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2003, 2005 Sendmail, Inc. and its suppliers.
|
||||
* Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
|
||||
* All rights reserved.
|
||||
*
|
||||
* By using this file, you agree to the terms and conditions set
|
||||
* forth in the LICENSE file which can be found at the top level of
|
||||
* the sendmail distribution.
|
||||
*
|
||||
* $Id: shm.h,v 1.11 2005/01/13 22:57:04 ca Exp $
|
||||
* $Id: shm.h,v 1.10 2003/05/17 18:34:54 ca Exp $
|
||||
*/
|
||||
|
||||
#ifndef SM_SHM_H
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
extern void *sm_shmstart __P((key_t, int , int , int *, bool));
|
||||
extern int sm_shmstop __P((void *, int, bool));
|
||||
extern int sm_shmsetowner __P((int, uid_t, gid_t, mode_t));
|
||||
|
||||
|
||||
/* for those braindead systems... (e.g., SunOS 4) */
|
||||
|
||||
@@ -1,157 +0,0 @@
|
||||
/* $OpenBSD: queue.h,v 1.30 2005/10/25 06:37:47 otto Exp $ */
|
||||
/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)queue.h 8.5 (Berkeley) 8/20/94
|
||||
*/
|
||||
|
||||
#ifndef SM_TAILQ_H_
|
||||
#define SM_TAILQ_H_
|
||||
|
||||
/*
|
||||
* $Id: tailq.h,v 1.2 2007/06/29 23:09:57 ca Exp $
|
||||
*
|
||||
* This file is a modified copy of queue.h from a BSD system:
|
||||
* we only need tail queues here.
|
||||
* We do not use queue.h directly because there is a conflict with
|
||||
* some versions of that file on some OSs.
|
||||
*
|
||||
* A tail queue is headed by a pair of pointers, one to the head of the
|
||||
* list and the other to the tail of the list. The elements are doubly
|
||||
* linked so that an arbitrary element can be removed without a need to
|
||||
* traverse the list. New elements can be added to the list before or
|
||||
* after an existing element, at the head of the list, or at the end of
|
||||
* the list. A tail queue may be traversed in either direction.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Tail queue definitions.
|
||||
*/
|
||||
#define SM_TAILQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *tqh_first; /* first element */ \
|
||||
struct type **tqh_last; /* addr of last next element */ \
|
||||
}
|
||||
|
||||
#define SM_TAILQ_HEAD_INITIALIZER(head) \
|
||||
{ NULL, &(head).tqh_first }
|
||||
|
||||
#define SM_TAILQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *tqe_next; /* next element */ \
|
||||
struct type **tqe_prev; /* address of previous next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* tail queue access methods
|
||||
*/
|
||||
#define SM_TAILQ_FIRST(head) ((head)->tqh_first)
|
||||
#define SM_TAILQ_END(head) NULL
|
||||
#define SM_TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
|
||||
#define SM_TAILQ_LAST(head, headname) \
|
||||
(*(((struct headname *)((head)->tqh_last))->tqh_last))
|
||||
/* XXX */
|
||||
#define SM_TAILQ_PREV(elm, headname, field) \
|
||||
(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
|
||||
#define SM_TAILQ_EMPTY(head) \
|
||||
(SM_TAILQ_FIRST(head) == SM_TAILQ_END(head))
|
||||
|
||||
#define SM_TAILQ_FOREACH(var, head, field) \
|
||||
for((var) = SM_TAILQ_FIRST(head); \
|
||||
(var) != SM_TAILQ_END(head); \
|
||||
(var) = SM_TAILQ_NEXT(var, field))
|
||||
|
||||
#define SM_TAILQ_FOREACH_REVERSE(var, head, headname, field) \
|
||||
for((var) = SM_TAILQ_LAST(head, headname); \
|
||||
(var) != SM_TAILQ_END(head); \
|
||||
(var) = SM_TAILQ_PREV(var, headname, field))
|
||||
|
||||
/*
|
||||
* Tail queue functions.
|
||||
*/
|
||||
#define SM_TAILQ_INIT(head) do { \
|
||||
(head)->tqh_first = NULL; \
|
||||
(head)->tqh_last = &(head)->tqh_first; \
|
||||
} while (0)
|
||||
|
||||
#define SM_TAILQ_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
|
||||
(head)->tqh_first->field.tqe_prev = \
|
||||
&(elm)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
(head)->tqh_first = (elm); \
|
||||
(elm)->field.tqe_prev = &(head)->tqh_first; \
|
||||
} while (0)
|
||||
|
||||
#define SM_TAILQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.tqe_next = NULL; \
|
||||
(elm)->field.tqe_prev = (head)->tqh_last; \
|
||||
*(head)->tqh_last = (elm); \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
} while (0)
|
||||
|
||||
#define SM_TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
|
||||
(elm)->field.tqe_next->field.tqe_prev = \
|
||||
&(elm)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
(listelm)->field.tqe_next = (elm); \
|
||||
(elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
|
||||
} while (0)
|
||||
|
||||
#define SM_TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
|
||||
(elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
|
||||
(elm)->field.tqe_next = (listelm); \
|
||||
*(listelm)->field.tqe_prev = (elm); \
|
||||
(listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
|
||||
} while (0)
|
||||
|
||||
#define SM_TAILQ_REMOVE(head, elm, field) do { \
|
||||
if (((elm)->field.tqe_next) != NULL) \
|
||||
(elm)->field.tqe_next->field.tqe_prev = \
|
||||
(elm)->field.tqe_prev; \
|
||||
else \
|
||||
(head)->tqh_last = (elm)->field.tqe_prev; \
|
||||
*(elm)->field.tqe_prev = (elm)->field.tqe_next; \
|
||||
} while (0)
|
||||
|
||||
#define SM_TAILQ_REPLACE(head, elm, elm2, field) do { \
|
||||
if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != NULL) \
|
||||
(elm2)->field.tqe_next->field.tqe_prev = \
|
||||
&(elm2)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm2)->field.tqe_next; \
|
||||
(elm2)->field.tqe_prev = (elm)->field.tqe_prev; \
|
||||
*(elm2)->field.tqe_prev = (elm2); \
|
||||
} while (0)
|
||||
|
||||
#endif /* !SM_TAILQ_H_ */
|
||||
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2005 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: time.h,v 1.1 2005/06/14 23:07:19 ca Exp $
|
||||
*/
|
||||
|
||||
#ifndef SM_TIME_H
|
||||
# define SM_TIME_H 1
|
||||
|
||||
# include <sm/config.h>
|
||||
|
||||
# include <sys/time.h>
|
||||
|
||||
/* should be defined in sys/time.h */
|
||||
#ifndef timersub
|
||||
# define timersub(tvp, uvp, vvp) \
|
||||
do \
|
||||
{ \
|
||||
(vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
|
||||
(vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
|
||||
if ((vvp)->tv_usec < 0) \
|
||||
{ \
|
||||
(vvp)->tv_sec--; \
|
||||
(vvp)->tv_usec += 1000000; \
|
||||
} \
|
||||
} while (0)
|
||||
#endif /* !timersub */
|
||||
|
||||
#ifndef timeradd
|
||||
# define timeradd(tvp, uvp, vvp) \
|
||||
do \
|
||||
{ \
|
||||
(vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \
|
||||
(vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \
|
||||
if ((vvp)->tv_usec >= 1000000) \
|
||||
{ \
|
||||
(vvp)->tv_sec++; \
|
||||
(vvp)->tv_usec -= 1000000; \
|
||||
} \
|
||||
} while (0)
|
||||
#endif /* !timeradd */
|
||||
|
||||
#ifndef timercmp
|
||||
# define timercmp(tvp, uvp, cmp) \
|
||||
(((tvp)->tv_sec == (uvp)->tv_sec) ? \
|
||||
((tvp)->tv_usec cmp (uvp)->tv_usec) : \
|
||||
((tvp)->tv_sec cmp (uvp)->tv_sec))
|
||||
#endif /* !timercmp */
|
||||
|
||||
|
||||
#endif /* ! SM_TIME_H */
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile,v 8.2 2006/05/23 21:55:55 ca Exp $
|
||||
# $Id: Makefile,v 8.1 1999/11/04 00:03:40 ca Exp $
|
||||
|
||||
SHELL= /bin/sh
|
||||
BUILD= ./Build
|
||||
@@ -6,8 +6,6 @@ OPTIONS= $(CONFIG) $(FLAGS)
|
||||
|
||||
all: FRC
|
||||
$(SHELL) $(BUILD) $(OPTIONS) $@
|
||||
check: FRC
|
||||
$(SHELL) $(BUILD) $(OPTIONS) $@
|
||||
clean: FRC
|
||||
$(SHELL) $(BUILD) $(OPTIONS) $@
|
||||
install: FRC
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
dnl $Id: Makefile.m4,v 8.78 2007/02/05 19:21:29 ca Exp $
|
||||
dnl $Id: Makefile.m4,v 8.31 2002/06/21 22:01:31 ca Exp $
|
||||
include(confBUILDTOOLSDIR`/M4/switch.m4')
|
||||
|
||||
dnl only required for compilation of EXTRAS
|
||||
define(`confREQUIRE_SM_OS_H', `true')
|
||||
define(`confREQUIRE_LIBSM', `true')
|
||||
define(`confMT', `true')
|
||||
|
||||
# sendmail dir
|
||||
SMSRCDIR=ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
|
||||
SMSRCDIR= ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
|
||||
PREPENDDEF(`confINCDIRS', `-I${SMSRCDIR} ')
|
||||
|
||||
bldPRODUCT_START(`library', `libmilter')
|
||||
define(`bldINSTALLABLE', `true')
|
||||
define(`LIBMILTER_EXTRAS', `errstring.c strl.c')
|
||||
APPENDDEF(`confENVDEF', `-DNOT_SENDMAIL -Dsm_snprintf=snprintf')
|
||||
define(`bldSOURCES', `main.c engine.c listener.c worker.c handler.c comm.c smfi.c signal.c sm_gethost.c monitor.c LIBMILTER_EXTRAS ')
|
||||
define(`bldSOURCES', `main.c engine.c listener.c handler.c comm.c smfi.c signal.c sm_gethost.c LIBMILTER_EXTRAS ')
|
||||
define(`confBEFORE', `LIBMILTER_EXTRAS')
|
||||
bldPUSH_INSTALL_TARGET(`install-mfapi')
|
||||
bldPRODUCT_END
|
||||
|
||||
@@ -12,9 +12,6 @@ issuing the './Build' command in SRCDIR/libmilter .
|
||||
Starting with 8.13 sendmail is compiled by default with support for
|
||||
the milter API.
|
||||
|
||||
Note: if you want to write a milter in Java, then see
|
||||
http://sendmail-jilter.sourceforge.net/
|
||||
|
||||
+----------------+
|
||||
| SECURITY HINTS |
|
||||
+----------------+
|
||||
@@ -90,10 +87,8 @@ IPv4 socket on port 3333 of localhost. The current flags (F=) are:
|
||||
|
||||
R Reject connection if filter unavailable
|
||||
T Temporary fail connection if filter unavailable
|
||||
4 Shut down connection if filter unavailable
|
||||
(with a 421 temporary error).
|
||||
|
||||
If none of these is specified, the message is passed through sendmail
|
||||
If neither F=R nor F=T is specified, the message is passed through sendmail
|
||||
in case of filter errors as if the failing filters were not present.
|
||||
|
||||
Finally, you can override the default timeouts used by sendmail when
|
||||
@@ -166,7 +161,7 @@ connected via one of these options, the session can be continued through
|
||||
the use of standard SMTP commands.
|
||||
|
||||
% sendmail -bs
|
||||
220 test.sendmail.com ESMTP Sendmail 8.14.0/8.14.0; Thu, 22 Jun 2006 13:05:23 -0500 (EST)
|
||||
220 test.sendmail.com ESMTP Sendmail 8.11.0/8.11.0; Tue, 10 Nov 1970 13:05:23 -0500 (EST)
|
||||
HELO localhost
|
||||
250 test.sendmail.com Hello testy@localhost, pleased to meet you
|
||||
MAIL From:<testy>
|
||||
@@ -227,8 +222,248 @@ Feedback about problems (and possible fixes) is welcome.
|
||||
| SOURCE FOR SAMPLE FILTER |
|
||||
+--------------------------+
|
||||
|
||||
Note that the filter example.c may not be thread safe on some operating
|
||||
Note that the filter below may not be thread safe on some operating
|
||||
systems. You should check your system man pages for the functions used
|
||||
below to verify the functions are thread safe.
|
||||
|
||||
$Revision: 8.42 $, Last updated $Date: 2006/06/29 17:10:16 $
|
||||
/* A trivial filter that logs all email to a file. */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sysexits.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "libmilter/mfapi.h"
|
||||
|
||||
#ifndef true
|
||||
typedef int bool;
|
||||
# define false 0
|
||||
# define true 1
|
||||
#endif /* ! true */
|
||||
|
||||
struct mlfiPriv
|
||||
{
|
||||
char *mlfi_fname;
|
||||
FILE *mlfi_fp;
|
||||
};
|
||||
|
||||
#define MLFIPRIV ((struct mlfiPriv *) smfi_getpriv(ctx))
|
||||
|
||||
extern sfsistat mlfi_cleanup(SMFICTX *, bool);
|
||||
|
||||
sfsistat
|
||||
mlfi_envfrom(ctx, envfrom)
|
||||
SMFICTX *ctx;
|
||||
char **envfrom;
|
||||
{
|
||||
struct mlfiPriv *priv;
|
||||
int fd = -1;
|
||||
|
||||
/* allocate some private memory */
|
||||
priv = malloc(sizeof *priv);
|
||||
if (priv == NULL)
|
||||
{
|
||||
/* can't accept this message right now */
|
||||
return SMFIS_TEMPFAIL;
|
||||
}
|
||||
memset(priv, '\0', sizeof *priv);
|
||||
|
||||
/* open a file to store this message */
|
||||
priv->mlfi_fname = strdup("/tmp/msg.XXXXXXXX");
|
||||
if (priv->mlfi_fname == NULL)
|
||||
{
|
||||
free(priv);
|
||||
return SMFIS_TEMPFAIL;
|
||||
}
|
||||
if ((fd = mkstemp(priv->mlfi_fname)) < 0 ||
|
||||
(priv->mlfi_fp = fdopen(fd, "w+")) == NULL)
|
||||
{
|
||||
if (fd >= 0)
|
||||
(void) close(fd);
|
||||
free(priv->mlfi_fname);
|
||||
free(priv);
|
||||
return SMFIS_TEMPFAIL;
|
||||
}
|
||||
|
||||
/* save the private data */
|
||||
smfi_setpriv(ctx, priv);
|
||||
|
||||
/* continue processing */
|
||||
return SMFIS_CONTINUE;
|
||||
}
|
||||
|
||||
sfsistat
|
||||
mlfi_header(ctx, headerf, headerv)
|
||||
SMFICTX *ctx;
|
||||
char *headerf;
|
||||
char *headerv;
|
||||
{
|
||||
/* write the header to the log file */
|
||||
fprintf(MLFIPRIV->mlfi_fp, "%s: %s\r\n", headerf, headerv);
|
||||
|
||||
/* continue processing */
|
||||
return SMFIS_CONTINUE;
|
||||
}
|
||||
|
||||
sfsistat
|
||||
mlfi_eoh(ctx)
|
||||
SMFICTX *ctx;
|
||||
{
|
||||
/* output the blank line between the header and the body */
|
||||
fprintf(MLFIPRIV->mlfi_fp, "\r\n");
|
||||
|
||||
/* continue processing */
|
||||
return SMFIS_CONTINUE;
|
||||
}
|
||||
|
||||
sfsistat
|
||||
mlfi_body(ctx, bodyp, bodylen)
|
||||
SMFICTX *ctx;
|
||||
u_char *bodyp;
|
||||
size_t bodylen;
|
||||
{
|
||||
/* output body block to log file */
|
||||
if (fwrite(bodyp, bodylen, 1, MLFIPRIV->mlfi_fp) <= 0)
|
||||
{
|
||||
/* write failed */
|
||||
(void) mlfi_cleanup(ctx, false);
|
||||
return SMFIS_TEMPFAIL;
|
||||
}
|
||||
|
||||
/* continue processing */
|
||||
return SMFIS_CONTINUE;
|
||||
}
|
||||
|
||||
sfsistat
|
||||
mlfi_eom(ctx)
|
||||
SMFICTX *ctx;
|
||||
{
|
||||
return mlfi_cleanup(ctx, true);
|
||||
}
|
||||
|
||||
sfsistat
|
||||
mlfi_close(ctx)
|
||||
SMFICTX *ctx;
|
||||
{
|
||||
return SMFIS_ACCEPT;
|
||||
}
|
||||
|
||||
sfsistat
|
||||
mlfi_abort(ctx)
|
||||
SMFICTX *ctx;
|
||||
{
|
||||
return mlfi_cleanup(ctx, false);
|
||||
}
|
||||
|
||||
sfsistat
|
||||
mlfi_cleanup(ctx, ok)
|
||||
SMFICTX *ctx;
|
||||
bool ok;
|
||||
{
|
||||
sfsistat rstat = SMFIS_CONTINUE;
|
||||
struct mlfiPriv *priv = MLFIPRIV;
|
||||
char *p;
|
||||
char host[512];
|
||||
char hbuf[1024];
|
||||
|
||||
if (priv == NULL)
|
||||
return rstat;
|
||||
|
||||
/* close the archive file */
|
||||
if (priv->mlfi_fp != NULL && fclose(priv->mlfi_fp) == EOF)
|
||||
{
|
||||
/* failed; we have to wait until later */
|
||||
rstat = SMFIS_TEMPFAIL;
|
||||
(void) unlink(priv->mlfi_fname);
|
||||
}
|
||||
else if (ok)
|
||||
{
|
||||
/* add a header to the message announcing our presence */
|
||||
if (gethostname(host, sizeof host) < 0)
|
||||
snprintf(host, sizeof host, "localhost");
|
||||
p = strrchr(priv->mlfi_fname, '/');
|
||||
if (p == NULL)
|
||||
p = priv->mlfi_fname;
|
||||
else
|
||||
p++;
|
||||
snprintf(hbuf, sizeof hbuf, "%s@%s", p, host);
|
||||
smfi_addheader(ctx, "X-Archived", hbuf);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* message was aborted -- delete the archive file */
|
||||
(void) unlink(priv->mlfi_fname);
|
||||
}
|
||||
|
||||
/* release private memory */
|
||||
free(priv->mlfi_fname);
|
||||
free(priv);
|
||||
smfi_setpriv(ctx, NULL);
|
||||
|
||||
/* return status */
|
||||
return rstat;
|
||||
}
|
||||
|
||||
struct smfiDesc smfilter =
|
||||
{
|
||||
"SampleFilter", /* filter name */
|
||||
SMFI_VERSION, /* version code -- do not change */
|
||||
SMFIF_ADDHDRS, /* flags */
|
||||
NULL, /* connection info filter */
|
||||
NULL, /* SMTP HELO command filter */
|
||||
mlfi_envfrom, /* envelope sender filter */
|
||||
NULL, /* envelope recipient filter */
|
||||
mlfi_header, /* header filter */
|
||||
mlfi_eoh, /* end of header */
|
||||
mlfi_body, /* body block filter */
|
||||
mlfi_eom, /* end of message */
|
||||
mlfi_abort, /* message aborted */
|
||||
mlfi_close /* connection cleanup */
|
||||
};
|
||||
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
bool setconn = false;
|
||||
int c;
|
||||
const char *args = "p:";
|
||||
|
||||
/* Process command line options */
|
||||
while ((c = getopt(argc, argv, args)) != -1)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case 'p':
|
||||
if (optarg == NULL || *optarg == '\0')
|
||||
{
|
||||
(void) fprintf(stderr, "Illegal conn: %s\n",
|
||||
optarg);
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
(void) smfi_setconn(optarg);
|
||||
setconn = true;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
if (!setconn)
|
||||
{
|
||||
fprintf(stderr, "%s: Missing required -p argument\n", argv[0]);
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
if (smfi_register(smfilter) == MI_FAILURE)
|
||||
{
|
||||
fprintf(stderr, "smfi_register failed\n");
|
||||
exit(EX_UNAVAILABLE);
|
||||
}
|
||||
return smfi_main();
|
||||
}
|
||||
|
||||
/* eof */
|
||||
|
||||
$Revision: 8.40 $, Last updated $Date: 2003/12/11 18:14:34 $
|
||||
@@ -9,13 +9,12 @@
|
||||
*/
|
||||
|
||||
#include <sm/gen.h>
|
||||
SM_RCSID("@(#)$Id: comm.c,v 8.67 2006/11/02 17:54:44 ca Exp $")
|
||||
SM_RCSID("@(#)$Id: comm.c,v 8.65 2004/07/07 21:41:30 ca Exp $")
|
||||
|
||||
#include "libmilter.h"
|
||||
#include <sm/errstring.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
static ssize_t retry_writev __P((socket_t, struct iovec *, int, struct timeval *));
|
||||
static size_t Maxdatasize = MILTER_MAX_DATA_SIZE;
|
||||
|
||||
#if _FFR_MAXDATASIZE
|
||||
@@ -352,7 +351,7 @@ mi_wr_cmd(sd, timeout, cmd, buf, len)
|
||||
iov[1].iov_len = len;
|
||||
iovcnt = 2;
|
||||
}
|
||||
|
||||
|
||||
l = retry_writev(sd, iov, iovcnt, timeout);
|
||||
if (l == MI_FAILURE)
|
||||
return MI_FAILURE;
|
||||
|
||||
@@ -1,320 +1,233 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>Milter API</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>Milter API</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: api.html,v 1.35 2006/11/30 23:09:23 ca Exp $
|
||||
$Id: api.html,v 1.18 2004/04/28 23:26:51 msk Exp $
|
||||
-->
|
||||
<H1>Milter API</H1>
|
||||
<h1>Milter API</h1>
|
||||
|
||||
<H2>Contents</H2>
|
||||
<UL>
|
||||
<LI><A HREF="#LibraryControlFunctions">Library Control Functions</A>
|
||||
<LI><A HREF="#DataAccessFunctions">Data Access Functions</A>
|
||||
<LI><A HREF="#MessageModificationFunctions">Message Modification Functions</A>
|
||||
<LI><A HREF="#Callbacks">Callbacks</A>
|
||||
<LI><A HREF="#Miscellaneous">Miscellaneous</A>
|
||||
</UL>
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li>Library Control Functions
|
||||
<li>Data Access Functions
|
||||
<li>Message Modification Functions
|
||||
<li>Callbacks
|
||||
</ul>
|
||||
|
||||
<H2><A NAME="LibraryControlFunctions">Library Control Functions</A></H2>
|
||||
<h2>Library Control Functions</h2>
|
||||
|
||||
Before handing control to libmilter (by calling
|
||||
<A HREF="smfi_main.html">smfi_main</A>), a filter may call the following
|
||||
functions to set libmilter parameters.
|
||||
In particular, the filter must call
|
||||
<A HREF="smfi_register.html">smfi_register</A> to register its callbacks.
|
||||
Each function will return either MI_SUCCESS or MI_FAILURE to
|
||||
Before handing control to libmilter (by calling <a
|
||||
href="smfi_main.html">smfi_main</a>), a filter may call the following
|
||||
functions to set libmilter parameters. In particular, the filter must
|
||||
call <a href="smfi_register.html">smfi_register</a> to register its
|
||||
callbacks. Each function will return either MI_SUCCESS or MI_FAILURE to
|
||||
indicate the status of the operation.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
None of these functions communicate with the MTA. All alter the
|
||||
library's state, some of which is communicated to the MTA inside
|
||||
<A HREF="smfi_main.html">smfi_main</A>.
|
||||
library's state, some of which is communicated to the MTA inside <a
|
||||
href="smfi_main.html">smfi_main</a>.
|
||||
<p>
|
||||
<table border="1" cellspacing=0 cellpadding=2><tr bgcolor="#dddddd"><th>Function</th><th>Description</th></tr>
|
||||
|
||||
<P>
|
||||
<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=2><TR BGCOLOR="#dddddd"><TH>Function</TH><TH>Description</TH></TR>
|
||||
<tr><td><a href="smfi_opensocket.html">smfi_opensocket</a></td><td>Try to create the interface socket.</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_opensocket.html">smfi_opensocket</A></TD><TD>Try to create the interface socket.</TD></TR>
|
||||
<tr><td><a href="smfi_register.html">smfi_register</a></td><td>Register a filter.</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_register.html">smfi_register</A></TD><TD>Register a filter.</TD></TR>
|
||||
<tr><td><a href="smfi_setconn.html">smfi_setconn</a></td><td>Specify socket to use.</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_setconn.html">smfi_setconn</A></TD><TD>Specify socket to use.</TD></TR>
|
||||
<tr><td><a href="smfi_settimeout.html">smfi_settimeout</a></td><td>Set timeout.</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_settimeout.html">smfi_settimeout</A></TD><TD>Set timeout.</TD></TR>
|
||||
<tr><td><a href="smfi_setbacklog.html">smfi_setbacklog</a></td><td>Define the incoming <i>listen</i>(2) queue size.</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_setbacklog.html">smfi_setbacklog</A></TD><TD>Define the incoming <CODE>listen(2)</CODE> queue size.</TD></TR>
|
||||
<tr><td><a href="smfi_setdbg.html">smfi_setdbg</a></td><td>Set the milter library debugging (tracing) level.</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_setdbg.html">smfi_setdbg</A></TD><TD>Set the milter library debugging (tracing) level.</TD></TR>
|
||||
<tr><td><a href="smfi_stop.html">smfi_stop</a></td><td>Cause an orderly shutdown.</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_stop.html">smfi_stop</A></TD><TD>Cause an orderly shutdown.</TD></TR>
|
||||
<tr><td><a href="smfi_main.html">smfi_main</a></td><td>Hand control to libmilter.</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_main.html">smfi_main</A></TD><TD>Hand control to libmilter.</TD></TR>
|
||||
</table>
|
||||
|
||||
</TABLE>
|
||||
|
||||
<H2><A NAME="DataAccessFunctions">Data Access Functions</A></H2>
|
||||
<h2>Data Access Functions</h2>
|
||||
|
||||
The following functions may be called from within the filter-defined callbacks
|
||||
to access information about the current connection or message.
|
||||
<P>
|
||||
<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=2><TR bgcolor="#dddddd"><TH>Function</TH><TH>Description</TH></TR>
|
||||
<TR><TD><A HREF="smfi_getsymval.html">smfi_getsymval</A></TD><TD>Return the value
|
||||
of a symbol.</TD></TR>
|
||||
<p>
|
||||
<table border="1" cellspacing=0 cellpadding=2><tr bgcolor="#dddddd"><th>Function</th><th>Description</th></tr>
|
||||
<tr><td><a href="smfi_getsymval.html">smfi_getsymval</a></td><td>Return the value
|
||||
of a symbol.</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_getpriv.html">smfi_getpriv</A></TD><TD>Get the private data
|
||||
pointer.</TD></TR>
|
||||
<tr><td><a href="smfi_getpriv.html">smfi_getpriv</a></td><td>Get the private data
|
||||
pointer.</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_setpriv.html">smfi_setpriv</A></TD><TD>Set the private data
|
||||
pointer.</TD></TR>
|
||||
<tr><td><a href="smfi_setpriv.html">smfi_setpriv</a></td><td>Set the private data
|
||||
pointer.</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_setreply.html">smfi_setreply</A></TD><TD>Set the specific
|
||||
reply code to be used.</TD></TR>
|
||||
<tr><td><a href="smfi_setreply.html">smfi_setreply</a></td><td>Set the specific
|
||||
reply code to be used.</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_setmlreply.html">smfi_setmlreply</A></TD><TD>Set the
|
||||
specific multi-line reply to be used.</TD></TR>
|
||||
<tr><td><a href="smfi_setmlreply.html">smfi_setmlreply</a></td><td>Set the
|
||||
specific multi-line reply to be used.</td></tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<H2><A NAME="MessageModificationFunctions">Message Modification Functions</A></H2>
|
||||
<h2>Message Modification Functions</h2>
|
||||
|
||||
The following functions change a message's contents and attributes.
|
||||
<EM>They may only be called in <A HREF="xxfi_eom.html">xxfi_eom</A></EM>.
|
||||
<b>They may only be called in <a href="xxfi_eom.html">xxfi_eom</a></b>.
|
||||
All of these functions may invoke additional communication with the MTA.
|
||||
They will return either MI_SUCCESS or MI_FAILURE to indicate the status of
|
||||
the operation.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
A filter must have set the appropriate flag (listed below) in the
|
||||
description passed to <A HREF="smfi_register.html">smfi_register</A>
|
||||
description passed to <a href="smfi_register.html">smfi_register</a>
|
||||
to call any message modification function. Failure to do so will
|
||||
cause the MTA to treat a call to the function as a failure of the
|
||||
filter, terminating its connection.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
Note that the status returned indicates only whether or not the
|
||||
filter's message was successfully sent to the MTA, not whether or not
|
||||
the MTA performed the requested operation. For example,
|
||||
<A HREF="smfi_addheader.html">smfi_addheader</A>, when called with an
|
||||
the MTA performed the requested operation. For example, <a
|
||||
href="smfi_addheader.html">smfi_addheader</a>, when called with an
|
||||
illegal header name, will return MI_SUCCESS even though the MTA may
|
||||
later refuse to add the illegal header.
|
||||
<P>
|
||||
<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=2><TR BGCOLOR="#dddddd"><TH>Function</TH><TH>Description</TH><TH>SMFIF_* flag</TR>
|
||||
<TR><TD><A HREF="smfi_addheader.html">smfi_addheader</A></TD><TD>Add a header to
|
||||
the message.</TD><TD>SMFIF_ADDHDRS</TD></TR>
|
||||
<p>
|
||||
<table border="1" cellspacing=0 cellpadding=2><tr bgcolor="#dddddd"><th>Function</th><th>Description</th><th>SMFIF_* flag</tr>
|
||||
<tr><td><a href="smfi_addheader.html">smfi_addheader</a></td><td>Add a header to
|
||||
the message.</td><td>SMFIF_ADDHDRS</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_chgheader.html">smfi_chgheader</A></TD><TD>Change or delete a header.</TD><TD>SMFIF_CHGHDRS</TD></TR>
|
||||
<tr><td><a href="smfi_chgheader.html">smfi_chgheader</a></td><td>Change or delete a header.</td><td>SMFIF_CHGHDRS</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_insheader.html">smfi_insheader</A></TD><TD>Insert a
|
||||
header into the message.</TD><TD>SMFIF_ADDHDRS</TD></TR>
|
||||
<tr><td><a href="smfi_insheader.html">smfi_insheader</a></td><td>Insert a
|
||||
header into the message.</td><td>SMFIF_ADDHDRS</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_chgfrom.html">smfi_chgfrom</A></TD><TD>Change the
|
||||
envelope sender address.</TD><TD>SMFIF_CHGFROM</TD></TR>
|
||||
<tr><td><a href="smfi_addrcpt.html">smfi_addrcpt</a></td><td>Add a recipient to
|
||||
the envelope.</td><td>SMFIF_ADDRCPT</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_addrcpt.html">smfi_addrcpt</A></TD><TD>Add a recipient to
|
||||
the envelope.</TD><TD>SMFIF_ADDRCPT</TD></TR>
|
||||
<tr><td><a href="smfi_delrcpt.html">smfi_delrcpt</a></td><td>Delete a recipient
|
||||
from the envelope.</td><td>SMFIF_DELRCPT</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_addrcpt_par.html">smfi_addrcpt_par</A></TD><TD>Add
|
||||
a recipient including ESMTP parameter to the envelope.
|
||||
</TD><TD>SMFIF_ADDRCPT_PAR</TD></TR>
|
||||
<tr><td><a href="smfi_replacebody.html">smfi_replacebody</a></td><td>Replace the
|
||||
body of the message.</td><td>SMFIF_CHGBODY</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_delrcpt.html">smfi_delrcpt</A></TD><TD>Delete a recipient
|
||||
from the envelope.</TD><TD>SMFIF_DELRCPT</TD></TR>
|
||||
</table>
|
||||
|
||||
<TR><TD><A HREF="smfi_replacebody.html">smfi_replacebody</A></TD><TD>Replace the
|
||||
body of the message.</TD><TD>SMFIF_CHGBODY</TD></TR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
<H2>Other Message Handling Functions</H2>
|
||||
<h2>Other Message Handling Functions</h2>
|
||||
|
||||
The following functions provide special case handling instructions for
|
||||
milter or the MTA, without altering the content or status of the message.
|
||||
<EM>They too may only be called in <A HREF="xxfi_eom.html">xxfi_eom</A></EM>.
|
||||
<b>They too may only be called in <a href="xxfi_eom.html">xxfi_eom</a></b>.
|
||||
All of these functions may invoke additional communication with the MTA.
|
||||
They will return either MI_SUCCESS or MI_FAILURE to indicate the status of
|
||||
the operation.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
Note that the status returned indicates only whether or not the
|
||||
filter's message was successfully sent to the MTA, not whether or not
|
||||
the MTA performed the requested operation.
|
||||
|
||||
<P>
|
||||
<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=2><TR BGCOLOR="#dddddd"><TH>Function</TH><TH>Description</TH></TR>
|
||||
<TR><TD><A HREF="smfi_progress.html">smfi_progress</A></TD><TD>Report operation in progress.</TD></TR>
|
||||
<p>
|
||||
<table border="1" cellspacing=0 cellpadding=2><tr bgcolor="#dddddd"><th>Function</th><th>Description</th></tr>
|
||||
<tr><td><a href="smfi_progress.html">smfi_progress</a></td><td>Report operation in progress.</td></tr>
|
||||
|
||||
<TR><TD><A HREF="smfi_quarantine.html">smfi_quarantine</A></TD><TD>Quarantine a message.</TD></TR>
|
||||
<tr><td><a href="smfi_quarantine.html">smfi_quarantine</a></td><td>Quarantine a message.</td></tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<H2><A NAME="Callbacks">Callbacks</A></H2>
|
||||
<h2><a name="callbacks">Callbacks</a></h2>
|
||||
|
||||
The filter should implement one or more of the following callbacks,
|
||||
which are registered via <A HREF="smfi_register.html">smfi_register</A>:
|
||||
which are registered via <a href="smfi_register.html">smfi_register</a>:
|
||||
<p>
|
||||
<table border="1" cellspacing=0 cellpadding=2><tr bgcolor="#dddddd"><th>Function</th><th>Description</th></tr>
|
||||
|
||||
<P>
|
||||
<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=2><TR BGCOLOR="#dddddd"><TH>Function</TH><TH>Description</TH></TR>
|
||||
<tr><td><a href="xxfi_connect.html">xxfi_connect</a></td><td>connection info</td></tr>
|
||||
|
||||
<TR><TD><A HREF="xxfi_connect.html">xxfi_connect</A></TD><TD>connection info</TD></TR>
|
||||
<tr><td><a href="xxfi_helo.html">xxfi_helo</a></td><td>SMTP HELO/EHLO command</td></tr>
|
||||
|
||||
<TR><TD><A HREF="xxfi_helo.html">xxfi_helo</A></TD><TD>SMTP HELO/EHLO command</TD></TR>
|
||||
<tr><td><a href="xxfi_envfrom.html">xxfi_envfrom</a></td><td>envelope sender</td></tr>
|
||||
|
||||
<TR><TD><A HREF="xxfi_envfrom.html">xxfi_envfrom</A></TD><TD>envelope sender</TD></TR>
|
||||
<tr><td><a href="xxfi_envrcpt.html">xxfi_envrcpt</a></td><td>envelope recipient</td></tr>
|
||||
|
||||
<TR><TD><A HREF="xxfi_envrcpt.html">xxfi_envrcpt</A></TD><TD>envelope recipient</TD></TR>
|
||||
<tr><td><a href="xxfi_header.html">xxfi_header</a></td><td>header</td></tr>
|
||||
|
||||
<TR><TD><A HREF="xxfi_data.html">xxfi_data</A></TD><TD>DATA command</TD></TR>
|
||||
<tr><td><a href="xxfi_eoh.html">xxfi_eoh</a></td><td>end of header</td></tr>
|
||||
|
||||
<TR><TD><A HREF="xxfi_unknown.html">xxfi_unknown</A></TD><TD>Unknown SMTP command</TD></TR>
|
||||
<tr><td><a href="xxfi_body.html">xxfi_body</a></td><td>body block</td></tr>
|
||||
|
||||
<TR><TD><A HREF="xxfi_header.html">xxfi_header</A></TD><TD>header</TD></TR>
|
||||
<tr><td><a href="xxfi_eom.html">xxfi_eom</a></td><td>end of message</td></tr>
|
||||
|
||||
<TR><TD><A HREF="xxfi_eoh.html">xxfi_eoh</A></TD><TD>end of header</TD></TR>
|
||||
<tr><td><a href="xxfi_abort.html">xxfi_abort</a></td><td>message aborted</td></tr>
|
||||
|
||||
<TR><TD><A HREF="xxfi_body.html">xxfi_body</A></TD><TD>body block</TD></TR>
|
||||
<tr><td><a href="xxfi_close.html">xxfi_close</a></td><td>connection cleanup</td></tr>
|
||||
|
||||
<TR><TD><A HREF="xxfi_eom.html">xxfi_eom</A></TD><TD>end of message</TD></TR>
|
||||
</table>
|
||||
|
||||
<TR><TD><A HREF="xxfi_abort.html">xxfi_abort</A></TD><TD>message aborted</TD></TR>
|
||||
|
||||
<TR><TD><A HREF="xxfi_close.html">xxfi_close</A></TD><TD>connection cleanup</TD></TR>
|
||||
|
||||
<TR><TD><A HREF="xxfi_negotiate.html">xxfi_negotiate</A></TD><TD>option negotiattion</TD></TR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
The above callbacks should all return one of the following return values,
|
||||
having the indicated meanings. Any return other than one of the below
|
||||
values constitutes an error, and will cause sendmail to terminate its
|
||||
connection to the offending filter.
|
||||
|
||||
<P><A NAME="conn-spec">Milter</A> distinguishes between recipient-,
|
||||
<p><a name="conn-spec">Milter</a> distinguishes between recipient-,
|
||||
message-, and connection-oriented routines. Recipient-oriented
|
||||
callbacks may affect the processing of a single message recipient;
|
||||
message-oriented callbacks, a single message; connection-oriented
|
||||
callbacks, an entire connection (during which multiple messages may be
|
||||
delivered to multiple sets of recipients).
|
||||
<A HREF="xxfi_envrcpt.html">xxfi_envrcpt</A> is recipient-oriented.
|
||||
<A HREF="xxfi_connect.html">xxfi_connect</A>,
|
||||
<A HREF="xxfi_helo.html">xxfi_helo</A> and
|
||||
<A HREF="xxfi_close.html">xxfi_close</A> are connection-oriented. All
|
||||
<a href="xxfi_envrcpt.html">xxfi_envrcpt</a> is recipient-oriented.
|
||||
<a href="xxfi_connect.html">xxfi_connect</a>,
|
||||
<a href="xxfi_helo.html">xxfi_helo</a> and
|
||||
<a href="xxfi_close.html">xxfi_close</a> are connection-oriented. All
|
||||
other callbacks are message-oriented.
|
||||
|
||||
<P>
|
||||
<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=2>
|
||||
<TR BGCOLOR="#dddddd"><TH>Return value</TH><TH>Description</TH></TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD>SMFIS_CONTINUE</TD>
|
||||
<TD>Continue processing the current connection, message, or recipient.
|
||||
</TD>
|
||||
</TR>
|
||||
<TR VALIGN="TOP">
|
||||
<TD>SMFIS_REJECT</TD>
|
||||
<TD>For a connection-oriented routine, reject this connection; call <A HREF="xxfi_close.html">xxfi_close</A>.<BR>
|
||||
<p>
|
||||
<table border="1" cellspacing=0 cellpadding=2>
|
||||
<tr bgcolor="#dddddd"><th>Return value</th><th>Description</th></tr>
|
||||
<tr valign="top">
|
||||
<td>SMFIS_CONTINUE</td>
|
||||
<td>Continue processing the current connection, message, or recipient.
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>SMFIS_REJECT</td>
|
||||
<td>For a connection-oriented routine, reject this connection; call <a href="xxfi_close.html">xxfi_close</a>.<br>
|
||||
For a message-oriented routine (except
|
||||
<A HREF="xxfi_eom.html">xxfi_eom</A> or
|
||||
<A HREF="xxfi_abort.html">xxfi_abort</A>), reject this message.<BR>
|
||||
<a href="xxfi_eom.html">xxfi_eom</a> or
|
||||
<a href="xxfi_abort.html">xxfi_abort</a>), reject this message.<br>
|
||||
For a recipient-oriented routine, reject the current recipient (but continue processing the current message).
|
||||
</TD>
|
||||
</TR>
|
||||
<TR valign="top">
|
||||
<TD>SMFIS_DISCARD</TD>
|
||||
<TD>For a message- or recipient-oriented routine, accept this message, but silently discard it.<BR>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>SMFIS_DISCARD</td>
|
||||
<td>For a message- or recipient-oriented routine, accept this message, but silently discard it.<br>
|
||||
SMFIS_DISCARD should not be returned by a connection-oriented routine.
|
||||
</TD>
|
||||
</TR>
|
||||
<TR valign="top">
|
||||
<TD>SMFIS_ACCEPT</TD>
|
||||
<TD>For a connection-oriented routine, accept this connection without further filter processing; call <A HREF="xxfi_close.html">xxfi_close</A>.<BR>
|
||||
For a message- or recipient-oriented routine, accept this message without further filtering.<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR valign="top">
|
||||
<TD>SMFIS_TEMPFAIL</TD>
|
||||
<TD>Return a temporary failure, i.e., the corresponding SMTP command will return an appropriate 4xx status code.
|
||||
For a message-oriented routine (except <A HREF="xxfi_envfrom.html">xxfi_envfrom</A>), fail for this message. <BR>
|
||||
For a connection-oriented routine, fail for this connection; call <A HREF="xxfi_close.html">xxfi_close</A>. <BR>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>SMFIS_ACCEPT</td>
|
||||
<td>For a connection-oriented routine, accept this connection without further filter processing; call <a href="xxfi_close.html">xxfi_close</a>.<br>
|
||||
For a message- or recipient-oriented routine, accept this message without further filtering.<br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>SMFIS_TEMPFAIL</td>
|
||||
<td>Return a temporary failure, i.e., the corresponding SMTP command will return an appropriate 4xx status code.
|
||||
For a message-oriented routine (except <a href="xxfi_envfrom.html">xxfi_envfrom</a>), fail for this message. <br>
|
||||
For a connection-oriented routine, fail for this connection; call <a href="xxfi_close.html">xxfi_close</a>. <br>
|
||||
For a recipient-oriented routine, only fail for the current recipient; continue message processing.
|
||||
</TD>
|
||||
</TR>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<TR valign="top">
|
||||
<TD><A NAME="SMFIS_SKIP">SMFIS_SKIP</A></TD>
|
||||
<TD>Skip further callbacks of the same type in this transaction.
|
||||
Currently this return value is only allowed in
|
||||
<A HREF="xxfi_body.html">xxfi_body()</A>.
|
||||
It can be used if a milter has received sufficiently many
|
||||
body chunks to make a decision, but still wants to invoke
|
||||
message modification functions that are only allowed to be called from
|
||||
<A HREF="xxfi_eom.html">xxfi_eom()</A>.
|
||||
Note: the milter <EM>must</EM>
|
||||
<A HREF="xxfi_negotiate.html">negotiate</A>
|
||||
this behavior with the MTA, i.e., it must check whether
|
||||
the protocol action
|
||||
<A HREF="xxfi_negotiate.html#SMFIP_SKIP"><CODE>SMFIP_SKIP</CODE></A>
|
||||
is available and if so, the milter must request it.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR valign="top">
|
||||
<TD><A NAME="SMFIS_NOREPLY">SMFIS_NOREPLY</A></TD>
|
||||
<TD>Do not send a reply back to the MTA.
|
||||
The milter <EM>must</EM>
|
||||
<A HREF="xxfi_negotiate.html">negotiate</A>
|
||||
this behavior with the MTA, i.e., it must check whether
|
||||
the appropriate protocol action
|
||||
<A HREF="xxfi_negotiate.html#SMFIP_NR_"><CODE>SMFIP_NR_*</CODE></A>
|
||||
is available and if so, the milter must request it.
|
||||
If you set the
|
||||
<A HREF="xxfi_negotiate.html#SMFIP_NR_"><CODE>SMFIP_NR_*</CODE></A>
|
||||
protocol action for a callback, that callback <EM>must</EM>
|
||||
always reply with
|
||||
SMFIS_NOREPLY.
|
||||
Using any other reply code is a violation of the API.
|
||||
If in some cases your callback may return another value
|
||||
(e.g., due to some resource shortages), then you
|
||||
<EM>must not</EM> set
|
||||
<A HREF="xxfi_negotiate.html#SMFIP_NR_"><CODE>SMFIP_NR_*</CODE></A>
|
||||
and you must use
|
||||
SMFIS_CONTINUE as the default return code.
|
||||
(Alternatively you can try to delay reporting the problem to
|
||||
a later callback for which
|
||||
<A HREF="xxfi_negotiate.html#SMFIP_NR_"><CODE>SMFIP_NR_*</CODE></A>
|
||||
is not set.)
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
<H2><A NAME="Miscellaneous">Miscellaneous</A></H2>
|
||||
|
||||
<P>
|
||||
<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=2><TR BGCOLOR="#dddddd"><TH>Function</TH><TH>Description</TH></TR>
|
||||
|
||||
<TR><TD><A HREF="smfi_version.html">smfi_version</A></TD><TD>libmilter (runtime) version info</TD></TR>
|
||||
|
||||
<TR><TD><A HREF="smfi_setsymlist.html">smfi_setsymlist</A></TD><TD>
|
||||
Set the list of macros that the milter wants to receive from the MTA
|
||||
for a protocol stage.
|
||||
</TD></TR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=2><TR BGCOLOR="#dddddd"><TH>Constant</TH><TH>Description</TH></TR>
|
||||
|
||||
<TR><TD><A HREF="smfi_version.html">SMFI_VERSION</A></TD><TD>libmilter (compile time) version info</TD></TR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
|
||||
<HR SIZE="1">
|
||||
<FONT SIZE="-1">
|
||||
Copyright (c) 2000, 2003, 2006 Sendmail, Inc. and its suppliers.
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,23 +1,23 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Architecture</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head>
|
||||
<title>Architecture</title>
|
||||
</head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: design.html,v 1.12 2006/08/08 20:55:57 ca Exp $
|
||||
$Id: design.html,v 1.11 2003/03/05 19:57:54 ca Exp $
|
||||
-->
|
||||
|
||||
<H1>Architecture</H1>
|
||||
<h1>Architecture</h1>
|
||||
|
||||
<H2>Contents</H2>
|
||||
<h2>Contents</h2>
|
||||
|
||||
<UL>
|
||||
<LI>Design Goals
|
||||
<LI>Implementing Filtering Policies
|
||||
<LI>MTA - Filter Communication
|
||||
</UL>
|
||||
<ul>
|
||||
<li>Design Goals
|
||||
<li>Implementing Filtering Policies
|
||||
<li>MTA - Filter Communication
|
||||
</ul>
|
||||
|
||||
<H2>Goals</H2>
|
||||
<h2>Goals</h2>
|
||||
|
||||
The Sendmail Content Management API (Milter) provides an interface for
|
||||
third-party software to validate and modify messages as they pass
|
||||
@@ -28,7 +28,7 @@ recipients, headers, and body. The MTA configuration file specifies
|
||||
which filters are to be applied, and in what order, allowing an
|
||||
administrator to combine multiple independently-developed filters.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
We expect to see both vendor-supplied, configurable mail filtering
|
||||
applications and a multiplicity of script-like filters designed by and
|
||||
for MTA administrators. A certain degree of coding sophistication and
|
||||
@@ -37,7 +37,7 @@ allows filters to exercise fine-grained control at the SMTP level.
|
||||
However, as will be seen in the example, many filtering applications
|
||||
can be written with relatively little protocol knowledge.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
Given these expectations, the API is designed to achieve the following
|
||||
goals:
|
||||
|
||||
@@ -47,7 +47,7 @@ goals:
|
||||
(of course, they can if required, but that is a local issue);
|
||||
this will simplify coding
|
||||
and limit the impact of security flaws in the filter program.
|
||||
<P>
|
||||
<p>
|
||||
<LI>Reliability.
|
||||
Coding failures in a Milter process that cause that process
|
||||
to hang or core-dump
|
||||
@@ -59,7 +59,7 @@ goals:
|
||||
The latter failure mode will generally have sendmail return
|
||||
a 4xx SMTP code (although in later phases of the SMTP protocol
|
||||
it may cause the mail to be queued for later processing).
|
||||
<P>
|
||||
<p>
|
||||
<LI>Simplicity.
|
||||
The API should make implementation of a new filter
|
||||
no more difficult than absolutely necessary.
|
||||
@@ -70,12 +70,12 @@ goals:
|
||||
<LI>Provide all interfaces required
|
||||
while avoiding unnecessary pedanticism.
|
||||
</UL>
|
||||
<P>
|
||||
<p>
|
||||
<LI>Performance.
|
||||
Simple filters should not seriously impact overall MTA performance.
|
||||
</OL>
|
||||
|
||||
<H2>Implementing Filtering Policies</H2>
|
||||
<h2>Implementing Filtering Policies</h2>
|
||||
|
||||
Milter is designed to allow a server administrator to combine
|
||||
third-party filters to implement a desired mail filtering policy. For
|
||||
@@ -87,16 +87,16 @@ engine, then via a large-scale spam-catching service, and finally
|
||||
append the desired footer if the message still met requisite criteria.
|
||||
Any of these filters could be added or changed independently.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
Thus the site administrator, not the filter writer, controls the
|
||||
overall mail filtering environment. In particular, he/she must decide
|
||||
which filters are run, in what order they are run, and how they
|
||||
communicate with the MTA. These parameters, as well as the
|
||||
actions to be taken if a filter becomes unavailable, are selectable
|
||||
during MTA configuration. <A href="installation.html">Further
|
||||
details</A> are available later in this document.
|
||||
during MTA configuration. <a href="installation.html">Further
|
||||
details</a> are available later in this document.
|
||||
|
||||
<H2>MTA - Filter communication</H2>
|
||||
<h2>MTA - Filter communication</h2>
|
||||
|
||||
Filters run as separate processes, outside of the sendmail address
|
||||
space. The benefits of this are threefold:
|
||||
@@ -112,36 +112,36 @@ space. The benefits of this are threefold:
|
||||
the parallelism inherent in multiple processes.</LI>
|
||||
</OL>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
Each filter may communicate with multiple MTAs at the same time over
|
||||
local or remote connections, using multiple threads of execution.
|
||||
<A HREF="#figure-1">Figure 1</A> illustrates a possible network of
|
||||
local or remote connections, using multiple threads of execution. <a
|
||||
href="#figure-1">Figure 1</a> illustrates a possible network of
|
||||
communication channels between a site's filters, its MTAs, and other
|
||||
MTAs on the network:
|
||||
</P>
|
||||
<DIV align="center">
|
||||
<A name="figure-1"><IMG src="figure1.jpg" ALT=""></A><BR>
|
||||
<B>Figure 1: A set of MTA's interacting with a set of filters.</B>
|
||||
</DIV>
|
||||
<P>
|
||||
</p>
|
||||
<div align="center">
|
||||
<a name="figure-1"><img src="figure1.jpg" ALT=""></A><br>
|
||||
<b>Figure 1: A set of MTA's interacting with a set of filters.</b>
|
||||
</div>
|
||||
<p>
|
||||
The Milter library (libmilter) implements the communication protocol.
|
||||
It accepts connections from various MTAs, passes the relevant data to
|
||||
the filter through callbacks, then makes appropriate responses based
|
||||
on return codes. A filter may also send data to the MTA as a result
|
||||
of library calls. <A href="#figure-2">Figure 2</A> shows a single
|
||||
of library calls. <a href="#figure-2">Figure 2</a> shows a single
|
||||
filter process processing messages from two MTAs:
|
||||
</P>
|
||||
<DIV align="center">
|
||||
<IMG src="figure2.jpg" ALT=""><BR>
|
||||
<B>Figure 2: A filter handling simultaneous requests from two MTA's.</B>
|
||||
</DIV>
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
</p>
|
||||
<div align="center">
|
||||
<img src="figure2.jpg" ALT=""><br>
|
||||
<b>Figure 2: A filter handling simultaneous requests from two MTA's.</b>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,22 +1,22 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Filtering Mail with Sendmail</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head>
|
||||
<title>Filtering Mail with Sendmail</title>
|
||||
</head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: index.html,v 1.13 2006/08/08 20:55:57 ca Exp $
|
||||
$Id: index.html,v 1.12 2003/03/05 19:57:54 ca Exp $
|
||||
-->
|
||||
|
||||
<H1>Filtering Mail with Sendmail</H1>
|
||||
<h1>Filtering Mail with Sendmail</h1>
|
||||
|
||||
<!--
|
||||
<P><B>Disclaimer</B>:
|
||||
<P><b>Disclaimer</b>:
|
||||
This preliminary API description is provided for review only. This
|
||||
specification may change based on feedback from reviewers, and does
|
||||
not bind Sendmail to offer this functionality in any release.
|
||||
-->
|
||||
|
||||
<H2>Introduction</H2>
|
||||
<h2>Introduction</h2>
|
||||
|
||||
<P>
|
||||
Sendmail's Content Management API (milter) provides third-party
|
||||
@@ -26,67 +26,67 @@ content and meta-information. Filtering policies implemented by
|
||||
Milter-conformant filters may then be centrally configured and
|
||||
composed in an end-user's MTA configuration file.
|
||||
|
||||
<P>
|
||||
<p>
|
||||
Possible uses for filters include spam rejection, virus
|
||||
filtering, and content control. In general, Milter seeks to address
|
||||
site-wide filtering concerns in a scalable way. Individual users' mail
|
||||
filtering needs (e.g. sorting messages by subject) are left to
|
||||
client-level programs such as <A href="http://www.procmail.org">Procmail</A>.
|
||||
client-level programs such as <a href="http://www.procmail.org">Procmail</a>.
|
||||
|
||||
<P>
|
||||
This document is a technical introduction intended for those
|
||||
interested in developing Milter filters. It includes:
|
||||
<UL>
|
||||
<LI>A description of Milter's design goals.
|
||||
<ul>
|
||||
<li>A description of Milter's design goals.
|
||||
|
||||
<LI>An explanation of Milter application architecture, including
|
||||
<li>An explanation of Milter application architecture, including
|
||||
interactions between the support library and user code, and between
|
||||
filters and the MTA.
|
||||
|
||||
<LI>A specification of the C application programming interface.
|
||||
<LI>An example of a simple Milter filter.
|
||||
</UL>
|
||||
<li>A specification of the C application programming interface.
|
||||
<li>An example of a simple Milter filter.
|
||||
</ul>
|
||||
|
||||
<H2>Contents</H2>
|
||||
<h2>Contents</h2>
|
||||
|
||||
<UL>
|
||||
<LI><A href="design.html">Architecture</A>
|
||||
<UL>
|
||||
<LI>Design Goals
|
||||
<LI>Implementing Filtering Policies
|
||||
<LI>MTA - Filter communication
|
||||
</UL>
|
||||
<LI><A href="overview.html">Technical Overview</A>
|
||||
<UL>
|
||||
<LI>Initialization
|
||||
<LI>Control flow
|
||||
<LI>Multithreading
|
||||
<LI>Resource Management
|
||||
<LI>Signal Handling
|
||||
</UL>
|
||||
<LI><A href="api.html">API Documentation</A>
|
||||
<UL>
|
||||
<LI>Library Control Functions
|
||||
<LI>Data Access Functions
|
||||
<LI>Message Modification Functions
|
||||
<LI>Callbacks
|
||||
</UL>
|
||||
<LI><A href="installation.html">Installation and Configuration</A>
|
||||
<UL>
|
||||
<LI>Compiling and Installing Your Filter
|
||||
<LI>Configuring Sendmail
|
||||
</UL>
|
||||
<LI><A href="sample.html">A Sample Filter</A>
|
||||
<!-- <LI><A href="other.html">Other Sources of Information</A> -->
|
||||
</UL>
|
||||
<ul>
|
||||
<li><a href="design.html">Architecture</a>
|
||||
<ul>
|
||||
<li>Design Goals
|
||||
<li>Implementing Filtering Policies
|
||||
<li>MTA - Filter communication
|
||||
</ul>
|
||||
<li><a href="overview.html">Technical Overview</a>
|
||||
<ul>
|
||||
<li>Initialization
|
||||
<li>Control flow
|
||||
<li>Multithreading
|
||||
<li>Resource Management
|
||||
<li>Signal Handling
|
||||
</ul>
|
||||
<li><a href="api.html">API Documentation</a>
|
||||
<ul>
|
||||
<li>Library Control Functions
|
||||
<li>Data Access Functions
|
||||
<li>Message Modification Functions
|
||||
<li>Callbacks
|
||||
</ul>
|
||||
<li><a href="installation.html">Installation and Configuration</a>
|
||||
<ul>
|
||||
<li>Compiling and Installing Your Filter
|
||||
<li>Configuring Sendmail
|
||||
</ul>
|
||||
<li><a href="sample.html">A Sample Filter</a>
|
||||
<!-- <li><a href="other.html">Other Sources of Information</a> -->
|
||||
</ul>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000, 2001, 2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,90 +1,96 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>Installation and Configuration</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>Installation and Configuration</title>
|
||||
</head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: installation.html,v 1.23 2006/08/31 17:16:03 ca Exp $
|
||||
$Id: installation.html,v 1.20 2003/03/05 19:57:54 ca Exp $
|
||||
-->
|
||||
<H1>Installation</H1>
|
||||
<H2>Contents</H2>
|
||||
<UL>
|
||||
<LI><A href="#compile">Compiling and Installing Your Filter</A>
|
||||
<LI><A href="#config">Configuring Sendmail</A>
|
||||
</UL>
|
||||
<h1>Installation</h1>
|
||||
<h2>Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#compile">Compiling and Installing Your Filter</a>
|
||||
<li><a href="#config">Configuring Sendmail</a>
|
||||
</ul>
|
||||
|
||||
<H2><A name="compile">Compiling and Installing Your Filter</A></H2>
|
||||
<h2><a name="compile">Compiling and Installing Your Filter</A></h2>
|
||||
|
||||
To compile a filter, modify the Makefile provided with the sample program, or:
|
||||
<UL>
|
||||
<LI>Put the include and Sendmail directories in your include path
|
||||
<ul>
|
||||
<li>Put the include and Sendmail directories in your include path
|
||||
(e.g. -I/path/to/include -I/path/to/sendmail).
|
||||
|
||||
<LI>Make sure libmilter.a is in your library path, and link your
|
||||
<li>Make sure libmilter.a is in your library path, and link your
|
||||
application with it (e.g. "-lmilter").
|
||||
|
||||
<LI>Compile with pthreads, either by using -pthread for gcc, or
|
||||
<li>Compile with pthreads, either by using -pthread for gcc, or
|
||||
linking with a pthreads support library (-lpthread).
|
||||
</UL>
|
||||
</ul>
|
||||
Your compile command line will look like
|
||||
<PRE>
|
||||
<pre>
|
||||
cc -I/path/to/include -I/path/to/sendmail -c myfile.c
|
||||
</PRE>
|
||||
</pre>
|
||||
and your linking command line will look something like
|
||||
<PRE>
|
||||
<pre>
|
||||
cc -o myfilter [object-files] -L[library-location] -lmilter -pthread
|
||||
</PRE>
|
||||
</pre>
|
||||
|
||||
<H2><A name="config">Configuring Sendmail</A></H2>
|
||||
<H2><a name="config">Configuring Sendmail</A></H2>
|
||||
|
||||
If you use a sendmail version older than 8.13 please see
|
||||
First, you must compile sendmail with MILTER defined.
|
||||
If you use a sendmail version older than 8.12 please see
|
||||
the instructions for your version.
|
||||
The default compilation options for sendmail enable support
|
||||
for milters since 8.13.
|
||||
To do this, add the following lines to your build
|
||||
configuration file (devtools/Site/config.site.m4)
|
||||
<pre>
|
||||
APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER')
|
||||
</pre>
|
||||
|
||||
then type <code>./Build -c</code> in your sendmail directory.
|
||||
|
||||
<P>
|
||||
Next, you must add the desired filters to your sendmail configuration
|
||||
(.mc) file.
|
||||
Mail filters have three equates:
|
||||
The required <CODE>S=</CODE> equate specifies the socket where
|
||||
sendmail should look for the filter; the optional <CODE>F=</CODE> and
|
||||
<CODE>T=</CODE> equates specify flags and timeouts, respectively.
|
||||
All equates names, equate field names, and flag values are case sensitive.
|
||||
The required <code>S=</code> equate specifies the socket where
|
||||
sendmail should look for the filter; The optional <code>F=</code> and
|
||||
<code>T=</code> equates specify flags and timeouts, respectively. All
|
||||
equates names, equate field names, and flag values are case sensitive.
|
||||
|
||||
<P>
|
||||
The current flags (<CODE>F=</CODE>) are:
|
||||
<P>
|
||||
<TABLE cellspacing="1" cellpadding=4 border=1>
|
||||
<TR bgcolor="#dddddd" align=left valign=top>
|
||||
<TH>Flag</TH> <TH align="center">Meaning</TH>
|
||||
The current flags (<code>F=</code>) are:
|
||||
<p>
|
||||
<table cellspacing="1" cellpadding=4 border=1>
|
||||
<tr bgcolor="#dddddd" align=left valign=top>
|
||||
<th>Flag</TH> <th align="center">Meaning</TH>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<tr align="left" valign=top>
|
||||
<TD>R</TD> <TD>Reject connection if filter unavailable</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<tr align="left" valign=top>
|
||||
<TD>T</TD> <TD>Temporary fail connection if filter unavailable</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
If a filter is unavailable or unresponsive and no flags have been
|
||||
specified, the MTA will continue normal handling of the current
|
||||
connection. The MTA will try to contact the filter again on each new
|
||||
connection.
|
||||
The MTA will try to contact the filter again on each new connection.
|
||||
|
||||
<P>
|
||||
There are three fields inside of the <CODE>T=</CODE> equate: S, R, and E.
|
||||
Note the separator between each is a ";" (semicolon), as ","
|
||||
(comma) already separates equates.
|
||||
The value of each field is a decimal number followed by a single letter
|
||||
designating the units ("s" for seconds, "m" for minutes).
|
||||
The fields have the following meanings:
|
||||
<P>
|
||||
There are three fields inside of the <code>T=</code> equate: S, R, and
|
||||
E. Note the separator between each is a ";" (semicolon), as ","
|
||||
(comma) already separates equates. The value of each field is a
|
||||
decimal number followed by a single letter designating the units ("s"
|
||||
for seconds, "m" for minutes). The fields have the following
|
||||
meanings:
|
||||
<p>
|
||||
<TABLE cellspacing="1" cellpadding=4 border=1>
|
||||
<TR bgcolor="#dddddd" align=left valign=top>
|
||||
<TH>Flag</TH> <TH align="center">Meaning</TH>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TD>C</TD> <TD>Timeout for connecting to a filter. If set to 0, the
|
||||
system's <CODE>connect(2)</CODE> timeout will be used.
|
||||
system's <CODE>connect()</CODE> timeout will be used.
|
||||
Default: 5m</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
@@ -100,28 +106,27 @@ The fields have the following meanings:
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
The following sendmail.mc example specifies three filters.
|
||||
The first two rendezvous on Unix-domain sockets in the /var/run directory;
|
||||
the third uses an IP socket on port 999.
|
||||
<PRE>
|
||||
<p>
|
||||
The following sendmail.mc example specifies three filters. The first
|
||||
two rendezvous on Unix-domain sockets in the /var/run directory; the
|
||||
third uses an IP socket on port 999.
|
||||
<pre>
|
||||
INPUT_MAIL_FILTER(`filter1', `S=unix:/var/run/f1.sock, F=R')
|
||||
INPUT_MAIL_FILTER(`filter2', `S=unix:/var/run/f2.sock, F=T, T=S:1s;R:1s;E:5m')
|
||||
INPUT_MAIL_FILTER(`filter3', `S=inet:999@localhost, T=C:2m')
|
||||
|
||||
define(`confINPUT_MAIL_FILTERS', `filter2,filter1,filter3')
|
||||
<HR width="30%">
|
||||
<hr width="30%">
|
||||
m4 ../m4/cf.m4 myconfig.mc > myconfig.cf
|
||||
</PRE>
|
||||
</pre>
|
||||
By default, the filters would be run in the order declared,
|
||||
i.e. "filter1, filter2, filter3"; however, since
|
||||
<CODE>confINPUT_MAIL_FILTERS</CODE> is defined, the filters will be
|
||||
run "filter2, filter1, filter3".
|
||||
Also note that a filter can be defined
|
||||
without adding it to the input filter list by using
|
||||
<code>confINPUT_MAIL_FILTERS</code> is defined, the filters will be
|
||||
run "filter2, filter1, filter3". Also note that a filter can be
|
||||
defined without adding it to the input filter list by using
|
||||
MAIL_FILTER() instead of INPUT_MAIL_FILTER().
|
||||
|
||||
<P>
|
||||
<p>
|
||||
The above macros will result in the following lines being added to
|
||||
your .cf file:
|
||||
<PRE>
|
||||
@@ -131,35 +136,34 @@ your .cf file:
|
||||
|
||||
O InputMailFilters=filter2,filter1,filter3
|
||||
</PRE>
|
||||
<P>
|
||||
Finally, the sendmail macros accessible via
|
||||
<A HREF="smfi_getsymval.html">smfi_getsymval</A> can be configured by
|
||||
<p>
|
||||
Finally, the sendmail macros accessible via <a
|
||||
href="smfi_getsymval.html">smfi_getsymval</a> can be configured by
|
||||
defining the following m4 variables (or cf options):
|
||||
<TABLE cellspacing="1" cellpadding=4 border=1>
|
||||
<TR bgcolor="#dddddd" align=left valign=top>
|
||||
<TH align="center">In .mc file</TH> <TH align="center">In .cf file</TH>
|
||||
<TH align="center">Default Value</TH>
|
||||
</TR>
|
||||
<TR><TD>confMILTER_MACROS_CONNECT</TD><TD>Milter.macros.connect</TD>
|
||||
<TD><CODE>j, _, {daemon_name}, {if_name}, {if_addr}</CODE></TD></TR>
|
||||
<TR><TD>confMILTER_MACROS_HELO</TD><TD>Milter.macros.helo</TD>
|
||||
<TD><CODE>{tls_version}, {cipher}, {cipher_bits}, {cert_subject},
|
||||
{cert_issuer}</CODE></TD></TR>
|
||||
<TR><TD>confMILTER_MACROS_ENVFROM</TD><TD>Milter.macros.envfrom</TD>
|
||||
<TD><CODE>i, {auth_type}, {auth_authen}, {auth_ssf}, {auth_author},
|
||||
{mail_mailer}, {mail_host}, {mail_addr}</CODE></TD></TR>
|
||||
<TR><TD>confMILTER_MACROS_ENVRCPT</TD><TD>Milter.macros.envrcpt</TD>
|
||||
<TD><CODE>{rcpt_mailer}, {rcpt_host}, {rcpt_addr}</CODE></TD></TR>
|
||||
</TABLE>
|
||||
<table cellspacing="1" cellpadding=4 border=1>
|
||||
<tr bgcolor="#dddddd" align=left valign=top>
|
||||
<th align="center">In .mc file</th> <th align="center">In .cf file</TH>
|
||||
<th align="center">Default Value</th>
|
||||
</tr>
|
||||
<tr><td>confMILTER_MACROS_CONNECT</td><td>Milter.macros.connect</td>
|
||||
<td><code>j, _, {daemon_name}, {if_name}, {if_addr}</code></td></tr>
|
||||
<tr><td>confMILTER_MACROS_HELO</td><td>Milter.macros.helo</td>
|
||||
<td><code>{tls_version}, {cipher}, {cipher_bits}, {cert_subject},
|
||||
{cert_issuer}</code></td></tr>
|
||||
<tr><td>confMILTER_MACROS_ENVFROM</td><td>Milter.macros.envfrom</td>
|
||||
<td><code>i, {auth_type}, {auth_authen}, {auth_ssf}, {auth_author},
|
||||
{mail_mailer}, {mail_host}, {mail_addr}</code></td></tr>
|
||||
<tr><td>confMILTER_MACROS_ENVRCPT</td><td>Milter.macros.envrcpt</td>
|
||||
<td><code>{rcpt_mailer}, {rcpt_host}, {rcpt_addr}</code></td></tr>
|
||||
</table>
|
||||
For information about available macros and their meanings, please
|
||||
consult the sendmail documentation.
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
Copyright (c) 2000-2003, 2006 Sendmail, Inc. and its suppliers.
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body> </html>
|
||||
@@ -1,18 +1,18 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>Other Resources</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>Other Resources</title>
|
||||
</head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: other.html,v 1.6 2006/08/08 20:55:57 ca Exp $
|
||||
$Id: other.html,v 1.5 2003/03/05 19:57:54 ca Exp $
|
||||
-->
|
||||
FAQ? Mailing list? More sample filters?
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,215 +1,194 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Technical Overview</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head>
|
||||
<title>Technical Overview</title>
|
||||
</head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: overview.html,v 1.19 2006/12/21 18:23:47 ca Exp $
|
||||
$Id: overview.html,v 1.14 2003/03/05 19:57:54 ca Exp $
|
||||
-->
|
||||
|
||||
<H1>Technical Overview</H1>
|
||||
<h1>Technical Overview</h1>
|
||||
|
||||
<H2>Contents</H2>
|
||||
<h2>Contents</h2>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="#Initialization">Initialization</A>
|
||||
<LI><A HREF="#ControlFlow">Control Flow</A>
|
||||
<LI><A HREF="#Multithreading">Multithreading</A>
|
||||
<LI><A HREF="#ResourceManagement">Resource Management</A>
|
||||
<LI><A HREF="#SignalHandling">Signal Handling</A>
|
||||
</UL>
|
||||
<ul>
|
||||
<li>Initialization
|
||||
<li>Control flow
|
||||
<li>Multithreading
|
||||
<li>Resource Management
|
||||
<li>Signal Handling
|
||||
</ul>
|
||||
|
||||
<H2><A NAME="Initialization">Initialization</A></H2>
|
||||
<h2>Initialization</h2>
|
||||
|
||||
In addition to its own initialization,
|
||||
libmilter expects a filter to initialize several parameters
|
||||
before calling <A HREF="smfi_main.html">smfi_main</A>:
|
||||
<UL>
|
||||
<LI>The callbacks the filter wishes to be called, and the types of
|
||||
message modification it intends to perform (required, see
|
||||
<A HREF="smfi_register.html">smfi_register</A>).
|
||||
In addition to its own initialization, libmilter expects a filter to initialize several parameters before calling <a href="smfi_main.html">smfi_main</a>:
|
||||
<ul>
|
||||
<li>The callbacks the filter wishes to be called, and the types of
|
||||
message modification it intends to perform (required, see <a
|
||||
href="smfi_register.html">smfi_register</a>).
|
||||
|
||||
<LI>The socket address to be used when communicating with the MTA
|
||||
(required, see <A HREF="smfi_setconn.html">smfi_setconn</A>).
|
||||
<li>The socket address to be used when communicating with the MTA
|
||||
(required, see <a href="smfi_setconn.html">smfi_setconn</a>).
|
||||
|
||||
<LI>The number of seconds to wait for MTA connections before
|
||||
timing out (optional, see
|
||||
<A HREF="smfi_settimeout.html">smfi_settimeout</A>).
|
||||
</UL>
|
||||
<P>
|
||||
If the filter fails to initialize libmilter,
|
||||
or if one or more of the parameters it has passed are invalid,
|
||||
a subsequent call to smfi_main will fail.
|
||||
<li>The number of seconds to wait for MTA connections before
|
||||
timing out (optional, see <a
|
||||
href="smfi_settimeout.html">smfi_settimeout</a>).
|
||||
</ul>
|
||||
<p>
|
||||
If the filter fails to initialize libmilter, or if one or more of the
|
||||
parameters it has passed are invalid, a subsequent call to smfi_main
|
||||
will fail.
|
||||
|
||||
<H2><A NAME="ControlFlow">Control Flow</A></H2>
|
||||
<h2>Control flow</h2>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
The following pseudocode describes the filtering process from the
|
||||
perspective of a set of <CODE>N</CODE> MTA's,
|
||||
each corresponding to a connection.
|
||||
Callbacks are shown beside the processing stages in which they are invoked;
|
||||
if no callbacks are defined for a particular stage,
|
||||
that stage may be bypassed.
|
||||
Though it is not shown,
|
||||
processing may be aborted at any time during a message,
|
||||
in which case the
|
||||
<A HREF="xxfi_abort.html">xxfi_abort</A> callback is invoked and control
|
||||
returns to <CODE>MESSAGE</CODE>.
|
||||
<P>
|
||||
<PRE>
|
||||
perspective of a set of <code>N</code> MTA's, each corresponding to a
|
||||
connection. Callbacks are shown beside the processing stages in which
|
||||
they are invoked; if no callbacks are defined for a particular stage,
|
||||
that stage may be bypassed. Though it is not shown, processing may be
|
||||
aborted at any time during a message, in which case the <a
|
||||
href="xxfi_abort.html">xxfi_abort</a> callback is invoked and control
|
||||
returns to <code>MESSAGE</code>.
|
||||
<p>
|
||||
<pre>
|
||||
For each of N connections
|
||||
{
|
||||
For each filter
|
||||
process connection/helo (<A HREF="xxfi_connect.html">xxfi_connect</A>, <A HREF="xxfi_helo.html">xxfi_helo</A>)
|
||||
process connection/helo (<a href="xxfi_connect.html">xxfi_connect</a>, <a href="xxfi_helo.html">xxfi_helo</a>)
|
||||
MESSAGE:For each message in this connection (sequentially)
|
||||
{
|
||||
For each filter
|
||||
process sender (<A HREF="xxfi_envfrom.html">xxfi_envfrom</A>)
|
||||
process sender (<a href="xxfi_envfrom.html">xxfi_envfrom</a>)
|
||||
For each recipient
|
||||
{
|
||||
For each filter
|
||||
process recipient (<A HREF="xxfi_envrcpt.html">xxfi_envrcpt</A>)
|
||||
process recipient (<a href="xxfi_envrcpt.html">xxfi_envrcpt</a>)
|
||||
}
|
||||
For each filter
|
||||
{
|
||||
process DATA (<A HREF="xxfi_data.html">xxfi_data</A>)
|
||||
For each header
|
||||
process header (<A HREF="xxfi_header.html">xxfi_header</A>)
|
||||
process end of headers (<A HREF="xxfi_eoh.html">xxfi_eoh</A>)
|
||||
process header (<a href="xxfi_header.html">xxfi_header</a>)
|
||||
process end of headers (<a href="xxfi_eoh.html">xxfi_eoh</a>)
|
||||
For each body block
|
||||
process this body block (<A HREF="xxfi_body.html">xxfi_body</A>)
|
||||
process end of message (<A HREF="xxfi_eom.html">xxfi_eom</A>)
|
||||
process this body block (<a href="xxfi_body.html">xxfi_body</a>)
|
||||
process end of message (<a href="xxfi_eom.html">xxfi_eom</a>)
|
||||
}
|
||||
}
|
||||
For each filter
|
||||
process end of connection (<A HREF="xxfi_close.html">xxfi_close</A>)
|
||||
process end of connection (<a href="xxfi_close.html">xxfi_close</a>)
|
||||
}
|
||||
</PRE>
|
||||
</pre>
|
||||
|
||||
<P>Note: Filters are contacted in order defined in config file.</P>
|
||||
|
||||
<P>
|
||||
To write a filter, a vendor supplies callbacks to process relevant
|
||||
parts of a message transaction.
|
||||
The library then controls all sequencing, threading,
|
||||
and protocol exchange with the MTA.
|
||||
<A HREF="#figure-3">Figure 3</A> outlines control flow for a filter
|
||||
parts of a message transaction. The library then controls all
|
||||
sequencing, threading, and protocol exchange with the MTA. <a
|
||||
href="#figure-3">Figure 3</a> outlines control flow for a filter
|
||||
process, showing where different callbacks are invoked.
|
||||
</P>
|
||||
|
||||
<DIV ALIGN="center"><A NAME="figure-3"></A>
|
||||
<TABLE border=1 cellspacing=0 cellpadding=2 width="70%">
|
||||
<TR bgcolor="#dddddd"><TH>SMTP Commands</TH><TH>Milter Callbacks</TH></TR>
|
||||
<TR><TD>(open SMTP connection)</TD><TD>xxfi_connect</TD></TR>
|
||||
<TR><TD>HELO ...</TD><TD>xxfi_helo</TD></TR>
|
||||
<TR><TD>MAIL From: ...</TD><TD>xxfi_envfrom</TD></TR>
|
||||
<TR><TD>RCPT To: ...</TD><TD>xxfi_envrcpt</TD></TR>
|
||||
<TR><TD>[more RCPTs]</TD><TD>[xxfi_envrcpt]</TD></TR>
|
||||
<TR><TD>DATA</TD><TD>xxfi_data</TD></TR>
|
||||
<TR><TD>Header: ...</TD><TD>xxfi_header</TD></TR>
|
||||
<TR><TD>[more headers]</TD><TD>[xxfi_header]</TD></TR>
|
||||
<TR><TD> </TD><TD>xxfi_eoh</TD></TR>
|
||||
<TR><TD>body... </TD><TD>xxfi_body</TD></TR>
|
||||
<TR><TD>[more body...]</TD><TD>[xxfi_body]</TD></TR>
|
||||
<TR><TD>.</TD><TD>xxfi_eom</TD></TR>
|
||||
<TR><TD>QUIT</TD><TD>xxfi_close</TD></TR>
|
||||
<TR><TD>(close SMTP connection)</TD><TD> </TD></TR>
|
||||
</TABLE>
|
||||
<B>Figure 3: Milter callbacks related to an SMTP transaction.</B>
|
||||
</DIV>
|
||||
|
||||
<P>
|
||||
</p>
|
||||
<div align="center"><a name="figure-3"></a>
|
||||
<table border=1 cellspacing=0 cellpadding=2 width="70%">
|
||||
<tr bgcolor="#dddddd"><th>SMTP Commands</th><th>Milter Callbacks</th></tr>
|
||||
<tr><td>(open SMTP connection)</td><td>xxfi_connect</td></tr>
|
||||
<tr><td>HELO ...</td><td>xxfi_helo</td></tr>
|
||||
<tr><td>MAIL From: ...</td><td>xxfi_envfrom</td></tr>
|
||||
<tr><td>RCPT To: ...</td><td>xxfi_envrcpt</td></tr>
|
||||
<tr><td>[more RCPTs]</td><td>[xxfi_envrcpt]</td></tr>
|
||||
<tr><td>DATA</td><td> </td></tr>
|
||||
<tr><td>Header: ...</td><td>xxfi_header</td></tr>
|
||||
<tr><td>[more headers]</td><td>[xxfi_header]</td></tr>
|
||||
<tr><td> </td><td>xxfi_eoh</td></tr>
|
||||
<tr><td>body... </td><td>xxfi_body</td></tr>
|
||||
<tr><td>[more body...]</td><td>[xxfi_body]</td></tr>
|
||||
<tr><td>.</td><td>xxfi_eom</td></tr>
|
||||
<tr><td>QUIT</td><td>xxfi_close</td></tr>
|
||||
<tr><td>(close SMTP connection)</td><td> </td></tr>
|
||||
</table>
|
||||
<b>Figure 3: Milter callbacks related to an SMTP transaction.</b>
|
||||
</div>
|
||||
<p>
|
||||
Note that although only a single message is shown above, multiple
|
||||
messages may be sent in a single connection.
|
||||
Note also that a message or connection may be aborted by
|
||||
either the remote host or the MTA
|
||||
at any point during the SMTP transaction.
|
||||
f this occurs during a message (between the MAIL command and the final "."),
|
||||
the filter's
|
||||
<A HREF="xxfi_abort.html">xxfi_abort</A> routine will be called.
|
||||
<A HREF="xxfi_close.html">xxfi_close</A> is called any time the
|
||||
messages may be sent in a single connection. Note also that a message
|
||||
and/or connection may be aborted by either the remote host or the MTA
|
||||
at any point during the SMTP transaction. If this occurs during a
|
||||
message (between the MAIL command and the final "."), the filter's <a
|
||||
href="xxfi_abort.html">xxfi_abort</a> routine will be called. <a
|
||||
href="xxfi_close.html">xxfi_close</a> is called any time the
|
||||
connection closes.
|
||||
|
||||
<H2><A NAME="Multithreading">Multithreading</A></H2>
|
||||
<h2>Multithreading</h2>
|
||||
|
||||
<P>
|
||||
<p>
|
||||
A single filter process may handle any number of connections
|
||||
simultaneously.
|
||||
All filtering callbacks must therefore be reentrant,
|
||||
simultaneously. All filtering callbacks must therefore be reentrant,
|
||||
and use some appropriate external synchronization methods to access
|
||||
global data.
|
||||
Furthermore, since there is not a one-to-one correspondence
|
||||
between threads and connections
|
||||
(N connections mapped onto M threads, M <= N),
|
||||
connection-specific data must be accessed
|
||||
through the handles provided by the Milter library.
|
||||
The programmer cannot rely on library-supplied thread-specific data blocks
|
||||
(e.g., <CODE>pthread_getspecific(3)</CODE>) to store connection-specific data.
|
||||
See the API documentation for
|
||||
<A HREF="smfi_setpriv.html">smfi_setpriv</A> and
|
||||
<A HREF="smfi_getpriv.html">smfi_getpriv</A> for details.
|
||||
global data. Furthermore, since there is not a one-to-one
|
||||
correspondence between threads and connections (N connections mapped
|
||||
onto M threads, M <= N), connection-specific data must be accessed
|
||||
through the handles provided by the Milter library. The programmer
|
||||
cannot rely on library-supplied thread-specific data blocks
|
||||
(e.g. pthread_getspecific()) to store connection-specific data. See
|
||||
the API documentation for <a
|
||||
href="smfi_setpriv.html">smfi_setpriv</a> and <a
|
||||
href="smfi_getpriv.html">smfi_getpriv</a> for details.
|
||||
|
||||
<H2><A NAME="ResourceManagement">Resource Management</A></H2>
|
||||
<h2>Resource management</h2>
|
||||
|
||||
Since filters are likely to be long-lived,
|
||||
and to handle many connections,
|
||||
proper deallocation of per-connection resources is important.
|
||||
The lifetime of a connection is bracketed by calls to the
|
||||
callbacks <A HREF="xxfi_connect.html">xxfi_connect</A> and
|
||||
<A HREF="xxfi_close.html">xxfi_close</A>.
|
||||
Therefore connection-specific
|
||||
resources (accessed via <A HREF="smfi_getpriv.html">smfi_getpriv</A>
|
||||
and <A HREF="smfi_setpriv.html">smfi_setpriv</A>) may be allocated in
|
||||
<A HREF="xxfi_connect.html">xxfi_connect</A>,
|
||||
and should be freed in
|
||||
<A HREF="xxfi_close.html">xxfi_close</A>.
|
||||
For further information see
|
||||
the <A HREF="api.html#conn-msg">discussion</A> of message- versus
|
||||
connection-oriented routines.
|
||||
In particular,
|
||||
note that there is only one connection-specific data pointer per connection.
|
||||
<P>
|
||||
Since filters are likely to be long-lived, and to handle many
|
||||
connections, proper deallocation of per-connection resources is
|
||||
important. The lifetime of a connection is bracketed by calls to the
|
||||
callbacks <a href="xxfi_connect.html">xxfi_connect</a> and <a
|
||||
href="xxfi_close.html">xxfi_close</a>. Therefore connection-specific
|
||||
resources (accessed via <a href="smfi_getpriv.html">smfi_getpriv</a>
|
||||
and <a href="smfi_setpriv.html">smfi_setpriv</a>) may be allocated in
|
||||
<a href="xxfi_connect.html">xxfi_connect</a>, and should be freed in
|
||||
<a href="xxfi_close.html">xxfi_close</a>. For further information see
|
||||
the <a href="api.html#conn-msg">discussion</a> of message- versus
|
||||
connection-oriented routines. In particular, note that there is only
|
||||
one connection-specific data pointer per connection.
|
||||
<p>
|
||||
|
||||
Each message is bracketed by calls to
|
||||
<A HREF="xxfi_envfrom.html">xxfi_envfrom</A> and
|
||||
<A HREF="xxfi_eom.html">xxfi_eom</A> (or
|
||||
<A HREF="xxfi_abort.html">xxfi_abort</A>),
|
||||
implying that message-specific resources can be allocated
|
||||
and reclaimed in these routines.
|
||||
Since the messages in a connection are processed sequentially by each filter,
|
||||
Each message is bracketed by calls to <a
|
||||
href="xxfi_envfrom.html">xxfi_envfrom</a> and <a
|
||||
href="xxfi_eom.html">xxfi_eom</a> (or <a
|
||||
href="xxfi_abort.html">xxfi_abort</a>), implying that message-specific
|
||||
resources can be allocated and reclaimed in these routines. Since the
|
||||
messages in a connection are processed sequentially by each filter,
|
||||
there will be only one active message associated with a given
|
||||
connection and filter (and connection-private data block).
|
||||
These resources must still be accessed through
|
||||
<A HREF="smfi_getpriv.html">smfi_getpriv</A> and
|
||||
<A HREF="smfi_setpriv.html">smfi_setpriv</A>,
|
||||
and must be reclaimed in
|
||||
<A HREF="xxfi_abort.html">xxfi_abort</A>.
|
||||
connection and filter (and connection-private data block). These
|
||||
resources must still be accessed through <a
|
||||
href="smfi_getpriv.html">smfi_getpriv</a> and <a
|
||||
href="smfi_setpriv.html">smfi_setpriv</a>, and must be reclaimed
|
||||
in <a href="xxfi_abort.html">xxfi_abort</a>.
|
||||
|
||||
<H2><A NAME="SignalHandling">Signal Handling</A></H2>
|
||||
<h2>Signal Handling</h2>
|
||||
|
||||
libmilter takes care of signal handling,
|
||||
the filters are not influenced directly by signals.
|
||||
libmilter takes care of signal handling, the filters are
|
||||
not influenced directly by signals.
|
||||
There are basically two types of signal handlers:
|
||||
|
||||
<OL>
|
||||
<LI><TT>Stop</TT>: no new connections from the MTA will be accepted,
|
||||
<ol>
|
||||
<li><TT>Stop</TT>: no new connections from the MTA will be accepted,
|
||||
but existing connections are allowed to continue.
|
||||
<LI><TT>Abort</TT>: all filters will be stopped as soon as the next
|
||||
<li><TT>Abort</TT>: all filters will be stopped as soon as the next
|
||||
communication with the MTA happens.
|
||||
</OL>
|
||||
</ol>
|
||||
|
||||
Filters are not terminated asynchronously
|
||||
(except by signals that can't be caught).
|
||||
Filters are not terminated asynchronously (except by
|
||||
signals that can't be caught).
|
||||
In the case of <TT>Abort</TT> the
|
||||
<A HREF="xxfi_abort.html">xxfi_abort</A> callback is invoked.
|
||||
<a href="xxfi_abort.html">xxfi_abort</a> callback is invoked.
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
Copyright (c) 2000, 2001, 2003, 2006 Sendmail, Inc. and its suppliers.
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000, 2001, 2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,26 +1,26 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>A Sample Filter</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>A Sample Filter</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: sample.html,v 1.22 2006/10/09 23:14:51 ca Exp $
|
||||
$Id: sample.html,v 1.18 2004/02/27 00:49:28 msk Exp $
|
||||
-->
|
||||
<H1>A Sample Filter</H1>
|
||||
<h1>A Sample Filter</h1>
|
||||
|
||||
The following sample logs each message to a separate temporary file,
|
||||
adds a recipient given with the -a flag,
|
||||
and rejects a disallowed recipient address given with the -r flag.
|
||||
It recognizes the following options:
|
||||
<P>
|
||||
<CENTER>
|
||||
<TABLE border="1" cellpadding=2 cellspacing=1>
|
||||
<TR><TD><CODE>-p port</CODE></TD><TD>The port through which the MTA will connect to the filter.</TD></TR>
|
||||
<TR><TD><CODE>-t sec</CODE></TD><TD>The timeout value.</TD></TR>
|
||||
<TR><TD><CODE>-r addr</CODE></TD><TD>A recipient to reject.</TD></TR>
|
||||
<TR><TD><CODE>-a addr</CODE></TD><TD>A recipient to add.</TD></TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
<HR>
|
||||
<PRE>
|
||||
adds a recipient given with the -a flag, and rejects a disallowed
|
||||
recipient address given with the -r flag. It recognizes the following
|
||||
options:
|
||||
<p>
|
||||
<center>
|
||||
<table border="1" cellpadding=2 cellspacing=1>
|
||||
<tr><td><code>-p port</code></td><td>The port through which the MTA will connect to the filter.</td></tr>
|
||||
<tr><td><code>-t sec</code></td><td>The timeout value.</td></tr>
|
||||
<tr><td><code>-r addr</code></td><td>A recipient to reject.</td></tr>
|
||||
<tr><td><code>-a addr</code></td><td>A recipient to add.</td></tr>
|
||||
</table>
|
||||
</center>
|
||||
<hr>
|
||||
<pre>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
@@ -47,7 +47,7 @@ struct mlfiPriv
|
||||
FILE *mlfi_fp;
|
||||
};
|
||||
|
||||
#define MLFIPRIV ((struct mlfiPriv *) <A href="smfi_getpriv.html">smfi_getpriv</A>(ctx))
|
||||
#define MLFIPRIV ((struct mlfiPriv *) <a href="smfi_getpriv.html">smfi_getpriv</a>(ctx))
|
||||
|
||||
extern sfsistat mlfi_cleanup(SMFICTX *, bool);
|
||||
|
||||
@@ -56,7 +56,7 @@ char *add = NULL;
|
||||
char *reject = NULL;
|
||||
|
||||
sfsistat
|
||||
<A href="xxfi_connect.html">mlfi_connect</A>(ctx, hostname, hostaddr)
|
||||
<a href="xxfi_connect.html">mlfi_connect</a>(ctx, hostname, hostaddr)
|
||||
SMFICTX *ctx;
|
||||
char *hostname;
|
||||
_SOCK_ADDR *hostaddr;
|
||||
@@ -74,9 +74,9 @@ sfsistat
|
||||
memset(priv, '\0', sizeof *priv);
|
||||
|
||||
/* save the private data */
|
||||
<A href="smfi_setpriv.html">smfi_setpriv</A>(ctx, priv);
|
||||
<a href="smfi_setpriv.html">smfi_setpriv</a>(ctx, priv);
|
||||
|
||||
ident = <A href="smfi_getsymval.html">smfi_getsymval</A>(ctx, "_");
|
||||
ident = <a href="smfi_getsymval.html">smfi_getsymval</a>(ctx, "_");
|
||||
if (ident == NULL)
|
||||
ident = "???";
|
||||
if ((priv->mlfi_connectfrom = strdup(ident)) == NULL)
|
||||
@@ -90,7 +90,7 @@ sfsistat
|
||||
}
|
||||
|
||||
sfsistat
|
||||
<A href="xxfi_helo.html">mlfi_helo</A>(ctx, helohost)
|
||||
<a href="xxfi_helo.html">mlfi_helo</a>(ctx, helohost)
|
||||
SMFICTX *ctx;
|
||||
char *helohost;
|
||||
{
|
||||
@@ -99,7 +99,7 @@ sfsistat
|
||||
char *buf;
|
||||
struct mlfiPriv *priv = MLFIPRIV;
|
||||
|
||||
tls = <A href="smfi_getsymval.html">smfi_getsymval</A>(ctx, "{tls_version}");
|
||||
tls = <a href="smfi_getsymval.html">smfi_getsymval</a>(ctx, "{tls_version}");
|
||||
if (tls == NULL)
|
||||
tls = "No TLS";
|
||||
if (helohost == NULL)
|
||||
@@ -120,14 +120,14 @@ sfsistat
|
||||
}
|
||||
|
||||
sfsistat
|
||||
<A href="xxfi_envfrom.html">mlfi_envfrom</A>(ctx, argv)
|
||||
<a href="xxfi_envfrom.html">mlfi_envfrom</a>(ctx, argv)
|
||||
SMFICTX *ctx;
|
||||
char **argv;
|
||||
{
|
||||
int fd = -1;
|
||||
int argc = 0;
|
||||
struct mlfiPriv *priv = MLFIPRIV;
|
||||
char *mailaddr = <A href="smfi_getsymval.html">smfi_getsymval</A>(ctx, "{mail_addr}");
|
||||
char *mailaddr = <a href="smfi_getsymval.html">smfi_getsymval</a>(ctx, "{mail_addr}");
|
||||
|
||||
/* open a file to store this message */
|
||||
if ((priv->mlfi_fname = strdup("/tmp/msg.XXXXXX")) == NULL)
|
||||
@@ -174,12 +174,12 @@ sfsistat
|
||||
}
|
||||
|
||||
sfsistat
|
||||
<A href="xxfi_envrcpt.html">mlfi_envrcpt</A>(ctx, argv)
|
||||
<a href="xxfi_envrcpt.html">mlfi_envrcpt</a>(ctx, argv)
|
||||
SMFICTX *ctx;
|
||||
char **argv;
|
||||
{
|
||||
struct mlfiPriv *priv = MLFIPRIV;
|
||||
char *rcptaddr = <A href="smfi_getsymval.html">smfi_getsymval</A>(ctx, "{rcpt_addr}");
|
||||
char *rcptaddr = <a href="smfi_getsymval.html">smfi_getsymval</a>(ctx, "{rcpt_addr}");
|
||||
int argc = 0;
|
||||
|
||||
/* count the arguments */
|
||||
@@ -211,7 +211,7 @@ sfsistat
|
||||
}
|
||||
|
||||
sfsistat
|
||||
<A href="xxfi_header.html">mlfi_header</A>(ctx, headerf, headerv)
|
||||
<a href="xxfi_header.html">mlfi_header</a>(ctx, headerf, headerv)
|
||||
SMFICTX *ctx;
|
||||
char *headerf;
|
||||
unsigned char *headerv;
|
||||
@@ -228,7 +228,7 @@ sfsistat
|
||||
}
|
||||
|
||||
sfsistat
|
||||
<A href="xxfi_eoh.html">mlfi_eoh</A>(ctx)
|
||||
<a href="xxfi_eoh.html">mlfi_eoh</a>(ctx)
|
||||
SMFICTX *ctx;
|
||||
{
|
||||
/* output the blank line between the header and the body */
|
||||
@@ -243,7 +243,7 @@ sfsistat
|
||||
}
|
||||
|
||||
sfsistat
|
||||
<A href="xxfi_body.html">mlfi_body</A>(ctx, bodyp, bodylen)
|
||||
<a href="xxfi_body.html">mlfi_body</a>(ctx, bodyp, bodylen)
|
||||
SMFICTX *ctx;
|
||||
unsigned char *bodyp;
|
||||
size_t bodylen;
|
||||
@@ -265,19 +265,19 @@ sfsistat
|
||||
}
|
||||
|
||||
sfsistat
|
||||
<A href="xxfi_eom.html">mlfi_eom</A>(ctx)
|
||||
<a href="xxfi_eom.html">mlfi_eom</a>(ctx)
|
||||
SMFICTX *ctx;
|
||||
{
|
||||
bool ok = TRUE;
|
||||
|
||||
/* change recipients, if requested */
|
||||
if (add != NULL)
|
||||
ok = (<A href="smfi_addrcpt.html">smfi_addrcpt</A>(ctx, add) == MI_SUCCESS);
|
||||
ok = (<a href="smfi_addrcpt.html">smfi_addrcpt</a>(ctx, add) == MI_SUCCESS);
|
||||
return mlfi_cleanup(ctx, ok);
|
||||
}
|
||||
|
||||
sfsistat
|
||||
<A href="xxfi_abort.html">mlfi_abort</A>(ctx)
|
||||
<a href="xxfi_abort.html">mlfi_abort</a>(ctx)
|
||||
SMFICTX *ctx;
|
||||
{
|
||||
return mlfi_cleanup(ctx, FALSE);
|
||||
@@ -317,7 +317,7 @@ mlfi_cleanup(ctx, ok)
|
||||
else
|
||||
p++;
|
||||
snprintf(hbuf, sizeof hbuf, "%s@%s", p, host);
|
||||
if (<A href="smfi_addheader.html">smfi_addheader</A>(ctx, "X-Archived", hbuf) != MI_SUCCESS)
|
||||
if (<a href="smfi_addheader.html">smfi_addheader</a>(ctx, "X-Archived", hbuf) != MI_SUCCESS)
|
||||
{
|
||||
/* failed; we have to wait until later */
|
||||
fprintf(stderr,
|
||||
@@ -346,7 +346,7 @@ mlfi_cleanup(ctx, ok)
|
||||
}
|
||||
|
||||
sfsistat
|
||||
<A href="xxfi_close.html">mlfi_close</A>(ctx)
|
||||
<a href="xxfi_close.html">mlfi_close</a>(ctx)
|
||||
SMFICTX *ctx;
|
||||
{
|
||||
struct mlfiPriv *priv = MLFIPRIV;
|
||||
@@ -358,59 +358,26 @@ sfsistat
|
||||
if (priv->mlfi_helofrom != NULL)
|
||||
free(priv->mlfi_helofrom);
|
||||
free(priv);
|
||||
<A href="smfi_setpriv.html">smfi_setpriv</A>(ctx, NULL);
|
||||
<a href="smfi_setpriv.html">smfi_setpriv</a>(ctx, NULL);
|
||||
return SMFIS_CONTINUE;
|
||||
}
|
||||
|
||||
sfsistat
|
||||
<A href="xxfi_unknown.html">mlfi_unknown</A>(ctx, cmd)
|
||||
SMFICTX *ctx;
|
||||
char *cmd;
|
||||
{
|
||||
return SMFIS_CONTINUE;
|
||||
}
|
||||
|
||||
sfsistat
|
||||
<A href="xxfi_data.html">mlfi_data</A>(ctx)
|
||||
SMFICTX *ctx;
|
||||
{
|
||||
return SMFIS_CONTINUE;
|
||||
}
|
||||
|
||||
sfsistat
|
||||
<A href="xxfi_negotiate.html">mlfi_negotiate</A>(ctx, f0, f1, f2, f3, pf0, pf1, pf2, pf3)
|
||||
SMFICTX *ctx;
|
||||
unsigned long f0;
|
||||
unsigned long f1;
|
||||
unsigned long f2;
|
||||
unsigned long f3;
|
||||
unsigned long *pf0;
|
||||
unsigned long *pf1;
|
||||
unsigned long *pf2;
|
||||
unsigned long *pf3;
|
||||
{
|
||||
return SMFIS_ALL_OPTS;
|
||||
}
|
||||
|
||||
struct smfiDesc smfilter =
|
||||
{
|
||||
"SampleFilter", /* filter name */
|
||||
SMFI_VERSION, /* version code -- do not change */
|
||||
SMFIF_ADDHDRS|SMFIF_ADDRCPT,
|
||||
/* flags */
|
||||
<A href="xxfi_connect.html">mlfi_connect</A>, /* connection info filter */
|
||||
<A href="xxfi_helo.html">mlfi_helo</A>, /* SMTP HELO command filter */
|
||||
<A href="xxfi_envfrom.html">mlfi_envfrom</A>, /* envelope sender filter */
|
||||
<A href="xxfi_envrcpt.html">mlfi_envrcpt</A>, /* envelope recipient filter */
|
||||
<A href="xxfi_header.html">mlfi_header</A>, /* header filter */
|
||||
<A href="xxfi_eoh.html">mlfi_eoh</A>, /* end of header */
|
||||
<A href="xxfi_body.html">mlfi_body</A>, /* body block filter */
|
||||
<A href="xxfi_eom.html">mlfi_eom</A>, /* end of message */
|
||||
<A href="xxfi_abort.html">mlfi_abort</A>, /* message aborted */
|
||||
<A href="xxfi_close.html">mlfi_close</A>, /* connection cleanup */
|
||||
<A href="xxfi_unknown.html">mlfi_unknown</A>, /* unknown SMTP commands */
|
||||
<A href="xxfi_data.html">mlfi_data</A>, /* DATA command */
|
||||
<A href="xxfi_negotiate.html">mlfi_negotiate</A> /* Once, at the start of each SMTP connection */
|
||||
<a href="xxfi_connect.html">mlfi_connect</a>, /* connection info filter */
|
||||
<a href="xxfi_helo.html">mlfi_helo</a>, /* SMTP HELO command filter */
|
||||
<a href="xxfi_envfrom.html">mlfi_envfrom</a>, /* envelope sender filter */
|
||||
<a href="xxfi_envrcpt.html">mlfi_envrcpt</a>, /* envelope recipient filter */
|
||||
<a href="xxfi_header.html">mlfi_header</a>, /* header filter */
|
||||
<a href="xxfi_eoh.html">mlfi_eoh</a>, /* end of header */
|
||||
<a href="xxfi_body.html">mlfi_body</a>, /* body block filter */
|
||||
<a href="xxfi_eom.html">mlfi_eom</a>, /* end of message */
|
||||
<a href="xxfi_abort.html">mlfi_abort</a>, /* message aborted */
|
||||
<a href="xxfi_close.html">mlfi_close</a>, /* connection cleanup */
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -444,7 +411,7 @@ main(argc, argv)
|
||||
optarg);
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
if (<A href="smfi_setconn.html">smfi_setconn</A>(optarg) == MI_FAILURE)
|
||||
if (<a href="smfi_setconn.html">smfi_setconn</a>(optarg) == MI_FAILURE)
|
||||
{
|
||||
(void) fprintf(stderr,
|
||||
"smfi_setconn failed\n");
|
||||
@@ -471,7 +438,7 @@ main(argc, argv)
|
||||
optarg);
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
if (<A href="smfi_settimeout.html">smfi_settimeout</A>(atoi(optarg)) == MI_FAILURE)
|
||||
if (<a href="smfi_settimeout.html">smfi_settimeout</a>(atoi(optarg)) == MI_FAILURE)
|
||||
{
|
||||
(void) fprintf(stderr,
|
||||
"smfi_settimeout failed\n");
|
||||
@@ -514,24 +481,24 @@ main(argc, argv)
|
||||
usage(argv[0]);
|
||||
exit(EX_USAGE);
|
||||
}
|
||||
if (<A href="smfi_register.html">smfi_register</A>(smfilter) == MI_FAILURE)
|
||||
if (<a href="smfi_register.html">smfi_register</a>(smfilter) == MI_FAILURE)
|
||||
{
|
||||
fprintf(stderr, "smfi_register failed\n");
|
||||
exit(EX_UNAVAILABLE);
|
||||
}
|
||||
return <A href="smfi_main.html">smfi_main</A>();
|
||||
return <a href="smfi_main.html">smfi_main</a>();
|
||||
}
|
||||
|
||||
/* eof */
|
||||
|
||||
</PRE>
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
Copyright (c) 2000-2004, 2006 Sendmail, Inc. and its suppliers.
|
||||
</pre>
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000-2004 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,106 +1,98 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_addheader</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>smfi_addheader</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: smfi_addheader.html,v 1.19 2006/12/21 18:30:35 ca Exp $
|
||||
$Id: smfi_addheader.html,v 1.15 2004/05/04 17:55:50 ca Exp $
|
||||
-->
|
||||
<H1>smfi_addheader</H1>
|
||||
<h1>smfi_addheader</h1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<table border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
|
||||
<pre>
|
||||
#include <libmilter/mfapi.h>
|
||||
int smfi_addheader(
|
||||
SMFICTX *ctx,
|
||||
char *headerf,
|
||||
char *headerv
|
||||
);
|
||||
</PRE>
|
||||
</pre>
|
||||
Add a header to the current message.
|
||||
</TD></TR>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=4>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>Called only from <A href="xxfi_eom.html">xxfi_eom</A>.</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>Adds a header to the current message.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<tr><th valign="top" align=left>DESCRIPTION</th><td>
|
||||
<table border="1" cellspacing=1 cellpadding=4>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Called When</th>
|
||||
<td>Called only from <a href="xxfi_eom.html">xxfi_eom</a>.</td>
|
||||
</tr>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Effects</th>
|
||||
<td>Adds a header to the current message.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!----------- Arguments ---------->
|
||||
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>ctx</TD>
|
||||
<TD>Opaque context structure.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>headerf</TD>
|
||||
<TD>The header name, a non-NULL, null-terminated string.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>headerv</TD>
|
||||
<TD>The header value to be added, a non-NULL, null-terminated string.
|
||||
This may be the empty string.
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<tr><th valign="top" align=left>ARGUMENTS</th><td>
|
||||
<table border="1" cellspacing=0>
|
||||
<tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
|
||||
<tr valign="top"><td>ctx</td>
|
||||
<td>Opaque context structure.
|
||||
</td></tr>
|
||||
<tr valign="top"><td>headerf</td>
|
||||
<td>The header name, a non-NULL, null-terminated string.
|
||||
</td></tr>
|
||||
<tr valign="top"><td>headerv</td>
|
||||
<td>The header value to be added, a non-NULL, null-terminated string. This may be the empty string.
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>RETURN VALUES</th>
|
||||
|
||||
<TD>smfi_addheader returns MI_FAILURE if:
|
||||
<UL><LI>headerf or headerv is NULL.
|
||||
<LI>Adding headers in the current connection state is invalid.
|
||||
<LI>Memory allocation fails.
|
||||
<LI>A network error occurs.
|
||||
<LI>SMFIF_ADDHDRS was not set when <A href="smfi_register.html">smfi_register</A> was called.
|
||||
</UL>
|
||||
<td>smfi_addheader returns MI_FAILURE if:
|
||||
<ul><li>headerf or headerv is NULL.
|
||||
<li>Adding headers in the current connection state is invalid.
|
||||
<li>Memory allocation fails.
|
||||
<li>A network error occurs.
|
||||
<li>SMFIF_ADDHDRS was not set when <a href="smfi_register.html">smfi_register</a> was called.
|
||||
</ul>
|
||||
Otherwise, it returns MI_SUCCESS.
|
||||
</TD>
|
||||
</TR>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!----------- Notes ---------->
|
||||
<TR align="left" valign=top>
|
||||
<TH>NOTES</TH>
|
||||
<TD>
|
||||
<UL><LI>smfi_addheader does not change a message's existing headers.
|
||||
To change a header's current value, use
|
||||
<A HREF="smfi_chgheader.html">smfi_chgheader</A>.
|
||||
<LI>A filter which calls smfi_addheader must have set the SMFIF_ADDHDRS
|
||||
flag in the smfiDesc_str passed to
|
||||
<A href="smfi_register.html">smfi_register</A>.
|
||||
<LI>For smfi_addheader, filter order is important.
|
||||
<B>Later filters will see the header changes made by earlier ones.</B>
|
||||
<LI>Neither the name nor the value of the header is checked for
|
||||
standards compliance.
|
||||
However, each line of the header must be under 2048 characters
|
||||
and should be under 998 characters.
|
||||
If longer headers are needed, make them multi-line.
|
||||
To make a multi-line header,
|
||||
insert a line feed (ASCII 0x0a, or <TT>\n</TT> in C)
|
||||
followed by at least one whitespace character
|
||||
such as a space (ASCII 0x20) or tab (ASCII 0x09, or <TT>\t</TT> in C).
|
||||
The line feed should NOT be preceded by a carriage return (ASCII 0x0d);
|
||||
the MTA will add this automatically.
|
||||
<B>It is the filter writer's responsibility to ensure that no standards
|
||||
are violated.</B>
|
||||
<LI>The MTA adds a leading space to an added header value.
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<tr align="left" valign=top>
|
||||
<th>NOTES</th>
|
||||
<td>
|
||||
<ul><li>smfi_addheader does not change a message's existing headers.
|
||||
To change a header's current value, use <a
|
||||
href="smfi_chgheader.html">smfi_chgheader</a>.
|
||||
<li>A filter which calls smfi_addheader must have set the SMFIF_ADDHDRS flag in the smfiDesc_str passed to <a href="smfi_register.html">smfi_register</a>.
|
||||
<li>For smfi_addheader, filter order is important. <b>Later filters will see the header changes made by earlier ones.</b>
|
||||
<li>Neither the name nor the value of the header is checked for
|
||||
standards compliance. However, each line of the header must be under
|
||||
2048 characters and should be under 998 characters. If longer headers
|
||||
are needed, make them multi-line. To make a multi-line header, insert
|
||||
a line feed (ASCII 0x0a, or <tt>\n</tt> in C) followed by at least
|
||||
one whitespace character such as a space (ASCII 0x20) or tab (ASCII 0x09,
|
||||
or <tt>\t</tt> in C). The line feed should NOT be preceded by a
|
||||
carriage return (ASCII 0x0d); the MTA will add this automatically.
|
||||
<b>It is the filter writer's responsibility to ensure that no standards
|
||||
are violated.</b>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!----------- Example code ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>EXAMPLE</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>EXAMPLE</th>
|
||||
|
||||
<TD>
|
||||
<PRE>
|
||||
<td>
|
||||
<pre>
|
||||
int ret;
|
||||
SMFICTX *ctx;
|
||||
|
||||
@@ -108,19 +100,19 @@ To change a header's current value, use
|
||||
|
||||
ret = smfi_addheader(ctx, "Content-Type",
|
||||
"multipart/mixed;\n\tboundary=\"foobar\"");
|
||||
</PRE>
|
||||
</TD>
|
||||
</TR>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
Copyright (c) 2000-2003, 2006 Sendmail, Inc. and its suppliers.
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,83 +1,83 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_addrcpt</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>smfi_addrcpt</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: smfi_addrcpt.html,v 1.11 2006/12/21 18:30:35 ca Exp $
|
||||
$Id: smfi_addrcpt.html,v 1.9 2003/10/08 17:55:00 gshapiro Exp $
|
||||
-->
|
||||
<H1>smfi_addrcpt</H1>
|
||||
<h1>smfi_addrcpt</h1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<table border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
|
||||
<pre>
|
||||
#include <libmilter/mfapi.h>
|
||||
int smfi_addrcpt(
|
||||
SMFICTX *ctx,
|
||||
char *rcpt
|
||||
);
|
||||
</PRE>
|
||||
</pre>
|
||||
Add a recipient for the current message.
|
||||
</TD></TR>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=4>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>Called only from <A href="xxfi_eom.html">xxfi_eom</A>.</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>Add a recipient to the message envelope.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<tr><th valign="top" align=left>DESCRIPTION</th><td>
|
||||
<table border="1" cellspacing=1 cellpadding=4>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Called When</th>
|
||||
<td>Called only from <a href="xxfi_eom.html">xxfi_eom</a>.</td>
|
||||
</tr>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Effects</th>
|
||||
<td>Add a recipient to the message envelope.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!----------- Arguments ---------->
|
||||
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>ctx</TD>
|
||||
<TD>Opaque context structure.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>rcpt</TD>
|
||||
<TD>The new recipient's address.
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<tr><th valign="top" align=left>ARGUMENTS</th><td>
|
||||
<table border="1" cellspacing=0>
|
||||
<tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
|
||||
<tr valign="top"><td>ctx</td>
|
||||
<td>Opaque context structure.
|
||||
</td></tr>
|
||||
<tr valign="top"><td>rcpt</td>
|
||||
<td>The new recipient's address.
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>RETURN VALUES</th>
|
||||
|
||||
<TD>smfi_addrcpt will fail and return MI_FAILURE if:
|
||||
<UL><LI>rcpt is NULL.
|
||||
<LI>Adding recipients in the current connection state is invalid.
|
||||
<LI>A network error occurs.
|
||||
<LI>SMFIF_ADDRCPT was not set when <A href="smfi_register.html">smfi_register</A> was called.
|
||||
</UL>
|
||||
<td>smfi_addrcpt will fail and return MI_FAILURE if:
|
||||
<ul><li>rcpt is NULL.
|
||||
<li>Adding recipients in the current connection state is invalid.
|
||||
<li>A network error occurs.
|
||||
<li>SMFIF_ADDRCPT was not set when <a href="smfi_register.html">smfi_register</a> was called.
|
||||
</ul>
|
||||
Otherwise, it will return MI_SUCCESS.
|
||||
</TD>
|
||||
</TR>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!----------- Notes ---------->
|
||||
<TR align="left" valign=top>
|
||||
<TH>NOTES</TH>
|
||||
<TD>
|
||||
<tr align="left" valign=top>
|
||||
<th>NOTES</th>
|
||||
<td>
|
||||
A filter which calls smfi_addrcpt must have set the SMFIF_ADDRCPT flag
|
||||
in the smfiDesc_str passed to
|
||||
<A href="smfi_register.html">smfi_register</A>.
|
||||
</TD>
|
||||
</TR>
|
||||
<a href="smfi_register.html">smfi_register</a>.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,88 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_addrcpt_par</TITLE></HEAD>
|
||||
<BODY>
|
||||
<!--
|
||||
$Id: smfi_addrcpt_par.html,v 1.4 2007/03/19 16:38:02 ca Exp $
|
||||
-->
|
||||
<H1>smfi_addrcpt_par</H1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
#include <libmilter/mfapi.h>
|
||||
int smfi_addrcpt_par(
|
||||
SMFICTX *ctx,
|
||||
char *rcpt,
|
||||
char *args
|
||||
);
|
||||
</PRE>
|
||||
Add a recipient for the current message including ESMTP arguments.
|
||||
</TD></TR>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=4>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>Called only from <A href="xxfi_eom.html">xxfi_eom</A>.</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>Add a recipient to the message envelope.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!----------- Arguments ---------->
|
||||
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>ctx</TD>
|
||||
<TD>Opaque context structure.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>rcpt</TD>
|
||||
<TD>The new recipient's address.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>args</TD>
|
||||
<TD>The new recipient's ESMTP parameters.
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
|
||||
<TD>smfi_addrcpt will fail and return MI_FAILURE if:
|
||||
<UL><LI>rcpt is NULL.
|
||||
<LI>Adding recipients in the current connection state is invalid.
|
||||
<LI>A network error occurs.
|
||||
<LI>SMFIF_ADDRCPT_PAR was not set when
|
||||
<A href="smfi_register.html">smfi_register</A> was called.
|
||||
</UL>
|
||||
Otherwise, it will return MI_SUCCESS.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<!----------- Notes ---------->
|
||||
<TR align="left" valign=top>
|
||||
<TH>NOTES</TH>
|
||||
<TD>
|
||||
A filter which calls smfi_addrcpt must have set the SMFIF_ADDRCPT_PAR flag
|
||||
in the smfiDesc_str passed to
|
||||
<A href="smfi_register.html">smfi_register</A>.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
Copyright (c) 2006 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,94 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_chgfrom</TITLE></HEAD>
|
||||
<BODY>
|
||||
<!--
|
||||
$Id: smfi_chgfrom.html,v 1.3 2006/12/21 18:30:35 ca Exp $
|
||||
-->
|
||||
<H1>smfi_chgfrom</H1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
#include <libmilter/mfapi.h>
|
||||
int smfi_chgfrom(
|
||||
SMFICTX *ctx,
|
||||
const char *mail,
|
||||
char *args
|
||||
);
|
||||
</PRE>
|
||||
Change the envelope sender (MAIL From) of the current message.
|
||||
</TD></TR>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=4>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>Called only from <A href="xxfi_eom.html">xxfi_eom</A>.</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>Change the envelope sender (MAIL From) of the current message.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<!----------- Arguments ---------->
|
||||
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>ctx</TD>
|
||||
<TD>Opaque context structure.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>mail</TD>
|
||||
<TD>The new sender address.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>args</TD>
|
||||
<TD>ESMTP arguments.
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
|
||||
<TD>smfi_chgfrom will fail and return MI_FAILURE if:
|
||||
<UL><LI>mail is NULL.
|
||||
<LI>Changing the sender in the current connection state is invalid.
|
||||
<LI>A network error occurs.
|
||||
<LI>SMFIF_CHGFROM was not set when <A href="smfi_register.html">smfi_register</A> was called.
|
||||
</UL>
|
||||
Otherwise, it will return MI_SUCCESS.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<!----------- Notes ---------->
|
||||
<TR align="left" valign=top>
|
||||
<TH>NOTES</TH>
|
||||
<TD>
|
||||
A filter which calls smfi_chgfrom must have set the SMFIF_CHGFROM flag
|
||||
in the smfiDesc_str passed to
|
||||
<A href="smfi_register.html">smfi_register</A>.
|
||||
<BR>
|
||||
Even though all ESMTP arguments could be set via this call,
|
||||
it does not make sense to do so for many of them,
|
||||
e.g., SIZE and BODY.
|
||||
Setting those may cause problems, proper care must be taken.
|
||||
Moreover, there is no feedback from the MTA to the milter
|
||||
whether the call was successful.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
Copyright (c) 2006 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -1,15 +1,15 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_chgheader</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>smfi_chgheader</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: smfi_chgheader.html,v 1.17 2006/12/21 18:30:35 ca Exp $
|
||||
$Id: smfi_chgheader.html,v 1.15 2003/04/30 22:10:53 ca Exp $
|
||||
-->
|
||||
<H1>smfi_chgheader</H1>
|
||||
<h1>smfi_chgheader</h1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<table border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
|
||||
<pre>
|
||||
#include <libmilter/mfapi.h>
|
||||
int smfi_chgheader(
|
||||
SMFICTX *ctx,
|
||||
@@ -17,84 +17,84 @@ int smfi_chgheader(
|
||||
mi_int32 hdridx,
|
||||
char *headerv
|
||||
);
|
||||
</PRE>
|
||||
</pre>
|
||||
Change or delete a message header.
|
||||
</TD></TR>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=4>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>Called only from <A href="xxfi_eom.html">xxfi_eom</A>.</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>Changes a header's value for the current message.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<tr><th valign="top" align=left>DESCRIPTION</th><td>
|
||||
<table border="1" cellspacing=1 cellpadding=4>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Called When</th>
|
||||
<td>Called only from <a href="xxfi_eom.html">xxfi_eom</a>.</td>
|
||||
</tr>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Effects</th>
|
||||
<td>Changes a header's value for the current message.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!----------- Arguments ---------->
|
||||
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>ctx</TD>
|
||||
<TD>Opaque context structure.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>headerf</TD>
|
||||
<TD>The header name, a non-NULL, null-terminated string.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>hdridx</TD>
|
||||
<TD>Header index value (1-based). A hdridx value of 1 will modify the first occurrence of a header named headerf. If hdridx is greater than the number of times headerf appears, a new copy of headerf will be added.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>headerv</TD>
|
||||
<TD>The new value of the given header. headerv == NULL implies that the header should be deleted.
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<tr><th valign="top" align=left>ARGUMENTS</th><td>
|
||||
<table border="1" cellspacing=0>
|
||||
<tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
|
||||
<tr valign="top"><td>ctx</td>
|
||||
<td>Opaque context structure.
|
||||
</td></tr>
|
||||
<tr valign="top"><td>headerf</td>
|
||||
<td>The header name, a non-NULL, null-terminated string.
|
||||
</td></tr>
|
||||
<tr valign="top"><td>hdridx</td>
|
||||
<td>Header index value (1-based). A hdridx value of 1 will modify the first occurrence of a header named headerf. If hdridx is greater than the number of times headerf appears, a new copy of headerf will be added.
|
||||
</td></tr>
|
||||
<tr valign="top"><td>headerv</td>
|
||||
<td>The new value of the given header. headerv == NULL implies that the header should be deleted.
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>RETURN VALUES</th>
|
||||
|
||||
<TD>
|
||||
<td>
|
||||
smfi_chgheader will return MI_FAILURE if
|
||||
<UL><LI>headerf is NULL
|
||||
<LI>Modifying headers in the current connection state is invalid.
|
||||
<LI>Memory allocation fails.
|
||||
<LI>A network error occurs.
|
||||
<LI>SMFIF_CHGHDRS was not set when <A href="smfi_register.html">smfi_register</A> was called.
|
||||
</UL>
|
||||
<ul><li>headerf is NULL
|
||||
<li>Modifying headers in the current connection state is invalid.
|
||||
<li>Memory allocation fails.
|
||||
<li>A network error occurs.
|
||||
<li>SMFIF_CHGHDRS was not set when <a href="smfi_register.html">smfi_register</a> was called.
|
||||
</ul>
|
||||
Otherwise, it returns MI_SUCCESS.
|
||||
</TR>
|
||||
</tr>
|
||||
|
||||
<!----------- Notes ---------->
|
||||
<TR align="left" valign=top>
|
||||
<TH>NOTES</TH>
|
||||
<TD>
|
||||
<UL><LI>While smfi_chgheader may be used to add new headers, it is more efficient and far safer to use <A href="smfi_addheader.html">smfi_addheader</A>.
|
||||
<LI>A filter which calls smfi_chgheader must have set the SMFIF_CHGHDRS flag in the smfiDesc_str passed to <A href="smfi_register.html">smfi_register</A>.
|
||||
<LI>For smfi_chgheader, filter order is important. <B>Later filters will see the header changes made by earlier ones.</B>
|
||||
<LI>Neither the name nor the value of the header is checked for
|
||||
<tr align="left" valign=top>
|
||||
<th>NOTES</th>
|
||||
<td>
|
||||
<ul><li>While smfi_chgheader may be used to add new headers, it is more efficient and far safer to use <a href="smfi_addheader.html">smfi_addheader</a>.
|
||||
<li>A filter which calls smfi_chgheader must have set the SMFIF_CHGHDRS flag in the smfiDesc_str passed to <a href="smfi_register.html">smfi_register</a>.
|
||||
<li>For smfi_chgheader, filter order is important. <b>Later filters will see the header changes made by earlier ones.</b>
|
||||
<li>Neither the name nor the value of the header is checked for
|
||||
standards compliance. However, each line of the header must be under
|
||||
2048 characters and should be under 998 characters. If longer headers
|
||||
are needed, make them multi-line. To make a multi-line header, insert
|
||||
a line feed (ASCII 0x0a, or <TT>\n</TT> in C) followed by at least
|
||||
a line feed (ASCII 0x0a, or <tt>\n</tt> in C) followed by at least
|
||||
one whitespace character such as a space (ASCII 0x20) or tab (ASCII 0x09,
|
||||
or <TT>\t</TT> in C). The line feed should NOT be preceded by a
|
||||
or <tt>\t</tt> in C). The line feed should NOT be preceded by a
|
||||
carriage return (ASCII 0x0d); the MTA will add this automatically.
|
||||
<B>It is the filter writer's responsibility to ensure that no standards
|
||||
are violated.</B>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<b>It is the filter writer's responsibility to ensure that no standards
|
||||
are violated.</b>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!----------- Example code ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>EXAMPLE</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>EXAMPLE</th>
|
||||
|
||||
<TD>
|
||||
<PRE>
|
||||
<td>
|
||||
<pre>
|
||||
int ret;
|
||||
SMFICTX *ctx;
|
||||
|
||||
@@ -102,19 +102,19 @@ Otherwise, it returns MI_SUCCESS.
|
||||
|
||||
ret = smfi_chgheader(ctx, "Content-Type", 1,
|
||||
"multipart/mixed;\n\tboundary=\"foobar\"");
|
||||
</PRE>
|
||||
</TD>
|
||||
</TR>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,82 +1,82 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_delrcpt</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>smfi_delrcpt</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: smfi_delrcpt.html,v 1.11 2006/12/21 18:30:35 ca Exp $
|
||||
$Id: smfi_delrcpt.html,v 1.9 2003/10/27 15:51:12 ca Exp $
|
||||
-->
|
||||
<H1>smfi_delrcpt</H1>
|
||||
<h1>smfi_delrcpt</h1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<table border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
|
||||
<pre>
|
||||
#include <libmilter/mfapi.h>
|
||||
int smfi_delrcpt(
|
||||
SMFICTX *ctx;
|
||||
char *rcpt;
|
||||
);
|
||||
</PRE>
|
||||
</pre>
|
||||
Remove a recipient from the current message's envelope.
|
||||
</TD></TR>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=4>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>Called only from <A href="xxfi_eom.html">xxfi_eom</A>.</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>smfi_delrcpt removes the named recipient from the current message's envelope.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<tr><th valign="top" align=left>DESCRIPTION</th><td>
|
||||
<table border="1" cellspacing=1 cellpadding=4>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Called When</th>
|
||||
<td>Called only from <a href="xxfi_eom.html">xxfi_eom</a>.</td>
|
||||
</tr>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Effects</th>
|
||||
<td>smfi_delrcpt removes the named recipient from the current message's envelope.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!----------- Arguments ---------->
|
||||
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>ctx</TD>
|
||||
<TD>Opaque context structure.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>rcpt</TD>
|
||||
<TD>The recipient address to be removed, a non-NULL, null-terminated string.
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<tr><th valign="top" align=left>ARGUMENTS</th><td>
|
||||
<table border="1" cellspacing=0>
|
||||
<tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
|
||||
<tr valign="top"><td>ctx</td>
|
||||
<td>Opaque context structure.
|
||||
</td></tr>
|
||||
<tr valign="top"><td>rcpt</td>
|
||||
<td>The recipient address to be removed, a non-NULL, null-terminated string.
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>RETURN VALUES</th>
|
||||
|
||||
<TD>smfi_delrcpt will fail and return MI_FAILURE if:
|
||||
<UL>
|
||||
<LI>rcpt is NULL.
|
||||
<LI>Deleting recipients in the current connection state is invalid.
|
||||
<LI>A network error occurs.
|
||||
<LI>SMFIF_DELRCPT was not set when <A href="smfi_register.html">smfi_register</A> was called.
|
||||
</UL>
|
||||
<td>smfi_delrcpt will fail and return MI_FAILURE if:
|
||||
<ul>
|
||||
<li>rcpt is NULL.
|
||||
<li>Deleting recipients in the current connection state is invalid.
|
||||
<li>A network error occurs.
|
||||
<li>SMFIF_DELRCPT was not set when <a href="smfi_register.html">smfi_register</a> was called.
|
||||
</ul>
|
||||
Otherwise, it will return MI_SUCCESS
|
||||
</TD>
|
||||
</TR>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!----------- Notes ---------->
|
||||
<TR align="left" valign=top>
|
||||
<TH>NOTES</TH>
|
||||
<TD>
|
||||
<tr align="left" valign=top>
|
||||
<th>NOTES</th>
|
||||
<td>
|
||||
The addresses to be removed must match exactly. For example, an address and its expanded form do not match.
|
||||
</TD>
|
||||
</TR>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,62 +1,62 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_getpriv</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>smfi_getpriv</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: smfi_getpriv.html,v 1.9 2006/12/21 18:30:35 ca Exp $
|
||||
$Id: smfi_getpriv.html,v 1.7 2003/03/05 19:57:54 ca Exp $
|
||||
-->
|
||||
<H1>smfi_getpriv</H1>
|
||||
<h1>smfi_getpriv</h1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<table border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
|
||||
<pre>
|
||||
#include <libmilter/mfapi.h>
|
||||
void* smfi_getpriv(
|
||||
SMFICTX *ctx
|
||||
);
|
||||
</PRE>
|
||||
</pre>
|
||||
Get the connection-specific data pointer for this connection.
|
||||
</TD></TR>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=4>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>smfi_getpriv may be called in any of the xxfi_* callbacks.</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>None.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<tr><th valign="top" align=left>DESCRIPTION</th><td>
|
||||
<table border="1" cellspacing=1 cellpadding=4>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Called When</th>
|
||||
<td>smfi_getpriv may be called in any of the xxfi_* callbacks.</td>
|
||||
</tr>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Effects</th>
|
||||
<td>None.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!----------- Arguments ---------->
|
||||
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>ctx</TD>
|
||||
<TD>Opaque context structure.
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<tr><th valign="top" align=left>ARGUMENTS</th><td>
|
||||
<table border="1" cellspacing=0>
|
||||
<tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
|
||||
<tr valign="top"><td>ctx</td>
|
||||
<td>Opaque context structure.
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>RETURN VALUES</th>
|
||||
|
||||
<TD>smfi_getpriv returns the private data pointer stored by a prior call to <A href="smfi_setpriv.html">smfi_setpriv</A>, or NULL if none has been set.</TD>
|
||||
</TR>
|
||||
<td>smfi_getpriv returns the private data pointer stored by a prior call to <a href="smfi_setpriv.html">smfi_setpriv</a>, or NULL if none has been set.</td>
|
||||
</tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,105 +1,99 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_getsymval</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>smfi_getsymval</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: smfi_getsymval.html,v 1.15 2007/03/19 16:49:11 ca Exp $
|
||||
$Id: smfi_getsymval.html,v 1.10 2003/03/05 19:57:54 ca Exp $
|
||||
-->
|
||||
<H1>smfi_getsymval</H1>
|
||||
<h1>smfi_getsymval</h1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<table border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
|
||||
<pre>
|
||||
#include <libmilter/mfapi.h>
|
||||
char* smfi_getsymval(
|
||||
SMFICTX *ctx,
|
||||
char *symname
|
||||
);
|
||||
</PRE>
|
||||
</pre>
|
||||
Get the value of a sendmail macro.
|
||||
</TD></TR>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=4>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>smfi_getsymval may be called from within any of the xxfi_* callbacks. Which macros are defined will depend on when it is called.</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>None.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<tr><th valign="top" align=left>DESCRIPTION</th><td>
|
||||
<table border="1" cellspacing=1 cellpadding=4>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Called When</th>
|
||||
<td>smfi_getsymval may be called from within any of the xxfi_* callbacks. Which macros are defined will depend on when it is called.</td>
|
||||
</tr>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Effects</th>
|
||||
<td>None.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!----------- Arguments ---------->
|
||||
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>ctx</TD>
|
||||
<TD>The opaque context structure.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>symname</TD>
|
||||
<TD>The name of a sendmail macro.
|
||||
<tr><th valign="top" align=left>ARGUMENTS</th><td>
|
||||
<table border="1" cellspacing=0>
|
||||
<tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
|
||||
<tr valign="top"><td>ctx</td>
|
||||
<td>The opaque context structure.
|
||||
</td></tr>
|
||||
<tr valign="top"><td>symname</td>
|
||||
<td>The name of a sendmail macro.
|
||||
Single letter macros can optionally be enclosed in braces ("{" and "}"),
|
||||
longer macro names must be enclosed in braces, just as in a
|
||||
<TT>sendmail.cf</TT> file.
|
||||
<A href="#notes">See below</A> for default macros.
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<tt>sendmail.cf</tt> file.
|
||||
<a href="#notes">See below</a> for default macros.
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>RETURN VALUES</th>
|
||||
|
||||
<TD>smfi_getsymval returns the value of the given macro as a null-terminated string, or NULL if the macro is not defined.</TD>
|
||||
</TR>
|
||||
<td>smfi_getsymval returns the value of the given macro as a null-terminated string, or NULL if the macro is not defined.</td>
|
||||
</tr>
|
||||
|
||||
<!----------- Notes ---------->
|
||||
<TR align="left" valign=top>
|
||||
<TH><A name="notes">NOTES</A></TH>
|
||||
<TD>
|
||||
<tr align="left" valign=top>
|
||||
<th><a name="notes">NOTES</A></th>
|
||||
<td>
|
||||
By default, the following macros are valid in the given contexts:
|
||||
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Sent With</TH><TH>Macros</TH></TR>
|
||||
<TR><TD>xxfi_connect</TD> <TD>daemon_name, if_name, if_addr, j, _</TD></TR>
|
||||
<TR><TD>xxfi_helo</TD> <TD>tls_version, cipher, cipher_bits, cert_subject, cert_issuer</TD></TR>
|
||||
<TR><TD>xxfi_envfrom</TD> <TD>i, auth_type, auth_authen, auth_ssf, auth_author,
|
||||
mail_mailer, mail_host, mail_addr</TD></TR>
|
||||
<TR><TD>xxfi_envrcpt</TD> <TD>rcpt_mailer, rcpt_host, rcpt_addr</TD></TR>
|
||||
|
||||
<TR><TD>xxfi_data</TD> <TD>(none)</TD></TR>
|
||||
<TR><TD>xxfi_eoh</TD> <TD>(none)</TD></TR>
|
||||
<TR><TD>xxfi_eom</TD> <TD>msg_id</TD></TR>
|
||||
</TABLE>
|
||||
<P>
|
||||
All macros stay in effect from the point they are received
|
||||
until the end of the connection for the first two sets,
|
||||
the end of the message for the third (xxfi_envfrom) and last (xxfi_eom),
|
||||
and just for each recipient for xxfi_envrcpt.
|
||||
<P>
|
||||
<table border="1" cellspacing=0>
|
||||
<tr bgcolor="#dddddd"><th>Sent With</th><th>Macros</th></tr>
|
||||
<tr><td>xxfi_connect</td> <td>daemon_name, if_name, if_addr, j, _</td></tr>
|
||||
<tr><td>xxfi_helo</td> <td>tls_version, cipher, cipher_bits, cert_subject, cert_issuer</td></tr>
|
||||
<tr><td>xxfi_envfrom</td> <td>i, auth_type, auth_authen, auth_ssf, auth_author,
|
||||
mail_mailer, mail_host, mail_addr</td></tr>
|
||||
<tr><td>xxfi_envrcpt</td> <td>rcpt_mailer, rcpt_host, rcpt_addr</td></tr>
|
||||
</table>
|
||||
<p>
|
||||
All macros stay in effect from the point they are received until the
|
||||
end of the connection for the first two sets, the end of the message
|
||||
for the third (xxfi_envfrom), and just for each recipient for the
|
||||
final set (xxfi_envrcpt).
|
||||
<p>
|
||||
The macro list can be changed using the confMILTER_MACROS_* options in
|
||||
sendmail.mc.
|
||||
The scopes of such macros will be determined by when they are set by sendmail.
|
||||
For descriptions of macros' values,
|
||||
please see the
|
||||
"Sendmail Installation and Operation Guide"
|
||||
provided with your sendmail distribution.
|
||||
sendmail.mc. The scopes of such macros will be determined by when
|
||||
they are set by sendmail. For descriptions of macros' values, please
|
||||
see the "Sendmail Installation and Operation Guide" provided with your
|
||||
sendmail distribution.
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
Copyright (c) 2000, 2002-2003, 2007 Sendmail, Inc. and its suppliers.
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000, 2002-2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,15 +1,15 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_insheader</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>smfi_insheader</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: smfi_insheader.html,v 1.9 2006/12/21 18:30:35 ca Exp $
|
||||
$Id: smfi_insheader.html,v 1.3 2004/05/04 16:20:34 gshapiro Exp $
|
||||
-->
|
||||
<H1>smfi_insheader</H1>
|
||||
<h1>smfi_insheader</h1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<table border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
|
||||
<pre>
|
||||
#include <libmilter/mfapi.h>
|
||||
int smfi_insheader(
|
||||
SMFICTX *ctx,
|
||||
@@ -17,129 +17,107 @@ int smfi_insheader(
|
||||
char *headerf,
|
||||
char *headerv
|
||||
);
|
||||
</PRE>
|
||||
</pre>
|
||||
Prepend a header to the current message.
|
||||
</TD></TR>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=4>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>Called only from <A href="xxfi_eom.html">xxfi_eom</A>.</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>Prepends a header to the current message.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<tr><th valign="top" align=left>DESCRIPTION</th><td>
|
||||
<table border="1" cellspacing=1 cellpadding=4>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Called When</th>
|
||||
<td>Called only from <a href="xxfi_eom.html">xxfi_eom</a>.</td>
|
||||
</tr>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Effects</th>
|
||||
<td>Prepends a header to the current message.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!----------- Arguments ---------->
|
||||
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>ctx</TD>
|
||||
<TD>Opaque context structure.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>hdridx</TD>
|
||||
<TD>The location in the internal header list where this header should
|
||||
<tr><th valign="top" align=left>ARGUMENTS</th><td>
|
||||
<table border="1" cellspacing=0>
|
||||
<tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
|
||||
<tr valign="top"><td>ctx</td>
|
||||
<td>Opaque context structure.
|
||||
</td></tr>
|
||||
<tr valign="top"><td>hdridx</td>
|
||||
<td>The location in the internal header list where this header should
|
||||
be inserted; 0 makes it the topmost header, etc.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>headerf</TD>
|
||||
<TD>The header name, a non-NULL, null-terminated string.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>headerv</TD>
|
||||
<TD>The header value to be added, a non-NULL, null-terminated string. This may be the empty string.
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
</td></tr>
|
||||
<tr valign="top"><td>headerf</td>
|
||||
<td>The header name, a non-NULL, null-terminated string.
|
||||
</td></tr>
|
||||
<tr valign="top"><td>headerv</td>
|
||||
<td>The header value to be added, a non-NULL, null-terminated string. This may be the empty string.
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>RETURN VALUES</th>
|
||||
|
||||
<TD>smfi_insheader returns MI_FAILURE if:
|
||||
<UL><LI>headerf or headerv is NULL.
|
||||
<LI>Adding headers in the current connection state is invalid.
|
||||
<LI>Memory allocation fails.
|
||||
<LI>A network error occurs.
|
||||
<LI>SMFIF_ADDHDRS was not set when <A href="smfi_register.html">smfi_register</A> was called.
|
||||
</UL>
|
||||
<td>smfi_insheader returns MI_FAILURE if:
|
||||
<ul><li>headerf or headerv is NULL.
|
||||
<li>Adding headers in the current connection state is invalid.
|
||||
<li>Memory allocation fails.
|
||||
<li>A network error occurs.
|
||||
<li>SMFIF_ADDHDRS was not set when <a href="smfi_register.html">smfi_register</a> was called.
|
||||
</ul>
|
||||
Otherwise, it returns MI_SUCCESS.
|
||||
</TD>
|
||||
</TR>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!----------- Notes ---------->
|
||||
<TR align="left" valign=top>
|
||||
<TH>NOTES</TH>
|
||||
<TD>
|
||||
<UL>
|
||||
<LI>smfi_insheader does not change a message's existing headers.
|
||||
To change a header's current value, use
|
||||
<A HREF="smfi_chgheader.html">smfi_chgheader</A>.
|
||||
<LI>A filter which calls smfi_insheader must have set the SMFIF_ADDHDRS
|
||||
flag in the smfiDesc_str passed to
|
||||
<A href="smfi_register.html">smfi_register</A>.
|
||||
<LI>For smfi_insheader, filter order is important.
|
||||
<B>Later filters will see the header changes made by earlier ones.</B>
|
||||
<LI>A filter will receive <EM>only</EM> headers that have been sent
|
||||
by the SMTP client and those header modifications by earlier filters.
|
||||
It will <EM>not</EM> receive the headers that are inserted by sendmail
|
||||
itself.
|
||||
This makes the header insertion position highly dependent on
|
||||
the headers that exist in the incoming message
|
||||
and those that are configured to be added by sendmail.
|
||||
For example, sendmail will always add a
|
||||
<CODE>Received:</CODE> header to the beginning of the headers.
|
||||
Setting <CODE>hdridx</CODE> to 0 will actually insert the header
|
||||
before this <CODE>Received:</CODE> header.
|
||||
However, later filters can be easily confused as they receive
|
||||
the added header, but not the <CODE>Received:</CODE> header,
|
||||
thus making it hard to insert a header at a fixed position.
|
||||
<LI>If hdridx is a number larger than the number of headers in the message,
|
||||
the header will simply be appended.
|
||||
<LI>Neither the name nor the value of the header is checked for
|
||||
standards compliance.
|
||||
However, each line of the header must be under 2048 characters
|
||||
and should be under 998 characters.
|
||||
If longer headers are needed, make them multi-line.
|
||||
To make a multi-line header,
|
||||
insert a line feed (ASCII 0x0a, or <TT>\n</TT> in C)
|
||||
followed by at least one whitespace character
|
||||
such as a space (ASCII 0x20) or tab (ASCII 0x09, or <TT>\t</TT> in C).
|
||||
The line feed should NOT be preceded by a carriage return (ASCII 0x0d);
|
||||
the MTA will add this automatically.
|
||||
<B>It is the filter writer's responsibility to ensure that no standards
|
||||
are violated.</B>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<tr align="left" valign=top>
|
||||
<th>NOTES</th>
|
||||
<td>
|
||||
<ul><li>smfi_insheader does not change a message's existing headers.
|
||||
To change a header's current value, use <a
|
||||
href="smfi_chgheader.html">smfi_chgheader</a>.
|
||||
<li>A filter which calls smfi_insheader must have set the SMFIF_ADDHDRS flag in the smfiDesc_str passed to <a href="smfi_register.html">smfi_register</a>.
|
||||
<li>For smfi_insheader, filter order is important. <b>Later filters will see the header changes made by earlier ones.</b>
|
||||
<li>If hdridx is a number larger than the number of headers in the message, the header will simply be appended.
|
||||
<li>Neither the name nor the value of the header is checked for
|
||||
standards compliance. However, each line of the header must be under
|
||||
2048 characters and should be under 998 characters. If longer headers
|
||||
are needed, make them multi-line. To make a multi-line header, insert
|
||||
a line feed (ASCII 0x0a, or <tt>\n</tt> in C) followed by at least
|
||||
one whitespace character such as a space (ASCII 0x20) or tab (ASCII 0x09,
|
||||
or <tt>\t</tt> in C). The line feed should NOT be preceded by a
|
||||
carriage return (ASCII 0x0d); the MTA will add this automatically.
|
||||
<b>It is the filter writer's responsibility to ensure that no standards
|
||||
are violated.</b>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!----------- Example code ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>EXAMPLE</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>EXAMPLE</th>
|
||||
|
||||
<TD>
|
||||
<PRE>
|
||||
<td>
|
||||
<pre>
|
||||
int ret;
|
||||
SMFICTX *ctx;
|
||||
|
||||
...
|
||||
|
||||
ret = smfi_insheader(ctx, 0, "First", "See me?");
|
||||
</PRE>
|
||||
</TD>
|
||||
</TR>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
Copyright (c) 2004, 2006 Sendmail, Inc. and its suppliers.
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2004 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,51 +1,51 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_main</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>smfi_main</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: smfi_main.html,v 1.9 2006/12/21 18:30:35 ca Exp $
|
||||
$Id: smfi_main.html,v 1.7 2003/03/05 19:57:54 ca Exp $
|
||||
-->
|
||||
<H1>smfi_main</H1>
|
||||
<h1>smfi_main</h1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<table border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
|
||||
<pre>
|
||||
#include <libmilter/mfapi.h>
|
||||
int smfi_main(
|
||||
);
|
||||
</PRE>
|
||||
</pre>
|
||||
Hand control to libmilter event loop.
|
||||
</TD></TR>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=4>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>smfi_main is called after a filter's initialization is complete.</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>smfi_main hands control to the Milter event loop.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<tr><th valign="top" align=left>DESCRIPTION</th><td>
|
||||
<table border="1" cellspacing=1 cellpadding=4>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Called When</th>
|
||||
<td>smfi_main is called after a filter's initialization is complete.</td>
|
||||
</tr>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Effects</th>
|
||||
<td>smfi_main hands control to the Milter event loop.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>RETURN VALUES</th>
|
||||
|
||||
<TD>smfi_main will return MI_FAILURE if it fails to establish a connection. This may occur for any of a variety of reasons (e.g. invalid address passed to <A href="smfi_setconn.html">smfi_setconn</A>). The reason for the failure will be logged. Otherwise, smfi_main will return MI_SUCCESS.</TD>
|
||||
</TR>
|
||||
<td>smfi_main will return MI_FAILURE if it fails to establish a connection. This may occur for any of a variety of reasons (e.g. invalid address passed to <a href="smfi_setconn.html">smfi_setconn</a>). The reason for the failure will be logged. Otherwise, smfi_main will return MI_SUCCESS.</td>
|
||||
</tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,78 +1,78 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_opensocket</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>smfi_opensocket</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: smfi_opensocket.html,v 1.6 2006/12/21 18:30:35 ca Exp $
|
||||
$Id: smfi_opensocket.html,v 1.4 2003/10/20 22:28:57 msk Exp $
|
||||
-->
|
||||
<H1>smfi_opensocket</H1>
|
||||
<h1>smfi_opensocket</h1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<table border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
|
||||
<pre>
|
||||
#include <libmilter/mfapi.h>
|
||||
int smfi_opensocket(
|
||||
bool rmsocket
|
||||
);
|
||||
</PRE>
|
||||
</pre>
|
||||
Attempt to create the interface socket MTAs will use to connect to the
|
||||
filter.
|
||||
</TD></TR>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=4>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>Called only from program mainline, before calling
|
||||
<TT>smfi_main()</TT>.</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>smfi_opensocket attempts to create the socket specified previously by
|
||||
a call to <TT>smfi_setconn()</TT> which will be the interface between MTAs
|
||||
<tr><th valign="top" align=left>DESCRIPTION</th><td>
|
||||
<table border="1" cellspacing=1 cellpadding=4>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Called When</th>
|
||||
<td>Called only from program mainline, before calling
|
||||
<tt>smfi_main()</tt>.</td>
|
||||
</tr>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Effects</th>
|
||||
<td>smfi_opensocket attempts to create the socket specified previously by
|
||||
a call to <tt>smfi_setconn()</tt> which will be the interface between MTAs
|
||||
and the filter. This allows the calling application to ensure that the
|
||||
socket can be created. If this is not called, <TT>smfi_main()</TT> will
|
||||
do so implicitly. </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
socket can be created. If this is not called, <tt>smfi_main()</tt> will
|
||||
do so implicitly. </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!----------- Arguments ---------->
|
||||
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>rmsocket</TD>
|
||||
<TD>A flag indicating whether or not the library should try to
|
||||
<tr><th valign="top" align=left>ARGUMENTS</th><td>
|
||||
<table border="1" cellspacing=0>
|
||||
<tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
|
||||
<tr valign="top"><td>rmsocket</td>
|
||||
<td>A flag indicating whether or not the library should try to
|
||||
remove any existing UNIX domain socket before trying to create
|
||||
a new one.
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>RETURN VALUES</th>
|
||||
|
||||
<TD>smfi_opensocket will fail and return MI_FAILURE if:
|
||||
<UL>
|
||||
<LI>The interface socket could not be created for any reason.
|
||||
<LI><TT>rmsocket</TT> was <TT>true</TT>, and either the socket could
|
||||
<td>smfi_opensocket will fail and return MI_FAILURE if:
|
||||
<ul>
|
||||
<li>The interface socket could not be created for any reason.
|
||||
<li><tt>rmsocket</tt> was <tt>true</tt>, and either the socket could
|
||||
not be examined, or exists and could not be removed.
|
||||
<LI><TT>smfi_setconn()</TT> has not been called.
|
||||
</UL>
|
||||
<li><tt>smfi_setconn()</tt> has not been called.
|
||||
</ul>
|
||||
Otherwise, it will return MI_SUCCESS
|
||||
</TD>
|
||||
</TR>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,68 +1,68 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_progress</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>smfi_progress</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: smfi_progress.html,v 1.5 2006/12/21 18:30:35 ca Exp $
|
||||
$Id: smfi_progress.html,v 1.3 2003/03/05 19:57:54 ca Exp $
|
||||
-->
|
||||
<H1>smfi_progress</H1>
|
||||
<h1>smfi_progress</h1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<table border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
|
||||
<pre>
|
||||
#include <libmilter/mfapi.h>
|
||||
int smfi_progress(
|
||||
SMFICTX *ctx;
|
||||
);
|
||||
</PRE>
|
||||
</pre>
|
||||
Notify the MTA that an operation is still in progress.
|
||||
</TD></TR>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=4>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>Called only from <A href="xxfi_eom.html">xxfi_eom</A>.</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>smfi_progress notifies the MTA that the filter is still working
|
||||
on a message, causing the MTA to re-start its timeouts.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<tr><th valign="top" align=left>DESCRIPTION</th><td>
|
||||
<table border="1" cellspacing=1 cellpadding=4>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Called When</th>
|
||||
<td>Called only from <a href="xxfi_eom.html">xxfi_eom</a>.</td>
|
||||
</tr>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Effects</th>
|
||||
<td>smfi_progress notifies the MTA that the filter is still working
|
||||
on a message, causing the MTA to re-start its timeouts.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!----------- Arguments ---------->
|
||||
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>ctx</TD>
|
||||
<TD>Opaque context structure.
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<tr><th valign="top" align=left>ARGUMENTS</th><td>
|
||||
<table border="1" cellspacing=0>
|
||||
<tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
|
||||
<tr valign="top"><td>ctx</td>
|
||||
<td>Opaque context structure.
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>RETURN VALUES</th>
|
||||
|
||||
<TD>smfi_progress will fail and return MI_FAILURE if:
|
||||
<UL>
|
||||
<LI>A network error occurs.
|
||||
</UL>
|
||||
<td>smfi_progress will fail and return MI_FAILURE if:
|
||||
<ul>
|
||||
<li>A network error occurs.
|
||||
</ul>
|
||||
Otherwise, it will return MI_SUCCESS
|
||||
</TD>
|
||||
</TR>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,73 +1,73 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_quarantine</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>smfi_quarantine</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: smfi_quarantine.html,v 1.5 2006/12/21 18:30:35 ca Exp $
|
||||
$Id: smfi_quarantine.html,v 1.3 2003/03/05 19:57:54 ca Exp $
|
||||
-->
|
||||
<H1>smfi_quarantine</H1>
|
||||
<h1>smfi_quarantine</h1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<table border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
|
||||
<pre>
|
||||
#include <libmilter/mfapi.h>
|
||||
int smfi_quarantine(
|
||||
SMFICTX *ctx;
|
||||
char *reason;
|
||||
);
|
||||
</PRE>
|
||||
</pre>
|
||||
Quarantine the message using the given reason.
|
||||
</TD></TR>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=4>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>Called only from <A href="xxfi_eom.html">xxfi_eom</A>.</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>smfi_quarantine quarantines the message using the given reason.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<tr><th valign="top" align=left>DESCRIPTION</th><td>
|
||||
<table border="1" cellspacing=1 cellpadding=4>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Called When</th>
|
||||
<td>Called only from <a href="xxfi_eom.html">xxfi_eom</a>.</td>
|
||||
</tr>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Effects</th>
|
||||
<td>smfi_quarantine quarantines the message using the given reason.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!----------- Arguments ---------->
|
||||
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>ctx</TD>
|
||||
<TD>Opaque context structure.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>reason</TD>
|
||||
<TD>The quarantine reason, a non-NULL and non-empty null-terminated string.
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<tr><th valign="top" align=left>ARGUMENTS</th><td>
|
||||
<table border="1" cellspacing=0>
|
||||
<tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
|
||||
<tr valign="top"><td>ctx</td>
|
||||
<td>Opaque context structure.
|
||||
</td></tr>
|
||||
<tr valign="top"><td>reason</td>
|
||||
<td>The quarantine reason, a non-NULL and non-empty null-terminated string.
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>RETURN VALUES</th>
|
||||
|
||||
<TD>smfi_quarantine will fail and return MI_FAILURE if:
|
||||
<UL>
|
||||
<LI>reason is NULL or empty.
|
||||
<LI>A network error occurs.
|
||||
<LI>SMFIF_QUARANTINE was not set when <A href="smfi_register.html">smfi_register</A> was called.
|
||||
</UL>
|
||||
<td>smfi_quarantine will fail and return MI_FAILURE if:
|
||||
<ul>
|
||||
<li>reason is NULL or empty.
|
||||
<li>A network error occurs.
|
||||
<li>SMFIF_QUARANTINE was not set when <a href="smfi_register.html">smfi_register</a> was called.
|
||||
</ul>
|
||||
Otherwise, it will return MI_SUCCESS
|
||||
</TD>
|
||||
</TR>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2002-2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,129 +1,113 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_register</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>smfi_register</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: smfi_register.html,v 1.18 2006/12/20 18:37:11 ca Exp $
|
||||
$Id: smfi_register.html,v 1.11 2003/05/26 04:10:52 gshapiro Exp $
|
||||
-->
|
||||
<H1>smfi_register</H1>
|
||||
<h1>smfi_register</h1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<table border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
|
||||
<pre>
|
||||
#include <libmilter/mfapi.h>
|
||||
int smfi_register(
|
||||
smfiDesc descr
|
||||
);
|
||||
</PRE>
|
||||
</pre>
|
||||
Register a set of filter callbacks.
|
||||
</TD></TR>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=1>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>smfi_register must be called before smfi_main</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>smfi_register creates a filter using the information given in the
|
||||
smfiDesc argument.
|
||||
Multiple (successful) calls to smfi_register within a
|
||||
single process are not allowed,
|
||||
i.e., only one filter can be successfully registered.
|
||||
Note, however, that the library may not check whether this restriction
|
||||
is obeyed.
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<tr><th valign="top" align=left>DESCRIPTION</th><td>
|
||||
<table border="1" cellspacing=1 cellpadding=1>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Called When</th>
|
||||
<td>smfi_register must be called before smfi_main</td>
|
||||
</tr>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Effects</th>
|
||||
<td>smfi_register creates a filter using the information given in the
|
||||
smfiDesc argument. Multiple calls to smfi_register within a
|
||||
single process are not allowed.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!----------- Arguments ---------->
|
||||
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>descr</TD>
|
||||
<TD>
|
||||
A filter descriptor of type smfiDesc describing the filter's functions.
|
||||
<A NAME="smfiDesc">The structure</A> has the following members:
|
||||
<PRE>
|
||||
<tr><th valign="top" align=left>ARGUMENTS</th><td>
|
||||
<table border="1" cellspacing=0>
|
||||
<tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
|
||||
<tr valign="top"><td>descr</td>
|
||||
<td>
|
||||
A filter descriptor of type smfiDesc describing the filter's
|
||||
functions. The structure has the following members:
|
||||
<pre>
|
||||
struct smfiDesc
|
||||
{
|
||||
char *xxfi_name; /* filter name */
|
||||
int xxfi_version; /* version code -- do not change */
|
||||
unsigned long xxfi_flags; /* <A href="#flags">flags</A> */
|
||||
unsigned long xxfi_flags; /* <a href="#flags">flags</a> */
|
||||
|
||||
/* connection info filter */
|
||||
sfsistat (*<A href="xxfi_connect.html">xxfi_connect</A>)(SMFICTX *, char *, _SOCK_ADDR *);
|
||||
sfsistat (*<a href="xxfi_connect.html">xxfi_connect</a>)(SMFICTX *, char *, _SOCK_ADDR *);
|
||||
/* SMTP HELO command filter */
|
||||
sfsistat (*<A href="xxfi_helo.html">xxfi_helo</A>)(SMFICTX *, char *);
|
||||
sfsistat (*<a href="xxfi_helo.html">xxfi_helo</a>)(SMFICTX *, char *);
|
||||
/* envelope sender filter */
|
||||
sfsistat (*<A href="xxfi_envfrom.html">xxfi_envfrom</A>)(SMFICTX *, char **);
|
||||
sfsistat (*<a href="xxfi_envfrom.html">xxfi_envfrom</a>)(SMFICTX *, char **);
|
||||
/* envelope recipient filter */
|
||||
sfsistat (*<A href="xxfi_envrcpt.html">xxfi_envrcpt</A>)(SMFICTX *, char **);
|
||||
sfsistat (*<a href="xxfi_envrcpt.html">xxfi_envrcpt</a>)(SMFICTX *, char **);
|
||||
/* header filter */
|
||||
sfsistat (*<A href="xxfi_header.html">xxfi_header</A>)(SMFICTX *, char *, char *);
|
||||
sfsistat (*<a href="xxfi_header.html">xxfi_header</a>)(SMFICTX *, char *, char *);
|
||||
/* end of header */
|
||||
sfsistat (*<A href="xxfi_eoh.html">xxfi_eoh</A>)(SMFICTX *);
|
||||
sfsistat (*<a href="xxfi_eoh.html">xxfi_eoh</a>)(SMFICTX *);
|
||||
/* body block */
|
||||
sfsistat (*<A href="xxfi_body.html">xxfi_body</A>)(SMFICTX *, unsigned char *, size_t);
|
||||
sfsistat (*<a href="xxfi_body.html">xxfi_body</a>)(SMFICTX *, unsigned char *, size_t);
|
||||
/* end of message */
|
||||
sfsistat (*<A href="xxfi_eom.html">xxfi_eom</A>)(SMFICTX *);
|
||||
sfsistat (*<a href="xxfi_eom.html">xxfi_eom</a>)(SMFICTX *);
|
||||
/* message aborted */
|
||||
sfsistat (*<A href="xxfi_abort.html">xxfi_abort</A>)(SMFICTX *);
|
||||
sfsistat (*<a href="xxfi_abort.html">xxfi_abort</a>)(SMFICTX *);
|
||||
/* connection cleanup */
|
||||
sfsistat (*<A href="xxfi_close.html">xxfi_close</A>)(SMFICTX *);
|
||||
|
||||
/* any unrecognized or unimplemented command filter */
|
||||
sfsistat (*xxfi_unknown)(SMFICTX *, const char *);
|
||||
|
||||
/* SMTP DATA command filter */
|
||||
sfsistat (*xxfi_data)(SMFICTX *);
|
||||
|
||||
/* negotiation callback */
|
||||
sfsistat (*<A HREF="xxfi_negotiate.html">xxfi_negotiate</A>)(SMFICTX *,
|
||||
unsigned long, unsigned long, unsigned long, unsigned long,
|
||||
unsigned long *, unsigned long *, unsigned long *, unsigned long *);
|
||||
sfsistat (*<a href="xxfi_close.html">xxfi_close</a>)(SMFICTX *);
|
||||
};
|
||||
</PRE>
|
||||
</pre>
|
||||
|
||||
A NULL value for any callback function indicates that the filter
|
||||
does not wish to process the given type of information,
|
||||
simply returning SMFIS_CONTINUE.
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
A NULL value for any callback function indicates that the filter does
|
||||
not wish to process the given type of information, simply returning
|
||||
SMFIS_CONTINUE.
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>RETURN VALUES</th>
|
||||
|
||||
<TD>
|
||||
<td>
|
||||
smfi_register may return MI_FAILURE for any of the following reasons:
|
||||
<UL>
|
||||
<LI>memory allocation failed.
|
||||
<LI>incompatible version or illegal flags value.
|
||||
</UL>
|
||||
<ul>
|
||||
<li>memory allocation failed.
|
||||
<li>incompatible version or illegal flags value.
|
||||
</ul>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!----------- Notes ---------->
|
||||
<TR align="left" valign=top>
|
||||
<TH>NOTES</TH>
|
||||
<TD>
|
||||
<tr align="left" valign=top>
|
||||
<th>NOTES</th>
|
||||
<td>
|
||||
|
||||
<A NAME="flags">The xxfi_flags</A>
|
||||
field should contain the bitwise OR of zero or more of
|
||||
<a name="flags"></A>
|
||||
The xxfi_flags field should contain the bitwise OR of zero or more of
|
||||
the following values, describing the actions the filter may take:
|
||||
<TABLE BORDER CELLPADDING="1" cellspacing=1>
|
||||
<TR valign="top" bgcolor="#dddddd"><TH align="left">Flag</TH><TH align="center">Description</TH></TR>
|
||||
<tr valign="top" bgcolor="#dddddd"><th align="left">Flag</th><th align="center">Description</th></tr>
|
||||
<TR align="left" valign=top>
|
||||
<TD>
|
||||
SMFIF_ADDHDRS
|
||||
</TD>
|
||||
<TD>
|
||||
This filter may <A HREF="smfi_addheader.html">add headers</A>.
|
||||
This filter may add headers.
|
||||
</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
@@ -131,8 +115,7 @@ the following values, describing the actions the filter may take:
|
||||
SMFIF_CHGHDRS
|
||||
</TD>
|
||||
<TD>
|
||||
This filter may
|
||||
<A HREF="smfi_chgheader.html">change and/or delete headers</A>.
|
||||
This filter may change and/or delete headers.
|
||||
</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
@@ -140,8 +123,7 @@ the following values, describing the actions the filter may take:
|
||||
SMFIF_CHGBODY
|
||||
</TD>
|
||||
<TD>
|
||||
This filter may
|
||||
<A HREF="smfi_replacebody.html">replace the body</A> during filtering.
|
||||
This filter may replace the body during filtering.
|
||||
This may have significant performance impact
|
||||
if other filters do body filtering after this filter.
|
||||
</TD>
|
||||
@@ -151,18 +133,7 @@ the following values, describing the actions the filter may take:
|
||||
SMFIF_ADDRCPT
|
||||
</TD>
|
||||
<TD>
|
||||
This filter may
|
||||
<A HREF="smfi_addrcpt.html">add recipients</A>
|
||||
to the message.
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="TOP">
|
||||
SMFIF_ADDRCPT_PAR
|
||||
</TD>
|
||||
<TD>
|
||||
This filter may
|
||||
<A HREF="smfi_addrcpt_par.html">add recipients including ESMTP args</A>.
|
||||
This filter may add recipients to the message.
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
@@ -170,55 +141,23 @@ the following values, describing the actions the filter may take:
|
||||
SMFIF_DELRCPT
|
||||
</TD>
|
||||
<TD>
|
||||
This filter may
|
||||
<A HREF="smfi_delrcpt.html">remove recipients</A> from the message.
|
||||
This filter may remove recipients from the message.
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="TOP">
|
||||
SMFIF_QUARANTINE
|
||||
</TD>
|
||||
<TD>
|
||||
This filter may
|
||||
<A HREF="smfi_quarantine.html">quarantine</A> a message.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD VALIGN="TOP">
|
||||
SMFIF_CHGFROM
|
||||
</TD>
|
||||
<TD>
|
||||
This filter may
|
||||
<A HREF="smfi_chgfrom.html">change the envelope sender</A> (MAIL).
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD VALIGN="TOP">
|
||||
SMFIF_SETSYMLIST
|
||||
</TD>
|
||||
<TD>
|
||||
This filter can
|
||||
<A HREF="smfi_setsymlist.html">send a set of symbols (macros)</A>
|
||||
that it wants.
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
Copyright (c) 2000-2001, 2003, 2006 Sendmail, Inc. and its suppliers.
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,93 +1,93 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_replacebody</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>smfi_replacebody</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: smfi_replacebody.html,v 1.15 2006/12/21 18:30:35 ca Exp $
|
||||
$Id: smfi_replacebody.html,v 1.13 2003/03/05 19:57:54 ca Exp $
|
||||
-->
|
||||
<H1>smfi_replacebody</H1>
|
||||
<h1>smfi_replacebody</h1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<table border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
|
||||
<pre>
|
||||
#include <libmilter/mfapi.h>
|
||||
int smfi_replacebody(
|
||||
SMFICTX *ctx,
|
||||
unsigned char *bodyp,
|
||||
int bodylen
|
||||
);
|
||||
</PRE>
|
||||
</pre>
|
||||
Replace message-body data.
|
||||
</TD></TR>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=4>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>Called only from <A href="xxfi_eom.html">xxfi_eom</A>. smfi_replacebody may be called more than once.</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>smfi_replacebody replaces the body of the current message. If called
|
||||
<tr><th valign="top" align=left>DESCRIPTION</th><td>
|
||||
<table border="1" cellspacing=1 cellpadding=4>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Called When</th>
|
||||
<td>Called only from <a href="xxfi_eom.html">xxfi_eom</a>. smfi_replacebody may be called more than once.</td>
|
||||
</tr>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Effects</th>
|
||||
<td>smfi_replacebody replaces the body of the current message. If called
|
||||
more than once, subsequent calls result in data being appended to the new
|
||||
body.
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!----------- Arguments ---------->
|
||||
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>ctx</TD>
|
||||
<TD>Opaque context structure.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>bodyp</TD>
|
||||
<TD>A pointer to the start of the new body data, which does not have to be null-terminated. If bodyp is NULL, it is treated as having length == 0. Body data should be in CR/LF form.
|
||||
</TD></TR>
|
||||
<TR valign="top"><TD>bodylen</TD>
|
||||
<TD>The number of data bytes pointed to by bodyp.
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<tr><th valign="top" align=left>ARGUMENTS</th><td>
|
||||
<table border="1" cellspacing=0>
|
||||
<tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
|
||||
<tr valign="top"><td>ctx</td>
|
||||
<td>Opaque context structure.
|
||||
</td></tr>
|
||||
<tr valign="top"><td>bodyp</td>
|
||||
<td>A pointer to the start of the new body data, which does not have to be null-terminated. If bodyp is NULL, it is treated as having length == 0. Body data should be in CR/LF form.
|
||||
</td></tr>
|
||||
<tr valign="top"><td>bodylen</td>
|
||||
<td>The number of data bytes pointed to by bodyp.
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>RETURN VALUES</th>
|
||||
|
||||
<TD>smfi_replacebody fails and returns MI_FAILURE if:
|
||||
<UL>
|
||||
<LI>bodyp == NULL and bodylen > 0.
|
||||
<LI>Changing the body in the current connection state is invalid.
|
||||
<LI>A network error occurs.
|
||||
<LI>SMFIF_CHGBODY was not set when <A href="smfi_register.html">smfi_register</A> was called.
|
||||
</UL>
|
||||
<td>smfi_replacebody fails and returns MI_FAILURE if:
|
||||
<ul>
|
||||
<li>bodyp == NULL and bodylen > 0.
|
||||
<li>Changing the body in the current connection state is invalid.
|
||||
<li>A network error occurs.
|
||||
<li>SMFIF_CHGBODY was not set when <a href="smfi_register.html">smfi_register</a> was called.
|
||||
</ul>
|
||||
Otherwise, it will return MI_SUCCESS.
|
||||
</TD>
|
||||
</TR>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!----------- Notes ---------->
|
||||
<TR align="left" valign=top>
|
||||
<TH>NOTES</TH>
|
||||
<TD>
|
||||
<UL>
|
||||
<LI>Since the message body may be very large, setting SMFIF_CHGBODY may significantly affect filter performance.
|
||||
<LI>If a filter sets SMFIF_CHGBODY but does not call smfi_replacebody, the original body remains unchanged.
|
||||
<LI>For smfi_replacebody, filter order is important. <B>Later filters will see the new body contents created by earlier ones.</B>
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
<tr align="left" valign=top>
|
||||
<th>NOTES</th>
|
||||
<td>
|
||||
<ul>
|
||||
<li>Since the message body may be very large, setting SMFIF_CHGBODY may significantly affect filter performance.
|
||||
<li>If a filter sets SMFIF_CHGBODY but does not call smfi_replacebody, the original body remains unchanged.
|
||||
<li>For smfi_replacebody, filter order is important. <b>Later filters will see the new body contents created by earlier ones.</b>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,64 +1,63 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_setbacklog</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>smfi_setbacklog</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: smfi_setbacklog.html,v 1.6 2006/12/21 18:30:35 ca Exp $
|
||||
$Id: smfi_setbacklog.html,v 1.3 2003/03/05 19:57:54 ca Exp $
|
||||
-->
|
||||
<H1>smfi_setbacklog</H1>
|
||||
<h1>smfi_setbacklog</h1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<table border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
|
||||
<pre>
|
||||
#include <libmilter/mfapi.h>
|
||||
int smfi_setbacklog(
|
||||
int obacklog
|
||||
);
|
||||
</PRE>
|
||||
Set the filter's <CODE>listen(2)</CODE> backlog value.
|
||||
</TD></TR>
|
||||
</pre>
|
||||
Set the filter's listen backlog value.
|
||||
</td></tr>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=4>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>smfi_setbacklog should only be called before <A href="smfi_main.html">smfi_main</A>.</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>Sets the incoming socket backlog used by <CODE>listen(2)</CODE>.
|
||||
If smfi_setbacklog is not called, the operating system default is used.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<tr><th valign="top" align=left>DESCRIPTION</th><td>
|
||||
<table border="1" cellspacing=1 cellpadding=4>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Called When</th>
|
||||
<td>smfi_setbacklog should only be called before <a href="smfi_main.html">smfi_main</a>.</td>
|
||||
</tr>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Effects</th>
|
||||
<td>Sets the incoming socket backlog used by listen(). If smfi_setbacklog is not called, the operating system default is used.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!----------- Arguments ---------->
|
||||
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>obacklog</TD>
|
||||
<TD>The number of incoming connections to allow in the listen queue.
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<tr><th valign="top" align=left>ARGUMENTS</th><td>
|
||||
<table border="1" cellspacing=0>
|
||||
<tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
|
||||
<tr valign="top"><td>obacklog</td>
|
||||
<td>The number of incoming connections to allow in the listen queue.
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>RETURN VALUES</th>
|
||||
|
||||
<TD>smfi_setbacklog returns MI_FAILURE if obacklog is less than or equal
|
||||
to zero.</TD>
|
||||
</TR>
|
||||
<td>smfi_setbacklog returns MI_FAILURE if obacklog is less than or equal
|
||||
to zero.</td>
|
||||
</tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2002-2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,93 +1,92 @@
|
||||
<HTML>
|
||||
<HEAD><TITLE>smfi_setconn</TITLE></HEAD>
|
||||
<BODY>
|
||||
<html>
|
||||
<head><title>smfi_setconn</title></head>
|
||||
<body>
|
||||
<!--
|
||||
$Id: smfi_setconn.html,v 1.17 2006/12/21 18:30:35 ca Exp $
|
||||
$Id: smfi_setconn.html,v 1.14 2003/05/26 05:09:16 gshapiro Exp $
|
||||
-->
|
||||
<H1>smfi_setconn</H1>
|
||||
<h1>smfi_setconn</h1>
|
||||
|
||||
<TABLE border="0" cellspacing=4 cellpadding=4>
|
||||
<table border="0" cellspacing=4 cellpadding=4>
|
||||
<!---------- Synopsis ----------->
|
||||
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
|
||||
<PRE>
|
||||
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
|
||||
<pre>
|
||||
#include <libmilter/mfapi.h>
|
||||
int smfi_setconn(
|
||||
char *oconn;
|
||||
);
|
||||
</PRE>
|
||||
</pre>
|
||||
Set the socket through which this filter should communicate with sendmail.
|
||||
</TD></TR>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Description ---------->
|
||||
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
|
||||
<TABLE border="1" cellspacing=1 cellpadding=4>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Called When</TH>
|
||||
<TD>smfi_setconn must be called once before <A href="smfi_main.html">smfi_main</A>.</TD>
|
||||
</TR>
|
||||
<TR align="left" valign=top>
|
||||
<TH width="80">Effects</TH>
|
||||
<TD>Sets the socket through which the filter communicates with sendmail.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<tr><th valign="top" align=left>DESCRIPTION</th><td>
|
||||
<table border="1" cellspacing=1 cellpadding=4>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Called When</th>
|
||||
<td>smfi_setconn must be called once before <a href="smfi_main.html">smfi_main</a>.</td>
|
||||
</tr>
|
||||
<tr align="left" valign=top>
|
||||
<th width="80">Effects</th>
|
||||
<td>Sets the socket through which the filter communicates with sendmail.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!----------- Arguments ---------->
|
||||
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
|
||||
<TABLE border="1" cellspacing=0>
|
||||
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
|
||||
<TR valign="top"><TD>oconn</TD>
|
||||
<TD>The address of the desired communication socket.
|
||||
<tr><th valign="top" align=left>ARGUMENTS</th><td>
|
||||
<table border="1" cellspacing=0>
|
||||
<tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
|
||||
<tr valign="top"><td>oconn</td>
|
||||
<td>The address of the desired communication socket.
|
||||
The address should be a NULL-terminated string in "proto:address"
|
||||
format:
|
||||
<UL>
|
||||
<LI><CODE>{unix|local}:/path/to/file</CODE> -- A named pipe.
|
||||
<LI><CODE>inet:port@{hostname|ip-address}</CODE> -- An IPV4 socket.
|
||||
<LI><CODE>inet6:port@{hostname|ip-address}</CODE> -- An IPV6 socket.
|
||||
</UL>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<ul>
|
||||
<li><code>{unix|local}:/path/to/file</code> -- A named pipe.
|
||||
<li><code>inet:port@{hostname|ip-address}</code> -- An IPV4 socket.
|
||||
<li><code>inet6:port@{hostname|ip-address}</code> -- An IPV6 socket.
|
||||
</ul>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
|
||||
<!----------- Return values ---------->
|
||||
<TR>
|
||||
<TH valign="top" align=left>RETURN VALUES</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>RETURN VALUES</th>
|
||||
|
||||
<TD>smfi_setconn will not fail on an invalid address.
|
||||
The failure will only be detected in <A href="smfi_main.html">smfi_main</A>.
|
||||
<td>smfi_setconn will not fail on an invalid address.
|
||||
The failure will only be detected in <a href="smfi_main.html">smfi_main</a></td>.
|
||||
Nevertheless, smfi_setconn may fail for other reasons, e.g.,
|
||||
due to a lack of memory.
|
||||
</TD>
|
||||
</TR>
|
||||
</tr>
|
||||
|
||||
<TR>
|
||||
<TH valign="top" align=left>NOTES</TH>
|
||||
<tr>
|
||||
<th valign="top" align=left>NOTES</th>
|
||||
|
||||
<TD>
|
||||
<UL>
|
||||
<LI>If possible, filters should not run as root when communicating
|
||||
<td>
|
||||
<ul>
|
||||
<li>If possible, filters should not run as root when communicating
|
||||
over unix/local domain sockets.
|
||||
<LI>Unix/local sockets should have their permissions set to
|
||||
<li>Unix/local sockets should have their permissions set to
|
||||
0600 (read/write permission only for the socket's owner) or
|
||||
0660 (read/write permission for the socket's owner and group)
|
||||
which is useful if the sendmail RunAsUser option is used.
|
||||
The permissions for a unix/local domain socket are determined as
|
||||
usual by <CODE>umask</CODE>, which should be set to 007 or 077.
|
||||
usual by <code>umask</code>, which should be set to 007 or 077.
|
||||
Note some operating systems (e.g, Solaris) don't use the
|
||||
permissions of the socket. On those systems, place the socket in a
|
||||
protected directory.
|
||||
</UL>
|
||||
</TD>
|
||||
</TR>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</TABLE>
|
||||
</table>
|
||||
|
||||
<HR size="1">
|
||||
<FONT size="-1">
|
||||
<hr size="1">
|
||||
<font size="-1">
|
||||
Copyright (c) 2000, 2003 Sendmail, Inc. and its suppliers.
|
||||
All rights reserved.
|
||||
<BR>
|
||||
<br>
|
||||
By using this file, you agree to the terms and conditions set
|
||||
forth in the LICENSE.
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
||||
</font>
|
||||
</body>
|
||||
</html>
|
||||
Loaded 100 of 659 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user