diff --git a/postfix/HISTORY b/postfix/HISTORY
index 91f24ead4..ec424051e 100644
--- a/postfix/HISTORY
+++ b/postfix/HISTORY
@@ -28637,3 +28637,66 @@ Apologies for any names omitted.
datagram-based spawn(8) service. It was too difficult to
enforce that processes terminate as expected after "postfix
reload" etc. File: spawn/spawn.c.
+
+20241205
+
+ Portability: include
Postfix 2.6 ignores the optional ESMTP parameters in +
Postfix 3.3 and later support the ESMTP parameters RET and +ENVID in requests to replace the envelope sender (SMFIR_CHGFROM). +Postfix logs a warning message when a Milter application supplies +other ESMTP parameters:
+ ++warning: queue-id: cleanup_chg_from: ignoring bad ESMTP + parameter "whatever" in SMFI_CHGFROM request ++ +
Postfix 3.0 and later support the ESMTP parameters NOTIFY +and ORCPT in requests to add an envelope recipient. Postfix logs a +warning message when a Milter application supplies other ESMTP +parameters:
+ ++warning: queue-id: cleanup_add_rcpt: ignoring ESMTP argument + from Milter or header/body_checks: "whatever" ++ +
Postfix 2.6 and later ignore optional ESMTP parameters in requests to replace the sender (SMFIR_CHGFROM) or to append a recipient (SMFIR_ADDRCPT_PAR). Postfix logs a warning message when a Milter application supplies such ESMTP parameters:
diff --git a/postfix/html/makedefs.1.html b/postfix/html/makedefs.1.html index b2bc7193f..e312a6ba5 100644 --- a/postfix/html/makedefs.1.html +++ b/postfix/html/makedefs.1.html @@ -47,6 +47,9 @@ MAKEDEFS(1) MAKEDEFS(1) non-default include directory. The following directives are special: + -DNO_CLOSEFROM + Do not use the system closefom() implementation. + -DNO_DB Do not build with Berkeley DB support. diff --git a/postfix/html/postconf.5.html b/postfix/html/postconf.5.html index 6672ade3c..4720204bd 100644 --- a/postfix/html/postconf.5.html +++ b/postfix/html/postconf.5.html @@ -21430,7 +21430,7 @@ cache information. Since the cache is shared with smtpd(8 by tlsmgr(8), there is only one expiration time for the SMTP server cache shared by all three services, namely smtpd_tls_session_cache_timeout. -This feature is available in Postfix 2.8 and later.
+This feature is available in Postfix 2.8-2.10.
diff --git a/postfix/html/postlog.1.html b/postfix/html/postlog.1.html index 23f9d69ae..a2f25860c 100644 --- a/postfix/html/postlog.1.html +++ b/postfix/html/postlog.1.html @@ -21,9 +21,9 @@ POSTLOG(1) POSTLOG(1) record. If no text is specified on the command line, postlog(1) reads from standard input and logs each input line as one record. - By default, logging is sent to syslogd(8) or postlogd(8); when the - standard error stream is connected to a terminal, logging is sent there - as well. + Logging is sent to syslogd(8) or postlogd(8), and to the standard error + stream (with Postfix < 3.8, postlog(1) writes to the standard error + stream only if that stream is connected to a terminal). The following options are implemented: diff --git a/postfix/makedefs b/postfix/makedefs index a048d09ce..9bd730281 100644 --- a/postfix/makedefs +++ b/postfix/makedefs @@ -46,6 +46,8 @@ # \fIinclude\fR directory. # The following directives are special: # .RS +# .IP \fB-DNO_CLOSEFROM\fR +# Do not use the system closefom() implementation. # .IP \fB-DNO_DB\fR # Do not build with Berkeley DB support. # .IP \fB-DNO_DEVPOLL\fR @@ -240,8 +242,6 @@ case $# in # Officially supported usage. 0) SYSTEM=`(uname -s) 2>/dev/null` RELEASE=`(uname -r) 2>/dev/null` - # No ${x%%y} support in Solaris 11 /bin/sh - RELEASE_MAJOR=`expr "$RELEASE" : '\([0-9]*\)'` || exit 1 VERSION=`(uname -v) 2>/dev/null` case "$VERSION" in dcosx*) SYSTEM=$VERSION;; @@ -251,6 +251,9 @@ case $# in *) echo usage: $0 [system release] 1>&2; exit 1;; esac +# No ${x%%y} support in Solaris 11 /bin/sh +RELEASE_MAJOR=`echo "$RELEASE" | sed 's/[^0-9].*//'` || exit 1 + case "$SYSTEM.$RELEASE" in SCO_SV.3.2) SYSTYPE=SCO5 # Use the native compiler by default diff --git a/postfix/man/man1/makedefs.1 b/postfix/man/man1/makedefs.1 index 1f3f452d3..52b5daea9 100644 --- a/postfix/man/man1/makedefs.1 +++ b/postfix/man/man1/makedefs.1 @@ -49,6 +49,8 @@ Specifies non\-default compiler arguments, for example, a non\-default \fIinclude\fR directory. The following directives are special: .RS +.IP \fB\-DNO_CLOSEFROM\fR +Do not use the system closefom() implementation. .IP \fB\-DNO_DB\fR Do not build with Berkeley DB support. .IP \fB\-DNO_DEVPOLL\fR diff --git a/postfix/man/man1/postlog.1 b/postfix/man/man1/postlog.1 index d9723e7c4..a8c70b8ef 100644 --- a/postfix/man/man1/postlog.1 +++ b/postfix/man/man1/postlog.1 @@ -23,10 +23,10 @@ line as one record. If no \fItext\fR is specified on the command line, \fBpostlog\fR(1) reads from standard input and logs each input line as one record. -By default, logging is sent to \fBsyslogd\fR(8) or -\fBpostlogd\fR(8); when the -standard error stream is connected to a terminal, logging -is sent there as well. +Logging is sent to \fBsyslogd\fR(8) or \fBpostlogd\fR(8), and +to the standard error stream (with Postfix < 3.8, \fBpostlog\fR(1) +writes to the standard error stream only if that stream is +connected to a terminal). The following options are implemented: .IP "\fB\-c \fIconfig_dir\fR" diff --git a/postfix/man/man5/postconf.5 b/postfix/man/man5/postconf.5 index a4463da00..2ad4c4d39 100644 --- a/postfix/man/man5/postconf.5 +++ b/postfix/man/man5/postconf.5 @@ -14855,7 +14855,7 @@ cache information. Since the cache is shared with \fBsmtpd\fR(8) and managed by \fBtlsmgr\fR(8), there is only one expiration time for the SMTP server cache shared by all three services, namely smtpd_tls_session_cache_timeout. .PP -This feature is available in Postfix 2.8 and later. +This feature is available in Postfix 2.8\-2.10. .SH tlsproxy_use_tls (default: $smtpd_use_tls) Opportunistic TLS: announce STARTTLS support to remote SMTP clients, but do not require that clients use TLS encryption. See smtpd_use_tls diff --git a/postfix/mantools/check-postconf-undocumented b/postfix/mantools/check-postconf-undocumented new file mode 100644 index 000000000..7f45e2b33 --- /dev/null +++ b/postfix/mantools/check-postconf-undocumented @@ -0,0 +1,99 @@ +#!/bin/sh + +# Reports parameters that exist in postconf(1) output, but that are not +# documented in the postconf(5) manpage. + +LANG=C; export LANG +LC_ALL=C; export LC_ALL + +bin/postconf mail_version >/dev/null || exit 1 + +trap 'rm -f want.tmp have.tmp stoplist.tmp 2>/dev/null' 0 1 2 3 15 + +# Extract parameters from the postconf(5) manpage. + +awk '/^%PARAM/ { print $2 }' proto/postconf.proto | sort > have.tmp || exit 1 + +# Build a stoplist for postconf(1) output. + +# Eliminate unwanted dynamic parameter names for delivery agents. These +# names are prefixed by their master.cf service name (they must instead +# be documented with fake names that have the "transport_" prefix; that +# is implemented later in this script). + +for xport in error lmtp local relay retry smtp virtual +do + cat <Postfix 2.6 ignores the optional ESMTP parameters in +
Postfix 3.3 and later support the ESMTP parameters RET and +ENVID in requests to replace the envelope sender (SMFIR_CHGFROM). +Postfix logs a warning message when a Milter application supplies +other ESMTP parameters:
+ ++warning: queue-id: cleanup_chg_from: ignoring bad ESMTP + parameter "whatever" in SMFI_CHGFROM request ++ +
Postfix 3.0 and later support the ESMTP parameters NOTIFY +and ORCPT in requests to add an envelope recipient. Postfix logs a +warning message when a Milter application supplies other ESMTP +parameters:
+ ++warning: queue-id: cleanup_add_rcpt: ignoring ESMTP argument + from Milter or header/body_checks: "whatever" ++ +
Postfix 2.6 and later ignore optional ESMTP parameters in requests to replace the sender (SMFIR_CHGFROM) or to append a recipient (SMFIR_ADDRCPT_PAR). Postfix logs a warning message when a Milter application supplies such ESMTP parameters:
diff --git a/postfix/proto/postconf.proto b/postfix/proto/postconf.proto index 7b26017b0..c0b57e705 100644 --- a/postfix/proto/postconf.proto +++ b/postfix/proto/postconf.proto @@ -2302,20 +2302,6 @@ one-letter suffix that specifies the time unit). Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks). The default time unit is s (seconds). -%PARAM lmtp_lhlo_timeout 300s - -The Postfix LMTP client time limit for receiving the LMTP -greeting banner. When the remote LMTP server drops the connection -without sending a -greeting banner, or when it sends no greeting banner within the -deadline, the LMTP client tries the next address on the mail -exchanger list.
- -Specify a non-zero time value (an integral value plus an optional -one-letter suffix that specifies the time unit). Time units: s -(seconds), m (minutes), h (hours), d (days), w (weeks). -The default time unit is s (seconds).
- %PARAM lmtp_mail_timeout 300s@@ -16090,7 +16076,7 @@ cache information. Since the cache is shared with smtpd(8) and managed by tlsmgr(8), there is only one expiration time for the SMTP server cache shared by all three services, namely smtpd_tls_session_cache_timeout.
-This feature is available in Postfix 2.8 and later.
+This feature is available in Postfix 2.8-2.10.
%PARAM tlsproxy_use_tls $smtpd_use_tls diff --git a/postfix/proto/stop b/postfix/proto/stop index 8eea8ade5..8447195ea 100644 --- a/postfix/proto/stop +++ b/postfix/proto/stop @@ -1655,3 +1655,5 @@ hs ccformat xxsql MEMCACHE +ORCPT +RET diff --git a/postfix/proto/stop.double-history b/postfix/proto/stop.double-history index f0ef0c55b..2276687a8 100644 --- a/postfix/proto/stop.double-history +++ b/postfix/proto/stop.double-history @@ -146,3 +146,4 @@ proto proto socketmap_table qmqpd qmqpd c tls tls_misc c a dependency for html html File html Makefile in master dgram_server c master mail_server h postlogd postlogd c reload etc File spawn spawn c + logging to the standard error stream File postlog postlog c diff --git a/postfix/proto/stop.spell-history b/postfix/proto/stop.spell-history index e7fa73e8f..9a892a1d5 100644 --- a/postfix/proto/stop.spell-history +++ b/postfix/proto/stop.spell-history @@ -95,3 +95,4 @@ mandoc v'expr roff diffs +CLOSEFROM diff --git a/postfix/src/cleanup/cleanup_message.c b/postfix/src/cleanup/cleanup_message.c index 1530eeb25..1c8881d84 100644 --- a/postfix/src/cleanup/cleanup_message.c +++ b/postfix/src/cleanup/cleanup_message.c @@ -789,7 +789,7 @@ static void cleanup_header_done_callback(void *context) } 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 --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index dcb9c7192..ca3b424e9 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -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 "20241202" +#define MAIL_RELEASE_DATE "20250103" #define MAIL_VERSION_NUMBER "3.10" #ifdef SNAPSHOT diff --git a/postfix/src/postlog/postlog.c b/postfix/src/postlog/postlog.c index 195ebd918..ce6b3c0f9 100644 --- a/postfix/src/postlog/postlog.c +++ b/postfix/src/postlog/postlog.c @@ -17,10 +17,10 @@ /* line, \fBpostlog\fR(1) reads from standard input and logs each input /* line as one record. /* -/* By default, logging is sent to \fBsyslogd\fR(8) or -/* \fBpostlogd\fR(8); when the -/* standard error stream is connected to a terminal, logging -/* is sent there as well. +/* Logging is sent to \fBsyslogd\fR(8) or \fBpostlogd\fR(8), and +/* to the standard error stream (with Postfix < 3.8, \fBpostlog\fR(1) +/* writes to the standard error stream only if that stream is +/* connected to a terminal). /* /* The following options are implemented: /* .IP "\fB-c \fIconfig_dir\fR" diff --git a/postfix/src/tls/tls_misc.c b/postfix/src/tls/tls_misc.c index 2f4b5e3ba..937999f08 100644 --- a/postfix/src/tls/tls_misc.c +++ b/postfix/src/tls/tls_misc.c @@ -1051,7 +1051,15 @@ void tls_get_signature_params(TLS_SESS_STATE *TLScontext) if (SSL_version(ssl) < TLS1_3_VERSION) return; - if (tls_get_peer_dh_pubkey(ssl, &dh_pkey)) { + /* + * On the client side, a TLS 1.3 KEM has no server key, just ciphertext + * to decapsulate, but, as of OpenSSL 3.0, the client can still obtain + * the negotiated group name directly. + */ + if (!kex_name) + kex_name = TLS_GROUP_NAME(ssl); + + if (kex_name == NULL && tls_get_peer_dh_pubkey(ssl, &dh_pkey)) { switch (nid = EVP_PKEY_id(dh_pkey)) { default: kex_name = OBJ_nid2sn(EVP_PKEY_type(nid)); @@ -1079,16 +1087,6 @@ void tls_get_signature_params(TLS_SESS_STATE *TLScontext) EVP_PKEY_free(dh_pkey); } - /* - * On the client side, a TLS 1.3 KEM has no server key, just ciphertext - * to decapsulate, but, as of OpenSSL 3.0, the client can still obtain - * the negotiated group name directly. We nevertheless still try to get - * the group details from the peer key first, which works with OpenSSL - * 1.1.1 and retains the original output format for the (EC)DH groups. - */ - if (!kex_name) - kex_name = TLS_GROUP_NAME(ssl); - /* * On the client end, the certificate may be present, but not used, so we * check via SSL_get_signature_nid(). This means that local signature diff --git a/postfix/src/util/peekfd.c b/postfix/src/util/peekfd.c index e9480a2d6..420a92b05 100644 --- a/postfix/src/util/peekfd.c +++ b/postfix/src/util/peekfd.c @@ -39,6 +39,9 @@ #include