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
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,
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
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.
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.
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.
# 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...
# 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...
<a href="transport.5.html">transport(5)</a> table to direct mail to the <a href="discard.8.html">discard(8)</a>
service.
+ Note: this action currently does not work in
+ <b><a href="postconf.5.html#smtpd_end_of_data_restrictions">smtpd_end_of_data_restrictions</a></b>.
+
This feature is available in Postfix 2.0 and later.
- <b>DUNNO</b> 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
+ <b>DUNNO</b> 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.
<b>FILTER</b> <i>transport:destination</i>
- 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 <i>transport:destination</i> syntax is described in
- the <a href="transport.5.html"><b>transport</b>(5)</a> manual page. More information
- about external content filters is in the Postfix
+ The <i>transport:destination</i> syntax is described in
+ the <a href="transport.5.html"><b>transport</b>(5)</a> manual page. More information
+ about external content filters is in the Postfix
<a href="FILTER_README.html">FILTER_README</a> file.
- Note: this action overrides the <b>main.cf <a href="postconf.5.html#content_filter">con</a>-</b>
+ Note: this action overrides the <b>main.cf <a href="postconf.5.html#content_filter">con</a>-</b>
<b><a href="postconf.5.html#content_filter">tent_filter</a></b> setting, and currently affects all
recipients of the message.
+ Note: this action currently does not work in
+ <b><a href="postconf.5.html#smtpd_end_of_data_restrictions">smtpd_end_of_data_restrictions</a></b>.
+
This feature is available in Postfix 2.0 and later.
<b>HOLD</b> <i>optional text...</i>
Note: this action currently affects all recipients
of the message.
+ Note: this action currently does not work in
+ <b><a href="postconf.5.html#smtpd_end_of_data_restrictions">smtpd_end_of_data_restrictions</a></b>.
+
This feature is available in Postfix 2.0 and later.
<b>PREPEND</b> <i>headername: headervalue</i>
- 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.
<b>REDIRECT</b> <i>user@domain</i>
- 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
+ <b><a href="postconf.5.html#smtpd_end_of_data_restrictions">smtpd_end_of_data_restrictions</a></b>.
+
This feature is available in Postfix 2.1 and later.
<b>WARN</b> <i>optional text...</i>
<p>
The default mail delivery transport and next-hop destination for
-final delivery to domains listed with <a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>.
+final delivery to domains listed with $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>.
This information can be overruled with the <a href="transport.5.html">transport(5)</a> table.
</p>
<b><a href="postconf.5.html#virtual_transport">virtual_transport</a> (virtual)</b>
The default mail delivery transport and next-hop
destination for final delivery to domains listed
- with <a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>.
+ with $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a>.
<b><a href="postconf.5.html#relay_transport">relay_transport</a> (relay)</b>
The default mail delivery transport and next-hop
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
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
.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.
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
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
[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.
# 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
# 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
# .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.
# 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
<p>
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.
</p>
/* 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;
/*
/* 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().
/*
* 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)))
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\"",
/* 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
/*
* 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. */
* 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
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"),
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));
}
/* [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.