]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.10-20240917-nonprod
authorWietse Z Venema <wietse@porcupine.org>
Tue, 17 Sep 2024 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <ietf-dane@dukhovni.org>
Sun, 22 Sep 2024 17:44:07 +0000 (03:44 +1000)
62 files changed:
postfix/.indent.pro
postfix/HISTORY
postfix/README_FILES/AAAREADME
postfix/README_FILES/SASL_README
postfix/README_FILES/TLSRPT_README
postfix/WISHLIST
postfix/html/SASL_README.html
postfix/html/TLSRPT_README.html
postfix/html/access.5.html
postfix/html/header_checks.5.html
postfix/html/index.html
postfix/html/makedefs.1.html
postfix/html/postcat.1.html
postfix/html/postconf.5.html
postfix/makedefs
postfix/man/man1/makedefs.1
postfix/man/man1/postcat.1
postfix/man/man5/access.5
postfix/man/man5/header_checks.5
postfix/man/man5/postconf.5
postfix/proto/TLSRPT_README.html
postfix/proto/stop.double-history
postfix/proto/stop.double-proto-html
postfix/proto/stop.spell-cc
postfix/proto/stop.spell-history
postfix/src/bounce/Makefile.in
postfix/src/bounce/bounce_notify_util.c
postfix/src/bounce/logfile-no-message-id [moved from postfix/src/bounce/logfile-no-msgid-no-eoh-event with 94% similarity]
postfix/src/bounce/logfile-with-message-id [new file with mode: 0644]
postfix/src/bounce/msgfile-no-message-id [new file with mode: 0755]
postfix/src/bounce/msgfile-no-msgid-no-eoh-event [deleted file]
postfix/src/bounce/msgfile-no-msgid-with-eoh-event [deleted file]
postfix/src/bounce/msgfile-with-message-id [new file with mode: 0755]
postfix/src/bounce/msgfile-with-msgid-no-eoh-event [deleted file]
postfix/src/bounce/msgfile-with-msgid-with-eoh-event [deleted file]
postfix/src/bounce/msgfile-with-msgid-with-filter [deleted file]
postfix/src/bounce/msgfile-with-msgid-with-long-line [deleted file]
postfix/src/bounce/no-message-id-no-thread.ref [moved from postfix/src/bounce/with-msgid-with-filter-no-thread.ref with 78% similarity]
postfix/src/bounce/no-message-id-with-thread.ref [moved from postfix/src/bounce/with-msgid-no-eoh-event-no-thread.ref with 76% similarity]
postfix/src/bounce/with-message-id-no-thread.ref [moved from postfix/src/bounce/with-msgid-with-eoh-event-no-thread.ref with 75% similarity]
postfix/src/bounce/with-message-id-with-thread.ref [moved from postfix/src/bounce/with-msgid-with-filter-with-thread.ref with 74% similarity]
postfix/src/bounce/with-msgid-no-eoh-event-with-thread.ref [deleted file]
postfix/src/bounce/with-msgid-with-eoh-event-with-thread.ref [deleted file]
postfix/src/bounce/with-msgid-with-long-line-no-thread.ref [deleted file]
postfix/src/bounce/with-msgid-with-long-line-with-thread.ref [deleted file]
postfix/src/cleanup/cleanup.h
postfix/src/cleanup/cleanup_extracted.c
postfix/src/cleanup/cleanup_message.c
postfix/src/cleanup/cleanup_state.c
postfix/src/global/mail_proto.h
postfix/src/global/mail_version.h
postfix/src/postcat/postcat.c
postfix/src/smtp/smtp.c
postfix/src/smtp/smtp.h
postfix/src/smtp/smtp_state.c
postfix/src/smtp/smtp_tls_policy.c
postfix/src/smtp/smtp_tlsrpt.c
postfix/src/tls/tls_client.c
postfix/src/tls/tls_dane.c
postfix/src/tls/tls_proxy_client_scan.c
postfix/src/tls/tlsrpt_wrapper.c
postfix/src/tlsproxy/tlsproxy.c

index 99ab2e36f0d46f4b98323cb73bccba7d84cd4198..8ee03dbe70d2992b1a03b756ed67d62e4f81fe1a 100644 (file)
 -TTLS_PRNG_SEED_INFO
 -TTLS_PRNG_SRC
 -TTLS_ROLE
--TTLSRPT_WRAPPER
 -TTLS_SCACHE
 -TTLS_SCACHE_ENTRY
 -TTLS_SERVER_INIT_PROPS
index d0f4791f75ffb0cdc4570abcabf6bb1647c4255e..1ccada3db96174c1fb4233d61965d73cb3353878 100644 (file)
@@ -28186,21 +28186,7 @@ Apologies for any names omitted.
 20240808
 
        Typofix in comment. File: global/normalize_mailhost_addr.c.
-
-20240831
-
-       Bugfix: require that stable releases have a three-number
-       mail_version value. Found by Michael Orlitzky. File:
-       mantools/check-snapshot-nonprod.
-
-20240902
-
-       Documentation: update the local_login_sender_maps description
-       with guidance to enforce that the From: header address
-       matches the envelope sender (MAIL FROM) address. File:
-       proto/postconf.proto.
-
-
 20240730 
 
        Infrastructure: added argv_addv() function to append an
@@ -28221,3 +28207,37 @@ Apologies for any names omitted.
 
        Infrastructure: added "append to buffer" option to the
        hex_encode_opt() function. Files: util/hex_encode.[hc];
+
+20240831
+
+       Bugfix: require that stable releases have a three-number
+       mail_version value. Found by Michael Orlitzky. File:
+       mantools/check-snapshot-nonprod.
+
+20240902
+
+       Documentation: update the local_login_sender_maps description
+       with guidance to enforce that the From: header address
+       matches the envelope sender (MAIL FROM) address. File:
+       proto/postconf.proto.
+20240909
+
+       Bitrot: some platforms prefer the pkgconf command over pkg-config,
+       which in turn has superseded icu-config. File: makedefs.
+
+20230910
+
+       Cleanup: the enable_threaded_bounces feature was re-implemented.
+       This simplifies the code and improves the handling of
+       multiline Message-Id: headers (no software should generate
+       those, but...). Files: bounce/bounce_notify_util.c,
+       cleanup/cleanup.h, cleanup/cleanup_extracted.c,
+       cleanup/cleanup_message.c, cleanup/cleanup_state.c,
+       global/mail_proto.h, multiple bounce testfiles.
+
+20240917
+
+       Minor feature: "postcat -f" option to prepend the filename
+       to each output line. This simplifies test data development.
+       File: postcat/postcat.c.
index f8f2fb7dc4413f4b64407dece13a92c7458e8090..94d552ece498af240de410ab1e8c210a22139f46 100644 (file)
@@ -10,7 +10,6 @@ G\bGe\ben\bne\ber\bra\bal\bl c\bco\bon\bnf\bfi\big\bgu\bur\bra\bat\bti\bio\bon\bn
   * VIRTUAL_README: Virtual domain hosting
   * SASL_README: SASL Authentication
   * TLS_README: TLS Encryption and authentication
-  * TLSRPT_README: TLSRPT notification
   * FORWARD_SECRECY_README: TLS Forward Secrecy
   * IPV6_README: IP Version 6 Support
   * SMTPUTF8_README: SMTPUTF8 Support
index 83c0b297ffce6753bb8b9e63a7fa1905511ab976..617212e5c673df14e4c6bbce0317b6eb8854a3b3 100644 (file)
@@ -185,12 +185,9 @@ You can read more about the following topics:
     cyrus_sasl_config_path and/or the distribution-specific documentation to
     determine the expected location.
 
-  * Some Debian-based Postfix distributions patch Postfix to hardcode a non-
-    default search path, making it impossible to set an alternate search path
-    via the "cyrus_sasl_config_path" parameter. This is likely to be the case
-    when the distribution documents a Postfix-specific path (e.g. /etc/postfix/
-    sasl/) that is different from the default value of "cyrus_sasl_config_path"
-    (which then is likely to be empty).
+  * Some Debian-based Postfix distributions ignore the "cyrus_sasl_config_path"
+    parameter setting, and force Postfix to open the file /etc/postfix/sasl/
+    smtpd.conf.
 
     N\bNo\bot\bte\be
 
index 7b8af476b32f714684bb339ccc0068fe2bc735bc..553a09ce901bbaadb474ac1c4ff313021d5e2829 100644 (file)
@@ -2,7 +2,7 @@ P\bPo\bos\bst\btf\bfi\bix\bx T\bTL\bLS\bSR\bRP\bPT\bT H\bHo\bow\bwt\bto\bo
 
 -------------------------------------------------------------------------------
 
-T\bTO\bOC\bC
+T\bTa\bab\bbl\ble\be o\bof\bf C\bCo\bon\bnt\bte\ben\bnt\bts\bs
 
   * Introduction
   * Building Postfix with TLSRPT support
@@ -120,7 +120,7 @@ datatracker.ietf.org/doc/html/rfc8460#section-4.5.
 
     Example:
 
-        { policy_string = version: STSv1 }, { policy_string = mode: testing },
+        { policy_string = version: STSv1 } { policy_string = mode: testing }
         ...
 
     This form ignores whitespace after the opening "{", around the "=", and
@@ -133,7 +133,7 @@ datatracker.ietf.org/doc/html/rfc8460#section-4.5.
 
     Example:
 
-        mx_host_pattern=mx1.example.com, mx_host_pattern=mx2.example.com, ...
+        mx_host_pattern=mx1.example.com mx_host_pattern=mx2.example.com ...
 
   * policy_failure=type
 
@@ -172,6 +172,6 @@ status 'success' with some recoverable 'failure'. Specifically:
 C\bCr\bre\bed\bdi\bit\bts\bs
 
   * The TLSRPT client library and report generator are implemented and
-    maintained by sys4 (sys4.de).
+    maintained by sys4.
   * Wietse Venema implemented the integration with Postfix.
 
index 92296ad808288d3f4a010a7292ee232304e1b190..f2112a779ba6c4fa0ac8aa3da179f05141a11c7f 100644 (file)
@@ -6,6 +6,12 @@ Wish list:
 
        Disable -DSNAPSHOT and -DNONPROD in makedefs.
 
+       Add tests for Message-ID extraction in the cleanup daemon.
+
+       The postdrop code should be more explicit about what
+       attrributes it will pass through. rec_attr_map() is not
+       supposed to be an approver.
+
        Many master.cf services don't expect wakeup calls, resulting
        in weird warnings. Maybe the master daemon could signal the
        wakeup intent through a child process command-line option,
@@ -16,6 +22,13 @@ Wish list:
        using FIFOs anymore, and trigger servers could use a proper
        (attribute, value) protocol.
 
+       The Sendmail feature _FFR_MDS_NEGOTIATE allows negotiating
+       a larger milter command data size limit. To be investigated:
+       what parts of the protocol are included in this limit when
+       sending a message header (header name, protocol formatting,
+       etc.) and how this will interact with the Postfix built-in
+       header_size_limit (default: 102400).
+
        SEND_ATTR_FUNC should send the name of the object being sent,
        so that SCAN_ATTR_FUNC can check it.
 
index c95ac8c84537ffe0cfc3ff04def021c4a396c51b..f02208e6ef942fafa5b294553dbecd2b804f3de7 100644 (file)
@@ -281,13 +281,9 @@ configuration file in <code>/etc/postfix/sasl/</code>,
 <a href="postconf.5.html#cyrus_sasl_config_path">cyrus_sasl_config_path</a></code> and/or the distribution-specific
 documentation to determine the expected location. </p> </li>
 
-<li> <p> Some Debian-based Postfix distributions patch Postfix to
-hardcode a non-default search path, making it impossible to set an
-alternate search path via the "<a href="postconf.5.html#cyrus_sasl_config_path">cyrus_sasl_config_path</a>" parameter.  This
-is likely to be the case when the distribution documents a
-Postfix-specific path (e.g. <code>/etc/postfix/sasl/</code>) that is
-different from the default value of "<a href="postconf.5.html#cyrus_sasl_config_path">cyrus_sasl_config_path</a>" (which
-then is likely to be empty). </p> </li>
+<li> <p> Some Debian-based Postfix distributions ignore the
+"<a href="postconf.5.html#cyrus_sasl_config_path">cyrus_sasl_config_path</a>" parameter setting, and force Postfix to
+open the file <code>/etc/postfix/sasl/smtpd.conf</code>. </p> </li>
 
 </ul>
 
index 1b153912bd7e0671467a3c950d8854c1f945ffc0..7c0749daf8cf35345647517f6b93671a57792aa0 100644 (file)
@@ -18,7 +18,7 @@
 
 <hr>
 
-<h2> TOC </h2>
+<h2> Table of Contents </h2>
 
 <ul>
 
@@ -191,7 +191,7 @@ in attribute values. </p>
 
 <blockquote>
 <pre>
-{ policy_string = version: STSv1 }, { policy_string = mode: testing }, ...
+{ policy_string = version: STSv1 } { policy_string = mode: testing } ...
 </pre> 
 </blockquote> 
 
@@ -207,7 +207,7 @@ in the MTA-STS policy. </p>
 
 <blockquote>
 <pre>
-mx_host_pattern=mx1.example.com, mx_host_pattern=mx2.example.com, ...
+mx_host_pattern=mx1.example.com mx_host_pattern=mx2.example.com ...
 </pre>
 </blockquote>
 </li>
@@ -264,7 +264,7 @@ successful TLS policy compliance. </p> </li>
 <ul>
 
 <li> The TLSRPT client library and report generator are implemented
-and maintained by sys4 (sys4.de). </li>
+and maintained by sys4. </li>
 
 <li> Wietse Venema implemented the integration with Postfix.
 </li>
index 427eacf74463cef5843d42766c2c456c4331dbd3..4d9cc2b0a111095177ae0a8ca2c8113e80f99e9a 100644 (file)
@@ -320,9 +320,13 @@ ACCESS(5)                                                            ACCESS(5)
               address instead of the intended recipient(s).  When multiple <b>RE-</b>
               <b>DIRECT</b> actions fire, only the last one takes effect.
 
-              Note:  this  action  overrides  the FILTER action, and currently
+              Note  1:  this action overrides the FILTER action, and currently
               overrides all recipients of the message.
 
+              Note 2: a REDIRECT address is subject to  canonicalization  (add
+              missing  domain)  but NOT subject to canonical, masquerade, bcc,
+              or virtual alias mapping.
+
               This feature is available in Postfix 2.1 and later.
 
        <b>INFO</b> <i>optional text...</i>
index c1c8b17cc1b6aecdfa047d8dc4441adc026bd3a8..579437f5e0b3deaaed9d0eefaaa5ecd556c908a6 100644 (file)
@@ -312,10 +312,14 @@ HEADER_CHECKS(5)                                              HEADER_CHECKS(5)
               will  be  sent  to the specified address instead of the intended
               recipient(s).
 
