]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.3-20171009
authorWietse Venema <wietse@porcupine.org>
Mon, 9 Oct 2017 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 14 Oct 2017 20:06:10 +0000 (16:06 -0400)
postfix/HISTORY
postfix/WISHLIST
postfix/html/postconf.5.html
postfix/html/postqueue.1.html
postfix/man/man1/postqueue.1
postfix/proto/postconf.proto
postfix/src/global/mail_version.h
postfix/src/postqueue/postqueue.c
postfix/src/postqueue/showq_compat.c
postfix/src/postqueue/showq_json.c
postfix/src/tls/tls_dane.c

index c4b0f4b56e0eaad60b272f3b50a4fbe068dc0be7..09f3a935424b8b5b6c27f09ab63e271bab1bfaca 100644 (file)
@@ -23144,7 +23144,7 @@ Apologies for any names omitted.
 
        Safety: restore sanity checks for dynamically-specified
        width and precision in format strings (%*, %.*, and %*.*).
-       These checks were lost with the Postfix 3.2.2 rewrite of
+       These checks were lost with the Postfix 3.2 rewrite of
        the vbuf_print formatter. File: vbuf_print.c.
 
        Bugfix (introduced: postfix-alpha): improve the 'fatal:
@@ -23156,5 +23156,18 @@ Apologies for any names omitted.
        Bugfix (introduced: Postfix 3.2): panic in the postqueue
        command after output write error while listing the queue.
        This change restores a write error check that was lost with
-       the Postfix 3.2.2 rewrite of the vbuf_print formatter.
+       the Postfix 3.2 rewrite of the vbuf_print formatter.
        Problem reported by Andreas Schulze. File: util/vbuf_print.c.
+
+20170924
+
+       Cleanup: terminate early after output write error. Files:
+       showq/show_compat.c, showq/show_json.c.
+
+20171009
+
+       Bugfix (introduced: Postfix 3.1): DANE support. Postfix
+       builds with OpenSSL 1.0.0 or 1.0.1 failed to send email to
+       some sites with "TLSA 2 X X" records associated with an
+       intermediate CA certificate. Problem report and initial
+       fix by Erwan Legrand. File: src/tls/tls_dane.c.
index f0e3a4eed58183e9c419b6e350b224254d1671cd..9ad62021dcd5578d99de681644f1bd70cfeb8949 100644 (file)
@@ -6,9 +6,15 @@ Wish list:
 
        Disable -DSNAPSHOT and -DNONPROD in makedefs.
 
+       After I/O error, store errno in VSTREAM object before errno
+       may be overwritten.
+
        Add postwhite as a postscreen-related project.
        https://github.com/stevejenkins/postwhite/blob/master/README.md
 
+       Document postsrsd and postforward for srs-ifying. Would
+       more fine-grained smtp_generic_maps support help?
+
        Decide whether to deprecate database configuration pathnames
        that start with ".", for example, ldap:./file/name. These forms
        are documented for ldap:, memcache:, mysql:, pgsql:, and sqlite:
index 5c308bad22ed3cf8671ca147ebfd5afba406b8e8..5e38bd06cf874e5836adb09b533830d995785991 100644 (file)
@@ -12665,7 +12665,7 @@ server certificate must match the TLSA records.  <a href="http://tools.ietf.org/
 authentication and DNSSEC support is available with Postfix 2.11
 and later.  </dd>
 
-<dt><b><a href="TLS_README.html#client_tls_fingerprint">fingerprint</a></b></dt>
+<dt><b><a href="TLS_README.html#client_tls_fprint">fingerprint</a></b></dt>
 <dd>Certificate fingerprint
 verification. Available with Postfix 2.5 and later. At this security
 level, there are no trusted Certification Authorities. The certificate
@@ -12936,7 +12936,7 @@ TLSA authentication is required.  There is no fallback to "may" or
 (DANE) TLS authentication is available with Postfix 2.11 and later.
 </dd>
 
