From 7c07e99eddfc58d1efa7eb6ab2e6deecdb7e74f9 Mon Sep 17 00:00:00 2001 From: Wietse Venema Date: Thu, 4 Oct 2007 00:00:00 -0500 Subject: [PATCH] postfix-2.5-20071004 --- postfix/HISTORY | 44 +++++++++ postfix/README_FILES/MILTER_README | 14 ++- postfix/README_FILES/XCLIENT_README | 8 +- postfix/README_FILES/XFORWARD_README | 5 +- postfix/WISHLIST | 7 ++ postfix/html/MILTER_README.html | 19 ++-- postfix/html/XCLIENT_README.html | 13 ++- postfix/html/XFORWARD_README.html | 10 +- postfix/html/pipe.8.html | 6 ++ postfix/html/regexp_table.5.html | 10 +- postfix/html/smtp-sink.1.html | 9 ++ postfix/man/man1/smtp-sink.1 | 7 ++ postfix/man/man5/regexp_table.5 | 6 +- postfix/man/man8/pipe.8 | 4 + postfix/proto/MILTER_README.html | 19 ++-- postfix/proto/XCLIENT_README.html | 9 +- postfix/proto/XFORWARD_README.html | 6 +- postfix/proto/regexp_table | 6 +- postfix/src/cleanup/cleanup_milter.c | 3 + postfix/src/flush/flush.c | 6 ++ postfix/src/global/deliver_pass.c | 4 + postfix/src/global/deliver_request.c | 13 ++- postfix/src/global/deliver_request.h | 1 + postfix/src/global/mail_proto.h | 31 +++--- postfix/src/global/mail_version.h | 2 +- postfix/src/milter/milter.h | 1 + postfix/src/milter/test-milter.c | 4 +- postfix/src/oqmgr/qmgr.h | 1 + postfix/src/oqmgr/qmgr_active.c | 2 - postfix/src/oqmgr/qmgr_deliver.c | 4 + postfix/src/oqmgr/qmgr_message.c | 9 ++ postfix/src/pipe/pipe.c | 8 ++ postfix/src/qmgr/qmgr.h | 1 + postfix/src/qmgr/qmgr_active.c | 2 - postfix/src/qmgr/qmgr_deliver.c | 4 + postfix/src/qmgr/qmgr_message.c | 9 ++ postfix/src/qmqpd/qmqpd.c | 5 + postfix/src/qmqpd/qmqpd.h | 5 +- postfix/src/qmqpd/qmqpd_peer.c | 16 ++- postfix/src/smtp/smtp.h | 1 + postfix/src/smtp/smtp_proto.c | 7 ++ postfix/src/smtpd/smtpd.c | 79 ++++++++++++--- postfix/src/smtpd/smtpd.h | 13 ++- postfix/src/smtpd/smtpd_milter.c | 2 + postfix/src/smtpd/smtpd_peer.c | 16 ++- postfix/src/smtpd/smtpd_proxy.c | 7 ++ postfix/src/smtpd/smtpd_xforward.c | 3 + postfix/src/smtpstone/smtp-sink.c | 142 ++++++++++++++++++++------- postfix/src/util/attr_scan0.c | 4 +- postfix/src/util/attr_scan64.c | 4 +- postfix/src/util/attr_scan_plain.c | 4 +- postfix/src/util/events.c | 7 ++ 52 files changed, 491 insertions(+), 131 deletions(-) diff --git a/postfix/HISTORY b/postfix/HISTORY index 8c7acdf96..1fd2f8758 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -13712,3 +13712,47 @@ Apologies for any names omitted. unparsable canonical name caused the SMTPD policy client to allocate zero-length memory, triggering an assertion that it shouldn't do such things. File: smtpd/smtpd_check.c. + +20070912 + + Bugfix (introduced Postfix 2.4) missing initialization of + event mask in the event_mask_drain() routine (used by the + obsolete postkick(1) command). Found by Coverity. File: + util/events.c. + +20070917 + + Workaround: the flush daemon forces an access time update + for the per-destination logfile, to prevent an excessive + rate of delivery attempts when the queue file system is + mounted with "noatime". File: flush/flush.c. + +20070923 + + Cleanup: don't complain when a "corrupt" queue file is + deleted before it can be saved to the "corrupt" queue. + Files: *qmgr/qmgr_active.c. + +20071003 + + Logging: the Postfix SMTP server now logs the number of + bytes received after the DATA command when a connection + breaks before mail delivery completes. This may help finding + the cause of the problem: packet loss, MTU, or other. File: + smtpd/smtpd.c. + +20071004 + + Logging: all daemons now log the TCP port number of remote + SMTP or QMQP clients. The information is overruled with + the SMTP XCLIENT command, is propagated through SMTP-based + content filters with XFORWARD, and is sent to Milter + applications. Files: smtpd/smtpd_peer.c, smtpd/smtpd.c, + smtpd/smtpd_proxy.c, smtpd/smtpd_milter.c, qmqpd/qmqpd_peer.c, + cleanup/cleanup_milter.c, *qmgr/qmgr_message.c, + *qmgr/qmgr_deliver.c, smtp/smtp_proto.c, pipe/pipe.c, + global/deliver_request.c, global/deliver_pass.c, + proto/XFORWARD_README, proto/XCLIENT_README. + + Feature: per-command delays in smtp-sink. File: + smtpstone/smtp-sink.c. Victor Duchovni. diff --git a/postfix/README_FILES/MILTER_README b/postfix/README_FILES/MILTER_README index a667ce411..6f0ca58e3 100644 --- a/postfix/README_FILES/MILTER_README +++ b/postfix/README_FILES/MILTER_README @@ -7,14 +7,15 @@ IInnttrroodduuccttiioonn Postfix version 2.3 introduces support for the Sendmail version 8 Milter (mail filter) protocol. This protocol is used by applications that run outside the MTA to inspect SMTP events (CONNECT, DISCONNECT), SMTP commands (HELO, MAIL -FROM, etc.) as well as mail content. All this happens before mail is queued. +FROM, etc.) as well as mail content (headers and body). All this happens before +mail is queued. 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 -authenticity (examples: Domain keys identified mail, SenderID+SPF and Domain -keys) or to digitally sign mail (examples: Domain keys identified mail, Domain -keys). Having yet another Postfix-specific version of all that software is a -poor use of human and system resources. +authenticity (examples: DomainKeys Identified Mail (DKIM), SenderID+SPF and +DomainKeys) or to digitally sign mail (examples: DomainKeys Identified Mail +(DKIM), DomainKeys). Having yet another Postfix-specific version of all that +software is a poor use of human and system resources. Postfix version 2.4 implements all the requests of Sendmail version 8 Milter protocols up to version 4, including message body replacement (body replacement @@ -336,6 +337,9 @@ workarounds section below for solutions. |{client_name} |Always |when lookup or | | | |verification fails | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | + |{client_port} |Always |Client TCP port | + | |(Postfix >=2.5) | | + |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | | | |Client name from reverse | |{client_ptr} |CONNECT, HELO, MAIL, DATA|lookup, "unknown" when | | | |lookup fails | diff --git a/postfix/README_FILES/XCLIENT_README b/postfix/README_FILES/XCLIENT_README index f9b084eef..d3ca8daac 100644 --- a/postfix/README_FILES/XCLIENT_README +++ b/postfix/README_FILES/XCLIENT_README @@ -48,7 +48,7 @@ are in fact case insensitive. xclient-command = XCLIENT 1*( SP attribute-name"="attribute-value ) - attribute-name = ( NAME | ADDR | PROTO | HELO ) + attribute-name = ( NAME | ADDR | PORT | PROTO | HELO ) attribute-value = xtext @@ -63,6 +63,9 @@ are in fact case insensitive. an IPv6 address prefixed with IPV6:, or [UNAVAILABLE] when the address information is unavailable. Address information is not enclosed with []. + * The PORT attribute specifies the SMTP client TCP port number as a decimal + number, or [UNAVAILABLE] when the information is unavailable. + * The PROTO attribute specifies either SMTP or ESMTP. * The HELO attribute specifies an SMTP HELO parameter value, or the value @@ -81,6 +84,9 @@ Note 3: Postfix implementations prior to version 2.3 do not xtext encode attribute values. Servers that wish to interoperate with these older implementations should be prepared to receive unencoded information. +Note 4: Postfix implementations prior to version 2.5 do not implement the PORT +attribute. + XXCCLLIIEENNTT SSeerrvveerr rreessppoonnssee Upon receipt of a correctly formatted XCLIENT command, the server resets state diff --git a/postfix/README_FILES/XFORWARD_README b/postfix/README_FILES/XFORWARD_README index dd6aa39c2..bd0751273 100644 --- a/postfix/README_FILES/XFORWARD_README +++ b/postfix/README_FILES/XFORWARD_README @@ -41,7 +41,7 @@ are in fact case insensitive. xforward-command = XFORWARD 1*( SP attribute-name"="attribute-value ) - attribute-name = ( NAME | ADDR | PROTO | HELO | SOURCE ) + attribute-name = ( NAME | ADDR | PORT | PROTO | HELO | SOURCE ) attribute-value = xtext @@ -54,6 +54,9 @@ are in fact case insensitive. [UNAVAILABLE] when the information is unavailable. Address information is not enclosed with []. The address may be a non-IP address. + * The PORT attribute specifies an up-stream client TCP port number in + decimal, or [UNAVAILABLE] when the information is unavailable. + * The PROTO attribute specifies the mail protocol for receiving mail from the up-stream host. This may be an SMTP or non-SMTP protocol name of up to 64 characters, or [UNAVAILABLE] when the information is unavailable. diff --git a/postfix/WISHLIST b/postfix/WISHLIST index 2d41e5cd6..ceb73dee8 100644 --- a/postfix/WISHLIST +++ b/postfix/WISHLIST @@ -1,5 +1,12 @@ Wish list: + Combine smtpd_peer.c and qmqpd_peer.c into a single function + that produces a client context object, and provide attribute + print/scan routines that pass these client context objects + around. With this, we no longer have to update a multiple + pieces of code when a client attribute is added. Ditto for + SASL and TLS context. + Make TLS_BIO_BUFSIZE run-time adjustable, to future-proof Postfix for remote connections with MSS > 8 kbytes. diff --git a/postfix/html/MILTER_README.html b/postfix/html/MILTER_README.html index 226f62e2e..4236a3bc6 100644 --- a/postfix/html/MILTER_README.html +++ b/postfix/html/MILTER_README.html @@ -22,20 +22,20 @@

Postfix version 2.3 introduces support for the Sendmail version 8 Milter (mail filter) protocol. This protocol is used by applications that run outside the MTA to inspect SMTP events (CONNECT, DISCONNECT), -SMTP commands (HELO, MAIL FROM, etc.) as well as mail content. All -this happens before mail is queued.

+SMTP commands (HELO, MAIL FROM, etc.) as well as mail content (headers +and body). All this happens before mail is queued.

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 authenticity (examples: Domain keys -identified mail, DomainKeys +Identified Mail (DKIM), SenderID+SPF and -Domain keys) +DomainKeys) or to digitally sign mail (examples: Domain keys -identified mail, Domain keys). +href="http://sourceforge.net/projects/dkim-milter/">DomainKeys +Identified Mail (DKIM), DomainKeys). Having yet another Postfix-specific version of all that software is a poor use of human and system resources.

@@ -548,6 +548,9 @@ Connection concurrency for this client {client_name} Always Client hostname, "unknown" when lookup or verification fails + {client_port} Always
(Postfix ≥2.5) + Client TCP port + {client_ptr} CONNECT, HELO, MAIL, DATA Client name from reverse lookup, "unknown" when lookup fails diff --git a/postfix/html/XCLIENT_README.html b/postfix/html/XCLIENT_README.html index 09425094e..c66093482 100644 --- a/postfix/html/XCLIENT_README.html +++ b/postfix/html/XCLIENT_README.html @@ -77,7 +77,7 @@ names are shown in upper case, they are in fact case insensitive. xclient-command = XCLIENT 1*( SP attribute-name"="attribute-value )

- attribute-name = ( NAME | ADDR | PROTO | HELO ) + attribute-name = ( NAME | ADDR | PORT | PROTO | HELO )

attribute-value = xtext @@ -86,7 +86,7 @@ names are shown in upper case, they are in fact case insensitive.