Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package postfix for openSUSE:Factory checked 
in at 2026-12-01 16:58:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/postfix (Old)
 and      /work/SRC/openSUSE:Factory/.postfix.new.1340718 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "postfix"

Tue Dec  1 16:58:17 2026 rev:282 rq:1401439 version:3.11.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/postfix/postfix-bdb.changes      2026-10-16 
20:06:45.641800540 +0200
+++ /work/SRC/openSUSE:Factory/.postfix.new.1340718/postfix-bdb.changes 
2026-12-01 16:58:55.599996876 +0100
@@ -1,0 +2,110 @@
+Mon Nov 23 20:52:59 UTC 2026 - Arjen de Korte <[email protected]>
+
+- update to 3.11.8
+  * [TLS protocol configuration syntax change] Relevant if your
+    configuration contains ">=" or "<=" followed by SPACE. To
+    avoid breaking configurations, Postfix will now treat
+    ">= SPACE protocol-name" as ">=protocol-name, and
+    "<= SPACE protocol-name" as "<=protocol-name". The forms
+    "<=" or ">=" (i.e. not attached to a protocol name) were
+    treated as "<=0x0" or ">=0x0" (i.e. no upper or lower
+    bound) and are now treated as syntax errors. Solution: look
+    for "<=" or ">=" followed by SPACE and correct the syntax.
+  * [SMTP client DNS total time limit] Relevant if you are
+    sending mail over very slow network connections to domains
+    with a huge number of SMTP server IP addresses. The Postfix
+    SMTP client now enforces a 100-second time limit on SMTP
+    server IP address lookups per delivery request. This
+    reduces the impact from denial of service attacks in which
+    a hostile DNS operator returns up to 100 MX host names and
+    deliberately lets each address lookup request time out.
+  * [:include: /path/to/file read permission] Relevant if your
+    root-owned aliases file contains ":include:/path/to/file",
+    where "/path/to/file" is a symlink or hardlink to a file
+    with a different owner than the "/path/to" directory. The
+    Postfix local delivery agent will now defer delivery if the
+    "/path/to" owner has no permission to read "/path/to/file".
+    Workaround: make /path/to/file world-readable.
+  * (defect introduced: Postfix beta, date: 19981104): A
+    compromised mailing list manager could replace a local(8)
+    :include: file, referenced in a root-owned alias database,
+    with a hardlink or symlink to a restricted file (not world
+    readable), and reveal that file's content in bounce
+    messages.
+  * (defect introduced: before Postfix alpha, date: 19970427):
+    A hostile DNS operator could return a large number of MX
+    hostnames to the Postfix SMTP client, and deliberately let
+    each SMTP server IP address lookup request time out.
+    Problem reported by coredump.ws assisted by pf-outbound.
+    Fix by Wietse: stop making IP address queries after their
+    combined elapsed time exceeds 100s per delivery request.
+  * (defect introduced: Postfix before alpha, date: 19971211):
+    The Postfix SMTP client did not count an empty reply line
+    towards the reply size limit, but still added an empty line
+    entry to the in-memory session history. An SMTP server that
+    replies with a stream of empty lines could run an SMTP
+    client process out of memory and degrade performance of
+    concurrent deliveries.
+  * (defect introduced: Postfix 3.6, date: 20200718):
+    Unnecessary panic() while parsing a TLS policy with a
+    1-character "match=" fingerprint.
+  * (defect introduced: Postfix alpha, date: 19980804):
+    Null pointer read error in "sendmail -bs" (stand-alone
+    SMTP server mode) while rejecting a large SIZE parameter
+    value in a MAIL FROM command.
+  * (defect introduced: Postfix 3.11, date: 20251104):
+    With Milter support enabled, and
+    "non_empty_end_of_header_action = add_header" (not the
+    default), Postfix wrote the "MIME-Error:" header AFTER a
+    dummy "header append" PTR record. This caused Postfix's
+    Milter client to treat that header as body content instead
+    of header content.
+  * (defect introduced: Postfix 2.3, date: 20060511):
+    When "milter_default_action = accept", and a Milter
+    connection was lost or aborted while a "replace body"
+    request was in progress, the Postfix cleanup daemon
+    committed the queue file in an undefined state (with
+    pre-replacement body content which would still be
+    consistent with the 'default accept' policy, or with
+    partial new content which caused the message to end up in
+    the "corrupt" queue).
+  * Bugfix (defect introduced: Postfix 2.5, date: 20071123):
+    When Postfix negotiated a new non_smtpd_milters connection
+    and the Milter sent a list of macro names, Postfix
+    replaced a previously received list from that Milter
+    without freeing the old list's memory, resulting in a
+    small memory leak. If the Milter did not send a per-milter
+    macro name list over a new connection, Postfix reused the
+    list that was received over an earlier connection with
+    that same Milter.
+  * Bugfix (defect introduced: Postfix 3.6, date: 20200725):
+    when parsing TLS protocol bounds, Postfix treated a bare
+    "<=" or ">=" (i.e. not attached to a protocol name) as
+    "<=0x0" or ">=0x0" (i.e. no upper or lower bound). These
+    forms are now treated as a syntax error. Except, to avoid
+    breaking existing configurations, Postfix will treat
+    ">= SPACE protocol-name" as ">=protocol-name, and
+    "<= SPACE protocol-name" as "<=protocol-name".
+  * (defect introduced: Postfix 3.0, date: 20140715):
+    With "smtputf8_enable = yes" (default setting) the Postfix
+    SMTP client could send unencoded content in the ORCPT
+    parameter while sending RCPT TO, because the internal
+    uxtext_quote() function failed to propagate an error
+    condition. This bug is unlikely in practice, because the
+    Postfix SMTP server accepts non-UTF8 content in an ORCPT
+    parameter only with "smtputf8_enable = no" (not a default
+    setting).
+  * (defect introduced: before Postfix alpha, date: 19970514):
+    Whitespace in an envelope address domain portion caused
+    corruption of the From_ line that separates messages in a
+    mailbox file.
+  * (defect introduced: Postfix 1.0 and various later):
+    A nested "MAIL FROM" command could reset ESMTP parameters
+    for the still active "MAIL FROM" transaction; ESMTP
+    parameters specified in a rejected "MAIL FROM" command
+    could leak into the next "MAIL FROM" transaction. Fixed
+    by resetting "MAIL FROM" ESMTP parameters after the check
+    for nested "MAIL FROM" commands, and by adding missing
+    SIZE and AUTH initializations.
+
+-------------------------------------------------------------------
postfix.changes: same change

