2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-22 18:07:41 +00:00

postfix-2.11-20130710

This commit is contained in:
Wietse Venema 2013-07-10 00:00:00 -05:00 committed by Viktor Dukhovni
parent eb5a2ae162
commit 1a72e35a9a
18 changed files with 173 additions and 51 deletions

View File

@ -18782,3 +18782,17 @@ Apologies for any names omitted.
Logging: minimal DNAME support. Viktor Dukhovni. dns/dns.h, Logging: minimal DNAME support. Viktor Dukhovni. dns/dns.h,
dns/dns_lookup.c, dns/dns_strtype.c, dns/test_dns_lookup.c. 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.

View File

@ -148,12 +148,17 @@ mechanisms:
times. This avoids triggering bugs in implementations that do not correctly times. This avoids triggering bugs in implementations that do not correctly
handle multiple deliveries per session. handle multiple deliveries per session.
With Postfix 2.2 the use count is limited with the As of Postfix 2.3 connection reuse is preferably limited with the
smtp_connection_cache_reuse_limit configuration parameter. With Postfix 2.3 smtp_connection_reuse_time_limit parameter. In addition, Postfix 2.11
this is replaced by a time limit which is specified with the provides smtp_connection_reuse_count_limit to limit how many times a
smtp_connection_reuse_time_limit parameter. In addition, Postfix 2.3 logs connection may be reused, but this feature is unsafe as it introduces a
the use count of multiply-used connections, as shown in the following "fatal attractor" failure mode (when a destination has multiple inbound
example: 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: Nov 3 16:04:31 myname postfix/smtp[30840]: 19B6B2900FE:
to=<wietse@test.example.com>, orig_to=<wietse@test>, to=<wietse@test.example.com>, orig_to=<wietse@test>,

View File

@ -226,11 +226,15 @@ configuration parameters. This prevents anti-social behavior. </p>
limited number of times. This avoids triggering bugs in implementations limited number of times. This avoids triggering bugs in implementations
that do not correctly handle multiple deliveries per session. </p> that do not correctly handle multiple deliveries per session. </p>
<p> With Postfix 2.2 the use count is limited with the <p> As of Postfix 2.3 connection reuse is preferably limited with
<a href="postconf.5.html#smtp_connection_cache_reuse_limit">smtp_connection_cache_reuse_limit</a> configuration parameter. With the <a href="postconf.5.html#smtp_connection_reuse_time_limit">smtp_connection_reuse_time_limit</a> parameter. In addition, Postfix
Postfix 2.3 this is replaced by a time limit which is specified 2.11 provides <a href="postconf.5.html#smtp_connection_reuse_count_limit">smtp_connection_reuse_count_limit</a> to limit how many
with the <a href="postconf.5.html#smtp_connection_reuse_time_limit">smtp_connection_reuse_time_limit</a> parameter. In addition, times a connection may be reused, but this feature is unsafe as it
Postfix 2.3 logs the use count of multiply-used connections, 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> as shown in the following example: </p>
<blockquote> <blockquote>

View File

@ -79,7 +79,7 @@ SMTP(8) SMTP(8)
<b>inet</b>:<i>hostname</i> <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>] <b>inet</b>:[<i>address</i>]
@ -762,6 +762,13 @@ SMTP(8) SMTP(8)
SMTP message content line, or TLS protocol mes- SMTP message content line, or TLS protocol mes-
sage). 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>TROUBLE SHOOTING CONTROLS</b>
<b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a> (2)</b> <b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a> (2)</b>
The increment in verbose logging level when a The increment in verbose logging level when a

View File

@ -3968,6 +3968,17 @@ See there for details. </p>
<p> This feature is available in Postfix 2.3 and later. </p> <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> </DD>
<DT><b><a name="lmtp_connection_reuse_time_limit">lmtp_connection_reuse_time_limit</a> <DT><b><a name="lmtp_connection_reuse_time_limit">lmtp_connection_reuse_time_limit</a>
@ -9556,19 +9567,6 @@ delivery performance. </p>
<p> This feature is available in Postfix 2.2 and later. </p> <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> </DD>
<DT><b><a name="smtp_connection_cache_time_limit">smtp_connection_cache_time_limit</a> <DT><b><a name="smtp_connection_cache_time_limit">smtp_connection_cache_time_limit</a>
@ -9582,6 +9580,24 @@ not specify larger values without permission from the remote sites.
<p> This feature is available in Postfix 2.2 and later. </p> <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> </DD>
<DT><b><a name="smtp_connection_reuse_time_limit">smtp_connection_reuse_time_limit</a> <DT><b><a name="smtp_connection_reuse_time_limit">smtp_connection_reuse_time_limit</a>

View File

@ -79,7 +79,7 @@ SMTP(8) SMTP(8)
<b>inet</b>:<i>hostname</i> <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>] <b>inet</b>:[<i>address</i>]
@ -762,6 +762,13 @@ SMTP(8) SMTP(8)
SMTP message content line, or TLS protocol mes- SMTP message content line, or TLS protocol mes-
sage). 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>TROUBLE SHOOTING CONTROLS</b>
<b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a> (2)</b> <b><a href="postconf.5.html#debug_peer_level">debug_peer_level</a> (2)</b>
The increment in verbose logging level when a The increment in verbose logging level when a

