Hello community,

here is the log from the commit of package postfix for openSUSE:Factory checked 
in at 2019-07-08 15:02:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/postfix (Old)
 and      /work/SRC/openSUSE:Factory/.postfix.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "postfix"

Mon Jul  8 15:02:13 2019 rev:173 rq:713198 version:3.4.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/postfix/postfix.changes  2019-06-28 
16:11:41.944520513 +0200
+++ /work/SRC/openSUSE:Factory/.postfix.new.4615/postfix.changes        
2019-07-08 15:02:14.670645189 +0200
@@ -1,0 +2,21 @@
+Wed Jul  3 08:43:58 UTC 2019 - Michael Ströder <[email protected]>
+
+- Update to 3.4.6:
+  * Workaround for implementations that hang Postfix while shutting
+    down a TLS session, until Postfix times out. With
+    "tls_fast_shutdown_enable = yes" (the default), Postfix no
+    longer waits for the TLS peer to respond to a TLS 'close'
+    request. This is recommended with TLSv1.0 and later.
+  * Fixed a too-strict censoring filter that broke multiline Milter
+    responses for header/body events. Problem report by Andreas
+    Thienemann.
+  * The code to reset Postfix SMTP server command counts was not
+    called after a HaProxy handshake failure, causing stale numbers
+    to be reported. Problem report by Joseph Ward.
+  * postconf(5) documentation: tlsext_padding is not a tls_ssl_options
+    feature.
+  * smtp(8) documentation: updated the BUGS section text about
+    Postfix support to reuse open TLS connections.
+  * Portability: added "#undef sun" to util/unix_dgram_connect.c.
+
+-------------------------------------------------------------------

Old:
----
  postfix-3.4.5.tar.gz

New:
----
  postfix-3.4.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ postfix.spec ++++++
--- /var/tmp/diff_new_pack.7yLxNc/_old  2019-07-08 15:02:15.810646913 +0200
+++ /var/tmp/diff_new_pack.7yLxNc/_new  2019-07-08 15:02:15.814646919 +0200
@@ -53,7 +53,7 @@
 %bcond_with    libnsl
 %endif
 Name:           postfix
-Version:        3.4.5
+Version:        3.4.6
 Release:        0
 Summary:        A fast, secure, and flexible mailer
 License:        IPL-1.0 OR EPL-2.0

++++++ postfix-3.4.5.tar.gz -> postfix-3.4.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/HISTORY new/postfix-3.4.6/HISTORY
--- old/postfix-3.4.5/HISTORY   2019-03-30 15:33:58.000000000 +0100
+++ new/postfix-3.4.6/HISTORY   2019-06-28 01:36:26.000000000 +0200
@@ -24208,3 +24208,43 @@
        could exhaust LMTP server resources, resulting in two-second
        pauses between email deliveries. This problem was investigated
        by Juliana Rodrigueiro. File: smtp/smtp_connect.c.
+
+20190331
+
+       Documentation: tlsext_padding is not a tls_ssl_options
+       feature. File: proto/postconf.proto.
+
+20190401
+
+       Portability: added "#undef sun" to util/unix_dgram_connect.c.
+
+20190403
+
+       Bugfix (introduced: Postfix 2.3): a censoring filter broke
+       multiline Milter responses for header/body events. Problem
+       report by Andreas Thienemann. Files: util/printable.c,
+       util/stringops.h, smtpd/smtpd.c
+
+       Bugfix (introduced: Postfix 3.3): "smtp_mx_address_limit =
+       0" no longer meant 'unlimited'. Problem report by Luc Pardon.
+       File: smtp/smtp_addr.c.
+
+20190615
+
+       Documentation: updated the BUGS section in the smtp(8) manpage
+       about TLS connection reuse. File: smtp/smtp.c.
+
+       Workaround for implementations that hang Postfix while
+       shutting down a TLS session, until Postfix times out. With
+       "tls_fast_shutdown_enable = yes" (the default), Postfix no
+       longer waits for the TLS peer to respond to a TLS 'close'
+       request. This is recommended with TLSv1.0 and later. Files:
+       global/mail_params.h, tls/tls_session.c, and documentation.
+
+20190621
+
+       Bugfix (introduced: Postfix 3.0): the code to reset Postfix
+       SMTP server command counts was not called after a HaProxy
+       handshake failure, causing stale numbers to be reported.
+       The command counts are now reset in the function that reports
+       the counts. File: smtpd/smtpd.c.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/RELEASE_NOTES 
new/postfix-3.4.6/RELEASE_NOTES
--- old/postfix-3.4.5/RELEASE_NOTES     2019-02-10 23:43:45.000000000 +0100
+++ new/postfix-3.4.6/RELEASE_NOTES     2019-06-28 01:19:08.000000000 +0200
@@ -16,6 +16,16 @@
 If you upgrade from Postfix 3.2 or earlier, read RELEASE_NOTES-3.3
 before proceeding.
 
