Logging: minimal DNAME support. Viktor Dukhovni. dns/dns.h,
dns/dns_lookup.c, dns/dns_strtype.c, dns/test_dns_lookup.c.
+20130710
+
+ Workaround: smtp_connection_reuse_count_limit (default 0,
+ i.e. unlimited) for sites that must deal with hostile
+ connection reuse policies. The documentation comes with a
+ warning that this feature introduces a "fatal attractor"
+ failure mode. Files: global/mail_params.h, mantools/postlink,
+ proto/postconf.proto, smtp/smtp.c, smtp/smtp_params.c,
+ smtp/lmtp_params.c, smtp/smtp.h.
+
+ Workaround: FreeBSD9 nroff outputs ANSI escape sequences
+ instead of overstrike sequences. To make matters worse, it
+ uses the ESC[0m sequence sometimes for end-of-bold and
+ sometimes for end-of-italic. File: mantools/man2html.
times. This avoids triggering bugs in implementations that do not correctly
handle multiple deliveries per session.
- With Postfix 2.2 the use count is limited with the
- smtp_connection_cache_reuse_limit configuration parameter. With Postfix 2.3
- this is replaced by a time limit which is specified with the
- smtp_connection_reuse_time_limit parameter. In addition, Postfix 2.3 logs
- the use count of multiply-used connections, as shown in the following
- example:
+ As of Postfix 2.3 connection reuse is preferably limited with the
+ smtp_connection_reuse_time_limit parameter. In addition, Postfix 2.11
+ provides smtp_connection_reuse_count_limit to limit how many times a
+ connection may be reused, but this feature is unsafe as it introduces a
+ "fatal attractor" failure mode (when a destination has multiple inbound
+ MTAs, the slowest inbound MTA will attract most connections from Postfix to
+ that destination).
+
+ .
+ Postfix 2.3 logs the use count of multiply-used connections, as shown in
+ the following example:
Nov 3 16:04:31 myname postfix/smtp[30840]: 19B6B2900FE:
to=<wietse@test.example.com>, orig_to=<wietse@test>,
limited number of times. This avoids triggering bugs in implementations
that do not correctly handle multiple deliveries per session. </p>
-<p> With Postfix 2.2 the use count is limited with the
-<a href="postconf.5.html#smtp_connection_cache_reuse_limit">smtp_connection_cache_reuse_limit</a> configuration parameter. With
-Postfix 2.3 this is replaced by a time limit which is specified
-with the <a href="postconf.5.html#smtp_connection_reuse_time_limit">smtp_connection_reuse_time_limit</a> parameter. In addition,
-Postfix 2.3 logs the use count of multiply-used connections,
+<p> As of Postfix 2.3 connection reuse is preferably limited with
+the <a href="postconf.5.html#smtp_connection_reuse_time_limit">smtp_connection_reuse_time_limit</a> parameter. In addition, Postfix
+2.11 provides <a href="postconf.5.html#smtp_connection_reuse_count_limit">smtp_connection_reuse_count_limit</a> to limit how many
+times a connection may be reused, but this feature is unsafe as it
+introduces a "fatal attractor" failure mode (when a destination has
+multiple inbound MTAs, the slowest inbound MTA will attract most
+connections from Postfix to that destination). </p>.
+
+<p> Postfix 2.3 logs the use count of multiply-used connections,
as shown in the following example: </p>
<blockquote>
<b>inet</b>:<i>hostname</i>
- <b>inet:</b><i>hostname</i>:<i>port</i>
+ <b>inet</b>:<i>hostname</i>:<i>port</i>
<b>inet</b>:[<i>address</i>]
SMTP message content line, or TLS protocol mes-
sage).
+ Available in Postfix version 2.11 and later:
+
+ <b><a href="postconf.5.html#smtp_connection_reuse_count_limit">smtp_connection_reuse_count_limit</a> (0)</b>
+ When SMTP connection caching is enabled, the number
+ of times that an SMTP session may be reused before
+ it is closed, or zero (no limit).
+
<b>TROUBLE SHOOTING CONTROLS</b>
<b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a> (2)</b>
The increment in verbose logging level when a
<p> This feature is available in Postfix 2.3 and later. </p>
+</DD>
+
+<DT><b><a name="lmtp_connection_reuse_count_limit">lmtp_connection_reuse_count_limit</a>
+(default: 0)</b></DT><DD>
+
+<p> The LMTP-specific version of the <a href="postconf.5.html#smtp_connection_reuse_count_limit">smtp_connection_reuse_count_limit</a>
+configuration parameter. See there for details. </p>
+
+<p> This feature is available in Postfix 2.11 and later. </p>
+
+
</DD>
<DT><b><a name="lmtp_connection_reuse_time_limit">lmtp_connection_reuse_time_limit</a>
<p> This feature is available in Postfix 2.2 and later. </p>
-</DD>
-
-<DT><b><a name="smtp_connection_cache_reuse_limit">smtp_connection_cache_reuse_limit</a>
-(default: 10)</b></DT><DD>
-
-<p> When SMTP connection caching is enabled, the number of times that
-an SMTP session may be reused before it is closed.
-</p>
-
-<p> This feature is available in Postfix 2.2. In Postfix 2.3 it is
-replaced by $<a href="postconf.5.html#smtp_connection_reuse_time_limit">smtp_connection_reuse_time_limit</a>.</p>
-
-
</DD>
<DT><b><a name="smtp_connection_cache_time_limit">smtp_connection_cache_time_limit</a>
<p> This feature is available in Postfix 2.2 and later. </p>
+</DD>
+
+<DT><b><a name="smtp_connection_reuse_count_limit">smtp_connection_reuse_count_limit</a>
+(default: 0)</b></DT><DD>
+
+<p> When SMTP connection caching is enabled, the number of times
+that an SMTP session may be reused before it is closed, or zero (no
+limit). With a reuse count limit of N, a connection is used up to
+N+1 times. </p>
+
+<p> NOTE: This feature is unsafe. When a high-volume destination
+has multiple inbound MTAs, then the slowest inbound MTA will attract
+the most connections to that destination. This limitation does not
+exist with the <a href="postconf.5.html#smtp_connection_reuse_time_limit">smtp_connection_reuse_time_limit</a> feature. </p>
+
+<p> This feature is available in Postfix 2.11. </p>
+
+
</DD>
<DT><b><a name="smtp_connection_reuse_time_limit">smtp_connection_reuse_time_limit</a>
<b>inet</b>:<i>hostname</i>
- <b>inet:</b><i>hostname</i>:<i>port</i>
+ <b>inet</b>:<i>hostname</i>:<i>port</i>
<b>inet</b>:[<i>address</i>]
SMTP message content line, or TLS protocol mes-
sage).
+ Available in Postfix version 2.11 and later:
+
+ <b><a href="postconf.5.html#smtp_connection_reuse_count_limit">smtp_connection_reuse_count_limit</a> (0)</b>
+ When SMTP connection caching is enabled, the number
+ of times that an SMTP session may be reused before
+ it is closed, or zero (no limit).
+
<b>TROUBLE SHOOTING CONTROLS</b>
<b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a> (2)</b>
The increment in verbose logging level when a
See there for details.
.PP
This feature is available in Postfix 2.3 and later.
+.SH lmtp_connection_reuse_count_limit (default: 0)
+The LMTP-specific version of the smtp_connection_reuse_count_limit
+configuration parameter. See there for details.
+.PP
+This feature is available in Postfix 2.11 and later.
.SH lmtp_connection_reuse_time_limit (default: 300s)
The LMTP-specific version of the smtp_connection_reuse_time_limit
configuration parameter. See there for details.
delivery performance.
.PP
This feature is available in Postfix 2.2 and later.
-.SH smtp_connection_cache_reuse_limit (default: 10)
-When SMTP connection caching is enabled, the number of times that
-an SMTP session may be reused before it is closed.
-.PP
-This feature is available in Postfix 2.2. In Postfix 2.3 it is
-replaced by $smtp_connection_reuse_time_limit.
.SH smtp_connection_cache_time_limit (default: 2s)
When SMTP connection caching is enabled, the amount of time that
an unused SMTP client socket is kept open before it is closed. Do
not specify larger values without permission from the remote sites.
.PP
This feature is available in Postfix 2.2 and later.
+.SH smtp_connection_reuse_count_limit (default: 0)
+When SMTP connection caching is enabled, the number of times
+that an SMTP session may be reused before it is closed, or zero (no
+limit). With a reuse count limit of N, a connection is used up to
+N+1 times.
+.PP
+NOTE: This feature is unsafe. When a high-volume destination
+has multiple inbound MTAs, then the slowest inbound MTA will attract
+the most connections to that destination. This limitation does not
+exist with the smtp_connection_reuse_time_limit feature.
+.PP
+This feature is available in Postfix 2.11.
.SH smtp_connection_reuse_time_limit (default: 300s)
The amount of time during which Postfix will use an SMTP
connection repeatedly. The timer starts when the connection is
\fIpathname\fR. If the process runs chrooted, an absolute pathname
is interpreted relative to the Postfix queue directory.
.IP \fBinet\fR:\fIhostname\fR
-.IP \fBinet\fB:\fIhostname\fR:\fIport\fR
+.IP \fBinet\fR:\fIhostname\fR:\fIport\fR
.IP \fBinet\fR:[\fIaddress\fR]
.IP \fBinet\fR:[\fIaddress\fR]:\fIport\fR
Connect to the specified TCP port on the specified local or
time limit per read or write system call, to a time limit to send
or receive a complete record (an SMTP command line, SMTP response
line, SMTP message content line, or TLS protocol message).
+.PP
+Available in Postfix version 2.11 and later:
+.IP "\fBsmtp_connection_reuse_count_limit (0)\fR"
+When SMTP connection caching is enabled, the number of times that
+an SMTP session may be reused before it is closed, or zero (no limit).
.SH "TROUBLE SHOOTING CONTROLS"
.na
.nf
<title> $title </title>
</head> <body> <pre>"
+ESC=`echo x | tr '[x]' '[\033]'`
+
sed '
s/\([<>&]\)\b\1/\1/g
s/&/\&/g
s/>/\>/g
s;_\b\([^_]\);<i>\1</i>;g
s;.\b\(.\);<b>\1</b>;g
+ # Why change nroff to hard-coded ANSI escape sequences?
+ /'$ESC'\[0m$/{
+ /'$ESC'\[1m[^'$ESC']*'$ESC'\[0m$/{
+ # Here, ESC[0m means end-of-bold.
+ s;0m$;22m;
+ }
+ /'$ESC'\[4m[^'$ESC']*'$ESC'\[0m$/{
+ # Here, ESC[0m means end-of-italic.
+ s;0m$;24m;
+ }
+ }
+ s;'$ESC'\[1m;<b>;g
+ s;'$ESC'\[22m;</b>;g
+ s;'$ESC'\[4m;<i>;g
+ s;'$ESC'\[24m;</i>;g
+ # Undo gratuitous whitespace changes.
+ s;\( *\)\(</[bi]>\);\2\1;g
+ # End nroff ANSI escape sequence workarounds.
s;</i>\( *\)<i>;\1;g
s;</b>\( *\)<b>;\1;g
' "$@" | egrep -v 'postconf (readme|html)_direc|tory</b>" *to *locate *this'
s;\blmtp_pix_workaround_delay_time\b;<a href="postconf.5.html#lmtp_pix_workaround_delay_time">$&</a>;g;
s;\blmtp_pix_workarounds\b;<a href="postconf.5.html#lmtp_pix_workarounds">$&</a>;g;
s;\blmtp_pix_workaround_maps\b;<a href="postconf.5.html#lmtp_pix_workaround_maps">$&</a>;g;
+ s;\blmtp_connection_reuse_count_limit\b;<a href="postconf.5.html#lmtp_connection_reuse_count_limit">$&</a>;g;
s;\blmtp_connection_reuse_time_limit\b;<a href="postconf.5.html#lmtp_connection_reuse_time_limit">$&</a>;g;
s;\blmtp_starttls_timeout\b;<a href="postconf.5.html#lmtp_starttls_timeout">$&</a>;g;
s;\blmtp_line_length_limit\b;<a href="postconf.5.html#lmtp_line_length_limit">$&</a>;g;
s;\bsmtp_connect_timeout\b;<a href="postconf.5.html#smtp_connect_timeout">$&</a>;g;
s;\bsmtp_connection_cache_on_demand\b;<a href="postconf.5.html#smtp_connection_cache_on_demand">$&</a>;g;
- s;\bsmtp_connection_cache_reuse_limit\b;<a href="postconf.5.html#smtp_connection_cache_reuse_limit">$&</a>;g;
+ s;\bsmtp_connection_reuse_count_limit\b;<a href="postconf.5.html#smtp_connection_reuse_count_limit">$&</a>;g;
s;\bsmtp_connection_reuse_time_limit\b;<a href="postconf.5.html#smtp_connection_reuse_time_limit">$&</a>;g;
s;\bsmtp_connection_cache_time_limit\b;<a href="postconf.5.html#smtp_connection_cache_time_limit">$&</a>;g;
s;\bsmtp_connection_cache_destinations\b;<a href="postconf.5.html#smtp_connection_cache_destinations">$&</a>;g;
limited number of times. This avoids triggering bugs in implementations
that do not correctly handle multiple deliveries per session. </p>
-<p> With Postfix 2.2 the use count is limited with the
-smtp_connection_cache_reuse_limit configuration parameter. With
-Postfix 2.3 this is replaced by a time limit which is specified
-with the smtp_connection_reuse_time_limit parameter. In addition,
-Postfix 2.3 logs the use count of multiply-used connections,
+<p> As of Postfix 2.3 connection reuse is preferably limited with
+the smtp_connection_reuse_time_limit parameter. In addition, Postfix
+2.11 provides smtp_connection_reuse_count_limit to limit how many
+times a connection may be reused, but this feature is unsafe as it
+introduces a "fatal attractor" failure mode (when a destination has
+multiple inbound MTAs, the slowest inbound MTA will attract most
+connections from Postfix to that destination). </p>.
+
+<p> Postfix 2.3 logs the use count of multiply-used connections,
as shown in the following example: </p>
<blockquote>
<p> This feature is available in Postfix 2.2 and later. </p>
-%PARAM smtp_connection_cache_reuse_limit 10
-
-<p> When SMTP connection caching is enabled, the number of times that
-an SMTP session may be reused before it is closed.
-</p>
-
-<p> This feature is available in Postfix 2.2. In Postfix 2.3 it is
-replaced by $smtp_connection_reuse_time_limit.</p>
-
%PARAM smtp_connection_reuse_time_limit 300s
<p> The amount of time during which Postfix will use an SMTP
of TLS. </p>
<p> This feature is available in Postfix 2.11 and later. </p>
+
+%PARAM lmtp_connection_reuse_count_limit 0
+
+<p> The LMTP-specific version of the smtp_connection_reuse_count_limit
+configuration parameter. See there for details. </p>
+
+<p> This feature is available in Postfix 2.11 and later. </p>
+
+%PARAM smtp_connection_reuse_count_limit 0
+
+<p> When SMTP connection caching is enabled, the number of times
+that an SMTP session may be reused before it is closed, or zero (no
+limit). With a reuse count limit of N, a connection is used up to
+N+1 times. </p>
+
+<p> NOTE: This feature is unsafe. When a high-volume destination
+has multiple inbound MTAs, then the slowest inbound MTA will attract
+the most connections to that destination. This limitation does not
+exist with the smtp_connection_reuse_time_limit feature. </p>
+
+<p> This feature is available in Postfix 2.11. </p>
#define DEF_LMTP_CACHE_CONNT "2s"
extern int var_smtp_cache_conn;
+#define VAR_SMTP_REUSE_COUNT "smtp_connection_reuse_count_limit"
+#define DEF_SMTP_REUSE_COUNT 0
+#define VAR_LMTP_REUSE_COUNT "lmtp_connection_reuse_count_limit"
+#define DEF_LMTP_REUSE_COUNT 0
+extern int var_smtp_reuse_count;
+
#define VAR_SMTP_REUSE_TIME "smtp_connection_reuse_time_limit"
#define DEF_SMTP_REUSE_TIME "300s"
#define VAR_LMTP_REUSE_TIME "lmtp_connection_reuse_time_limit"
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20130709"
+#define MAIL_RELEASE_DATE "20130710"
#define MAIL_VERSION_NUMBER "2.11"
#ifdef SNAPSHOT
VAR_LMTP_LINE_LIMIT, DEF_LMTP_LINE_LIMIT, &var_smtp_line_limit, 0, 0,
VAR_LMTP_MXADDR_LIMIT, DEF_LMTP_MXADDR_LIMIT, &var_smtp_mxaddr_limit, 0, 0,
VAR_LMTP_MXSESS_LIMIT, DEF_LMTP_MXSESS_LIMIT, &var_smtp_mxsess_limit, 0, 0,
+ VAR_LMTP_REUSE_COUNT, DEF_LMTP_REUSE_COUNT, &var_smtp_reuse_count, 0, 0,
#ifdef USE_TLS
VAR_LMTP_TLS_SCERT_VD, DEF_LMTP_TLS_SCERT_VD, &var_smtp_tls_scert_vd, 0, 0,
#endif
/* \fIpathname\fR. If the process runs chrooted, an absolute pathname
/* is interpreted relative to the Postfix queue directory.
/* .IP \fBinet\fR:\fIhostname\fR
-/* .IP \fBinet\fB:\fIhostname\fR:\fIport\fR
+/* .IP \fBinet\fR:\fIhostname\fR:\fIport\fR
/* .IP \fBinet\fR:[\fIaddress\fR]
/* .IP \fBinet\fR:[\fIaddress\fR]:\fIport\fR
/* Connect to the specified TCP port on the specified local or
/* time limit per read or write system call, to a time limit to send
/* or receive a complete record (an SMTP command line, SMTP response
/* line, SMTP message content line, or TLS protocol message).
+/* .PP
+/* Available in Postfix version 2.11 and later:
+/* .IP "\fBsmtp_connection_reuse_count_limit (0)\fR"
+/* When SMTP connection caching is enabled, the number of times that
+/* an SMTP session may be reused before it is closed, or zero (no limit).
/* TROUBLE SHOOTING CONTROLS
/* .ad
/* .fi
int var_smtp_mxsess_limit;
int var_smtp_cache_conn;
int var_smtp_reuse_time;
+int var_smtp_reuse_count;
char *var_smtp_cache_dest;
char *var_scache_service; /* You can now leave this here. */
bool var_smtp_cache_demand;
#define THIS_SESSION_IS_EXPIRED \
(THIS_SESSION_IS_CACHED \
- && session->expire_time < vstream_ftime(session->stream))
+ && (session->expire_time < vstream_ftime(session->stream) \
+ || (var_smtp_reuse_count > 0 \
+ && session->reuse_count >= var_smtp_reuse_count)))
#define THIS_SESSION_IS_BAD \
(!THIS_SESSION_IS_DEAD && session->expire_time < 0)
VAR_SMTP_LINE_LIMIT, DEF_SMTP_LINE_LIMIT, &var_smtp_line_limit, 0, 0,
VAR_SMTP_MXADDR_LIMIT, DEF_SMTP_MXADDR_LIMIT, &var_smtp_mxaddr_limit, 0, 0,
VAR_SMTP_MXSESS_LIMIT, DEF_SMTP_MXSESS_LIMIT, &var_smtp_mxsess_limit, 0, 0,
+ VAR_SMTP_REUSE_COUNT, DEF_SMTP_REUSE_COUNT, &var_smtp_reuse_count, 0, 0,
#ifdef USE_TLS
VAR_SMTP_TLS_SCERT_VD, DEF_SMTP_TLS_SCERT_VD, &var_smtp_tls_scert_vd, 0, 0,
#endif