-              Note: this action overrides the <b>FILTER</b> action, and  affects  all
+              Note 1: this action overrides the <b>FILTER</b> action, and affects all
               recipients  of  the  message. If multiple <b>REDIRECT</b> actions fire,
               only the last one is executed.
 
+              Note 2: a REDIRECT address is subject to  canonicalization  (add
+              missing  domain)  but NOT subject to canonical, masquerade, bcc,
+              or virtual alias mapping.
+
               This feature is available in Postfix 2.1 and later.
 
               This feature is not supported with smtp header/body checks.
index 5fa7a69cd926e33de81054848ab088fbc08a9154..a7da6cb510c7e57854b419a0069103ea407e8da6 100644 (file)
@@ -43,8 +43,6 @@ configuration examples </a>
 
 <li> <a href="TLS_README.html"> TLS Encryption and authentication </a>
 
-<li> <a href="TLSRPT_README.html"> TLSRPT notification </a>
-
 <li> <a href="FORWARD_SECRECY_README.html"> TLS Forward Secrecy </a>
 
 <li> <a href="IPV6_README.html"> IP Version 6 Support </a>
index ce6725713b148c82a1d53c2d054792ee7f5d6005..3d66aa6484782e99f34f615cfb063668401edc8e 100644 (file)
@@ -66,33 +66,34 @@ MAKEDEFS(1)                                                        MAKEDEFS(1)
 
               <b>-DNO_EAI</b>
                      Do not build with EAI (SMTPUTF8) support. By default, EAI
-                     support is compiled in when the "pkg-config"  command  is
-                     found, or the deprecated "icu-config" command.
+                     support is compiled in when the "pkgconf" or "pkg-config"
+                     command  are  found,  or the deprecated "icu-config" com-
+                     mand.
 
               <b>-DNO_INLINE</b>
                      Do  not  require  support  for  C99  "inline"  functions.
-                     Instead,    implement     argument     typechecks     for
-                     non-(printf/scanf)-like  functions with ternary operators
+                     Instead,     implement     argument     typechecks    for
+                     non-(printf/scanf)-like functions with ternary  operators
                      and unreachable code.
 
               <b>-DNO_IPV6</b>
                      Do not build with IPv6 support.  By default, IPv6 support
-                     is  compiled  in on platforms that are known to have IPv6
+                     is compiled in on platforms that are known to  have  IPv6
                      support.
 
-                     Note: this directive is for debugging and  testing  only.
-                     It  is  not  guaranteed  to work on all platforms. If you
-                     don't want IPv6 support, set "<a href="postconf.5.html#inet_protocols">inet_protocols</a> =  ipv4"  in
+                     Note:  this  directive is for debugging and testing only.
+                     It is not guaranteed to work on  all  platforms.  If  you
+                     don't  want  IPv6 support, set "<a href="postconf.5.html#inet_protocols">inet_protocols</a> = ipv4" in
                      <a href="postconf.5.html">main.cf</a>.
 
               <b>-DNO_IP_CYRUS_SASL_AUTH</b>
-                     Don't  pass remote SMTP client and Postfix SMTP server IP
-                     address and port information to the Cyrus  SASL  library.
+                     Don't pass remote SMTP client and Postfix SMTP server  IP
+                     address  and  port information to the Cyrus SASL library.
                      This is compatible with Postfix &lt; 3.2.
 
               <b>-DNO_KQUEUE</b>
-                     Do  not  build  with FreeBSD/NetBSD/OpenBSD/MacOSX KQUEUE
-                     support.  By default, KQUEUE support is  compiled  in  on
+                     Do not build  with  FreeBSD/NetBSD/OpenBSD/MacOSX  KQUEUE
+                     support.   By  default,  KQUEUE support is compiled in on
                      platforms that are known to support it.
 
               <b>-DNO_NIS</b>
@@ -112,45 +113,45 @@ MAKEDEFS(1)                                                        MAKEDEFS(1)
                      Disable support for POSIX getpwnam_r/getpwuid_r.
 
               <b>-DNO_RES_NCALLS</b>
-                     Do   not   build  with  the  threadsafe  resolver(5)  API
+                     Do  not  build  with  the  threadsafe   resolver(5)   API
                      (res_ninit() etc.).
 
               <b>-DNO_SIGSETJMP</b>
-                     Use  setjmp()/longjmp()   instead   of   sigsetjmp()/sig-
-                     longjmp().   By  default,  Postfix  uses sigsetjmp()/sig-
+                     Use   setjmp()/longjmp()   instead   of  sigsetjmp()/sig-
+                     longjmp().  By  default,  Postfix  uses  sigsetjmp()/sig-
                      longjmp() when they appear to work.
 
               <b>-DNO_SNPRINTF</b>
-                     Use sprintf() instead of snprintf(). By default,  Postfix
+                     Use  sprintf() instead of snprintf(). By default, Postfix
                      uses snprintf() except on ancient systems.
 
        <b>DEBUG=</b><i>debug</i><b>_</b><i>level</i>
-              Specifies  a  non-default  debugging  level.  The default is <b>-g</b>.
+              Specifies a non-default debugging  level.  The  default  is  <b>-g</b>.
               Specify <b>DEBUG=</b> to turn off debugging.
 
        <b>OPT=</b><i>optimization</i><b>_</b><i>level</i>
-              Specifies a non-default optimization level. The default  is  <b>-O</b>.
+              Specifies  a  non-default optimization level. The default is <b>-O</b>.
               Specify <b>OPT=</b> to turn off optimization.
 
        <b>POSTFIX_INSTALL_OPTS=</b><i>-option...</i>
-              Specifies  options for the postfix-install command, separated by
-              whitespace.   Currently,   the   only   supported   option    is
+              Specifies options for the postfix-install command, separated  by
+              whitespace.    Currently,   the   only   supported   option   is
               <b>-keep-build-mtime</b>.
 
        <b>SHLIB_CFLAGS=</b><i>flags</i>
-              Override  the  compiler  flags  (typically, "-fPIC") for Postfix
+              Override the compiler flags  (typically,  "-fPIC")  for  Postfix
               dynamically-linked libraries and database plugins.
 
               This feature was introduced with Postfix 3.0.
 
        <b>SHLIB_RPATH=</b><i>rpath</i>
-              Override the  runpath  (typically,  "'-Wl,-rpath,${SHLIB_DIR}'")
+              Override  the  runpath  (typically, "'-Wl,-rpath,${SHLIB_DIR}'")
               for Postfix dynamically-linked libraries.
 
               This feature was introduced with Postfix 3.0.
 
        <b>SHLIB_SUFFIX=</b><i>suffix</i>
-              Override  the  filename  suffix  (typically,  ".so") for Postfix
+              Override the filename  suffix  (typically,  ".so")  for  Postfix
               dynamically-linked libraries and database plugins.
 
               This feature was introduced with Postfix 3.0.
@@ -158,7 +159,7 @@ MAKEDEFS(1)                                                        MAKEDEFS(1)
        <b>shared=yes</b>
 
        <b>shared=no</b>
-              Enable  (disable)   Postfix   builds   with   dynamically-linked
+              Enable   (disable)   Postfix   builds   with  dynamically-linked
               libraries typically named $<a href="postconf.5.html#shlib_directory">shlib_directory</a>/libpostfix-*.so.*.
 
               This feature was introduced with Postfix 3.0.
@@ -166,39 +167,39 @@ MAKEDEFS(1)                                                        MAKEDEFS(1)
        <b>dynamicmaps=yes</b>
 
        <b>dynamicmaps=no</b>
-              Enable  (disable)  Postfix  builds  with  the configuration file
+              Enable (disable) Postfix  builds  with  the  configuration  file
               $<a href="postconf.5.html#meta_directory">meta_directory</a>/dynamicmaps.cf and dynamically-loadable database
-              plugins  typically  named  postfix-*.so.*.   The setting "dynam-
-              icmaps=yes"  implicitly   enables   Postfix   dynamically-linked
+              plugins typically named  postfix-*.so.*.   The  setting  "dynam-
+              icmaps=yes"   implicitly   enables   Postfix  dynamically-linked
               libraries.
 
               This feature was introduced with Postfix 3.0.
 
        <b>pie=yes</b>
 
-       <b>pie=no</b> Enable  (disable)  Postfix builds with position-independent exe-
+       <b>pie=no</b> Enable (disable) Postfix builds with  position-independent  exe-
               cutables, on platforms where this is supported.
 
               This feature was introduced with Postfix 3.0.
 
        <i>installation</i><b>_</b><i>parameter</i><b>=</b><i>value</i>...
-              Override the compiled-in default value of the specified  instal-
-              lation  parameter(s).  The following parameters are supported in
+              Override  the compiled-in default value of the specified instal-
+              lation parameter(s). The following parameters are  supported  in
               this context:
 
-              <a href="postconf.5.html#command_directory">command_directory</a> <a href="postconf.5.html#config_directory">config_directory</a> <a href="postconf.5.html#daemon_directory">daemon_directory</a>  <a href="postconf.5.html#data_directory">data_direc</a>-
-              <a href="postconf.5.html#data_directory">tory</a>  <a href="postconf.5.html#default_database_type">default_database_type</a>  <a href="postconf.5.html#html_directory">html_directory</a> <a href="postconf.5.html#mail_spool_directory">mail_spool_directory</a>
-              <a href="postconf.5.html#mailq_path">mailq_path</a>  <a href="postconf.5.html#manpage_directory">manpage_directory</a>   <a href="postconf.5.html#meta_directory">meta_directory</a>   <a href="postconf.5.html#newaliases_path">newaliases_path</a>
-              <a href="postconf.5.html#queue_directory">queue_directory</a>  <a href="postconf.5.html#readme_directory">readme_directory</a>  <a href="postconf.5.html#sendmail_path">sendmail_path</a> <a href="postconf.5.html#shlib_directory">shlib_directory</a>
+              <a href="postconf.5.html#command_directory">command_directory</a>  <a href="postconf.5.html#config_directory">config_directory</a> <a href="postconf.5.html#daemon_directory">daemon_directory</a> <a href="postconf.5.html#data_directory">data_direc</a>-
+              <a href="postconf.5.html#data_directory">tory</a> <a href="postconf.5.html#default_database_type">default_database_type</a>  <a href="postconf.5.html#html_directory">html_directory</a>  <a href="postconf.5.html#mail_spool_directory">mail_spool_directory</a>
+              <a href="postconf.5.html#mailq_path">mailq_path</a>   <a href="postconf.5.html#manpage_directory">manpage_directory</a>   <a href="postconf.5.html#meta_directory">meta_directory</a>  <a href="postconf.5.html#newaliases_path">newaliases_path</a>
+              <a href="postconf.5.html#queue_directory">queue_directory</a> <a href="postconf.5.html#readme_directory">readme_directory</a>  <a href="postconf.5.html#sendmail_path">sendmail_path</a>  <a href="postconf.5.html#shlib_directory">shlib_directory</a>
               <a href="postconf.5.html#openssl_path">openssl_path</a>
 
-              See the <a href="postconf.5.html">postconf(5)</a> manpage for a description of  these  parame-
+              See  the  <a href="postconf.5.html">postconf(5)</a> manpage for a description of these parame-
               ters.
 
               This feature was introduced with Postfix 3.0.
 
        <b>WARN=</b><i>warning</i><b>_</b><i>flags</i>
-              Specifies  non-default gcc compiler warning options for use when
+              Specifies non-default gcc compiler warning options for use  when
               "make" is invoked in a source subdirectory only.
 
 <b>LICENSE</b>
index 71b763e4fe2f809c6f0505d62bba7b681434d0b8..0d228d48a41b6efbb1826d619fa0afcca8f61099 100644 (file)
@@ -11,7 +11,7 @@ POSTCAT(1)                                                          POSTCAT(1)
        postcat - show Postfix queue file contents
 
 <b>SYNOPSIS</b>
-       <b>postcat</b> [<b>-bdehnoqv</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<i>files</i>...]
+       <b>postcat</b> [<b>-bdefhnoqv</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<i>files</i>...]
 
 <b>DESCRIPTION</b>
        The  <a href="postcat.1.html"><b>postcat</b>(1)</a>  command  prints  the  contents  of  the named <i>files</i> in
@@ -41,6 +41,8 @@ POSTCAT(1)                                                          POSTCAT(1)
 
               This feature is available in Postfix 2.7 and later.
 
+       <b>-f</b>     Prepend the file name to each output line.
+
        <b>-h</b>     Show message header content.  The <b>-h</b> option produces output from
               the beginning of the message up to, but not including, the first
               non-header line.
index d816022fa5684b7af8cfa7f6e8cbad2ae946b92a..c254ab97c754e18e09b07e4c3ba6e11b428d0d37 100644 (file)
@@ -885,6 +885,10 @@ To avoid mailer loops, automatic BCC recipients are not generated
 after Postfix forwards mail internally, or after Postfix generates
 mail itself. </p>
 
+<p> Note: automatic BCC recipients are subject to address
+canonicalization (add missing domain), <a href="postconf.5.html#canonical_maps">canonical_maps</a>, <a href="postconf.5.html#masquerade_domains">masquerade_domains</a>,
+and <a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a>. </p>
+
 
 </DD>
 
@@ -1851,6 +1855,10 @@ currently used only to locate the $<a href="postconf.5.html#smtpd_sasl_path">smt
 Specify zero or more directories separated by a colon character,
 or an empty value to use Cyrus SASL's built-in search path.  </p>
 
+<p> Note: some Debian-based Postfix distributions ignore the
+"<a href="postconf.5.html#cyrus_sasl_config_path">cyrus_sasl_config_path</a>" parameter setting, and force Postfix to
+open the file <code>/etc/postfix/sasl/smtpd.conf</code>. </p>
+
 <p> This feature is available in Postfix 2.5 and later when compiled
 with Cyrus SASL 2.1.22 or later. </p>
 
@@ -6205,6 +6213,11 @@ prepend "<b>uid:</b>" to the numerical UID and use that instead. </p>
 <p> This feature ignores address extensions in the user-specified
 envelope sender address. </p>
 
+<p> Note: to enforce that the From: header address matches the envelope
+sender (MAIL FROM) address, specify an external filter such as a Milter,
+with the <a href="postconf.5.html#non_smtpd_milters">non_smtpd_milters</a> parameter. For example:
+<a href="https://github.com/magcks/milterfrom">https://github.com/magcks/milterfrom</a>. </p>
+
 <p> The following sender patterns are special; these cannot be used
 as part of a longer pattern. </p>
 
@@ -9997,6 +10010,10 @@ To avoid mailer loops, automatic BCC recipients are not generated
 after Postfix forwards mail internally, or after Postfix generates
 mail itself. </p>
 