Old:
----
  postfix-3.11.7.tar.gz
  postfix-3.11.7.tar.gz.asc

New:
----
  postfix-3.11.8.tar.gz
  postfix-3.11.8.tar.gz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ postfix-bdb.spec ++++++
--- /var/tmp/diff_new_pack.22VaUY/_old  2026-12-01 16:58:56.972054217 +0100
+++ /var/tmp/diff_new_pack.22VaUY/_new  2026-12-01 16:58:56.974054301 +0100
@@ -61,7 +61,7 @@
 %endif
 %bcond_without ldap
 Name:           postfix-bdb
-Version:        3.11.7
+Version:        3.11.8
 Release:        0
 Summary:        A fast, secure, and flexible mailer
 License:        EPL-2.0 OR IPL-1.0

++++++ postfix.spec ++++++
--- /var/tmp/diff_new_pack.22VaUY/_old  2026-12-01 16:58:57.016056056 +0100
+++ /var/tmp/diff_new_pack.22VaUY/_new  2026-12-01 16:58:57.018056140 +0100
@@ -63,7 +63,7 @@
 #
 %bcond_without ldap
 Name:           postfix
-Version:        3.11.7
+Version:        3.11.8
 Release:        0
 Summary:        A fast, secure, and flexible mailer
 License:        EPL-2.0 OR IPL-1.0

++++++ postfix-3.11.7.tar.gz -> postfix-3.11.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.11.7/HISTORY new/postfix-3.11.8/HISTORY
--- old/postfix-3.11.7/HISTORY  2026-09-06 16:10:56.000000000 +0200
+++ new/postfix-3.11.8/HISTORY  2026-11-20 17:39:48.000000000 +0100
@@ -31238,3 +31238,130 @@
        command and crash the Postfix SMTP server with a null pointer
        read error. Reported by Wonyoung Jung (정원영). File:
        smtpd/smtpd.c.
