From 8212a7a0faa51c2969f3beecc221df5aef433ce5 Mon Sep 17 00:00:00 2001
From: Wietse Venema
Date: Sat, 9 Jan 2021 00:00:00 -0500
Subject: [PATCH] postfix-3.6-20210109
---
postfix/HISTORY | 29 ++
postfix/README_FILES/COMPATIBILITY_README | 16 +-
postfix/README_FILES/TLS_README | 6 +-
postfix/RELEASE_NOTES | 14 +
postfix/US_PATENT_6321267 | 5 +
postfix/WISHLIST | 3 +
postfix/html/COMPATIBILITY_README.html | 15 +-
postfix/html/TLS_README.html | 4 +-
postfix/html/postalias.1.html | 17 +-
postfix/html/postconf.5.html | 25 +-
postfix/html/postmap.1.html | 17 +-
postfix/man/man1/postalias.1 | 15 +-
postfix/man/man1/postmap.1 | 15 +-
postfix/man/man5/postconf.5 | 25 +-
postfix/proto/COMPATIBILITY_README.html | 15 +-
postfix/proto/TLS_README.html | 4 +-
postfix/proto/postconf.proto | 25 +-
postfix/src/global/Makefile.in | 38 +-
postfix/src/global/compat_level.c | 457 ++++++++++++++++++++
postfix/src/global/compat_level.h | 43 ++
postfix/src/global/compat_level_convert.in | 22 +
postfix/src/global/compat_level_convert.ref | 29 ++
postfix/src/global/compat_level_expand.in | 27 ++
postfix/src/global/compat_level_expand.ref | 55 +++
postfix/src/global/mail_params.c | 28 +-
postfix/src/global/mail_params.h | 33 +-
postfix/src/global/mail_version.h | 2 +-
postfix/src/master/Makefile.in | 1 +
postfix/src/master/master_ent.c | 5 +-
postfix/src/postalias/postalias.c | 15 +-
postfix/src/postconf/Makefile.in | 1 +
postfix/src/postconf/postconf.c | 6 +
postfix/src/postfix/Makefile.in | 1 +
postfix/src/postfix/postfix.c | 7 +-
postfix/src/postmap/postmap.c | 15 +-
postfix/src/util/Makefile.in | 3 +
postfix/src/util/alldig.c | 25 ++
postfix/src/util/mac_expand.c | 199 ++++++++-
postfix/src/util/mac_expand.h | 26 ++
postfix/src/util/mac_expand.in | 18 +
postfix/src/util/mac_expand.ref | 35 ++
postfix/src/util/stringops.h | 1 +
42 files changed, 1235 insertions(+), 107 deletions(-)
create mode 100644 postfix/src/global/compat_level.c
create mode 100644 postfix/src/global/compat_level.h
create mode 100644 postfix/src/global/compat_level_convert.in
create mode 100644 postfix/src/global/compat_level_convert.ref
create mode 100644 postfix/src/global/compat_level_expand.in
create mode 100644 postfix/src/global/compat_level_expand.ref
diff --git a/postfix/HISTORY b/postfix/HISTORY
index 1edb0d0e9..1d5d5d479 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -25315,3 +25315,32 @@ Apologies for any names omitted.
Thienemann. See RELEASE_NOTES for caveats. Files:
proto/postconf.proto, bounce/bounce_notify_tester.c, many
test data files to exercise corner cases.
+
+20201220
+
+ Infrastructure: support to add custom comparison operators
+ for Postfix configuration files. This will be used to implement
+ custom comparison operators for compatibility_level values
+ that contain both the Postfix major and minor version and
+ maybe patchlevel. Files: util/alldig.c, util/stringops.h,
+ util/mac_expand.[hc] and test files.
+
+20210102
+
+ Infrastructure: support for the <=level, = 3.6 and the ccoommppaattiibbiilliittyy__lleevveell set to 3 or
-higher. With Postfix <= 3.5, the default algorithm is mmdd55. The best-practice
+algorithm is sshhaa225566 with Postfix >= 3.6 and the ccoommppaattiibbiilliittyy__lleevveell set to 3.6
+or higher. With Postfix <= 3.5, the default algorithm is mmdd55. The best-practice
algorithm is now sshhaa225566. Recent advances in hash function cryptanalysis have
led to md5 and sha1 being deprecated in favor of sha256. However, as long as
there are no known "second pre-image" attacks against the older algorithms,
@@ -1122,7 +1122,7 @@ or multiple match attributes can be employed. The ":" character is not used as
a delimiter as it occurs between each pair of fingerprint (hexadecimal) digits.
The default algorithm is sshhaa225566 with Postfix >= 3.6 and the ccoommppaattiibbiilliittyy__lleevveell
-set to 3 or higher; with Postfix <= 3.5, the default algorithm is mmdd55. The
+set to 3.6 or higher; with Postfix <= 3.5, the default algorithm is mmdd55. The
best-practice algorithm is now sshhaa225566. Recent advances in hash function
cryptanalysis have led to md5 and sha1 being deprecated in favor of sha256.
However, as long as there are no known "second pre-image" attacks against the
diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES
index 606df671f..71e75f0ff 100644
--- a/postfix/RELEASE_NOTES
+++ b/postfix/RELEASE_NOTES
@@ -25,6 +25,20 @@ more recent Eclipse Public License 2.0. Recipients can choose to take
the software under the license of their choice. Those who are more
comfortable with the IPL can continue with that license.
+Major changes with snapshot 20220109
+====================================
+
+Starting with Postfix version 3.6, the "latest" compatibility level
+is the Postfix version that introduced the last incompatible change.
+The level is formatted as 'major.minor.patch', where 'patch' is
+usually omitted and defaults to zero. Earlier compatibility levels
+are 0, 1 and 2.
+
+This also introduces support for the <=level,
As long as the smtpd_tls_fingerprint_digest parameter is left at its
implicit default value, and the compatibility_level setting is less than
-3, Postfix logs a warning each time a client certificate or public key
+3.6, Postfix logs a warning each time a client certificate or public key
fingerprint is (potentially) used for access control:
@@ -437,7 +437,7 @@ the expected server certificates or public keys.
As long as the smtp_tls_fingerprint_digest (or LMTP equivalent)
parameter is left at its implicit default value, and the
-compatibility_level setting is less than 3, Postfix logs a warning each
+compatibility_level setting is less than 3.6, Postfix logs a warning each
time the "fingerprint" security level is used to specify matching "md5"
digests of trusted server certificates or public keys:
@@ -485,6 +485,17 @@ warning: To disable backwards compatibility use "postconf compatibility_level = 9999" at their own risk.
+ Starting with Postfix version 3.6, the compatibility level in
+the above warning message is the Postfix version that introduced
+the last incompatible change. The level is formatted as
+major.minor.patch, where patch is usually omitted and
+defaults to zero. Earlier compatibility levels are 0, 1 and 2.
+
+ NOTE: this also introduces support for the "<level",
+"<=level", and other operators to compare compatibility levels.
+With the standard operators "<", "<=", etc., compatibility
+level "3.10" would be smaller than "3.9" which is undesirable.
+