+TLS Workaround for Postfix 3.4.6, 3.3.5, 3.2.10 and 3.1.13
+-----------------------------------------------------------
+
+This release introduces a workaround for implementations that hang
+Postfix while shutting down a TLS session, until Postfix times out.
+With "tls_fast_shutdown_enable = yes" (the default), Postfix no
+longer waits for a remote TLS peer to respond to a TLS 'close'
+request. This behavior is recommended with TLSv1.0 and later. Specify
+"tls_fast_shutdown_enable = no" to get historical Postfix behavior.
+
 License change
 ---------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/conf/main.cf 
new/postfix-3.4.6/conf/main.cf
--- old/postfix-3.4.5/conf/main.cf      2017-02-19 02:58:20.000000000 +0100
+++ new/postfix-3.4.6/conf/main.cf      2019-06-02 14:40:36.000000000 +0200
@@ -249,7 +249,7 @@
 #
 # By default (mynetworks_style = subnet), Postfix "trusts" SMTP
 # clients in the same IP subnetworks as the local machine.
-# On Linux, this does works correctly only with interfaces specified
+# On Linux, this works correctly only with interfaces specified
 # with the "ifconfig" command.
 # 
 # Specify "mynetworks_style = class" when Postfix should "trust" SMTP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/html/lmtp.8.html 
new/postfix-3.4.6/html/lmtp.8.html
--- old/postfix-3.4.5/html/lmtp.8.html  2019-02-10 18:18:26.000000000 +0100
+++ new/postfix-3.4.6/html/lmtp.8.html  2019-06-30 01:30:31.000000000 +0200
@@ -120,9 +120,8 @@
        ter is notified of bounces, protocol problems, and of other trouble.
 
 <b>BUGS</b>
-       SMTP  and LMTP connection caching does not work with TLS. The necessary
-       support for TLS object passivation and  re-activation  does  not  exist
-       without closing the session, which defeats the purpose.
+       SMTP  and  LMTP  connection  reuse for TLS (without closing the SMTP or
+       LMTP connection) is not supported before Postfix 3.4.
 
        SMTP  and  LMTP  connection  caching  assumes that SASL credentials are
        valid for all destinations that map onto the same IP  address  and  TCP
@@ -595,6 +594,12 @@
               Optional  name  to  send  to  the  remote SMTP server in the TLS
               Server Name Indication (SNI) extension.
 
+       Introduced with Postfix 3.4.6, 3.3.5, 3.2.10, and 3.1.13:
+
+       <b><a 
href="postconf.5.html#tls_fast_shutdown_enable">tls_fast_shutdown_enable</a> 
(yes)</b>
+              A workaround for implementations that hang Postfix while shuting
+              down a TLS session, until Postfix times out.
+
 <b>OBSOLETE STARTTLS CONTROLS</b>
        The following configuration parameters  exist  for  compatibility  with
        Postfix  versions  before  2.3.  Support for these will be removed in a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/html/postconf.5.html 
new/postfix-3.4.6/html/postconf.5.html
--- old/postfix-3.4.5/html/postconf.5.html      2019-03-24 23:59:02.000000000 
+0100
+++ new/postfix-3.4.6/html/postconf.5.html      2019-06-29 15:33:39.000000000 
+0200
@@ -18531,6 +18531,21 @@
 
 </DD>
 
+<DT><b><a name="tls_fast_shutdown_enable">tls_fast_shutdown_enable</a>
+(default: yes)</b></DT><DD>
+
+<p> A workaround for implementations that hang Postfix while shuting
+down a TLS session, until Postfix times out. With this enabled,
+Postfix will not wait for the remote TLS peer to respond to a TLS
+'close' notification. This behavior is recommended for TLSv1.0 and
+later. </p>
+
+<p> This feature was introduced with Postfix 3.4.6, 3.3.5, 3.2.10,
+and 3.1.13. </p>
+
+
+</DD>
+
 <DT><b><a name="tls_high_cipherlist">tls_high_cipherlist</a>
 (default: see "postconf -d" output)</b></DT><DD>
 
@@ -18890,9 +18905,6 @@
 
 <dt><b>PRIORITIZE_CHACHA</b></dt> <dd>Postfix &ge; 3.4. See 
SSL_CTX_set_options(3).</dd>
 
-<dt><b>TLSEXT_PADDING</b></dt> <dd>Postfix &ge; 3.4. See
-SSL_CTX_set_options(3).</dd>
-
 </dl>
 
 <p> This feature is available in Postfix 2.11 and later.  </p>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/html/smtp.8.html 