-<dt><b><a href="TLS_README.html#client_tls_fingerprint">fingerprint</a></b></dt>
+<dt><b><a href="TLS_README.html#client_tls_fprint">fingerprint</a></b></dt>
 <dd>Certificate fingerprint verification.
 At this security level, there are no trusted Certification Authorities.
 The certificate trust chain, expiration date, etc., are
index 258cc8d693dddc9cd2f72bb73f247e6d1e90c602..15ad7fea29eb602b8479bae8a513d327fcdb6025 100644 (file)
@@ -169,7 +169,7 @@ POSTQUEUE(1)                                                      POSTQUEUE(1)
        <b><a href="postconf.5.html#alternate_config_directories">alternate_config_directories</a> (empty)</b>
               A list of non-default Postfix configuration directories that may
               be specified with "-c <a href="postconf.5.html#config_directory">config_directory</a>" on the command line  (in
-              the case of <a href="sendmail.1.html"><b>sendmail</b>(1)</a>, with "-C <a href="postconf.5.html#config_directory">config_directory</a>"), or via the
+              the  case  of  <a href="sendmail.1.html"><b>sendmail</b>(1)</a>,  with  the  "-C" option), or via the
               MAIL_CONFIG environment parameter.
 
        <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
@@ -184,8 +184,9 @@ POSTQUEUE(1)                                                      POSTQUEUE(1)
               tion logfiles with mail that is queued to those destinations.
 
        <b><a href="postconf.5.html#import_environment">import_environment</a> (see 'postconf -d' output)</b>
-              The list of environment parameters that a Postfix  process  will
-              import from a non-Postfix parent process.
+              The list of environment parameters  that  a  privileged  Postfix
+              process  will  import  from  a  non-Postfix  parent  process, or
+              name=value environment overrides.
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
               The location of the Postfix top-level queue directory.
@@ -194,11 +195,11 @@ POSTQUEUE(1)                                                      POSTQUEUE(1)
               The syslog facility of Postfix logging.
 
        <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
-              A  prefix  that  is  prepended  to  the  process  name in syslog
+              A prefix that  is  prepended  to  the  process  name  in  syslog
               records, so that, for example, "smtpd" becomes "prefix/smtpd".
 
        <b><a href="postconf.5.html#trigger_timeout">trigger_timeout</a> (10s)</b>
-              The time limit for sending a trigger to a  Postfix  daemon  (for
+              The  time  limit  for sending a trigger to a Postfix daemon (for
               example, the <a href="pickup.8.html"><b>pickup</b>(8)</a> or <a href="qmgr.8.html"><b>qmgr</b>(8)</a> daemon).
 
        Available in Postfix version 2.2 and later:
index 9a3da416727df09031c6d6893a5a7d4995446403..7d70dafe3140dd71a2f118d4edf77473f10a70b3 100644 (file)
@@ -181,7 +181,7 @@ The text below provides only a parameter summary. See
 .IP "\fBalternate_config_directories (empty)\fR"
 A list of non\-default Postfix configuration directories that may
 be specified with "\-c config_directory" on the command line (in the
-case of \fBsendmail\fR(1), with "\-C config_directory"), or via the MAIL_CONFIG
+case of \fBsendmail\fR(1), with the "\-C" option), or via the MAIL_CONFIG
 environment parameter.
 .IP "\fBconfig_directory (see 'postconf -d' output)\fR"
 The default location of the Postfix main.cf and master.cf
@@ -192,8 +192,9 @@ The location of all postfix administrative commands.
 Optional list of destinations that are eligible for per\-destination
 logfiles with mail that is queued to those destinations.
 .IP "\fBimport_environment (see 'postconf -d' output)\fR"
-The list of environment parameters that a Postfix process will
-import from a non\-Postfix parent process.
+The list of environment parameters that a privileged Postfix
+process will import from a non\-Postfix parent process, or name=value
+environment overrides.
 .IP "\fBqueue_directory (see 'postconf -d' output)\fR"
 The location of the Postfix top\-level queue directory.
 .IP "\fBsyslog_facility (mail)\fR"
