From a98bc4ee9bf33e3764d5ecec0309ee14d10de4ba Mon Sep 17 00:00:00 2001
From: Wietse Z Venema
Date: Tue, 7 Jan 2025 00:00:00 -0500
Subject: [PATCH] postfix-3.10-20250107
---
postfix/HISTORY | 53 ++++++++++++++++++++++++----
postfix/RELEASE_NOTES | 28 ++++++++++++++-
postfix/WISHLIST | 8 +++--
postfix/html/postconf.5.html | 25 ++++++++++---
postfix/html/socketmap_table.5.html | 31 ++++++++++++----
postfix/man/man5/postconf.5 | 19 +++++++---
postfix/man/man5/socketmap_table.5 | 37 ++++++++++++++++---
postfix/mantools/postlink | 1 +
postfix/proto/postconf.proto | 21 ++++++++---
postfix/proto/socketmap_table | 33 ++++++++++++++---
postfix/proto/stop.double-history | 2 ++
postfix/proto/stop.spell-history | 1 +
postfix/src/cleanup/cleanup_milter.c | 7 ++--
postfix/src/global/Makefile.in | 1 +
postfix/src/global/mail_params.c | 4 +++
postfix/src/global/mail_params.h | 7 ++++
postfix/src/global/mail_version.h | 2 +-
postfix/src/milter/milter8.c | 30 ++++++++++------
postfix/src/milter/test-milter.c | 25 +++++++++++--
postfix/src/smtpd/smtpd.c | 11 ++++--
postfix/src/util/dict_sockmap.c | 2 +-
postfix/src/util/dict_sockmap.h | 1 +
postfix/src/util/netstring.c | 10 ++++++
23 files changed, 305 insertions(+), 54 deletions(-)
diff --git a/postfix/HISTORY b/postfix/HISTORY
index 8a8d3cf51..c57b542c8 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -28723,19 +28723,60 @@ Apologies for any names omitted.
to use SMTPUTF8, and therefore can avoid incompatibility
with sites that do not support SMTPUTF8.
+ The encoded result looks like "=?charset?Q?gibberish?=" for
+ quoted-printable encoding, or "=?charset?B?gibberish?=" for
+ base64 encoding. Postfix uses quoted-printable for a full
+ name that is short or mostly ASCII, and uses base64 otherwise.
+
The new parameter "full_name_encoding_charset" (default:
"utf-8") specifies the character set of the full name in
the Postfix sendmail "-F" option, in the Postfix sendmail
"NAME" environment variable, or in the GECOS field of the
- UNIX password database.
-
- The encoded result looks like "=?charset?Q?gibberish?= for
- quoted-printable encoding, or "=?charset?B?gibberish?= for
- base64 encoding. Postfix uses quoted-printable for a full
- name that is short or mostly ASCII, and uses base64 otherwise.
+ UNIX password database. The parameter value is also part
+ of the encoded full name, and informs a Mail User Agent how
+ to display the decoded gibberish.
Files: mantools/postlink, proto/postconf.proto, cleanup/cleanup.c,
cleanup/cleanup_init.c, cleanup/cleanup_message.c,
global/ascii_header_text.c, global/ascii_header_text.h,
global/mail_params.h, global/rfc2047_code.c, global/rfc2047_code.h,
util/clean_ascii_cntrl_space.c, util/clean_ascii_cntrl_space.h.
+
+20250106
+
+ Cleanup: the Postfix Milter implementation now logs the
+ reason for a quarantine request. If a quarantine action is
+ requested by a Milter application, Postfix will log the
+ reason given by the application. If the quarantine action
+ is requested with the "milter_default_action" parameter
+ setting or with a per-Milter "default_action" property,
+ Postfix will log "default_action". Files: smtpd/smtp_milter.c,
+ cleanup/cleanup_milter.c, milter/milter8.c, milter/test-milter.c.
+
+ Cleanup: suppress repeated logging of a Milter "quarantine",
+ "discard", or "shutdown" request. Files: cleanup/cleanup_milter.c,
+ smtpd/smtpd.c.
+
+ Documentation: cleanup_replace_stray_cr_lf is disabled
+ with "receive_override_options = no_header_body_checks".
+ File: proto/postconf.proto.
+
+20250107
+
+ Re-worded the documentation for RFC 2047 full name encoding.
+ Files: HISTORY, RELEASE_NOTES, proto/postconf.proto.
+
+ Cleanup: eliminated a bogus warning "unexpected SMFIC_UNKNOWN
+ response" when a Milter default action is "quarantine", the
+ milter is unavailable, and a remote SMTP client sends a
+ command that is unknown or known-but-disabled. File:
+ smtpd/smtpd.c.
+
+ Cleanup: the maximum netstring reply size is now configurable
+ with the socketmap_max_reply_size configuration parameter.
+ Code by Christian Roessner. Files: util/dict_sockmap.[hc],
+ global/mail_params.[hc], proto/postconf.proto,
+ proto/socketmap_table.
+
+ Cleanup: the netstring client sets or clears errno to improve
+ error messages from its callers. File: util/netstring.c.
diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES
index 0a09f458c..9316a4acf 100644
--- a/postfix/RELEASE_NOTES
+++ b/postfix/RELEASE_NOTES
@@ -26,6 +26,26 @@ now also distributed with the more recent Eclipse Public License
license of their choice. Those who are more comfortable with the
IPL can continue with that license.
+[Incompat 20250106]
+
+The logging of the Milter 'quarantine' action has changed. Instead
+of logging "milter triggers HOLD action", it logs the reason given
+by a Milter application, or "default_action" if a Milter application
+was unavailable and the milter_default_action parameter or Milter
+"default_action" property specifies "quarantine".
+
+[Feature 20250106]
+
+The Postfix Milter implementation now logs the reason for a
+'quarantine' action, instead of "milter triggers HOLD action".
+
+- If the quarantine action was requested by a Milter application,
+ Postfix will log the reason given by the application.
+
+- If the quarantine action was requested with the "milter_default_action"
+ parameter setting or with a Milter "default_action" property,
+ Postfix will log "default_action".
+
[Feature 20250105]
Support for automatic RFC 2047 encoding of non-ASCII "full name"
@@ -33,6 +53,11 @@ information in Postfix-generated From: message headers. Encoding
non-ASCII full names can avoid the need to use SMTPUTF8, and therefore
can avoid incompatibility with sites that do not support SMTPUTF8.
+The encoded result looks like "=?charset?Q?gibberish?=: for
+quoted-printable encoding, or "=?charset?B?gibberish?=" for base64
+encoding. Postfix uses quoted-printable for a full name that is
+short or mostly ASCII, and uses base64 otherwise.
+
Background: when a message without a From: header is submitted with the
Postfix sendmail(1) command, Postfix will add a From: header and will
try to use the sender's full name specified with the Postfix sendmail(1)
@@ -43,7 +68,8 @@ This introduces a new configuration parameter "full_name_encoding_charset"
(default: utf8) which specifies the character set of the full name
information in the Postfix sendmail(1) "-F" option or "NAME"
environment variable, or in the GECOS field in the UNIX password
-database.
+database. The parameter value is also part of the encoded full name,
+and informs a Mail User Agent how to display the decoded gibberish.
[Incompat 20250105]
diff --git a/postfix/WISHLIST b/postfix/WISHLIST
index ec31c7bea..64e2ad51f 100644
--- a/postfix/WISHLIST
+++ b/postfix/WISHLIST
@@ -2,7 +2,8 @@ Wish list:
Things to do before the stable release:
- Make the spawn_command fix conditional on compatibility_level.
+ For the stable releases, make the spawn_command fix conditional
+ on compatibility_level.
make pre-release-check, HTML validator check.
@@ -18,7 +19,10 @@ Wish list:
relay_recipient_maps empty should default to 'no valid
recipients'. Subject to compatibility level.
- Make a reason available for messages placed on 'hold'.
+ The Milter 'quarantine' action should be reported with a
+ call-back function, instead of setting the Milter default
+ reply. However, we still need the existing 'reply' based
+ channel to support "milter_default_action = quarantine".
In pipe_command() and spawn_command(), the child process
should call initgroups() to corrrectly the access rights
diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html
index 679f04df1..b673b46c4 100644
--- a/postfix/html/postconf.5.html
+++ b/postfix/html/postconf.5.html
@@ -1520,6 +1520,9 @@ signature validation by later mail system will not depend on how
that mail system handles those stray characters in an
implementation-dependent manner.
+ Note: this feature is disabled with "receive_override_options =
+no_header_body_checks".
+
This feature is available in Postfix ≥ 3.9, 3.8.5, 3.7.10,
3.6.14, and 3.5.24.
@@ -3963,10 +3966,13 @@ in the UNIX password database. In the latter case, Postfix will
replace the "&" character with the login name, with a lowercase
ASCII first character converted to uppercase.
- NOTE: Postfix does not convert between character sets; it simply
-encodes the raw bytes in a full name as printable ASCII gibberish.
-The full_name_encoding_charset value specifies how a mail reader
-program should display the decoded gibberish.
+ NOTE: Postfix does not convert between character sets. The
+full_name_encoding_charset parameter specifies the character set
+of the full name in the Postfix sendmail "-F" option, in the Postfix
+sendmail "NAME" environment variable, or in the GECOS field of the
+UNIX password database. The parameter value is also part of the
+encoded full name, and informs a Mail User Agent how to display the
+decoded gibberish.
Specify a valid character set name such as "utf-8" or "iso-8859-1
(specify the latter for full names that use the Latin1 encoding).
@@ -19602,6 +19608,17 @@ built to support these protocols.
This feature is available in Postfix 3.0 and later.
+
+
+socketmap_max_reply_size
+(default: 100000)
+
+ The maximum allowed reply size from a socketmap server, not
+including the netstring encapsulation.
+
+ This feature is available in Postfix ≥ 3.10.
+
+
soft_bounce
diff --git a/postfix/html/socketmap_table.5.html b/postfix/html/socketmap_table.5.html
index ef5115d2b..ecc1156e9 100644
--- a/postfix/html/socketmap_table.5.html
+++ b/postfix/html/socketmap_table.5.html
@@ -45,9 +45,7 @@ SOCKETMAP_TABLE(5) SOCKETMAP_TABLE(5)
cidr:, pcre:, and regexp: tables.
REPLY FORMAT
- The Postfix socketmap client requires that replies are not longer than
- 100000 characters (not including the netstring encapsulation). Replies
- must have the following form:
+ Replies must have the following form:
OK <space> data
The requested data was found.
@@ -63,9 +61,25 @@ SOCKETMAP_TABLE(5) SOCKETMAP_TABLE(5)
The request failed. The reason, if non-empty, is descriptive
text.
+PROTOCOL LIMITS
+ The Postfix socketmap client requires that replies are no longer than
+ 100000 bytes (not including the netstring encapsulation). This limit
+ can be changed with the socketmap_max_reply_size configuration parame-
+ ter (Postfix 3.10 and later).
+
+ The Postfix socketmap client enforces a 100s time limit to connect to a
+ socketmap server, to send a request, and to receive a reply. It closes
+ an idle connection after 10s, and closes an active connection after
+ 100s. These limits are not (yet) configurable.
+
SECURITY
- This map cannot be used for security-sensitive information,
- because neither the connection nor the server are authenticated.
+ This map cannot be used for security-sensitive information, because
+ neither the connection nor the server are authenticated.
+
+CONFIGURATION PARAMETERS
+ socketmap_max_reply_size (100000)
+ The maximum allowed reply size from a socketmap server, not
+ including the netstring encapsulation.
SEE ALSO
https://cr.yp.to/proto/netstrings.txt, netstring definition
@@ -79,7 +93,7 @@ SOCKETMAP_TABLE(5) SOCKETMAP_TABLE(5)
DATABASE_README, Postfix lookup table overview
BUGS
- The protocol limits are not yet configurable.
+ The protocol time limits are not yet configurable.
LICENSE
The Secure Mailer license must be distributed with this software.
@@ -87,6 +101,8 @@ SOCKETMAP_TABLE(5) SOCKETMAP_TABLE(5)
HISTORY
Socketmap support was introduced with Postfix version 2.10.
+ The socketmap protocol was published with Sendmail v8.13.
+
AUTHOR(S)
Wietse Venema
IBM T.J. Watson Research
@@ -98,5 +114,8 @@ SOCKETMAP_TABLE(5) SOCKETMAP_TABLE(5)
111 8th Avenue
New York, NY 10011, USA
+ Wietse Venema
+ porcupine.org
+
SOCKETMAP_TABLE(5)