]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.6-20200620
authorWietse Venema <wietse@porcupine.org>
Sat, 20 Jun 2020 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sun, 21 Jun 2020 08:37:37 +0000 (06:37 -0200)
postfix/HISTORY
postfix/WISHLIST
postfix/html/postconf.5.html
postfix/man/man5/postconf.5
postfix/proto/postconf.proto
postfix/src/global/mail_version.h
postfix/src/posttls-finger/posttls-finger.c
postfix/src/smtp/smtp_proto.c
postfix/src/smtp/smtp_tls_policy.c
postfix/src/tls/tls_proxy_client_print.c
postfix/src/tlsproxy/tlsproxy.c

index dc1eec0441b4fa01ead9c2eafc6b33dc29082051..f6abede77b9cbf197ac88c3c630317e356c3bf90 100644 (file)
@@ -24867,3 +24867,35 @@ Apologies for any names omitted.
        sent a TLSv1.3 HelloRetryRequest (HRR) to a remote SMTP
        client. Reported by Ján Máté, fixed by Viktor Dukhovni.
        File: tls/tls_misc.c.
+
+20200617
+
+       Bugfix (introduced: Postfix 3.4): the connection_reuse
+       attribute in smtp_tls_policy_maps resulted in an "invalid
+       attribute name" error. Fix by Thorsten Habich. File:
+       smtp/smtp_tls_policy.c.
+
+20200618
+
+       Documentation: documented that smtp_line_length_limit=0
+       disables the feature, and made this more explicit in the
+       code by using the ENFORCING_SIZE_LIMIT macro. Files:
+       proto/postconf.proto, smtp/smtp_proto.c.
+
+20200619
+
+       Bugfix (introduced: Postfix 3.4): SMTP over TLS connection
+       reuse was broken for configurations that use explicit trust
+       anchors. Reported by Thorsten Habich. Cause: the tlsproxy
+       client was sending a zero certificate length. File:
+       tls/tls_proxy_client_print.c.
+
+       Bugfix: posttls-finger reported a conflict betwen -X and
+       -r when only -X was used. File: posttls-finger/posttls-finger.c.
+
+20200620
+
+       Bugfix (introduced: Postfix 3.4): SMTP over TLS connection
+       reuse was broken for configurations that use explicit trust
+       anchors. Reported by Thorsten Habich. Fixed by calling DANE
+       initialization unconditionally (WTF). File: tlsproxy/tlsproxy.c.
index 69913ede3af14aee5ce9b4813d635618deea560c..5f69e9fd2e2716a1f44eb0c837e05f12dd28c787 100644 (file)
@@ -1,5 +1,8 @@
 Wish list:
 
+       Move the tls_dane_avail() and DANE-requested test into
+       tls_client_start().
+
        DNS wrapper class, like XSASL, to support different stub
        resolvers without contaminating Postfix programs with the
        idiosyncracies of stub resolvers. Handle differences in
index 6e3f44cfbd234f40b28f8f94221988deb27206dd..7ba6400f0b3f4d4b969870f7207c8f236e8eca10 100644 (file)
@@ -11285,7 +11285,7 @@ The maximal length of message header and body lines that Postfix
 will send via SMTP. This limit does not include the &lt;CR&gt;&lt;LF&gt;
 at the end of each line.  Longer lines are broken by inserting
 "&lt;CR&gt;&lt;LF&gt;&lt;SPACE&gt;", to minimize the damage to MIME
-formatted mail.
+formatted mail. Specify zero to disable this limit.
 </p>
 
 <p>
index 0fef6368251550ee30b941f6ecf07b338082f187..b40a82b42d214e05d299b3c8964807db4944f12e 100644 (file)
@@ -7117,7 +7117,7 @@ The maximal length of message header and body lines that Postfix
 will send via SMTP. This limit does not include the <CR><LF>
 at the end of each line.  Longer lines are broken by inserting
 "<CR><LF><SPACE>", to minimize the damage to MIME
-formatted mail.
+formatted mail. Specify zero to disable this limit.
 .PP
 The Postfix limit of 998 characters not including <CR><LF>
 is consistent with the SMTP limit of 1000 characters including
index e608f1017d13625df611b8a4998ac34cefd35321..8c42da554eaf842886f1ed03d2f96e1f6ab9825e 100644 (file)
@@ -4400,7 +4400,7 @@ The maximal length of message header and body lines that Postfix
 will send via SMTP. This limit does not include the &lt;CR&gt;&lt;LF&gt;
 at the end of each line.  Longer lines are broken by inserting
 "&lt;CR&gt;&lt;LF&gt;&lt;SPACE&gt;", to minimize the damage to MIME
