]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.11.2 v2.11.2
authorWietse Venema <wietse@porcupine.org>
Mon, 13 Oct 2014 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Tue, 14 Oct 2014 03:52:35 +0000 (23:52 -0400)
postfix/HISTORY
postfix/src/global/mail_version.h
postfix/src/qmqpd/qmqpd.c
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_check.c

index 225b98fea8d26237ae2b95a346a5a39a06e6a2e6..3ca24d8c40efbd27ece684ea275c9b28dad6774c 100644 (file)
@@ -19574,3 +19574,29 @@ Apologies for any names omitted.
        reported by Sahil Tandon, predicate error found by Viktor,
        redundant connection restore request eliminated by Wietse.
        File: smtp/smtp_connect.c.
+
+20140619
+
+       Bugfix (introduced: 2001): qmqpd null pointer bug when it
+       logs a lost connection while not in a mail transaction.
+       Reported by Michal Adamek. File: qmqpd/qmqpd.c.
+
+20140920
+
+       Bugfix (introduced: 20080212): incorrect client name in
+       reject messages from check_reverse_client_hostname_access
+       and check_reverse_client_hostname_{mx,ns}_access.  They
+       replied with the verified client name, instead of the name
+       that was rejected.  Problem reported by Reindl Harald. File:
+       smtpd/smtpd_check.c.
+
+20141012
+
+       Bugfix (introduced: Postfix 2.3): the PREPEND access/policy
+       action added headers ABOVE Postfix's own Received: header,
+       exposing Postfix's own Received: header to Milters (protocol
+       violation) and hiding the PREPENDed header from Milters.
+       The latter caused problems for DMARC implementations with
+       SPF policy plus DKIM Milter.  PREPENDed headers are now
+       added BELOW Postfix's own Received: header and remain visible
+       to Milters. File: smtpd/smtpd.c.
index f7fb696a1d16ecbddfa56d78d0aeb25a6177b471..9a3f2c6af5acd6afcc7d41931b084f7a91348a34 100644 (file)
@@ -20,8 +20,8 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20140507"
-#define MAIL_VERSION_NUMBER    "2.11.1"
+#define MAIL_RELEASE_DATE      "20141013"
+#define MAIL_VERSION_NUMBER    "2.11.2"
 
 #ifdef SNAPSHOT
 #define MAIL_VERSION_DATE      "-" MAIL_RELEASE_DATE
index c720704f22fe19ad73dbf59aa1c4e054e33c6afa..6b8f4f610610692c34c4068a0b4b3ee7d289e26a 100644 (file)
@@ -706,7 +706,8 @@ static void qmqpd_proto(QMQPD_STATE *state)
      */
     if (state->reason && state->where)
        msg_info("%s: %s: %s while %s",
-             state->queue_id, state->namaddr, state->reason, state->where);
+                state->queue_id ? state->queue_id : "NOQUEUE",
+                state->namaddr, state->reason, state->where);
 }
 
 /* qmqpd_service - service one client */
index 6344a61275edca613650bc887f2c84b55ba4256c..7aa69f6c2b55e61b22bb02c3c490e736dd8261c4 100644 (file)
@@ -2984,13 +2984,6 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
        rec_fputs(state->cleanup, REC_TYPE_MESG, "");
     }
 
-    /*
-     * PREPEND message headers.
-     */
-    if (state->prepend)
-       for (cpp = state->prepend->argv; *cpp; cpp++)
-           out_fprintf(out_stream, REC_TYPE_NORM, "%s", *cpp);
-
     /*
      * Suppress our own Received: header in the unlikely case that we are an
      * intermediate proxy.
@@ -3080,6 +3073,18 @@ static int data_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *unused_argv)
                    "\t(envelope-from %s)", STR(state->buffer));
 #endif
     }
+
+    /*
+     * PREPEND message headers below our own Received: header. According
+     * https://www.milter.org/developers/api/smfi_insheader, Milters see only
+     * headers that have been sent by the SMTP client and those header
+     * modifications by earlier filters. Based on this we allow Milters to
+     * see headers added by access map or by policy service.
+     */
+    if (state->prepend)
+       for (cpp = state->prepend->argv; *cpp; cpp++)
+           out_fprintf(out_stream, REC_TYPE_NORM, "%s", *cpp);
+
     smtpd_chat_reply(state, "354 End data with <CR><LF>.<CR><LF>");
     state->where = SMTPD_AFTER_DATA;
 
index 8d2bd2d63e06f3530d1c8f7e216f7fa8d887a714..2ee533387be9b9aeff59ae0c8f6844bc00630a70 100644 (file)
@@ -3844,7 +3844,7 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions,
                                         SMTPD_NAME_CLIENT, def_acl);
        } else if (is_map_command(state, name, CHECK_REVERSE_CLIENT_ACL, &cpp)) {
            status = check_namadr_access(state, *cpp, state->reverse_name, state->addr,
-                                        FULL, &found, state->namaddr,
+                                        FULL, &found, state->reverse_name,
                                         SMTPD_NAME_REV_CLIENT, def_acl);
            forbid_whitelist(state, name, status, state->reverse_name);
        } else if (strcasecmp(name, REJECT_MAPS_RBL) == 0) {
@@ -3927,14 +3927,14 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions,
        } else if (is_map_command(state, name, CHECK_REVERSE_CLIENT_NS_ACL, &cpp)) {
            if (strcasecmp(state->reverse_name, "unknown") != 0) {
                status = check_server_access(state, *cpp, state->reverse_name,
-                                            T_NS, state->namaddr,
+                                            T_NS, state->reverse_name,
                                             SMTPD_NAME_REV_CLIENT, def_acl);
                forbid_whitelist(state, name, status, state->reverse_name);
            }
        } else if (is_map_command(state, name, CHECK_REVERSE_CLIENT_MX_ACL, &cpp)) {
            if (strcasecmp(state->reverse_name, "unknown") != 0) {
                status = check_server_access(state, *cpp, state->reverse_name,
-                                            T_MX, state->namaddr,
+                                            T_MX, state->reverse_name,
                                             SMTPD_NAME_REV_CLIENT, def_acl);
                forbid_whitelist(state, name, status, state->reverse_name);
            }