diff --git a/postfix/HISTORY b/postfix/HISTORY index 5b2275f29..4faa2d5e1 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -11342,7 +11342,8 @@ Apologies for any names omitted. a race condition. This time window was increased when queue file creation was postponed from MAIL FROM until the first accepted RCPT TO. The window is closed again. Found by - Victor. Files: global/mail_stream.c, global/mail_queue.c. + Victor. Files: global/mail_stream.c, global/mail_queue.c, + cleanup/cleanup_message.c. 20051109 @@ -11457,6 +11458,14 @@ Apologies for any names omitted. extended version of a patch by Mathias Hasselmann. Files: smtp/smtp_connect.c, smtp/smtp_sasl_glue.c. +20051126 + + Workaround: log warning when REDIRECT or FILTER are used + in smtpd_end_of_data_restrictions. File: smtpd/smtpd_check.c. + + Log warning when REDIRECT or FILTER are used in + smtpd_etrn_restrictions. File: smtpd/smtpd_check.c. + Open problems: "postsuper -r" no longer resets the message arrival time, @@ -11464,8 +11473,8 @@ Open problems: information. This can be a problem when mail "on hold" is released after a long time. - Is it safe to cache a connection after it has been used - for more than some number of address verification probes? + Is it safe to cache a connection after it has been used for + more than some number of address verification probes? Access map actions such as FILTER and REDIRECT don't work in smtpd_end_of_data_restrictions (or anything else that @@ -11546,8 +11555,6 @@ Open problems: become arbitrarily short when an event is scheduled just before the current second rolls over. - Low: per-sender resolver personalities? - Low: configurable internal/system locking method. Low: make sure CCARGS -I options come at the end. @@ -11560,7 +11567,7 @@ Open problems: Low: noise filter: allow smtp(8) to retry immediately if all MXes return a quick ECONNRESET or 4xx reply during the - initial handshake. + initial handshake. Retry once? How many times? Low: make post-install a "postfix-only script" so it can take data from the environment instead of main.cf. @@ -11581,7 +11588,9 @@ Open problems: unthrottle disabled transports or queues. Med: postsuper -r should do something with recipients in - bounce logfiles. + bounce logfiles, to make sure the sender will be notified. + To be perfectly safe, no process other than the queue manager + should move a queue file from the active queue. Low: postsuper re-run after renaming files, but only a limited number of times. diff --git a/postfix/conf/access b/postfix/conf/access index ed1c2e003..af9435ee3 100644 --- a/postfix/conf/access +++ b/postfix/conf/access @@ -221,27 +221,33 @@ # transport(5) table to direct mail to the discard(8) # service. # +# Note: this action currently does not work in +# smtpd_end_of_data_restrictions. +# # This feature is available in Postfix 2.0 and later. # -# DUNNO Pretend that the lookup key was not found. This -# prevents Postfix from trying substrings of the -# lookup key (such as a subdomain name, or a network +# DUNNO Pretend that the lookup key was not found. This +# prevents Postfix from trying substrings of the +# lookup key (such as a subdomain name, or a network # address subnetwork). # # This feature is available in Postfix 2.0 and later. # # FILTER transport:destination -# After the message is queued, send the entire mes- +# After the message is queued, send the entire mes- # sage through the specified external content filter. -# The transport:destination syntax is described in -# the transport(5) manual page. More information -# about external content filters is in the Postfix +# The transport:destination syntax is described in +# the transport(5) manual page. More information +# about external content filters is in the Postfix # FILTER_README file. # -# Note: this action overrides the main.cf con- +# Note: this action overrides the main.cf con- # tent_filter setting, and currently affects all # recipients of the message. # +# Note: this action currently does not work in +# smtpd_end_of_data_restrictions. +# # This feature is available in Postfix 2.0 and later. # # HOLD optional text... @@ -262,27 +268,33 @@ # Note: this action currently affects all recipients # of the message. # +# Note: this action currently does not work in +# smtpd_end_of_data_restrictions. +# # This feature is available in Postfix 2.0 and later. # # PREPEND headername: headervalue -# Prepend the specified message header to the mes- +# Prepend the specified message header to the mes- # sage. When this action is used multiple times, the -# first prepended header appears before the second +# first prepended header appears before the second # etc. prepended header. # -# Note: this action does not support multi-line mes- +# Note: this action does not support multi-line mes- # sage headers. # # This feature is available in Postfix 2.1 and later. # # REDIRECT user@domain -# After the message is queued, send the message to +# After the message is queued, send the message to # the specified address instead of the intended # recipient(s). # -# Note: this action overrides the FILTER action, and +# Note: this action overrides the FILTER action, and # currently affects all recipients of the message. # +# Note: this action currently does not work in +# smtpd_end_of_data_restrictions. +# # This feature is available in Postfix 2.1 and later. # # WARN optional text... diff --git a/postfix/html/access.5.html b/postfix/html/access.5.html index 85c10ed26..a9ec6353e 100644 --- a/postfix/html/access.5.html +++ b/postfix/html/access.5.html @@ -227,27 +227,33 @@ ACCESS(5) ACCESS(5) transport(5) table to direct mail to the discard(8) service. + Note: this action currently does not work in + smtpd_end_of_data_restrictions. + This feature is available in Postfix 2.0 and later. - DUNNO Pretend that the lookup key was not found. This - prevents Postfix from trying substrings of the - lookup key (such as a subdomain name, or a network + DUNNO Pretend that the lookup key was not found. This + prevents Postfix from trying substrings of the + lookup key (such as a subdomain name, or a network address subnetwork). This feature is available in Postfix 2.0 and later. FILTER transport:destination - After the message is queued, send the entire mes- + After the message is queued, send the entire mes- sage through the specified external content filter. - The transport:destination syntax is described in - the transport(5) manual page. More information - about external content filters is in the Postfix + The transport:destination syntax is described in + the transport(5) manual page. More information + about external content filters is in the Postfix FILTER_README file. - Note: this action overrides the main.cf con- + Note: this action overrides the main.cf con- tent_filter setting, and currently affects all recipients of the message. + Note: this action currently does not work in + smtpd_end_of_data_restrictions. + This feature is available in Postfix 2.0 and later. HOLD optional text... @@ -268,27 +274,33 @@ ACCESS(5) ACCESS(5) Note: this action currently affects all recipients of the message. + Note: this action currently does not work in + smtpd_end_of_data_restrictions. + This feature is available in Postfix 2.0 and later. PREPEND headername: headervalue - Prepend the specified message header to the mes- + Prepend the specified message header to the mes- sage. When this action is used multiple times, the - first prepended header appears before the second + first prepended header appears before the second etc. prepended header. - Note: this action does not support multi-line mes- + Note: this action does not support multi-line mes- sage headers. This feature is available in Postfix 2.1 and later. REDIRECT user@domain - After the message is queued, send the message to + After the message is queued, send the message to the specified address instead of the intended recipient(s). - Note: this action overrides the FILTER action, and + Note: this action overrides the FILTER action, and currently affects all recipients of the message. + Note: this action currently does not work in + smtpd_end_of_data_restrictions. + This feature is available in Postfix 2.1 and later. WARN optional text... diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html index 271364db1..fa2eef1fd 100644 --- a/postfix/html/postconf.5.html +++ b/postfix/html/postconf.5.html @@ -10254,7 +10254,7 @@ deferred.

