]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.10-20120202
authorWietse Venema <wietse@porcupine.org>
Thu, 2 Feb 2012 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:37:58 +0000 (06:37 +0000)
postfix/HISTORY
postfix/WISHLIST
postfix/src/bounce/bounce_trace_service.c
postfix/src/cleanup/Makefile.in
postfix/src/cleanup/bug3.file [new file with mode: 0644]
postfix/src/cleanup/bug3.in [new file with mode: 0644]
postfix/src/cleanup/bug3.ref [new file with mode: 0644]
postfix/src/cleanup/bug3.text.ref [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.c
postfix/src/global/dict_ldap.c
postfix/src/global/mail_version.h

index fc18e1ee723d1961ef060478e479b078985f83a9..0677106e23256eb9d0c1f86e9c40428ed6764a55 100644 (file)
@@ -17596,14 +17596,23 @@ Apologies for any names omitted.
        quoting routine returned the unquoted result instead of the
        quoted text.  The opportunities for misuse are limited,
        because Postfix sqlite files are usually owned by root, and
-       because Postfix daemons usually run with non-root privileges.
-       File: global/dict_sqlite.c.
+       Postfix daemons usually run with non-root privileges so
+       they can't corrupt the database. Problem reported by Rob
+       McGee (rob0).  File: global/dict_sqlite.c.
 
 20120130
 
        Bugfix (introduced: Postfix 2.3): the trace service did not
        distinguish between notifications for a non-bounce or a
-       single-bounce message. This code pre-dates DSN support and
-       should have been updated when it was re-purposed to handle
-       DSN SUCCESS notifications. Problem reported by Sabahattin
+       bounce message. This code pre-dates DSN support and should
+       have been updated when it was re-purposed to handle DSN
+       SUCCESS notifications. Problem reported by Sabahattin
        Gucukoglu.  File: bounce/bounce_trace_service.c.
+
+20120202
+
+       Bugfix (introduced: Postfix 2.3): the "change header" milter
+       request could replace the wrong header. A long header name
+       could match a shorter one, because a length check was done
+       on the wrong string.  Reported by Vladimir Vassiliev.  File:
+       cleanup/cleanup_milter.c.
index e86ce086202c29a56e4b26da133803ac5c2c2679..f9f68c94a4b7e20d4be016692684585cb1effe3a 100644 (file)
@@ -6,6 +6,10 @@ Wish list:
 
        Things to do after the stable release:
 
+       The discussion of postscreen cache configuration is in the
+       wrong place (how whitelisting works). Move it to the section
+       about configuring postscreen.
+
        Before proxymap can be exposed to the network to share,
        e.g., postscreen or verify caches, need to enforce limits
        on attribute string length in IPC protocols.  10-20KB seems
index e00697157936452fb3b344f8b696fdacf4d0238c..824931d60becfe192e70f144b97f432ffc140cae 100644 (file)
@@ -98,16 +98,16 @@ int     bounce_trace_service(int flags, char *service, char *queue_name,
 #define NULL_SENDER            MAIL_ADDR_EMPTY /* special address */
 
     if (strcasecmp(recipient, mail_addr_double_bounce()) == 0) {
-       msg_info("%s: not sending notification for double-bounce message",
-                queue_id);
+       msg_info("%s: not sending trace/success notification for "
+                "double-bounce message", queue_id);
        return (0);
     } else if (*recipient == 0) {
        if ((notify_mask & MAIL_ERROR_2BOUNCE) != 0) {
            recipient = var_2bounce_rcpt;
            sender = mail_addr_double_bounce();
        } else {
-           msg_info("%s: not sending notification for single-bounce message",
-                    queue_id);
+           msg_info("%s: not sending trace/success notification "
+                    "for single-bounce message", queue_id);
            if (mail_queue_remove(service, queue_id) && errno != ENOENT)
                msg_fatal("remove %s %s: %m", service, queue_id);
            return (0);
index 8afd162096a3a2e449e5b00cc0428c8ae7e05537..2bc9da5489bc8c7812c93368f5a21e1148a1d94b 100644 (file)
@@ -100,7 +100,7 @@ cleanup_masquerade_test: cleanup_masquerade cleanup_masq.ref
        diff cleanup_masq.ref cleanup_masq.tmp
        rm -f cleanup_masq.tmp
 
-bug_tests: bug1_test bug2_test
+bug_tests: bug1_test bug2_test bug3_test
 
 ../postcat/postcat:
        cd ../postcat; make
@@ -127,6 +127,17 @@ bug2_test: cleanup_milter bug2.file bug2.in bug2.ref bug2.text.ref \
        diff bug2.text.ref bug2.tmp
        rm -f bug2.file.tmp bug2.tmp
 
+bug3_test: cleanup_milter bug3.file bug3.in bug3.ref bug3.text.ref \
+       ../postcat/postcat
+       cp bug3.file bug3.file.tmp
+       chmod u+w bug3.file.tmp
+       ./cleanup_milter <bug3.in
+       ../postcat/postcat -ov bug3.file.tmp 2>/dev/null >bug3.tmp
+       diff bug3.ref bug3.tmp
+       ../postcat/postcat bug3.file.tmp 2>/dev/null >bug3.tmp
+       diff bug3.text.ref bug3.tmp
+       rm -f bug3.file.tmp bug3.tmp
+
 # Test queue file editing routines.
 
 cleanup_milter_test: cleanup_milter test-queue-file cleanup_milter.in1 \
diff --git a/postfix/src/cleanup/bug3.file b/postfix/src/cleanup/bug3.file
new file mode 100644 (file)
index 0000000..fd9236c
Binary files /dev/null and b/postfix/src/cleanup/bug3.file differ
diff --git a/postfix/src/cleanup/bug3.in b/postfix/src/cleanup/bug3.in
new file mode 100644 (file)
index 0000000..1920eaf
--- /dev/null
@@ -0,0 +1,29 @@
+#verbose on
+open bug3.file.tmp
+
+# This was a problem with a length check in the wrong place, causing
+# a short header name to match a longer one.  After successful
+# substring match, the "change header" code checked the length of
+# the header name that was found, instead of the header name that
+# was wanted.
+
+#add_header X-SpamTest-Envelope-From wietse@porcupine.org
+#upd_header 1 X-SpamTest-Envelope-From wietse@porcupine.org
+#add_header X-SpamTest-Group-ID 00000000
+#upd_header 1 X-SpamTest-Group-ID 00000000
+#add_header X-SpamTest-Info Profiles 29362 [Feb 02 2012]
+#upd_header 1 X-SpamTest-Info Profiles 29362 [Feb 02 2012]
+#add_header X-SpamTest-Method none
+#upd_header 1 X-SpamTest-Method none
+#add_header X-SpamTest-Rate 0
+#upd_header 1 X-SpamTest-Rate 0
+#add_header X-SpamTest-SPF none
+#upd_header 1 X-SpamTest-SPF none
+add_header X-SpamTest-Status Not detected
+#upd_header 1 X-SpamTest-Status Not detected
+add_header X-SpamTest-Status-Extended not_detected
+upd_header 1 X-SpamTest-Status-Extended not_detected
+#add_header X-SpamTest-Version SMTP-Filter Version 3.0.0 [0284], KAS30/Release
+#upd_header 1 X-SpamTest-Version SMTP-Filter Version 3.0.0 [0284], KAS30/Release
+
+close
diff --git a/postfix/src/cleanup/bug3.ref b/postfix/src/cleanup/bug3.ref
new file mode 100644 (file)
index 0000000..da4d162
--- /dev/null
@@ -0,0 +1,29 @@
+*** ENVELOPE RECORDS bug3.file.tmp ***
+        0 message_size:             307             237               1               0             307
+       81 message_arrival_time: Thu Feb  2 09:02:07 2012
+      100 create_time: Thu Feb  2 09:02:07 2012
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 original_recipient: you@porcupine.org
+      199 recipient: you@porcupine.org
+      218 pointer_record:               0
+      235 *** MESSAGE CONTENTS bug3.file.tmp ***
+      237 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      299 regular_text:        id 9210192461E; Thu,  2 Feb 2012 09:02:07 -0500 (EST)
+      355 regular_text: Message-Id: <20120202140207.9210192461E@hades.porcupine.org>
+      417 regular_text: Date: Thu,  2 Feb 2012 09:02:07 -0500 (EST)
+      462 regular_text: From: me@porcupine.org (Wietse Venema)
+      502 pointer_record:             565
+      565 regular_text: X-SpamTest-Status: Not detected
+      598 pointer_record:             615
+      615 pointer_record:             674
+      674 regular_text: X-SpamTest-Status-Extended: not_detected
+      716 pointer_record:             657
+      657 pointer_record:             519
+      519 regular_text: 
+      521 regular_text: test
+      527 pointer_record:               0
+      544 *** HEADER EXTRACTED bug3.file.tmp ***
+      546 pointer_record:               0
+      563 *** MESSAGE FILE END bug3.file.tmp ***
diff --git a/postfix/src/cleanup/bug3.text.ref b/postfix/src/cleanup/bug3.text.ref
new file mode 100644 (file)
index 0000000..9e672b8
--- /dev/null
@@ -0,0 +1,21 @@
+*** ENVELOPE RECORDS bug3.file.tmp ***
+message_size:             307             237               1               0             307
+message_arrival_time: Thu Feb  2 09:02:07 2012
+create_time: Thu Feb  2 09:02:07 2012
+named_attribute: rewrite_context=local
+sender_fullname: Wietse Venema
+sender: me@porcupine.org
+original_recipient: you@porcupine.org
+recipient: you@porcupine.org
+*** MESSAGE CONTENTS bug3.file.tmp ***
+Received: by hades.porcupine.org (Postfix, from userid 1001)
+       id 9210192461E; Thu,  2 Feb 2012 09:02:07 -0500 (EST)
+Message-Id: <20120202140207.9210192461E@hades.porcupine.org>
+Date: Thu,  2 Feb 2012 09:02:07 -0500 (EST)
+From: me@porcupine.org (Wietse Venema)
+X-SpamTest-Status: Not detected
+X-SpamTest-Status-Extended: not_detected
+
+test
+*** HEADER EXTRACTED bug3.file.tmp ***
+*** MESSAGE FILE END bug3.file.tmp ***
index 18957fe1dd4d5f94d48a12b076de3a4565b65ba5..7616780f5ebd35cfc44e46ec297e1f564c592c67 100644 (file)
@@ -845,8 +845,7 @@ static off_t cleanup_find_header_start(CLEANUP_STATE *state, ssize_t index,
             /* Reset the saved PTR record and update last_type. */ ;
        else if ((header_label == 0
                  || (strncasecmp(header_label, STR(buf), len) == 0
-                     && (IS_SPACE_TAB(STR(buf)[len])
-                         || STR(buf)[len] == ':')))
+                     && (strlen(header_label) == len)))
                 && --index == 0) {
            /* If we have a saved PTR record, it points to start of header. */
            break;
index 3d6ddeaaab2082d0792dc2b62f487e98a3c5ce41..7038e050a750bcee09475e0ff35382ff158354b0 100644 (file)
@@ -461,7 +461,7 @@ typedef struct bind_props {
     char   *passwd;
     char   *realm;
     char   *authzid;
-}       bind_props;
+} bind_props;
 
 static int ldap_b2_interact(LDAP *ld, unsigned flags, void *props, void *inter)
 {
index b714a6c289e3679246a18294c3f2fff2fc05ba4b..6cd9b3545d965378ea50146bb34386c1b4326dc3 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      "20120130"
+#define MAIL_RELEASE_DATE      "20120202"
 #define MAIL_VERSION_NUMBER    "2.10"
 
 #ifdef SNAPSHOT