+
+20261030
+
+       Bugfix (defect introduced: Postfix 1.0 and various later):
+       a nested "MAIL FROM" command could reset ESMTP parameters
+       for the still active "MAIL FROM" transaction; ESMTP parameters
+       specified in a rejected "MAIL FROM" command could leak into
+       the next "MAIL FROM" transaction. Fixed by resetting "MAIL
+       FROM" ESMTP parameters after the check for nested "MAIL
+       FROM" commands, and by adding missing SIZE and AUTH
+       initializations. Problem and fix by coredump.ws with Claude
+       Opus 5.5. File: smtpd.c.
+
+       Bugfix (defect introduced: Postfix 3.11, date: 20251104):
+       With Milter support enabled, and "non_empty_end_of_header_action
+       = add_header" (not the default), Postfix wrote the "MIME-Error:"
+       header AFTER a dummy "header append" PTR record. This caused
+       Postfix's Milter client to treat that header as body content
+       instead of header content. Problem and fix by coredump.ws,
+       assisted by Claude Opus 5.5. File: cleanup_message.c.
+
+20261101
+
+       Bugfix (defect introduced: Postfix alpha, date: 19980804):
+       null pointer read error in "sendmail -bs" stand-alone mode
+       while rejecting a large SIZE parameter value in a MAIL FROM
+       command. Problem report and fix by coredump.ws assisted
+       by Claude Opus 5.5. File: smtpd.c.
+
+       Bugfix (defect introduced: Postfix 3.6, date: 20200725):
+       when parsing TLS protocol bounds, Postfix treated a bare
+       "<=" or ">=" (i.e. not attached to a protocol name) as
+       "<=0x0" or ">=0x0" (i.e. no upper or lower bound). These
+       forms are now treated as a syntax error. Except, to avoid
+       breaking existing configurations, Postfix will treat ">=
+       SPACE protocol-name" as ">=protocol-name, and "<= SPACE
+       protocol-name" as "<=protocol-name". Problem reported by
+       coredump.ws, assisted by Claude Opus 5.5. Fix by Wietse.
+       File: tls_misc.c.
+
+20261102
+
+       Bugfix (defect introduced: Postfix 2.3, date: 20060511):
+       When "milter_default_action = accept", and a Milter connection
+       was lost or aborted while a "replace body" request was in
+       progress, the Postfix cleanup daemon committed the queue
+       file in an undefined state (with pre-replacement body content
+       which would still be consistent with the 'default accept'
+       policy, or with partial new content which caused the message
+       to end up in the "corrupt" queue). Reported by OpenAI
+       Security and other parties. Fix by Wietse (don't accept).
+       File: milter8.c.
+
+20261105
+
+       Bugfix (defect introduced: before Postfix alpha, date:
+       19970514): Whitespace in an envelope address domain portion
+       caused corruption of the mailbox From_ line that separates
+       messages. Problem reported by coredump.ws with assistance
+       from Claude Opus 5.5. Fix by Wietse: replace the domain
+       portion with "domain.invalid". File: global/mailbox.c. File:
+       mailbox.c.
+
+20261108
+
+       Bugfix (defect introduced: Postfix 2.5, date: 20071123):
+       When Postfix negotiated a new non_smtpd_milters connection
+       and the Milter sent a list of macro names, Postfix replaced
+       a previously received list from that Milter without freeing
+       the old list's memory, resulting in a small memory leak.
+       If the Milter did not send a per-milter macro name list
+       over a new connection, Postfix reused the list that was
+       received over an earlier connection with that same Milter.
+       Report and fix by coredump.ws assisted by Claude Opus 5.5.
+       File: milter8.c.
+
+20261111
+
+       Bugfix (defect introduced: Postfix 3.6, date: 20200718):
+       panic() while parsing a TLS policy with a 1-character
+       "match=" fingerprint. Report and fix by coredump.ws assisted
+       by Claude Opus 5.5. File: tls_dane.c.
+
+       Bugfix (defect introduced: Postfix 3.0, date: 20140715):
+       With "smtputf8_enable = yes" (default setting) the Postfix
+       SMTP client could send unencoded content in the ORCPT
+       parameter while sending RCPT TO, because the internal
+       uxtext_quote() function failed to propagate an error
+       condition. This bug is unlikely in practice, because the
+       Postfix SMTP server accepts non-UTF8 content in an ORCPT
+       parameter only with "smtputf8_enable = no" (not a default
+       setting). Reported by coredump.ws, found with fuzzing. File:
+       uxtext.c.
+
+       Robustness (defect introduced: Postfix 2.3, date: 20060511):
+       a hostile DNS operator could return up to 100 MX hostnames
+       to the Postfix SMTP client, and deliberately let each SMTP
+       server IP address lookup request time out. Problem reported
+       by coredump.ws assisted by pf-outbound. Fix by Wietse: stop
+       making queries after their combined elapsed time exceeds
+       100s per delivery request. File: smtp_addr.c.
+
+2026113
+
+       Safety: don't panic when vstring_alloc() is called with a
+       zero-length argument. File: vstring.c.
+
+20261115
+
+       Bug (defect introduced: Postfix before alpha, date: 19971211):
+       The Postfix SMTP client did not count an empty reply line
+       towards the reply size limit, but still added an empty line
+       entry to the in-memory session history. An SMTP server that
+       replies with a stream of empty lines could run an SMTP
+       client process out of memory and degrade performance of
+       concurrent deliveries. Problem report by macintog, fix by
+       Wietse and macintog. File: smtp_chat.c.
+
+20261116
+
+       Bugfix (defect introduced: Postfix beta, date: 19981104):
+       a compromised mailing list manager could replace a local(8)
+       :include: file, referenced in a root-owned alias database,
+       with a hardlink or symlink to a restricted file (not world
+       readable), and reveal that file's content in bounce messages.
+       Reported by Anton Klingspor assisted with AI, fixed by
+       Wietse. File: local/include.c.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.11.7/RELEASE_NOTES 
new/postfix-3.11.8/RELEASE_NOTES
--- old/postfix-3.11.7/RELEASE_NOTES    2026-03-05 16:44:30.000000000 +0100
+++ new/postfix-3.11.8/RELEASE_NOTES    2026-11-20 17:56:02.000000000 +0100
@@ -26,6 +26,35 @@
 license of their choice. Those who are more comfortable with the
 IPL can continue with that license.
 
+Incompatible changes due to bugfixes
+------------------------------------
+
+Postfix 3.11.8, 3.10.15, 3.9.16, 3.8.22, 3.7.24, 3.6.22, 3.5.29:
+
+[TLS protocol syntax change] Relevant if your configuration contains
+">=" or "<=" followed by SPACE. To avoid breaking configurations,
+Postfix will now treat ">= SPACE protocol-name" as ">=protocol-name, and
+"<= SPACE protocol-name" as "<=protocol-name". The forms "<=" or ">="
+(i.e.  not attached to a protocol name) were treated as "<=0x0" or
+">=0x0" (i.e. no upper or lower bound) and are now treated as syntax
+errors. Solution: look for "<=" or ">=" followed by SPACE and correct
+the syntax.
+
+[SMTP client DNS total time limit] Relevant if you are sending mail
+over very slow network connections to domains with a huge number
+of SMTP server IP addresses. The Postfix SMTP client now enforces
+a 100-second time limit on SMTP server IP address lookups per
+delivery request. This reduces the impact from denial of service
+attacks in which a hostile DNS operator returns up to 100 MX host
+names and deliberately lets each address lookup request time out.
+
+[:include: /path/to/file read permission] Relevant if your root-owned
+aliases file contains ":include:/path/to/file", where "/path/to/file" is a
+symlink or hardlink to a file with a different owner than the "/path/to"
+directory. The Postfix local delivery agent will now defer delivery if
+the "/path/to" owner has no permission to read "/path/to/file".
+Workaround: make /path/to/file world-readable.
+
 Major changes - database
 ------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.11.7/src/cleanup/cleanup_message.c 
new/postfix-3.11.8/src/cleanup/cleanup_message.c
--- old/postfix-3.11.7/src/cleanup/cleanup_message.c    2025-11-19 
00:11:17.000000000 +0100
+++ new/postfix-3.11.8/src/cleanup/cleanup_message.c    2026-11-19 
22:12:15.000000000 +0100
@@ -911,6 +911,21 @@
        cleanup_out_format(state, REC_TYPE_NORM, "Require-TLS-ESMTP: yes");
 
     /*
+     * Get the current error state before mime_state_update() can return it.
+     * 
+     * 202610 Credit: coredump.ws with Claude Opus 5.5. Moved this code before
+     * the dummy "header append" PTR record below. Otherwise the cleanup
+     * server would treat this header as the start of the message body: the
+     * Milter header editing code would not find it, and a Milter body
+     * replacement would overwrite it.
+     */
+    mime_errs = mime_state_status(state->mime_state);
+    if ((mime_errs & MIME_ERR_NON_EMPTY_EOH)
+       && cleanup_non_empty_eoh_action == NON_EMPTY_EOH_CODE_ADD_HDR)
+       cleanup_out_string(state, REC_TYPE_NORM,
+            "MIME-Error: message header was not terminated by empty line");
+
+    /*
      * Place a dummy PTR record right after the last header so that we can
      * append headers without having to worry about clobbering the
      * end-of-content marker.
@@ -923,15 +938,6 @@
            msg_fatal("%s: vstream_ftell %s: %m", myname, cleanup_path);
        state->body_offset = state->append_hdr_pt_target;
     }
-
-    /*
-     * Get the current error state before mime_state_update() can return it.
-     */
-    mime_errs = mime_state_status(state->mime_state);
-    if ((mime_errs & MIME_ERR_NON_EMPTY_EOH)
-       && cleanup_non_empty_eoh_action == NON_EMPTY_EOH_CODE_ADD_HDR)
-       cleanup_out_string(state, REC_TYPE_NORM,
-            "MIME-Error: message header was not terminated by empty line");
 }
 
 /* cleanup_body_callback - output one body record */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.11.7/src/global/Makefile.in 