-formatted mail.
+formatted mail. Specify zero to disable this limit.
 </p>
 
 <p>
index f04aa4dfd7fe8ace4e793dce66a77e75c7ba6d6c..e76173c87a2e5e507ece973db99e6daaee7ce13c 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      "20200610"
+#define MAIL_RELEASE_DATE      "20200620"
 #define MAIL_VERSION_NUMBER    "3.6"
 
 #ifdef SNAPSHOT
index c142d43f5ae421aafc47f6fad1ba446eb7a582b4..a3a9946d327b7288ad5c68a2a8910ffa07033b87 100644 (file)
@@ -1988,7 +1988,7 @@ static void parse_options(STATE *state, int argc, char *argv[])
        msg_fatal("bad '-a' option value: %s", state->options.addr_pref);
 
 #ifdef USE_TLS
-    if (state->tlsproxy_mode && state->reconnect)
+    if (state->tlsproxy_mode && state->reconnect >= 0)
        msg_fatal("The -X and -r options are mutually exclusive");
 #endif
 
index a968ff2957264e399d62812bc9ff6b55823951e4..665dc9bd43ff663105bbd224312ee37ee9c6f3e2 100644 (file)
@@ -1179,7 +1179,8 @@ static void smtp_text_out(void *context, int rec_type,
        if (state->space_left == var_smtp_line_limit
            && data_left > 0 && *data_start == '.')
            smtp_fputc('.', session->stream);
-       if (var_smtp_line_limit > 0 && data_left >= state->space_left) {
+       if (ENFORCING_SIZE_LIMIT(var_smtp_line_limit)
+           && data_left >= state->space_left) {
            smtp_fputs(data_start, state->space_left, session->stream);
            data_start += state->space_left;
            data_left -= state->space_left;
index 03201b9c13fbc6be18f53138910bd0d5188cf2ab..4b394a9344883659ab3a37a765f87e3450be25d8 100644 (file)
@@ -389,6 +389,7 @@ static void tls_policy_lookup_one(SMTP_TLS_POLICY *tls, int *site_level,
                         WHERE, name, val);
                INVALID_RETURN(tls->why, site_level);
            }
+           continue;
        }
        msg_warn("%s: invalid attribute name: \"%s\"", WHERE, name);
        INVALID_RETURN(tls->why, site_level);
index 8caf70511df10bb3c505db7a38b431a421e86fed..00e38bf95eac6a51628a033524098233ffa8c470 100644 (file)
@@ -213,6 +213,7 @@ static int tls_proxy_client_certs_print(ATTR_PRINT_COMMON_FN print_fn,
            i2d_X509(tp->cert, &bp);
            if ((char *) bp - STR(buf) != len)
                msg_panic("i2d_X509 failed to encode certificate");
+           vstring_set_payload_size(buf, len);
            ret = print_fn(fp, flags | ATTR_FLAG_MORE,
                           SEND_ATTR_DATA(TLS_ATTR_CERT, LEN(buf), STR(buf)),
                           ATTR_TYPE_END);
@@ -258,6 +259,7 @@ static int tls_proxy_client_pkeys_print(ATTR_PRINT_COMMON_FN print_fn,
            i2d_PUBKEY(tp->pkey, &bp);
            if ((char *) bp - STR(buf) != len)
                msg_panic("i2d_PUBKEY failed to encode public key");
+           vstring_set_payload_size(buf, len);
            ret = print_fn(fp, flags | ATTR_FLAG_MORE,
                           SEND_ATTR_DATA(TLS_ATTR_PKEY, LEN(buf), STR(buf)),
                           ATTR_TYPE_END);
index 70ea8042ecb41b955c4603d14f1a0bad085bc56f..7aad011be7478225e55f21b7769a29df46c18eb7 100644 (file)
@@ -997,12 +997,12 @@ static int tlsp_client_start_pre_handshake(TLSP_STATE *state)
     state->client_start_props->ctx = state->appl_state;
     state->client_start_props->fd = state->ciphertext_fd;
     /* These predicates and warning belong inside tls_client_start(). */
-    if (!TLS_DANE_BASED(state->client_start_props->tls_level)
-       || tls_dane_avail())
-       state->tls_context = tls_client_start(state->client_start_props);
-    else
+    if (!tls_dane_avail()                      /* mandatory side effects!! */
+       &&TLS_DANE_BASED(state->client_start_props->tls_level))
        msg_warn("%s: DANE requested, but not available",
                 state->client_start_props->namaddr);
+    else
+       state->tls_context = tls_client_start(state->client_start_props);
     if (state->tls_context != 0)
        return (TLSP_STAT_OK);