The default mail delivery transport and next-hop destination for -final delivery to domains listed with virtual_mailbox_domains. +final delivery to domains listed with $virtual_mailbox_domains. This information can be overruled with the transport(5) table.

diff --git a/postfix/html/trivial-rewrite.8.html b/postfix/html/trivial-rewrite.8.html index 1aaa7183d..6f62be239 100644 --- a/postfix/html/trivial-rewrite.8.html +++ b/postfix/html/trivial-rewrite.8.html @@ -154,7 +154,7 @@ TRIVIAL-REWRITE(8) TRIVIAL-REWRITE(8) virtual_transport (virtual) The default mail delivery transport and next-hop destination for final delivery to domains listed - with virtual_mailbox_domains. + with $virtual_mailbox_domains. relay_transport (relay) The default mail delivery transport and next-hop diff --git a/postfix/man/man5/access.5 b/postfix/man/man5/access.5 index b4895794c..496f58a26 100644 --- a/postfix/man/man5/access.5 +++ b/postfix/man/man5/access.5 @@ -212,6 +212,9 @@ Note: this action currently affects all recipients of the message. To discard only one recipient without discarding the entire message, use the transport(5) table to direct mail to the discard(8) service. .sp +Note: this action currently does not work in +\fBsmtpd_end_of_data_restrictions\fR. +.sp This feature is available in Postfix 2.0 and later. .IP \fBDUNNO\fR Pretend that the lookup key was not found. This @@ -229,6 +232,9 @@ about external content filters is in the Postfix FILTER_README file. Note: this action overrides the \fBmain.cf content_filter\fR setting, and currently affects all recipients of the message. .sp +Note: this action currently does not work in +\fBsmtpd_end_of_data_restrictions\fR. +.sp This feature is available in Postfix 2.0 and later. .IP "\fBHOLD \fIoptional text...\fR" Place the message on the \fBhold\fR queue, where it will sit @@ -246,6 +252,9 @@ or \fB$bounce_queue_lifetime\fR, or longer. .sp Note: this action currently affects all recipients of the message. .sp +Note: this action currently does not work in +\fBsmtpd_end_of_data_restrictions\fR. +.sp This feature is available in Postfix 2.0 and later. .IP "\fBPREPEND \fIheadername: headervalue\fR" Prepend the specified message header to the message. @@ -262,6 +271,9 @@ address instead of the intended recipient(s). Note: this action overrides the FILTER action, and currently affects all recipients of the message. .sp +Note: this action currently does not work in +\fBsmtpd_end_of_data_restrictions\fR. +.sp This feature is available in Postfix 2.1 and later. .IP "\fBWARN \fIoptional text...\fR Log a warning with the optional text, together with client information diff --git a/postfix/man/man5/postconf.5 b/postfix/man/man5/postconf.5 index 4d4a5de7e..468e5d4a2 100644 --- a/postfix/man/man5/postconf.5 +++ b/postfix/man/man5/postconf.5 @@ -5951,7 +5951,7 @@ values less than this will be rejected, and the message will be deferred. .SH virtual_transport (default: virtual) The default mail delivery transport and next-hop destination for -final delivery to domains listed with virtual_mailbox_domains. +final delivery to domains listed with $virtual_mailbox_domains. This information can be overruled with the \fBtransport\fR(5) table. .PP Specify a string of the form \fItransport:nexthop\fR, where \fItransport\fR diff --git a/postfix/man/man8/trivial-rewrite.8 b/postfix/man/man8/trivial-rewrite.8 index d51635ddb..b7123ee50 100644 --- a/postfix/man/man8/trivial-rewrite.8 +++ b/postfix/man/man8/trivial-rewrite.8 @@ -146,7 +146,7 @@ for final delivery to domains listed with mydestination, and for [ipaddress] destinations that match $inet_interfaces or $proxy_interfaces. .IP "\fBvirtual_transport (virtual)\fR" The default mail delivery transport and next-hop destination for -final delivery to domains listed with virtual_mailbox_domains. +final delivery to domains listed with $virtual_mailbox_domains. .IP "\fBrelay_transport (relay)\fR" The default mail delivery transport and next-hop destination for remote delivery to domains listed with $relay_domains. diff --git a/postfix/proto/access b/postfix/proto/access index 69598470f..c6a1d97ae 100644 --- a/postfix/proto/access +++ b/postfix/proto/access @@ -192,6 +192,9 @@ # To discard only one recipient without discarding the entire message, # use the transport(5) table to direct mail to the discard(8) service. # .sp +# Note: this action currently does not work in +# \fBsmtpd_end_of_data_restrictions\fR. +# .sp # This feature is available in Postfix 2.0 and later. # .IP \fBDUNNO\fR # Pretend that the lookup key was not found. This @@ -209,6 +212,9 @@ # Note: this action overrides the \fBmain.cf content_filter\fR setting, # and currently affects all recipients of the message. # .sp +# Note: this action currently does not work in +# \fBsmtpd_end_of_data_restrictions\fR. +# .sp # This feature is available in Postfix 2.0 and later. # .IP "\fBHOLD \fIoptional text...\fR" # Place the message on the \fBhold\fR queue, where it will sit @@ -226,6 +232,9 @@ # .sp # Note: this action currently affects all recipients of the message. # .sp +# Note: this action currently does not work in +# \fBsmtpd_end_of_data_restrictions\fR. +# .sp # This feature is available in Postfix 2.0 and later. # .IP "\fBPREPEND \fIheadername: headervalue\fR" # Prepend the specified message header to the message. @@ -242,6 +251,9 @@ # Note: this action overrides the FILTER action, and currently affects # all recipients of the message. # .sp +# Note: this action currently does not work in +# \fBsmtpd_end_of_data_restrictions\fR. +# .sp # This feature is available in Postfix 2.1 and later. # .IP "\fBWARN \fIoptional text...\fR # Log a warning with the optional text, together with client information diff --git a/postfix/proto/postconf.proto b/postfix/proto/postconf.proto index 35230c37a..9f61f108c 100644 --- a/postfix/proto/postconf.proto +++ b/postfix/proto/postconf.proto @@ -7714,7 +7714,7 @@ deferred.

