]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.11-20130710
authorWietse Venema <wietse@porcupine.org>
Wed, 10 Jul 2013 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Thu, 11 Jul 2013 04:24:50 +0000 (00:24 -0400)
18 files changed:
postfix/HISTORY
postfix/README_FILES/CONNECTION_CACHE_README
postfix/html/CONNECTION_CACHE_README.html
postfix/html/lmtp.8.html
postfix/html/postconf.5.html
postfix/html/smtp.8.html
postfix/man/man5/postconf.5
postfix/man/man8/smtp.8
postfix/mantools/man2html
postfix/mantools/postlink
postfix/proto/CONNECTION_CACHE_README.html
postfix/proto/postconf.proto
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/smtp/lmtp_params.c
postfix/src/smtp/smtp.c
postfix/src/smtp/smtp.h
postfix/src/smtp/smtp_params.c

index 8c0721d145b4a276a882a7027e94811ef39c63f3..a2de98587997e4395ce4d1ea3a34713b4f6879b7 100644 (file)
@@ -18782,3 +18782,17 @@ Apologies for any names omitted.
        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.
index 1c90ffd74cb1a2eb6f7868dc71125d48a8e6180c..5067f7aea2cc8563e0dcb66dd0caa46385fb4ee7 100644 (file)
@@ -148,12 +148,17 @@ mechanisms:
     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>,
index d370424d5d1949ce2dc64e2be10f220752d20f4c..b0201dc93ab5fda74b804731dc3794e595252194 100644 (file)
@@ -226,11 +226,15 @@ configuration parameters. This prevents anti-social behavior. </p>
 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>
index f22804db3d13cd0dbb8a175b0e2be1440aad0efe..3b8ba36b6c7ea977486c9e982d01ce4b91e23fd4 100644 (file)
@@ -79,7 +79,7 @@ SMTP(8)                                                                SMTP(8)
 
        <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>]
 
@@ -762,6 +762,13 @@ SMTP(8)                                                                SMTP(8)
               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
index a3fed7443efe108c3f02126d3f75025b259fc0ed..322bf69959a9e1fc8006d25e60b1f56a0b475347 100644 (file)
@@ -3968,6 +3968,17 @@ See there for details. </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>
 
 <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>
 
 
-</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>
@@ -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>
 
 
+</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>
index f22804db3d13cd0dbb8a175b0e2be1440aad0efe..3b8ba36b6c7ea977486c9e982d01ce4b91e23fd4 100644 (file)
@@ -79,7 +79,7 @@ SMTP(8)                                                                SMTP(8)
 
        <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>]
 
@@ -762,6 +762,13 @@ SMTP(8)                                                                SMTP(8)
               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
index c3600b5bb1bcd7d3a8c8bfe73c80a59a9b8b1942..3759615fc954e9e66a4d20e2784e9d6bfa604bc4 100644 (file)
@@ -2345,6 +2345,11 @@ smtp_connection_cache_time_limit configuration parameter.
 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.
@@ -5820,18 +5825,24 @@ connections to be reused for other deliveries, and can improve mail
 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
index 5607d73ecb0e7a2c9edd7ae50f035416cfcafcfd..e00f5628df7ae746d581d4f7ef24ef91eed3ecff 100644 (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
 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
@@ -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
 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
index f3d949978523eac652d2186e40e14bbb9c3dbf73..2b8e3bc4920a90fb530feee469d0733d58866c2d 100755 (executable)
@@ -18,6 +18,8 @@ echo "<!doctype html public \"-//W3C//DTD HTML 4.01 Transitional//EN\"
 <title> $title </title>
 </head> <body> <pre>"
 
+ESC=`echo x | tr '[x]' '[\033]'`
+
 sed '
        s/\([<>&]\)\b\1/\1/g
        s/&/\&amp;/g
@@ -29,6 +31,24 @@ sed '
        s/>/\&gt;/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'
index 94a39a1e458c1c352d97c08abf6a50c02136dfe4..53e810f1bb7ed4058a997987b9c2dbc107035b42 100755 (executable)
@@ -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_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;
@@ -444,7 +445,7 @@ while (<>) {
     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;
index ab25dc914addf24a840dc494433df526ffe0d283..ef10848cbf89473c41fc2d49234a3947313afad2 100644 (file)
@@ -226,11 +226,15 @@ configuration parameters. This prevents anti-social behavior. </p>
 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>
index 007e2c83cc59598e1fed23f6c584b1a7f0af60b6..213e50c4efefbe7ef8d7db93d29a926d37941751 100644 (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>
 
-%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
@@ -15381,3 +15372,24 @@ service maintains TLS session caches and other information in support
 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>
index a20c15645b22fd8df750a9e7b2dda1039109027a..5716aa4c96bf26d1a122cc469737a03f39453479 100644 (file)
@@ -964,6 +964,12 @@ extern char *var_bestmx_transp;
 #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"
index 2e4d791a18accc715c77a0dd8e322b182a0e9979..c3d77779a793f8a85a7f2dad89846a0d02bafbc9 100644 (file)
@@ -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      "20130709"
+#define MAIL_RELEASE_DATE      "20130710"
 #define MAIL_VERSION_NUMBER    "2.11"
 
 #ifdef SNAPSHOT
index 40b7b70bf2dcfc7c45f72a56e186a5024b0f0530..faaa6dee152ca6de71694e38875119f0e6f83dd2 100644 (file)
@@ -85,6 +85,7 @@
        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
index 1cf409f98496fa6352f357fac746ed5994422ac7..82684575b064308aa2599149b1f1f7197d8529e9 100644 (file)
@@ -61,7 +61,7 @@
 /*      \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
@@ -806,6 +811,7 @@ int     var_smtp_mxaddr_limit;
 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;
index fbf9b0ab53493893fdbba1f083626eea5a871a94..25530297922cc0778a42b38be6282822d0b798a5 100644 (file)
@@ -422,7 +422,9 @@ extern HBC_CALL_BACKS smtp_hbc_callbacks[];
 
 #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)
index 13f8723fa5f6d73501898ed2cf45f0926d2989a9..16c51159be374f3e55303f338515ec4407132ac5 100644 (file)
@@ -86,6 +86,7 @@
        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