From c3ca62281d05341925a0b847af412f733cfc0deb Mon Sep 17 00:00:00 2001 From: Wietse Venema Date: Fri, 2 Sep 2011 00:00:00 -0500 Subject: [PATCH] postfix-2.8.5 --- postfix/HISTORY | 14 ++++++++++++++ postfix/README_FILES/MILTER_README | 7 +++++-- postfix/html/MILTER_README.html | 3 ++- postfix/proto/MILTER_README.html | 3 ++- postfix/src/global/mail_version.h | 4 ++-- postfix/src/milter/milter8.c | 4 +++- postfix/src/smtpd/smtpd_state.c | 1 + 7 files changed, 29 insertions(+), 7 deletions(-) diff --git a/postfix/HISTORY b/postfix/HISTORY index c135bdf2e..347d71e25 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -16634,3 +16634,17 @@ Apologies for any names omitted. IP queries" even if the name has an alphanumerical prefix. We play safe, and skip both RHSBL and RHSWL queries for names ending in a numerical suffix. File: smtpd/smtpd_check.c. + +20110811 + + Workaround: report a {client_connections} Milter macro value + of zero instead of garbage, when the remote SMTP client is + not subject to any smtpd_client_* limits. Problem reported + by Christian Roessner. File: smtpd/smtpd_state.c, + proto/MILTER_README.html. + +20110831 + + Bugfix: allow for Milters that send an SMTP server reply + without RFC 3463 enhanced status code. Reported by Vladimir + Vassiliev. File: milter/milter8.c. diff --git a/postfix/README_FILES/MILTER_README b/postfix/README_FILES/MILTER_README index 084ea4de5..abae443a8 100644 --- a/postfix/README_FILES/MILTER_README +++ b/postfix/README_FILES/MILTER_README @@ -339,8 +339,11 @@ Sendmail. See the workarounds section below for solutions. |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |{client_addr} |Always |Client IP address | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | - |{client_connections}|CONNECT |Connection concurrency for| - | | |this client | + | | |Connection concurrency for| + | | |this client (zero if the | + |{client_connections}|CONNECT |client is excluded from | + | | |all smtpd_client_* | + | | |limits). | |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | | | |Client hostname | | | |When address -> name | diff --git a/postfix/html/MILTER_README.html b/postfix/html/MILTER_README.html index bb5a38590..cd00115ca 100644 --- a/postfix/html/MILTER_README.html +++ b/postfix/html/MILTER_README.html @@ -559,7 +559,8 @@ login method address {client_connections} CONNECT -Connection concurrency for this client +Connection concurrency for this client (zero if the client is +excluded from all smtpd_client_* limits). {client_name} Always Client hostname
When address → name lookup or name → address diff --git a/postfix/proto/MILTER_README.html b/postfix/proto/MILTER_README.html index 5e3a50857..48938fcec 100644 --- a/postfix/proto/MILTER_README.html +++ b/postfix/proto/MILTER_README.html @@ -559,7 +559,8 @@ login method address {client_connections} CONNECT -Connection concurrency for this client +Connection concurrency for this client (zero if the client is +excluded from all smtpd_client_* limits). {client_name} Always Client hostname
When address → name lookup or name → address diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 256a688f4..2ee043673 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 "20110706" -#define MAIL_VERSION_NUMBER "2.8.4" +#define MAIL_RELEASE_DATE "20110902" +#define MAIL_VERSION_NUMBER "2.8.5" #ifdef SNAPSHOT # define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE diff --git a/postfix/src/milter/milter8.c b/postfix/src/milter/milter8.c index 35accb022..22d4c419f 100644 --- a/postfix/src/milter/milter8.c +++ b/postfix/src/milter/milter8.c @@ -1255,11 +1255,13 @@ static const char *milter8_event(MILTER8 *milter, int event, MILTER8_DATA_BUFFER, milter->buf, MILTER8_DATA_END) != 0) MILTER8_EVENT_BREAK(milter->def_reply); + /* XXX Enforce this for each line of a multi-line reply. */ if ((STR(milter->buf)[0] != '4' && STR(milter->buf)[0] != '5') || !ISDIGIT(STR(milter->buf)[1]) || !ISDIGIT(STR(milter->buf)[2]) || (STR(milter->buf)[3] != ' ' && STR(milter->buf)[3] != '-') - || STR(milter->buf)[4] != STR(milter->buf)[0]) { + || (ISDIGIT(STR(milter->buf)[4]) + && (STR(milter->buf)[4] != STR(milter->buf)[0]))) { msg_warn("milter %s: malformed reply: %s", milter->m.name, STR(milter->buf)); milter8_conf_error(milter); diff --git a/postfix/src/smtpd/smtpd_state.c b/postfix/src/smtpd/smtpd_state.c index 98f2f5b83..12bca3025 100644 --- a/postfix/src/smtpd/smtpd_state.c +++ b/postfix/src/smtpd/smtpd_state.c @@ -84,6 +84,7 @@ void smtpd_state_init(SMTPD_STATE *state, VSTREAM *stream, state->service = mystrdup(service); state->buffer = vstring_alloc(100); state->addr_buf = vstring_alloc(100); + state->conn_count = state->conn_rate = 0; state->error_count = 0; state->error_mask = 0; state->notify_mask = name_mask(VAR_NOTIFY_CLASSES, mail_error_masks,