new/postfix-3.4.6/html/smtp.8.html
--- old/postfix-3.4.5/html/smtp.8.html  2019-02-10 18:18:26.000000000 +0100
+++ new/postfix-3.4.6/html/smtp.8.html  2019-06-30 01:30:31.000000000 +0200
@@ -120,9 +120,8 @@
        ter is notified of bounces, protocol problems, and of other trouble.
 
 <b>BUGS</b>
-       SMTP  and LMTP connection caching does not work with TLS. The necessary
-       support for TLS object passivation and  re-activation  does  not  exist
-       without closing the session, which defeats the purpose.
+       SMTP  and  LMTP  connection  reuse for TLS (without closing the SMTP or
+       LMTP connection) is not supported before Postfix 3.4.
 
        SMTP  and  LMTP  connection  caching  assumes that SASL credentials are
        valid for all destinations that map onto the same IP  address  and  TCP
@@ -595,6 +594,12 @@
               Optional  name  to  send  to  the  remote SMTP server in the TLS
               Server Name Indication (SNI) extension.
 
+       Introduced with Postfix 3.4.6, 3.3.5, 3.2.10, and 3.1.13:
+
+       <b><a 
href="postconf.5.html#tls_fast_shutdown_enable">tls_fast_shutdown_enable</a> 
(yes)</b>
+              A workaround for implementations that hang Postfix while shuting
+              down a TLS session, until Postfix times out.
+
 <b>OBSOLETE STARTTLS CONTROLS</b>
        The following configuration parameters  exist  for  compatibility  with
        Postfix  versions  before  2.3.  Support for these will be removed in a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/html/smtpd.8.html 
new/postfix-3.4.6/html/smtpd.8.html
--- old/postfix-3.4.5/html/smtpd.8.html 2019-02-10 23:53:18.000000000 +0100
+++ new/postfix-3.4.6/html/smtpd.8.html 2019-06-30 01:22:10.000000000 +0200
@@ -589,6 +589,12 @@
               clients via the TLS Server Name Indication  (SNI)  extension  to
               the appropriate keys and certificate chains.
 
+       Introduced with Postfix 3.4.6, 3.3.5, 3.2.10, and 3.1.13:
+
+       <b><a 
href="postconf.5.html#tls_fast_shutdown_enable">tls_fast_shutdown_enable</a> 
(yes)</b>
+              A workaround for implementations that hang Postfix while shuting
+              down a TLS session, until Postfix times out.
+
 <b>OBSOLETE STARTTLS CONTROLS</b>
        The  following  configuration  parameters  exist for compatibility with
        Postfix versions before 2.3. Support for these will  be  removed  in  a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/html/tlsproxy.8.html 
new/postfix-3.4.6/html/tlsproxy.8.html
--- old/postfix-3.4.5/html/tlsproxy.8.html      2019-02-22 01:27:46.000000000 
+0100
+++ new/postfix-3.4.6/html/tlsproxy.8.html      2019-06-30 01:23:07.000000000 
+0200
@@ -337,6 +337,12 @@
               usage  policy  by  next-hop destination and by remote TLS server
               hostname.
 
+       Introduced with Postfix 3.4.6, 3.3.5, 3.2.10, and 3.1.13:
+
+       <b><a 
href="postconf.5.html#tls_fast_shutdown_enable">tls_fast_shutdown_enable</a> 
(yes)</b>
+              A workaround for implementations that hang Postfix while shuting
+              down a TLS session, until Postfix times out.
+
 <b>OBSOLETE STARTTLS SUPPORT CONTROLS</b>
        These parameters are supported for compatibility with  <a 
href="smtpd.8.html"><b>smtpd</b>(8)</a>  legacy
        parameters.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/man/man5/postconf.5 
new/postfix-3.4.6/man/man5/postconf.5
--- old/postfix-3.4.5/man/man5/postconf.5       2019-03-24 23:59:03.000000000 
+0100
+++ new/postfix-3.4.6/man/man5/postconf.5       2019-06-29 15:33:39.000000000 
+0200
@@ -12930,6 +12930,15 @@
 encouraged to not change this setting.
 .PP
 This feature is available in Postfix 2.3 and later.
+.SH tls_fast_shutdown_enable (default: yes)
+A workaround for implementations that hang Postfix while shuting
+down a TLS session, until Postfix times out. With this enabled,
+Postfix will not wait for the remote TLS peer to respond to a TLS
+'close' notification. This behavior is recommended for TLSv1.0 and
+later.
+.PP
+This feature was introduced with Postfix 3.4.6, 3.3.5, 3.2.10,
+and 3.1.13.
 .SH tls_high_cipherlist (default: see "postconf \-d" output)
 The OpenSSL cipherlist for "high" grade ciphers. This defines
 the meaning of the "high" setting in smtpd_tls_ciphers,
