From: Wietse Venema Date: Fri, 6 Sep 2002 05:00:00 +0000 (-0500) Subject: postfix-1.1.11-20020906 X-Git-Tag: v2.0.0~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87bb4754ed8f18578c6874c8e9ddfeabd5389b7e;p=thirdparty%2Fpostfix.git postfix-1.1.11-20020906 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 6d46badad..f31d85e1a 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -6888,6 +6888,11 @@ Apologies for any names omitted. Feature: "FILTER transport:nexthop" is now also available in SMTPD access tables. +20020826 + + Workaround: HP-UX 11 accept() fails with ENOBUFS when the + client disconnects early. File: sane_accept.c. + 20020901 Cleanup: postfix-install no longer installs all the manual @@ -6901,6 +6906,10 @@ Apologies for any names omitted. of input. Problem fix by Christian Kratzer, cksoft.de. File: auxiliary/rmail/rmail. + Feature: specify "maximal_queue_lifetime = 0" for mail that + should be returned immediately after the first unsuccessful + delivery attempt. Files: qmgr/qmgr.c, nqmgr/nqmgr.c. + 20020904 Bugfix: qmail compatibility: qmqpd should support any diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index 3d27318b1..c5df4ce84 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -12,7 +12,16 @@ snapshot release). Patches change the patchlevel and the release date. Snapshots change only the release date, unless they include the same bugfixes as a patch release. -Major changes with Postfix snapshot 1.1.11-20020XXX +Incompatible changes with Postfix snapshot 1.1.11-20020906 +========================================================== + +The permit_mx_backup restriction is made more strict. With older +versions, some DNS failures would cause mail to be accepted anyway, +and some DNS failures would cause mail to be rejected by later +restrictions in the same restriction list. The improved version +will defer delivery when Postfix could make the wrong decision. + +Major changes with Postfix snapshot 1.1.11-20020906 =================================================== More sophisticated handling of UCE-related DNS lookup errors. @@ -20,20 +29,21 @@ These cause Postfix to not give up so easily, so that some deliveries will not have to be deferred after all. This affects the following restrictions: -- permit_mx_backup (defer the request if a subsequent restriction -would cause the request to be rejected, accept the request if a -subsequent restriction would cause the request to be accepted -anyway); - -- reject_unknown_hostname, reject_unknown_sender_domain and -reject_unknown_recipient_domain (defer the request if a subsequent -restriction would cause the request to be accepted, reject the +- After DNS lookup failure, permit_mx_backup will now accept the request if a subsequent restriction would cause the request to be -rejected anyway). +accepted anyway, and will defer the request if a subsequent +restriction would cause the request to be rejected. + +- After DNS lookup failure, reject_unknown_hostname (the hostname +given in HELO/EHLO commands) reject_unknown_sender_domain and +reject_unknown_recipient_domain will now reject the request if a +subsequent restriction would cause the request to be rejected +anyway, and will defer the request if a subsequent restriction +would cause the request to be accepted. Specify "smtpd_data_restrictions = reject_unauth_pipelining" to block mail from SMTP clients that send message content before -Postfix has replied to the DATA command. +Postfix has replied to the SMTP DATA command. Incompatible changes with Postfix snapshot 1.1.11-20020819 ========================================================== diff --git a/postfix/conf/post-install b/postfix/conf/post-install index 4fd59c312..b9bdfd368 100644 --- a/postfix/conf/post-install +++ b/postfix/conf/post-install @@ -249,7 +249,7 @@ test -d "$config_directory" || { } test -f $config_directory/postfix-files || { - $0: Error: $config_directory/postfix-files is not a file. 1>&2 + echo $0: Error: $config_directory/postfix-files is not a file. 1>&2 exit 1 } diff --git a/postfix/conf/sample-rate.cf b/postfix/conf/sample-rate.cf index 8cd1bb4e4..0de56f928 100644 --- a/postfix/conf/sample-rate.cf +++ b/postfix/conf/sample-rate.cf @@ -42,6 +42,8 @@ maximal_backoff_time = 4000s # Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks). # The default time unit is d (days). # +# Specify 0 when mail delivery should be tried only once. +# maximal_queue_lifetime = 5d # The minimal_backoff_time parameter specifies the minimal time diff --git a/postfix/html/rate.html b/postfix/html/rate.html index 11fa2dc43..aa1cffff5 100644 --- a/postfix/html/rate.html +++ b/postfix/html/rate.html @@ -302,7 +302,8 @@ often the queue manager scans the queue for deferred mail.
maximal_queue_lifetime (default: 5 days)
How long a message stays in the queue before it is sent back as -undeliverable. +undeliverable. Specify 0 for mail that should be returned +immediately after the first unsuccessful delivery attempt.

