From d3577319fbfce3febf67741efeecabb37c27941d Mon Sep 17 00:00:00 2001 From: Wietse Venema Date: Mon, 24 Oct 2011 00:00:00 -0500 Subject: [PATCH] postfix-2.6.13 --- postfix/HISTORY | 33 +++++++++++++++++++++++++++++++ postfix/src/global/mail_version.h | 4 ++-- postfix/src/global/mime_state.c | 4 +++- postfix/src/master/master_avail.c | 4 +++- postfix/src/smtpd/smtpd.c | 1 + postfix/src/smtpd/smtpd_proxy.c | 2 +- 6 files changed, 43 insertions(+), 5 deletions(-) diff --git a/postfix/HISTORY b/postfix/HISTORY index 5de54b1db..3ea41ff4d 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -15541,3 +15541,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 instead of . 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. + diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 06834b47a..cd405c427 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,8 +20,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.6.12" +#define MAIL_RELEASE_DATE "20111024" +#define MAIL_VERSION_NUMBER "2.6.13" #ifdef SNAPSHOT # define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE diff --git a/postfix/src/global/mime_state.c b/postfix/src/global/mime_state.c index ac754c0a3..29d04876d 100644 --- a/postfix/src/global/mime_state.c +++ b/postfix/src/global/mime_state.c @@ -925,7 +925,9 @@ int mime_state_update(MIME_STATE *state, int rec_type, 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)); diff --git a/postfix/src/master/master_avail.c b/postfix/src/master/master_avail.c index 6008ca19f..44a9c2ec3 100644 --- a/postfix/src/master/master_avail.c +++ b/postfix/src/master/master_avail.c @@ -85,7 +85,9 @@ static void master_avail_event(int event, char *context) 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 { diff --git a/postfix/src/smtpd/smtpd.c b/postfix/src/smtpd/smtpd.c index 720bcede1..e1653fcc6 100644 --- a/postfix/src/smtpd/smtpd.c +++ b/postfix/src/smtpd/smtpd.c @@ -2989,6 +2989,7 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv) 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; diff --git a/postfix/src/smtpd/smtpd_proxy.c b/postfix/src/smtpd/smtpd_proxy.c index 5c682439a..6e691a45c 100644 --- a/postfix/src/smtpd/smtpd_proxy.c +++ b/postfix/src/smtpd/smtpd_proxy.c @@ -542,7 +542,7 @@ int smtpd_proxy_cmd(SMTPD_STATE *state, int expect, const char *fmt,...) */ if (LEN(state->proxy_buffer) < var_line_limit) { if (VSTRING_LEN(state->proxy_buffer)) - VSTRING_ADDCH(state->proxy_buffer, '\n'); + vstring_strcat(state->proxy_buffer, "\r\n"); vstring_strcat(state->proxy_buffer, STR(buffer)); }