The default mail delivery transport and next-hop destination for -final delivery to domains listed with virtual_mailbox_domains. +final delivery to domains listed with $virtual_mailbox_domains. This information can be overruled with the transport(5) table.

diff --git a/postfix/src/bounce/bounce_template.c b/postfix/src/bounce/bounce_template.c index 99ded0966..b2df97b76 100644 --- a/postfix/src/bounce/bounce_template.c +++ b/postfix/src/bounce/bounce_template.c @@ -12,7 +12,8 @@ /* void bounce_template_free(template) /* BOUNCE_TEMPLATE *template; /* -/* void bounce_template_load(stream, buffer, origin) +/* void bounce_template_load(template, stream, buffer, origin) +/* BOUNCE_TEMPLATE *template; /* VSTREAM *stream; /* const char *buffer; /* const char *origin; @@ -57,8 +58,8 @@ /* /* bounce_template_free() destroys a bounce message template. /* -/* bounce_template_load() reads a bounce template from the -/* specified buffer with the specified origin. The buffer and +/* bounce_template_load() overrides a bounce template with the +/* specified buffer from the specified origin. The buffer and /* origin are copied. Specify a null buffer and origin pointer /* to reset the template to the defaults specified with /* bounce_template_create(). @@ -340,7 +341,7 @@ static void bounce_template_parse_buffer(BOUNCE_TEMPLATE *tp) /* * Is this 7bit or 8bit text? If the character set is US-ASCII, then - * don't allow 8bit text. + * don't allow 8bit text. Don't assume 8bit when charset was changed. */ #define NON_ASCII(p) (*(p) && !allascii((p))) @@ -401,6 +402,7 @@ static const char *bounce_template_lookup(const char *key, int unused_mode, tp->origin, result, tp->class, key); msg_warn("please increase time unit \"%s\" of \"%s\" " "in %s template", bd->suffix, key, tp->class); + msg_warn("for instructions see the bounce(5) manual"); } else if (result == 0 && bp->value[0] && bd->divisor > 1) { msg_warn("%s: zero result in %s template " "conversion of parameter \"%s\"", diff --git a/postfix/src/bounce/bounce_templates.c b/postfix/src/bounce/bounce_templates.c index 292ea04a7..18b0bb34c 100644 --- a/postfix/src/bounce/bounce_templates.c +++ b/postfix/src/bounce/bounce_templates.c @@ -41,7 +41,7 @@ /* bounce_templates_free() destroys a bounce template group. /* /* bounce_templates_load() reads zero or more bounce templates -/* from the specified file. +/* from the specified file to override built-in templates. /* /* bounce_templates_expand() expands $name macros and writes /* the text portions of the specified bounce template group diff --git a/postfix/src/cleanup/cleanup_extracted.c b/postfix/src/cleanup/cleanup_extracted.c index 5e0dbf9f3..4746b214e 100644 --- a/postfix/src/cleanup/cleanup_extracted.c +++ b/postfix/src/cleanup/cleanup_extracted.c @@ -237,6 +237,10 @@ void cleanup_extracted_process(CLEANUP_STATE *state, int type, /* * Extracted envelope non-recipient record processing. + * + * XXX We currently cannot have FILTER, REDIRECT etc. action records after + * the message content, as that would break the use of "postsuper -r" to + * reset such information. See also smtpd/smtpd_check.c. */ if (state->flags & CLEANUP_FLAG_INRCPT) /* Tell qmgr that recipient records are mixed with other information. */ diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 143d31f27..80974246f 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20051125" +#define MAIL_RELEASE_DATE "20051126" #define MAIL_VERSION_NUMBER "2.3" #ifdef SNAPSHOT diff --git a/postfix/src/global/resolve_clnt.c b/postfix/src/global/resolve_clnt.c index 7dd7147a3..fcaf2c624 100644 --- a/postfix/src/global/resolve_clnt.c +++ b/postfix/src/global/resolve_clnt.c @@ -244,8 +244,8 @@ void resolve_clnt(const char *class, const char *sender, var_rewrite_service); } else { if (msg_verbose) - msg_info("%s: `%s' -> transp=`%s' host=`%s' rcpt=`%s' flags=%s%s%s%s class=%s%s%s%s%s", - myname, addr, STR(reply->transport), + msg_info("%s: `%s' -> `%s' -> transp=`%s' host=`%s' rcpt=`%s' flags=%s%s%s%s class=%s%s%s%s%s", + myname, sender, addr, STR(reply->transport), STR(reply->nexthop), STR(reply->recipient), IFSET(RESOLVE_FLAG_FINAL, "final"), IFSET(RESOLVE_FLAG_ROUTED, "routed"), diff --git a/postfix/src/smtpd/smtpd_check.c b/postfix/src/smtpd/smtpd_check.c index e37c956d2..46f3f1a85 100644 --- a/postfix/src/smtpd/smtpd_check.c +++ b/postfix/src/smtpd/smtpd_check.c @@ -1835,6 +1835,26 @@ static int can_delegate_action(SMTPD_STATE *state, const char *table, table, VAR_SMTPD_PROXY_FILT, action); return (0); } + + /* + * XXX We currently cannot have FILTER, REDIRECT etc. action records + * after the message content, as that would break the use of "postsuper + * -r" to reset such information. See cleanup/cleanup_extracted.c. + */ + if (strcmp(state->where, SMTPD_AFTER_DOT) == 0) { + msg_warn("access table %s: action %s is unavailable in %s", + table, action, VAR_EOD_CHECKS); + return (0); + } + + /* + * ETRN does not receive mail so we can't store queue file records. + */ + if (strcmp(state->where, "ETRN") == 0) { + msg_warn("access table %s: action %s is unavailable in %s", + table, action, VAR_ETRN_CHECKS); + return (0); + } return (not_in_client_helo(state, table, action, reply_class)); } diff --git a/postfix/src/trivial-rewrite/trivial-rewrite.c b/postfix/src/trivial-rewrite/trivial-rewrite.c index 36db1b7b6..0ab6f46dc 100644 --- a/postfix/src/trivial-rewrite/trivial-rewrite.c +++ b/postfix/src/trivial-rewrite/trivial-rewrite.c @@ -124,7 +124,7 @@ /* [ipaddress] destinations that match $inet_interfaces or $proxy_interfaces. /* .IP "\fBvirtual_transport (virtual)\fR" /* The default mail delivery transport and next-hop destination for -/* final delivery to domains listed with virtual_mailbox_domains. +/* final delivery to domains listed with $virtual_mailbox_domains. /* .IP "\fBrelay_transport (relay)\fR" /* The default mail delivery transport and next-hop destination for /* remote delivery to domains listed with $relay_domains.