diff --git a/postfix/src/bounce/bounce.c b/postfix/src/bounce/bounce.c index f176e222f..dd92ec8f5 100644 --- a/postfix/src/bounce/bounce.c +++ b/postfix/src/bounce/bounce.c @@ -419,7 +419,7 @@ int main(int argc, char **argv) 0, }; static CONFIG_TIME_TABLE time_table[] = { - VAR_MAX_QUEUE_TIME, DEF_MAX_QUEUE_TIME, &var_max_queue_time, 1, 8640000, + VAR_MAX_QUEUE_TIME, DEF_MAX_QUEUE_TIME, &var_max_queue_time, 0, 8640000, VAR_DELAY_WARN_TIME, DEF_DELAY_WARN_TIME, &var_delay_warn_time, 0, 0, 0, }; diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 4373cc45a..68abbfa22 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 "20020905" +#define MAIL_RELEASE_DATE "20020906" #define VAR_MAIL_VERSION "mail_version" #define DEF_MAIL_VERSION "1.1.11-" MAIL_RELEASE_DATE diff --git a/postfix/src/qmqpd/qmqpd.c b/postfix/src/qmqpd/qmqpd.c index ff331c355..8b7cb7087 100644 --- a/postfix/src/qmqpd/qmqpd.c +++ b/postfix/src/qmqpd/qmqpd.c @@ -137,6 +137,7 @@ #include #include #include +#include /* Single-threaded server skeleton. */ @@ -217,7 +218,7 @@ static void qmqpd_copy_sender(QMQPD_STATE *state) char *end_prefix; char *end_origin; int verp_requested; - static char verp_chars[] = "-="; + static char verp_delims[] = "-="; /* * If the sender address looks like prefix@origin-@[], then request @@ -236,7 +237,12 @@ static void qmqpd_copy_sender(QMQPD_STATE *state) && --end_prefix < end_origin - 2 /* non-null origin */ && end_prefix > STR(state->buf)); /* non-null prefix */ if (verp_requested) { - verp_chars[0] = end_prefix[0]; + verp_delims[0] = end_prefix[0]; + if (verp_delims_verify(verp_delims) != 0) { + state->err |= CLEANUP_STAT_CONT; /* XXX */ + vstring_sprintf(state->why_rejected, "Invalid VERP delimiters: \"%s\". Need two characters from \"%s\"", + verp_delims, var_verp_filter); + } memmove(end_prefix, end_prefix + 1, end_origin - end_prefix - 1); vstring_truncate(state->buf, end_origin - STR(state->buf) - 1); } @@ -245,7 +251,7 @@ static void qmqpd_copy_sender(QMQPD_STATE *state) state->err = CLEANUP_STAT_WRITE; if (verp_requested) if (state->err == CLEANUP_STAT_OK - && rec_put(state->cleanup, REC_TYPE_VERP, verp_chars, 2) < 0) + && rec_put(state->cleanup, REC_TYPE_VERP, verp_delims, 2) < 0) state->err = CLEANUP_STAT_WRITE; state->sender = mystrndup(STR(state->buf), LEN(state->buf)); } @@ -535,7 +541,8 @@ static void qmqpd_receive(QMQPD_STATE *state) * Start the message content segment, prepend our own Received: header, * and write the message content. */ - qmqpd_write_content(state); + if (state->err == 0) + qmqpd_write_content(state); /* * Close the queue file. diff --git a/postfix/src/smtpd/smtpd_check.c b/postfix/src/smtpd/smtpd_check.c index a426ab4ac..dafc23734 100644 --- a/postfix/src/smtpd/smtpd_check.c +++ b/postfix/src/smtpd/smtpd_check.c @@ -2219,9 +2219,9 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions, if (strchr(name, ':') != 0) { if (def_acl == NO_DEF_ACL) { - msg_warn("specify one of (%s, %s, %s, %s, %s) before restriction \"%s\"", + msg_warn("specify one of (%s, %s, %s, %s, %s) before %s restriction \"%s\"", CHECK_CLIENT_ACL, CHECK_HELO_ACL, CHECK_SENDER_ACL, - CHECK_RECIP_ACL, CHECK_ETRN_ACL, name); + CHECK_RECIP_ACL, CHECK_ETRN_ACL, reply_class, name); longjmp(smtpd_check_buf, smtpd_check_reject(state, MAIL_ERROR_SOFTWARE, "451 Server configuration error")); } @@ -2494,7 +2494,7 @@ char *smtpd_check_helo(SMTPD_STATE *state, char *helohost) */ #define SMTPD_CHECK_PUSH(backup, current, new) { \ backup = current; \ - current = (new ? mystrdup(new) : new); \ + current = (new ? mystrdup(new) : 0); \ } #define SMTPD_CHECK_POP(current, backup) { \ @@ -2818,10 +2818,14 @@ char *smtpd_check_data(SMTPD_STATE *state) /* * Minor kluge so that we can delegate work to the generic routine. We - * provide no recipient information, because this restriction applies to - * all recipients alike. Picking a specific recipient would be wrong. + * provide no recipient information in the case of multiple recipients, + * This restriction applies to all recipients alike, and logging only one + * of them would be misleading. */ - SMTPD_CHECK_PUSH(saved_recipient, state->recipient, 0); + if (state->rcpt_count > 1) { + saved_recipient = state->recipient; + state->recipient = 0; + } /* * Apply restrictions in the order as specified. @@ -2833,8 +2837,10 @@ 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); + if (state->rcpt_count > 1) + state->recipient = saved_recipient; - SMTPD_CHECK_RCPT_RETURN(status == SMTPD_CHECK_REJECT ? STR(error_text) : 0); + return (status == SMTPD_CHECK_REJECT ? STR(error_text) : 0); } #ifdef TEST