@@ -13221,10 +13230,6 @@
 .IP "\fBPRIORITIZE_CHACHA\fR"
 Postfix >= 3.4. See SSL_CTX_\fBset_options\fR(3).
 .br
-.IP "\fBTLSEXT_PADDING\fR"
-Postfix >= 3.4. See
-SSL_CTX_\fBset_options\fR(3).
-.br
 .br
 .PP
 This feature is available in Postfix 2.11 and later.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/man/man8/smtp.8 
new/postfix-3.4.6/man/man8/smtp.8
--- old/postfix-3.4.5/man/man8/smtp.8   2019-02-10 18:18:26.000000000 +0100
+++ new/postfix-3.4.6/man/man8/smtp.8   2019-06-29 15:33:39.000000000 +0200
@@ -127,9 +127,8 @@
 .SH BUGS
 .ad
 .fi
-SMTP and LMTP connection caching does not work with TLS. The necessary
-support for TLS object passivation and re\-activation does not
-exist without closing the session, which defeats the purpose.
+SMTP and LMTP connection reuse for TLS (without closing the
+SMTP or LMTP connection) is not supported before Postfix 3.4.
 
 SMTP and LMTP connection caching assumes that SASL credentials
 are valid for all destinations that map onto the same IP
@@ -526,6 +525,11 @@
 .IP "\fBsmtp_tls_servername (empty)\fR"
 Optional name to send to the remote SMTP server in the TLS Server
 Name Indication (SNI) extension.
+.PP
+Introduced with Postfix 3.4.6, 3.3.5, 3.2.10, and 3.1.13:
+.IP "\fBtls_fast_shutdown_enable (yes)\fR"
+A workaround for implementations that hang Postfix while shuting
+down a TLS session, until Postfix times out.
 .SH "OBSOLETE STARTTLS CONTROLS"
 .na
 .nf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/man/man8/smtpd.8 
new/postfix-3.4.6/man/man8/smtpd.8
--- old/postfix-3.4.5/man/man8/smtpd.8  2019-02-10 23:53:17.000000000 +0100
+++ new/postfix-3.4.6/man/man8/smtpd.8  2019-06-29 15:33:39.000000000 +0200
@@ -527,6 +527,11 @@
 Optional lookup tables that map names received from remote SMTP
 clients via the TLS Server Name Indication (SNI) extension to the
 appropriate keys and certificate chains.
+.PP
+Introduced with Postfix 3.4.6, 3.3.5, 3.2.10, and 3.1.13:
+.IP "\fBtls_fast_shutdown_enable (yes)\fR"
+A workaround for implementations that hang Postfix while shuting
+down a TLS session, until Postfix times out.
 .SH "OBSOLETE STARTTLS CONTROLS"
 .na
 .nf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/man/man8/tlsproxy.8 
new/postfix-3.4.6/man/man8/tlsproxy.8
--- old/postfix-3.4.5/man/man8/tlsproxy.8       2019-02-22 01:27:45.000000000 
+0100
+++ new/postfix-3.4.6/man/man8/tlsproxy.8       2019-06-29 15:33:40.000000000 
+0200
@@ -302,6 +302,11 @@
 Optional lookup tables with the Postfix \fBtlsproxy\fR(8) client TLS
 usage policy by next\-hop destination and by remote TLS server
 hostname.
+.PP
+Introduced with Postfix 3.4.6, 3.3.5, 3.2.10, and 3.1.13:
+.IP "\fBtls_fast_shutdown_enable (yes)\fR"
+A workaround for implementations that hang Postfix while shuting
+down a TLS session, until Postfix times out.
 .SH "OBSOLETE STARTTLS SUPPORT CONTROLS"
 .na
 .nf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/mantools/postlink 
new/postfix-3.4.6/mantools/postlink
--- old/postfix-3.4.5/mantools/postlink 2019-02-10 18:11:46.000000000 +0100
+++ new/postfix-3.4.6/mantools/postlink 2019-06-25 14:05:54.000000000 +0200
@@ -765,6 +765,7 @@
     s;\btls_ssl_options\b;<a href="postconf.5.html#tls_ssl_options">$&</a>;g;
     s;\btls_dane_digest_agility\b;<a 
href="postconf.5.html#tls_dane_digest_agility">$&</a>;g;
     s;\btls_dane_trust_anchor_digest_enable\b;<a 
href="postconf.5.html#tls_dane_trust_anchor_digest_enable">$&</a>;g;
+    s;\btls_fast_shutdown_enable\b;<a 
href="postconf.5.html#tls_fast_shutdown_enable">$&</a>;g;
 
     s;\bfrozen_delivered_to\b;<a 
href="postconf.5.html#frozen_delivered_to">$&</a>;g;
     s;\breset_owner_alias\b;<a 