new/postfix-3.11.8/src/global/Makefile.in
--- old/postfix-3.11.7/src/global/Makefile.in   2026-02-23 00:30:58.000000000 
+0100
+++ new/postfix-3.11.8/src/global/Makefile.in   2026-11-19 22:10:55.000000000 
+0100
@@ -1991,6 +1991,7 @@
 mail_copy.o: ../../include/safe_open.h
 mail_copy.o: ../../include/stringops.h
 mail_copy.o: ../../include/sys_defs.h
+mail_copy.o: ../../include/valid_hostname.h
 mail_copy.o: ../../include/vbuf.h
 mail_copy.o: ../../include/vstream.h
 mail_copy.o: ../../include/vstring.h
@@ -2010,6 +2011,7 @@
 mail_copy.o: rec_type.h
 mail_copy.o: record.h
 mail_copy.o: sys_exits.h
+mail_copy.o: valid_mailhost_addr.h
 mail_date.o: ../../include/check_arg.h
 mail_date.o: ../../include/msg.h
 mail_date.o: ../../include/sys_defs.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.11.7/src/global/mail_copy.c 
new/postfix-3.11.8/src/global/mail_copy.c
--- old/postfix-3.11.7/src/global/mail_copy.c   2024-10-11 00:15:20.000000000 
+0200
+++ new/postfix-3.11.8/src/global/mail_copy.c   2026-11-19 22:10:55.000000000 
+0100
@@ -128,6 +128,8 @@
 #include "mbox_open.h"
 #include "dsn_buf.h"
 #include "sys_exits.h"