+<p> Note: automatic BCC recipients are subject to address
+canonicalization (add missing domain), <a href="postconf.5.html#canonical_maps">canonical_maps</a>, <a href="postconf.5.html#masquerade_domains">masquerade_domains</a>,
+and <a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a>. </p>
+
 <p>
 Example:
 </p>
@@ -10735,6 +10752,10 @@ To avoid mailer loops, automatic BCC recipients are not generated
 after Postfix forwards mail internally, or after Postfix generates
 mail itself. </p>
 
+<p> Note: automatic BCC recipients are subject to address
+canonicalization (add missing domain), <a href="postconf.5.html#canonical_maps">canonical_maps</a>, <a href="postconf.5.html#masquerade_domains">masquerade_domains</a>,
+and <a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a>. </p>
+
 <p>
 Example:
 </p>
@@ -17786,10 +17807,17 @@ for authentication. The available types are listed with the
 (default: empty)</b></DT><DD>
 
 <p>
-Optional lookup table with the SASL login names that own the sender
+Optional lookup table with the SASL login names that own the
+envelope sender
 (MAIL FROM) addresses.
 </p>
 
+<blockquote> <p> Note: to enforce that the From: header address
+matches the envelope sender (MAIL FROM) address, use an external
+filter such as a Milter, for the submission, submissions, or smtps
+services. For example: <a href="https://github.com/magcks/milterfrom">https://github.com/magcks/milterfrom</a>. </p>
+</blockquote>
+
 <p>
 Specify zero or more "type:name" lookup tables, separated by
 whitespace or comma. Tables will be searched in the specified order
@@ -17892,6 +17920,11 @@ or the SASL login name is not an owner for that address.
 This prevents an authenticated client from using a MAIL FROM address
 that they do not explicitly own.
 <br>
+Note: to enforce that the From: header address matches the envelope
+sender (MAIL FROM) address, use an external filter such as a Milter,
+for the submission, submissions, or smtps services. For example:
+<a href="https://github.com/magcks/milterfrom">https://github.com/magcks/milterfrom</a>.
+<br>
 This feature is available in Postfix version 2.1 and later. </dd>
 
 <dt><b><a name="reject_known_sender_login_mismatch">reject_known_sender_login_mismatch</a></b></dt>
@@ -17908,6 +17941,11 @@ This protects any MAIL FROM address that is listed in
 $<a href="postconf.5.html#smtpd_sender_login_maps">smtpd_sender_login_maps</a>, while still allowing a client to use any
 unlisted MAIL FROM address.
 <br>
+Note: to enforce that the From: header address matches the envelope
+sender (MAIL FROM) address, use an external filter such as a Milter,
+for the submission, submissions, or smtps services. For example:
+<a href="https://github.com/magcks/milterfrom">https://github.com/magcks/milterfrom</a>.
+<br>
 This feature is available in Postfix version 2.11 and later.</dd>
 
 <dt><b><a name="reject_non_fqdn_sender">reject_non_fqdn_sender</a></b></dt>
@@ -17949,6 +17987,11 @@ authenticated with SASL.
 With SASL enabled, this prevents an unauthenticated client from
 using any MAIL FROM address that is listed in $<a href="postconf.5.html#smtpd_sender_login_maps">smtpd_sender_login_maps</a>.
 <br>
+Note: to enforce that the From: header address matches the envelope
+sender (MAIL FROM) address, use an external filter such as a Milter,
+for the submission, submissions, or smtps services. For example:
+<a href="https://github.com/magcks/milterfrom">https://github.com/magcks/milterfrom</a>.
+<br>
 This feature is available in Postfix version 2.1 and later.</dd>
 
 <dt><b><a name="reject_unknown_sender_domain">reject_unknown_sender_domain</a></b></dt>
index 248c0aa8f59e55e8634d2e0cfab67a512ec0fca4..f9458f00bb35841acf74c0872e1a9657d47651f1 100644 (file)
@@ -61,7 +61,8 @@
 #      are known to support it.
 # .IP \fB-DNO_EAI\fR
 #      Do not build with EAI (SMTPUTF8) support. By default, EAI
-#      support is compiled in when the "pkg-config" command is
+#      support is compiled in when the "pkgconf" or "pkg-config"
+#      command are
 #      found, or the deprecated "icu-config" command.
 # .IP \fB-DNO_INLINE\fR
 #      Do not require support for C99 "inline" functions. Instead,
