Module Name: src
Committed By: riz
Date: Wed Nov 2 20:39:02 UTC 2011
Modified Files:
src/external/ibm-public/postfix/dist [netbsd-5]: HISTORY
src/external/ibm-public/postfix/dist/src/global [netbsd-5]:
mail_version.h mime_state.c
src/external/ibm-public/postfix/dist/src/master [netbsd-5]:
master_avail.c
src/external/ibm-public/postfix/dist/src/smtpd [netbsd-5]: smtpd.c
smtpd_proxy.c
Log Message:
Apply patch (requested by tron in ticket #1686):
external/ibm-public/postfix/dist/HISTORY patch
external/ibm-public/postfix/dist/src/global/mail_version.h patch
external/ibm-public/postfix/dist/src/global/mime_state.c patch
external/ibm-public/postfix/dist/src/master/master_avail.c patch
external/ibm-public/postfix/dist/src/smtpd/smtpd.c patch
external/ibm-public/postfix/dist/src/smtpd/smtpd_proxy.c patch
Update Postfix 2.7.7. Changes since version 2.7.6:
- The Postfix SMTP daemon sent "bare" newline characters
instead of <CR><LF> when a header_checks REJECT pattern
matched multi-line header. This bug was introduced with
Postfix 1.1.
- The Postfix SMTP daemon sent "bare" newline characters
instead of <CR><LF> when an smtpd_proxy_filter returned a
multi-line response. This bug was introduced with Postfix
2.1.
- For compatibility with future EAI (email address
internationalization) implementations, the Postfix MIME
processor no longer enforces the strict_mime_encoding_domain
check on unknown message subtypes such as
message/global*. This check is disabled by default.
- The Postfix master daemon could report a panic error
("master_spawn: at process limit") after the process limit
for some service was reduced with "postfix reload". This bug
existed in all Postfix versions.
[tron, ticket #1686]
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2.2.8 -r1.1.1.2.2.9 \
src/external/ibm-public/postfix/dist/HISTORY
cvs rdiff -u -r1.1.1.2.2.8 -r1.1.1.2.2.9 \
src/external/ibm-public/postfix/dist/src/global/mail_version.h
cvs rdiff -u -r1.1.1.1.2.3 -r1.1.1.1.2.4 \
src/external/ibm-public/postfix/dist/src/global/mime_state.c
cvs rdiff -u -r1.1.1.1.2.4 -r1.1.1.1.2.5 \
src/external/ibm-public/postfix/dist/src/master/master_avail.c
cvs rdiff -u -r1.2.2.5 -r1.2.2.6 \
src/external/ibm-public/postfix/dist/src/smtpd/smtpd.c
cvs rdiff -u -r1.1.1.1.2.4 -r1.1.1.1.2.5 \
src/external/ibm-public/postfix/dist/src/smtpd/smtpd_proxy.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/ibm-public/postfix/dist/HISTORY
diff -u src/external/ibm-public/postfix/dist/HISTORY:1.1.1.2.2.8 src/external/ibm-public/postfix/dist/HISTORY:1.1.1.2.2.9
--- src/external/ibm-public/postfix/dist/HISTORY:1.1.1.2.2.8 Sat Sep 17 18:57:32 2011
+++ src/external/ibm-public/postfix/dist/HISTORY Wed Nov 2 20:39:01 2011
@@ -15956,3 +15956,36 @@ Apologies for any names omitted.
Bugfix: allow for Milters that send an SMTP server reply
without RFC 3463 enhanced status code. Reported by Vladimir
Vassiliev. File: milter/milter8.c.
+
+20110903
+
+ Bugfix: master daemon panic with "master_spawn: at process
+ limit" error, when "postfix reload" reduced the process
+ limit from (a value larger than the current process count
+ for some service) to (a value <= the current process count),
+ and then a new connection was made to that service. This
+ is the smallest change that eliminates the problem. The
+ final solution involves structural change, and goes into
+ the development release. File: master/master_avail.c.
+
+20110921
+
+ Bugfix (introduced: Postfix 1.1): smtpd(8) did not sanitize
+ newline characters in cleanup(8) REJECT messages, causing
+ them to be sent out via SMTP as bare newline characters.
+ This happened when a REJECT pattern matched multi-line
+ header text. Discovered by Kevin Locke. File: smtpd/smtpd.c.
+
+20110922
+
+ Bugfix (introduced: Postfix 2.1): smtpd(8) sent multi-line
+ responses from a before-queue content filter as text with
+ bare <LF> instead of <CR><LF>. Found during code maintenance.
+ File: smtpd/smtpd_proxy.c.
+
+20111020
+
+ EAI Future-proofing: don't apply strict_mime_encoding_domain
+ checks to unknown message subtypes such as message/global*.
+ File: global/mime_state.c.
+
Index: src/external/ibm-public/postfix/dist/src/global/mail_version.h
diff -u src/external/ibm-public/postfix/dist/src/global/mail_version.h:1.1.1.2.2.8 src/external/ibm-public/postfix/dist/src/global/mail_version.h:1.1.1.2.2.9
--- src/external/ibm-public/postfix/dist/src/global/mail_version.h:1.1.1.2.2.8 Sat Sep 17 18:57:34 2011
+++ src/external/ibm-public/postfix/dist/src/global/mail_version.h Wed Nov 2 20:39:01 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mail_version.h,v 1.1.1.2.2.8 2011/09/17 18:57:34 bouyer Exp $ */
+/* $NetBSD: mail_version.h,v 1.1.1.2.2.9 2011/11/02 20:39:01 riz Exp $ */
#ifndef _MAIL_VERSION_H_INCLUDED_
#define _MAIL_VERSION_H_INCLUDED_
@@ -22,8 +22,8 @@
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20110902"
-#define MAIL_VERSION_NUMBER "2.7.6"
+#define MAIL_RELEASE_DATE "20111924"
+#define MAIL_VERSION_NUMBER "2.7.7"
#ifdef SNAPSHOT
# define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE
Index: src/external/ibm-public/postfix/dist/src/global/mime_state.c
diff -u src/external/ibm-public/postfix/dist/src/global/mime_state.c:1.1.1.1.2.3 src/external/ibm-public/postfix/dist/src/global/mime_state.c:1.1.1.1.2.4
--- src/external/ibm-public/postfix/dist/src/global/mime_state.c:1.1.1.1.2.3 Fri Jan 7 01:24:04 2011
+++ src/external/ibm-public/postfix/dist/src/global/mime_state.c Wed Nov 2 20:39:01 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mime_state.c,v 1.1.1.1.2.3 2011/01/07 01:24:04 riz Exp $ */
+/* $NetBSD: mime_state.c,v 1.1.1.1.2.4 2011/11/02 20:39:01 riz Exp $ */
/*++
/* NAME
@@ -927,7 +927,9 @@ int mime_state_update(MIME_STATE *st
if (state->curr_domain != MIME_ENC_7BIT)
REPORT_ERROR(state, MIME_ERR_ENCODING_DOMAIN,
mime_state_enc_name(state->curr_encoding));
- } else {
+ }
+ /* EAI: message/global allows non-identity encoding. */
+ else if (state->curr_stype == MIME_STYPE_RFC822) {
if (state->curr_encoding != state->curr_domain)
REPORT_ERROR(state, MIME_ERR_ENCODING_DOMAIN,
mime_state_enc_name(state->curr_encoding));
Index: src/external/ibm-public/postfix/dist/src/master/master_avail.c
diff -u src/external/ibm-public/postfix/dist/src/master/master_avail.c:1.1.1.1.2.4 src/external/ibm-public/postfix/dist/src/master/master_avail.c:1.1.1.1.2.5
--- src/external/ibm-public/postfix/dist/src/master/master_avail.c:1.1.1.1.2.4 Fri Jan 7 01:24:06 2011
+++ src/external/ibm-public/postfix/dist/src/master/master_avail.c Wed Nov 2 20:39:02 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: master_avail.c,v 1.1.1.1.2.4 2011/01/07 01:24:06 riz Exp $ */
+/* $NetBSD: master_avail.c,v 1.1.1.1.2.5 2011/11/02 20:39:02 riz Exp $ */
/*++
/* NAME
@@ -87,7 +87,9 @@ static void master_avail_event(int event
if (event == 0) /* XXX Can this happen? */
return;
- if (MASTER_THROTTLED(serv)) { /* XXX interface botch */
+ /* XXX Should check these when the process or service status is changed. */
+ if (!MASTER_LIMIT_OK(serv->max_proc, serv->total_proc)
+ || MASTER_THROTTLED(serv)) { /* XXX interface botch */
for (n = 0; n < serv->listen_fd_count; n++)
event_disable_readwrite(serv->listen_fd[n]);
} else {
Index: src/external/ibm-public/postfix/dist/src/smtpd/smtpd.c
diff -u src/external/ibm-public/postfix/dist/src/smtpd/smtpd.c:1.2.2.5 src/external/ibm-public/postfix/dist/src/smtpd/smtpd.c:1.2.2.6
--- src/external/ibm-public/postfix/dist/src/smtpd/smtpd.c:1.2.2.5 Thu Mar 24 19:54:08 2011
+++ src/external/ibm-public/postfix/dist/src/smtpd/smtpd.c Wed Nov 2 20:39:02 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: smtpd.c,v 1.2.2.5 2011/03/24 19:54:08 riz Exp $ */
+/* $NetBSD: smtpd.c,v 1.2.2.6 2011/11/02 20:39:02 riz Exp $ */
/*++
/* NAME
@@ -3007,6 +3007,7 @@ static int data_cmd(SMTPD_STATE *state,
if (state->err == 0) {
why = vstring_alloc(10);
state->err = mail_stream_finish(state->dest, why);
+ printable(STR(why), ' ');
} else
mail_stream_cleanup(state->dest);
state->dest = 0;
Index: src/external/ibm-public/postfix/dist/src/smtpd/smtpd_proxy.c
diff -u src/external/ibm-public/postfix/dist/src/smtpd/smtpd_proxy.c:1.1.1.1.2.4 src/external/ibm-public/postfix/dist/src/smtpd/smtpd_proxy.c:1.1.1.1.2.5
--- src/external/ibm-public/postfix/dist/src/smtpd/smtpd_proxy.c:1.1.1.1.2.4 Fri Jan 7 01:24:14 2011
+++ src/external/ibm-public/postfix/dist/src/smtpd/smtpd_proxy.c Wed Nov 2 20:39:02 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: smtpd_proxy.c,v 1.1.1.1.2.4 2011/01/07 01:24:14 riz Exp $ */
+/* $NetBSD: smtpd_proxy.c,v 1.1.1.1.2.5 2011/11/02 20:39:02 riz Exp $ */
/*++
/* NAME
@@ -779,7 +779,7 @@ static int smtpd_proxy_cmd(SMTPD_STATE *
*/
if (LEN(proxy->buffer) < var_line_limit) {
if (VSTRING_LEN(proxy->buffer))
- VSTRING_ADDCH(proxy->buffer, '\n');
+ vstring_strcat(proxy->buffer, "\r\n");
vstring_strcat(proxy->buffer, STR(buffer));
}