]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.11-20250928
authorWietse Z Venema <wietse@porcupine.org>
Sun, 28 Sep 2025 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <ietf-dane@dukhovni.org>
Tue, 30 Sep 2025 04:04:56 +0000 (14:04 +1000)
15 files changed:
postfix/HISTORY
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/proto/postconf.proto
postfix/proto/stop.double-cc
postfix/proto/stop.double-history
postfix/proto/stop.spell-cc
postfix/proto/stop.spell-history
postfix/src/global/mail_version.h
postfix/src/smtp/smtp.c
postfix/src/smtp/smtp_connect.c
postfix/src/smtp/smtp_tls_policy.c

index 1aafee60ebe6b0af7862a5edac1e3804da62f08f..a43950a6d7a2f22d363331d94ebef6cd67b32d9f 100644 (file)
@@ -29596,13 +29596,23 @@ Apologies for any names omitted.
 
 20250906
 
-       Bugfix: with "smtp_tls_enforce_sts_mx_patterns = yes" (the
-       default) transform the TLS policy from an STS policy plugin
-       as follows: connect to an MX host only if its name matches
-       an STS policy MX host pattern, and match the server
-       certificate against the MX hostname. Files: mantools/postlink,
-       proto/postconf.proto, global/mail_params.h, smtp/lmtp_params.c,
-       smtp/smtp.c, smtp/smtp.h, smtp/smtp_connect.c, smtp/smtp_params.c,
+       Workaround for an interface mis-match between the Postfix
+       SMTP client and MTA-STS policy plugins. This introduces a
+       new parameter "smtp_tls_enforce_sts_mx_patterns" (default:
+       "yes"). The MTA-STS plugin configuration needs to enable
+       TLSRPT support, so that it forwards STS policy attributes
+       to Postfix. This works even if Postfix TLSRPT support is
+       disabled at build time or at runtime.
+
+       With the above two configurations, the Postfix SMTP client
+       will connect to an MX host only if its name matches any STS
+       policy MX host pattern, and will match a server certificate
+       against the MX hostname. Otherwise, the old behavior stays
+       in effect: connect to any MX host listed in DNS, and match
+       a server certificate against any STS policy MX host pattern.
+       Files: mantools/postlink, proto/postconf.proto,
+       global/mail_params.h, smtp/lmtp_params.c, smtp/smtp.c,
+       smtp/smtp.h, smtp/smtp_connect.c, smtp/smtp_params.c,
        smtp/smtp_tls_policy.c, smtp/smtp_tls_policy_test.c.
 
 20250911
@@ -29640,3 +29650,14 @@ Apologies for any names omitted.
        the policies[*].policy.policy-domain value. This ignores
        that TLSA policies must be reported with different policy-domain
        values than STS policies. File: tls/tlsrpt_wrapper.c.
+
+20250927
+
+       Updated documentation for smtp_tls_enforce_sts_mx_patterns.
+       Files: proto/postconf.proto, smtp_tls_policy.c.
+
+20250928
+
+       Cleanup: make STS mx hostname pattern enforcement consistent
+       with the smtp_cname_overrides_servername setting. File:
+       smtp/smtp_connect.c.
index e116f43aa938dfd020400c6db507a4bf41f389dc..37a089ab1f389f5ecc6854db2d1ba05c0f1211f7 100644 (file)
@@ -762,19 +762,17 @@ SMTP(8)                                                                SMTP(8)
               When set to "yes", report the TLSRPT status only for  "new"  TLS
               sessions.
 
-       Available in Postfix version 3.10.5 and later:
-
-       <b><a href="postconf.5.html#smtp_tls_enforce_sts_mx_patterns">smtp_tls_enforce_sts_mx_patterns</a> (yes)</b>
-              Transform  the  TLS policy from an STS policy plugin: connect to
-              an MX host only if its name matches the STS policy MX host  pat-
-              tern,  and match the server certificate against the MX hostname.
-
-       Available in Postfix version 3.11 and later:
-
        <b><a href="postconf.5.html#tls_required_enable">tls_required_enable</a> (yes)</b>
               Enable  support  for  the  "TLS-Required:  no"  message  header,
               defined in <a href="https://tools.ietf.org/html/rfc8689">RFC 8689</a>.
 