href="postconf.5.html#reset_owner_alias">$&</a>;g;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/proto/postconf.proto 
new/postfix-3.4.6/proto/postconf.proto
--- old/postfix-3.4.5/proto/postconf.proto      2019-03-21 17:41:06.000000000 
+0100
+++ new/postfix-3.4.6/proto/postconf.proto      2019-06-28 23:19:58.000000000 
+0200
@@ -16130,9 +16130,6 @@
 
 <dt><b>PRIORITIZE_CHACHA</b></dt> <dd>Postfix &ge; 3.4. See 
SSL_CTX_set_options(3).</dd>
 
-<dt><b>TLSEXT_PADDING</b></dt> <dd>Postfix &ge; 3.4. See
-SSL_CTX_set_options(3).</dd>
-
 </dl>
 
 <p> This feature is available in Postfix 2.11 and later.  </p>
@@ -16245,6 +16242,17 @@
 
 <p> This feature is available in Postfix 3.0 and later. </p>
 
+%PARAM tls_fast_shutdown_enable yes
+
+<p> A workaround for implementations that hang Postfix while shuting
+down a TLS session, until Postfix times out. With this enabled,
+Postfix will not wait for the remote TLS peer to respond to a TLS
+'close' notification. This behavior is recommended for TLSv1.0 and
+later. </p>
+
+<p> This feature was introduced with Postfix 3.4.6, 3.3.5, 3.2.10,
+and 3.1.13. </p>
+
 %PARAM default_delivery_status_filter
 
 <p> Optional filter to replace the delivery status code or explanatory
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/src/global/mail_params.h 
new/postfix-3.4.6/src/global/mail_params.h
--- old/postfix-3.4.5/src/global/mail_params.h  2019-02-11 14:05:13.000000000 
+0100
+++ new/postfix-3.4.6/src/global/mail_params.h  2019-06-27 23:38:33.000000000 
+0200
@@ -3331,6 +3331,13 @@
 extern char *var_tls_dane_digests;
 
  /*
+  * The default is backwards-incompatible.
+  */
+#define VAR_TLS_FAST_SHUTDOWN  "tls_fast_shutdown"
+#define DEF_TLS_FAST_SHUTDOWN  1
+extern bool var_tls_fast_shutdown;
+
+ /*
   * Sendmail-style mail filter support.
   */
 #define VAR_SMTPD_MILTERS              "smtpd_milters"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/src/global/mail_version.h 
new/postfix-3.4.6/src/global/mail_version.h
--- old/postfix-3.4.5/src/global/mail_version.h 2019-03-30 15:38:23.000000000 
+0100
+++ new/postfix-3.4.6/src/global/mail_version.h 2019-06-29 15:57:49.000000000 
+0200
@@ -20,8 +20,8 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20190330"
-#define MAIL_VERSION_NUMBER    "3.4.5"
+#define MAIL_RELEASE_DATE      "20190629"
+#define MAIL_VERSION_NUMBER    "3.4.6"
 
 #ifdef SNAPSHOT
 #define MAIL_VERSION_DATE      "-" MAIL_RELEASE_DATE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/src/smtp/smtp.c 
new/postfix-3.4.6/src/smtp/smtp.c
--- old/postfix-3.4.5/src/smtp/smtp.c   2019-02-10 18:18:26.000000000 +0100
+++ new/postfix-3.4.6/src/smtp/smtp.c   2019-06-29 15:33:39.000000000 +0200
@@ -109,9 +109,8 @@
 /*     the postmaster is notified of bounces, protocol problems, and of
 /*     other trouble.
 /* BUGS
-/*     SMTP and LMTP connection caching does not work with TLS. The necessary
-/*     support for TLS object passivation and re-activation does not
-/*     exist without closing the session, which defeats the purpose.
+/*     SMTP and LMTP connection reuse for TLS (without closing the
+/*     SMTP or LMTP connection) is not supported before Postfix 3.4.
 /*
 /*     SMTP and LMTP connection caching assumes that SASL credentials
 /*     are valid for all destinations that map onto the same IP
@@ -496,6 +495,11 @@
 /* .IP "\fBsmtp_tls_servername (empty)\fR"
 /*     Optional name to send to the remote SMTP server in the TLS Server
 /*     Name Indication (SNI) extension.
+/* .PP
+/*     Introduced with Postfix 3.4.6, 3.3.5, 3.2.10, and 3.1.13:
+/* .IP "\fBtls_fast_shutdown_enable (yes)\fR"
+/*     A workaround for implementations that hang Postfix while shuting
+/*     down a TLS session, until Postfix times out.
 /* OBSOLETE STARTTLS CONTROLS
 /* .ad
 /* .fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/src/smtp/smtp_addr.c 
new/postfix-3.4.6/src/smtp/smtp_addr.c
--- old/postfix-3.4.5/src/smtp/smtp_addr.c      2017-12-27 22:53:13.000000000 
+0100
+++ new/postfix-3.4.6/src/smtp/smtp_addr.c      2019-04-04 00:03:38.000000000 
+0200
@@ -623,7 +623,7 @@
            if (var_smtp_rand_addr)
                addr_list = dns_rr_shuffle(addr_list);
            addr_list = dns_rr_sort(addr_list, SMTP_COMPARE_ADDR(misc_flags));
-           if (var_smtp_balance_inet_proto)
+           if (var_smtp_mxaddr_limit > 0 && var_smtp_balance_inet_proto)
                addr_list = smtp_balance_inet_proto(addr_list, misc_flags,
                                                    var_smtp_mxaddr_limit);
        }
@@ -683,7 +683,7 @@
        /* The following changes the order of equal-preference hosts. */
        if (inet_proto_info()->ai_family_list[1] != 0)
            addr_list = dns_rr_sort(addr_list, SMTP_COMPARE_ADDR(misc_flags));