@@ -878,8 +879,10 @@ esac
 case "$CCARGS" in
 *-DNO_EAI*) CCARGS="$CCARGS "'-DDEF_SMTPUTF8_ENABLE=\"no\"';;
         *) icu_cppflags=`((pkg-config --cflags icu-uc icu-i18n) ||
+                 (pkgconf --cflags icu-uc icu-i18n) ||
                  (icu-config --cppflags)) 2>/dev/null` && {
                icu_ldflags=`((pkg-config --libs icu-uc icu-i18n) ||
+                 (pkgconf --libs icu-uc icu-i18n) ||
                  (icu-config --ldflags)) 2>/dev/null` && {
                    trap 'rm -f makedefs.test makedefs.test.[co]' 1 2 3 15
                    cat >makedefs.test.c <<'EOF'
index c921ac25881a3a35ac1eec90feed32ae49ca6cc5..1f3f452d33ba7a99f54b6b5e97fa2a03d07d4b89 100644 (file)
@@ -64,7 +64,8 @@ By default, EPOLL support is compiled in on platforms that
 are known to support it.
 .IP \fB\-DNO_EAI\fR
 Do not build with EAI (SMTPUTF8) support. By default, EAI
-support is compiled in when the "pkg\-config" command is
+support is compiled in when the "pkgconf" or "pkg\-config"
+command are
 found, or the deprecated "icu\-config" command.
 .IP \fB\-DNO_INLINE\fR
 Do not require support for C99 "inline" functions. Instead,
index f6541eb7c94e13a632827922485bc28f392653d4..ae4ef526cf4ae9f5df7ebb1b22aed242d3ca5f94 100644 (file)
@@ -8,7 +8,7 @@ show Postfix queue file contents
 .SH "SYNOPSIS"
 .na
 .nf
-\fBpostcat\fR [\fB\-bdehnoqv\fR] [\fB\-c \fIconfig_dir\fR] [\fIfiles\fR...]
+\fBpostcat\fR [\fB\-bdefhnoqv\fR] [\fB\-c \fIconfig_dir\fR] [\fIfiles\fR...]
 .SH DESCRIPTION
 .ad
 .fi
@@ -39,6 +39,8 @@ Print the decimal type of each record.
 Show message envelope content.
 .sp
 This feature is available in Postfix 2.7 and later.
+.IP \fB\-f\fR
+Prepend the file name to each output line.
 .IP \fB\-h\fR
 Show message header content.  The \fB\-h\fR option produces
 output from the beginning of the message up to, but not
index e2eb6779ec8b7e998fed56e029590be9f86254b6..efbde6204fc465727d8b6e42f02c96cae5fd9ded 100644 (file)
@@ -329,9 +329,13 @@ After the message is queued, send the message to the specified
 address instead of the intended recipient(s).  When multiple
 \fBREDIRECT\fR actions fire, only the last one takes effect.
 .sp
-Note: this action overrides the FILTER action, and currently
+Note 1: this action overrides the FILTER action, and currently
 overrides all recipients of the message.
 .sp
+Note 2: a REDIRECT address is subject to canonicalization
+(add missing domain) but NOT subject to canonical, masquerade,
+bcc, or virtual alias mapping.
+.sp
 This feature is available in Postfix 2.1 and later.
 .IP "\fBINFO \fIoptional text...\fR
 Log an informational record with the optional text, together
index 92c1de95ed5900648dd4540fd4780e64c13a359f..fc9b6503f2b19ffb1b3060ee9c434da0427cfeff 100644 (file)
@@ -331,10 +331,14 @@ inspect the next input line. After the message is queued,
 it will be sent to the specified address instead of the
 intended recipient(s).
 .sp
-Note: this action overrides the \fBFILTER\fR action, and affects
+Note 1: this action overrides the \fBFILTER\fR action, and affects
 all recipients of the message. If multiple \fBREDIRECT\fR actions
 fire, only the last one is executed.
 .sp
+Note 2: a REDIRECT address is subject to canonicalization
+(add missing domain) but NOT subject to canonical, masquerade,
+bcc, or virtual alias mapping.
+.sp
 This feature is available in Postfix 2.1 and later.
 .sp
 This feature is not supported with smtp header/body checks.
index 19e359d300468bea6581b74e2b00a24188860b7e..05bf424aaf93454d354183d8c14785c564289736 100644 (file)
@@ -511,6 +511,10 @@ Note: automatic BCC recipients are produced only for new mail.
 To avoid mailer loops, automatic BCC recipients are not generated
 after Postfix forwards mail internally, or after Postfix generates
 mail itself.
+.PP
+Note: automatic BCC recipients are subject to address
+canonicalization (add missing domain), canonical_maps, masquerade_domains,
+and virtual_alias_maps.
 .SH anvil_rate_time_unit (default: 60s)
 The time unit over which client connection rates and other rates
 are calculated.
@@ -1111,6 +1115,10 @@ currently used only to locate the $smtpd_sasl_path.conf file.
 Specify zero or more directories separated by a colon character,
 or an empty value to use Cyrus SASL's built\-in search path.
 .PP
+Note: some Debian\-based Postfix distributions ignore the
+"cyrus_sasl_config_path" parameter setting, and force Postfix to
+open the file <code>/etc/postfix/sasl/smtpd.conf</code>.
+.PP
 This feature is available in Postfix 2.5 and later when compiled
 with Cyrus SASL 2.1.22 or later.
 .SH daemon_directory (default: see "postconf \-d" output)
@@ -3738,6 +3746,11 @@ prepend "\fBuid:\fR" to the numerical UID and use that instead.
 This feature ignores address extensions in the user\-specified
 envelope sender address.
 .PP
+Note: to enforce that the From: header address matches the envelope
+sender (MAIL FROM) address, specify an external filter such as a Milter,
+with the non_smtpd_milters parameter. For example:
+https://github.com/magcks/milterfrom.
+.PP
 The following sender patterns are special; these cannot be used
 as part of a longer pattern.
 .IP "\fB * \fR
@@ -6154,6 +6167,10 @@ To avoid mailer loops, automatic BCC recipients are not generated
 after Postfix forwards mail internally, or after Postfix generates
 mail itself.
 .PP
+Note: automatic BCC recipients are subject to address
+canonicalization (add missing domain), canonical_maps, masquerade_domains,
+and virtual_alias_maps.
+.PP
 Example:
 .PP
 .nf
@@ -6667,6 +6684,10 @@ To avoid mailer loops, automatic BCC recipients are not generated
 after Postfix forwards mail internally, or after Postfix generates
 mail itself.
 .PP
+Note: automatic BCC recipients are subject to address
+canonicalization (add missing domain), canonical_maps, masquerade_domains,
+and virtual_alias_maps.
+.PP
 Example:
 .PP
 .nf
@@ -12046,8 +12067,16 @@ for authentication. The available types are listed with the
 .PP
 This feature is available in Postfix 2.3 and later.
 .SH smtpd_sender_login_maps (default: empty)
-Optional lookup table with the SASL login names that own the sender
+Optional lookup table with the SASL login names that own the
+envelope sender
 (MAIL FROM) addresses.
+.sp
+.in +4
+Note: to enforce that the From: header address
+matches the envelope sender (MAIL FROM) address, use an external
+filter such as a Milter, for the submission, submissions, or smtps
+services. For example: https://github.com/magcks/milterfrom.
+.in -4
 .PP
 Specify zero or more "type:name" lookup tables, separated by
 whitespace or comma. Tables will be searched in the specified order
@@ -12120,6 +12149,11 @@ or the SASL login name is not an owner for that address.
 This prevents an authenticated client from using a MAIL FROM address
 that they do not explicitly own.
 .br
+Note: to enforce that the From: header address matches the envelope
+sender (MAIL FROM) address, use an external filter such as a Milter,
+for the submission, submissions, or smtps services. For example:
+https://github.com/magcks/milterfrom.
+.br
 This feature is available in Postfix version 2.1 and later.
 .br
 .IP "\fBreject_known_sender_login_mismatch\fR"
@@ -12135,6 +12169,11 @@ This protects any MAIL FROM address that is listed in
 $smtpd_sender_login_maps, while still allowing a client to use any
 unlisted MAIL FROM address.
 .br
+Note: to enforce that the From: header address matches the envelope
+sender (MAIL FROM) address, use an external filter such as a Milter,
+for the submission, submissions, or smtps services. For example:
+https://github.com/magcks/milterfrom.
+.br
 This feature is available in Postfix version 2.11 and later.
 .br
 .IP "\fBreject_non_fqdn_sender\fR"
@@ -12176,6 +12215,11 @@ authenticated with SASL.
 With SASL enabled, this prevents an unauthenticated client from
 using any MAIL FROM address that is listed in $smtpd_sender_login_maps.
 .br
+Note: to enforce that the From: header address matches the envelope
+sender (MAIL FROM) address, use an external filter such as a Milter,
+for the submission, submissions, or smtps services. For example:
+https://github.com/magcks/milterfrom.
+.br
 This feature is available in Postfix version 2.1 and later.
 .br
 .IP "\fBreject_unknown_sender_domain\fR"
index 13d8aa653acc0d22158c3aa1a41562460136c4c0..f5f9f238e278cfe756c49d84c0cc230078b2095c 100644 (file)
@@ -18,7 +18,7 @@
 
 <hr>
 
-<h2> TOC </h2>
+<h2> Table of Contents </h2>
 
 <ul>
 
@@ -191,7 +191,7 @@ in attribute values. </p>
 
 <blockquote>
 <pre>
-{ policy_string = version: STSv1 }, { policy_string = mode: testing }, ...
+{ policy_string = version: STSv1 } { policy_string = mode: testing } ...
 </pre> 
 </blockquote> 
 
@@ -207,7 +207,7 @@ in the MTA-STS policy. </p>
 
 <blockquote>
 <pre>
-mx_host_pattern=mx1.example.com, mx_host_pattern=mx2.example.com, ...
+mx_host_pattern=mx1.example.com mx_host_pattern=mx2.example.com ...
 </pre>
 </blockquote>
 </li>
@@ -264,7 +264,7 @@ successful TLS policy compliance. </p> </li>
 <ul>
 
 <li> The TLSRPT client library and report generator are implemented
-and maintained by sys4 (sys4.de). </li>
+and maintained by sys4. </li>
 
 <li> Wietse Venema implemented the integration with Postfix.
 </li>
index 843e59edec6d82d65c071512b2b9cf47679eb286..3e1bff20c4039871fe8df002ba9e2e7a39773024 100644 (file)
@@ -128,3 +128,5 @@ proto  proto mysql_table proto pgsql_table proto ldap_table
  an unknown or unimplemented command File smtpd smtpd c 
  inside more consistent Files proto master pipe pipe c 
  unimplemented commands in the SMTP server File smtpd smtpd c 
+ cleanup cleanup h cleanup cleanup_extracted c 
+ File postcat postcat c 
index c63bcdaab94b16456f16dbc8261a322a510768c7..fbf3bda6bae208b0c92a25e774a9a976bb34578e 100644 (file)
@@ -359,3 +359,4 @@ Postfix  Postfix can use MongoDB as a source for any of its lookups aliases 5 vi
  CCARGS CCARGS DHAS_MONGODB I usr include libmongoc 1 0 
  dt dt dd 2 Also enable verbose logging in the Postfix TLS
 Postfix  Postfix legacy TLS Support
+ A good socket location would be under queue_directory run tlsrpt or queue_directory var run tlsrpt These can then be configured in Postfix as a relative pathname run tlsrpt tlsrpt sock or var run tlsrpt tlsrpt sock so that the same name will
index e68fbd1c1433258133df9ae939a8dd399ec6737a..fc8cb21063fe981742c35b8ab12e453306dd8c10 100644 (file)
@@ -1845,3 +1845,4 @@ rcv
 snd
 sts
 tlsrprt
+bdefhnoqv
index 87de3f6f19649de14f1005b5cfa0441c662c3670..0b5f5be48c705759f3b94c04d75cf796778062a6 100644 (file)
@@ -81,3 +81,5 @@ cgi
 mozilla
 Dilyan
 Palauzov
+pkgconf
+testfiles
index 25bbc5cdfaff1a3725f86f6ee4edc6c6b26d7cfc..c0b4c383cde34e1f03a2f233091ab4e5d6539542 100644 (file)
@@ -39,12 +39,7 @@ Makefile: Makefile.in
 test:  $(TESTPROG)
 
 tests: update template_test obs_template_test 2template_test \
-       with-msgid-with-long-line_test \
-       with-msgid-with-eoh-event_test \
-       with-msgid-no-eoh-event_test \
-       no-msgid-with-eoh-event_test \
-       no-msgid-no-eoh-event_test \
-       with-msgid-with-filter_test
+       with-message-id_test no-message-id_test
 
 root_tests:
 
@@ -72,9 +67,9 @@ template_test: $(PROG) template_test.ref
        echo myhostname=example.com >>main.cf
        echo header_from_format=standard >>main.cf
        touch -t 197101010000 main.cf
-       MAIL_CONFIG=. ./$(PROG) -SVzndump_templates >template_test.tmp
+       MAIL_CONFIG=. $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -SVzndump_templates >template_test.tmp
        diff template_test.ref template_test.tmp
-       MAIL_CONFIG=. ./$(PROG) -SVzndump_templates \
+       MAIL_CONFIG=. $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -SVzndump_templates \
            -o bounce_template_file=template_test.ref > template_test.tmp
        diff template_test.ref template_test.tmp
        rm -f template_test.tmp main.cf
@@ -84,7 +79,7 @@ obs_template_test: $(PROG) obs_template_test.ref
        echo myhostname=example.com >>main.cf
        echo header_from_format=obsolete >>main.cf
        touch -t 197101010000 main.cf
-       MAIL_CONFIG=. ./$(PROG) -SVzndump_templates >template_test.tmp
+       MAIL_CONFIG=. $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -SVzndump_templates >template_test.tmp
        diff obs_template_test.ref template_test.tmp
        rm -f template_test.tmp main.cf
 
@@ -92,29 +87,31 @@ obs_template_test: $(PROG) obs_template_test.ref
        echo queue_directory=. >main.cf
        echo myhostname=example.com >>main.cf
        touch -t 197101010000 main.cf
-       MAIL_CONFIG=. ./$(PROG) -SVzndump_templates \
+       MAIL_CONFIG=. $(SHLIB_ENV) $(VALGRIND) ./$(PROG) -SVzndump_templates \
            -o bounce_template_file=2template_test.in > template_test.tmp
        diff template_test.ref template_test.tmp
        rm -f template_test.tmp main.cf
 
-with-msgid-with-long-line_test: bounce_notify_util_tester \
-       msgfile-with-msgid-with-long-line logfile-with-msgid-with-long-line \
-       with-msgid-with-long-line-no-thread.ref \
-       with-msgid-with-long-line-with-thread.ref
+# This tests only the handling of an extracted message ID. The
+# tests for extracting a message ID belong with the cleanup code.
+with-message-id_test: bounce_notify_util_tester \
+       msgfile-with-message-id logfile-with-message-id \
+       with-message-id-no-thread.ref \
+       with-message-id-with-thread.ref
        rm -rf queue main.cf
        echo 'enable_threaded_bounces = no' >main.cf 
        echo 'queue_directory = queue' >>main.cf 
        echo 'myhostname = mail.example' >>main.cf 
        touch -t 197101010000 main.cf
        mkdir -p queue/active queue/bounce
-       cp logfile-with-msgid-with-long-line queue/bounce/msgid
-       cp msgfile-with-msgid-with-long-line queue/active/msgid
+       cp logfile-with-message-id queue/bounce/msgid
+       cp msgfile-with-message-id queue/active/msgid
        $(SHLIB_ENV) $(VALGRIND) ./bounce_notify_util_tester \
            -c. bounce active msgid 2>&1 | \
            sed 's;msgid.[0-9]*/mail.example;msgid.unix-time/mail.example;' \
-           > with-msgid-with-long-line-no-thread.tmp
-       diff with-msgid-with-long-line-no-thread.ref with-msgid-with-long-line-no-thread.tmp
-       rm -f with-msgid-with-long-line-no-thread.tmp
+           > with-message-id-no-thread.tmp
+       diff with-message-id-no-thread.ref with-message-id-no-thread.tmp
+       rm -f with-message-id-no-thread.tmp
        :
        rm -rf queue main.cf
        echo 'enable_threaded_bounces = yes' >main.cf 
@@ -122,34 +119,34 @@ with-msgid-with-long-line_test: bounce_notify_util_tester \
        echo 'myhostname = mail.example' >>main.cf 
        touch -t 197101010000 main.cf
        mkdir -p queue/active queue/bounce
-       cp logfile-with-msgid-with-long-line queue/bounce/msgid
-       cp msgfile-with-msgid-with-long-line queue/active/msgid
+       cp logfile-with-message-id queue/bounce/msgid
+       cp msgfile-with-message-id queue/active/msgid
        $(SHLIB_ENV) $(VALGRIND) ./bounce_notify_util_tester \
            -c. bounce active msgid 2>&1 | \
            sed 's;msgid.[0-9]*/mail.example;msgid.unix-time/mail.example;' \
-           > with-msgid-with-long-line-with-thread.tmp
-       diff with-msgid-with-long-line-with-thread.ref with-msgid-with-long-line-with-thread.tmp
-       rm -f with-msgid-with-long-line-with-thread.tmp
+           > with-message-id-with-thread.tmp
+       diff with-message-id-with-thread.ref with-message-id-with-thread.tmp
+       rm -f with-message-id-with-thread.tmp
        rm -rf queue main.cf
 
-with-msgid-with-eoh-event_test: bounce_notify_util_tester \
-       msgfile-with-msgid-with-eoh-event logfile-with-msgid-with-eoh-event \
-       with-msgid-with-eoh-event-no-thread.ref \
-       with-msgid-with-eoh-event-with-thread.ref
+no-message-id_test: bounce_notify_util_tester \
+       msgfile-no-message-id logfile-no-message-id \
+       no-message-id-no-thread.ref \
+       no-message-id-with-thread.ref
        rm -rf queue main.cf
        echo 'enable_threaded_bounces = no' >main.cf 
        echo 'queue_directory = queue' >>main.cf 
        echo 'myhostname = mail.example' >>main.cf 
        touch -t 197101010000 main.cf
        mkdir -p queue/active queue/bounce
-       cp logfile-with-msgid-with-eoh-event queue/bounce/msgid
-       cp msgfile-with-msgid-with-eoh-event queue/active/msgid
+       cp logfile-no-message-id queue/bounce/msgid
+       cp msgfile-no-message-id queue/active/msgid
        $(SHLIB_ENV) $(VALGRIND) ./bounce_notify_util_tester \
            -c. bounce active msgid 2>&1 | \
            sed 's;msgid.[0-9]*/mail.example;msgid.unix-time/mail.example;' \
-           > with-msgid-with-eoh-event-no-thread.tmp
-       diff with-msgid-with-eoh-event-no-thread.ref with-msgid-with-eoh-event-no-thread.tmp
-       rm -f with-msgid-with-eoh-event-no-thread.tmp
+           > no-message-id-no-thread.tmp
+       diff no-message-id-no-thread.ref no-message-id-no-thread.tmp
+       rm -f no-message-id-no-thread.tmp
        :
        rm -rf queue main.cf
        echo 'enable_threaded_bounces = yes' >main.cf 
@@ -157,154 +154,14 @@ with-msgid-with-eoh-event_test: bounce_notify_util_tester \
        echo 'myhostname = mail.example' >>main.cf 
        touch -t 197101010000 main.cf
        mkdir -p queue/active queue/bounce
-       cp logfile-with-msgid-with-eoh-event queue/bounce/msgid
-       cp msgfile-with-msgid-with-eoh-event queue/active/msgid
+       cp logfile-no-message-id queue/bounce/msgid
+       cp msgfile-no-message-id queue/active/msgid
        $(SHLIB_ENV) $(VALGRIND) ./bounce_notify_util_tester \
            -c. bounce active msgid 2>&1 | \
            sed 's;msgid.[0-9]*/mail.example;msgid.unix-time/mail.example;' \
-           > with-msgid-with-eoh-event-with-thread.tmp
-       diff with-msgid-with-eoh-event-with-thread.ref with-msgid-with-eoh-event-with-thread.tmp
-       rm -f with-msgid-with-eoh-event-with-thread.tmp
-       rm -rf queue main.cf
-
-with-msgid-no-eoh-event_test: bounce_notify_util_tester \
-       msgfile-with-msgid-no-eoh-event logfile-with-msgid-no-eoh-event \
-       with-msgid-no-eoh-event-no-thread.ref \
-       with-msgid-no-eoh-event-with-thread.ref
-       rm -rf queue main.cf
-       echo 'enable_threaded_bounces = no' >main.cf 
-       echo 'queue_directory = queue' >>main.cf 
-       echo 'myhostname = mail.example' >>main.cf 
-       touch -t 197101010000 main.cf
-       mkdir -p queue/active queue/bounce
-       cp logfile-with-msgid-no-eoh-event queue/bounce/msgid
-       cp msgfile-with-msgid-no-eoh-event queue/active/msgid
-       $(SHLIB_ENV) $(VALGRIND) ./bounce_notify_util_tester \
-           -c. bounce active msgid 2>&1 | \
-           sed 's;msgid.[0-9]*/mail.example;msgid.unix-time/mail.example;' \
-           > with-msgid-no-eoh-event-no-thread.tmp
-       diff with-msgid-no-eoh-event-no-thread.ref with-msgid-no-eoh-event-no-thread.tmp
-       rm -f with-msgid-no-eoh-event-no-thread.tmp
-       :
-       rm -rf queue main.cf
-       echo 'enable_threaded_bounces = yes' >main.cf 
-       echo 'queue_directory = queue' >>main.cf 
-       echo 'myhostname = mail.example' >>main.cf 
-       touch -t 197101010000 main.cf
-       mkdir -p queue/active queue/bounce
-       cp logfile-with-msgid-no-eoh-event queue/bounce/msgid
-       cp msgfile-with-msgid-no-eoh-event queue/active/msgid
-       $(SHLIB_ENV) $(VALGRIND) ./bounce_notify_util_tester \
-           -c. bounce active msgid 2>&1 | \
-           sed 's;msgid.[0-9]*/mail.example;msgid.unix-time/mail.example;' \
-           > with-msgid-no-eoh-event-with-thread.tmp
-       diff with-msgid-no-eoh-event-with-thread.ref with-msgid-no-eoh-event-with-thread.tmp
-       rm -f with-msgid-no-eoh-event-with-thread.tmp
-       rm -rf queue main.cf
-
-no-msgid-with-eoh-event_test: bounce_notify_util_tester \
-       msgfile-no-msgid-with-eoh-event logfile-no-msgid-with-eoh-event \
-       no-msgid-with-eoh-event-no-thread.ref \
-       no-msgid-with-eoh-event-with-thread.ref
-       rm -rf queue main.cf
-       echo 'enable_threaded_bounces = no' >main.cf 
-       echo 'queue_directory = queue' >>main.cf 
-       echo 'myhostname = mail.example' >>main.cf 
-       touch -t 197101010000 main.cf
-       mkdir -p queue/active queue/bounce
-       cp logfile-no-msgid-with-eoh-event queue/bounce/msgid
-       cp msgfile-no-msgid-with-eoh-event queue/active/msgid
-       $(SHLIB_ENV) $(VALGRIND) ./bounce_notify_util_tester \
-           -c. bounce active msgid 2>&1 | \
-           sed 's;msgid.[0-9]*/mail.example;msgid.unix-time/mail.example;' \
-           > no-msgid-with-eoh-event-no-thread.tmp
-       diff no-msgid-with-eoh-event-no-thread.ref no-msgid-with-eoh-event-no-thread.tmp
-       rm -f no-msgid-with-eoh-event-no-thread.tmp
-       :
-       rm -rf queue main.cf
-       echo 'enable_threaded_bounces = yes' >main.cf 
-       echo 'queue_directory = queue' >>main.cf 
-       echo 'myhostname = mail.example' >>main.cf 
-       touch -t 197101010000 main.cf
-       mkdir -p queue/active queue/bounce
-       cp logfile-no-msgid-with-eoh-event queue/bounce/msgid
-       cp msgfile-no-msgid-with-eoh-event queue/active/msgid
-       $(SHLIB_ENV) $(VALGRIND) ./bounce_notify_util_tester \
-           -c. bounce active msgid 2>&1 | \
-           sed 's;msgid.[0-9]*/mail.example;msgid.unix-time/mail.example;' \
-           > no-msgid-with-eoh-event-with-thread.tmp
-       diff no-msgid-with-eoh-event-with-thread.ref no-msgid-with-eoh-event-with-thread.tmp
-       rm -f no-msgid-with-eoh-event-with-thread.tmp
-       rm -rf queue main.cf
-
-no-msgid-no-eoh-event_test: bounce_notify_util_tester \
-       msgfile-no-msgid-no-eoh-event logfile-no-msgid-no-eoh-event \
-       no-msgid-no-eoh-event-no-thread.ref \
-       no-msgid-no-eoh-event-with-thread.ref
-       rm -rf queue main.cf
-       echo 'enable_threaded_bounces = no' >main.cf 
-       echo 'queue_directory = queue' >>main.cf 
-       echo 'myhostname = mail.example' >>main.cf 
-       touch -t 197101010000 main.cf
-       mkdir -p queue/active queue/bounce
-       cp logfile-no-msgid-no-eoh-event queue/bounce/msgid
-       cp msgfile-no-msgid-no-eoh-event queue/active/msgid
-       $(SHLIB_ENV) $(VALGRIND) ./bounce_notify_util_tester \
-           -c. bounce active msgid 2>&1 | \
-           sed 's;msgid.[0-9]*/mail.example;msgid.unix-time/mail.example;' \
-           > no-msgid-no-eoh-event-no-thread.tmp
-       diff no-msgid-no-eoh-event-no-thread.ref no-msgid-no-eoh-event-no-thread.tmp
-       rm -f no-msgid-no-eoh-event-no-thread.tmp
-       :
-       rm -rf queue main.cf
-       echo 'enable_threaded_bounces = yes' >main.cf 
-       echo 'queue_directory = queue' >>main.cf 
-       echo 'myhostname = mail.example' >>main.cf 
-       touch -t 197101010000 main.cf
-       mkdir -p queue/active queue/bounce
-       cp logfile-no-msgid-no-eoh-event queue/bounce/msgid
-       cp msgfile-no-msgid-no-eoh-event queue/active/msgid
-       $(SHLIB_ENV) $(VALGRIND) ./bounce_notify_util_tester \
-           -c. bounce active msgid 2>&1 | \
-           sed 's;msgid.[0-9]*/mail.example;msgid.unix-time/mail.example;' \
-           > no-msgid-no-eoh-event-with-thread.tmp
-       diff no-msgid-no-eoh-event-with-thread.ref no-msgid-no-eoh-event-with-thread.tmp
-       rm -f no-msgid-no-eoh-event-with-thread.tmp
-       rm -rf queue main.cf
-
-with-msgid-with-filter_test: bounce_notify_util_tester \
-       msgfile-with-msgid-with-filter logfile-with-msgid-with-filter \
-       with-msgid-with-filter-no-thread.ref \
-       with-msgid-with-filter-with-thread.ref
-       rm -rf queue main.cf
-       echo 'enable_threaded_bounces = no' >main.cf 
-       echo 'queue_directory = queue' >>main.cf 
-       echo 'myhostname = mail.example' >>main.cf 
-       touch -t 197101010000 main.cf
-       mkdir -p queue/active queue/bounce
-       cp logfile-with-msgid-with-filter queue/bounce/msgid
-       cp msgfile-with-msgid-with-filter queue/active/msgid
-       $(SHLIB_ENV) $(VALGRIND) ./bounce_notify_util_tester \
-           -c. bounce active msgid 2>&1 | \
-           sed 's;msgid.[0-9]*/mail.example;msgid.unix-time/mail.example;' \
-           > with-msgid-with-filter-no-thread.tmp
-       diff with-msgid-with-filter-no-thread.ref with-msgid-with-filter-no-thread.tmp
-       rm -f with-msgid-with-filter-no-thread.tmp
-       :
-       rm -rf queue main.cf
-       echo 'enable_threaded_bounces = yes' >main.cf 
-       echo 'queue_directory = queue' >>main.cf 
-       echo 'myhostname = mail.example' >>main.cf 
-       touch -t 197101010000 main.cf
-       mkdir -p queue/active queue/bounce
-       cp logfile-with-msgid-with-filter queue/bounce/msgid
-       cp msgfile-with-msgid-with-filter queue/active/msgid
-       $(SHLIB_ENV) $(VALGRIND) ./bounce_notify_util_tester \
-           -c. bounce active msgid 2>&1 | \
-           sed 's;msgid.[0-9]*/mail.example;msgid.unix-time/mail.example;' \
-           > with-msgid-with-filter-with-thread.tmp
-       diff with-msgid-with-filter-with-thread.ref with-msgid-with-filter-with-thread.tmp
-       rm -f with-msgid-with-filter-with-thread.tmp
+           > no-message-id-with-thread.tmp
+       diff no-message-id-with-thread.ref no-message-id-with-thread.tmp
+       rm -f no-message-id-with-thread.tmp
        rm -rf queue main.cf
 
 depend: $(MAKES)
index 2482359545e1f0240425f7cbe2f4b9fdec54fbf0..bfc92c567b7b2e8addca2686f6773f4680f3e673 100644 (file)
@@ -230,10 +230,7 @@ static BOUNCE_INFO *bounce_mail_alloc(const char *service,
 {
     BOUNCE_INFO *bounce_info;
     int     rec_type;
-    int     prev_type;
-    int     all_headers_seen = 0;
     int     skip_message_segment = 0;
-    int     in_envelope = 1;
 
     /*
      * Bundle up a bunch of parameters and initialize information that will
@@ -322,9 +319,8 @@ static BOUNCE_INFO *bounce_mail_alloc(const char *service,
                    DELIVER_LOCK_MODE) < 0)
            msg_fatal("cannot get shared lock on %s: %m",
                      VSTREAM_PATH(bounce_info->orig_fp));
-       for (prev_type = 0;
-       (rec_type = rec_get(bounce_info->orig_fp, bounce_info->buf, 0)) > 0;
-            prev_type = rec_type) {
+       while ((rec_type =
+               rec_get(bounce_info->orig_fp, bounce_info->buf, 0)) > 0) {
 
            /*
             * Postfix version dependent: data offset in SIZE record.
@@ -368,76 +364,28 @@ static BOUNCE_INFO *bounce_mail_alloc(const char *service,
                    msg_warn("%s: no sender before message content record",
                             bounce_info->queue_id);
                bounce_info->orig_offs = vstream_ftell(bounce_info->orig_fp);
-               if (var_threaded_bounce == 0)
-                   skip_message_segment = 1;
-               else
-                   in_envelope = 0;
+               skip_message_segment = 1;
            }
 
            /*
-            * Extract Message-ID for threaded bounces.
+            * Extract Message-ID from extracted segment, for use in threaded
+            * bounces.
             */
-           else if (in_envelope == 0
-             && (rec_type == REC_TYPE_NORM || rec_type == REC_TYPE_CONT)) {
-               const HEADER_OPTS *hdr;
-               char   *cp;
-
-               /*
-                * Skip records that we cannot use. Degrade if we could not
-                * skip over the message content.
-                */
-               if (var_threaded_bounce == 0 || all_headers_seen
-                   || prev_type == REC_TYPE_CONT) {
-                    /* void */ ;
-               }
-
-               /*
-                * Extract message-id header value.
-                */
-               else if (is_header(STR(bounce_info->buf))) {
-                   if ((hdr = header_opts_find(
-                                       vstring_str(bounce_info->buf))) != 0
-                       && hdr->type == HDR_MESSAGE_ID) {
-                       vstring_truncate(bounce_info->buf,
-                                        trimblanks(STR(bounce_info->buf),
-                                                   LEN(bounce_info->buf))
-                                        - STR(bounce_info->buf));
-                       cp = STR(bounce_info->buf) + strlen(hdr->name) + 1;
-                       while (ISSPACE(*cp))
-                           cp++;
-                       if (*cp == '<' && vstring_end(bounce_info->buf)[-1] == '>')
-                           vstring_strcpy(bounce_info->orig_msgid, cp);
-                       else
-                           msg_warn("%s: ignoring malformed Message-ID",
-                                    bounce_info->queue_id);
+           else if (rec_type == REC_TYPE_ATTR && var_threaded_bounce) {
+               char   *cp = STR(bounce_info->buf);
+               ssize_t len = sizeof(MAIL_ATTR_MESSAGE_ID);
+               char   *err;
+
+               if (strncmp(cp, MAIL_ATTR_MESSAGE_ID "=", len) == 0) {
+                   cp += len;
+                   if ((err = extpar(&cp, "<>", EXTPAR_FLAG_NONE)) != 0) {
+                       msg_warn("%s: malformed Message-ID attribute: %s",
+                                bounce_info->queue_id, err);
+                       myfree(err);
+                   } else {
+                       vstring_sprintf(bounce_info->orig_msgid, "<%s>", cp);
                    }
                }
-
-               /*
-                * Skip remainder of multiline header.
-                */
-               else if (ISSPACE(*STR(bounce_info->buf))) {
-                    /* void */ ;
-               }
-
-               /*
-                * Start of body.
-                */
-               else {
-                   all_headers_seen = 1;
-                   skip_message_segment = 1;
-               }
-           }
-
-           /*
-            * In case we ever want to process records from the extracted
-            * segment, and in case there was no "start of body" event.
-            */
-           else if (rec_type == REC_TYPE_XTRA) {
-               if (VSTRING_LEN(bounce_info->orig_msgid) == 0)
-                   if (var_threaded_bounce)
-                       all_headers_seen = 1;
-               in_envelope = 1;
            }
 
            /*
@@ -446,7 +394,7 @@ static BOUNCE_INFO *bounce_mail_alloc(const char *service,
            if (bounce_info->orig_offs > 0
                && bounce_info->arrival_time > 0
                && VSTRING_LEN(bounce_info->sender) > 0
-               && (var_threaded_bounce == 0 || all_headers_seen
+               && (var_threaded_bounce == 0
                    || VSTRING_LEN(bounce_info->orig_msgid) > 0)) {
                break;
            }
similarity index 94%
rename from postfix/src/bounce/logfile-no-msgid-no-eoh-event
rename to postfix/src/bounce/logfile-no-message-id
index 50233c8179519579db4b35c26a4595781dfe9ab9..d10c97fc4721bfd0462e41d5969d378073739719 100644 (file)
@@ -1,7 +1,7 @@
 
 recipient = rcpt-address
 original_recipient = rcpt-orig_addr
-offset = 272
+offset = 281
 notify_flags = rcpt-dsn_notify
 status = dsn-status
 action = dsn-action
diff --git a/postfix/src/bounce/logfile-with-message-id b/postfix/src/bounce/logfile-with-message-id
new file mode 100644 (file)
index 0000000..2ca93c3
--- /dev/null
@@ -0,0 +1,13 @@
+
+recipient = rcpt-address
+original_recipient = rcpt-orig_addr
+offset = 280
+notify_flags = rcpt-dsn_notify
+status = dsn-status
+action = dsn-action
+diag_type = dsn-dtype
+diag_text = dsn-dtext
+mta_type = dsn-mtype
+mta_mname = dsn-mname
+reason = dsn-reason
+
diff --git a/postfix/src/bounce/msgfile-no-message-id b/postfix/src/bounce/msgfile-no-message-id
new file mode 100755 (executable)
index 0000000..2e80323
Binary files /dev/null and b/postfix/src/bounce/msgfile-no-message-id differ
diff --git a/postfix/src/bounce/msgfile-no-msgid-no-eoh-event b/postfix/src/bounce/msgfile-no-msgid-no-eoh-event
deleted file mode 100755 (executable)
index 694f5db..0000000
Binary files a/postfix/src/bounce/msgfile-no-msgid-no-eoh-event and /dev/null differ
diff --git a/postfix/src/bounce/msgfile-no-msgid-with-eoh-event b/postfix/src/bounce/msgfile-no-msgid-with-eoh-event
deleted file mode 100755 (executable)
index b3b795e..0000000
Binary files a/postfix/src/bounce/msgfile-no-msgid-with-eoh-event and /dev/null differ
diff --git a/postfix/src/bounce/msgfile-with-message-id b/postfix/src/bounce/msgfile-with-message-id
new file mode 100755 (executable)
index 0000000..4495ee2
Binary files /dev/null and b/postfix/src/bounce/msgfile-with-message-id differ
diff --git a/postfix/src/bounce/msgfile-with-msgid-no-eoh-event b/postfix/src/bounce/msgfile-with-msgid-no-eoh-event
deleted file mode 100755 (executable)
index cc16c66..0000000
Binary files a/postfix/src/bounce/msgfile-with-msgid-no-eoh-event and /dev/null differ
diff --git a/postfix/src/bounce/msgfile-with-msgid-with-eoh-event b/postfix/src/bounce/msgfile-with-msgid-with-eoh-event
deleted file mode 100755 (executable)
index ffe30c4..0000000
Binary files a/postfix/src/bounce/msgfile-with-msgid-with-eoh-event and /dev/null differ
diff --git a/postfix/src/bounce/msgfile-with-msgid-with-filter b/postfix/src/bounce/msgfile-with-msgid-with-filter
deleted file mode 100755 (executable)
index d6e77c4..0000000
Binary files a/postfix/src/bounce/msgfile-with-msgid-with-filter and /dev/null differ
diff --git a/postfix/src/bounce/msgfile-with-msgid-with-long-line b/postfix/src/bounce/msgfile-with-msgid-with-long-line
deleted file mode 100755 (executable)
index 69d2801..0000000
Binary files a/postfix/src/bounce/msgfile-with-msgid-with-long-line and /dev/null differ
similarity index 78%
rename from postfix/src/bounce/with-msgid-with-filter-no-thread.ref
rename to postfix/src/bounce/no-message-id-no-thread.ref
index adcd507523c53898697bff87ebd1ebf5c4985c4b..bc5f5098fb2ef208a0831fb934afba1f3b177519 100644 (file)
@@ -24,7 +24,7 @@ Reporting-MTA: dns; mail.example
 Original-Envelope-Id: TEST-ENVID
 X-Postfix-Queue-ID: msgid
 X-Postfix-Sender: rfc822; sender@sender.example
-Arrival-Date: Sat, 05 Dec 2020 13:31:48 -0500 (EST)
+Arrival-Date: Wed, 11 Sep 2024 18:05:54 -0400 (EDT)
 
 Final-Recipient: rfc822; rcpt-address
 Original-Recipient: rfc822; rcpt-orig_addr
@@ -38,11 +38,12 @@ Content-Description: Undelivered Message
 Content-Type: message/rfc822
 
 Return-Path: <sender@sender.example>
-Received: by wzv.porcupine.org (Postfix, from userid 0)
-       id 4CpJ7m6tprz4w4Y; Sat,  5 Dec 2020 18:31:48 +0000 (UTC)
-From: <sender@sender.example>
-To: <recipient@recipient.example>
-Message-Id: <12345@mta-name.example>
-Subject: with-msgid-no-eoh-event
+Received: by wzv.porcupine.org (Postfix, from userid 1000)
+       id 4X3vqF3bwhz5Yqq; Wed, 11 Sep 2024 18:05:54 -0400 (EDT)
+From: sender@sender.example
+To: recipient@recipient.example
+Subject: no-message-id
+
+asdasdd
 
 --msgid.unix-time/mail.example--
similarity index 76%
rename from postfix/src/bounce/with-msgid-no-eoh-event-no-thread.ref
rename to postfix/src/bounce/no-message-id-with-thread.ref
index 020d9a4c1d2f4b644cc3d3e742a269e8e68401fc..bc5f5098fb2ef208a0831fb934afba1f3b177519 100644 (file)
@@ -24,7 +24,7 @@ Reporting-MTA: dns; mail.example
 Original-Envelope-Id: TEST-ENVID
 X-Postfix-Queue-ID: msgid
 X-Postfix-Sender: rfc822; sender@sender.example
-Arrival-Date: Sun, 29 Nov 2020 10:30:41 -0500 (EST)
+Arrival-Date: Wed, 11 Sep 2024 18:05:54 -0400 (EDT)
 
 Final-Recipient: rfc822; rcpt-address
 Original-Recipient: rfc822; rcpt-orig_addr
@@ -38,12 +38,12 @@ Content-Description: Undelivered Message
 Content-Type: message/rfc822
 
 Return-Path: <sender@sender.example>
-Received: by wzv.porcupine.org (Postfix, from userid 0)
-       id 4CkXPY0myNz4w4g; Sun, 29 Nov 2020 15:30:41 +0000 (UTC)
-From: <sender@sender.example>
-To: <recipient@recipient.example>
-Message-Id: <12345@mta-name.example>
-Subject: with-msgid-no-eoh-event
-Date: Sun, 29 Nov 2020 15:30:41 +0000 (UTC)
+Received: by wzv.porcupine.org (Postfix, from userid 1000)
+       id 4X3vqF3bwhz5Yqq; Wed, 11 Sep 2024 18:05:54 -0400 (EDT)
+From: sender@sender.example
+To: recipient@recipient.example
+Subject: no-message-id
+
+asdasdd
 
 --msgid.unix-time/mail.example--
similarity index 75%
rename from postfix/src/bounce/with-msgid-with-eoh-event-no-thread.ref
rename to postfix/src/bounce/with-message-id-no-thread.ref
index 70afb5f333aadb1488e8f1ba66a29d089f5eaff7..a013965ce22b50a4d544f3c5729ed0ee4cb2954a 100644 (file)
@@ -24,7 +24,7 @@ Reporting-MTA: dns; mail.example
 Original-Envelope-Id: TEST-ENVID
 X-Postfix-Queue-ID: msgid
 X-Postfix-Sender: rfc822; sender@sender.example
-Arrival-Date: Sun, 29 Nov 2020 10:30:41 -0500 (EST)
+Arrival-Date: Wed, 11 Sep 2024 18:05:54 -0400 (EDT)
 
 Final-Recipient: rfc822; rcpt-address
 Original-Recipient: rfc822; rcpt-orig_addr
@@ -38,14 +38,14 @@ Content-Description: Undelivered Message
 Content-Type: message/rfc822
 
 Return-Path: <sender@sender.example>
-Received: by wzv.porcupine.org (Postfix, from userid 0)
-       id 4CkXPY10M8z4w4l; Sun, 29 Nov 2020 15:30:41 +0000 (UTC)
-From: <sender@sender.example>
-To: <recipient@recipient.example>
-Message-Id: <12345@mta-name.example>
-Subject: with-msgid-with-eoh-event
-Date: Sun, 29 Nov 2020 15:30:41 +0000 (UTC)
-
-body text
+Received: by wzv.porcupine.org (Postfix, from userid 1000)
+       id 4X3vqF3RdBz5Yqn; Wed, 11 Sep 2024 18:05:54 -0400 (EDT)
+From: sender@sender.example
+To: recipient@recipient.example
+Subject: existing-message-id
+Message-Id: <existing>
+Date: Wed, 11 Sep 2024 18:05:54 -0400 (EDT)
+
+asdasdd
 
 --msgid.unix-time/mail.example--
similarity index 74%
rename from postfix/src/bounce/with-msgid-with-filter-with-thread.ref
rename to postfix/src/bounce/with-message-id-with-thread.ref
index ec3de87fb0fa210d5608dccac38d84b1d41e5b58..47172400cd6313132d3c6875c4f1650086f99fc3 100644 (file)
@@ -1,8 +1,8 @@
 From: Mail Delivery System <MAILER-DAEMON>
 Subject: Undelivered Mail Returned to Sender
 To: test-recipient
-References: <12345@mta-name.example>
-In-Reply-To: <12345@mta-name.example>
+References: <existing>
+In-Reply-To: <existing>
 Auto-Submitted: auto-replied
 MIME-Version: 1.0
 Content-Type: multipart/report; report-type=delivery-status;
@@ -26,7 +26,7 @@ Reporting-MTA: dns; mail.example
 Original-Envelope-Id: TEST-ENVID
 X-Postfix-Queue-ID: msgid
 X-Postfix-Sender: rfc822; sender@sender.example
-Arrival-Date: Sat, 05 Dec 2020 13:31:48 -0500 (EST)
+Arrival-Date: Wed, 11 Sep 2024 18:05:54 -0400 (EDT)
 
 Final-Recipient: rfc822; rcpt-address
 Original-Recipient: rfc822; rcpt-orig_addr
@@ -40,11 +40,14 @@ Content-Description: Undelivered Message
 Content-Type: message/rfc822
 
 Return-Path: <sender@sender.example>
-Received: by wzv.porcupine.org (Postfix, from userid 0)
-       id 4CpJ7m6tprz4w4Y; Sat,  5 Dec 2020 18:31:48 +0000 (UTC)
-From: <sender@sender.example>
-To: <recipient@recipient.example>
-Message-Id: <12345@mta-name.example>
-Subject: with-msgid-no-eoh-event
+Received: by wzv.porcupine.org (Postfix, from userid 1000)
+       id 4X3vqF3RdBz5Yqn; Wed, 11 Sep 2024 18:05:54 -0400 (EDT)
+From: sender@sender.example
+To: recipient@recipient.example
+Subject: existing-message-id
+Message-Id: <existing>
+Date: Wed, 11 Sep 2024 18:05:54 -0400 (EDT)
+
+asdasdd
 
 --msgid.unix-time/mail.example--
diff --git a/postfix/src/bounce/with-msgid-no-eoh-event-with-thread.ref b/postfix/src/bounce/with-msgid-no-eoh-event-with-thread.ref
deleted file mode 100644 (file)
index d2aadd0..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-From: Mail Delivery System <MAILER-DAEMON>
-Subject: Undelivered Mail Returned to Sender
-To: test-recipient
-References: <12345@mta-name.example>
-In-Reply-To: <12345@mta-name.example>
-Auto-Submitted: auto-replied
-MIME-Version: 1.0
-Content-Type: multipart/report; report-type=delivery-status;
-       boundary="msgid.unix-time/mail.example"
-Content-Transfer-Encoding: 7bit
-
-This is a MIME-encapsulated message.
-
---msgid.unix-time/mail.example
-Content-Description: Notification
-Content-Type: text/plain; charset=us-ascii
-
-
-<rcpt-address> (expanded from <rcpt-orig_addr>): dsn-reason
-
---msgid.unix-time/mail.example
-Content-Description: Delivery report
-Content-Type: message/delivery-status
-
-Reporting-MTA: dns; mail.example
-Original-Envelope-Id: TEST-ENVID
-X-Postfix-Queue-ID: msgid
-X-Postfix-Sender: rfc822; sender@sender.example
-Arrival-Date: Sun, 29 Nov 2020 10:30:41 -0500 (EST)
-
-Final-Recipient: rfc822; rcpt-address
-Original-Recipient: rfc822; rcpt-orig_addr
-Action: failed
-Status: dsn-status
-Remote-MTA: dsn-mtype; dsn-mname
-Diagnostic-Code: dsn-dtype; dsn-dtext
-
---msgid.unix-time/mail.example
-Content-Description: Undelivered Message
-Content-Type: message/rfc822
-
-Return-Path: <sender@sender.example>
-Received: by wzv.porcupine.org (Postfix, from userid 0)
-       id 4CkXPY0myNz4w4g; Sun, 29 Nov 2020 15:30:41 +0000 (UTC)
-From: <sender@sender.example>
-To: <recipient@recipient.example>
-Message-Id: <12345@mta-name.example>
-Subject: with-msgid-no-eoh-event
-Date: Sun, 29 Nov 2020 15:30:41 +0000 (UTC)
-
---msgid.unix-time/mail.example--
diff --git a/postfix/src/bounce/with-msgid-with-eoh-event-with-thread.ref b/postfix/src/bounce/with-msgid-with-eoh-event-with-thread.ref
deleted file mode 100644 (file)
index e46afbe..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-From: Mail Delivery System <MAILER-DAEMON>
-Subject: Undelivered Mail Returned to Sender
-To: test-recipient
-References: <12345@mta-name.example>
-In-Reply-To: <12345@mta-name.example>
-Auto-Submitted: auto-replied
-MIME-Version: 1.0
-Content-Type: multipart/report; report-type=delivery-status;
-       boundary="msgid.unix-time/mail.example"
-Content-Transfer-Encoding: 7bit
-
-This is a MIME-encapsulated message.
-
---msgid.unix-time/mail.example
-Content-Description: Notification
-Content-Type: text/plain; charset=us-ascii
-
-
-<rcpt-address> (expanded from <rcpt-orig_addr>): dsn-reason
-
---msgid.unix-time/mail.example
-Content-Description: Delivery report
-Content-Type: message/delivery-status
-
-Reporting-MTA: dns; mail.example
-Original-Envelope-Id: TEST-ENVID
-X-Postfix-Queue-ID: msgid
-X-Postfix-Sender: rfc822; sender@sender.example
-Arrival-Date: Sun, 29 Nov 2020 10:30:41 -0500 (EST)
-
-Final-Recipient: rfc822; rcpt-address
-Original-Recipient: rfc822; rcpt-orig_addr
-Action: failed
-Status: dsn-status
-Remote-MTA: dsn-mtype; dsn-mname
-Diagnostic-Code: dsn-dtype; dsn-dtext
-
---msgid.unix-time/mail.example
-Content-Description: Undelivered Message
-Content-Type: message/rfc822
-
-Return-Path: <sender@sender.example>
-Received: by wzv.porcupine.org (Postfix, from userid 0)
-       id 4CkXPY10M8z4w4l; Sun, 29 Nov 2020 15:30:41 +0000 (UTC)
-From: <sender@sender.example>
-To: <recipient@recipient.example>
-Message-Id: <12345@mta-name.example>
-Subject: with-msgid-with-eoh-event
-Date: Sun, 29 Nov 2020 15:30:41 +0000 (UTC)
-
-body text
-
---msgid.unix-time/mail.example--
diff --git a/postfix/src/bounce/with-msgid-with-long-line-no-thread.ref b/postfix/src/bounce/with-msgid-with-long-line-no-thread.ref
deleted file mode 100644 (file)
index fa5268b..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-From: Mail Delivery System <MAILER-DAEMON>
-Subject: Undelivered Mail Returned to Sender
-To: test-recipient
-Auto-Submitted: auto-replied
-MIME-Version: 1.0
-Content-Type: multipart/report; report-type=delivery-status;
-       boundary="msgid.unix-time/mail.example"
-Content-Transfer-Encoding: 7bit
-
-This is a MIME-encapsulated message.
-
---msgid.unix-time/mail.example
-Content-Description: Notification
-Content-Type: text/plain; charset=us-ascii
-
-
-<rcpt-address> (expanded from <rcpt-orig_addr>): dsn-reason
-
---msgid.unix-time/mail.example
-Content-Description: Delivery report
-Content-Type: message/delivery-status
-
-Reporting-MTA: dns; mail.example
-Original-Envelope-Id: TEST-ENVID
-X-Postfix-Queue-ID: msgid
-X-Postfix-Sender: rfc822; sender@sender.example
-Arrival-Date: Sun, 29 Nov 2020 10:30:41 -0500 (EST)
-
-Final-Recipient: rfc822; rcpt-address
-Original-Recipient: rfc822; rcpt-orig_addr
-Action: failed
-Status: dsn-status
-Remote-MTA: dsn-mtype; dsn-mname
-Diagnostic-Code: dsn-dtype; dsn-dtext
-
---msgid.unix-time/mail.example
-Content-Description: Undelivered Message
-Content-Type: message/rfc822
-
-Return-Path: <sender@sender.example>
-Received: by wzv.porcupine.org (Postfix, from userid 0)
-       id 4CkXPY194lz4w4n; Sun, 29 Nov 2020 15:30:41 +0000 (UTC)
-From: <sender@sender.example>
-To: <recipient@recipient.example>
-Whatever: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Message-Id: <12345@mta-name.example>
-Subject: with-msgid-with-long-line
-Date: Sun, 29 Nov 2020 15:30:41 +0000 (UTC)
-
---msgid.unix-time/mail.example--
diff --git a/postfix/src/bounce/with-msgid-with-long-line-with-thread.ref b/postfix/src/bounce/with-msgid-with-long-line-with-thread.ref
deleted file mode 100644 (file)
index 04e96d6..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From: Mail Delivery System <MAILER-DAEMON>
-Subject: Undelivered Mail Returned to Sender
-To: test-recipient
-References: <12345@mta-name.example>
-In-Reply-To: <12345@mta-name.example>
-Auto-Submitted: auto-replied
-MIME-Version: 1.0
-Content-Type: multipart/report; report-type=delivery-status;
-       boundary="msgid.unix-time/mail.example"
-Content-Transfer-Encoding: 7bit
-
-This is a MIME-encapsulated message.
-
---msgid.unix-time/mail.example
-Content-Description: Notification
-Content-Type: text/plain; charset=us-ascii
-
-
-<rcpt-address> (expanded from <rcpt-orig_addr>): dsn-reason
-
---msgid.unix-time/mail.example
-Content-Description: Delivery report
-Content-Type: message/delivery-status
-
-Reporting-MTA: dns; mail.example
-Original-Envelope-Id: TEST-ENVID
-X-Postfix-Queue-ID: msgid
-X-Postfix-Sender: rfc822; sender@sender.example
-Arrival-Date: Sun, 29 Nov 2020 10:30:41 -0500 (EST)
-
-Final-Recipient: rfc822; rcpt-address
-Original-Recipient: rfc822; rcpt-orig_addr
-Action: failed
-Status: dsn-status
-Remote-MTA: dsn-mtype; dsn-mname
-Diagnostic-Code: dsn-dtype; dsn-dtext
-
---msgid.unix-time/mail.example
-Content-Description: Undelivered Message
-Content-Type: message/rfc822
-
-Return-Path: <sender@sender.example>
-Received: by wzv.porcupine.org (Postfix, from userid 0)
-       id 4CkXPY194lz4w4n; Sun, 29 Nov 2020 15:30:41 +0000 (UTC)
-From: <sender@sender.example>
-To: <recipient@recipient.example>
-Whatever: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-Message-Id: <12345@mta-name.example>
-Subject: with-msgid-with-long-line
-Date: Sun, 29 Nov 2020 15:30:41 +0000 (UTC)
-
---msgid.unix-time/mail.example--
index baecaadb71acfc25308cfb0fc4b763ddabd7c477..8b0b310e4f4083a95e15fec3532c3b34d06d3db6 100644 (file)
@@ -94,6 +94,7 @@ typedef struct CLEANUP_STATE {
     char   *hdr_rewrite_context;       /* header rewrite context */
     char   *filter;                    /* from header/body patterns */
     char   *redirect;                  /* from header/body patterns */
+    char   *message_id;                        /* from Message-ID header */
     char   *dsn_envid;                 /* DSN envelope ID */
     int     dsn_ret;                   /* DSN full/hdrs */
     int     dsn_notify;                        /* DSN never/delay/fail/success */
index e6c21227ffe68b923880bcb3f9b1e2d988d8b67d..a0cbc5a64bdb213d0fd74cad024300138bd0c86a 100644 (file)
@@ -184,6 +184,10 @@ void    cleanup_extracted_process(CLEANUP_STATE *state, int type,
            cleanup_out_string(state, REC_TYPE_FILT, state->filter);
        if (state->redirect != 0)
            cleanup_out_string(state, REC_TYPE_RDR, state->redirect);
+       if (state->message_id != 0) {
+           cleanup_out_format(state, REC_TYPE_ATTR, "%s=%s",
+                              MAIL_ATTR_MESSAGE_ID, state->message_id);
+       }
        if ((encoding = nvtable_find(state->attr, MAIL_ATTR_ENCODING)) != 0)
            cleanup_out_format(state, REC_TYPE_ATTR, "%s=%s",
                               MAIL_ATTR_ENCODING, encoding);
@@ -307,8 +311,8 @@ void    cleanup_extracted_finish(CLEANUP_STATE *state)
        cleanup_addr_bcc(state, var_always_bcc);
 
     /*
-     * Flush non-Milter header/body_checks BCC recipients. Clear hbc_rcpt
-     * so that it can be used for other purposes.
+     * Flush non-Milter header/body_checks BCC recipients. Clear hbc_rcpt so
+     * that it can be used for other purposes.
      */
     if (state->hbc_rcpt) {
        if (CLEANUP_OUT_OK(state) && state->recip != 0) {
index 0d31598c0901635dbabfeaa3fc39be0c26e0ce88..0ff602c5d48b69cddc06e40cf8bd4527ad090c89 100644 (file)
@@ -626,8 +626,14 @@ static void cleanup_header_callback(void *context, int header_class,
      */
     else {
        state->headers_seen |= (1 << hdr_opts->type);
-       if (hdr_opts->type == HDR_MESSAGE_ID)
+       if (hdr_opts->type == HDR_MESSAGE_ID) {
+           ssize_t len;
+
            msg_info("%s: message-id=%s", state->queue_id, hdrval);
+           if (state->message_id == 0 && (len = balpar(hdrval, "<>")) > 0)
+               /* This Message ID may end up in threaded bounces. */
+               state->message_id = printable(mystrndup(hdrval, len), ' ');
+       }
        if (hdr_opts->type == HDR_RESENT_MESSAGE_ID)
            msg_info("%s: resent-message-id=%s", state->queue_id, hdrval);
        if (hdr_opts->type == HDR_RECEIVED) {
@@ -730,6 +736,10 @@ static void cleanup_header_done_callback(void *context)
                 vstring_str(state->temp1));
        state->headers_seen |= (1 << (state->resent[0] ?
                                   HDR_RESENT_MESSAGE_ID : HDR_MESSAGE_ID));
+       if (state->resent[0] == 0 && state->message_id == 0)
+           state->message_id = concatenate("<", vstring_str(state->temp1),
+                                           ">", (char *) 0);
+
     }
     if ((state->headers_seen & (1 << HDR_MESSAGE_ID)) == 0)
        msg_info("%s: message-id=<>", state->queue_id);
index 99adf84b9863f9fd21c4a4a6a55997a8d79ea6a4..efe80e66e76c3c847e48e1e76963d1c010145bc7 100644 (file)
@@ -117,6 +117,7 @@ CLEANUP_STATE *cleanup_state_alloc(VSTREAM *src)
     state->hdr_rewrite_context = MAIL_ATTR_RWR_LOCAL;
     state->filter = 0;
     state->redirect = 0;
+    state->message_id = 0;
     state->dsn_envid = 0;
     state->dsn_ret = 0;
     state->dsn_notify = 0;
@@ -179,6 +180,8 @@ void    cleanup_state_free(CLEANUP_STATE *state)
        myfree(state->filter);
     if (state->redirect)
        myfree(state->redirect);
+    if (state->message_id)
+       myfree(state->message_id);
     if (state->dsn_envid)
        myfree(state->dsn_envid);
     if (state->dsn_orcpt)
index bea0886d19e879e48a468757553fe4643f9ecab6..7cc6452a39bc490f860f5834af366b27ed3183e6 100644 (file)
@@ -260,6 +260,8 @@ extern char *mail_pathname(const char *, const char *);
 #define MAIL_ATTR_ORG_NONE     "unknown"       /* origin unknown */
 #define MAIL_ATTR_ORG_LOCAL    "local" /* local submission */
 
+#define MAIL_ATTR_MESSAGE_ID   "message_id"    /* Used for threaded bounce */
+
  /*
   * XCLIENT/XFORWARD in SMTP.
   */
index fed3f2005aca657d5615af6832a09fbfb36be8fe..52a5cc1adf9aeb0bf1998cc7154e97e973ced7e7 100644 (file)
@@ -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      "20240902"
+#define MAIL_RELEASE_DATE      "20240917"
 #define MAIL_VERSION_NUMBER    "3.10"
 
 #ifdef SNAPSHOT
index 26b46a91bb0ef1d793a85b2affc25622ec7a0615..1461578fc84e2e7509a037e91c796a2cdb076cff 100644 (file)
@@ -4,7 +4,7 @@
 /* SUMMARY
 /*     show Postfix queue file contents
 /* SYNOPSIS
-/*     \fBpostcat\fR [\fB-bdehnoqv\fR] [\fB-c \fIconfig_dir\fR] [\fIfiles\fR...]
+/*     \fBpostcat\fR [\fB-bdefhnoqv\fR] [\fB-c \fIconfig_dir\fR] [\fIfiles\fR...]
 /* DESCRIPTION
 /*     The \fBpostcat\fR(1) command prints the contents of the
 /*     named \fIfiles\fR in human-readable form. The files are
@@ -33,6 +33,8 @@
 /*     Show message envelope content.
 /* .sp
 /*     This feature is available in Postfix 2.7 and later.
+/* .IP \fB-f\fR
+/*     Prepend the file name to each output line.
 /* .IP \fB-h\fR
 /*     Show message header content.  The \fB-h\fR option produces
 /*     output from the beginning of the message up to, but not
 #define PC_FLAG_PRINT_RTYPE_DEC        (1<<5)  /* print decimal record type */
 #define PC_FLAG_PRINT_RTYPE_SYM        (1<<6)  /* print symbolic record type */
 #define PC_FLAG_RAW            (1<<7)  /* don't follow pointers */
+#define PC_FLAG_PRINT_PATHNAME (1<<8)  /* print pathname */
 
 #define PC_MASK_PRINT_TEXT     (PC_FLAG_PRINT_HEADER | PC_FLAG_PRINT_BODY)
 #define PC_MASK_PRINT_ALL      (PC_FLAG_PRINT_ENV | PC_MASK_PRINT_TEXT)
@@ -244,6 +247,8 @@ static void postcat(VSTREAM *fp, VSTRING *buffer, int flags)
         * changed.
         */
 #define PRINT_MARKER(flags, fp, offset, type, text) do { \
+    if ((flags) & PC_FLAG_PRINT_PATHNAME) \
+       vstream_printf("%s: ", VSTREAM_PATH(fp)); \
     if ((flags) & PC_FLAG_PRINT_OFFSET) \
        vstream_printf("%9lu ", (unsigned long) (offset)); \
     if (flags & PC_FLAG_PRINT_RTYPE_DEC) \
@@ -253,6 +258,8 @@ static void postcat(VSTREAM *fp, VSTRING *buffer, int flags)
 } while (0)
 
 #define PRINT_RECORD(flags, offset, type, value) do { \
+    if ((flags) & PC_FLAG_PRINT_PATHNAME) \
+       vstream_printf("%s: ", VSTREAM_PATH(fp)); \
     if ((flags) & PC_FLAG_PRINT_OFFSET) \
        vstream_printf("%9lu ", (unsigned long) (offset)); \
     if (flags & PC_FLAG_PRINT_RTYPE_DEC) \
@@ -363,6 +370,8 @@ static void postcat(VSTREAM *fp, VSTRING *buffer, int flags)
         */
        if (do_print == 0)
            continue;
+       if (flags & PC_FLAG_PRINT_PATHNAME)
+           vstream_printf("%s: ", VSTREAM_PATH(fp));
        if (flags & PC_FLAG_PRINT_OFFSET)
            vstream_printf("%9lu ", (unsigned long) offset);
        if (flags & PC_FLAG_PRINT_RTYPE_DEC)
@@ -491,7 +500,7 @@ int     main(int argc, char **argv)
     /*
      * Parse JCL.
      */
-    while ((ch = GETOPT(argc, argv, "bc:dehoqrs:v")) > 0) {
+    while ((ch = GETOPT(argc, argv, "bc:defhoqrs:v")) > 0) {
        switch (ch) {
        case 'b':
            flags |= PC_FLAG_PRINT_BODY;
@@ -503,6 +512,9 @@ int     main(int argc, char **argv)
        case 'd':
            flags |= PC_FLAG_PRINT_RTYPE_DEC;
            break;
+       case 'f':
+           flags |= PC_FLAG_PRINT_PATHNAME;
+           break;
        case 'e':
            flags |= PC_FLAG_PRINT_ENV;
            break;
index 0c737cbd66846fb7d7c252a30c4c602c9f18c428..23ce94ebfa6aad073a04744e80266a8fc575127b 100644 (file)
@@ -1407,7 +1407,23 @@ static void post_init(char *unused_name, char **argv)
        var_disable_dns = (smtp_dns_support == SMTP_DNS_DISABLED);
     }
 
+#if !defined(USE_TLS) || !defined(USE_TLSRPT)
+    if (var_smtp_tlsrpt_enable)
+       msg_warn("TLSRPT is selected, but TLSRPT is not compiled in");
+#endif
 #ifdef USE_TLS
+#ifdef USE_TLSRPT
+    if (var_smtp_tlsrpt_enable) {
+       if (smtp_mode) {
+           if (smtp_tlsrpt_post_jail(VAR_SMTP_TLSRPT_SOCKNAME,
+                                     var_smtp_tlsrpt_sockname) < 0)
+               var_smtp_tlsrpt_enable = 0;
+       } else {
+           msg_warn("TLSRPT support is not implemented for LMTP");
+           var_smtp_tlsrpt_enable = 0;
+       }
+    }
+#endif                                         /* USE_TLSRPT */
     if (smtp_mode) {
        smtp_tls_insecure_mx_policy =
            tls_level_lookup(var_smtp_tls_insecure_mx_policy);
@@ -1583,21 +1599,6 @@ static void pre_init(char *unused_name, char **unused_argv)
                            mdalg = var_smtp_tls_fpt_dgst);
        smtp_tls_list_init();
        tls_dane_loglevel(VAR_LMTP_SMTP(TLS_LOGLEVEL), var_smtp_tls_loglevel);
-#ifdef USE_TLSRPT
-       if (var_smtp_tlsrpt_enable) {
-           if (smtp_mode) {
-               if (smtp_tlsrpt_pre_jail(VAR_SMTP_TLSRPT_SOCKNAME,
-                                        var_smtp_tlsrpt_sockname) < 0)
-                   var_smtp_tlsrpt_enable = 0;
-           } else {
-               msg_warn("TLSRPT support is not implemented for LMTP");
-               var_smtp_tlsrpt_enable = 0;
-           }
-       }
-#else                                          /* no USE_TLSRPT */
-       if (var_smtp_tlsrpt_enable)
-           msg_warn("TLSRPT is selected, but TLSRPT is not compiled in");
-#endif                                         /* USE_TLSRPT */
 #else
        msg_warn("TLS has been selected, but TLS support is not compiled in");
 #endif
index f367ea1e0d299f348496b2807210323c0b029305..49e1115426010fb2a954bb1ea9beac208485d474 100644 (file)
@@ -790,7 +790,7 @@ extern int smtp_hfrom_format;
   * smtp_tlsrpt.c.
   */
 #if defined(USE_TLS) && defined(USE_TLSRPT)
-extern int smtp_tlsrpt_pre_jail(const char *sockname_pname, const char *sockname_pval);
+extern int smtp_tlsrpt_post_jail(const char *sockname_pname, const char *sockname_pval);
 extern void smtp_tlsrpt_create_wrapper(SMTP_STATE *state, const char *domain);
 extern void smtp_tlsrpt_set_tls_policy(SMTP_STATE *state);
 extern void smtp_tlsrpt_set_tcp_connection(SMTP_STATE *state);
index c2df5a5d59ca1446040586cf960e62dee1bd825b..ec8cc2df39bddcf5206f317f68904b61101cf4e7 100644 (file)
@@ -80,7 +80,7 @@ SMTP_STATE *smtp_state_alloc(void)
     state->iterator->host = vstring_alloc(100);
     state->iterator->addr = vstring_alloc(100);
     state->iterator->saved_dest = vstring_alloc(100);
-#ifdef TLSRPT
+#ifdef USE_TLSRPT
     state->tlsrpt = 0;
 #endif
     if (var_smtp_cache_conn) {
index 9640f27a4eacf75a01bbb163dabaf9d13f82f494..f22e51410f99c07944b169538dcbbf7852a23b52 100644 (file)
@@ -501,7 +501,8 @@ static void tls_policy_lookup_one(SMTP_TLS_POLICY *tls, int *site_level,
        INVALID_RETURN(tls->why, site_level);
     }
     if (tls->ext_policy_type == 0) {
-       if (tls->ext_policy_ttl || tls->ext_policy_strings
+       if (tls->ext_policy_ttl != EXT_POLICY_TTL_UNSET
+           || tls->ext_policy_strings
            || tls->ext_policy_domain || tls->ext_mx_host_patterns
            || tls->ext_policy_failure) {
            msg_warn("%s: built-in policy has unexpected attribute "
index b0a6af626cc7890b25c14d104f21dad839621efb..f81f60872fa32ebc041bfac48cb6f363c7691ebd 100644 (file)
@@ -6,7 +6,7 @@
 /* SYNOPSIS
 /*     #include <smtp_tlsrpt.h>
 /*
-/*     int     smtp_tlsrpt_pre_jail(
+/*     int     smtp_tlsrpt_post_jail(
 /*     const char *sockname_pname,
 /*     const char *sockname_pval)
 /*
@@ -30,7 +30,7 @@
 /*     can report a TLS error to a TLSRPT library. The SMTP protocol
 /*     engine uses the information to report a TLS error or success.
 /*
-/*     smtp_tls_pre_jail() does configuration sanity checks and
+/*     smtp_tls_post_jail() does configuration sanity checks and
 /*     returns 0 if successful, i.e. TLSRPT support is properly
 /*     configured. Otherwise it returns -1 and logs a warning. Arguments:
 /* .IP sockname_pname
 
 static const char smtp_tlsrpt_support[] = "TLSRPT support";
 
-/* smtp_tlsrpt_pre_jail - pre-jail configuration sanity check */
+/* smtp_tlsrpt_post_jail - post-jail configuration sanity check */
 
-int     smtp_tlsrpt_pre_jail(const char *sockname_pname,
-                                    const char *sockname_pval)
+int     smtp_tlsrpt_post_jail(const char *sockname_pname,
+                                     const char *sockname_pval)
 {
     if (smtp_dns_support == SMTP_DNS_DISABLED) {
        msg_warn("Cannot enable TLRPT support: DNS is disabled");
@@ -163,7 +163,7 @@ static DNS_RR *smtp_tlsrpt_find_policy(const char *adomain)
      * Look up TXT records. Ignore records that don't start with the expected
      * version ID, and require that there is exactly one such DNS record.
      */
-    vstring_sprintf(qname, "_smtp._tls_.%s", adomain);
+    vstring_sprintf(qname, "_smtp._tls.%s", adomain);
     dns_status = dns_lookup(STR(qname), T_TXT, res_opt, &rr_list,
                            (VSTRING *) 0, why);
     vstring_free(qname);
@@ -259,6 +259,16 @@ void    smtp_tlsrpt_create_wrapper(SMTP_STATE *state, const char *domain)
     }
 }
 
+/* smtp_tlsrpt_set_no_policy - no policy found */
+
+static void smtp_tlsrpt_set_no_policy(SMTP_STATE *state)
+{
+    trw_set_tls_policy(state->tlsrpt, TLSRPT_NO_POLICY_FOUND,
+                       /* tls_policy_strings= */ (const char *const *) 0,
+                       /* tls_policy_domain= */ (char *) 0,
+                       /* mx_host_patterns= */ (const char *const *) 0);
+}
+
 /* smtp_tlsrpt_set_dane_policy - add DANE policy properties */
 
 static void smtp_tlsrpt_set_dane_policy(SMTP_STATE *state)
@@ -289,7 +299,11 @@ static void smtp_tlsrpt_set_ext_policy(SMTP_STATE *state)
     SMTP_TLS_POLICY *tls = state->tls;
     tlsrpt_policy_type_t policy_type_val;
 
-    switch (policy_type_val = convert_tlsrpt_policy_type(tls->ext_policy_type)) {
+    if (tls->ext_policy_type == 0)
+       msg_panic("smtp_tlsrpt_set_ext_policy: no policy type");
+
+    switch (policy_type_val =
+           convert_tlsrpt_policy_type(tls->ext_policy_type)) {
     case TLSRPT_POLICY_STS:
        trw_set_tls_policy(state->tlsrpt, policy_type_val,
                        (const char *const *) tls->ext_policy_strings->argv,
@@ -297,12 +311,10 @@ static void smtp_tlsrpt_set_ext_policy(SMTP_STATE *state)
                     (const char *const *) tls->ext_mx_host_patterns->argv);
        break;
     case TLSRPT_NO_POLICY_FOUND:
-       trw_set_tls_policy(state->tlsrpt, policy_type_val,
-                         /* tls_policy_strings= */ (const char *const *) 0,
-                           /* tls_policy_domain= */ (const char *) 0,
-                           /* mx_host_patterns= */ (const char *const *) 0);
+       smtp_tlsrpt_set_no_policy(state);
        break;
     default:
+       /* Policy type must be validated in smtp_tls_policy_maps parser. */
        msg_panic("unexpected policy type: \"%s\"",
                  tls->ext_policy_type);
     }
@@ -323,8 +335,12 @@ void    smtp_tlsrpt_set_tls_policy(SMTP_STATE *state)
     if (TLS_DANE_BASED(tls->level)) {          /* Desired by local policy */
        if (tls->dane != 0)                     /* Actual policy */
            smtp_tlsrpt_set_dane_policy(state);
+       else                                    /* No policy */
+           smtp_tlsrpt_set_no_policy(state);
     } else if (tls->ext_policy_type) {
-           smtp_tlsrpt_set_ext_policy(state);
+       smtp_tlsrpt_set_ext_policy(state);
+    } else {
+       smtp_tlsrpt_set_no_policy(state);
     }
 }
 
index 7834ef8ae12efde74e6683e663e2640c1ee560fe..7bf7e5f48b451f07d2dfa80d0906f110895a5077 100644 (file)
@@ -1425,7 +1425,8 @@ TLS_SESS_STATE *tls_client_post_connect(TLS_SESS_STATE *TLScontext,
      * reason was already reported.
      */
 #ifdef USE_TLSRPT
-    TLScontext->rpt_reported = trw_is_reported(props->tlsrpt);
+    TLScontext->rpt_reported = props->tlsrpt != 0 
+       && trw_is_reported(props->tlsrpt);
 #endif
 
     return (TLScontext);
index f8c43870aea3900c55db7b084becb6830a3a2b02..ac7f05f94ba53241d9b4a3f06ed7e02f551aeef9 100644 (file)
@@ -593,7 +593,6 @@ static void *dane_lookup(const char *tlsa_fqdn, void *unused_ctx)
            if (n == 0)
                dane->flags |= TLS_DANE_FLAG_EMPTY;
        } else
-           /* TODO(wietse) report non-parsable TLSA records in TLSRPT. */
            dane->flags |= TLS_DANE_FLAG_NORRS;
 
        if (rrs)
index 210704021eb97d32bfd46e059aec7e4b65f63995..c6f08e80c5af87e6b58060b83248aa95f2f13c75 100644 (file)
@@ -450,7 +450,7 @@ static int tls_proxy_client_tlsrpt_scan(ATTR_SCAN_COMMON_FN scan_fn,
     int     have_tlsrpt = 0;
 
     ret = scan_fn(fp, flags | ATTR_FLAG_MORE,
-                 RECV_ATTR_INT(TLS_ATTR_DANE, &have_tlsrpt),
+                 RECV_ATTR_INT(TLS_ATTR_TLSRPT, &have_tlsrpt),
                  ATTR_TYPE_END);
     if (msg_verbose)
        msg_info("tls_proxy_client_tlsrpt_scan have_tlsrpt=%d", have_tlsrpt);
@@ -460,27 +460,28 @@ static int tls_proxy_client_tlsrpt_scan(ATTR_SCAN_COMMON_FN scan_fn,
        VSTRING *rpt_policy_domain = vstring_alloc(100);
        VSTRING *rpt_policy_string = vstring_alloc(100);
        int     tls_policy_type;
-       ARGV   *tls_policy_strings = argv_alloc(100);
+       ARGV   *tls_policy_strings = 0;
        VSTRING *tls_policy_domain = vstring_alloc(100);
-       ARGV   *mx_host_patterns = argv_alloc(100);
+       ARGV   *mx_host_patterns = 0;
        VSTRING *snd_mta_addr = vstring_alloc(100);
        VSTRING *rcv_mta_name = vstring_alloc(100);
        VSTRING *rcv_mta_addr = vstring_alloc(100);
        VSTRING *rcv_mta_ehlo = vstring_alloc(100);
+       int     trw_flags;
 
        ret = scan_fn(fp, flags | ATTR_FLAG_MORE,
                      RECV_ATTR_STR(TRW_RPT_SOCKET_NAME, rpt_socket_name),
                    RECV_ATTR_STR(TRW_RPT_POLICY_DOMAIN, rpt_policy_domain),
                    RECV_ATTR_STR(TRW_RPT_POLICY_STRING, rpt_policy_string),
                      RECV_ATTR_INT(TRW_TLS_POLICY_TYPE, &tls_policy_type),
-                     RECV_ATTR_FUNC(argv_attr_scan, tls_policy_strings),
+                     RECV_ATTR_FUNC(argv_attr_scan, &tls_policy_strings),
                    RECV_ATTR_STR(TRW_TLS_POLICY_DOMAIN, tls_policy_domain),
-                     RECV_ATTR_FUNC(argv_attr_scan, mx_host_patterns),
+                     RECV_ATTR_FUNC(argv_attr_scan, &mx_host_patterns),
                      RECV_ATTR_STR(TRW_SRC_MTA_ADDR, snd_mta_addr),
                      RECV_ATTR_STR(TRW_DST_MTA_NAME, rcv_mta_name),
                      RECV_ATTR_STR(TRW_DST_MTA_ADDR, rcv_mta_addr),
                      RECV_ATTR_STR(TRW_DST_MTA_EHLO, rcv_mta_ehlo),
-                     RECV_ATTR_INT(TRW_FLAGS, &trw->flags),
+                     RECV_ATTR_INT(TRW_FLAGS, &trw_flags),
                      ATTR_TYPE_END);
 
        /* Always construct a well-formed structure. */
@@ -496,6 +497,7 @@ static int tls_proxy_client_tlsrpt_scan(ATTR_SCAN_COMMON_FN scan_fn,
        EXPORT_OR_NULL(trw->rcv_mta_name, rcv_mta_name);
        EXPORT_OR_NULL(trw->rcv_mta_addr, rcv_mta_addr);
        EXPORT_OR_NULL(trw->rcv_mta_ehlo, rcv_mta_ehlo);
+       trw->flags = trw_flags;
        ret = (ret == 12 ? 1 : -1);
        if (ret != 1) {
            trw_free(trw);
index 4005d8edc311a3d6c0bcb47f3d2ca785f762d8cf..91112cb71f0e282d2d38577c73e378c021afa087 100644 (file)
@@ -334,7 +334,7 @@ void    trw_set_tls_policy(TLSRPT_WRAPPER *trw,
        ARGV_FREE_IF_SET_AND_CLEAR(trw->tls_policy_strings);
     } else {
        ARGV_FREE_IF_SET_AND_COPY(trw->tls_policy_strings, tls_policy_strings);
-       ARGV_FREE_IF_SET_AND_COPY(trw->tls_policy_strings, mx_host_patterns);
+       ARGV_FREE_IF_SET_AND_COPY(trw->mx_host_patterns, mx_host_patterns);
     }
     trw->flags = TRW_FLAG_HAVE_TLS_POLICY;
     trw_set_tcp_connection(trw, (char *) 0, (char *) 0, (char *) 0);
@@ -353,8 +353,9 @@ void    trw_set_tcp_connection(TLSRPT_WRAPPER *trw,
     /*
      * Sanity check: usage errors are not a show stopper.
      */
-    if ((trw->flags & TRW_FLAG_HAVE_TLS_POLICY) == 0
-       || (trw->flags & TRW_FLAG_REPORTED)) {
+    if ((snd_mta_addr || rcv_mta_name || rcv_mta_addr)
+       && ((trw->flags & TRW_FLAG_HAVE_TLS_POLICY) == 0
+           || (trw->flags & TRW_FLAG_REPORTED))) {
        msg_warn("%s: missing trw_set_tls_policy call", myname);
        return;
     }
@@ -372,8 +373,8 @@ void    trw_set_ehlo_resp(TLSRPT_WRAPPER *trw, const char *rcv_mta_ehlo)
     /*
      * Sanity check: usage errors are not a show stopper.
      */
-    if ((trw->flags & TRW_FLAG_HAVE_TLS_POLICY) == 0
-       || (trw->flags & TRW_FLAG_REPORTED)) {
+    if (rcv_mta_ehlo && ((trw->flags & TRW_FLAG_HAVE_TLS_POLICY) == 0
+                        || (trw->flags & TRW_FLAG_REPORTED))) {
        msg_warn("%s: missing trw_set_tls_policy call", myname);
        return;
     }
@@ -394,7 +395,17 @@ static int trw_munge_report_result(int libtlsrpt_errorcode)
     }
 
     /*
-     * Do not report success if errno was zero.
+     * Report a tlsrpt library internal error.
+     */
+    else if (tlsrpt_error_code_is_internal(libtlsrpt_errorcode)) {
+       msg_warn("Could not report TLS handshake result to tlsrpt library:"
+                " %s (error %d)", tlsrpt_strerror(libtlsrpt_errorcode),
+                libtlsrpt_errorcode);
+       return (-1);
+    }
+
+    /*
+     * Report a libc error. Do not report success if errno was zero.
      */
     else {
        err = tlsrpt_errno_from_error_code(libtlsrpt_errorcode);
@@ -552,8 +563,20 @@ int     trw_report_success(TLSRPT_WRAPPER *trw)
                                                trw->rpt_policy_domain,
                                            trw->rpt_policy_string)) == 0) {
            if ((res = tlsrpt_init_policy(dr, trw->tls_policy_type,
-                                         trw->tls_policy_domain)) == 0)
-               res = tlsrpt_finish_policy(dr, TLSRPT_FINAL_SUCCESS);
+                                         trw->tls_policy_domain)) == 0) {
+               char  **cpp;
+
+               if (trw->tls_policy_strings)
+                   for (cpp = trw->tls_policy_strings->argv;
+                        res == 0 && *cpp; cpp++)
+                       res = tlsrpt_add_policy_string(dr, *cpp);
+               if (trw->mx_host_patterns)
+                   for (cpp = trw->mx_host_patterns->argv;
+                        res == 0 && *cpp; cpp++)
+                       res = tlsrpt_add_mx_host_pattern(dr, *cpp);
+               if (res == 0)
+                   res = tlsrpt_finish_policy(dr, TLSRPT_FINAL_SUCCESS);
+           }
            if (res == 0) {
                res = tlsrpt_finish_delivery_request(&dr);
            } else {
index dd35d3e42b50b5e9e6a817b7bddce9406c4fb2f0..346415dafa9c99c5ae8899bd43ca5897cdea276a 100644 (file)
@@ -738,7 +738,8 @@ static int tlsp_eval_tls_error(TLSP_STATE *state, int err)
         * already reported.
         */
 #ifdef USE_TLSRPT
-       if ((state->flags & TLSP_FLAG_DO_HANDSHAKE)
+       if (state->client_start_props->tlsrpt
+           && (state->flags & TLSP_FLAG_DO_HANDSHAKE)
            && state->is_server_role == 0)
            trw_report_failure(state->client_start_props->tlsrpt,
                               TLSRPT_VALIDATION_FAILURE,