+       Available in Postfix version 3.10.5 and later:
+
+       <b><a href="postconf.5.html#smtp_tls_enforce_sts_mx_patterns">smtp_tls_enforce_sts_mx_patterns</a> (yes)</b>
+              Transform the TLS policy from an STS policy plugin:  connect  to
+              an  MX host only if its name matches any STS policy MX host pat-
+              tern, and match the server certificate against the MX  hostname.
+
 <b><a name="obsolete_starttls_controls">OBSOLETE STARTTLS CONTROLS</a></b>
        The  following  configuration  parameters  exist for compatibility with
        Postfix versions before 2.3. Support for these will  be  removed  in  a
index e3ad237024e2a185c76e5b8541055bf59df5f99a..a8d36291116648d26d760e920c6f0bb6bb345576 100644 (file)
@@ -13555,8 +13555,17 @@ Postfix 2.3 and later use <a href="postconf.5.html#smtp_tls_security_level">smtp
 (default: yes)</b></DT><DD>
 
 <p> Transform the TLS policy from an STS policy plugin: connect to
-an MX host only if its name matches the STS policy MX host pattern,
-and match the server certificate against the MX hostname. </p>
+an MX host only if its name matches any STS policy MX host pattern,
+and match the server certificate against the MX hostname. This
+setting takes effect only when an STS policy plugin has TLSRPT
+support enabled, so that it forwards STS policy attributes to
+Postfix. This works even if Postfix TLSRPT support is disabled at
+build time or at runtime. </p>
+
+<p> Without the above configuration settings for Postfix and STS
+plugins, the old behavior stays in effect: connect to any MX host
+listed in DNS, and match a server certificate against any STS policy
+MX host pattern. </p>
 
 <p> This feature is available in Postfix &ge; 3.10.5. </p>
 
index e116f43aa938dfd020400c6db507a4bf41f389dc..37a089ab1f389f5ecc6854db2d1ba05c0f1211f7 100644 (file)
@@ -762,19 +762,17 @@ SMTP(8)                                                                SMTP(8)
               When set to "yes", report the TLSRPT status only for  "new"  TLS
               sessions.
 
-       Available in Postfix version 3.10.5 and later:
-
-       <b><a href="postconf.5.html#smtp_tls_enforce_sts_mx_patterns">smtp_tls_enforce_sts_mx_patterns</a> (yes)</b>
-              Transform  the  TLS policy from an STS policy plugin: connect to
-              an MX host only if its name matches the STS policy MX host  pat-
-              tern,  and match the server certificate against the MX hostname.
-
-       Available in Postfix version 3.11 and later:
-
        <b><a href="postconf.5.html#tls_required_enable">tls_required_enable</a> (yes)</b>
               Enable  support  for  the  "TLS-Required:  no"  message  header,
               defined in <a href="https://tools.ietf.org/html/rfc8689">RFC 8689</a>.
 
+       Available in Postfix version 3.10.5 and later:
+
+       <b><a href="postconf.5.html#smtp_tls_enforce_sts_mx_patterns">smtp_tls_enforce_sts_mx_patterns</a> (yes)</b>
+              Transform the TLS policy from an STS policy plugin:  connect  to
+              an  MX host only if its name matches any STS policy MX host pat-
+              tern, and match the server certificate against the MX  hostname.
+
 <b><a name="obsolete_starttls_controls">OBSOLETE STARTTLS CONTROLS</a></b>
        The  following  configuration  parameters  exist for compatibility with
        Postfix versions before 2.3. Support for these will  be  removed  in  a
index 31bfc03755078761107f0ad57f8295b865ad2a14..bcecdf30d5f221fe6600baea3dba0fccdde8f695 100644 (file)
@@ -8703,8 +8703,17 @@ This feature is available in Postfix 2.2 and later. With
 Postfix 2.3 and later use smtp_tls_security_level instead.
 .SH smtp_tls_enforce_sts_mx_patterns (default: yes)
 Transform the TLS policy from an STS policy plugin: connect to
