diff --git a/postfix/HISTORY b/postfix/HISTORY index c57b542c8..50729f18c 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -28780,3 +28780,80 @@ Apologies for any names omitted. Cleanup: the netstring client sets or clears errno to improve error messages from its callers. File: util/netstring.c. + +20250109 + + Bugfix (defect introduced: Postfix 2.6): fixed the parsing + of multiple commas in a multi_instance_directories parameter + value. Michael Tokarev. Files: conf/postfix-script, + conf/post-install, conf/postfix-wrapper, proto/postfix-wrapper. + + Cleanup: replace static result buffer with per-instance buffer. + Michael Tokarev. File: util/dict_cdb.c. + + Feature: first/next iterator support for cdb: tables, if + built with tinycdb. Michael Tokarev. Wietse added a test + and documentation. Files: util/dict_cdb.c proto/CDB_README.html, + postmap/Makefile.in. + +20241111 + + Zero code change baseline for new features. Code base is + 20241027. + + This renames symbols that are part of the Postfix SMTPUTF8 + implementation. The result still uses the same bitflags, + but the unused bitflags can now officially be used to + implement other Postfix features. The only change is that + in three debug messages, "smtputf8" becomes "sendopts". + Otherwise, the compiler output is bit-for-bit identical. + + This change makes it possible to propagate new bitflags + from Postfix mail receiving programs through queue files + into delivery agents without having to rip up internal APIs + like when we implemented SMTPUTF8 support. + + There is some SMTPUTF8-related code that will need to be + updated to read only specific bitflags instead of testing + an entire integer for (non)zero. Older Postfix implementations + will not do evil things when they encounter queue file with + new flags from a newer Postfix version. They will correctly + handle SMTPUTF8 messages and ignore the new flags. Some + programs may falsely claim that a non-SMTPUTF8 message with + a non-ASCII envelope address has an UTF8 envelope address. + Although such messages violate SMTP, Postfix will do no + harm. + +20250109 + + No intentional behavior change. + + Code cleanup: in SMTPUTF8 support, set and read the sender + options flags more selectively, instead of assuming that + all bits are used exclusively for SMTPUTF8 support. Files: + bounce/bounce_notify_util.c, cleanup/cleanup_api.c, + cleanup/cleanup_envelope.c, smtp/smtp_proto.c. + + TODO: in smtp_proto.c, add valid_utf8_stringz() check when + sending a DSN ORCPT address. Better: reuse IS_UTF8_ADDRESS() + (it's currently defined in bounce_notify_util.c). + + TODO: take a cue from Arnt Gulbrandsen's qmail patch. In the SMTP + client, enforce SMTPUTF8 if the message headers or envelope + require SMTPUTF8, or if the sender requested it. Ditto for + bounces. The qmail patch does not look for UTF8 text in headers, + but Exim will reject UTF8 headers unless the client requests + SMTPUTF8. + + TODO: If we don't auto-generate the "SMTPUTF8 requested" + flag we may need to update the bounce daemon. Maybe it can + use similar logic as the SMTP client. + + TODO: in the bounce daemon consider replacing + (bounce_info->smtputf8 & SMTPUTF8_FLAG_REQUESTED) with + (bounce_info->smtputf8 & SMTPUTF8_FLAG_ALL): message/global + should be selected if a message has 8bit header or envelope. + + TODO: in stable releases in the queue managers "and" the + queue file's smtputf8 value with SMTPUTF8_FLAG_ALL, for + forward compatibility. diff --git a/postfix/README_FILES/CDB_README b/postfix/README_FILES/CDB_README index 0dbb5cbe2..6ccf26807 100644 --- a/postfix/README_FILES/CDB_README +++ b/postfix/README_FILES/CDB_README @@ -17,8 +17,25 @@ temporarily while a CDB file is under construction). CDB databases are maintained with the postmap(1) or postalias(1) command. The DATABASE_README document has general information about Postfix databases. -CDB support is available with Postfix 2.2 and later releases. This document -describes how to build Postfix with CDB support. +You can use "cdb:" tables wherever you can use read-only "hash", "btree" or +"lmdb" tables with the following limitations: + + * CDB databases cannot be larger than 4GB on LP64 and ILP32 systems, because + the CDB library API uses unsigned integers for file offsets. + + * The "ppoossttmmaapp --ii" (incremental record insertion) and "ppoossttmmaapp --dd" + (incremental record deletion) command-line options are not available. For + the same reason the "cdb:" map type cannot be used to for persistent + caches, such as the address verification cache for the verify(8) service, + the TLS session cache for the tlsmgr(8) service, or the dynamic allowlist + for postscreen(8). + + * The "sequence" operation ("ppoossttmmaapp --ss" or "ppoossttaalliiaass --ss") is available only + wen Postfix is built with tinycdb by Michael Tokarev, not with the original + cdb library by Daniel Bernstein. + +CDB support is available with Postfix 2.2 and later releases. The remainder of +this document describes how to build Postfix with CDB support. BBuuiillddiinngg PPoossttffiixx wwiitthh CCDDBB ssuuppppoorrtt @@ -64,11 +81,3 @@ building a dynamically-loaded or statically-loaded CDB database client. database library dependencies. And that was exactly what dynamic database client loading was meant to avoid. -After Postfix has been built with cdb support, you can use "cdb" tables -wherever you can use read-only "hash", "btree" or "dbm" tables. However, the -"ppoossttmmaapp --ii" (incremental record insertion) and "ppoossttmmaapp --dd" (incremental -record deletion) command-line options are not available. For the same reason -the "cdb" map type cannot be used to store the persistent address verification -cache for the verify(8) service, or to store TLS session information for the -tlsmgr(8) service. - diff --git a/postfix/WISHLIST b/postfix/WISHLIST index 64e2ad51f..50f56fd10 100644 --- a/postfix/WISHLIST +++ b/postfix/WISHLIST @@ -19,6 +19,9 @@ Wish list: relay_recipient_maps empty should default to 'no valid recipients'. Subject to compatibility level. + Replace static result buffers with per-instance buffers in + dict_unix.c, dict_ni*c. + 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 diff --git a/postfix/conf/post-install b/postfix/conf/post-install index cceef6770..cd5f14678 100644 --- a/postfix/conf/post-install +++ b/postfix/conf/post-install @@ -296,7 +296,7 @@ test -d "$config_directory" || { instances=`test ! -f $def_config_directory/main.cf || $POSTCONF -qc $def_config_directory -h multi_instance_directories | - sed 's/,/ /'` || exit 1 + sed 'y/,/ /'` || exit 1 update_shared_files=1 for name in $instances diff --git a/postfix/conf/postfix-script b/postfix/conf/postfix-script index c43d764fb..de86d382b 100755 --- a/postfix/conf/postfix-script +++ b/postfix/conf/postfix-script @@ -97,7 +97,7 @@ def_config_directory=`$command_directory/postconf -dh config_directory` || { instances=`test ! -f $def_config_directory/main.cf || $command_directory/postconf -qc $def_config_directory \ - -h multi_instance_directories | sed 's/,/ /'` || { + -h multi_instance_directories | sed 'y/,/ /'` || { $FATAL cannot execute $command_directory/postconf! exit 1 } diff --git a/postfix/conf/postfix-wrapper b/postfix/conf/postfix-wrapper index dd0a51762..cb9dc10d8 100644 --- a/postfix/conf/postfix-wrapper +++ b/postfix/conf/postfix-wrapper @@ -188,7 +188,7 @@ POSTFIX=$command_directory/postfix # Canonicalize the instance directory list. The list is specified # in startup order. -instance_dirs=`$POSTCONF -h multi_instance_directories | sed 's/,/ /'` || +instance_dirs=`$POSTCONF -h multi_instance_directories | sed 'y/,/ /'` || exit 1 case "$1" in diff --git a/postfix/html/CDB_README.html b/postfix/html/CDB_README.html index e58ccc818..e6952eed5 100644 --- a/postfix/html/CDB_README.html +++ b/postfix/html/CDB_README.html @@ -35,8 +35,33 @@ under construction). CDB databases are maintained with the postalias(1) command. The DATABASE_README document has general information about Postfix databases.
+You can use "cdb:" tables wherever you can use read-only "hash", +"btree" or "lmdb" tables with the following limitations:
+ +CDB databases cannot be larger than 4GB on LP64 and ILP32 +systems, because the CDB library API uses unsigned integers for +file offsets.
+ +The "postmap -i" (incremental record insertion) and +"postmap -d" (incremental record deletion) command-line +options are not available. For the same reason the "cdb:" map type +cannot be used to for persistent caches, such as the address +verification cache for the verify(8) service, the TLS session cache +for the tlsmgr(8) service, or the dynamic allowlist for postscreen(8). +
+ +The "sequence" operation ("postmap -s" or "postalias +-s") is available only wen Postfix is built with tinycdb by +Michael Tokarev, not with the original cdb library by Daniel Bernstein. +
+ +CDB support is available with Postfix 2.2 and later releases. -This document describes how to build Postfix with CDB support.
+The remainder of this document describes how to build Postfix with +CDB support.After Postfix has been built with cdb support, you can use -"cdb" tables wherever you can use read-only "hash", "btree" or -"dbm" tables. However, the "postmap -i" (incremental record -insertion) and "postmap -d" (incremental record deletion) -command-line options are not available. For the same reason the -"cdb" map type cannot be used to store the persistent address -verification cache for the verify(8) service, or to store -TLS session information for the tlsmgr(8) service.
diff --git a/postfix/html/bounce.8.html b/postfix/html/bounce.8.html index 603ca0f53..212ec8f6b 100644 --- a/postfix/html/bounce.8.html +++ b/postfix/html/bounce.8.html @@ -194,5 +194,8 @@ BOUNCE(8) BOUNCE(8) 111 8th Avenue New York, NY 10011, USA + Wietse Venema + porcupine.org + BOUNCE(8)