index b5c8957c876656e847982d2640a2d7d8b48ebf05..3a73e620513f2132addeb90580aa8137b2f88bce 100644 (file)
@@ -11066,7 +11066,7 @@ server certificate must match the TLSA records.  RFC 7672 (DANE) TLS
 authentication and DNSSEC support is available with Postfix 2.11
 and later.  </dd>
 
-<dt><b><a href="TLS_README.html#client_tls_fingerprint">fingerprint</a></b></dt>
+<dt><b><a href="TLS_README.html#client_tls_fprint">fingerprint</a></b></dt>
 <dd>Certificate fingerprint
 verification. Available with Postfix 2.5 and later. At this security
 level, there are no trusted Certification Authorities. The certificate
@@ -11465,7 +11465,7 @@ TLSA authentication is required.  There is no fallback to "may" or
 (DANE) TLS authentication is available with Postfix 2.11 and later.
 </dd>
 
-<dt><b><a href="TLS_README.html#client_tls_fingerprint">fingerprint</a></b></dt>
+<dt><b><a href="TLS_README.html#client_tls_fprint">fingerprint</a></b></dt>
 <dd>Certificate fingerprint verification.
 At this security level, there are no trusted Certification Authorities.
 The certificate trust chain, expiration date, etc., are
index c7370a1ad23eae6ab31deb61d86ec3665b1ea2dd..7cc70aed7a6e1b58ac6895edce13c1c35de13276 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      "20170924"
+#define MAIL_RELEASE_DATE      "20171009"
 #define MAIL_VERSION_NUMBER    "3.3"
 
 #ifdef SNAPSHOT
index 29f0a9c5ffbdf8bd854407257ab7c3300b1e953a..f18fb473997e740982cecad9a0a382a63804fc69 100644 (file)
 /* .IP "\fBalternate_config_directories (empty)\fR"
 /*     A list of non-default Postfix configuration directories that may
 /*     be specified with "-c config_directory" on the command line (in the
-/*     case of \fBsendmail\fR(1), with "-C config_directory"), or via the MAIL_CONFIG
+/*     case of \fBsendmail\fR(1), with the "-C" option), or via the MAIL_CONFIG
 /*     environment parameter.
 /* .IP "\fBconfig_directory (see 'postconf -d' output)\fR"
 /*     The default location of the Postfix main.cf and master.cf
 /*     Optional list of destinations that are eligible for per-destination
 /*     logfiles with mail that is queued to those destinations.
 /* .IP "\fBimport_environment (see 'postconf -d' output)\fR"
-/*     The list of environment parameters that a Postfix process will
-/*     import from a non-Postfix parent process.
+/*     The list of environment parameters that a privileged Postfix
+/*     process will import from a non-Postfix parent process, or name=value
+/*     environment overrides.
 /* .IP "\fBqueue_directory (see 'postconf -d' output)\fR"
 /*     The location of the Postfix top-level queue directory.
 /* .IP "\fBsyslog_facility (mail)\fR"
index 7899b1eef3c64301220f29114c36d664a099231b..c1868e1a48a940a2c8d2f803b1a99daea1a55d57 100644 (file)
@@ -36,6 +36,7 @@
 #include <time.h>
 #include <string.h>
 #include <sysexits.h>
+#include <errno.h>
 
 /* Utility library. */
 
@@ -190,7 +191,11 @@ void    showq_compat(VSTREAM *showq_stream)
        }
        queue_size += showq_message(showq_stream);
        file_count++;
-       vstream_fflush(VSTREAM_OUT);
+       if (vstream_fflush(VSTREAM_OUT)) {
+           if (errno != EPIPE)
+               msg_fatal_status(EX_IOERR, "output write error: %m");
+           return;
+       }
     }
     if (showq_status < 0)
        msg_fatal_status(EX_SOFTWARE, "malformed showq server response");
@@ -205,5 +210,6 @@ void    showq_compat(VSTREAM *showq_stream)
                       queue_size / 1024, file_count,
                       file_count == 1 ? "" : "s");
     }
-    vstream_fflush(VSTREAM_OUT);
+    if (vstream_fflush(VSTREAM_OUT) && errno != EPIPE)
+       msg_fatal_status(EX_IOERR, "output write error: %m");
 }
