mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-30 13:48:06 +00:00
postfix-2.6.0
This commit is contained in:
committed by
Viktor Dukhovni
parent
80146b6613
commit
eabaabc2f1
@@ -15039,7 +15039,7 @@ Apologies for any names omitted.
|
|||||||
Cleanup: OpenLDAP now provides a sane solution for conflicts
|
Cleanup: OpenLDAP now provides a sane solution for conflicts
|
||||||
with PAM ldap-over-tls. Victor Duchovni. File: global/dict_ldap.c.
|
with PAM ldap-over-tls. Victor Duchovni. File: global/dict_ldap.c.
|
||||||
|
|
||||||
20900304
|
20090304
|
||||||
|
|
||||||
Cleanup: skip over suspended or throttled queues while
|
Cleanup: skip over suspended or throttled queues while
|
||||||
looking for delivery requests. File: *qmgr/qmgr_transport.c.
|
looking for delivery requests. File: *qmgr/qmgr_transport.c.
|
||||||
@@ -15194,3 +15194,29 @@ Apologies for any names omitted.
|
|||||||
Bugfix: don't disable MIME parsing with smtp_header_checks,
|
Bugfix: don't disable MIME parsing with smtp_header_checks,
|
||||||
smtp_mime_header_checks, smtp_nested_header_checks or with
|
smtp_mime_header_checks, smtp_nested_header_checks or with
|
||||||
smtp_body_checks. Bug reported by Victor. File: smtp/smtp_proto.c.
|
smtp_body_checks. Bug reported by Victor. File: smtp/smtp_proto.c.
|
||||||
|
|
||||||
|
Code cleanups: respect VSTRING invariants by using VSTRING_RESET
|
||||||
|
and VSTRING_TERMINATE instead of directly groping the
|
||||||
|
underlying character buffer. Files: global/dsn_buf.c,
|
||||||
|
milter/milter8.c.
|
||||||
|
|
||||||
|
20090507
|
||||||
|
|
||||||
|
main.cf:tls_random_source now defaults to /dev/arandom on
|
||||||
|
OpenBSD. This device was introduced before Postfix development
|
||||||
|
began. Files: util/sys_defs.h, global/mail_params.h.
|
||||||
|
|
||||||
|
20090510
|
||||||
|
|
||||||
|
Code cleanups: while emulating SMTP client requests for
|
||||||
|
Milter applications, use user@domain form addresses as
|
||||||
|
required by the SMTP protocol, instead of bare usernames.
|
||||||
|
This avoids hard to debug errors from some Milter applications.
|
||||||
|
Files: cleanup/cleanup_envelope.c, cleanup/cleanup_extracted.c,
|
||||||
|
cleanup/cleanup_addr.c.
|
||||||
|
|
||||||
|
20090511
|
||||||
|
|
||||||
|
Code cleanups: don't clobber -o command-line arguments so
|
||||||
|
that Linux people can debug daemon command lines more easily.
|
||||||
|
Files: master/*server.c.
|
||||||
|
@@ -4,11 +4,11 @@ PPoossttffiixx bbeeffoorree--qquueeuuee MMiilltteerr s
|
|||||||
|
|
||||||
IInnttrroodduuccttiioonn
|
IInnttrroodduuccttiioonn
|
||||||
|
|
||||||
Postfix version 2.3 introduces support for the Sendmail version 8 Milter (mail
|
Postfix implements support for the Sendmail version 8 Milter (mail filter)
|
||||||
filter) protocol. This protocol is used by applications that run outside the
|
protocol. This protocol is used by applications that run outside the MTA to
|
||||||
MTA to inspect SMTP events (CONNECT, DISCONNECT), SMTP commands (HELO, MAIL
|
inspect SMTP events (CONNECT, DISCONNECT), SMTP commands (HELO, MAIL FROM,
|
||||||
FROM, etc.) as well as mail content (headers and body). All this happens before
|
etc.) as well as mail content (headers and body). All this happens before mail
|
||||||
mail is queued.
|
is queued.
|
||||||
|
|
||||||
The reason for adding Milter support to Postfix is that there exists a large
|
The reason for adding Milter support to Postfix is that there exists a large
|
||||||
collection of applications, not only to block unwanted mail, but also to verify
|
collection of applications, not only to block unwanted mail, but also to verify
|
||||||
@@ -17,10 +17,10 @@ DomainKeys) or to digitally sign mail (examples: DomainKeys Identified Mail
|
|||||||
(DKIM), DomainKeys). Having yet another Postfix-specific version of all that
|
(DKIM), DomainKeys). Having yet another Postfix-specific version of all that
|
||||||
software is a poor use of human and system resources.
|
software is a poor use of human and system resources.
|
||||||
|
|
||||||
Postfix version 2.4 implements all the requests of Sendmail version 8 Milter
|
The Milter protocol has evolved over time, and different Postfix versions
|
||||||
protocols up to version 4, including message body replacement (body replacement
|
implement different feature sets. See the workarounds and limitations sections
|
||||||
is not available with Postfix version 2.3). See, however, the workarounds and
|
at the end of this document for differences between Postfix and Sendmail
|
||||||
limitations sections at the end of this document.
|
implementations.
|
||||||
|
|
||||||
This document provides information on the following topics:
|
This document provides information on the following topics:
|
||||||
|
|
||||||
@@ -34,9 +34,9 @@ This document provides information on the following topics:
|
|||||||
HHooww MMiilltteerr aapppplliiccaattiioonnss pplluugg iinnttoo PPoossttffiixx
|
HHooww MMiilltteerr aapppplliiccaattiioonnss pplluugg iinnttoo PPoossttffiixx
|
||||||
|
|
||||||
The Postfix Milter implementation uses two different lists of mail filters: one
|
The Postfix Milter implementation uses two different lists of mail filters: one
|
||||||
list of filters that are used for SMTP mail only, and one list of filters that
|
list of filters for SMTP mail only, and one list of filters for non-SMTP mail.
|
||||||
are used for non-SMTP mail. The two lists have different capabilities, which is
|
The two lists have different capabilities, which is unfortunate. Avoiding this
|
||||||
unfortunate. Avoiding this would require major restructuring of Postfix.
|
would require major restructuring of Postfix.
|
||||||
|
|
||||||
* The SMTP-only filters handle mail that arrives via the Postfix smtpd(8)
|
* The SMTP-only filters handle mail that arrives via the Postfix smtpd(8)
|
||||||
server. They are typically used to filter unwanted mail and to sign mail
|
server. They are typically used to filter unwanted mail and to sign mail
|
||||||
@@ -56,7 +56,8 @@ For those who are familiar with the Postfix architecture, the figure below
|
|||||||
shows how Milter applications plug into Postfix. Names followed by a number are
|
shows how Milter applications plug into Postfix. Names followed by a number are
|
||||||
Postfix commands or server programs, while unnumbered names inside shaded areas
|
Postfix commands or server programs, while unnumbered names inside shaded areas
|
||||||
represent Postfix queues. To avoid clutter, the path for local submission is
|
represent Postfix queues. To avoid clutter, the path for local submission is
|
||||||
simplified (the OVERVIEW document has a more complete description).
|
simplified (the OVERVIEW document has a more complete description of the
|
||||||
|
Postfix architecture).
|
||||||
|
|
||||||
SMTP-only non-SMTP
|
SMTP-only non-SMTP
|
||||||
filters filters
|
filters filters
|
||||||
@@ -87,24 +88,20 @@ deals with C applications only. For these, you need an object library that
|
|||||||
implements the Sendmail 8 Milter protocol. Postfix currently does not provide
|
implements the Sendmail 8 Milter protocol. Postfix currently does not provide
|
||||||
such a library, but Sendmail does.
|
such a library, but Sendmail does.
|
||||||
|
|
||||||
On some Linux and *BSD distributions, the Sendmail libmilter library is
|
* The first option is to use a pre-compiled library. Some systems install the
|
||||||
installed by default. With this, applications such as dkim-milter and sid-
|
Sendmail libmilter library by default. With other systems, libmilter may be
|
||||||
milter build out of the box without requiring any tinkering:
|
provided by a package (called "sendmail-devel" on some Linux systems).
|
||||||
|
|
||||||
$ ggzzccaatt ddkkiimm--mmiilltteerr--xx..yy..zz..ttaarr..ggzz || ttaarr xxff --
|
Once libmilter is installed, applications such as dkim-milter and sid-
|
||||||
$ ccdd ddkkiimm--mmiilltteerr--xx..yy..zz
|
milter build out of the box without requiring any tinkering:
|
||||||
$ mmaakkee
|
|
||||||
[...lots of output omitted...]
|
|
||||||
|
|
||||||
On other platforms you have two options:
|
$ ggzzccaatt ddkkiimm--mmiilltteerr--xx..yy..zz..ttaarr..ggzz || ttaarr xxff --
|
||||||
|
$ ccdd ddkkiimm--mmiilltteerr--xx..yy..zz
|
||||||
|
$ mmaakkee
|
||||||
|
[...lots of output omitted...]
|
||||||
|
|
||||||
* Install the Sendmail libmilter object library and include files. On Linux
|
* The other option is to build the libmilter library from Sendmail source
|
||||||
systems, libmilter may be provided by the sendmail-devel package. After
|
code:
|
||||||
installing libmilter, build the Milter applications as described in the
|
|
||||||
preceding paragraph.
|
|
||||||
|
|
||||||
* Don't install the Sendmail libmilter library, but build the library from
|
|
||||||
Sendmail source code instead:
|
|
||||||
|
|
||||||
$ ggzzccaatt sseennddmmaaiill--xx..yy..zz..ttaarr..ggzz || ttaarr xxff --
|
$ ggzzccaatt sseennddmmaaiill--xx..yy..zz..ttaarr..ggzz || ttaarr xxff --
|
||||||
$ ccdd sseennddmmaaiill--xx..yy..zz//lliibbmmiilltteerr
|
$ ccdd sseennddmmaaiill--xx..yy..zz//lliibbmmiilltteerr
|
||||||
@@ -284,21 +281,21 @@ If the Postfix milter_protocol setting specifies a too high version, the
|
|||||||
libmilter library simply hangs up without logging a warning, and you see a
|
libmilter library simply hangs up without logging a warning, and you see a
|
||||||
Postfix warning message like one of the following:
|
Postfix warning message like one of the following:
|
||||||
|
|
||||||
postfix/smtpd[21045]: warning: milter inet:host:port: can't read packet
|
warning: milter inet:host:port: can't read packet header: Unknown error : 0
|
||||||
header: Unknown error : 0
|
warning: milter inet:host:port: can't read packet header: Success
|
||||||
postfix/cleanup[15190]: warning: milter inet:host:port: can't read packet
|
warning: milter inet:host:port: can't read SMFIC_DATA reply packet header:
|
||||||
header: Success
|
No such file or directory
|
||||||
|
|
||||||
The remedy is to lower the Postfix milter_protocol version number.
|
The remedy is to lower the Postfix milter_protocol version number.
|
||||||
|
|
||||||
MMiilltteerr pprroottooccooll ttiimmeeoouuttss
|
MMiilltteerr pprroottooccooll ttiimmeeoouuttss
|
||||||
|
|
||||||
Postfix uses different time limits at different Milter protocol stages. The
|
Postfix uses different time limits at different Milter protocol stages. The
|
||||||
table shows wich timeouts are used and when (EOH = end of headers; EOM = end of
|
table shows the timeout settings and the corresponding protocol stages (EOH =
|
||||||
message).
|
end of headers; EOM = end of message).
|
||||||
|
|
||||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|PPaarraammeetteerr |TTiimmee lliimmiitt|PPrroottooccooll ssttaaggee |
|
|PPoossttffiixx ppaarraammeetteerr |TTiimmee lliimmiitt|MMiilltteerr pprroottooccooll ssttaaggee |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|milter_connect_timeout|30s |CONNECT |
|
|milter_connect_timeout|30s |CONNECT |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
@@ -307,26 +304,27 @@ message).
|
|||||||
|milter_content_timeout|300s |HEADER, EOH, BODY, EOM |
|
|milter_content_timeout|300s |HEADER, EOH, BODY, EOM |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|
|
||||||
Beware: 30s may be too short for applications doing lots of DNS lookups.
|
Beware: 30s may be too short for Milter applications that do lots of DNS
|
||||||
However, if you increase the above timeouts too much, remote SMTP clients may
|
lookups. However, if you increase the above timeouts too much, remote SMTP
|
||||||
hang up and mail may be delivered multiple times. This is an inherent problem
|
clients may hang up and mail may be delivered multiple times. This is an
|
||||||
with before-queue filtering.
|
inherent problem with before-queue filtering.
|
||||||
|
|
||||||
SSeennddmmaaiill mmaaccrroo eemmuullaattiioonn
|
SSeennddmmaaiill mmaaccrroo eemmuullaattiioonn
|
||||||
|
|
||||||
Postfix emulates a limited number of Sendmail macros, as shown in the table.
|
Postfix emulates a limited number of Sendmail macros, as shown in the table.
|
||||||
Some macro values depend on whether a recipient is rejected (rejected
|
Some macro values depend on whether a recipient is rejected (rejected
|
||||||
recipients are available on request by the Milter application). Different
|
recipients are available on request by the Milter application). Different
|
||||||
macros are available at different SMTP protocol stages (EOH = end-of-header,
|
macros are available at different Milter protocol stages (EOH = end-of-header,
|
||||||
EOM = end-of-message); their availability is not always the same as in
|
EOM = end-of-message); their availability is not always the same as in
|
||||||
Sendmail. See the workarounds section below for solutions.
|
Sendmail. See the workarounds section below for solutions.
|
||||||
|
|
||||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|NNaammee |AAvvaaiillaabbiilliittyy |DDeessccrriippttiioonn |
|
|SSeennddmmaaiill mmaaccrroo |MMiilltteerr pprroottooccooll ssttaaggee |DDeessccrriippttiioonn |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|i |DATA, EOH, EOM |Queue ID |
|
|i |DATA, EOH, EOM |Queue ID, also Postfix |
|
||||||
|
| | |queue file name |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|j |Always |value of myhostname |
|
|j |Always |Value of myhostname |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|_ |Always |The validated client name |
|
|_ |Always |The validated client name |
|
||||||
| | |and address |
|
| | |and address |
|
||||||
@@ -372,24 +370,24 @@ Sendmail. See the workarounds section below for solutions.
|
|||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|{mail_addr} |MAIL |Sender address |
|
|{mail_addr} |MAIL |Sender address |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|{mail_host} |MAIL (Postfix >= 2.6) |Sender next-hop |
|
|{mail_host} |MAIL (Postfix >= 2.6, |Sender next-hop |
|
||||||
| | |destination |
|
| |only with smtpd_milters) |destination |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|{mail_mailer} |MAIL (Postfix >= 2.6) |Sender mail delivery |
|
|{mail_mailer} |MAIL (Postfix >= 2.6, |Sender mail delivery |
|
||||||
| | |transport |
|
| |only with smtpd_milters) |transport |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
| | |Recipient address |
|
| | |Recipient address |
|
||||||
|{rcpt_addr} |RCPT |With rejected recipient: |
|
|{rcpt_addr} |RCPT |With rejected recipient: |
|
||||||
| | |descriptive text |
|
| | |descriptive text |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
| | |Recipient next-hop |
|
| | |Recipient next-hop |
|
||||||
|{rcpt_host} |RCPT (Postfix >= 2.6) |destination |
|
|{rcpt_host} |RCPT (Postfix >= 2.6, |destination |
|
||||||
| | |With rejected recpient: |
|
| |only with smtpd_milters) |With rejected recipient: |
|
||||||
| | |enhanced status code |
|
| | |enhanced status code |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
| | |Recipient mail delivery |
|
| | |Recipient mail delivery |
|
||||||
|{rcpt_mailer} |RCPT (Postfix >= 2.6) |transport |
|
|{rcpt_mailer} |RCPT (Postfix >= 2.6, |transport |
|
||||||
| | |With rejected recipient: |
|
| |only with smtpd_milters) |With rejected recipient: |
|
||||||
| | |"error" |
|
| | |"error" |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|{tls_version} |HELO, MAIL, DATA, EOH, |TLS protocol version |
|
|{tls_version} |HELO, MAIL, DATA, EOH, |TLS protocol version |
|
||||||
@@ -398,41 +396,52 @@ Sendmail. See the workarounds section below for solutions.
|
|||||||
|v |Always |value of milter_macro_v |
|
|v |Always |value of milter_macro_v |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|
|
||||||
Postfix sends specific sets of macros at different SMTP protocol stages. The
|
Postfix sends specific sets of macros at different Milter protocol stages. The
|
||||||
sets are configured with the parameters as described in the table (EOH = end of
|
sets are configured with the parameters as described in the table (EOH = end of
|
||||||
headers; EOM = end of message). The protocol version is a number that Postfix
|
headers; EOM = end of message). The protocol version is a number that Postfix
|
||||||
sends at the beginning of the Milter protocol handshake.
|
sends at the beginning of the Milter protocol handshake.
|
||||||
|
|
||||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
As of Sendmail 8.14.0, Milter applications can specify what macros they want to
|
||||||
|PPaarraammeetteerr nnaammee |PPrroottooccooll vveerrssiioonn|PPrroottooccooll ssttaaggee |
|
receive at different Milter protocol stages. An application-specified list
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
takes precedence over a Postfix-specified list.
|
||||||
|milter_connect_macros |2 or higher |CONNECT |
|
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|milter_helo_macros |2 or higher |HELO/EHLO |
|
|PPoossttffiixx ppaarraammeetteerr |MMiilltteerr pprroottooccooll|MMiilltteerr pprroottooccooll ssttaaggee|
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
| |vveerrssiioonn | |
|
||||||
|milter_mail_macros |2 or higher |MAIL FROM |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|milter_connect_macros |2 or higher |CONNECT |
|
||||||
|milter_rcpt_macros |2 or higher |RCPT TO |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|milter_helo_macros |2 or higher |HELO/EHLO |
|
||||||
|milter_data_macros |4 or higher |DATA |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|milter_mail_macros |2 or higher |MAIL FROM |
|
||||||
|milter_end_of_header_macros |6 or higher |EOH |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|milter_rcpt_macros |2 or higher |RCPT TO |
|
||||||
|milter_end_of_data_macros |2 or higher |EOM |
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|milter_data_macros |4 or higher |DATA |
|
||||||
|milter_unknown_command_macros|3 or higher |unknown command|
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
|milter_end_of_header_macros |6 or higher |EOH |
|
||||||
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|
|milter_end_of_data_macros |2 or higher |EOM |
|
||||||
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|
|milter_unknown_command_macros|3 or higher |unknown command |
|
||||||
|
|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|
|
||||||
WWoorrkkaarroouunnddss
|
WWoorrkkaarroouunnddss
|
||||||
|
|
||||||
Content filters may break DKIM etc. signatures. If you use an SMTP-based
|
* To avoid breaking DKIM etc. signatures with an SMTP-based content filter,
|
||||||
content filter, then you should add a line to master.cf with "-
|
update the before-filter SMTP client in master.cf, and add a line with "-
|
||||||
o disable_mime_output_conversion=yes" (note: no spaces around the "="), as
|
o disable_mime_output_conversion=yes" (note: no spaces around the "="). For
|
||||||
described in the advanced content filter example.
|
details, see the advanced content filter example.
|
||||||
|
|
||||||
Sendmail Milter applications were originally developed for the Sendmail version
|
/etc/postfix/master.cf:
|
||||||
8 MTA, which has a different architecture than Postfix. The result is that some
|
# =============================================================
|
||||||
Milter applications make assumptions that aren't true in a Postfix environment.
|
# service type private unpriv chroot wakeup maxproc command
|
||||||
|
# (yes) (yes) (yes) (never) (100)
|
||||||
|
# =============================================================
|
||||||
|
scan unix - - n - 10 smtp
|
||||||
|
-o smtp_send_xforward_command=yes
|
||||||
|
-o disable_mime_output_conversion=yes
|
||||||
|
-o smtp_generic_maps=
|
||||||
|
|
||||||
* Some Milter applications use the "{if_addr}" macro to recognize local mail;
|
* Some Milter applications use the "{if_addr}" macro to recognize local mail;
|
||||||
this macro does not exist in Postfix. Workaround: use the "{client_addr}"
|
this macro does not exist in Postfix. Workaround: use the "{client_addr}"
|
||||||
@@ -447,70 +456,47 @@ Milter applications make assumptions that aren't true in a Postfix environment.
|
|||||||
X-SenderID: Sendmail Sender-ID Filter vx.y.z host.example.com <unknown-
|
X-SenderID: Sendmail Sender-ID Filter vx.y.z host.example.com <unknown-
|
||||||
msgid>
|
msgid>
|
||||||
|
|
||||||
This happens because those Milter applications expect that the queue ID is
|
The problem is that Milter applications expect that the queue ID is known
|
||||||
known before the MTA accepts the MAIL FROM (sender) command. Postfix, on
|
before the MTA accepts the MAIL FROM (sender) command. Postfix does not
|
||||||
the other hand, does not choose a queue file name until after it accepts
|
choose a queue ID, which is used as the queue file name, until after it
|
||||||
the first valid RCPT TO (recipient) command (Postfix queue file names must
|
accepts the first valid RCPT TO (recipient) command.
|
||||||
be unique across multiple directories, so the name can't be chosen before
|
|
||||||
the file is created; if multiple messages were to use the same queue ID
|
|
||||||
simultaneously, mail would be lost).
|
|
||||||
|
|
||||||
If you experience the ugly header problem, see if a recent version of the
|
If you experience the ugly header problem, see if a recent version of the
|
||||||
Milter application fixes it. For example, current versions of dkim-filter and
|
Milter application fixes it. For example, current versions of dkim-filter
|
||||||
dk-filter already have code that looks up the Postfix queue ID at a later
|
and dk-filter already have code that looks up the Postfix queue ID at a
|
||||||
protocol stage.
|
later protocol stage, and sid-filter version 1.0.0 no longer includes the
|
||||||
|
queue ID in the message header.
|
||||||
|
|
||||||
To fix the ugly message header with sid-filter applications, we change the
|
To fix the ugly message header, you will need to add code that looks up the
|
||||||
source code, so that it does the queue ID lookup after Postfix receives the end
|
Postfix queue ID at some later point im time. The example below adds the
|
||||||
of the message.
|
lookup after the end-of-message.
|
||||||
|
|
||||||
* Edit the filter source file (named sid-filter/sid-filter.c).
|
o Edit the filter source file (typically named xxx-filter/xxx-filter.c or
|
||||||
|
similar).
|
||||||
|
|
||||||
* Look up the smfilter table and replace mlfi_eoh by NULL.
|
o Look up the mlfi_eom() function and add code near the top shown as bboolldd
|
||||||
|
text below:
|
||||||
|
|
||||||
* Look up the mlfi_eom() function and add code near the top that calls
|
dfc = cc->cctx_msg;
|
||||||
mlfi_eoh() as shown by the bboolldd text below:
|
assert(dfc != NULL);
|
||||||
|
|
||||||
assert(ctx != NULL);
|
//** DDeetteerrmmiinnee tthhee jjoobb IIDD ffoorr llooggggiinngg.. **//
|
||||||
#endif /* !DEBUG */
|
iiff ((ddffcc-->>mmccttxx__jjoobbiidd ==== 00 |||| ssttrrccmmpp((ddffcc-->>mmccttxx__jjoobbiidd,, JJOOBBIIDDUUNNKKNNOOWWNN)) ==== 00))
|
||||||
|
{{
|
||||||
|
cchhaarr **jjoobbiidd == ssmmffii__ggeettssyymmvvaall((ccttxx,, ""ii""));;
|
||||||
|
iiff ((jjoobbiidd !!== 00))
|
||||||
|
ddffcc-->>mmccttxx__jjoobbiidd == jjoobbiidd;;
|
||||||
|
}}
|
||||||
|
|
||||||
rreett == mmllffii__eeoohh((ccttxx));;
|
NOTES:
|
||||||
iiff ((rreett !!== SSMMFFIISS__CCOONNTTIINNUUEE))
|
|
||||||
rreettuurrnn rreett;;
|
|
||||||
|
|
||||||
NOTES:
|
o Different mail filters use slightly different names for variables. If
|
||||||
|
the above code does not compile, look elsewhere in the mail filter
|
||||||
|
source file for code that looks up the "i" macro value, and copy that
|
||||||
|
code.
|
||||||
|
|
||||||
* This was tested with sid-milter-0.2.10 and sid-milter-0.2.14.
|
o This change fixes only the ugly message header, but not the WARNING
|
||||||
|
message. Fortunately, many Milters log that message only once.
|
||||||
To fix the ugly message header with other Milter applications, you will need to
|
|
||||||
do something like this:
|
|
||||||
|
|
||||||
* Edit the filter source file (typically named xxx-filter/xxx-filter.c or
|
|
||||||
similar).
|
|
||||||
|
|
||||||
* Look up the mlfi_eom() function and add code near the top shown as bboolldd
|
|
||||||
text below:
|
|
||||||
|
|
||||||
dfc = cc->cctx_msg;
|
|
||||||
assert(dfc != NULL);
|
|
||||||
|
|
||||||
//** DDeetteerrmmiinnee tthhee jjoobb IIDD ffoorr llooggggiinngg.. **//
|
|
||||||
iiff ((ddffcc-->>mmccttxx__jjoobbiidd ==== 00 |||| ssttrrccmmpp((ddffcc-->>mmccttxx__jjoobbiidd,, JJOOBBIIDDUUNNKKNNOOWWNN)) ==== 00)) {{
|
|
||||||
cchhaarr **jjoobbiidd == ssmmffii__ggeettssyymmvvaall((ccttxx,, ""ii""));;
|
|
||||||
iiff ((jjoobbiidd !!== 00))
|
|
||||||
ddffcc-->>mmccttxx__jjoobbiidd == jjoobbiidd;;
|
|
||||||
}}
|
|
||||||
|
|
||||||
/* get hostname; used in the X header and in new MIME boundaries */
|
|
||||||
|
|
||||||
NOTES:
|
|
||||||
|
|
||||||
* Different mail filters use slightly different names for variables. If the
|
|
||||||
above code does not compile, look for the code at the start of the mlfi_eoh
|
|
||||||
() routine.
|
|
||||||
|
|
||||||
* This fixes only the ugly message header, but not the WARNING message.
|
|
||||||
Fortunately, many Milters log that message only once.
|
|
||||||
|
|
||||||
LLiimmiittaattiioonnss
|
LLiimmiittaattiioonnss
|
||||||
|
|
||||||
@@ -519,21 +505,39 @@ limitations will be removed as the implementation is extended over time. Of
|
|||||||
course the usual limitations of before-queue filtering will always apply. See
|
course the usual limitations of before-queue filtering will always apply. See
|
||||||
the CONTENT_INSPECTION_README document for a discussion.
|
the CONTENT_INSPECTION_README document for a discussion.
|
||||||
|
|
||||||
|
* The Milter protocol has evolved over time. Therefore, different Postfix
|
||||||
|
versions implement different feature sets.
|
||||||
|
|
||||||
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|
|PPoossttffiixx|SSuuppppoorrtteedd MMiilltteerr rreeqquueessttss |
|
||||||
|
|_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|
| 2.6 |All Milter requests of Sendmail 8.14.0 (see notes below). |
|
||||||
|
|_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|
| |All Milter requests of Sendmail 8.14.0, except: |
|
||||||
|
| |SMFIP_RCPT_REJ (report rejected recipients to the mail filter), |
|
||||||
|
| 2.5 |SMFIR_CHGFROM (replace sender, with optional ESMTP parameters), |
|
||||||
|
| |SMFIR_ADDRCPT_PAR (add recipient, with optional ESMTP |
|
||||||
|
| |parameters). |
|
||||||
|
|_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|
| 2.4 |All Milter requests of Sendmail 8.13.0. |
|
||||||
|
|_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|
| 2.3 |All Milter requests of Sendmail 8.13.0, except: |
|
||||||
|
| |SMFIR_REPLBODY (replace message body). |
|
||||||
|
|_ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
|
||||||
|
|
||||||
* For Milter applications that are written in C, you need to use the Sendmail
|
* For Milter applications that are written in C, you need to use the Sendmail
|
||||||
libmilter library.
|
libmilter library.
|
||||||
|
|
||||||
* There are TWO sets of mail filters: filters that are used for SMTP mail
|
* Postfix has TWO sets of mail filters: filters that are used for SMTP mail
|
||||||
only (specified with the smtpd_milters parameter), and filters for non-SMTP
|
only (specified with the smtpd_milters parameter), and filters for non-SMTP
|
||||||
mail (specified with the non_smtpd_milters parameter). The non-SMTP filters
|
mail (specified with the non_smtpd_milters parameter). The non-SMTP filters
|
||||||
are primarily for local submissions.
|
are primarily for local submissions.
|
||||||
|
|
||||||
o When mail is filtered by non-SMTP filters, the Postfix cleanup(8)
|
When mail is filtered by non_smtpd_milters, the Postfix cleanup(8) server
|
||||||
server has to simulate the SMTP client CONNECT and DISCONNECT events,
|
has to simulate SMTP client requests. This works as expected, with only one
|
||||||
and the SMTP client EHLO, MAIL FROM, RCPT TO and DATA commands. This
|
exception: non_smtpd_milters must not REJECT or TEMPFAIL simulated RCPT TO
|
||||||
works as expected, with only one exception: non-SMTP filters must not
|
commands. When this rule is violated, Postfix will report a configuration
|
||||||
REJECT or TEMPFAIL simulated RCPT TO commands. When a non-SMTP filter
|
error, and mail will stay in the queue.
|
||||||
REJECTs or TEMPFAILs a recipient, Postfix will report a configuration
|
|
||||||
error, and mail will stay in the queue.
|
|
||||||
|
|
||||||
* Postfix currently does not apply content filters to mail that is forwarded
|
* Postfix currently does not apply content filters to mail that is forwarded
|
||||||
or aliased internally, or to mail that is generated internally such as
|
or aliased internally, or to mail that is generated internally such as
|
||||||
@@ -545,43 +549,22 @@ the CONTENT_INSPECTION_README document for a discussion.
|
|||||||
command information; they have no access to the message header or body, and
|
command information; they have no access to the message header or body, and
|
||||||
cannot make modifications to the message or to the envelope.
|
cannot make modifications to the message or to the envelope.
|
||||||
|
|
||||||
* Postfix version 2.6 implements all Sendmail 8.14 Milter features, except it
|
* Postfix 2.6 ignores the optional ESMTP parameters in requests to replace
|
||||||
ignores the optional ESMTP command parameters with requests to replace the
|
the sender (SMFIR_CHGFROM) or to append a recipient (SMFIR_ADDRCPT_PAR).
|
||||||
sender (SMFIR_CHGFROM), or to append a recipient (SMFIR_ADDRCPT_PAR). When
|
Postfix logs a warning message when a Milter application supplies such
|
||||||
a Milter application supplies ESMTP command parameters, these are logged as
|
ESMTP parameters:
|
||||||
follows:
|
|
||||||
|
|
||||||
postfix/cleanup[40629]: warning: 100B22B3293: cleanup_chg_from: ignoring
|
warning: queue-id: cleanup_chg_from: ignoring ESMTP arguments "whatever"
|
||||||
ESMTP arguments "whatever"
|
warning: queue-id: cleanup_add_rcpt: ignoring ESMTP arguments "whatever"
|
||||||
|
|
||||||
Specify "milter_protocol = 6" to enable all available Sendmail 8.14 and
|
* Postfix 2.3 does not implement requests to replace the message body. Milter
|
||||||
earlier Milter features.
|
applications log a warning message when they need this unsupported
|
||||||
|
operation:
|
||||||
|
|
||||||
* Postfix version 2.5 implements all Sendmail 8.14 Milter features except:
|
st_optionneg[134563840]: 0x3d does not fulfill action requirements 0x1e
|
||||||
SMFIP_RCPT_REJ (report rejected recipients to the mail filter),
|
|
||||||
SMFIR_CHGFROM (replace sender, with optional ESMTP command parameters), and
|
|
||||||
SMFIR_ADDRCPT_PAR (add recipient, with optional ESMTP command parameters).
|
|
||||||
|
|
||||||
Specify "milter_protocol = 6" to enable all available Sendmail 8.14 and
|
|
||||||
earlier Milter features.
|
|
||||||
|
|
||||||
* Postfix 2.4 implements all Sendmail 8.13 Milter features.
|
|
||||||
|
|
||||||
Specify "milter_protocol = 4" to enable all available Sendmail 8.13 and
|
|
||||||
earlier Milter features.
|
|
||||||
|
|
||||||
* Postfix 2.3 implements all Sendmail 8.13 Milter features except requests to
|
|
||||||
replace the message body. Milter applications that request this unsupported
|
|
||||||
operation will log a warning like
|
|
||||||
|
|
||||||
application name: st_optionneg[134563840]: 0x3d does not fulfill action
|
|
||||||
requirements 0x1e
|
|
||||||
|
|
||||||
The solution is to use Postfix version 2.4 or later.
|
The solution is to use Postfix version 2.4 or later.
|
||||||
|
|
||||||
Specify "milter_protocol = 4" to enable all available Sendmail 8.13 and
|
|
||||||
earlier Milter features.
|
|
||||||
|
|
||||||
* Most Milter configuration options are global. Future Postfix versions may
|
* Most Milter configuration options are global. Future Postfix versions may
|
||||||
support per-Milter timeouts, per-Milter error handling, etc.
|
support per-Milter timeouts, per-Milter error handling, etc.
|
||||||
|
|
||||||
|
@@ -196,11 +196,12 @@ use something like this:
|
|||||||
NOTES:
|
NOTES:
|
||||||
|
|
||||||
* Lines 2, 11: the Postfix spawn(8) daemon by default kills its child process
|
* Lines 2, 11: the Postfix spawn(8) daemon by default kills its child process
|
||||||
after 1000 seconds. This is too short for a policy daemon that may run for
|
after 1000 seconds. This is too short for a policy daemon that may need to
|
||||||
as long as an SMTP client is connected to an SMTP server process. The
|
run for as long as the SMTP server process that talks to it. The default
|
||||||
default time limit is overruled in main.cf with an explicit
|
time limit is overruled in main.cf with an explicit "policy_time_limit"
|
||||||
"policy_time_limit" setting. The name of the parameter is the name of the
|
setting. The name of the parameter is the name of the master.cf entry
|
||||||
master.cf entry ("policy") concatenated with the "_time_limit" suffix.
|
("policy") concatenated with the "_time_limit" suffix. See spawn(8) for
|
||||||
|
more information about the time limit parameter.
|
||||||
|
|
||||||
* Line 2: specify a "0" process limit instead of the default "-", to avoid
|
* Line 2: specify a "0" process limit instead of the default "-", to avoid
|
||||||
"connection refused" and other problems when the smtpd process limit
|
"connection refused" and other problems when the smtpd process limit
|
||||||
|
@@ -1,92 +1,27 @@
|
|||||||
The stable Postfix release is called postfix-2.5.x where 2=major
|
The stable Postfix release is called postfix-2.6.x where 2=major
|
||||||
release number, 5=minor release number, x=patchlevel. The stable
|
release number, 6=minor release number, x=patchlevel. The stable
|
||||||
release never changes except for patches that address bugs or
|
release never changes except for patches that address bugs or
|
||||||
emergencies. Patches change the patchlevel and the release date.
|
emergencies. Patches change the patchlevel and the release date.
|
||||||
|
|
||||||
New features are developed in snapshot releases. These are called
|
New features are developed in snapshot releases. These are called
|
||||||
postfix-2.6-yyyymmdd where yyyymmdd is the release date (yyyy=year,
|
postfix-2.7-yyyymmdd where yyyymmdd is the release date (yyyy=year,
|
||||||
mm=month, dd=day). Patches are never issued for snapshot releases;
|
mm=month, dd=day). Patches are never issued for snapshot releases;
|
||||||
instead, a new snapshot is released.
|
instead, a new snapshot is released.
|
||||||
|
|
||||||
The mail_release_date configuration parameter (format: yyyymmdd)
|
The mail_release_date configuration parameter (format: yyyymmdd)
|
||||||
specifies the release date of a stable release or snapshot release.
|
specifies the release date of a stable release or snapshot release.
|
||||||
|
|
||||||
Incompatibility with snapshot 20090428
|
If you upgrade from Postfix 2.4 or earlier, read RELEASE_NOTES-2.5
|
||||||
======================================
|
before proceeding.
|
||||||
|
|
||||||
The Postfix SMTP client(!) no longer tries to use the obsolete SSLv2
|
Major changes - multi-instance support
|
||||||
protocol by default, as this may prevent the use of modern SSL
|
--------------------------------------
|
||||||
features. Lack of SSLv2 support should never be a problem, since
|
|
||||||
SSLv3 was defined in 1996, and TLSv1 in 2006, but you can undo the
|
|
||||||
change by specifying empty main.cf values for smtp_tls_protocols
|
|
||||||
and lmtp_tls_protocols. The Postfix SMTP server maintains SSLv2
|
|
||||||
support for backwards compatibility with ancient clients.
|
|
||||||
|
|
||||||
The default Milter protocol version is increased from 2 to 6; this
|
[Feature 20090121] Support for managing multiple Postfix instances.
|
||||||
enables all available features up to and including Sendmail 8.14.0.
|
This can automatically apply your "postfix start" etc. command to
|
||||||
The new milter_protocol setting may break compatibility with older
|
multiple Postfix instances, including upgrades to new Postfix
|
||||||
Milter libraries or applications, and may cause Postfix to log
|
versions. Multi-instance support allows you to do the following
|
||||||
warning messages such as:
|
and more:
|
||||||
|
|
||||||
postfix/smtpd[21045]: warning: milter inet:host:port: can't read packet
|
|
||||||
header: Unknown error : 0
|
|
||||||
postfix/cleanup[15190]: warning: milter inet:host:port: can't read packet
|
|
||||||
header: Success
|
|
||||||
|
|
||||||
To restore compatibility, specify "milter_protocol = 2" in main.cf.
|
|
||||||
|
|
||||||
Major changes with snapshot 20090428
|
|
||||||
====================================
|
|
||||||
|
|
||||||
The following improvements have been made to the Milter implementation:
|
|
||||||
|
|
||||||
- Improved compatibility of the {mail_addr} and {rcpt_addr} macros.
|
|
||||||
|
|
||||||
- Support for the {mail_host}, {mail_mailer}, {rcpt_host} and
|
|
||||||
{rcpt_mailer} macros.
|
|
||||||
|
|
||||||
- Milter applications can now request rejected recipients with the
|
|
||||||
SMFIP_RCPT_REJ feature. Rejected recipients are reported with
|
|
||||||
{rcpt_mailer} = "error", {rcpt_host} = enhanced status code, and
|
|
||||||
{rcpt_addr} = descriptive text. This feature requires "milter_protocol
|
|
||||||
= 6" or higher (default as of Postfix 2.6).
|
|
||||||
|
|
||||||
- Milters can now replace the envelope sender address with the
|
|
||||||
SMFIR_CHGFROM request, and can add recipients with SMFIR_ADDRCPT_PAR.
|
|
||||||
These implementations currently ignore ESMTP command parameters
|
|
||||||
with a warning message as follows:
|
|
||||||
|
|
||||||
postfix/cleanup[40629]: warning: 100B22B3293: cleanup_chg_from:
|
|
||||||
ignoring ESMTP arguments "whatever"
|
|
||||||
|
|
||||||
Incompatibility with snapshot 20090330
|
|
||||||
======================================
|
|
||||||
|
|
||||||
Postfix now adds (Resent-) From:, Date:, Message-ID: or To: headers
|
|
||||||
only when clients match $local_header_rewrite_clients. Specify
|
|
||||||
"always_add_missing_headers = yes" for backwards compatibility.
|
|
||||||
Adding such headers can break DKIM signatures that cover headers
|
|
||||||
that are not present.
|
|
||||||
|
|
||||||
This changes the appearance of Postfix logging: to preserve
|
|
||||||
compatibility with existing logfile processing software, Postfix
|
|
||||||
will log ``message-id=<>'' for messages without Message-Id header.
|
|
||||||
|
|
||||||
Major changes with snapshot 20090212
|
|
||||||
====================================
|
|
||||||
|
|
||||||
Stress-dependent behavior by default. Under conditions of overload,
|
|
||||||
smtpd_timeout is reduced from 300s to to 10s, smtpd_hard_error_limit
|
|
||||||
is reduced from 20 to 1, and smtpd_junk_command_limit is reduced
|
|
||||||
from 100 to 1. This will reduce the delays for most legitimate mail.
|
|
||||||
|
|
||||||
Major changes with snapshot 20090121
|
|
||||||
====================================
|
|
||||||
|
|
||||||
Plug-in support for managing multiple Postfix instances. This can
|
|
||||||
automatically apply your "postfix start" etc. command to multiple
|
|
||||||
Postfix instances, including upgrades to new Postfix versions.
|
|
||||||
Multi-instance support allows you to do the following and more:
|
|
||||||
|
|
||||||
- Simplify post-queue content filter configuration by using separate
|
- Simplify post-queue content filter configuration by using separate
|
||||||
Postfix instances before and after the filter. This simplifies
|
Postfix instances before and after the filter. This simplifies
|
||||||
@@ -116,23 +51,113 @@ approaching completion. A prototype version has been used internally
|
|||||||
at Morgan Stanley. This version will be adapted to the new plug-in
|
at Morgan Stanley. This version will be adapted to the new plug-in
|
||||||
API which makes some simplification possible.
|
API which makes some simplification possible.
|
||||||
|
|
||||||
Major changes with snapshot 20090109
|
Major changes - milter support
|
||||||
====================================
|
------------------------------
|
||||||
|
|
||||||
Support to selectively disable master(8) listener ports by service
|
[Feature 20090428] The following improvements have been made to the
|
||||||
type or by service name + type. Specify a list of service types
|
Milter implementation:
|
||||||
("inet", "unix", "fifo", or "pass") or "name.type" tuples, where
|
|
||||||
"name" is the first field of a master.cf entry and "type" is a
|
|
||||||
service type. Examples: to turn off the main SMTP listener port,
|
|
||||||
use "master_service_disable = smtp.inet"; to turn off all TCP/IP
|
|
||||||
listeners, use "master_service_disable = inet". Changing this
|
|
||||||
parameter requires "postfix reload".
|
|
||||||
|
|
||||||
Specify "tcp_windowsize = 65535" (or less) to work around routers
|
- Improved compatibility of the {mail_addr} and {rcpt_addr} macros.
|
||||||
with broken TCP window scaling implementations. This is perhaps
|
|
||||||
more convenient than collecting tcpdump output and tuning kernel
|
- Support for the {mail_host}, {mail_mailer}, {rcpt_host} and
|
||||||
parameters by hand. With Postfix TCP servers (smtpd(8), qmqpd(8)),
|
{rcpt_mailer} macros.
|
||||||
this feature is implemented by the Postfix master(8) daemon.
|
|
||||||
|
- Milter applications can now request rejected recipients with the
|
||||||
|
SMFIP_RCPT_REJ feature. Rejected recipients are reported with
|
||||||
|
{rcpt_mailer} = "error", {rcpt_host} = enhanced status code, and
|
||||||
|
{rcpt_addr} = descriptive text. This feature requires "milter_protocol
|
||||||
|
= 6" or higher (default as of Postfix 2.6).
|
||||||
|
|
||||||
|
- Milters can now replace the envelope sender address with the
|
||||||
|
SMFIR_CHGFROM request, and can add recipients with SMFIR_ADDRCPT_PAR.
|
||||||
|
These implementations ignore ESMTP command parameters and log a
|
||||||
|
warning message as follows:
|
||||||
|
|
||||||
|
warning: 100B22B3293: cleanup_chg_from: ignoring ESMTP arguments "whatever"
|
||||||
|
warning: 100B22B3293: cleanup_add_rcpt: ignoring ESMTP arguments "whatever"
|
||||||
|
|
||||||
|
[Incompat 20090428] The default milter_protocol setting is increased
|
||||||
|
from 2 to 6; this enables all available features up to and including
|
||||||
|
Sendmail 8.14.0. The new milter_protocol setting may break
|
||||||
|
compatibility with older Milter libraries or applications, and may
|
||||||
|
cause Postfix to log warning messages such as:
|
||||||
|
|
||||||
|
warning: milter inet:host:port: can't read packet header: Unknown error : 0
|
||||||
|
|
||||||
|
warning: milter inet:host:port: can't read packet header: Success
|
||||||
|
|
||||||
|
warning: milter inet:host:port: can't read SMFIC_DATA reply
|
||||||
|
packet header: No such file or directory
|
||||||
|
|
||||||
|
To restore compatibility, specify "milter_protocol = 2" in main.cf.
|
||||||
|
|
||||||
|
Major changes - security
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
[Incompat 20080726] When a mailbox file is not owned by its recipient,
|
||||||
|
the local and virtual delivery agents now log a warning and defer
|
||||||
|
delivery. Specify "strict_mailbox_ownership = no" to ignore such
|
||||||
|
ownership discrepancies.
|
||||||
|
|
||||||
|
Major changes - smtp server
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
[Feature 20080212] check_reverse_client_hostname_access, to make
|
||||||
|
access decisions based on the unverified client hostname. For
|
||||||
|
safety reasons an OK result is not allowed.
|
||||||
|
|
||||||
|
[Feature 20090210] With "reject_tempfail_action = defer", the Postfix
|
||||||
|
SMTP server immediately replies with a 4xx status after some temporary
|
||||||
|
error, instead of executing an implicit "defer_if_permit" action.
|
||||||
|
|
||||||
|
[Feature 20090215] The Postfix SMTP server automatically hangs up
|
||||||
|
after replying with "521". This makes overload handling more
|
||||||
|
effective. See also RFC 1846 for prior art on this topic.
|
||||||
|
|
||||||
|
[Feature 20090228] The Postfix SMTP server maintains a per-session
|
||||||
|
"improper command pipelining detected" flag. This flag can be tested
|
||||||
|
at any time with reject_unauth_pipelining, and is raised whenever
|
||||||
|
a client command is followed by unexpected commands or message
|
||||||
|
content. The Postfix SMTP server logs the first command pipelining
|
||||||
|
transgression as "improper command pipelining after <command> from
|
||||||
|
<hostname>[<hostaddress>]".
|
||||||
|
|
||||||
|
[Feature 20090212] Stress-dependent behavior is enabled by default.
|
||||||
|
Under conditions of overload, smtpd_timeout is reduced from 300s
|
||||||
|
to 10s, smtpd_hard_error_limit is reduced from 20 to 1, and
|
||||||
|
smtpd_junk_command_limit is reduced from 100 to 1. This will reduce
|
||||||
|
the impact of overload for most legitimate mail.
|
||||||
|
|
||||||
|
[Feature 20080629] The Postfix SMTP server's SASL authentication
|
||||||
|
was re-structured. With "smtpd_tls_auth_only = yes", SASL support
|
||||||
|
is now activated only after a successful TLS handshake. Earlier
|
||||||
|
Postfix SMTP server versions could complain about unavailable SASL
|
||||||
|
mechanisms during the plaintext phase of the SMTP protocol.
|
||||||
|
|
||||||
|
[Incompat 20080510] In the policy delegation protocol, certificate
|
||||||
|
common name attributes are now xtext encoded UTF-8. The xtext decoded
|
||||||
|
attributes may contain any UTF-8 value except non-printable ASCII
|
||||||
|
characters.
|
||||||
|
|
||||||
|
Major changes - performance
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
[Feature 20090215] The Postfix SMTP server automatically hangs up
|
||||||
|
after replying with "521". This makes overload handling more
|
||||||
|
effective. See also RFC 1846 for prior art on this topic.
|
||||||
|
|
||||||
|
[Feature 20090212] Stress-dependent behavior is enabled by default.
|
||||||
|
Under conditions of overload, smtpd_timeout is reduced from 300s
|
||||||
|
to 10s, smtpd_hard_error_limit is reduced from 20 to 1, and
|
||||||
|
smtpd_junk_command_limit is reduced from 100 to 1. This will reduce
|
||||||
|
the negative impact of server overload for most legitimate mail.
|
||||||
|
|
||||||
|
[Feature 20090109] Specify "tcp_windowsize = 65535" (or less) to
|
||||||
|
work around routers with broken TCP window scaling implementations.
|
||||||
|
This is perhaps more convenient than collecting tcpdump output and
|
||||||
|
tuning kernel parameters by hand. With Postfix TCP servers (smtpd(8),
|
||||||
|
qmqpd(8)), this feature is implemented by the Postfix master(8)
|
||||||
|
daemon.
|
||||||
|
|
||||||
To change this parameter without stopping Postfix, you need to first
|
To change this parameter without stopping Postfix, you need to first
|
||||||
terminate all Postfix TCP servers:
|
terminate all Postfix TCP servers:
|
||||||
@@ -154,69 +179,40 @@ lmtp(8)).
|
|||||||
Of course you can also do "postfix stop" and "postfix start",
|
Of course you can also do "postfix stop" and "postfix start",
|
||||||
but that is more disruptive.
|
but that is more disruptive.
|
||||||
|
|
||||||
Major changes with snapshot 20081010
|
Major changes - tls
|
||||||
====================================
|
-------------------
|
||||||
|
|
||||||
Controls for the protocols and ciphers that Postfix will use with
|
[Incompat 20090428] The Postfix SMTP client(!) no longer tries to
|
||||||
opportunistic TLS. The smtp_tls_protocols, smtp_tls_ciphers, and
|
use the obsolete SSLv2 protocol by default, as this may prevent the
|
||||||
equivalent parameters for lmtp and smtpd provide global settings;
|
use of modern SSL features. Lack of SSLv2 support should never be
|
||||||
the SMTP client TLS policy table provides ciphers and protocols
|
a problem, since SSLv3 was defined in 1996, and TLSv1 in 1999. You
|
||||||
settings for specific peers. Code by Victor Duchovni. Details are
|
can undo the change by specifying empty main.cf values for
|
||||||
given in the TLS_README and postconf(5) documents.
|
smtp_tls_protocols and lmtp_tls_protocols. The Postfix SMTP server
|
||||||
|
maintains SSLv2 support for backwards compatibility with ancient
|
||||||
|
clients.
|
||||||
|
|
||||||
Incompatibility with snapshot 20080814
|
[Feature 20081010] Controls for the protocols and ciphers that
|
||||||
======================================
|
Postfix will use with opportunistic TLS. The smtp_tls_protocols,
|
||||||
|
smtp_tls_ciphers, and equivalent parameters for lmtp and smtpd
|
||||||
|
provide global settings; the SMTP client TLS policy table provides
|
||||||
|
ciphers and protocols settings for specific peers. Code by Victor
|
||||||
|
Duchovni. Details are given in the TLS_README and postconf(5)
|
||||||
|
documents.
|
||||||
|
|
||||||
When a mailbox file is not owned by its recipient, the local and
|
[Feature 20081108] Elliptic curve support. This requires OpenSSL
|
||||||
virtual delivery agents now log a warning and defer delivery.
|
version 0.9.9 or later.
|
||||||
Specify "strict_mailbox_ownership = no" to ignore such ownership
|
|
||||||
discrepancies.
|
|
||||||
|
|
||||||
Incompatibility with snapshot 20080629
|
Major changes - address verification
|
||||||
======================================
|
------------------------------------
|
||||||
|
|
||||||
When TLS support is not compiled in, the Postfix SMTP server no
|
[Incompat 20080428] Postfix SMTP server replies for address
|
||||||
longer ignores the "smtpd_tls_auth_only = yes" parameter setting.
|
verification have changed. unverified_recipient_reject_code and
|
||||||
Earlier Postfix SMTP server versions would announce SASL support,
|
unverified_sender_reject_code now handle "5XX" rejects only. The
|
||||||
and would accept SASL login or sender information.
|
"4XX" rejects are now controlled with unverified_sender_defer_code
|
||||||
|
and unverified_recipient_defer_code.
|
||||||
|
|
||||||
Incompatibility with snapshot 20080726
|
[Feature 20080428] Finer control over the way Postfix reports address
|
||||||
======================================
|
verification failures to remote SMTP clients.
|
||||||
|
|
||||||
When a mailbox file is not owned by its recipient, the local and
|
|
||||||
virtual delivery agents now log a warning and defer delivery.
|
|
||||||
Specify "strict_mailbox_ownership = no" to ignore such ownership
|
|
||||||
discrepancies.
|
|
||||||
|
|
||||||
Major changes with snapshot 20080629
|
|
||||||
====================================
|
|
||||||
|
|
||||||
The Postfix SMTP server's SASL authentication was re-structured.
|
|
||||||
With "smtpd_tls_auth_only = yes", SASL support is now activated
|
|
||||||
only after a successful TLS handshake. Earlier Postfix SMTP server
|
|
||||||
versions could complain about unavailable SASL mechanisms during
|
|
||||||
the plaintext phase of the SMTP protocol.
|
|
||||||
|
|
||||||
Incompatibility with snapshot 20080510
|
|
||||||
======================================
|
|
||||||
|
|
||||||
In the policy delegation protocol, certificate common name attributes
|
|
||||||
are now xtext encoded UTF-8. The xtext decoded attributes may contain
|
|
||||||
any UTF-8 value except non-printable ASCII characters.
|
|
||||||
|
|
||||||
Incompatibility with snapshot 20080428
|
|
||||||
======================================
|
|
||||||
|
|
||||||
Postfix SMTP server replies for address verification have changed.
|
|
||||||
unverified_recipient_reject_code and unverified_sender_reject_code
|
|
||||||
now handle "5XX" rejects only. The "4XX" rejects are now controlled
|
|
||||||
with unverified_sender_defer_code and unverified_recipient_defer_code.
|
|
||||||
|
|
||||||
Major changes with snapshot 20080428
|
|
||||||
====================================
|
|
||||||
|
|
||||||
Finer control over the way that Postfix reports address verification
|
|
||||||
failures are reported to remote SMTP clients.
|
|
||||||
|
|
||||||
- unverified_sender/recipient_defer_code: the numerical Postfix
|
- unverified_sender/recipient_defer_code: the numerical Postfix
|
||||||
SMTP server reply code when address verification failed due
|
SMTP server reply code when address verification failed due
|
||||||
@@ -226,18 +222,84 @@ failures are reported to remote SMTP clients.
|
|||||||
will send to the remote SMTP client, instead of sending actual
|
will send to the remote SMTP client, instead of sending actual
|
||||||
address verification details.
|
address verification details.
|
||||||
|
|
||||||
Incompatible changes with snapshot 20080207
|
Major changes - dsn
|
||||||
===========================================
|
-------------------
|
||||||
|
|
||||||
According to discussions on the mailing list, too many people are
|
[Feature 20090307] New "lmtp_assume_final = yes" flag to send correct
|
||||||
breaking newly installed Postfix by overwriting the new /etc/postfix
|
DSN "success" notifications when LMTP delivery is "final" as opposed
|
||||||
files with versions from an older release, and end up with a broken
|
to delivery into a content filter.
|
||||||
configuration that cannot repair itself. For this reason, postfix-script,
|
|
||||||
postfix-files and post-install are moved away from /etc/postfix to
|
|
||||||
$daemon_directory.
|
|
||||||
|
|
||||||
Incompatible changes with Postfix 2.5.0
|
Major changes - file organization
|
||||||
=======================================
|
---------------------------------
|
||||||
|
|
||||||
|
[Incompat 20080207] According to discussions on the mailing list,
|
||||||
|
too many people are breaking newly installed Postfix by overwriting
|
||||||
|
the new /etc/postfix files with versions from an older release, and
|
||||||
|
end up with a broken configuration that cannot repair itself. For
|
||||||
|
this reason, postfix-script, postfix-files and post-install are
|
||||||
|
moved away from /etc/postfix to $daemon_directory.
|
||||||
|
|
||||||
|
Major changes - header rewriting
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
[Incompat 20090330] Postfix now adds (Resent-) From:, Date:,
|
||||||
|
Message-ID: or To: headers only when clients match
|
||||||
|
$local_header_rewrite_clients. Specify "always_add_missing_headers
|
||||||
|
= yes" for backwards compatibility. Adding such headers can break
|
||||||
|
DKIM signatures that cover headers that are not present.
|
||||||
|
compatibility with existing logfile processing software, Postfix
|
||||||
|
will log ``message-id=<>'' for messages without Message-Id header.
|
||||||
|
|
||||||
|
Major changes - lmtp client
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
[Feature 20090307] New "lmtp_assume_final = yes" flag to send correct
|
||||||
|
DSN "success" notifications when LMTP delivery is "final" as opposed
|
||||||
|
to delivery into a content filter.
|
||||||
|
|
||||||
|
Major changes - logging
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
[Incompat 20090330] Postfix now adds (Resent-) From:, Date:,
|
||||||
|
Message-ID: or To: headers only when clients match
|
||||||
|
$local_header_rewrite_clients. Specify "always_add_missing_headers
|
||||||
|
= yes" for backwards compatibility. Adding such headers can break
|
||||||
|
DKIM signatures that cover headers that are not present.
|
||||||
|
|
||||||
|
This changes the appearance of Postfix logging: to preserve
|
||||||
|
compatibility with existing logfile processing software, Postfix
|
||||||
|
will log ``message-id=<>'' for messages without Message-Id header.
|
||||||
|
|
||||||
|
Major changes - mime
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
[Feature 20080324] When the "postmap -q -" command reads lookup
|
||||||
|
keys from standard input, it now understands RFC822 and MIME message
|
||||||
|
format. Specify -h or -b to use headers or body lines as lookup
|
||||||
|
keys, and specify -hm or -bm to simulate header_checks or body_checks.
|
||||||
|
|
||||||
|
Major changes - miscellaneous
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
[Feature 20090109] Support to selectively disable master(8) listener
|
||||||
|
ports by service type or by service name + type. Specify a list of
|
||||||
|
service types ("inet", "unix", "fifo", or "pass") or "name.type"
|
||||||
|
tuples, where "name" is the first field of a master.cf entry and
|
||||||
|
"type" is a service type. Examples: to turn off the main SMTP
|
||||||
|
listener port, use "master_service_disable = smtp.inet"; to turn
|
||||||
|
off all TCP/IP listeners, use "master_service_disable = inet".
|
||||||
|
Changing this parameter requires "postfix reload".
|
||||||
|
|
||||||
|
Major changes - sasl
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
[Feature 20090418] The Postfix SMTP server passes more information
|
||||||
|
to the Dovecot authentication server: the "TLS is active" flag, the
|
||||||
|
server IP address, and the client IP address.
|
||||||
|
|
||||||
|
[Feature 20080629] The Postfix SMTP server's SASL authentication
|
||||||
|
was re-structured. With "smtpd_tls_auth_only = yes", SASL support
|
||||||
|
is now activated only after a successful TLS handshake. Earlier
|
||||||
|
Postfix SMTP server versions could complain about unavailable SASL
|
||||||
|
mechanisms during the plaintext phase of the SMTP protocol.
|
||||||
|
|
||||||
If you upgrade from Postfix 2.4 or earlier, read RELEASE_NOTES-2.5
|
|
||||||
before proceeding.
|
|
||||||
|
@@ -19,11 +19,11 @@
|
|||||||
|
|
||||||
<h2>Introduction</h2>
|
<h2>Introduction</h2>
|
||||||
|
|
||||||
<p> Postfix version 2.3 introduces support for the Sendmail version
|
<p> Postfix implements support for the Sendmail version 8 Milter
|
||||||
8 Milter (mail filter) protocol. This protocol is used by applications
|
(mail filter) protocol. This protocol is used by applications that
|
||||||
that run outside the MTA to inspect SMTP events (CONNECT, DISCONNECT),
|
run outside the MTA to inspect SMTP events (CONNECT, DISCONNECT),
|
||||||
SMTP commands (HELO, MAIL FROM, etc.) as well as mail content (headers
|
SMTP commands (HELO, MAIL FROM, etc.) as well as mail content
|
||||||
and body). All this happens before mail is queued. </p>
|
(headers and body). All this happens before mail is queued. </p>
|
||||||
|
|
||||||
<p> The reason for adding Milter support to Postfix is that there
|
<p> The reason for adding Milter support to Postfix is that there
|
||||||
exists a large collection of applications, not only to block unwanted
|
exists a large collection of applications, not only to block unwanted
|
||||||
@@ -39,13 +39,12 @@ href="http://sourceforge.net/projects/dk-milter/">DomainKeys</a>).
|
|||||||
Having yet another Postfix-specific version of all that software
|
Having yet another Postfix-specific version of all that software
|
||||||
is a poor use of human and system resources. </p>
|
is a poor use of human and system resources. </p>
|
||||||
|
|
||||||
<p> Postfix version 2.4 implements all the requests of Sendmail
|
<p> The Milter protocol has evolved over time, and different Postfix
|
||||||
version 8 Milter protocols up to version 4, including message body
|
versions implement different feature sets. See the <a
|
||||||
replacement (body replacement is not available with Postfix version
|
href="#workarounds">workarounds</a> and <a
|
||||||
2.3).
|
|
||||||
See, however, the <a href="#workarounds">workarounds</a> and <a
|
|
||||||
href="#limitations">limitations</a> sections at the end of this
|
href="#limitations">limitations</a> sections at the end of this
|
||||||
document. </p>
|
document for differences between Postfix and Sendmail implementations.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p> This document provides information on the following topics: </p>
|
<p> This document provides information on the following topics: </p>
|
||||||
|
|
||||||
@@ -68,8 +67,8 @@ document. </p>
|
|||||||
<h2><a name="plumbing">How Milter applications plug into Postfix </a> </h2>
|
<h2><a name="plumbing">How Milter applications plug into Postfix </a> </h2>
|
||||||
|
|
||||||
<p> The Postfix Milter implementation uses two different lists of
|
<p> The Postfix Milter implementation uses two different lists of
|
||||||
mail filters: one list of filters that are used for SMTP mail only,
|
mail filters: one list of filters for SMTP mail only,
|
||||||
and one list of filters that are used for non-SMTP mail. The two
|
and one list of filters for non-SMTP mail. The two
|
||||||
lists have different capabilities, which is unfortunate. Avoiding
|
lists have different capabilities, which is unfortunate. Avoiding
|
||||||
this would require major restructuring of Postfix. </p>
|
this would require major restructuring of Postfix. </p>
|
||||||
|
|
||||||
@@ -98,7 +97,8 @@ figure below shows how Milter applications plug into Postfix. Names
|
|||||||
followed by a number are Postfix commands or server programs, while
|
followed by a number are Postfix commands or server programs, while
|
||||||
unnumbered names inside shaded areas represent Postfix queues. To
|
unnumbered names inside shaded areas represent Postfix queues. To
|
||||||
avoid clutter, the path for local submission is simplified (the
|
avoid clutter, the path for local submission is simplified (the
|
||||||
<a href="OVERVIEW.html">OVERVIEW</a> document has a more complete description). </p>
|
<a href="OVERVIEW.html">OVERVIEW</a> document has a more complete description of the Postfix
|
||||||
|
architecture). </p>
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
|
|
||||||
@@ -204,10 +204,16 @@ an object library that implements the Sendmail 8 Milter protocol.
|
|||||||
Postfix currently does not provide such a library, but Sendmail
|
Postfix currently does not provide such a library, but Sendmail
|
||||||
does. </p>
|
does. </p>
|
||||||
|
|
||||||
<p> On some Linux and *BSD distributions, the Sendmail libmilter
|
<ul>
|
||||||
library is installed by default. With this, applications such as
|
|
||||||
<a href="http://sourceforge.net/projects/dkim-milter/">dkim-milter</a>
|
<li> <p> The first option is to use a pre-compiled library. Some
|
||||||
and <a href="http://sourceforge.net/projects/sid-milter/">sid-milter</a>
|
systems install the Sendmail libmilter library by default. With
|
||||||
|
other systems, libmilter may be provided by a package (called
|
||||||
|
"sendmail-devel" on some Linux systems). </p>
|
||||||
|
|
||||||
|
<p> Once libmilter is installed, applications such as <a
|
||||||
|
href="http://sourceforge.net/projects/dkim-milter/">dkim-milter</a> and
|
||||||
|
<a href="http://sourceforge.net/projects/sid-milter/">sid-milter</a>
|
||||||
build out of the box without requiring any tinkering:</p>
|
build out of the box without requiring any tinkering:</p>
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
@@ -219,17 +225,8 @@ $ <b>make</b>
|
|||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<p> On other platforms you have two options: </p>
|
<li> <p> The other option is to build the libmilter library from
|
||||||
|
Sendmail source code: </p>
|
||||||
<ul>
|
|
||||||
|
|
||||||
<li> <p>Install the Sendmail libmilter object library and include
|
|
||||||
files. On Linux systems, libmilter may be provided by the
|
|
||||||
sendmail-devel package. After installing libmilter, build the
|
|
||||||
Milter applications as described in the preceding paragraph. </p>
|
|
||||||
|
|
||||||
<li> <p>Don't install the Sendmail libmilter library, but build the
|
|
||||||
library from Sendmail source code instead: </p>
|
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<pre>
|
<pre>
|
||||||
@@ -476,8 +473,9 @@ following: </p>
|
|||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<pre>
|
<pre>
|
||||||
postfix/smtpd[21045]: warning: milter inet:<i>host</i>:<i>port</i>: can't read packet header: Unknown error : 0
|
warning: milter inet:<i>host</i>:<i>port</i>: can't read packet header: Unknown error : 0
|
||||||
postfix/cleanup[15190]: warning: milter inet:<i>host</i>:<i>port</i>: can't read packet header: Success
|
warning: milter inet:<i>host</i>:<i>port</i>: can't read packet header: Success
|
||||||
|
warning: milter inet:<i>host</i>:<i>port</i>: can't read SMFIC_DATA reply packet header: No such file or directory
|
||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
@@ -487,15 +485,16 @@ number. </p>
|
|||||||
<h3><a name="timeouts">Milter protocol timeouts</a></h3>
|
<h3><a name="timeouts">Milter protocol timeouts</a></h3>
|
||||||
|
|
||||||
<p> Postfix uses different time limits at different Milter protocol
|
<p> Postfix uses different time limits at different Milter protocol
|
||||||
stages. The table shows wich timeouts are used and when
|
stages. The table shows the timeout settings and the corresponding
|
||||||
|
protocol stages
|
||||||
(EOH = end of headers; EOM = end of message). </p>
|
(EOH = end of headers; EOM = end of message). </p>
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
|
|
||||||
<table border="1">
|
<table border="1">
|
||||||
|
|
||||||
<tr> <th> Parameter </th> <th> Time limit </th> <th> Protocol
|
<tr> <th> Postfix parameter </th> <th> Time limit </th> <th> Milter
|
||||||
stage</th> </tr>
|
protocol stage</th> </tr>
|
||||||
|
|
||||||
<tr> <td> <a href="postconf.5.html#milter_connect_timeout">milter_connect_timeout</a> </td> <td> 30s </td> <td> CONNECT
|
<tr> <td> <a href="postconf.5.html#milter_connect_timeout">milter_connect_timeout</a> </td> <td> 30s </td> <td> CONNECT
|
||||||
</td> </tr>
|
</td> </tr>
|
||||||
@@ -510,17 +509,18 @@ EOH, BODY, EOM </td> </tr>
|
|||||||
|
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<p> Beware: 30s may be too short for applications doing lots of DNS
|
<p> Beware: 30s may be too short for Milter applications that do
|
||||||
lookups. However, if you increase the above timeouts too much,
|
lots of DNS lookups. However, if you increase the above timeouts
|
||||||
remote SMTP clients may hang up and mail may be delivered multiple
|
too much, remote SMTP clients may hang up and mail may be delivered
|
||||||
times. This is an inherent problem with before-queue filtering. </p>
|
multiple times. This is an inherent problem with before-queue
|
||||||
|
filtering. </p>
|
||||||
|
|
||||||
<h3><a name="macros">Sendmail macro emulation</a></h3>
|
<h3><a name="macros">Sendmail macro emulation</a></h3>
|
||||||
|
|
||||||
<p> Postfix emulates a limited number of Sendmail macros, as shown
|
<p> Postfix emulates a limited number of Sendmail macros, as shown
|
||||||
in the table. Some macro values depend on whether a recipient is
|
in the table. Some macro values depend on whether a recipient is
|
||||||
rejected (rejected recipients are available on request by the Milter
|
rejected (rejected recipients are available on request by the Milter
|
||||||
application). Different macros are available at different SMTP
|
application). Different macros are available at different Milter
|
||||||
protocol stages (EOH = end-of-header, EOM = end-of-message); their
|
protocol stages (EOH = end-of-header, EOM = end-of-message); their
|
||||||
availability is not
|
availability is not
|
||||||
always the same as in Sendmail. See the <a
|
always the same as in Sendmail. See the <a
|
||||||
@@ -531,12 +531,13 @@ href="#workarounds">workarounds</a> section below for solutions.
|
|||||||
|
|
||||||
<table border="1">
|
<table border="1">
|
||||||
|
|
||||||
<tr> <th> Name </th> <th> Availability </th> <th> Description </th>
|
<tr> <th> Sendmail macro </th> <th> Milter protocol stage </th>
|
||||||
</tr>
|
<th> Description </th> </tr>
|
||||||
|
|
||||||
<tr> <td> i </td> <td> DATA, EOH, EOM </td> <td> Queue ID </td> </tr>
|
<tr> <td> i </td> <td> DATA, EOH, EOM </td> <td> Queue ID, also
|
||||||
|
Postfix queue file name </td> </tr>
|
||||||
|
|
||||||
<tr> <td> j </td> <td> Always </td> <td> value of <a href="postconf.5.html#myhostname">myhostname</a> </td>
|
<tr> <td> j </td> <td> Always </td> <td> Value of <a href="postconf.5.html#myhostname">myhostname</a> </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr> <td> _ </td> <td> Always </td> <td> The validated client name
|
<tr> <td> _ </td> <td> Always </td> <td> The validated client name
|
||||||
@@ -586,22 +587,22 @@ cipher </td> </tr>
|
|||||||
<tr> <td> {mail_addr} </td> <td> MAIL </td> <td> Sender address
|
<tr> <td> {mail_addr} </td> <td> MAIL </td> <td> Sender address
|
||||||
</td> </tr>
|
</td> </tr>
|
||||||
|
|
||||||
<tr> <td> {mail_host} </td> <td> MAIL (Postfix ≥ 2.6) </td> <td>
|
<tr> <td> {mail_host} </td> <td> MAIL (Postfix ≥ 2.6, only with
|
||||||
Sender next-hop destination </td> </tr>
|
<a href="postconf.5.html#smtpd_milters">smtpd_milters</a>) </td> <td> Sender next-hop destination </td> </tr>
|
||||||
|
|
||||||
<tr> <td> {mail_mailer} </td> <td> MAIL (Postfix ≥ 2.6) </td>
|
<tr> <td> {mail_mailer} </td> <td> MAIL (Postfix ≥ 2.6, only with
|
||||||
<td> Sender mail delivery transport </td> </tr>
|
<a href="postconf.5.html#smtpd_milters">smtpd_milters</a>) </td> <td> Sender mail delivery transport </td> </tr>
|
||||||
|
|
||||||
<tr> <td> {rcpt_addr} </td> <td> RCPT </td> <td> Recipient address
|
<tr> <td> {rcpt_addr} </td> <td> RCPT </td> <td> Recipient address
|
||||||
<br> With rejected recipient: descriptive text </td> </tr>
|
<br> With rejected recipient: descriptive text </td> </tr>
|
||||||
|
|
||||||
<tr> <td> {rcpt_host} </td> <td> RCPT (Postfix ≥ 2.6) </td> <td>
|
<tr> <td> {rcpt_host} </td> <td> RCPT (Postfix ≥ 2.6, only with
|
||||||
Recipient next-hop destination <br> With rejected recpient: enhanced
|
<a href="postconf.5.html#smtpd_milters">smtpd_milters</a>) </td> <td> Recipient next-hop destination <br> With
|
||||||
status code </td> </tr>
|
rejected recipient: enhanced status code </td> </tr>
|
||||||
|
|
||||||
<tr> <td> {rcpt_mailer} </td> <td> RCPT (Postfix ≥ 2.6) </td>
|
<tr> <td> {rcpt_mailer} </td> <td> RCPT (Postfix ≥ 2.6, only with
|
||||||
<td> Recipient mail delivery transport <br> With rejected recipient:
|
<a href="postconf.5.html#smtpd_milters">smtpd_milters</a>) </td> <td> Recipient mail delivery transport <br>
|
||||||
"error" </td> </tr>
|
With rejected recipient: "error" </td> </tr>
|
||||||
|
|
||||||
<tr> <td> {tls_version} </td> <td> HELO, MAIL, DATA, EOH, EOM </td>
|
<tr> <td> {tls_version} </td> <td> HELO, MAIL, DATA, EOH, EOM </td>
|
||||||
<td> TLS protocol version </td> </tr>
|
<td> TLS protocol version </td> </tr>
|
||||||
@@ -613,18 +614,23 @@ status code </td> </tr>
|
|||||||
|
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<p> Postfix sends specific sets of macros at different SMTP protocol
|
<p> Postfix sends specific sets of macros at different Milter protocol
|
||||||
stages. The sets are configured with the parameters as described
|
stages. The sets are configured with the parameters as described
|
||||||
in the table (EOH = end of headers; EOM = end of message). The
|
in the table (EOH = end of headers; EOM = end of message). The
|
||||||
protocol version is a number that Postfix sends at the beginning
|
protocol version is a number that Postfix sends at the beginning
|
||||||
of the Milter protocol handshake. </p>
|
of the Milter protocol handshake. </p>
|
||||||
|
|
||||||
|
<p> As of Sendmail 8.14.0, Milter applications can specify what
|
||||||
|
macros they want to receive at different Milter protocol stages.
|
||||||
|
An application-specified list takes precedence over a Postfix-specified
|
||||||
|
list. </p>
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
|
|
||||||
<table border="1">
|
<table border="1">
|
||||||
|
|
||||||
<tr> <th> Parameter name </th> <th> Protocol version </th> <th>
|
<tr> <th> Postfix parameter </th> <th> Milter protocol version </th>
|
||||||
Protocol stage </th> </tr>
|
<th> Milter protocol stage </th> </tr>
|
||||||
|
|
||||||
<tr> <td> <a href="postconf.5.html#milter_connect_macros">milter_connect_macros</a> </td> <td> 2 or higher </td> <td>
|
<tr> <td> <a href="postconf.5.html#milter_connect_macros">milter_connect_macros</a> </td> <td> 2 or higher </td> <td>
|
||||||
CONNECT </td> </tr>
|
CONNECT </td> </tr>
|
||||||
@@ -656,19 +662,26 @@ TO </td> </tr>
|
|||||||
|
|
||||||
<h2><a name="workarounds">Workarounds</a></h2>
|
<h2><a name="workarounds">Workarounds</a></h2>
|
||||||
|
|
||||||
<p> Content filters may break DKIM etc. signatures. If you
|
<ul>
|
||||||
use an SMTP-based content filter, then you should add a line to
|
|
||||||
<a href="master.5.html">master.cf</a> with "-o <a href="postconf.5.html#disable_mime_output_conversion">disable_mime_output_conversion</a>=yes" (note: no
|
<li> <p> To avoid breaking DKIM etc. signatures with an SMTP-based
|
||||||
spaces around the "="), as described in the <a
|
content filter, update the before-filter SMTP client in <a href="master.5.html">master.cf</a>,
|
||||||
|
and add a line with "-o <a href="postconf.5.html#disable_mime_output_conversion">disable_mime_output_conversion</a>=yes" (note:
|
||||||
|
no spaces around the "="). For details, see the <a
|
||||||
href="FILTER_README.html#advanced_filter">advanced content filter</a>
|
href="FILTER_README.html#advanced_filter">advanced content filter</a>
|
||||||
example. </p>
|
example. </p>
|
||||||
|
|
||||||
<p> Sendmail Milter applications were originally developed for the
|
<pre>
|
||||||
Sendmail version 8 MTA, which has a different architecture than
|
/etc/postfix/<a href="master.5.html">master.cf</a>:
|
||||||
Postfix. The result is that some Milter applications make assumptions
|
# =============================================================
|
||||||
that aren't true in a Postfix environment. </p>
|
# service type private unpriv chroot wakeup maxproc command
|
||||||
|
# (yes) (yes) (yes) (never) (100)
|
||||||
<ul>
|
# =============================================================
|
||||||
|
scan unix - - n - 10 smtp
|
||||||
|
-o <a href="postconf.5.html#smtp_send_xforward_command">smtp_send_xforward_command</a>=yes
|
||||||
|
-o <a href="postconf.5.html#disable_mime_output_conversion">disable_mime_output_conversion</a>=yes
|
||||||
|
-o <a href="postconf.5.html#smtp_generic_maps">smtp_generic_maps</a>=
|
||||||
|
</pre>
|
||||||
|
|
||||||
<li> <p> Some Milter applications use the "<tt>{if_addr}</tt>" macro
|
<li> <p> Some Milter applications use the "<tt>{if_addr}</tt>" macro
|
||||||
to recognize local mail; this macro does not exist in Postfix.
|
to recognize local mail; this macro does not exist in Postfix.
|
||||||
@@ -691,62 +704,22 @@ X-SenderID: Sendmail Sender-ID Filter vx.y.z host.example.com <unknown-msgid&
|
|||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<p> This happens because those Milter applications expect that the
|
<p> The problem is that Milter applications expect that the queue
|
||||||
queue ID is known <i>before</i> the MTA accepts the MAIL FROM
|
ID is known <i>before</i> the MTA accepts the MAIL FROM (sender)
|
||||||
(sender) command. Postfix, on the other hand, does not choose a
|
command. Postfix does not choose a queue ID, which is used as the
|
||||||
queue file name until <i>after</i> it accepts the first valid RCPT
|
queue file name, until <i>after</i> it accepts the first valid RCPT
|
||||||
TO (recipient) command (Postfix queue file names must be unique
|
TO (recipient) command. </p>
|
||||||
across multiple directories, so the name can't be chosen before the
|
|
||||||
file is created; if multiple messages were to use the same queue
|
|
||||||
ID <i>simultaneously</i>, mail would be lost). </p>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p> If you experience the ugly header problem, see if a recent
|
<p> If you experience the ugly header problem, see if a recent
|
||||||
version of the Milter application fixes it. For example, current
|
version of the Milter application fixes it. For example, current
|
||||||
versions of dkim-filter and dk-filter already have code that looks
|
versions of dkim-filter and dk-filter already have code that looks
|
||||||
up the Postfix queue ID at a later protocol stage. </p>
|
up the Postfix queue ID at a later protocol stage, and sid-filter
|
||||||
|
version 1.0.0 no longer includes the queue ID in the message header.
|
||||||
<p> To fix the ugly message header with sid-filter applications,
|
|
||||||
we change the source code, so that it does the queue ID lookup after
|
|
||||||
Postfix receives the end of the message. </p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
|
|
||||||
<li> <p> Edit the filter source file (named
|
|
||||||
<tt>sid-filter/sid-filter.c</tt>). </p>
|
|
||||||
|
|
||||||
<li> <p> Look up the <tt>smfilter</tt> table and replace
|
|
||||||
<tt>mlfi_eoh</tt> by <tt>NULL</tt>.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<li> <p> Look up the <tt>mlfi_eom()</tt> function and add code near
|
<p> To fix the ugly message header, you will need to add code that
|
||||||
the top that calls <tt>mlfi_eoh()</tt> as shown by the <b>bold</b>
|
looks up the Postfix queue ID at some later point im time. The
|
||||||
text below: </p>
|
example below adds the lookup after the end-of-message. </p>
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<blockquote>
|
|
||||||
<pre>
|
|
||||||
assert(ctx != NULL);
|
|
||||||
#endif /* !DEBUG */
|
|
||||||
<b>
|
|
||||||
ret = mlfi_eoh(ctx);
|
|
||||||
if (ret != SMFIS_CONTINUE)
|
|
||||||
return ret;</b>
|
|
||||||
</pre>
|
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<p> NOTES: </p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
|
|
||||||
<li> <p> This was tested with sid-milter-0.2.10 and sid-milter-0.2.14. </p>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p> To fix the ugly message header with other Milter applications,
|
|
||||||
you will need to do something like this: </p>
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
@@ -769,8 +742,6 @@ if (dfc->mctx_jobid == 0 || strcmp(dfc->mctx_jobid, JOBIDUNKNOWN) == 0) {
|
|||||||
if (jobid != 0)
|
if (jobid != 0)
|
||||||
dfc->mctx_jobid = jobid;
|
dfc->mctx_jobid = jobid;
|
||||||
}</b>
|
}</b>
|
||||||
|
|
||||||
/* get hostname; used in the X header and in new MIME boundaries */
|
|
||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
@@ -779,11 +750,15 @@ if (dfc->mctx_jobid == 0 || strcmp(dfc->mctx_jobid, JOBIDUNKNOWN) == 0) {
|
|||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li> <p> Different mail filters use slightly different names for
|
<li> <p> Different mail filters use slightly different names for
|
||||||
variables. If the above code does not compile, look for the code
|
variables. If the above code does not compile, look elsewhere in
|
||||||
at the start of the <tt>mlfi_eoh()</tt> routine. </p>
|
the mail filter source file for code that looks up the "i" macro
|
||||||
|
value, and copy that code. </p>
|
||||||
|
|
||||||
<li> <p> This fixes only the ugly message header, but not the WARNING
|
<li> <p> This change fixes only the ugly message header, but not
|
||||||
message. Fortunately, many Milters log that message only once. </p>
|
the WARNING message. Fortunately, many Milters log that message
|
||||||
|
only once. </p>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@@ -797,28 +772,47 @@ a discussion. </p>
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
|
<li> <p> The Milter protocol has evolved over time. Therefore,
|
||||||
|
different Postfix versions implement different feature sets. </p>
|
||||||
|
|
||||||
|
<table border="1">
|
||||||
|
|
||||||
|
<tr> <th> Postfix </th> <th> Supported Milter requests </th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr> <td align="center"> 2.6 </td> <td> All Milter requests of
|
||||||
|
Sendmail 8.14.0 (see notes below). </td> </tr>
|
||||||
|
|
||||||
|
<tr> <td align="center"> 2.5 </td> <td> All Milter requests of
|
||||||
|
Sendmail 8.14.0, except: <br> SMFIP_RCPT_REJ (report rejected
|
||||||
|
recipients to the mail filter), <br> SMFIR_CHGFROM (replace sender,
|
||||||
|
with optional ESMTP parameters), <br> SMFIR_ADDRCPT_PAR (add
|
||||||
|
recipient, with optional ESMTP parameters). </td> </tr>
|
||||||
|
|
||||||
|
<tr> <td align="center"> 2.4 </td> <td> All Milter requests of
|
||||||
|
Sendmail 8.13.0. </td> </tr>
|
||||||
|
|
||||||
|
<tr> <td align="center"> 2.3 </td> <td> All Milter requests of
|
||||||
|
Sendmail 8.13.0, except: <br> SMFIR_REPLBODY (replace message body).
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
<li> <p> For Milter applications that are written in C, you need
|
<li> <p> For Milter applications that are written in C, you need
|
||||||
to use the Sendmail libmilter library. </p>
|
to use the Sendmail libmilter library. </p>
|
||||||
|
|
||||||
<li> <p> There are TWO sets of mail filters: filters that are used
|
<li> <p> Postfix has TWO sets of mail filters: filters that are used
|
||||||
for SMTP mail only (specified with the <a href="postconf.5.html#smtpd_milters">smtpd_milters</a> parameter),
|
for SMTP mail only (specified with the <a href="postconf.5.html#smtpd_milters">smtpd_milters</a> parameter),
|
||||||
and filters for non-SMTP mail (specified with the <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a>
|
and filters for non-SMTP mail (specified with the <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a>
|
||||||
parameter). The non-SMTP filters are primarily for local submissions.
|
parameter). The non-SMTP filters are primarily for local submissions.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ul>
|
<p> When mail is filtered by <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a>, the Postfix <a href="cleanup.8.html">cleanup(8)</a>
|
||||||
|
server has to simulate SMTP client requests. This works as expected,
|
||||||
<li> <p> When mail is filtered by non-SMTP filters, the Postfix
|
with only one exception: <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a> must not REJECT or
|
||||||
<a href="cleanup.8.html">cleanup(8)</a> server has to simulate the SMTP client CONNECT and
|
TEMPFAIL simulated RCPT TO commands. When this rule is violated,
|
||||||
DISCONNECT events, and the SMTP client EHLO, MAIL FROM, RCPT TO and
|
|
||||||
DATA commands. This works as expected, with only one exception:
|
|
||||||
non-SMTP filters must not REJECT or TEMPFAIL simulated RCPT TO
|
|
||||||
commands. When a non-SMTP filter REJECTs or TEMPFAILs a recipient,
|
|
||||||
Postfix will report a configuration error, and mail will stay in
|
Postfix will report a configuration error, and mail will stay in
|
||||||
the queue. </p>
|
the queue. </p>
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<li> <p> Postfix currently does not apply content filters to mail
|
<li> <p> Postfix currently does not apply content filters to mail
|
||||||
that is forwarded or aliased internally, or to mail that is generated
|
that is forwarded or aliased internally, or to mail that is generated
|
||||||
internally such as bounces or Postmaster notifications. This may
|
internally such as bounces or Postmaster notifications. This may
|
||||||
@@ -831,49 +825,26 @@ only to the SMTP command information; they have no access to the
|
|||||||
message header or body, and cannot make modifications to the message
|
message header or body, and cannot make modifications to the message
|
||||||
or to the envelope. </p>
|
or to the envelope. </p>
|
||||||
|
|
||||||
<li> <p> Postfix version 2.6 implements all Sendmail 8.14 Milter
|
<li> <p> Postfix 2.6 ignores the optional ESMTP parameters in
|
||||||
features, except it ignores the optional ESMTP command parameters
|
requests to replace the sender (SMFIR_CHGFROM) or to append a
|
||||||
with requests to replace the sender (SMFIR_CHGFROM), or to append
|
recipient (SMFIR_ADDRCPT_PAR). Postfix logs a warning message when
|
||||||
a recipient (SMFIR_ADDRCPT_PAR). When a Milter application supplies
|
a Milter application supplies such ESMTP parameters: </p>
|
||||||
ESMTP command parameters, these are logged as follows: </p>
|
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
postfix/cleanup[40629]: warning: 100B22B3293: cleanup_chg_from: ignoring ESMTP arguments "<i>whatever</i>"
|
warning: <i>queue-id</i>: cleanup_chg_from: ignoring ESMTP arguments "<i>whatever</i>"
|
||||||
|
warning: <i>queue-id</i>: cleanup_add_rcpt: ignoring ESMTP arguments "<i>whatever</i>"
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p> Specify "<a href="postconf.5.html#milter_protocol">milter_protocol</a> = 6" to enable all available Sendmail
|
<li> <p> Postfix 2.3 does not implement requests to replace the
|
||||||
8.14 and earlier Milter features. </p>
|
message body. Milter applications log a warning message when they
|
||||||
|
need this unsupported operation: </p>
|
||||||
|
|
||||||
<li> <p> Postfix version 2.5 implements all Sendmail 8.14 Milter
|
|
||||||
features except: SMFIP_RCPT_REJ (report rejected recipients to the
|
|
||||||
mail filter), SMFIR_CHGFROM (replace sender, with optional ESMTP
|
|
||||||
command parameters), and SMFIR_ADDRCPT_PAR (add recipient, with
|
|
||||||
optional ESMTP command parameters). </p>
|
|
||||||
|
|
||||||
<p> Specify "<a href="postconf.5.html#milter_protocol">milter_protocol</a> = 6" to enable all available Sendmail
|
|
||||||
8.14 and earlier Milter features. </p>
|
|
||||||
|
|
||||||
<li> <p> Postfix 2.4 implements all Sendmail 8.13 Milter features.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p> Specify "<a href="postconf.5.html#milter_protocol">milter_protocol</a> = 4" to enable all available Sendmail
|
|
||||||
8.13 and earlier Milter features. </p>
|
|
||||||
|
|
||||||
<li> <p> Postfix 2.3 implements all Sendmail 8.13 Milter features
|
|
||||||
except requests to replace the message body. Milter applications
|
|
||||||
that request this unsupported operation will log a warning like
|
|
||||||
|
|
||||||
<blockquote>
|
|
||||||
<pre>
|
<pre>
|
||||||
<i>application name</i>: st_optionneg[134563840]: 0x3d does not fulfill action requirements 0x1e
|
st_optionneg[134563840]: 0x3d does not fulfill action requirements 0x1e
|
||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<p> The solution is to use Postfix version 2.4 or later. </p>
|
<p> The solution is to use Postfix version 2.4 or later. </p>
|
||||||
|
|
||||||
<p> Specify "<a href="postconf.5.html#milter_protocol">milter_protocol</a> = 4" to enable all available Sendmail
|
|
||||||
8.13 and earlier Milter features. </p>
|
|
||||||
|
|
||||||
<li> <p> Most Milter configuration options are global. Future Postfix
|
<li> <p> Most Milter configuration options are global. Future Postfix
|
||||||
versions may support per-Milter timeouts, per-Milter error handling,
|
versions may support per-Milter timeouts, per-Milter error handling,
|
||||||
etc. </p>
|
etc. </p>
|
||||||
|
@@ -271,11 +271,12 @@ daemon, you would use something like this: </p>
|
|||||||
|
|
||||||
<li> <p> Lines 2, 11: the Postfix <a href="spawn.8.html">spawn(8)</a> daemon by default kills
|
<li> <p> Lines 2, 11: the Postfix <a href="spawn.8.html">spawn(8)</a> daemon by default kills
|
||||||
its child process after 1000 seconds. This is too short for a
|
its child process after 1000 seconds. This is too short for a
|
||||||
policy daemon that may run for as long as an SMTP client is connected
|
policy daemon that may need to run for as long as the SMTP server
|
||||||
to an SMTP server process. The default time limit is overruled in
|
process that talks to it. The default time limit is overruled in
|
||||||
<a href="postconf.5.html">main.cf</a> with an explicit "policy_time_limit" setting. The name of
|
<a href="postconf.5.html">main.cf</a> with an explicit "policy_time_limit" setting. The name of
|
||||||
the parameter is the name of the <a href="master.5.html">master.cf</a> entry ("policy")
|
the parameter is the name of the <a href="master.5.html">master.cf</a> entry ("policy")
|
||||||
concatenated with the "_time_limit" suffix. </p>
|
concatenated with the "_time_limit" suffix. See <a href="spawn.8.html">spawn(8)</a> for
|
||||||
|
more information about the time limit parameter. </p>
|
||||||
|
|
||||||
<li> <p> Line 2: specify a "0" process limit instead of the default
|
<li> <p> Line 2: specify a "0" process limit instead of the default
|
||||||
"-", to avoid "connection refused" and other problems when the smtpd
|
"-", to avoid "connection refused" and other problems when the smtpd
|
||||||
|
@@ -512,7 +512,7 @@ services that accept remote connections. </p>
|
|||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<h2><a name="other"> Other measures to off-load zombies </h2>
|
<h2><a name="other"> Other measures to off-load zombies </a> </h2>
|
||||||
|
|
||||||
<p> OpenBSD <a href="http://www.openbsd.org/spamd/">spamd</a>
|
<p> OpenBSD <a href="http://www.openbsd.org/spamd/">spamd</a>
|
||||||
implements a daemon that handles all connections from "new" clients.
|
implements a daemon that handles all connections from "new" clients.
|
||||||
|
@@ -10453,6 +10453,8 @@ Example:
|
|||||||
<p>
|
<p>
|
||||||
Optional SMTP server access restrictions in the context of a client
|
Optional SMTP server access restrictions in the context of a client
|
||||||
SMTP connection request.
|
SMTP connection request.
|
||||||
|
See <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a>, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -10724,6 +10726,8 @@ Example:
|
|||||||
<p>
|
<p>
|
||||||
Optional access restrictions that the Postfix SMTP server applies
|
Optional access restrictions that the Postfix SMTP server applies
|
||||||
in the context of the SMTP DATA command.
|
in the context of the SMTP DATA command.
|
||||||
|
See <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a>, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -10851,7 +10855,10 @@ to discard EHLO keywords selectively. </p>
|
|||||||
(default: empty)</b></DT><DD>
|
(default: empty)</b></DT><DD>
|
||||||
|
|
||||||
<p> Optional access restrictions that the Postfix SMTP server
|
<p> Optional access restrictions that the Postfix SMTP server
|
||||||
applies in the context of the SMTP END-OF-DATA command. </p>
|
applies in the context of the SMTP END-OF-DATA command.
|
||||||
|
See <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a>, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p> This feature is available in Postfix 2.2 and later. </p>
|
<p> This feature is available in Postfix 2.2 and later. </p>
|
||||||
|
|
||||||
@@ -10903,6 +10910,8 @@ mail. </p>
|
|||||||
<p>
|
<p>
|
||||||
Optional SMTP server access restrictions in the context of a client
|
Optional SMTP server access restrictions in the context of a client
|
||||||
ETRN request.
|
ETRN request.
|
||||||
|
See <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a>, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -11034,6 +11043,8 @@ Example:
|
|||||||
<p>
|
<p>
|
||||||
Optional restrictions that the Postfix SMTP server applies in the
|
Optional restrictions that the Postfix SMTP server applies in the
|
||||||
context of the SMTP HELO command.
|
context of the SMTP HELO command.
|
||||||
|
See <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a>, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -11353,6 +11364,8 @@ for each excess recipient. </p>
|
|||||||
<p>
|
<p>
|
||||||
The access restrictions that the Postfix SMTP server applies in
|
The access restrictions that the Postfix SMTP server applies in
|
||||||
the context of the RCPT TO command.
|
the context of the RCPT TO command.
|
||||||
|
See <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a>, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -11951,6 +11964,8 @@ or a list of SASL login names separated by comma and/or whitespace.
|
|||||||
<p>
|
<p>
|
||||||
Optional restrictions that the Postfix SMTP server applies in the
|
Optional restrictions that the Postfix SMTP server applies in the
|
||||||
context of the MAIL FROM command.
|
context of the MAIL FROM command.
|
||||||
|
See <a href="SMTPD_ACCESS_README.html">SMTPD_ACCESS_README</a>, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
@@ -6355,6 +6355,8 @@ smtpd_client_recipient_rate_limit = 1000
|
|||||||
.SH smtpd_client_restrictions (default: empty)
|
.SH smtpd_client_restrictions (default: empty)
|
||||||
Optional SMTP server access restrictions in the context of a client
|
Optional SMTP server access restrictions in the context of a client
|
||||||
SMTP connection request.
|
SMTP connection request.
|
||||||
|
See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
.PP
|
.PP
|
||||||
The default is to allow all connection requests.
|
The default is to allow all connection requests.
|
||||||
.PP
|
.PP
|
||||||
@@ -6571,6 +6573,8 @@ smtpd_client_restrictions = permit_mynetworks, reject_unknown_client_hostname
|
|||||||
.SH smtpd_data_restrictions (default: empty)
|
.SH smtpd_data_restrictions (default: empty)
|
||||||
Optional access restrictions that the Postfix SMTP server applies
|
Optional access restrictions that the Postfix SMTP server applies
|
||||||
in the context of the SMTP DATA command.
|
in the context of the SMTP DATA command.
|
||||||
|
See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
.PP
|
.PP
|
||||||
This feature is available in Postfix 2.0 and later.
|
This feature is available in Postfix 2.0 and later.
|
||||||
.PP
|
.PP
|
||||||
@@ -6649,6 +6653,8 @@ to discard EHLO keywords selectively.
|
|||||||
.SH smtpd_end_of_data_restrictions (default: empty)
|
.SH smtpd_end_of_data_restrictions (default: empty)
|
||||||
Optional access restrictions that the Postfix SMTP server
|
Optional access restrictions that the Postfix SMTP server
|
||||||
applies in the context of the SMTP END-OF-DATA command.
|
applies in the context of the SMTP END-OF-DATA command.
|
||||||
|
See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
.PP
|
.PP
|
||||||
This feature is available in Postfix 2.2 and later.
|
This feature is available in Postfix 2.2 and later.
|
||||||
.PP
|
.PP
|
||||||
@@ -6680,6 +6686,8 @@ mail.
|
|||||||
.SH smtpd_etrn_restrictions (default: empty)
|
.SH smtpd_etrn_restrictions (default: empty)
|
||||||
Optional SMTP server access restrictions in the context of a client
|
Optional SMTP server access restrictions in the context of a client
|
||||||
ETRN request.
|
ETRN request.
|
||||||
|
See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
.PP
|
.PP
|
||||||
The Postfix ETRN implementation accepts only destinations that are
|
The Postfix ETRN implementation accepts only destinations that are
|
||||||
eligible for the Postfix "fast flush" service. See the ETRN_README
|
eligible for the Postfix "fast flush" service. See the ETRN_README
|
||||||
@@ -6750,6 +6758,8 @@ smtpd_helo_required = yes
|
|||||||
.SH smtpd_helo_restrictions (default: empty)
|
.SH smtpd_helo_restrictions (default: empty)
|
||||||
Optional restrictions that the Postfix SMTP server applies in the
|
Optional restrictions that the Postfix SMTP server applies in the
|
||||||
context of the SMTP HELO command.
|
context of the SMTP HELO command.
|
||||||
|
See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
.PP
|
.PP
|
||||||
The default is to permit everything.
|
The default is to permit everything.
|
||||||
.PP
|
.PP
|
||||||
@@ -6922,6 +6932,8 @@ for each excess recipient.
|
|||||||
.SH smtpd_recipient_restrictions (default: permit_mynetworks, reject_unauth_destination)
|
.SH smtpd_recipient_restrictions (default: permit_mynetworks, reject_unauth_destination)
|
||||||
The access restrictions that the Postfix SMTP server applies in
|
The access restrictions that the Postfix SMTP server applies in
|
||||||
the context of the RCPT TO command.
|
the context of the RCPT TO command.
|
||||||
|
See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
.PP
|
.PP
|
||||||
By default, the Postfix SMTP server accepts:
|
By default, the Postfix SMTP server accepts:
|
||||||
.IP \(bu
|
.IP \(bu
|
||||||
@@ -7334,6 +7346,8 @@ or a list of SASL login names separated by comma and/or whitespace.
|
|||||||
.SH smtpd_sender_restrictions (default: empty)
|
.SH smtpd_sender_restrictions (default: empty)
|
||||||
Optional restrictions that the Postfix SMTP server applies in the
|
Optional restrictions that the Postfix SMTP server applies in the
|
||||||
context of the MAIL FROM command.
|
context of the MAIL FROM command.
|
||||||
|
See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
.PP
|
.PP
|
||||||
The default is to permit everything.
|
The default is to permit everything.
|
||||||
.PP
|
.PP
|
||||||
|
@@ -19,11 +19,11 @@
|
|||||||
|
|
||||||
<h2>Introduction</h2>
|
<h2>Introduction</h2>
|
||||||
|
|
||||||
<p> Postfix version 2.3 introduces support for the Sendmail version
|
<p> Postfix implements support for the Sendmail version 8 Milter
|
||||||
8 Milter (mail filter) protocol. This protocol is used by applications
|
(mail filter) protocol. This protocol is used by applications that
|
||||||
that run outside the MTA to inspect SMTP events (CONNECT, DISCONNECT),
|
run outside the MTA to inspect SMTP events (CONNECT, DISCONNECT),
|
||||||
SMTP commands (HELO, MAIL FROM, etc.) as well as mail content (headers
|
SMTP commands (HELO, MAIL FROM, etc.) as well as mail content
|
||||||
and body). All this happens before mail is queued. </p>
|
(headers and body). All this happens before mail is queued. </p>
|
||||||
|
|
||||||
<p> The reason for adding Milter support to Postfix is that there
|
<p> The reason for adding Milter support to Postfix is that there
|
||||||
exists a large collection of applications, not only to block unwanted
|
exists a large collection of applications, not only to block unwanted
|
||||||
@@ -39,13 +39,12 @@ href="http://sourceforge.net/projects/dk-milter/">DomainKeys</a>).
|
|||||||
Having yet another Postfix-specific version of all that software
|
Having yet another Postfix-specific version of all that software
|
||||||
is a poor use of human and system resources. </p>
|
is a poor use of human and system resources. </p>
|
||||||
|
|
||||||
<p> Postfix version 2.4 implements all the requests of Sendmail
|
<p> The Milter protocol has evolved over time, and different Postfix
|
||||||
version 8 Milter protocols up to version 4, including message body
|
versions implement different feature sets. See the <a
|
||||||
replacement (body replacement is not available with Postfix version
|
href="#workarounds">workarounds</a> and <a
|
||||||
2.3).
|
|
||||||
See, however, the <a href="#workarounds">workarounds</a> and <a
|
|
||||||
href="#limitations">limitations</a> sections at the end of this
|
href="#limitations">limitations</a> sections at the end of this
|
||||||
document. </p>
|
document for differences between Postfix and Sendmail implementations.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p> This document provides information on the following topics: </p>
|
<p> This document provides information on the following topics: </p>
|
||||||
|
|
||||||
@@ -68,8 +67,8 @@ document. </p>
|
|||||||
<h2><a name="plumbing">How Milter applications plug into Postfix </a> </h2>
|
<h2><a name="plumbing">How Milter applications plug into Postfix </a> </h2>
|
||||||
|
|
||||||
<p> The Postfix Milter implementation uses two different lists of
|
<p> The Postfix Milter implementation uses two different lists of
|
||||||
mail filters: one list of filters that are used for SMTP mail only,
|
mail filters: one list of filters for SMTP mail only,
|
||||||
and one list of filters that are used for non-SMTP mail. The two
|
and one list of filters for non-SMTP mail. The two
|
||||||
lists have different capabilities, which is unfortunate. Avoiding
|
lists have different capabilities, which is unfortunate. Avoiding
|
||||||
this would require major restructuring of Postfix. </p>
|
this would require major restructuring of Postfix. </p>
|
||||||
|
|
||||||
@@ -98,7 +97,8 @@ figure below shows how Milter applications plug into Postfix. Names
|
|||||||
followed by a number are Postfix commands or server programs, while
|
followed by a number are Postfix commands or server programs, while
|
||||||
unnumbered names inside shaded areas represent Postfix queues. To
|
unnumbered names inside shaded areas represent Postfix queues. To
|
||||||
avoid clutter, the path for local submission is simplified (the
|
avoid clutter, the path for local submission is simplified (the
|
||||||
OVERVIEW document has a more complete description). </p>
|
OVERVIEW document has a more complete description of the Postfix
|
||||||
|
architecture). </p>
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
|
|
||||||
@@ -204,10 +204,16 @@ an object library that implements the Sendmail 8 Milter protocol.
|
|||||||
Postfix currently does not provide such a library, but Sendmail
|
Postfix currently does not provide such a library, but Sendmail
|
||||||
does. </p>
|
does. </p>
|
||||||
|
|
||||||
<p> On some Linux and *BSD distributions, the Sendmail libmilter
|
<ul>
|
||||||
library is installed by default. With this, applications such as
|
|
||||||
<a href="http://sourceforge.net/projects/dkim-milter/">dkim-milter</a>
|
<li> <p> The first option is to use a pre-compiled library. Some
|
||||||
and <a href="http://sourceforge.net/projects/sid-milter/">sid-milter</a>
|
systems install the Sendmail libmilter library by default. With
|
||||||
|
other systems, libmilter may be provided by a package (called
|
||||||
|
"sendmail-devel" on some Linux systems). </p>
|
||||||
|
|
||||||
|
<p> Once libmilter is installed, applications such as <a
|
||||||
|
href="http://sourceforge.net/projects/dkim-milter/">dkim-milter</a> and
|
||||||
|
<a href="http://sourceforge.net/projects/sid-milter/">sid-milter</a>
|
||||||
build out of the box without requiring any tinkering:</p>
|
build out of the box without requiring any tinkering:</p>
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
@@ -219,17 +225,8 @@ $ <b>make</b>
|
|||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<p> On other platforms you have two options: </p>
|
<li> <p> The other option is to build the libmilter library from
|
||||||
|
Sendmail source code: </p>
|
||||||
<ul>
|
|
||||||
|
|
||||||
<li> <p>Install the Sendmail libmilter object library and include
|
|
||||||
files. On Linux systems, libmilter may be provided by the
|
|
||||||
sendmail-devel package. After installing libmilter, build the
|
|
||||||
Milter applications as described in the preceding paragraph. </p>
|
|
||||||
|
|
||||||
<li> <p>Don't install the Sendmail libmilter library, but build the
|
|
||||||
library from Sendmail source code instead: </p>
|
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<pre>
|
<pre>
|
||||||
@@ -476,8 +473,9 @@ following: </p>
|
|||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<pre>
|
<pre>
|
||||||
postfix/smtpd[21045]: warning: milter inet:<i>host</i>:<i>port</i>: can't read packet header: Unknown error : 0
|
warning: milter inet:<i>host</i>:<i>port</i>: can't read packet header: Unknown error : 0
|
||||||
postfix/cleanup[15190]: warning: milter inet:<i>host</i>:<i>port</i>: can't read packet header: Success
|
warning: milter inet:<i>host</i>:<i>port</i>: can't read packet header: Success
|
||||||
|
warning: milter inet:<i>host</i>:<i>port</i>: can't read SMFIC_DATA reply packet header: No such file or directory
|
||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
@@ -487,15 +485,16 @@ number. </p>
|
|||||||
<h3><a name="timeouts">Milter protocol timeouts</a></h3>
|
<h3><a name="timeouts">Milter protocol timeouts</a></h3>
|
||||||
|
|
||||||
<p> Postfix uses different time limits at different Milter protocol
|
<p> Postfix uses different time limits at different Milter protocol
|
||||||
stages. The table shows wich timeouts are used and when
|
stages. The table shows the timeout settings and the corresponding
|
||||||
|
protocol stages
|
||||||
(EOH = end of headers; EOM = end of message). </p>
|
(EOH = end of headers; EOM = end of message). </p>
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
|
|
||||||
<table border="1">
|
<table border="1">
|
||||||
|
|
||||||
<tr> <th> Parameter </th> <th> Time limit </th> <th> Protocol
|
<tr> <th> Postfix parameter </th> <th> Time limit </th> <th> Milter
|
||||||
stage</th> </tr>
|
protocol stage</th> </tr>
|
||||||
|
|
||||||
<tr> <td> milter_connect_timeout </td> <td> 30s </td> <td> CONNECT
|
<tr> <td> milter_connect_timeout </td> <td> 30s </td> <td> CONNECT
|
||||||
</td> </tr>
|
</td> </tr>
|
||||||
@@ -510,17 +509,18 @@ EOH, BODY, EOM </td> </tr>
|
|||||||
|
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<p> Beware: 30s may be too short for applications doing lots of DNS
|
<p> Beware: 30s may be too short for Milter applications that do
|
||||||
lookups. However, if you increase the above timeouts too much,
|
lots of DNS lookups. However, if you increase the above timeouts
|
||||||
remote SMTP clients may hang up and mail may be delivered multiple
|
too much, remote SMTP clients may hang up and mail may be delivered
|
||||||
times. This is an inherent problem with before-queue filtering. </p>
|
multiple times. This is an inherent problem with before-queue
|
||||||
|
filtering. </p>
|
||||||
|
|
||||||
<h3><a name="macros">Sendmail macro emulation</a></h3>
|
<h3><a name="macros">Sendmail macro emulation</a></h3>
|
||||||
|
|
||||||
<p> Postfix emulates a limited number of Sendmail macros, as shown
|
<p> Postfix emulates a limited number of Sendmail macros, as shown
|
||||||
in the table. Some macro values depend on whether a recipient is
|
in the table. Some macro values depend on whether a recipient is
|
||||||
rejected (rejected recipients are available on request by the Milter
|
rejected (rejected recipients are available on request by the Milter
|
||||||
application). Different macros are available at different SMTP
|
application). Different macros are available at different Milter
|
||||||
protocol stages (EOH = end-of-header, EOM = end-of-message); their
|
protocol stages (EOH = end-of-header, EOM = end-of-message); their
|
||||||
availability is not
|
availability is not
|
||||||
always the same as in Sendmail. See the <a
|
always the same as in Sendmail. See the <a
|
||||||
@@ -531,12 +531,13 @@ href="#workarounds">workarounds</a> section below for solutions.
|
|||||||
|
|
||||||
<table border="1">
|
<table border="1">
|
||||||
|
|
||||||
<tr> <th> Name </th> <th> Availability </th> <th> Description </th>
|
<tr> <th> Sendmail macro </th> <th> Milter protocol stage </th>
|
||||||
</tr>
|
<th> Description </th> </tr>
|
||||||
|
|
||||||
<tr> <td> i </td> <td> DATA, EOH, EOM </td> <td> Queue ID </td> </tr>
|
<tr> <td> i </td> <td> DATA, EOH, EOM </td> <td> Queue ID, also
|
||||||
|
Postfix queue file name </td> </tr>
|
||||||
|
|
||||||
<tr> <td> j </td> <td> Always </td> <td> value of myhostname </td>
|
<tr> <td> j </td> <td> Always </td> <td> Value of myhostname </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr> <td> _ </td> <td> Always </td> <td> The validated client name
|
<tr> <td> _ </td> <td> Always </td> <td> The validated client name
|
||||||
@@ -586,22 +587,22 @@ milter_macro_daemon_name </td> </tr>
|
|||||||
<tr> <td> {mail_addr} </td> <td> MAIL </td> <td> Sender address
|
<tr> <td> {mail_addr} </td> <td> MAIL </td> <td> Sender address
|
||||||
</td> </tr>
|
</td> </tr>
|
||||||
|
|
||||||
<tr> <td> {mail_host} </td> <td> MAIL (Postfix ≥ 2.6) </td> <td>
|
<tr> <td> {mail_host} </td> <td> MAIL (Postfix ≥ 2.6, only with
|
||||||
Sender next-hop destination </td> </tr>
|
smtpd_milters) </td> <td> Sender next-hop destination </td> </tr>
|
||||||
|
|
||||||
<tr> <td> {mail_mailer} </td> <td> MAIL (Postfix ≥ 2.6) </td>
|
<tr> <td> {mail_mailer} </td> <td> MAIL (Postfix ≥ 2.6, only with
|
||||||
<td> Sender mail delivery transport </td> </tr>
|
smtpd_milters) </td> <td> Sender mail delivery transport </td> </tr>
|
||||||
|
|
||||||
<tr> <td> {rcpt_addr} </td> <td> RCPT </td> <td> Recipient address
|
<tr> <td> {rcpt_addr} </td> <td> RCPT </td> <td> Recipient address
|
||||||
<br> With rejected recipient: descriptive text </td> </tr>
|
<br> With rejected recipient: descriptive text </td> </tr>
|
||||||
|
|
||||||
<tr> <td> {rcpt_host} </td> <td> RCPT (Postfix ≥ 2.6) </td> <td>
|
<tr> <td> {rcpt_host} </td> <td> RCPT (Postfix ≥ 2.6, only with
|
||||||
Recipient next-hop destination <br> With rejected recpient: enhanced
|
smtpd_milters) </td> <td> Recipient next-hop destination <br> With
|
||||||
status code </td> </tr>
|
rejected recipient: enhanced status code </td> </tr>
|
||||||
|
|
||||||
<tr> <td> {rcpt_mailer} </td> <td> RCPT (Postfix ≥ 2.6) </td>
|
<tr> <td> {rcpt_mailer} </td> <td> RCPT (Postfix ≥ 2.6, only with
|
||||||
<td> Recipient mail delivery transport <br> With rejected recipient:
|
smtpd_milters) </td> <td> Recipient mail delivery transport <br>
|
||||||
"error" </td> </tr>
|
With rejected recipient: "error" </td> </tr>
|
||||||
|
|
||||||
<tr> <td> {tls_version} </td> <td> HELO, MAIL, DATA, EOH, EOM </td>
|
<tr> <td> {tls_version} </td> <td> HELO, MAIL, DATA, EOH, EOM </td>
|
||||||
<td> TLS protocol version </td> </tr>
|
<td> TLS protocol version </td> </tr>
|
||||||
@@ -613,18 +614,23 @@ status code </td> </tr>
|
|||||||
|
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<p> Postfix sends specific sets of macros at different SMTP protocol
|
<p> Postfix sends specific sets of macros at different Milter protocol
|
||||||
stages. The sets are configured with the parameters as described
|
stages. The sets are configured with the parameters as described
|
||||||
in the table (EOH = end of headers; EOM = end of message). The
|
in the table (EOH = end of headers; EOM = end of message). The
|
||||||
protocol version is a number that Postfix sends at the beginning
|
protocol version is a number that Postfix sends at the beginning
|
||||||
of the Milter protocol handshake. </p>
|
of the Milter protocol handshake. </p>
|
||||||
|
|
||||||
|
<p> As of Sendmail 8.14.0, Milter applications can specify what
|
||||||
|
macros they want to receive at different Milter protocol stages.
|
||||||
|
An application-specified list takes precedence over a Postfix-specified
|
||||||
|
list. </p>
|
||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
|
|
||||||
<table border="1">
|
<table border="1">
|
||||||
|
|
||||||
<tr> <th> Parameter name </th> <th> Protocol version </th> <th>
|
<tr> <th> Postfix parameter </th> <th> Milter protocol version </th>
|
||||||
Protocol stage </th> </tr>
|
<th> Milter protocol stage </th> </tr>
|
||||||
|
|
||||||
<tr> <td> milter_connect_macros </td> <td> 2 or higher </td> <td>
|
<tr> <td> milter_connect_macros </td> <td> 2 or higher </td> <td>
|
||||||
CONNECT </td> </tr>
|
CONNECT </td> </tr>
|
||||||
@@ -656,19 +662,26 @@ TO </td> </tr>
|
|||||||
|
|
||||||
<h2><a name="workarounds">Workarounds</a></h2>
|
<h2><a name="workarounds">Workarounds</a></h2>
|
||||||
|
|
||||||
<p> Content filters may break DKIM etc. signatures. If you
|
<ul>
|
||||||
use an SMTP-based content filter, then you should add a line to
|
|
||||||
master.cf with "-o disable_mime_output_conversion=yes" (note: no
|
<li> <p> To avoid breaking DKIM etc. signatures with an SMTP-based
|
||||||
spaces around the "="), as described in the <a
|
content filter, update the before-filter SMTP client in master.cf,
|
||||||
|
and add a line with "-o disable_mime_output_conversion=yes" (note:
|
||||||
|
no spaces around the "="). For details, see the <a
|
||||||
href="FILTER_README.html#advanced_filter">advanced content filter</a>
|
href="FILTER_README.html#advanced_filter">advanced content filter</a>
|
||||||
example. </p>
|
example. </p>
|
||||||
|
|
||||||
<p> Sendmail Milter applications were originally developed for the
|
<pre>
|
||||||
Sendmail version 8 MTA, which has a different architecture than
|
/etc/postfix/master.cf:
|
||||||
Postfix. The result is that some Milter applications make assumptions
|
# =============================================================
|
||||||
that aren't true in a Postfix environment. </p>
|
# service type private unpriv chroot wakeup maxproc command
|
||||||
|
# (yes) (yes) (yes) (never) (100)
|
||||||
<ul>
|
# =============================================================
|
||||||
|
scan unix - - n - 10 smtp
|
||||||
|
-o smtp_send_xforward_command=yes
|
||||||
|
-o disable_mime_output_conversion=yes
|
||||||
|
-o smtp_generic_maps=
|
||||||
|
</pre>
|
||||||
|
|
||||||
<li> <p> Some Milter applications use the "<tt>{if_addr}</tt>" macro
|
<li> <p> Some Milter applications use the "<tt>{if_addr}</tt>" macro
|
||||||
to recognize local mail; this macro does not exist in Postfix.
|
to recognize local mail; this macro does not exist in Postfix.
|
||||||
@@ -691,62 +704,22 @@ X-SenderID: Sendmail Sender-ID Filter vx.y.z host.example.com <unknown-msgid&
|
|||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<p> This happens because those Milter applications expect that the
|
<p> The problem is that Milter applications expect that the queue
|
||||||
queue ID is known <i>before</i> the MTA accepts the MAIL FROM
|
ID is known <i>before</i> the MTA accepts the MAIL FROM (sender)
|
||||||
(sender) command. Postfix, on the other hand, does not choose a
|
command. Postfix does not choose a queue ID, which is used as the
|
||||||
queue file name until <i>after</i> it accepts the first valid RCPT
|
queue file name, until <i>after</i> it accepts the first valid RCPT
|
||||||
TO (recipient) command (Postfix queue file names must be unique
|
TO (recipient) command. </p>
|
||||||
across multiple directories, so the name can't be chosen before the
|
|
||||||
file is created; if multiple messages were to use the same queue
|
|
||||||
ID <i>simultaneously</i>, mail would be lost). </p>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p> If you experience the ugly header problem, see if a recent
|
<p> If you experience the ugly header problem, see if a recent
|
||||||
version of the Milter application fixes it. For example, current
|
version of the Milter application fixes it. For example, current
|
||||||
versions of dkim-filter and dk-filter already have code that looks
|
versions of dkim-filter and dk-filter already have code that looks
|
||||||
up the Postfix queue ID at a later protocol stage. </p>
|
up the Postfix queue ID at a later protocol stage, and sid-filter
|
||||||
|
version 1.0.0 no longer includes the queue ID in the message header.
|
||||||
<p> To fix the ugly message header with sid-filter applications,
|
|
||||||
we change the source code, so that it does the queue ID lookup after
|
|
||||||
Postfix receives the end of the message. </p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
|
|
||||||
<li> <p> Edit the filter source file (named
|
|
||||||
<tt>sid-filter/sid-filter.c</tt>). </p>
|
|
||||||
|
|
||||||
<li> <p> Look up the <tt>smfilter</tt> table and replace
|
|
||||||
<tt>mlfi_eoh</tt> by <tt>NULL</tt>.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<li> <p> Look up the <tt>mlfi_eom()</tt> function and add code near
|
<p> To fix the ugly message header, you will need to add code that
|
||||||
the top that calls <tt>mlfi_eoh()</tt> as shown by the <b>bold</b>
|
looks up the Postfix queue ID at some later point im time. The
|
||||||
text below: </p>
|
example below adds the lookup after the end-of-message. </p>
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<blockquote>
|
|
||||||
<pre>
|
|
||||||
assert(ctx != NULL);
|
|
||||||
#endif /* !DEBUG */
|
|
||||||
<b>
|
|
||||||
ret = mlfi_eoh(ctx);
|
|
||||||
if (ret != SMFIS_CONTINUE)
|
|
||||||
return ret;</b>
|
|
||||||
</pre>
|
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<p> NOTES: </p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
|
|
||||||
<li> <p> This was tested with sid-milter-0.2.10 and sid-milter-0.2.14. </p>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p> To fix the ugly message header with other Milter applications,
|
|
||||||
you will need to do something like this: </p>
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
@@ -769,8 +742,6 @@ if (dfc->mctx_jobid == 0 || strcmp(dfc->mctx_jobid, JOBIDUNKNOWN) == 0) {
|
|||||||
if (jobid != 0)
|
if (jobid != 0)
|
||||||
dfc->mctx_jobid = jobid;
|
dfc->mctx_jobid = jobid;
|
||||||
}</b>
|
}</b>
|
||||||
|
|
||||||
/* get hostname; used in the X header and in new MIME boundaries */
|
|
||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
@@ -779,11 +750,15 @@ if (dfc->mctx_jobid == 0 || strcmp(dfc->mctx_jobid, JOBIDUNKNOWN) == 0) {
|
|||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li> <p> Different mail filters use slightly different names for
|
<li> <p> Different mail filters use slightly different names for
|
||||||
variables. If the above code does not compile, look for the code
|
variables. If the above code does not compile, look elsewhere in
|
||||||
at the start of the <tt>mlfi_eoh()</tt> routine. </p>
|
the mail filter source file for code that looks up the "i" macro
|
||||||
|
value, and copy that code. </p>
|
||||||
|
|
||||||
<li> <p> This fixes only the ugly message header, but not the WARNING
|
<li> <p> This change fixes only the ugly message header, but not
|
||||||
message. Fortunately, many Milters log that message only once. </p>
|
the WARNING message. Fortunately, many Milters log that message
|
||||||
|
only once. </p>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@@ -797,28 +772,47 @@ a discussion. </p>
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
|
<li> <p> The Milter protocol has evolved over time. Therefore,
|
||||||
|
different Postfix versions implement different feature sets. </p>
|
||||||
|
|
||||||
|
<table border="1">
|
||||||
|
|
||||||
|
<tr> <th> Postfix </th> <th> Supported Milter requests </th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr> <td align="center"> 2.6 </td> <td> All Milter requests of
|
||||||
|
Sendmail 8.14.0 (see notes below). </td> </tr>
|
||||||
|
|
||||||
|
<tr> <td align="center"> 2.5 </td> <td> All Milter requests of
|
||||||
|
Sendmail 8.14.0, except: <br> SMFIP_RCPT_REJ (report rejected
|
||||||
|
recipients to the mail filter), <br> SMFIR_CHGFROM (replace sender,
|
||||||
|
with optional ESMTP parameters), <br> SMFIR_ADDRCPT_PAR (add
|
||||||
|
recipient, with optional ESMTP parameters). </td> </tr>
|
||||||
|
|
||||||
|
<tr> <td align="center"> 2.4 </td> <td> All Milter requests of
|
||||||
|
Sendmail 8.13.0. </td> </tr>
|
||||||
|
|
||||||
|
<tr> <td align="center"> 2.3 </td> <td> All Milter requests of
|
||||||
|
Sendmail 8.13.0, except: <br> SMFIR_REPLBODY (replace message body).
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
<li> <p> For Milter applications that are written in C, you need
|
<li> <p> For Milter applications that are written in C, you need
|
||||||
to use the Sendmail libmilter library. </p>
|
to use the Sendmail libmilter library. </p>
|
||||||
|
|
||||||
<li> <p> There are TWO sets of mail filters: filters that are used
|
<li> <p> Postfix has TWO sets of mail filters: filters that are used
|
||||||
for SMTP mail only (specified with the smtpd_milters parameter),
|
for SMTP mail only (specified with the smtpd_milters parameter),
|
||||||
and filters for non-SMTP mail (specified with the non_smtpd_milters
|
and filters for non-SMTP mail (specified with the non_smtpd_milters
|
||||||
parameter). The non-SMTP filters are primarily for local submissions.
|
parameter). The non-SMTP filters are primarily for local submissions.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ul>
|
<p> When mail is filtered by non_smtpd_milters, the Postfix cleanup(8)
|
||||||
|
server has to simulate SMTP client requests. This works as expected,
|
||||||
<li> <p> When mail is filtered by non-SMTP filters, the Postfix
|
with only one exception: non_smtpd_milters must not REJECT or
|
||||||
cleanup(8) server has to simulate the SMTP client CONNECT and
|
TEMPFAIL simulated RCPT TO commands. When this rule is violated,
|
||||||
DISCONNECT events, and the SMTP client EHLO, MAIL FROM, RCPT TO and
|
|
||||||
DATA commands. This works as expected, with only one exception:
|
|
||||||
non-SMTP filters must not REJECT or TEMPFAIL simulated RCPT TO
|
|
||||||
commands. When a non-SMTP filter REJECTs or TEMPFAILs a recipient,
|
|
||||||
Postfix will report a configuration error, and mail will stay in
|
Postfix will report a configuration error, and mail will stay in
|
||||||
the queue. </p>
|
the queue. </p>
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<li> <p> Postfix currently does not apply content filters to mail
|
<li> <p> Postfix currently does not apply content filters to mail
|
||||||
that is forwarded or aliased internally, or to mail that is generated
|
that is forwarded or aliased internally, or to mail that is generated
|
||||||
internally such as bounces or Postmaster notifications. This may
|
internally such as bounces or Postmaster notifications. This may
|
||||||
@@ -831,49 +825,26 @@ only to the SMTP command information; they have no access to the
|
|||||||
message header or body, and cannot make modifications to the message
|
message header or body, and cannot make modifications to the message
|
||||||
or to the envelope. </p>
|
or to the envelope. </p>
|
||||||
|
|
||||||
<li> <p> Postfix version 2.6 implements all Sendmail 8.14 Milter
|
<li> <p> Postfix 2.6 ignores the optional ESMTP parameters in
|
||||||
features, except it ignores the optional ESMTP command parameters
|
requests to replace the sender (SMFIR_CHGFROM) or to append a
|
||||||
with requests to replace the sender (SMFIR_CHGFROM), or to append
|
recipient (SMFIR_ADDRCPT_PAR). Postfix logs a warning message when
|
||||||
a recipient (SMFIR_ADDRCPT_PAR). When a Milter application supplies
|
a Milter application supplies such ESMTP parameters: </p>
|
||||||
ESMTP command parameters, these are logged as follows: </p>
|
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
postfix/cleanup[40629]: warning: 100B22B3293: cleanup_chg_from: ignoring ESMTP arguments "<i>whatever</i>"
|
warning: <i>queue-id</i>: cleanup_chg_from: ignoring ESMTP arguments "<i>whatever</i>"
|
||||||
|
warning: <i>queue-id</i>: cleanup_add_rcpt: ignoring ESMTP arguments "<i>whatever</i>"
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p> Specify "milter_protocol = 6" to enable all available Sendmail
|
<li> <p> Postfix 2.3 does not implement requests to replace the
|
||||||
8.14 and earlier Milter features. </p>
|
message body. Milter applications log a warning message when they
|
||||||
|
need this unsupported operation: </p>
|
||||||
|
|
||||||
<li> <p> Postfix version 2.5 implements all Sendmail 8.14 Milter
|
|
||||||
features except: SMFIP_RCPT_REJ (report rejected recipients to the
|
|
||||||
mail filter), SMFIR_CHGFROM (replace sender, with optional ESMTP
|
|
||||||
command parameters), and SMFIR_ADDRCPT_PAR (add recipient, with
|
|
||||||
optional ESMTP command parameters). </p>
|
|
||||||
|
|
||||||
<p> Specify "milter_protocol = 6" to enable all available Sendmail
|
|
||||||
8.14 and earlier Milter features. </p>
|
|
||||||
|
|
||||||
<li> <p> Postfix 2.4 implements all Sendmail 8.13 Milter features.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p> Specify "milter_protocol = 4" to enable all available Sendmail
|
|
||||||
8.13 and earlier Milter features. </p>
|
|
||||||
|
|
||||||
<li> <p> Postfix 2.3 implements all Sendmail 8.13 Milter features
|
|
||||||
except requests to replace the message body. Milter applications
|
|
||||||
that request this unsupported operation will log a warning like
|
|
||||||
|
|
||||||
<blockquote>
|
|
||||||
<pre>
|
<pre>
|
||||||
<i>application name</i>: st_optionneg[134563840]: 0x3d does not fulfill action requirements 0x1e
|
st_optionneg[134563840]: 0x3d does not fulfill action requirements 0x1e
|
||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
|
||||||
|
|
||||||
<p> The solution is to use Postfix version 2.4 or later. </p>
|
<p> The solution is to use Postfix version 2.4 or later. </p>
|
||||||
|
|
||||||
<p> Specify "milter_protocol = 4" to enable all available Sendmail
|
|
||||||
8.13 and earlier Milter features. </p>
|
|
||||||
|
|
||||||
<li> <p> Most Milter configuration options are global. Future Postfix
|
<li> <p> Most Milter configuration options are global. Future Postfix
|
||||||
versions may support per-Milter timeouts, per-Milter error handling,
|
versions may support per-Milter timeouts, per-Milter error handling,
|
||||||
etc. </p>
|
etc. </p>
|
||||||
|
@@ -271,11 +271,12 @@ daemon, you would use something like this: </p>
|
|||||||
|
|
||||||
<li> <p> Lines 2, 11: the Postfix spawn(8) daemon by default kills
|
<li> <p> Lines 2, 11: the Postfix spawn(8) daemon by default kills
|
||||||
its child process after 1000 seconds. This is too short for a
|
its child process after 1000 seconds. This is too short for a
|
||||||
policy daemon that may run for as long as an SMTP client is connected
|
policy daemon that may need to run for as long as the SMTP server
|
||||||
to an SMTP server process. The default time limit is overruled in
|
process that talks to it. The default time limit is overruled in
|
||||||
main.cf with an explicit "policy_time_limit" setting. The name of
|
main.cf with an explicit "policy_time_limit" setting. The name of
|
||||||
the parameter is the name of the master.cf entry ("policy")
|
the parameter is the name of the master.cf entry ("policy")
|
||||||
concatenated with the "_time_limit" suffix. </p>
|
concatenated with the "_time_limit" suffix. See spawn(8) for
|
||||||
|
more information about the time limit parameter. </p>
|
||||||
|
|
||||||
<li> <p> Line 2: specify a "0" process limit instead of the default
|
<li> <p> Line 2: specify a "0" process limit instead of the default
|
||||||
"-", to avoid "connection refused" and other problems when the smtpd
|
"-", to avoid "connection refused" and other problems when the smtpd
|
||||||
|
@@ -512,7 +512,7 @@ services that accept remote connections. </p>
|
|||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<h2><a name="other"> Other measures to off-load zombies </h2>
|
<h2><a name="other"> Other measures to off-load zombies </a> </h2>
|
||||||
|
|
||||||
<p> OpenBSD <a href="http://www.openbsd.org/spamd/">spamd</a>
|
<p> OpenBSD <a href="http://www.openbsd.org/spamd/">spamd</a>
|
||||||
implements a daemon that handles all connections from "new" clients.
|
implements a daemon that handles all connections from "new" clients.
|
||||||
|
@@ -4721,6 +4721,8 @@ smtpd_client_new_tls_session_rate_limit = 100
|
|||||||
<p>
|
<p>
|
||||||
Optional SMTP server access restrictions in the context of a client
|
Optional SMTP server access restrictions in the context of a client
|
||||||
SMTP connection request.
|
SMTP connection request.
|
||||||
|
See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -5084,6 +5086,8 @@ for each excess recipient. </p>
|
|||||||
<p>
|
<p>
|
||||||
Optional SMTP server access restrictions in the context of a client
|
Optional SMTP server access restrictions in the context of a client
|
||||||
ETRN request.
|
ETRN request.
|
||||||
|
See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -5186,6 +5190,8 @@ smtpd_helo_required = yes
|
|||||||
<p>
|
<p>
|
||||||
Optional restrictions that the Postfix SMTP server applies in the
|
Optional restrictions that the Postfix SMTP server applies in the
|
||||||
context of the SMTP HELO command.
|
context of the SMTP HELO command.
|
||||||
|
See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -5383,6 +5389,8 @@ accepts per message delivery request.
|
|||||||
<p>
|
<p>
|
||||||
The access restrictions that the Postfix SMTP server applies in
|
The access restrictions that the Postfix SMTP server applies in
|
||||||
the context of the RCPT TO command.
|
the context of the RCPT TO command.
|
||||||
|
See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -5818,6 +5826,8 @@ or a list of SASL login names separated by comma and/or whitespace.
|
|||||||
<p>
|
<p>
|
||||||
Optional restrictions that the Postfix SMTP server applies in the
|
Optional restrictions that the Postfix SMTP server applies in the
|
||||||
context of the MAIL FROM command.
|
context of the MAIL FROM command.
|
||||||
|
See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -7613,6 +7623,8 @@ cached session is still usable. </p>
|
|||||||
<p>
|
<p>
|
||||||
Optional access restrictions that the Postfix SMTP server applies
|
Optional access restrictions that the Postfix SMTP server applies
|
||||||
in the context of the SMTP DATA command.
|
in the context of the SMTP DATA command.
|
||||||
|
See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -7653,7 +7665,10 @@ smtpd_data_restrictions = reject_multi_recipient_bounce
|
|||||||
%PARAM smtpd_end_of_data_restrictions
|
%PARAM smtpd_end_of_data_restrictions
|
||||||
|
|
||||||
<p> Optional access restrictions that the Postfix SMTP server
|
<p> Optional access restrictions that the Postfix SMTP server
|
||||||
applies in the context of the SMTP END-OF-DATA command. </p>
|
applies in the context of the SMTP END-OF-DATA command.
|
||||||
|
See SMTPD_ACCESS_README, section "Delayed evaluation of SMTP access
|
||||||
|
restriction lists" for a discussion of evaluation context and time.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p> This feature is available in Postfix 2.2 and later. </p>
|
<p> This feature is available in Postfix 2.2 and later. </p>
|
||||||
|
|
||||||
|
@@ -124,8 +124,9 @@ void cleanup_addr_sender(CLEANUP_STATE *state, const char *buf)
|
|||||||
cleanup_masquerade_internal(clean_addr, cleanup_masq_domains);
|
cleanup_masquerade_internal(clean_addr, cleanup_masq_domains);
|
||||||
}
|
}
|
||||||
CLEANUP_OUT_BUF(state, REC_TYPE_FROM, clean_addr);
|
CLEANUP_OUT_BUF(state, REC_TYPE_FROM, clean_addr);
|
||||||
if (state->sender == 0)
|
if (state->sender) /* XXX Can't happen */
|
||||||
state->sender = mystrdup(STR(clean_addr));
|
myfree(state->sender);
|
||||||
|
state->sender = mystrdup(STR(clean_addr)); /* Used by Milter client */
|
||||||
if ((state->flags & CLEANUP_FLAG_BCC_OK)
|
if ((state->flags & CLEANUP_FLAG_BCC_OK)
|
||||||
&& *STR(clean_addr)
|
&& *STR(clean_addr)
|
||||||
&& cleanup_send_bcc_maps
|
&& cleanup_send_bcc_maps
|
||||||
@@ -166,8 +167,9 @@ void cleanup_addr_recipient(CLEANUP_STATE *state, const char *buf)
|
|||||||
}
|
}
|
||||||
cleanup_out_recipient(state, state->dsn_orcpt, state->dsn_notify,
|
cleanup_out_recipient(state, state->dsn_orcpt, state->dsn_notify,
|
||||||
state->orig_rcpt, STR(clean_addr));
|
state->orig_rcpt, STR(clean_addr));
|
||||||
if (state->recip == 0)
|
if (state->recip) /* This can happen */
|
||||||
state->recip = mystrdup(STR(clean_addr));
|
myfree(state->recip);
|
||||||
|
state->recip = mystrdup(STR(clean_addr)); /* Used by Milter client */
|
||||||
if ((state->flags & CLEANUP_FLAG_BCC_OK)
|
if ((state->flags & CLEANUP_FLAG_BCC_OK)
|
||||||
&& *STR(clean_addr)
|
&& *STR(clean_addr)
|
||||||
&& cleanup_rcpt_bcc_maps
|
&& cleanup_rcpt_bcc_maps
|
||||||
|
@@ -267,7 +267,7 @@ static void cleanup_envelope_process(CLEANUP_STATE *state, int type,
|
|||||||
if (cleanup_milters != 0
|
if (cleanup_milters != 0
|
||||||
&& state->milters == 0
|
&& state->milters == 0
|
||||||
&& CLEANUP_MILTER_OK(state))
|
&& CLEANUP_MILTER_OK(state))
|
||||||
cleanup_milter_emul_rcpt(state, cleanup_milters, buf);
|
cleanup_milter_emul_rcpt(state, cleanup_milters, state->recip);
|
||||||
myfree(state->orig_rcpt);
|
myfree(state->orig_rcpt);
|
||||||
state->orig_rcpt = 0;
|
state->orig_rcpt = 0;
|
||||||
if (state->dsn_orcpt != 0) {
|
if (state->dsn_orcpt != 0) {
|
||||||
@@ -394,7 +394,7 @@ static void cleanup_envelope_process(CLEANUP_STATE *state, int type,
|
|||||||
if (cleanup_milters != 0
|
if (cleanup_milters != 0
|
||||||
&& state->milters == 0
|
&& state->milters == 0
|
||||||
&& CLEANUP_MILTER_OK(state))
|
&& CLEANUP_MILTER_OK(state))
|
||||||
cleanup_milter_emul_mail(state, cleanup_milters, buf);
|
cleanup_milter_emul_mail(state, cleanup_milters, state->sender);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mapped_type == REC_TYPE_DSN_ENVID) {
|
if (mapped_type == REC_TYPE_DSN_ENVID) {
|
||||||
|
@@ -206,7 +206,7 @@ void cleanup_extracted_process(CLEANUP_STATE *state, int type,
|
|||||||
if (cleanup_milters != 0
|
if (cleanup_milters != 0
|
||||||
&& state->milters == 0
|
&& state->milters == 0
|
||||||
&& CLEANUP_MILTER_OK(state))
|
&& CLEANUP_MILTER_OK(state))
|
||||||
cleanup_milter_emul_rcpt(state, cleanup_milters, buf);
|
cleanup_milter_emul_rcpt(state, cleanup_milters, state->recip);
|
||||||
myfree(state->orig_rcpt);
|
myfree(state->orig_rcpt);
|
||||||
state->orig_rcpt = 0;
|
state->orig_rcpt = 0;
|
||||||
if (state->dsn_orcpt != 0) {
|
if (state->dsn_orcpt != 0) {
|
||||||
|
@@ -206,7 +206,8 @@ void dsb_free(DSN_BUF *dsb)
|
|||||||
*
|
*
|
||||||
* For safety we keep the test for null pointers in input. It's cheap.
|
* For safety we keep the test for null pointers in input. It's cheap.
|
||||||
*/
|
*/
|
||||||
#define DSB_TRUNCATE(s) (STR(s)[0] = 0)
|
#define DSB_TRUNCATE(s) \
|
||||||
|
do { VSTRING_RESET(s); VSTRING_TERMINATE(s); } while (0)
|
||||||
|
|
||||||
#define NULL_OR_EMPTY(s) ((s) == 0 || *(s) == 0)
|
#define NULL_OR_EMPTY(s) ((s) == 0 || *(s) == 0)
|
||||||
|
|
||||||
|
@@ -620,8 +620,8 @@ extern int var_dup_filter_limit;
|
|||||||
extern char *var_tls_rand_exch_name;
|
extern char *var_tls_rand_exch_name;
|
||||||
|
|
||||||
#define VAR_TLS_RAND_SOURCE "tls_random_source"
|
#define VAR_TLS_RAND_SOURCE "tls_random_source"
|
||||||
#ifdef HAS_DEV_URANDOM
|
#ifdef PREFERRED_RAND_SOURCE
|
||||||
#define DEF_TLS_RAND_SOURCE "dev:/dev/urandom"
|
#define DEF_TLS_RAND_SOURCE PREFERRED_RAND_SOURCE
|
||||||
#else
|
#else
|
||||||
#define DEF_TLS_RAND_SOURCE ""
|
#define DEF_TLS_RAND_SOURCE ""
|
||||||
#endif
|
#endif
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||||
* patchlevel; they change the release date only.
|
* patchlevel; they change the release date only.
|
||||||
*/
|
*/
|
||||||
#define MAIL_RELEASE_DATE "20090428"
|
#define MAIL_RELEASE_DATE "20090511"
|
||||||
#define MAIL_VERSION_NUMBER "2.6.0-RC3"
|
#define MAIL_VERSION_NUMBER "2.6.0"
|
||||||
|
|
||||||
#ifdef SNAPSHOT
|
#ifdef SNAPSHOT
|
||||||
# define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE
|
# define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE
|
||||||
|
@@ -511,6 +511,7 @@ NORETURN multi_server_main(int argc, char **argv, MULTI_SERVER_FN service,...)
|
|||||||
int alone = 0;
|
int alone = 0;
|
||||||
int zerolimit = 0;
|
int zerolimit = 0;
|
||||||
WATCHDOG *watchdog;
|
WATCHDOG *watchdog;
|
||||||
|
char *oname;
|
||||||
char *oval;
|
char *oval;
|
||||||
char *generation;
|
char *generation;
|
||||||
int msg_vstream_needed = 0;
|
int msg_vstream_needed = 0;
|
||||||
@@ -591,10 +592,11 @@ NORETURN multi_server_main(int argc, char **argv, MULTI_SERVER_FN service,...)
|
|||||||
break;
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
/* XXX Use split_nameval() */
|
/* XXX Use split_nameval() */
|
||||||
if ((oval = split_at(optarg, '=')) == 0)
|
oname = mystrdup(optarg);
|
||||||
|
if ((oval = split_at(oname, '=')) == 0)
|
||||||
oval = "";
|
oval = "";
|
||||||
mail_conf_update(optarg, oval);
|
mail_conf_update(oname, oval);
|
||||||
if (strcmp(optarg, VAR_SYSLOG_NAME) == 0)
|
if (strcmp(oname, VAR_SYSLOG_NAME) == 0)
|
||||||
redo_syslog_init = 1;
|
redo_syslog_init = 1;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
|
@@ -402,6 +402,7 @@ NORETURN single_server_main(int argc, char **argv, SINGLE_SERVER_FN service,...)
|
|||||||
int alone = 0;
|
int alone = 0;
|
||||||
int zerolimit = 0;
|
int zerolimit = 0;
|
||||||
WATCHDOG *watchdog;
|
WATCHDOG *watchdog;
|
||||||
|
char *oname;
|
||||||
char *oval;
|
char *oval;
|
||||||
char *generation;
|
char *generation;
|
||||||
int msg_vstream_needed = 0;
|
int msg_vstream_needed = 0;
|
||||||
@@ -482,10 +483,11 @@ NORETURN single_server_main(int argc, char **argv, SINGLE_SERVER_FN service,...)
|
|||||||
break;
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
/* XXX Use split_nameval() */
|
/* XXX Use split_nameval() */
|
||||||
if ((oval = split_at(optarg, '=')) == 0)
|
oname = mystrdup(optarg);
|
||||||
|
if ((oval = split_at(oname, '=')) == 0)
|
||||||
oval = "";
|
oval = "";
|
||||||
mail_conf_update(optarg, oval);
|
mail_conf_update(oname, oval);
|
||||||
if (strcmp(optarg, VAR_SYSLOG_NAME) == 0)
|
if (strcmp(oname, VAR_SYSLOG_NAME) == 0)
|
||||||
redo_syslog_init = 1;
|
redo_syslog_init = 1;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
|
@@ -413,6 +413,7 @@ NORETURN trigger_server_main(int argc, char **argv, TRIGGER_SERVER_FN service,..
|
|||||||
int alone = 0;
|
int alone = 0;
|
||||||
int zerolimit = 0;
|
int zerolimit = 0;
|
||||||
WATCHDOG *watchdog;
|
WATCHDOG *watchdog;
|
||||||
|
char *oname;
|
||||||
char *oval;
|
char *oval;
|
||||||
char *generation;
|
char *generation;
|
||||||
int msg_vstream_needed = 0;
|
int msg_vstream_needed = 0;
|
||||||
@@ -493,10 +494,11 @@ NORETURN trigger_server_main(int argc, char **argv, TRIGGER_SERVER_FN service,..
|
|||||||
break;
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
/* XXX Use split_nameval() */
|
/* XXX Use split_nameval() */
|
||||||
if ((oval = split_at(optarg, '=')) == 0)
|
oname = mystrdup(optarg);
|
||||||
|
if ((oval = split_at(oname, '=')) == 0)
|
||||||
oval = "";
|
oval = "";
|
||||||
mail_conf_update(optarg, oval);
|
mail_conf_update(oname, oval);
|
||||||
if (strcmp(optarg, VAR_SYSLOG_NAME) == 0)
|
if (strcmp(oname, VAR_SYSLOG_NAME) == 0)
|
||||||
redo_syslog_init = 1;
|
redo_syslog_init = 1;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
|
@@ -1426,8 +1426,10 @@ static const char *milter8_event(MILTER8 *milter, int event,
|
|||||||
MILTER8_DATA_STRING, milter->body,
|
MILTER8_DATA_STRING, milter->body,
|
||||||
MILTER8_DATA_END) != 0)
|
MILTER8_DATA_END) != 0)
|
||||||
MILTER8_EVENT_BREAK(milter->def_reply);
|
MILTER8_EVENT_BREAK(milter->def_reply);
|
||||||
} else
|
} else {
|
||||||
STR(milter->body)[0] = 0;
|
VSTRING_RESET(milter->body);
|
||||||
|
VSTRING_TERMINATE(milter->body);
|
||||||
|
}
|
||||||
/* Skip to the next request after previous edit error. */
|
/* Skip to the next request after previous edit error. */
|
||||||
if (edit_resp)
|
if (edit_resp)
|
||||||
continue;
|
continue;
|
||||||
@@ -1465,8 +1467,10 @@ static const char *milter8_event(MILTER8 *milter, int event,
|
|||||||
MILTER8_DATA_STRING, milter->body,
|
MILTER8_DATA_STRING, milter->body,
|
||||||
MILTER8_DATA_END) != 0)
|
MILTER8_DATA_END) != 0)
|
||||||
MILTER8_EVENT_BREAK(milter->def_reply);
|
MILTER8_EVENT_BREAK(milter->def_reply);
|
||||||
} else
|
} else {
|
||||||
STR(milter->body)[0] = 0;
|
VSTRING_RESET(milter->body);
|
||||||
|
VSTRING_TERMINATE(milter->body);
|
||||||
|
}
|
||||||
/* Skip to the next request after previous edit error. */
|
/* Skip to the next request after previous edit error. */
|
||||||
if (edit_resp)
|
if (edit_resp)
|
||||||
continue;
|
continue;
|
||||||
|
@@ -93,7 +93,7 @@
|
|||||||
/* __FreeBSD_version version is major+minor */
|
/* __FreeBSD_version version is major+minor */
|
||||||
|
|
||||||
#if __FreeBSD_version >= 220000
|
#if __FreeBSD_version >= 220000
|
||||||
#define HAS_DEV_URANDOM /* introduced in 2.1.5 */
|
#define PREFERRED_RAND_SOURCE "dev:/dev/urandom" /* introduced 2.1.5 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __FreeBSD_version >= 300000
|
#if __FreeBSD_version >= 300000
|
||||||
@@ -116,9 +116,12 @@
|
|||||||
#define HAS_FUTIMES /* XXX maybe earlier */
|
#define HAS_FUTIMES /* XXX maybe earlier */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (defined(OpenBSD) && OpenBSD >= 199608)
|
||||||
|
#define PREFERRED_RAND_SOURCE "dev:/dev/arandom" /* XXX earlier */
|
||||||
|
#endif
|
||||||
|
|
||||||
#if OpenBSD >= 200000 /* XXX */
|
#if OpenBSD >= 200000 /* XXX */
|
||||||
#define HAS_ISSETUGID
|
#define HAS_ISSETUGID
|
||||||
#define HAS_DEV_URANDOM /* XXX probably earlier */
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if OpenBSD >= 200200 /* XXX */
|
#if OpenBSD >= 200200 /* XXX */
|
||||||
@@ -135,7 +138,7 @@
|
|||||||
#if __NetBSD_Version__ >= 103000000 /* XXX maybe earlier */
|
#if __NetBSD_Version__ >= 103000000 /* XXX maybe earlier */
|
||||||
#undef DEF_MAILBOX_LOCK
|
#undef DEF_MAILBOX_LOCK
|
||||||
#define DEF_MAILBOX_LOCK "flock, dotlock"
|
#define DEF_MAILBOX_LOCK "flock, dotlock"
|
||||||
#define HAS_DEV_URANDOM /* XXX probably earlier */
|
#define PREFERRED_RAND_SOURCE "dev:/dev/urandom" /* XXX maybe earlier */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __NetBSD_Version__ >= 105000000
|
#if __NetBSD_Version__ >= 105000000
|
||||||
@@ -422,7 +425,7 @@ extern int opterr;
|
|||||||
# define HAS_CLOSEFROM
|
# define HAS_CLOSEFROM
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_DEV_URANDOM
|
#ifndef NO_DEV_URANDOM
|
||||||
# define HAS_DEV_URANDOM
|
# define PREFERRED_RAND_SOURCE "dev:/dev/urandom"
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_FUTIMESAT
|
#ifndef NO_FUTIMESAT
|
||||||
# define HAS_FUTIMESAT
|
# define HAS_FUTIMESAT
|
||||||
@@ -754,7 +757,7 @@ extern int initgroups(const char *, int);
|
|||||||
#else
|
#else
|
||||||
# define CANT_WRITE_BEFORE_SENDING_FD
|
# define CANT_WRITE_BEFORE_SENDING_FD
|
||||||
#endif
|
#endif
|
||||||
#define HAS_DEV_URANDOM /* introduced in 1.1 */
|
#define PREFERRED_RAND_SOURCE "dev:/dev/urandom" /* introduced in 1.1 */
|
||||||
#ifndef NO_EPOLL
|
#ifndef NO_EPOLL
|
||||||
# define EVENTS_STYLE EVENTS_STYLE_EPOLL /* introduced in 2.5 */
|
# define EVENTS_STYLE EVENTS_STYLE_EPOLL /* introduced in 2.5 */
|
||||||
#endif
|
#endif
|
||||||
@@ -852,7 +855,7 @@ extern int initgroups(const char *, int);
|
|||||||
#endif
|
#endif
|
||||||
#define CANT_USE_SEND_RECV_MSG
|
#define CANT_USE_SEND_RECV_MSG
|
||||||
#define DEF_SMTP_CACHE_DEMAND 0
|
#define DEF_SMTP_CACHE_DEMAND 0
|
||||||
#define HAS_DEV_URANDOM
|
#define PREFERRED_RAND_SOURCE "dev:/dev/urandom"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user