+#include "valid_mailhost_addr.h"
+#include "valid_hostname.h"
 
 /* mail_copy - copy message with extreme prejudice */
 
@@ -181,9 +183,19 @@
      * Prepend a bunch of headers to the message.
      */
     if (flags & (MAIL_COPY_FROM | MAIL_COPY_RETURN_PATH)) {
+       char   *at;
+
        if (sender == 0)
            msg_panic("%s: null sender", myname);
        quote_822_local(buf, sender);
+       /* coredump.ws + Claude Opus 5.5: bad domain corrupts mailbox. */
+       if ((at = strrchr(vstring_str(buf), '@')) != 0
+           && !valid_mailhost_literal(at + 1, DONT_GRIPE)
+           && !valid_hostname(at + 1, DONT_GRIPE)) {
+           msg_warn("replacing bad sender domain in: '%s'", vstring_str(buf));
+           vstring_truncate(buf, at +1 - vstring_str(buf));
+           vstring_strcat(buf, "domain.invalid");
+       }
        if (flags & MAIL_COPY_FROM) {
            time(&now);
            vstream_fprintf(dst, "From %s  %.24s%s", *sender == 0 ?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.11.7/src/global/mail_version.h 
new/postfix-3.11.8/src/global/mail_version.h
--- old/postfix-3.11.7/src/global/mail_version.h        2026-09-07 
18:24:23.000000000 +0200
+++ new/postfix-3.11.8/src/global/mail_version.h        2026-11-19 
22:24:35.000000000 +0100
@@ -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      "20260907"
-#define MAIL_VERSION_NUMBER    "3.11.7"
+#define MAIL_RELEASE_DATE      "20261122"
+#define MAIL_VERSION_NUMBER    "3.11.8"
 
 #ifdef SNAPSHOT
 #define MAIL_VERSION_DATE      "-" MAIL_RELEASE_DATE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.11.7/src/global/uxtext.c 
new/postfix-3.11.8/src/global/uxtext.c
--- old/postfix-3.11.7/src/global/uxtext.c      2018-11-28 00:05:11.000000000 
+0100
+++ new/postfix-3.11.8/src/global/uxtext.c      2026-11-19 22:17:01.000000000 
+0100
@@ -143,8 +143,7 @@
 VSTRING *uxtext_quote(VSTRING *quoted, const char *unquoted, const char 
*special)
 {
     VSTRING_RESET(quoted);
-    uxtext_quote_append(quoted, unquoted, special);
-    return (quoted);
+    return (uxtext_quote_append(quoted, unquoted, special));
 }
 
 /* uxtext_unquote_append - quoted data to unquoted */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.11.7/src/local/Makefile.in 
new/postfix-3.11.8/src/local/Makefile.in
--- old/postfix-3.11.7/src/local/Makefile.in    2025-09-30 00:34:57.000000000 
+0200
+++ new/postfix-3.11.8/src/local/Makefile.in    2026-11-19 22:40:46.000000000 
+0100
@@ -350,6 +350,7 @@
 include.o: ../../include/resolve_clnt.h
 include.o: ../../include/sent.h
 include.o: ../../include/stat_as.h
+include.o: ../../include/stringops.h
 include.o: ../../include/sys_defs.h
 include.o: ../../include/tok822.h
 include.o: ../../include/vbuf.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.11.7/src/local/include.c 
new/postfix-3.11.8/src/local/include.c
--- old/postfix-3.11.7/src/local/include.c      2026-06-28 22:10:45.000000000 
+0200
+++ new/postfix-3.11.8/src/local/include.c      2026-11-19 22:44:26.000000000 
+0100
@@ -61,6 +61,7 @@
 #include <stat_as.h>
 #include <iostuff.h>
 #include <mypwd.h>
+#include <stringops.h>
 
 /* Global library. */
 
@@ -144,6 +145,8 @@
        return (bounce_append(BOUNCE_FLAGS(state.request),
                              BOUNCE_ATTR(state.msg_attr)));
     }
+    if (st.st_mode & S_IWGRP)
+       msg_warn(":include: file %s is group writable", path);
 
     /*
      * DELIVERY POLICY
@@ -156,16 +159,43 @@
     /*
      * DELIVERY RIGHTS
      * 
-     * When a non-root include file is listed in a root-owned alias, use the
-     * rights of the include file owner.  We do not want to give the include
-     * file owner control of the default account.
+     * When an include file is listed in a root-owned alias: (1) use the rights
+     * of the parent directory owner if that is a non-root user, else (2) use
+     * the rights of the include file owner. Branch (1) defends against an
+     * attack reported by Anton Klingspor where a compromised mailing list
+     * manager could replace an include file with a hardlink or symlink to a
+     * protected file, and reveal its content in bounce messages.
      * 
      * When an include file is listed in a user-owned alias or .forward file,
      * leave the delivery rights alone. Users should not be able to make
      * things happen with someone else's rights just by including some file
      * that is owned by their victim.
+     * 
+     * In all cases, delivery to command or file will reduce root privilege to
+     * default user privilege.
      */
     if (usr_attr.uid == 0) {
+       VSTRING *parent_buf = vstring_alloc(100);
+       const char *parent_path = sane_dirname(parent_buf, path);
+       struct stat parent_st;
+       int     stat_res;
+
+       stat_res = stat(parent_path, &parent_st);       /* not lstat */
+       if (stat_res == 0 && (parent_st.st_mode & (S_IWGRP | S_IWOTH)))
+           /* Warn not reject, to avoid breaking existing deployments. */
+           msg_warn(":include: file %s has group or world writable "
+                    "parent %s", path, parent_path);
+       vstring_free(parent_buf);
+       if (stat_res < 0) {
+           msg_warn("%s: cannot find :include: file parent", path);
+           dsb_simple(state.msg_attr.why, "4.3.5",
+                      "mail system configuration error");
+           return (defer_append(BOUNCE_FLAGS(state.request),
+                                BOUNCE_ATTR(state.msg_attr)));
+       }
+       /* Non-root parent owner rights override file owner rights. */
+       if (parent_st.st_uid != 0)
+           st = parent_st;
        if ((errno = mypwuid_err(st.st_uid, &file_pwd)) != 0 || file_pwd == 0) {
            msg_warn(errno ? "cannot find username for uid %ld: %m" :
                     "cannot find username for uid %ld", (long) st.st_uid);
@@ -207,9 +237,14 @@
 #define FOPEN_AS(p,u,g) ((fd = open_as(p,O_RDONLY,0,u,g)) >= 0 ? \
                                vstream_fdopen(fd,O_RDONLY) : 0)
 
+    if (msg_verbose)
+       msg_info("%s: open_as(path=%s, uid=%lu, gid=%lu)", __func__, path,
+                (unsigned long) usr_attr.uid, (unsigned long) usr_attr.gid);
     if ((fp = FOPEN_AS(path, usr_attr.uid, usr_attr.gid)) == 0) {
-       msg_warn("cannot open include file %s: %m", path);
-       dsb_simple(state.msg_attr.why, "5.3.5",
+       msg_warn("cannot open :include: file %s as uid=%lu gid=%lu: %m", path,
+                (unsigned long) usr_attr.uid, (unsigned long) usr_attr.gid);
+       /* 4.x.x Because this may be triggered by new Klingspor defense. */
+       dsb_simple(state.msg_attr.why, "4.3.5",
                   "mail system configuration error");
        status = bounce_append(BOUNCE_FLAGS(state.request),
                               BOUNCE_ATTR(state.msg_attr));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.11.7/src/milter/milter8.c 
new/postfix-3.11.8/src/milter/milter8.c
--- old/postfix-3.11.7/src/milter/milter8.c     2026-09-03 21:12:17.000000000 
+0200
+++ new/postfix-3.11.8/src/milter/milter8.c     2026-11-19 22:16:11.000000000 
+0100
@@ -581,6 +581,11 @@
        (void) vstream_fclose(milter->fp);
        milter->fp = 0;
     }
+    /* 202611 coredump.ws + Claude Opus 5.5: avoid stale or leaked data. */
+    if (milter->m.macros) {
+        milter_macros_free(milter->m.macros);
+        milter->m.macros = 0;
+    }
     milter->state = MILTER8_STAT_CLOSED;
 }
 
@@ -1679,8 +1684,11 @@
     /*
      * Clean up after aborted message body replacement.
      */
-    if (body_line_buf)
+    if (body_line_buf) {
+        if (edit_resp == 0 && (retval == 0 || strchr("DS45", retval[0]) == 0))
+           retval = "421 4.7.0 Service unavailable";
        vstring_free(body_line_buf);
+    }
 
     /*
      * XXX Some cleanup clients ask the cleanup server to bounce mail for
@@ -1753,6 +1761,7 @@
            msg_warn("milter %s: bad protocol information: %s",
                     milter->m.name, name);
            milter8_conf_error(milter);
+           myfree(saved_version);
            return;
        }
        if (vers != 0)
@@ -1946,7 +1955,12 @@
 
     /*
      * Secondary negotiations: override lists of macro names.
+     *
+     * 202611 coredump.ws + Claude Opus 5.5: avoid stale data or memory leak.
      */
+    if (milter->m.macros)
+       msg_panic("%s: milter %s: macros exist",
+                 myname, milter->m.name);
     if (data_len > 0) {
        VSTRING *buf = vstring_alloc(100);
        UINT32_TYPE mac_type;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.11.7/src/smtp/smtp_addr.c 
new/postfix-3.11.8/src/smtp/smtp_addr.c
--- old/postfix-3.11.7/src/smtp/smtp_addr.c     2025-02-23 18:54:58.000000000 
+0100
+++ new/postfix-3.11.8/src/smtp/smtp_addr.c     2026-11-19 22:18:05.000000000 
+0100
@@ -295,6 +295,7 @@
     DNS_RR *addr_list = 0;
     DNS_RR *rr;
     int     res_opt = 0;
+    time_t  start, elapsed;
 
     if (mx_names->dnssec_valid)
        res_opt = RES_USE_DNSSEC;
@@ -324,7 +325,22 @@
      * getaddrinfo() may invoke a resolver that runs in a different process
      * (NIS server, nscd), so we can't even reliably turn this off by
      * tweaking the in-process resolver flags.
+     * 
+     * This code may look up more MX addresses than it will use. To avoid a
+     * mailer loop if this MTA is MX for the destination, we MUST exclude all
+     * MX addresses that have the same or worse MX preference as this MTA.
+     * Therefore, we MUST NOT stop looking up MX addresses in the middle of a
+     * preference level (at least, don't stop before we know whether this MTA
+     * is listed with that preference level). This logic assumes that the
+     * address record for this MTA is always available, and that the address
+     * is never excluded by dns_rr_append().
+     * 
+     * These loop detection considerations to not apply when the DNS is
+     * compromised; we give up immediately after address lookup has taken too
+     * long. That leaves the normal path for loop detection intact, and
+     * breaks rules only when DNS is compromised.
      */
+    start = time((time_t *) 0);
     for (rr = mx_names; rr; rr = rr->next) {
        if (rr->type != T_MX && rr->type != T_SRV)
            msg_panic("smtp_addr_list: bad resource type: %d", rr->type);
@@ -332,6 +348,12 @@
                                  rr->pref, rr->port, why);
        if (addr_list && DNS_RR_IS_TRUNCATED(addr_list))
            break;
+       if (var_dns_rr_list_limit > 0 
+           && (elapsed = time((time_t *) 0) - start) > var_dns_rr_list_limit) {
+           msg_info("%s: skipping further MX address lookup after %d seconds",
+                    rr->qname, (int) elapsed);
+           break;
+       }
     }
     return (addr_list);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.11.7/src/smtp/smtp_chat.c 
new/postfix-3.11.8/src/smtp/smtp_chat.c
--- old/postfix-3.11.7/src/smtp/smtp_chat.c     2026-09-03 20:31:04.000000000 
+0200
+++ new/postfix-3.11.8/src/smtp/smtp_chat.c     2026-11-19 22:43:47.000000000 
+0100
@@ -318,7 +318,9 @@
        if (chat_append_flag) {
            if (LEN(rdata.str_buf))
                VSTRING_ADDCH(rdata.str_buf, '\n');
-           vstring_strcat(rdata.str_buf, STR(session->buffer));
+           /* 202611 macintog: count empty line towards reply size limit. */
+           vstring_strcat(rdata.str_buf, *STR(session->buffer) != 0 ?
+                          STR(session->buffer) : "(empty line received)");
        }
 
        /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.11.7/src/smtpd/smtpd.c 
new/postfix-3.11.8/src/smtpd/smtpd.c
--- old/postfix-3.11.7/src/smtpd/smtpd.c        2026-09-03 21:52:19.000000000 
+0200
+++ new/postfix-3.11.8/src/smtpd/smtpd.c        2026-11-19 22:09:41.000000000 
+0100
@@ -2604,10 +2604,6 @@
     int     rate;
     int     dsn_envid = 0;
 
-    state->flags &= ~SMTPD_FLAGS_PER_MESSAGE;
-    state->encoding = 0;
-    state->dsn_ret = 0;
-
     /*
      * Sanity checks.
      * 
@@ -2640,6 +2636,25 @@
     }
 
     /*
+     * The following are set during MAIL FROM command parsing, and are not
+     * reset after syntax error.
+     * 
+     * 202610 Credit: coredump.ws with Claude Opus 5.5: move these resets after
+     * the nested MAIL FROM checks.
+     * 
+     * 202610 Credit: coredump.ws with Claude Opus 5.5: add missing resets for
+     * state->msg_size and state->sasl_sender.
+     */
+    state->flags &= ~SMTPD_FLAGS_PER_MESSAGE;
+    state->encoding = 0;
+    state->dsn_ret = 0;
+    state->msg_size = 0;
+#ifdef USE_SASL_AUTH
+    if (state->sasl_sender)
+       smtpd_sasl_mail_reset(state);
+#endif
+
+    /*
      * XXX The client event count/rate control must be consistent in its use
      * of client address information in connect and disconnect events. For
      * now we exclude xclient authorized hosts from event count/rate control.
@@ -2775,10 +2790,21 @@
            return (-1);
        }
     }
-    /* Fix 20161205: show the envelope sender in reject logging. */
-    PUSH_STRING(saved_sender, state->sender, STR(state->addr_buf));
-    err = smtpd_check_size(state, state->msg_size);
-    POP_STRING(saved_sender, state->sender);
+
+    /*
+     * 202610 Don't call smtpd_check_xxx() in stand-alone mode. Credit:
+     * coredump.ws with Claude Opus 5.5.
+     */
+    if (SMTPD_STAND_ALONE(state)) {
+       err = (ENFORCING_SIZE_LIMIT(var_message_limit)
+              && state->msg_size > var_message_limit) ?
+           "552 5.3.4 Message size exceeds fixed limit" : 0;
+    } else {
+       /* Fix 20161205: show the envelope sender in reject logging. */
+       PUSH_STRING(saved_sender, state->sender, STR(state->addr_buf));
+       err = smtpd_check_size(state, state->msg_size);
+       POP_STRING(saved_sender, state->sender);
+    }
     if (err != 0) {
        smtpd_chat_reply(state, "%s", err);
        return (-1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.11.7/src/tls/tls_dane.c 
new/postfix-3.11.8/src/tls/tls_dane.c
--- old/postfix-3.11.7/src/tls/tls_dane.c       2026-06-08 17:57:15.000000000 
+0200
+++ new/postfix-3.11.8/src/tls/tls_dane.c       2026-11-19 22:14:36.000000000 
+0100
@@ -453,7 +453,8 @@
                     values->argv[i]);
            continue;
        }
-       raw = vstring_alloc(ilen / 2);
+       /* 202611 coredump.ws + Claude Opus 5.5: avoid vstring_alloc(0). */
+       raw = vstring_alloc(ilen / 2 + 1);
        if (hex_decode_opt(raw, cp, ilen, HEX_DECODE_FLAG_ALLOW_COLON) == 0) {
            myfree(raw);
            msg_warn("malformed fingerprint value: %.384s", values->argv[i]);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.11.7/src/tls/tls_misc.c 
new/postfix-3.11.8/src/tls/tls_misc.c
--- old/postfix-3.11.7/src/tls/tls_misc.c       2026-02-27 20:02:57.000000000 
+0100
+++ new/postfix-3.11.8/src/tls/tls_misc.c       2026-11-19 22:13:02.000000000 
+0100
@@ -598,9 +598,15 @@
        *version = code;
        return (0);
     }
+
+    /*
+     * 202610 coredump.ws with Claude Opus 5.5: Don't parse an empty string
+     * as numerical zero.
+     */
     errno = 0;
     ulval = strtoul(tok, &_end, 16);
     if (*_end != 0
+       || _end == tok
        || (ulval == ULONG_MAX && errno == ERANGE)
        || ulval > INT_MAX)
        return TLS_PROTOCOL_INVALID;
@@ -627,12 +633,19 @@
 
     *floor = *ceiling = 0;
 
+    /* Human factors: merge ">=" or "<=" token with the next token. */
     save = cp = mystrdup(plist);
     while ((tok = mystrtok(&cp, CHARS_COMMA_SP ":")) != 0) {
        if (strncmp(tok, ">=", 2) == 0)
-           code = parse_tls_version(tok + 2, floor);
+           if (*(tok += 2) || (tok = mystrtok(&cp, CHARS_COMMA_SP ":")) != 0)
+               code = parse_tls_version(tok, floor);
+           else
+               code = TLS_PROTOCOL_INVALID;
        else if (strncmp(tok, "<=", 2) == 0)
-           code = parse_tls_version(tok + 2, ceiling);
+           if (*(tok += 2) || (tok = mystrtok(&cp, CHARS_COMMA_SP ":")) != 0)
+               code = parse_tls_version(tok, ceiling);
+           else
+               code = TLS_PROTOCOL_INVALID;
        else if (*tok == '!')
            exclude |= code =
                name_code(protocol_table, NAME_CODE_FLAG_NONE, ++tok);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/postfix-3.11.7/src/util/vstring.c 
new/postfix-3.11.8/src/util/vstring.c
--- old/postfix-3.11.7/src/util/vstring.c       2025-07-30 00:14:02.000000000 
+0200
+++ new/postfix-3.11.8/src/util/vstring.c       2026-11-19 22:14:36.000000000 
+0100
@@ -373,9 +373,9 @@
 
     /*
      * Safety net: add a gratuitous null terminator so that C-style string
-     * operations won't scribble past the end.
+     * operations won't scribble past the end. 20261113 Allow zero length.
      */
-    if (len < 1 || len > SSIZE_T_MAX - 1)
+    if (len < 0 || len > SSIZE_T_MAX - 1)
        msg_panic("vstring_alloc: bad length %ld", (long) len);
     vp = (VSTRING *) mymalloc(sizeof(*vp));
     vp->vbuf.flags = 0;

Reply via email to