index 407d441ba2997608640b3b9ac24c19f4f9af11ac..67fbada4a21cd5b3ad9e2b200e37047548c48d7f 100644 (file)
@@ -34,6 +34,7 @@
 #include <string.h>
 #include <sysexits.h>
 #include <ctype.h>
+#include <errno.h>
 
 /* Utility library. */
 
@@ -167,7 +168,7 @@ static void format_json(VSTREAM *showq_stream)
                   json_quote(quote_buf, STR(addr)));
 
     /*
-     Read zero or more (recipient, reason) pair(s) until attr_scan_more()
+     Read zero or more (recipient, reason) pair(s) until attr_scan_more()
      * consumes a terminator. If the showq daemon messes up, don't try to
      * resynchronize.
      */
@@ -192,7 +193,8 @@ static void format_json(VSTREAM *showq_stream)
     if (showq_status < 0)
        msg_fatal_status(EX_SOFTWARE, "malformed showq server response");
     vstream_printf("}\n");
-    vstream_fflush(VSTREAM_OUT);
+    if (vstream_fflush(VSTREAM_OUT) && errno != EPIPE)
+       msg_fatal_status(EX_IOERR, "output write error: %m");
 }
 
 /* showq_json - streaming JSON-format output adapter */
@@ -202,10 +204,11 @@ void    showq_json(VSTREAM *showq_stream)
     int     showq_status;
 
     /*
-     * Emit zero or more queue file objects until attr_scan_more()
-     * consumes a terminator.
+     * Emit zero or more queue file objects until attr_scan_more() consumes a
+     * terminator.
      */
-    while ((showq_status = attr_scan_more(showq_stream)) > 0) {
+    while ((showq_status = attr_scan_more(showq_stream)) > 0
+          && vstream_ferror(VSTREAM_OUT) == 0) {
        format_json(showq_stream);
     }
     if (showq_status < 0)
index df4e6854295ee4aebbf31235aeb8ba71bcb2f7c0..8ec61379bebe2e67f799f6acb6580c554ae9370b 100644 (file)
@@ -1450,7 +1450,7 @@ static X509_NAME *akid_issuer_name(AUTHORITY_KEYID *akid)
 
 /* set_issuer - set issuer DN to match akid if specified */
 
-static int set_issuer_name(X509 *cert, AUTHORITY_KEYID *akid)
+static int set_issuer_name(X509 *cert, AUTHORITY_KEYID *akid, X509_NAME *subj)
 {
     X509_NAME *name = akid_issuer_name(akid);
 
@@ -1460,7 +1460,7 @@ static int set_issuer_name(X509 *cert, AUTHORITY_KEYID *akid)
      */
     if (name)
        return (X509_set_issuer_name(cert, name));
-    return (X509_set_issuer_name(cert, X509_get_subject_name(cert)));
+    return (X509_set_issuer_name(cert, subj));
 }
 
 /* grow_chain - add certificate to trusted or untrusted chain */
@@ -1522,7 +1522,7 @@ static void wrap_key(TLS_SESS_STATE *TLScontext, int depth,
      */
     if (!X509_set_version(cert, 2)
        || !set_serial(cert, akid, subject)
-       || !set_issuer_name(cert, akid)
+       || !set_issuer_name(cert, akid, name)
        || !X509_gmtime_adj(X509_getm_notBefore(cert), -30 * 86400L)
        || !X509_gmtime_adj(X509_getm_notAfter(cert), 30 * 86400L)
        || !X509_set_subject_name(cert, name)
@@ -1798,6 +1798,10 @@ void    tls_dane_set_callback(SSL_CTX *ctx, TLS_SESS_STATE *TLScontext)
 #include <mail_conf.h>
 #include <msg_vstream.h>
 
+#if OPENSSL_VERSION_NUMBER < 0x10002000L
+#define SSL_get0_param(s) ((s)->param)
+#endif
+
 static int verify_chain(SSL *ssl, x509_stack_t *chain, TLS_SESS_STATE *tctx)
 {
     int ret;