-       if (var_smtp_balance_inet_proto)
+       if (var_smtp_mxaddr_limit > 0 && var_smtp_balance_inet_proto)
            addr_list = smtp_balance_inet_proto(addr_list, misc_flags,
                                                var_smtp_mxaddr_limit);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/src/smtpd/smtpd.c 
new/postfix-3.4.6/src/smtpd/smtpd.c
--- old/postfix-3.4.5/src/smtpd/smtpd.c 2019-03-30 13:05:29.000000000 +0100
+++ new/postfix-3.4.6/src/smtpd/smtpd.c 2019-06-29 15:33:39.000000000 +0200
@@ -493,6 +493,11 @@
 /*     Optional lookup tables that map names received from remote SMTP
 /*     clients via the TLS Server Name Indication (SNI) extension to the
 /*     appropriate keys and certificate chains.
+/* .PP
+/*     Introduced with Postfix 3.4.6, 3.3.5, 3.2.10, and 3.1.13:
+/* .IP "\fBtls_fast_shutdown_enable (yes)\fR"
+/*     A workaround for implementations that hang Postfix while shuting
+/*     down a TLS session, until Postfix times out.
 /* OBSOLETE STARTTLS CONTROLS
 /* .ad
 /* .fi
@@ -3528,6 +3533,11 @@
     int     saved_err;
     const CLEANUP_STAT_DETAIL *detail;
 
+#define IS_SMTP_REJECT(s) \
+       (((s)[0] == '4' || (s)[0] == '5') \
+        && ISDIGIT((s)[1]) && ISDIGIT((s)[2]) \
+        && ((s)[3] == '\0' || (s)[3] == ' ' || (s)[3] == '-'))
+
     if (state->err == CLEANUP_STAT_OK
        && SMTPD_STAND_ALONE(state) == 0
        && (err = smtpd_check_eod(state)) != 0) {
@@ -3598,7 +3608,10 @@
        if (state->err == 0) {
            why = vstring_alloc(10);
            state->err = mail_stream_finish(state->dest, why);
-           printable(STR(why), ' ');
+           if (IS_SMTP_REJECT(STR(why)))
+               printable_except(STR(why), ' ', "\r\n");
+           else
+               printable(STR(why), ' ');
        } else
            mail_stream_cleanup(state->dest);
        state->dest = 0;
@@ -3633,11 +3646,6 @@
      * 
      * See also: qmqpd.c
      */
