Prereq: "3.6.16"
diff -ur --new-file /var/tmp/postfix-3.6.16/src/global/mail_version.h ./src/global/mail_version.h
--- /var/tmp/postfix-3.6.16/src/global/mail_version.h 2024-12-04 15:16:12.000000000 -0500
+++ ./src/global/mail_version.h 2025-02-16 16:26:32.000000000 -0500
@@ -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 "20241204"
-#define MAIL_VERSION_NUMBER "3.6.16"
+#define MAIL_RELEASE_DATE "20250216"
+#define MAIL_VERSION_NUMBER "3.6.17"
#ifdef SNAPSHOT
#define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE
diff -ur --new-file /var/tmp/postfix-3.6.16/HISTORY ./HISTORY
--- /var/tmp/postfix-3.6.16/HISTORY 2024-12-04 15:19:11.000000000 -0500
+++ ./HISTORY 2025-02-15 16:54:51.000000000 -0500
@@ -26193,3 +26193,77 @@
by Postfix (for example, a From: header with UTF8 full name
information from the password file). Reported by Michael
Tokarev. File: src/cleanup/cleanup_message.c.
+
+20241205
+
+ Portability: include The TLS policy for MX hosts with "secure" TLSA records when the
nexthop destination security level is dane, but the MX
@@ -12699,10 +12699,9 @@
"Verified", because the MX host name could have been forged. The default setting for Postfix ≥ 3.6 is "dane" with
-"smtp_tls_security_level = dane", otherwise "may". This behavior
-was backported to Postfix versions 3.5.9, 3.4.19, 3.3.16. 3.2.21.
-With earlier Postfix versions the default setting was always "dane".
+ The default setting is "dane" as of Postfix versions 3.6.17,
+3.7.13, 3.8.8, 3.9.2, and 3.10.0. With earlier versions the default
+was mistakenly dependent on the smtp_tls_security_level setting.
Though with "insecure" MX records an active attacker can
@@ -17879,6 +17878,8 @@
auto value (described below) was chosen.
This feature is not used as of Postfix 3.6. Do not specify. The available choices are: Example: Custom OpenSSL group settings. Caution: It is typically best to just use the default OpenSSL
+group settings, by setting "tls_config_file = none". Overly strict
+system-wide TLS settings will conflict with Postfix's opportunistic
+TLS, where being less restrictive is better than downgrading to
+cleartext SMTP. This feature is available in Postfix ≥ 3.9, 3.8.1, 3.7.6,
3.6.10, and 3.5.20. The prioritized list of elliptic curves supported by the Postfix
-SMTP client and server. These curves are used by the Postfix SMTP
-server when "smtpd_tls_eecdh_grade = auto". The selected curves
+SMTP client and server. The selected curves
must be implemented by OpenSSL and be standardized for use in TLS
(RFC 4492 or its imminent successor). It is unwise to list only
"bleeding-edge" curves supported by a small subset of clients. The
@@ -19218,6 +19257,14 @@
in the default value of this parameter, even though they'll only
be usable with later versions of OpenSSL. Post-quantum cryptography support: OpenSSL 3.5 introduces new
+configuration syntax that Postfix will not attempt to imitate.
+Instead, with Postfix 3.6.17, 3.7.13, 3.8.8, 3.9.2, and later, set
+both tls_eecdh_auto_curves and if available tls_ffdhe_auto_groups
+to the empty value, to enable algorithm selection through OpenSSL
+configuration. See tls_config_file for a configuration example.
+ This feature is available in Postfix 3.2 and later, when it is
compiled and linked with OpenSSL 1.0.2 or later on platforms where
EC algorithms have not been disabled by the vendor.
@@ -19010,6 +19011,45 @@
+
+main.cf:
+ tls_config_file = ${config_directory}/openssl.cnf
+ tls_config_name = postfix
+
+
+
+openssl.cnf:
+ postfix = postfix_settings
+
+
+
+ [postfix_settings]
+ ssl_conf = postfix_ssl_settings
+
+
+
+ [postfix_ssl_settings]
+ system_default = baseline_postfix_settings
+
+
+
+ [baseline_postfix_settings]
+ # New OpenSSL 3.5 syntax, for older releases consider
+ # the Postfix default:
+ #
+ # Groups = X25519:X448:prime256v1:secp384r1:secp521r1:ffdhe2048:ffdhe3072
+ #
+ Groups = *X25519MLKEM768 / *X25519:X448 / P-256:P-384
+
+
+
This feature is not used as of Postfix 3.6. Do not specify.
+The default "strong" curve is rated in NSA https://web.archive.org/web/20160330034144/https://www.nsa.gov/ia/programs/suiteb_cryptography/">Suite B for information classified up to SECRET.
@@ -19282,6 +19331,8 @@ "-list_curves" option) and be one of the curves listed in Section 5.1.1 of RFC 4492. You should not generally change this setting. +This feature is not used as of Postfix 3.6. Do not specify.
+This default "ultra" curve is rated in NSA https://web.archive.org/web/20160330034144/https://www.nsa.gov/ia/programs/suiteb_cryptography/">Suite B for information classified up to TOP SECRET.
@@ -20202,6 +20253,8 @@ elliptic-curve Diffie-Hellman (EECDH) key exchange. See smtpd_tls_eecdh_grade for further details. +This feature is not used as of Postfix 3.6. Do not specify.
+This feature is available in Postfix 2.8 and later.
diff -ur --new-file /var/tmp/postfix-3.6.16/html/smtp.8.html ./html/smtp.8.html --- /var/tmp/postfix-3.6.16/html/smtp.8.html 2023-06-05 10:41:20.000000000 -0400 +++ ./html/smtp.8.html 2025-02-16 17:24:46.000000000 -0500 @@ -644,7 +644,7 @@ Available in Postfix version 3.1 and later: - smtp_tls_dane_insecure_mx_policy (see 'postconf -d' output) + smtp_tls_dane_insecure_mx_policy (dane) The TLS policy for MX hosts with "secure" TLSA records when the nexthop destination security level is dane, but the MX record was found via an "insecure" MX lookup. diff -ur --new-file /var/tmp/postfix-3.6.16/man/man5/postconf.5 ./man/man5/postconf.5 --- /var/tmp/postfix-3.6.16/man/man5/postconf.5 2024-01-21 17:26:47.000000000 -0500 +++ ./man/man5/postconf.5 2025-02-16 15:00:34.000000000 -0500 @@ -8158,7 +8158,7 @@ TLS connection reuse" for background details. .PP This feature is available in Postfix 3.4 and later. -.SH smtp_tls_dane_insecure_mx_policy (default: see "postconf \-d" output) +.SH smtp_tls_dane_insecure_mx_policy (default: dane) The TLS policy for MX hosts with "secure" TLSA records when the nexthop destination security level is \fBdane\fR, but the MX record was found via an "insecure" MX lookup. The choices are: @@ -8179,10 +8179,9 @@ "Verified", because the MX host name could have been forged. .br .br -The default setting for Postfix >= 3.6 is "dane" with -"smtp_tls_security_level = dane", otherwise "may". This behavior -was backported to Postfix versions 3.5.9, 3.4.19, 3.3.16. 3.2.21. -With earlier Postfix versions the default setting was always "dane". +The default setting is "dane" as of Postfix versions 3.6.17, +3.7.13, 3.8.8, 3.9.2, and 3.10.0. With earlier versions the default +was mistakenly dependent on the smtp_tls_security_level setting. .PP Though with "insecure" MX records an active attacker can compromise SMTP transport security by returning forged MX records, @@ -12468,6 +12467,8 @@ this parameter is always ignored, and Postfix behaves as though the \fBauto\fR value (described below) was chosen. .PP +This feature is not used as of Postfix 3.6. Do not specify. +.PP The available choices are: .IP "\fBauto\fR" Use the most preferred curve that is @@ -13395,6 +13396,65 @@ .ft R .in -4 .PP +Example: Custom OpenSSL group settings. +.PP +.nf +.na +.ft C +main.cf: + tls_config_file = ${config_directory}/openssl.cnf + tls_config_name = postfix +.fi +.ad +.ft R +.PP +.nf +.na +.ft C +openssl.cnf: + postfix = postfix_settings +.fi +.ad +.ft R +.PP +.nf +.na +.ft C + [postfix_settings] + ssl_conf = postfix_ssl_settings +.fi +.ad +.ft R +.PP +.nf +.na +.ft C + [postfix_ssl_settings] + system_default = baseline_postfix_settings +.fi +.ad +.ft R +.PP +.nf +.na +.ft C + [baseline_postfix_settings] + # New OpenSSL 3.5 syntax, for older releases consider + # the Postfix default: + # + # Groups = X25519:X448:prime256v1:secp384r1:secp521r1:ffdhe2048:ffdhe3072 + # + Groups = *X25519MLKEM768 / *X25519:X448 / P\-256:P\-384 +.fi +.ad +.ft R +.PP +Caution: It is typically best to just use the default OpenSSL +group settings, by setting "tls_config_file = none". Overly strict +system\-wide TLS settings will conflict with Postfix's opportunistic +TLS, where being less restrictive is better than downgrading to +cleartext SMTP. +.PP This feature is available in Postfix >= 3.9, 3.8.1, 3.7.6, 3.6.10, and 3.5.20. .SH tls_config_name (default: empty) @@ -13556,8 +13616,7 @@ This feature is available in Postfix 2.8 and later. .SH tls_eecdh_auto_curves (default: see "postconf \-d" output) The prioritized list of elliptic curves supported by the Postfix -SMTP client and server. These curves are used by the Postfix SMTP -server when "smtpd_tls_eecdh_grade = auto". The selected curves +SMTP client and server. The selected curves must be implemented by OpenSSL and be standardized for use in TLS (RFC 4492 or its imminent successor). It is unwise to list only "bleeding\-edge" curves supported by a small subset of clients. The @@ -13572,6 +13631,13 @@ in the default value of this parameter, even though they'll only be usable with later versions of OpenSSL. .PP +Post\-quantum cryptography support: OpenSSL 3.5 introduces new +configuration syntax that Postfix will not attempt to imitate. +Instead, with Postfix 3.6.17, 3.7.13, 3.8.8, 3.9.2, and later, set +both tls_eecdh_auto_curves and if available tls_ffdhe_auto_groups +to the empty value, to enable algorithm selection through OpenSSL +configuration. See tls_config_file for a configuration example. +.PP This feature is available in Postfix 3.2 and later, when it is compiled and linked with OpenSSL 1.0.2 or later on platforms where EC algorithms have not been disabled by the vendor. @@ -13589,6 +13655,8 @@ is unwise to choose an "bleeding\-edge" curve supported by only a small subset of clients. .PP +This feature is not used as of Postfix 3.6. Do not specify. +.PP The default "strong" curve is rated in NSA Suite B for information classified up to SECRET. .PP @@ -13621,6 +13689,8 @@ "\-list_curves" option) and be one of the curves listed in Section 5.1.1 of RFC 4492. You should not generally change this setting. .PP +This feature is not used as of Postfix 3.6. Do not specify. +.PP This default "ultra" curve is rated in NSA Suite B for information classified up to TOP SECRET. .PP @@ -14233,6 +14303,8 @@ elliptic\-curve Diffie\-Hellman (EECDH) key exchange. See smtpd_tls_eecdh_grade for further details. .PP +This feature is not used as of Postfix 3.6. Do not specify. +.PP This feature is available in Postfix 2.8 and later. .SH tlsproxy_tls_exclude_ciphers (default: $smtpd_tls_exclude_ciphers) List of ciphers or cipher types to exclude from the \fBtlsproxy\fR(8) diff -ur --new-file /var/tmp/postfix-3.6.16/man/man8/smtp.8 ./man/man8/smtp.8 --- /var/tmp/postfix-3.6.16/man/man8/smtp.8 2023-06-05 10:32:57.000000000 -0400 +++ ./man/man8/smtp.8 2025-02-10 19:51:41.000000000 -0500 @@ -584,7 +584,7 @@ legacy SMTPS protocol instead of using the STARTTLS command. .PP Available in Postfix version 3.1 and later: -.IP "\fBsmtp_tls_dane_insecure_mx_policy (see 'postconf -d' output)\fR" +.IP "\fBsmtp_tls_dane_insecure_mx_policy (dane)\fR" The TLS policy for MX hosts with "secure" TLSA records when the nexthop destination security level is \fBdane\fR, but the MX record was found via an "insecure" MX lookup. diff -ur --new-file /var/tmp/postfix-3.6.16/proto/postconf.proto ./proto/postconf.proto --- /var/tmp/postfix-3.6.16/proto/postconf.proto 2024-01-21 16:21:46.000000000 -0500 +++ ./proto/postconf.proto 2025-02-16 14:59:07.000000000 -0500 @@ -12892,8 +12892,7 @@ %PARAM tls_eecdh_auto_curves see "postconf -d" outputThe prioritized list of elliptic curves supported by the Postfix -SMTP client and server. These curves are used by the Postfix SMTP -server when "smtpd_tls_eecdh_grade = auto". The selected curves +SMTP client and server. The selected curves must be implemented by OpenSSL and be standardized for use in TLS (RFC 4492 or its imminent successor). It is unwise to list only "bleeding-edge" curves supported by a small subset of clients. The @@ -12908,6 +12907,14 @@ in the default value of this parameter, even though they'll only be usable with later versions of OpenSSL.
+Post-quantum cryptography support: OpenSSL 3.5 introduces new +configuration syntax that Postfix will not attempt to imitate. +Instead, with Postfix 3.6.17, 3.7.13, 3.8.8, 3.9.2, and later, set +both tls_eecdh_auto_curves and if available tls_ffdhe_auto_groups +to the empty value, to enable algorithm selection through OpenSSL +configuration. See tls_config_file for a configuration example. +
+This feature is available in Postfix 3.2 and later, when it is compiled and linked with OpenSSL 1.0.2 or later on platforms where EC algorithms have not been disabled by the vendor.
@@ -12927,6 +12934,8 @@ is unwise to choose an "bleeding-edge" curve supported by only a small subset of clients. +This feature is not used as of Postfix 3.6. Do not specify.
+The default "strong" curve is rated in NSA Suite B for information classified up to SECRET.
@@ -12964,6 +12973,8 @@ "-list_curves" option) and be one of the curves listed in Section 5.1.1 of RFC 4492. You should not generally change this setting. +This feature is not used as of Postfix 3.6. Do not specify.
+This default "ultra" curve is rated in NSA Suite B for information classified up to TOP SECRET.
@@ -12990,6 +13001,8 @@ auto value (described below) was chosen. +This feature is not used as of Postfix 3.6. Do not specify.
+The available choices are:
This feature is not used as of Postfix 3.6. Do not specify.
+This feature is available in Postfix 2.8 and later.
%PARAM tlsproxy_tls_exclude_ciphers $smtpd_tls_exclude_ciphers @@ -16969,7 +16984,7 @@ This feature is available in Postfix 3.1 and later. -%PARAM smtp_tls_dane_insecure_mx_policy see "postconf -d" output +%PARAM smtp_tls_dane_insecure_mx_policy daneThe TLS policy for MX hosts with "secure" TLSA records when the nexthop destination security level is dane, but the MX @@ -16993,10 +17008,9 @@ "Verified", because the MX host name could have been forged.
The default setting for Postfix ≥ 3.6 is "dane" with -"smtp_tls_security_level = dane", otherwise "may". This behavior -was backported to Postfix versions 3.5.9, 3.4.19, 3.3.16. 3.2.21. -With earlier Postfix versions the default setting was always "dane". +
The default setting is "dane" as of Postfix versions 3.6.17, +3.7.13, 3.8.8, 3.9.2, and 3.10.0. With earlier versions the default +was mistakenly dependent on the smtp_tls_security_level setting.
Though with "insecure" MX records an active attacker can @@ -18158,6 +18172,45 @@ +
Example: Custom OpenSSL group settings.
+ ++main.cf: + tls_config_file = ${config_directory}/openssl.cnf + tls_config_name = postfix ++ +
+openssl.cnf: + postfix = postfix_settings ++ +
+ [postfix_settings] + ssl_conf = postfix_ssl_settings ++ +
+ [postfix_ssl_settings] + system_default = baseline_postfix_settings ++ +
+ [baseline_postfix_settings] + # New OpenSSL 3.5 syntax, for older releases consider + # the Postfix default: + # + # Groups = X25519:X448:prime256v1:secp384r1:secp521r1:ffdhe2048:ffdhe3072 + # + Groups = *X25519MLKEM768 / *X25519:X448 / P-256:P-384 ++ +
Caution: It is typically best to just use the default OpenSSL +group settings, by setting "tls_config_file = none". Overly strict +system-wide TLS settings will conflict with Postfix's opportunistic +TLS, where being less restrictive is better than downgrading to +cleartext SMTP.
+This feature is available in Postfix ≥ 3.9, 3.8.1, 3.7.6, 3.6.10, and 3.5.20.
diff -ur --new-file /var/tmp/postfix-3.6.16/src/bounce/bounce_notify_util.c ./src/bounce/bounce_notify_util.c --- /var/tmp/postfix-3.6.16/src/bounce/bounce_notify_util.c 2020-12-12 18:33:21.000000000 -0500 +++ ./src/bounce/bounce_notify_util.c 2025-02-07 17:11:45.000000000 -0500 @@ -356,7 +356,8 @@ quote_822_local_flags(bounce_info->sender, VSTRING_LEN(bounce_info->buf) ? STR(bounce_info->buf) : - mail_addr_mail_daemon(), 0); + mail_addr_mail_daemon(), + QUOTE_FLAG_8BITCLEAN); } /* diff -ur --new-file /var/tmp/postfix-3.6.16/src/cleanup/cleanup_message.c ./src/cleanup/cleanup_message.c --- /var/tmp/postfix-3.6.16/src/cleanup/cleanup_message.c 2024-12-04 15:17:21.000000000 -0500 +++ ./src/cleanup/cleanup_message.c 2025-02-07 17:11:45.000000000 -0500 @@ -780,7 +780,7 @@ } if (token) { tok822_externalize(state->temp2, token, TOK822_STR_NONE); - tok822_free(token); + tok822_free_tree(token); vstring_strcat(state->temp2, " "); } vstring_sprintf_append(state->temp2, "<%s>", diff -ur --new-file /var/tmp/postfix-3.6.16/src/global/dict_mysql.c ./src/global/dict_mysql.c --- /var/tmp/postfix-3.6.16/src/global/dict_mysql.c 2023-04-18 15:38:40.000000000 -0400 +++ ./src/global/dict_mysql.c 2025-02-07 17:11:45.000000000 -0500 @@ -798,6 +798,9 @@ msg_info("%s: %s: no hostnames specified, defaulting to '%s'", myname, mysqlcf, dict_mysql->hosts->argv[0]); } + /* Don't blacklist the load balancer! */ + if (dict_mysql->hosts->argc == 1) + argv_add(dict_mysql->hosts, dict_mysql->hosts->argv[0], (char *) 0); myfree(hosts); } diff -ur --new-file /var/tmp/postfix-3.6.16/src/global/dict_pgsql.c ./src/global/dict_pgsql.c --- /var/tmp/postfix-3.6.16/src/global/dict_pgsql.c 2018-08-27 17:54:59.000000000 -0400 +++ ./src/global/dict_pgsql.c 2025-02-07 17:11:45.000000000 -0500 @@ -776,6 +776,9 @@ msg_info("%s: %s: no hostnames specified, defaulting to '%s'", myname, pgsqlcf, dict_pgsql->hosts->argv[0]); } + /* Don't blacklist the load balancer! */ + if (dict_pgsql->hosts->argc == 1) + argv_add(dict_pgsql->hosts, dict_pgsql->hosts->argv[0], (char *) 0); myfree(hosts); } diff -ur --new-file /var/tmp/postfix-3.6.16/src/global/mail_params.h ./src/global/mail_params.h --- /var/tmp/postfix-3.6.16/src/global/mail_params.h 2024-01-19 13:29:37.000000000 -0500 +++ ./src/global/mail_params.h 2025-02-10 19:25:47.000000000 -0500 @@ -1644,7 +1644,7 @@ /* SMTP only */ #define VAR_SMTP_TLS_INSECURE_MX_POLICY "smtp_tls_dane_insecure_mx_policy" -#define DEF_SMTP_TLS_INSECURE_MX_POLICY "${{$smtp_tls_security_level} == {dane} ? {dane} : {may}}" +#define DEF_SMTP_TLS_INSECURE_MX_POLICY "dane" extern char *var_smtp_tls_insecure_mx_policy; /* diff -ur --new-file /var/tmp/postfix-3.6.16/src/global/smtputf8.h ./src/global/smtputf8.h --- /var/tmp/postfix-3.6.16/src/global/smtputf8.h 2017-02-18 20:58:20.000000000 -0500 +++ ./src/global/smtputf8.h 2025-02-10 19:25:47.000000000 -0500 @@ -99,6 +99,11 @@ #define SMTPUTF8_FLAG_SENDER (1<<2) /* queue file/delivery/bounce request */ #define SMTPUTF8_FLAG_RECIPIENT (1<<3) /* delivery request only */ +#define SMTPUTF8_FLAG_ALL (SMTPUTF8_FLAG_REQUESTED \ + | SMTPUTF8_FLAG_HEADER \ + | SMTPUTF8_FLAG_SENDER \ + | SMTPUTF8_FLAG_RECIPIENT) + /* LICENSE /* .ad /* .fi diff -ur --new-file /var/tmp/postfix-3.6.16/src/oqmgr/Makefile.in ./src/oqmgr/Makefile.in --- /var/tmp/postfix-3.6.16/src/oqmgr/Makefile.in 2021-04-18 16:45:07.000000000 -0400 +++ ./src/oqmgr/Makefile.in 2025-02-12 19:41:29.000000000 -0500 @@ -285,6 +285,7 @@ qmgr_message.o: ../../include/rewrite_clnt.h qmgr_message.o: ../../include/scan_dir.h qmgr_message.o: ../../include/sent.h +qmgr_message.o: ../../include/smtputf8.h qmgr_message.o: ../../include/split_addr.h qmgr_message.o: ../../include/split_at.h qmgr_message.o: ../../include/stringops.h diff -ur --new-file /var/tmp/postfix-3.6.16/src/oqmgr/qmgr_message.c ./src/oqmgr/qmgr_message.c --- /var/tmp/postfix-3.6.16/src/oqmgr/qmgr_message.c 2020-02-02 10:41:38.000000000 -0500 +++ ./src/oqmgr/qmgr_message.c 2025-02-12 19:36:14.000000000 -0500 @@ -137,6 +137,7 @@ #include