View File

@ -2345,6 +2345,11 @@ smtp_connection_cache_time_limit configuration parameter.
See there for details. See there for details.
.PP .PP
This feature is available in Postfix 2.3 and later. 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) .SH lmtp_connection_reuse_time_limit (default: 300s)
The LMTP-specific version of the smtp_connection_reuse_time_limit The LMTP-specific version of the smtp_connection_reuse_time_limit
configuration parameter. See there for details. configuration parameter. See there for details.
@ -5820,18 +5825,24 @@ connections to be reused for other deliveries, and can improve mail
delivery performance. delivery performance.
.PP .PP
This feature is available in Postfix 2.2 and later. 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) .SH smtp_connection_cache_time_limit (default: 2s)
When SMTP connection caching is enabled, the amount of time that When SMTP connection caching is enabled, the amount of time that
an unused SMTP client socket is kept open before it is closed. Do an unused SMTP client socket is kept open before it is closed. Do
not specify larger values without permission from the remote sites. not specify larger values without permission from the remote sites.
.PP .PP
This feature is available in Postfix 2.2 and later. 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) .SH smtp_connection_reuse_time_limit (default: 300s)
The amount of time during which Postfix will use an SMTP The amount of time during which Postfix will use an SMTP
connection repeatedly. The timer starts when the connection is connection repeatedly. The timer starts when the connection is

View File

@ -71,7 +71,7 @@ Connect to the local UNIX-domain server that is bound to the specified
\fIpathname\fR. If the process runs chrooted, an absolute pathname \fIpathname\fR. If the process runs chrooted, an absolute pathname
is interpreted relative to the Postfix queue directory. is interpreted relative to the Postfix queue directory.
.IP \fBinet\fR:\fIhostname\fR .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]
.IP \fBinet\fR:[\fIaddress\fR]:\fIport\fR .IP \fBinet\fR:[\fIaddress\fR]:\fIport\fR
Connect to the specified TCP port on the specified local or Connect to the specified TCP port on the specified local or
@ -596,6 +596,11 @@ Change the behavior of the smtp_*_timeout time limits, from a
time limit per read or write system call, to a time limit to send 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 or receive a complete record (an SMTP command line, SMTP response
line, SMTP message content line, or TLS protocol message). 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" .SH "TROUBLE SHOOTING CONTROLS"
.na .na
.nf .nf

View File

@ -18,6 +18,8 @@ echo "<!doctype html public \"-//W3C//DTD HTML 4.01 Transitional//EN\"
<title> $title </title> <title> $title </title>
</head> <body> <pre>" </head> <body> <pre>"
ESC=`echo x | tr '[x]' '[\033]'`
sed ' sed '
s/\([<>&]\)\1/\1/g s/\([<>&]\)\1/\1/g
s/&/\&amp;/g s/&/\&amp;/g
@ -29,6 +31,24 @@ sed '
s/>/\&gt;/g s/>/\&gt;/g
s;_\([^_]\);<i>\1</i>;g s;_\([^_]\);<i>\1</i>;g
s;.\(.\);<b>\1</b>;g s;.\(.\);<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;</i>\( *\)<i>;\1;g
s;</b>\( *\)<b>;\1;g s;</b>\( *\)<b>;\1;g
' "$@" | egrep -v 'postconf (readme|html)_direc|tory</b>" *to *locate *this' ' "$@" | egrep -v 'postconf (readme|html)_direc|tory</b>" *to *locate *this'

View File