-an MX host only if its name matches the STS policy MX host pattern,
-and match the server certificate against the MX hostname.
+an MX host only if its name matches any STS policy MX host pattern,
+and match the server certificate against the MX hostname. This
+setting takes effect only when an STS policy plugin has TLSRPT
+support enabled, so that it forwards STS policy attributes to
+Postfix. This works even if Postfix TLSRPT support is disabled at
+build time or at runtime.
+.PP
+Without the above configuration settings for Postfix and STS
+plugins, the old behavior stays in effect: connect to any MX host
+listed in DNS, and match a server certificate against any STS policy
+MX host pattern.
 .PP
 This feature is available in Postfix >= 3.10.5.
 .SH smtp_tls_exclude_ciphers (default: empty)
index dde3d5c7dbf998237b28edb35a459337df53ee21..80183b92f2357b5ffb65311b7b65c1e2a9e52d06 100644 (file)
@@ -684,17 +684,15 @@ by a local TLSRPT reporting service.
 .IP "\fBsmtp_tlsrpt_skip_reused_handshakes (Postfix >= 3.11: no, Postfix 3.10: yes)\fR"
 When set to "yes", report the TLSRPT status only for "new" TLS
 sessions.
+.IP "\fBtls_required_enable (yes)\fR"
+Enable support for the "TLS\-Required: no" message header, defined
+in RFC 8689.
 .PP
 Available in Postfix version 3.10.5 and later:
 .IP "\fBsmtp_tls_enforce_sts_mx_patterns (yes)\fR"
 Transform the TLS policy from an STS policy plugin: connect to
-an MX host only if its name matches the STS policy MX host pattern,
+an MX host only if its name matches any STS policy MX host pattern,
 and match the server certificate against the MX hostname.
-.PP
-Available in Postfix version 3.11 and later:
-.IP "\fBtls_required_enable (yes)\fR"
-Enable support for the "TLS\-Required: no" message header, defined
-in RFC 8689.
 .SH "OBSOLETE STARTTLS CONTROLS"
 .na
 .nf
index cbaf202ec5ba1e255f73d6610b20bf25b67a8462..4237ab89738903e27fb8889edac05b9bb518d07f 100644 (file)
@@ -19575,8 +19575,17 @@ second etc. TLS handshake to report. </p>
 %PARAM smtp_tls_enforce_sts_mx_patterns yes
 
 <p> Transform the TLS policy from an STS policy plugin: connect to
-an MX host only if its name matches the STS policy MX host pattern,
-and match the server certificate against the MX hostname. </p>
+an MX host only if its name matches any STS policy MX host pattern,
+and match the server certificate against the MX hostname. This
+setting takes effect only when an STS policy plugin has TLSRPT
+support enabled, so that it forwards STS policy attributes to
+Postfix. This works even if Postfix TLSRPT support is disabled at
+build time or at runtime. </p>
+
+<p> Without the above configuration settings for Postfix and STS
+plugins, the old behavior stays in effect: connect to any MX host
+listed in DNS, and match a server certificate against any STS policy
+MX host pattern. </p>
 
 <p> This feature is available in Postfix &ge; 3.10.5. </p>
 
index 1da83181c1c8df4cdca6da46d4af9898afea5a95..e55d6dedfa2d06caa842deac91c44184f3eee54e 100644 (file)
@@ -346,3 +346,4 @@ encoded  encoded text can contain only alpha digit
 ossl_digest_new  ossl_digest_new returns NULL after error ossl_digest_data 
  Richard Hansen rhansen rhansen org 
  long long or long integer 
+ policies policy policy domain If null this defaults to the
index 913a3083f72858feb370cf334e6c4163805ccc1a..6b32f33093732f26c90ebeda3cdd7e7abaee225c 100644 (file)
@@ -198,3 +198,7 @@ proto  proto COMPATIBILITY_README html
  Files Makefile in smtp smtp h smtp smtp_connect c 
  smtp smtp c smtp smtp h smtp smtp_connect c smtp smtp_params c 
  Files smtp smtp h smtp smtp_key c smtp smtp_proto c 