-#define IS_SMTP_REJECT(s) \
-       (((s)[0] == '4' || (s)[0] == '5') \
-        && ISDIGIT((s)[1]) && ISDIGIT((s)[2]) \
-        && ((s)[3] == '\0' || (s)[3] == ' ' || (s)[3] == '-'))
-
     if (state->err == CLEANUP_STAT_OK) {
        state->error_count = 0;
        state->error_mask = 0;
@@ -5413,15 +5421,6 @@
     case 0:
 
        /*
-        * Reset the per-command counters.
-        */
-       for (cmdp = smtpd_cmd_table; /* see below */ ; cmdp++) {
-           cmdp->success_count = cmdp->total_count = 0;
-           if (cmdp->name == 0)
-               break;
-       }
-
-       /*
         * In TLS wrapper mode, turn on TLS using code that is shared with
         * the STARTTLS command. This code does not return when the handshake
         * fails.
@@ -5818,6 +5817,15 @@
        if (cmdp->name == 0)
            break;
     }
+
+    /*
+     * Reset the per-command counters.
+     */
+    for (cmdp = smtpd_cmd_table; /* see below */ ; cmdp++) {
+       cmdp->success_count = cmdp->total_count = 0;
+       if (cmdp->name == 0)
+           break;
+    }
 
     /*
      * Log total numbers, so that logfile analyzers will see something even
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/src/tls/Makefile.in 
new/postfix-3.4.6/src/tls/Makefile.in
--- old/postfix-3.4.5/src/tls/Makefile.in       2019-03-08 01:04:25.000000000 
+0100
+++ new/postfix-3.4.6/src/tls/Makefile.in       2019-06-25 14:05:54.000000000 
+0200
@@ -572,6 +572,7 @@
 tls_session.o: ../../include/argv.h
 tls_session.o: ../../include/check_arg.h
 tls_session.o: ../../include/dns.h
+tls_session.o: ../../include/mail_params.h
 tls_session.o: ../../include/msg.h
 tls_session.o: ../../include/myaddrinfo.h
 tls_session.o: ../../include/mymalloc.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/src/tls/tls_misc.c 
new/postfix-3.4.6/src/tls/tls_misc.c
--- old/postfix-3.4.5/src/tls/tls_misc.c        2019-02-22 01:22:18.000000000 
+0100
+++ new/postfix-3.4.6/src/tls/tls_misc.c        2019-06-25 23:51:24.000000000 
+0200
@@ -46,6 +46,8 @@
 /*     char    *var_tls_mgr_service;
 /*     char    *var_tls_tkt_cipher;
 /*     char    *var_openssl_path;
+/*     char    *var_tls_server_sni_maps;
+/*     bool    var_tls_fast_shutdown;
 /*
 /*     TLS_APPL_STATE *tls_alloc_app_context(ssl_ctx, log_mask)
 /*     SSL_CTX *ssl_ctx;
@@ -289,6 +291,7 @@
 char   *var_tls_tkt_cipher;
 char   *var_openssl_path;
 char   *var_tls_server_sni_maps;
+bool    var_tls_fast_shutdown;
 
 static MAPS *tls_server_sni_maps;
 
@@ -625,6 +628,7 @@
        VAR_TLS_BC_PKEY_FPRINT, DEF_TLS_BC_PKEY_FPRINT, &var_tls_bc_pkey_fprint,
        VAR_TLS_PREEMPT_CLIST, DEF_TLS_PREEMPT_CLIST, &var_tls_preempt_clist,
        VAR_TLS_MULTI_WILDCARD, DEF_TLS_MULTI_WILDCARD, &var_tls_multi_wildcard,
+       VAR_TLS_FAST_SHUTDOWN, DEF_TLS_FAST_SHUTDOWN, &var_tls_fast_shutdown,
        0,
     };
     static int init_done;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/src/tls/tls_session.c 
new/postfix-3.4.6/src/tls/tls_session.c
--- old/postfix-3.4.5/src/tls/tls_session.c     2018-12-26 20:21:49.000000000 
+0100
+++ new/postfix-3.4.6/src/tls/tls_session.c     2019-06-25 14:05:54.000000000 
+0200
@@ -71,6 +71,10 @@
 #include <msg.h>
 #include <mymalloc.h>
 
+/* Global library. */
+
+#include <mail_params.h>
+
 /* TLS library. */
 
 #define TLS_INTERNAL
@@ -95,6 +99,18 @@
        msg_panic("%s: stream has no active TLS context", myname);
 
     /*
+     * According to RFC 2246 (TLS 1.0), there is no requirement to wait for
+     * the peer's close-notify. If the application protocol provides
+     * sufficient session termination signaling, then there's no need to
+     * duplicate that at the TLS close-notify layer.
+     * 
+     * https://tools.ietf.org/html/rfc2246#section-7.2.1
+     * https://tools.ietf.org/html/rfc4346#section-7.2.1
+     * https://tools.ietf.org/html/rfc5246#section-7.2.1
+     * 
+     * Specify 'tls_fast_shutdown = no' to enable the historical behavior
+     * described below.
+     * 
      * Perform SSL_shutdown() twice, as the first attempt will send out the
      * shutdown alert but it will not wait for the peer's shutdown alert.
      * Therefore, when we are the first party to send the alert, we must call
@@ -104,7 +120,7 @@
      */
     if (!failure) {
        retval = tls_bio_shutdown(vstream_fileno(stream), timeout, TLScontext);
-       if (retval == 0)
+       if (!var_tls_fast_shutdown && retval == 0)
            tls_bio_shutdown(vstream_fileno(stream), timeout, TLScontext);
     }
     tls_free_context(TLScontext);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/src/tlsproxy/tlsproxy.c 
new/postfix-3.4.6/src/tlsproxy/tlsproxy.c
--- old/postfix-3.4.5/src/tlsproxy/tlsproxy.c   2019-02-22 01:24:38.000000000 
+0100
+++ new/postfix-3.4.6/src/tlsproxy/tlsproxy.c   2019-06-29 15:33:40.000000000 
+0200
@@ -282,6 +282,11 @@
 /*     Optional lookup tables with the Postfix \fBtlsproxy\fR(8) client TLS
 /*     usage policy by next-hop destination and by remote TLS server
 /*     hostname.
+/* .PP
+/*     Introduced with Postfix 3.4.6, 3.3.5, 3.2.10, and 3.1.13:
+/* .IP "\fBtls_fast_shutdown_enable (yes)\fR"
+/*     A workaround for implementations that hang Postfix while shuting
+/*     down a TLS session, until Postfix times out.
 /* OBSOLETE STARTTLS SUPPORT CONTROLS
 /* .ad
 /* .fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/src/util/printable.c 
new/postfix-3.4.6/src/util/printable.c
--- old/postfix-3.4.5/src/util/printable.c      2015-01-14 01:19:23.000000000 
+0100
+++ new/postfix-3.4.6/src/util/printable.c      2019-04-10 23:30:23.000000000 
+0200
@@ -11,6 +11,11 @@
 /*     char    *printable(buffer, replacement)
 /*     char    *buffer;
 /*     int     replacement;
+/*
+/*     char    *printable_except(buffer, replacement, except)
+/*     char    *buffer;
+/*     int     replacement;
+/*     const char *except;
 /* DESCRIPTION
 /*     printable() replaces non-printable characters
 /*     in its input with the given replacement.
@@ -24,6 +29,8 @@
 /* .IP replacement
 /*     Replacement value for characters in \fIbuffer\fR that do not
 /*     pass the ASCII isprint(3) test or that are not valid UTF8.
+/* .IP except
+/*     Null-terminated sequence of non-replaced ASCII characters.
 /* LICENSE
 /* .ad
 /* .fi
@@ -33,12 +40,18 @@
 /*     IBM T.J. Watson Research
 /*     P.O. Box 704
 /*     Yorktown Heights, NY 10598, USA
+/*
+/*     Wietse Venema
+/*     Google, Inc.
+/*     111 8th Avenue
+/*     New York, NY 10011, USA
 /*--*/
 
 /* System library. */
 
 #include "sys_defs.h"
 #include <ctype.h>
+#include <string.h>
 
 /* Utility library. */
 
@@ -46,8 +59,21 @@
 
 int util_utf8_enable = 0;
 
+/* printable -  binary compatibility */
+
+#undef printable
+
+char   *printable(char *, int);
+
 char   *printable(char *string, int replacement)
 {
+    return (printable_except(string, replacement, (char *) 0));
+}
+
+/* printable_except -  pass through printable or other preserved characters */
+
+char   *printable_except(char *string, int replacement, const char *except)
+{
     unsigned char *cp;
     int     ch;
 
@@ -57,7 +83,7 @@
      */
     cp = (unsigned char *) string;
     while ((ch = *cp) != 0) {
-       if (ISASCII(ch) && ISPRINT(ch)) {
+       if (ISASCII(ch) && (ISPRINT(ch) || (except && strchr(except, ch)))) {
            /* ok */
        } else if (util_utf8_enable && ch >= 194 && ch <= 254
                   && cp[1] >= 128 && cp[1] < 192) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/src/util/stringops.h 
new/postfix-3.4.6/src/util/stringops.h
--- old/postfix-3.4.5/src/util/stringops.h      2017-12-27 23:29:45.000000000 
+0100
+++ new/postfix-3.4.6/src/util/stringops.h      2019-04-10 23:23:22.000000000 
+0200
@@ -20,7 +20,7 @@
   * External interface.
   */
 extern int util_utf8_enable;
-extern char *printable(char *, int);
+extern char *printable_except(char *, int, const char *);
 extern char *neuter(char *, const char *, int);
 extern char *lowercase(char *);
 extern char *casefoldx(int, VSTRING *, const char *, ssize_t);
@@ -32,6 +32,9 @@
 extern char *mystrtokq(char **, const char *, const char *);
 extern char *translit(char *, const char *, const char *);
 
+#define printable(string, replacement) \
+       printable_except((string), (replacement), (char *) 0)
+
 #ifndef HAVE_BASENAME
 #define basename postfix_basename
 extern char *basename(const char *);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.4.5/src/util/unix_dgram_connect.c 
new/postfix-3.4.6/src/util/unix_dgram_connect.c
--- old/postfix-3.4.5/src/util/unix_dgram_connect.c     2019-01-29 
23:24:42.000000000 +0100
+++ new/postfix-3.4.6/src/util/unix_dgram_connect.c     2019-04-01 
23:48:27.000000000 +0200
@@ -60,6 +60,7 @@
 int     unix_dgram_connect(const char *path, int block_mode)
 {
     const char myname[] = "unix_dgram_connect";
+#undef sun
     struct sockaddr_un sun;
     ssize_t path_len;
     int     sock;


Reply via email to