@ -264,6 +264,7 @@ while (<>) {
s;\blmtp_pix_workaround_delay_time\b;<a href="postconf.5.html#lmtp_pix_workaround_delay_time">$&</a>;g; 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_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_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_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_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;\blmtp_line_length_limit\b;<a href="postconf.5.html#lmtp_line_length_limit">$&</a>;g;
@ -444,7 +445,7 @@ while (<>) {
s;\bsmtp_connect_timeout\b;<a href="postconf.5.html#smtp_connect_timeout">$&</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_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_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_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; s;\bsmtp_connection_cache_destinations\b;<a href="postconf.5.html#smtp_connection_cache_destinations">$&</a>;g;

View File

@ -226,11 +226,15 @@ configuration parameters. This prevents anti-social behavior. </p>
limited number of times. This avoids triggering bugs in implementations limited number of times. This avoids triggering bugs in implementations
that do not correctly handle multiple deliveries per session. </p> that do not correctly handle multiple deliveries per session. </p>
<p> With Postfix 2.2 the use count is limited with the <p> As of Postfix 2.3 connection reuse is preferably limited with
smtp_connection_cache_reuse_limit configuration parameter. With the smtp_connection_reuse_time_limit parameter. In addition, Postfix
Postfix 2.3 this is replaced by a time limit which is specified 2.11 provides smtp_connection_reuse_count_limit to limit how many
with the smtp_connection_reuse_time_limit parameter. In addition, times a connection may be reused, but this feature is unsafe as it
Postfix 2.3 logs the use count of multiply-used connections, 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> as shown in the following example: </p>
<blockquote> <blockquote>

View File

@ -3907,15 +3907,6 @@ not specify larger values without permission from the remote sites.
<p> This feature is available in Postfix 2.2 and later. </p> <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 %PARAM smtp_connection_reuse_time_limit 300s
<p> The amount of time during which Postfix will use an SMTP <p> The amount of time during which Postfix will use an SMTP
@ -15381,3 +15372,24 @@ service maintains TLS session caches and other information in support
of TLS. </p> of TLS. </p>
<p> This feature is available in Postfix 2.11 and later. </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>

View File

@ -964,6 +964,12 @@ extern char *var_bestmx_transp;
#define DEF_LMTP_CACHE_CONNT "2s" #define DEF_LMTP_CACHE_CONNT "2s"
extern int var_smtp_cache_conn; 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 VAR_SMTP_REUSE_TIME "smtp_connection_reuse_time_limit"
#define DEF_SMTP_REUSE_TIME "300s" #define DEF_SMTP_REUSE_TIME "300s"
#define VAR_LMTP_REUSE_TIME "lmtp_connection_reuse_time_limit" #define VAR_LMTP_REUSE_TIME "lmtp_connection_reuse_time_limit"

View File

@ -20,7 +20,7 @@
* Patches change both the patchlevel and the release date. Snapshots have no * Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only. * patchlevel; they change the release date only.
*/ */
#define MAIL_RELEASE_DATE "20130709" #define MAIL_RELEASE_DATE "20130710"
#define MAIL_VERSION_NUMBER "2.11" #define MAIL_VERSION_NUMBER "2.11"
#ifdef SNAPSHOT #ifdef SNAPSHOT

View File

@ -85,6 +85,7 @@
VAR_LMTP_LINE_LIMIT, DEF_LMTP_LINE_LIMIT, &var_smtp_line_limit, 0, 0, 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_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_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 #ifdef USE_TLS
VAR_LMTP_TLS_SCERT_VD, DEF_LMTP_TLS_SCERT_VD, &var_smtp_tls_scert_vd, 0, 0, VAR_LMTP_TLS_SCERT_VD, DEF_LMTP_TLS_SCERT_VD, &var_smtp_tls_scert_vd, 0, 0,
#endif #endif

View File

@ -61,7 +61,7 @@
/* \fIpathname\fR. If the process runs chrooted, an absolute pathname /* \fIpathname\fR. If the process runs chrooted, an absolute pathname
/* is interpreted relative to the Postfix queue directory. /* is interpreted relative to the Postfix queue directory.
/* .IP \fBinet\fR:\fIhostname\fR /* .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]
/* .IP \fBinet\fR:[\fIaddress\fR]:\fIport\fR /* .IP \fBinet\fR:[\fIaddress\fR]:\fIport\fR
/* Connect to the specified TCP port on the specified local or /* Connect to the specified TCP port on the specified local or
@ -562,6 +562,11 @@
/* time limit per read or write system call, to a time limit to send /* 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 /* or receive a complete record (an SMTP command line, SMTP response
/* line, SMTP message content line, or TLS protocol message). /* 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 /* TROUBLE SHOOTING CONTROLS
/* .ad /* .ad
/* .fi /* .fi
@ -806,6 +811,7 @@ int var_smtp_mxaddr_limit;
int var_smtp_mxsess_limit; int var_smtp_mxsess_limit;
int var_smtp_cache_conn; int var_smtp_cache_conn;
int var_smtp_reuse_time; int var_smtp_reuse_time;
int var_smtp_reuse_count;
char *var_smtp_cache_dest; char *var_smtp_cache_dest;
char *var_scache_service; /* You can now leave this here. */ char *var_scache_service; /* You can now leave this here. */
bool var_smtp_cache_demand; bool var_smtp_cache_demand;

View File

@ -422,7 +422,9 @@ extern HBC_CALL_BACKS smtp_hbc_callbacks[];
#define THIS_SESSION_IS_EXPIRED \ #define THIS_SESSION_IS_EXPIRED \
(THIS_SESSION_IS_CACHED \ (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 \ #define THIS_SESSION_IS_BAD \
(!THIS_SESSION_IS_DEAD && session->expire_time < 0) (!THIS_SESSION_IS_DEAD && session->expire_time < 0)

View File

@ -86,6 +86,7 @@
VAR_SMTP_LINE_LIMIT, DEF_SMTP_LINE_LIMIT, &var_smtp_line_limit, 0, 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_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_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 #ifdef USE_TLS
VAR_SMTP_TLS_SCERT_VD, DEF_SMTP_TLS_SCERT_VD, &var_smtp_tls_scert_vd, 0, 0, VAR_SMTP_TLS_SCERT_VD, DEF_SMTP_TLS_SCERT_VD, &var_smtp_tls_scert_vd, 0, 0,
#endif #endif