+ global mail_params h smtp lmtp_params c smtp smtp c 
+ smtp smtp h smtp smtp_connect c smtp smtp_params c 
+ the policies policy policy domain value This ignores
+ TLSRPT Workaround when policies policy policy type is
index 4313fb9d7d821416580685d5d6a0812e019d7e64..c21a6600daa6c9050e2cbcd238a9b10f61182429 100644 (file)
@@ -1870,3 +1870,4 @@ lflag
 REPLYCODE
 PTEST
 finalizer
+enf
index 9019565366fb60cd71305e23817f0719a2b350ea..b63bed7d84bc7ba2b3ba9e4e480eb63b98e6430e 100644 (file)
@@ -113,3 +113,4 @@ Fust
 Jiaying
 PRI
 YP
+Natalenko
index 18d00303c3c65c9e958292bead5fd6f82a5c6363..0fd56f3b6977ad4d183661054f7237a375940e6c 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      "20250924"
+#define MAIL_RELEASE_DATE      "20250928"
 #define MAIL_VERSION_NUMBER    "3.11"
 
 #ifdef SNAPSHOT
index beb46033c95a36dfa7cd7cc51aa39116d87e213d..873ef2ebbae4f64f24035fbb38d85a1066e9332f 100644 (file)
 /* .IP "\fBsmtp_tlsrpt_skip_reused_handshakes (Postfix >= 3.11: no, Postfix 3.10: yes)\fR"
 /*     When set to "yes", report the TLSRPT status only for "new" TLS
 /*     sessions.
+/* .IP "\fBtls_required_enable (yes)\fR"
+/*     Enable support for the "TLS-Required: no" message header, defined
+/*     in RFC 8689.
 /* .PP
 /*     Available in Postfix version 3.10.5 and later:
 /* .IP "\fBsmtp_tls_enforce_sts_mx_patterns (yes)\fR"
 /*     Transform the TLS policy from an STS policy plugin: connect to
-/*     an MX host only if its name matches the STS policy MX host pattern,
+/*     an MX host only if its name matches any STS policy MX host pattern,
 /*     and match the server certificate against the MX hostname.
-/* .PP
-/*     Available in Postfix version 3.11 and later:
-/* .IP "\fBtls_required_enable (yes)\fR"
-/*     Enable support for the "TLS-Required: no" message header, defined
-/*     in RFC 8689.
 /* OBSOLETE STARTTLS CONTROLS
 /* .ad
 /* .fi
index 7a93e638c661e57bc82314f53ee822fce406f287..6354a857853279f851888163920fa9dc5c3ea8be 100644 (file)
@@ -1125,7 +1125,7 @@ static void smtp_connect_inet(SMTP_STATE *state, const char *nexthop,
                /* XXX Assume there is no code at the end of this loop. */
            }
            /* Skip MX hosts that lack authorization. */
-           if (!smtp_tls_authorize_mx_hostname(state->tls, addr->qname)) {
+           if (!smtp_tls_authorize_mx_hostname(state->tls, SMTP_HNAME(addr))) {
                continue;
                /* XXX Assume there is no code at the end of this loop. */
            }
index 76f38aa3e9b0e1124066b8beefba8f6f45a99a14..73d1cd96274586197425c3e4f4bc906c7752cebb 100644 (file)
 /*     When any required table or DNS lookups fail, the TLS level
 /*     is set to TLS_LEV_INVALID, the "why" argument is updated
 /*     with the error reason and the result value is zero (false).
+/*     When var_smtp_tls_enf_sts_mx_pat is not null, and a policy plugin
+/*     specifies a policy_type "sts" plus one or more mx_host_pattern
+/*     instances, transform the policy as follows: allow only MX hosts
+/*     that match an mx_host_pattern instance, and match a server
+/*     certificate against the server hostname.
 /*
 /*     smtp_tls_policy_dummy() initializes a trivial, non-cached,
 /*     policy with TLS disabled.