From: Wietse Venema Date: Thu, 14 Nov 2002 05:00:00 +0000 (-0500) Subject: postfix-1.1.11-20021114 X-Git-Tag: v2.0.0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f49c002a2f3e6680fcc1d0eef7a50e146389b8e;p=thirdparty%2Fpostfix.git postfix-1.1.11-20021114 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 1d90d134b..518fa5514 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -7199,6 +7199,26 @@ Apologies for any names omitted. Bugfix: a misguided change to the .forward macro expansion filter broke .forward file lookup. + Bugfix: missing defer_if_permit test in smtpd_data_restrictions. + Victor Duchovni. File: smtpd/smtpd_check.c. + +20021112 + + Robustness: increase the mime_nesting_limit from 20 to 100, + so that bounces can't loop. Each bounces increases the MIME + nesting level by one. Ralf Hildebrandt and Victor Duchovni. + +20021113 + + Robustness: reinstated SMTP client command flushing to + avoid pipeline stalls. File: smtp/smtp_chat.c. + +20021114 + + Robustness: distinguish between timeout and "lost connection" + when the SMTP server is unable to send a reply to the remote + client. File: smtpd/smtpd_chat.c. + Open problems: Low: revise other local delivery agent duplicate filters. diff --git a/postfix/conf/sample-smtpd.cf b/postfix/conf/sample-smtpd.cf index b781213a9..34d79ce2a 100644 --- a/postfix/conf/sample-smtpd.cf +++ b/postfix/conf/sample-smtpd.cf @@ -553,7 +553,7 @@ unknown_address_reject_code = 450 # The unknown_client_reject_code parameter specifies the SMTP server # response when a client without address to name mapping violates -# the reject_unknown_clients restriction. +# the reject_unknown_client restriction. # # Do not change this unless you have a complete understanding of RFC 821. # diff --git a/postfix/html/postsuper.1.html b/postfix/html/postsuper.1.html index 41c331be1..2eb68f224 100644 --- a/postfix/html/postsuper.1.html +++ b/postfix/html/postsuper.1.html @@ -34,7 +34,7 @@ POSTSUPER(1) POSTSUPER(1) input. For example, to delete all mail from or to user@example.com: - mailq | awk 'BEGIN { RS = "" } \ + mailq | tail +2 | awk 'BEGIN { RS = "" } \ / user@example\.com$/ { print $1 } \ ' | tr -d '*!' | postsuper -d - diff --git a/postfix/html/uce.html b/postfix/html/uce.html index 525f5f926..fda4d043d 100644 --- a/postfix/html/uce.html +++ b/postfix/html/uce.html @@ -358,9 +358,10 @@ reject_unknown_client
reject_unknown_client
Reject the request when the -client IP address has no PTR record in the DNS. The -unknown_client_reject_code parameter specifies the response -code to rejected requests (default: 450). +client IP address has no PTR (address to name) record in the DNS, +or when the PTR record does not have a matching A (name to address) +record. The unknown_client_reject_code parameter specifies +the response code to rejected requests (default: 450).

