]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.6-20200309
authorWietse Venema <wietse@porcupine.org>
Mon, 9 Mar 2020 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sun, 15 Mar 2020 23:40:52 +0000 (19:40 -0400)
postfix/HISTORY
postfix/RELEASE_NOTES-3.5
postfix/src/global/mail_version.h
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd.h

index e7579aff1751109d2de05721778fca674a74fa70..de1c562833c9fd740437f1d4fa00ad613a590315 100644 (file)
@@ -24653,3 +24653,8 @@ Apologies for any names omitted.
 
        Cleanup: harmless memory leak in postconf. File:
        postconf/postconf_master.c.
+
+       Bugfix (introduced: Postfix 2.3): panic with Postfix
+       multi-Milter configuration during MAIL FROM. Milter client
+       state was not properly reset after one of the Milters failed.
+       Reported by WeiYu Wu.
index 471c8517d1f1708f0779a211312cc03faf7cca49..001e2092e641d5b83c9bf0c3ebe75d554b74e5a2 100644 (file)
@@ -25,14 +25,23 @@ more recent Eclipse Public License 2.0. Recipients can choose to take
 the software under the license of their choice. Those who are more
 comfortable with the IPL can continue with that license.
 
-Major changes - IP address normalization
-----------------------------------------
+Major changes - multiple relayhost in SMTP
+------------------------------------------
 
-[Incompat 20190427] Postfix now normalizes IP addresses received
-with XCLIENT, XFORWARD, or with the HaProxy protocol, for consistency
-with direct connections to Postfix. This may change the appearance
-of logging, and the way that check_client_access will match subnets
-of an IPv6 address.
+[Feature 20200111] SMTP (and LMTP) client support for a list of
+nexthop destinations separated by comma or whitespace. These will
+destinations be tried in the specified order.
+
+The list form can be specified in relayhost, transport_maps,
+default_transport, and sender_dependent_default_transport_maps.
+
+Examples:
+/etc/postfix/main.cf:
+    relayhost = foo.example, bar.example
+    default_transport = smtp:foo.example, bar.example.
+
+NOTE: this is an SMTP and LMTP client feature. It does not work for
+other Postfix delivery agents.
 
 Major changes - certificate access
 ----------------------------------
@@ -110,9 +119,9 @@ Major changes - haproxy2 protocol
 implementation supports TCP over IPv4 and IPv6, as well as non-proxied
 connections; the latter are typically used for heartbeat tests.
 
-This feature introduces no additional Postfix configuration.
-The Postfix smtpd(8) and postscreen(8) daemons accept both
-protocol versions.
+The haproxy v2 protocol introduces no additional Postfix configuration.
+The Postfix smtpd(8) and postscreen(8) daemons accept both v1 and
+v2 protocol versions.
 
 Major changes - logging
 -----------------------
@@ -140,20 +149,11 @@ The logging in external form is consistent with the address form
 that Postfix 3.2 and later prefer for table lookups. It is therefore
 the more useful form for non-debug logging.
 
-Major changes - multiple relayhost in SMTP
-------------------------------------------
-
-[Feature 20200111] SMTP (and LMTP) client support for a list of
-nexthop destinations separated by comma or whitespace. These will
-destinations be tried in the specified order.
-
-The list form can be specified in relayhost, transport_maps,
-default_transport, and sender_dependent_default_transport_maps.
-
-Examples:
-/etc/postfix/main.cf:
-    relayhost = foo.example, bar.example
-    default_transport = smtp:foo.example, bar.example.
+Major changes - IP address normalization
+----------------------------------------
 
-NOTE: this is an SMTP client feature. It does not work for other
-Postfix delivery agents.
+[Incompat 20190427] Postfix now normalizes IP addresses received
+with XCLIENT, XFORWARD, or with the HaProxy protocol, for consistency
+with direct connections to Postfix. This may change the appearance
+of logging, and the way that check_client_access will match subnets
+of an IPv6 address.
index bc5dbfb3ee83b61b50a97924fb6c020dba157330..aa75846ac3f335c0966a470b8e2109e192bd53dc 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      "20200308"
+#define MAIL_RELEASE_DATE      "20200309"
 #define MAIL_VERSION_NUMBER    "3.6"
 
 #ifdef SNAPSHOT
index f9b766049fda465e1f86f465f08a6341da847a0c..2059bd5e2f00d020140ffcc3606964592317f5b8 100644 (file)
@@ -2615,6 +2615,7 @@ static int mail_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
     }
     if (state->milters != 0
        && (state->saved_flags & MILTER_SKIP_FLAGS) == 0) {
+       state->flags |= SMTPD_FLAG_NEED_MILTER_ABORT;
        PUSH_STRING(saved_sender, state->sender, STR(state->addr_buf));
        err = milter_mail_event(state->milters,
                                milter_argv(state, argc - 2, argv + 2));
@@ -2730,11 +2731,14 @@ static void mail_reset(SMTPD_STATE *state)
        state->queue_id = 0;
     }
     if (state->sender) {
-       if (state->milters != 0)
-           milter_abort(state->milters);
        myfree(state->sender);
        state->sender = 0;
     }
+    /* WeiYu Wu: need to undo milter_mail_event() state change. */
+    if (state->flags & SMTPD_FLAG_NEED_MILTER_ABORT) {
+       milter_abort(state->milters);
+       state->flags &= ~SMTPD_FLAG_NEED_MILTER_ABORT;
+    }
     if (state->verp_delims) {
        myfree(state->verp_delims);
        state->verp_delims = 0;
index ae194035cc735eb4130d9bae85cf9c7d2670d681..490cda2facf1a6c082a4bc47a2cc6a337556b472 100644 (file)
@@ -206,6 +206,7 @@ typedef struct {
 #define SMTPD_FLAG_ILL_PIPELINING  (1<<1)      /* inappropriate pipelining */
 #define SMTPD_FLAG_AUTH_USED      (1<<2)       /* don't reuse SASL state */
 #define SMTPD_FLAG_SMTPUTF8       (1<<3)       /* RFC 6531/2 transaction */
+#define SMTPD_FLAG_NEED_MILTER_ABORT (1<<4)    /* undo milter_mail_event() */
 
  /* Security: don't reset SMTPD_FLAG_AUTH_USED. */
 #define SMTPD_MASK_MAIL_KEEP \