diff --git a/postfix/man/man1/postsuper.1 b/postfix/man/man1/postsuper.1 index d0e70879d..3d98b8b0a 100644 --- a/postfix/man/man1/postsuper.1 +++ b/postfix/man/man1/postsuper.1 @@ -38,7 +38,7 @@ If a \fIqueue_id\fR of \fB-\fR is specified, the program reads queue IDs from standard input. For example, to delete all mail from or to \fBuser@example.com\fR: .sp -mailq | awk \'BEGIN { RS = "" } \e +mailq | tail +2 | awk \'BEGIN { RS = "" } \e .ti +4 / user@example\e.com$/ { print $1 } \e .br diff --git a/postfix/src/global/mail_params.h b/postfix/src/global/mail_params.h index 7f308cab2..a7677b653 100644 --- a/postfix/src/global/mail_params.h +++ b/postfix/src/global/mail_params.h @@ -1564,7 +1564,7 @@ extern int var_qattr_count_limit; * MIME support. */ #define VAR_MIME_MAXDEPTH "mime_nesting_limit" -#define DEF_MIME_MAXDEPTH 20 +#define DEF_MIME_MAXDEPTH 100 extern int var_mime_maxdepth; #define VAR_MIME_BOUND_LEN "mime_boundary_length_limit" diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 027292bc8..03e2ff671 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change the patchlevel and the release date. Snapshots change the * release date only, unless they include the same bugfix as a patch release. */ -#define MAIL_RELEASE_DATE "20021109" +#define MAIL_RELEASE_DATE "20021114" #define VAR_MAIL_VERSION "mail_version" #define DEF_MAIL_VERSION "1.1.11-" MAIL_RELEASE_DATE diff --git a/postfix/src/postsuper/postsuper.c b/postfix/src/postsuper/postsuper.c index d830fe79a..46876ee9d 100644 --- a/postfix/src/postsuper/postsuper.c +++ b/postfix/src/postsuper/postsuper.c @@ -32,7 +32,7 @@ /* queue IDs from standard input. For example, to delete all mail /* from or to \fBuser@example.com\fR: /* .sp -/* mailq | awk \'BEGIN { RS = "" } \e +/* mailq | tail +2 | awk \'BEGIN { RS = "" } \e /* .ti +4 /* / user@example\e.com$/ { print $1 } \e /* .br diff --git a/postfix/src/smtp/smtp_chat.c b/postfix/src/smtp/smtp_chat.c index d33a90e4e..092a5d197 100644 --- a/postfix/src/smtp/smtp_chat.c +++ b/postfix/src/smtp/smtp_chat.c @@ -149,6 +149,20 @@ void smtp_chat_cmd(SMTP_STATE *state, char *fmt,...) * Send the command to the SMTP server. */ smtp_fputs(STR(state->buffer), LEN(state->buffer), session->stream); + + /* + * Flush unsent data to avoid timeouts after slow DNS lookups. + */ + if (time((time_t *) 0) - vstream_ftime(session->stream) > 10) + vstream_fflush(session->stream); + + /* + * Abort immediately if the connection is broken. + */ + if (vstream_ftimeout(session->stream)) + vstream_longjmp(session->stream, SMTP_ERR_TIME); + if (vstream_ferror(session->stream)) + vstream_longjmp(session->stream, SMTP_ERR_EOF); } /* smtp_chat_resp - read and process SMTP server response */ diff --git a/postfix/src/smtpd/smtpd_chat.c b/postfix/src/smtpd/smtpd_chat.c index ae2cf344b..692a52c6e 100644 --- a/postfix/src/smtpd/smtpd_chat.c +++ b/postfix/src/smtpd/smtpd_chat.c @@ -176,6 +176,8 @@ void smtpd_chat_reply(SMTPD_STATE *state, char *format,...) /* * Abort immediately if the connection is broken. */ + if (vstream_ftimeout(state->client)) + vstream_longjmp(state->client, SMTP_ERR_TIME); if (vstream_ferror(state->client)) vstream_longjmp(state->client, SMTP_ERR_EOF); } diff --git a/postfix/src/smtpd/smtpd_check.c b/postfix/src/smtpd/smtpd_check.c index b2ab5ebd3..eb1679050 100644 --- a/postfix/src/smtpd/smtpd_check.c +++ b/postfix/src/smtpd/smtpd_check.c @@ -3269,8 +3269,8 @@ char *smtpd_check_data(SMTPD_STATE *state) } /* - * Reset the defer_if_permit flag. This should not be necessary but we do - * it just in case. + * Reset the defer_if_permit flag. This is necessary when some recipients + * were accepted but the last one was rejected. */ state->defer_if_permit.active = 0; @@ -3284,6 +3284,15 @@ char *smtpd_check_data(SMTPD_STATE *state) if (status == 0 && data_restrctions->argc) status = generic_checks(state, data_restrctions, "DATA", SMTPD_NAME_DATA, NO_DEF_ACL); + + /* + * Force permission into deferral when some earlier temporary error may + * have prevented us from rejecting mail, and report the earlier problem. + */ + if (status != SMTPD_CHECK_REJECT && state->defer_if_permit.active) + status = smtpd_check_reject(state, state->defer_if_permit.class, + "%s", STR(state->defer_if_permit.reason)); + if (state->rcpt_count > 1) state->recipient = saved_recipient;