]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.7-20090711
authorWietse Venema <wietse@porcupine.org>
Sat, 11 Jul 2009 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:35:35 +0000 (06:35 +0000)
postfix/HISTORY
postfix/WISHLIST
postfix/html/postconf.5.html
postfix/man/man5/postconf.5
postfix/proto/postconf.proto
postfix/src/cleanup/cleanup_milter.c
postfix/src/global/mail_version.h
postfix/src/milter/milter8.c
postfix/src/verify/verify.c

index 8021755cf0f3a876749484c45b2bd171364a6041..b1238575c29078686e991e81137a7022ca1b0e1a 100644 (file)
@@ -15308,3 +15308,13 @@ Apologies for any names omitted.
        and avoid redundant logging and work when milter_header_checks
        and Milters make redundant or conflicting decisions. File:
        cleanup_milter.c.
+
+20090710
+
+       Bugfix (introduced Postfix 2.3): Postfix got out of sync
+       with a Milter application after the application sent a
+       "quarantine" request at end-of-message time. The milter
+       application would still be in the end-of-message state,
+       while Postfix would already be working on the next SMTP
+       event (typically, QUIT or MAIL FROM).  Problem diagnosed
+       with help from Alban Deniz. File: milter/milter8.c.
index f5a351f3d5061574c52cb170d078f32baa36f53a..f50e604288cb9bc9e1bb936ebda4fa40e087990b 100644 (file)
@@ -2,6 +2,10 @@ Wish list:
 
        Remove this file from the stable release.
 
+       Implement PREPEND action for milter_header_checks. Save the
+       to-be-prepended text to buffer, then emit it along with the
+       new header.
+
        Fix the header_body_checks API, so that the name of the map
        class (e.g. milter_header_checks) is available for logging.
 
index 95db4fa31562fc21ac13f2a0e5aca487f8d7ee8a..bcdf362d95a85e10b1956602208ab51e7db6b0c0 100644 (file)
@@ -5703,20 +5703,19 @@ manual page available actions. Currently, PREPEND is not implemented.
 a spam handling machine. Note that matches are case-insensitive
 by default. </p>
 
-<blockquote>
 <pre>
 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#milter_header_checks">milter_header_checks</a> = <a href="pcre_table.5.html">pcre</a>:/etc/postfix/<a href="postconf.5.html#milter_header_checks">milter_header_checks</a>
 </pre>
+
 <pre>
 /etc/postfix/<a href="postconf.5.html#milter_header_checks">milter_header_checks</a>:
-    /^X-SPAM-FLAG:\s+YES]/ FILTER mysmtp:sanitizer.example.com:25
+    /^X-SPAM-FLAG:\s+YES/ FILTER mysmtp:sanitizer.example.com:25
 </pre>
-</blockquote>
 
 <p> The <a href="postconf.5.html#milter_header_checks">milter_header_checks</a> mechanism could also be used for
 whitelisting. For example it could be used to skip heavy content
-scanning for DKIM-signed mail from known friendly domains. </p>
+inspection for DKIM-signed mail from known friendly domains. </p>
 
 <p> This feature is available in Postfix 2.7, and as an optional
 patch for Postfix 2.6. </p>
index 964641b03e5c4bb76638801a6baced6523af8ca9..76c201bf9f2ea4cc4a0df28e6c9b7c14b283bb8f 100644 (file)
@@ -3166,8 +3166,7 @@ manual page available actions. Currently, PREPEND is not implemented.
 The following example sends all mail that is marked as SPAM to
 a spam handling machine. Note that matches are case-insensitive
 by default.
-.sp
-.in +4
+.PP
 .nf
 .na
 .ft C
@@ -3176,19 +3175,19 @@ by default.
 .fi
 .ad
 .ft R
+.PP
 .nf
 .na
 .ft C
 /etc/postfix/milter_header_checks:
-    /^X-SPAM-FLAG:\es+YES]/ FILTER mysmtp:sanitizer.example.com:25
+    /^X-SPAM-FLAG:\es+YES/ FILTER mysmtp:sanitizer.example.com:25
 .fi
 .ad
 .ft R
-.in -4
 .PP
 The milter_header_checks mechanism could also be used for
 whitelisting. For example it could be used to skip heavy content
-scanning for DKIM-signed mail from known friendly domains.
+inspection for DKIM-signed mail from known friendly domains.
 .PP
 This feature is available in Postfix 2.7, and as an optional
 patch for Postfix 2.6.
index d15ab4c7476b5f3125ea6b9cba4eabdd32374591..348a7927b27985738d417cd974c562ea9458ce91 100644 (file)
@@ -12311,20 +12311,19 @@ manual page available actions. Currently, PREPEND is not implemented.
 a spam handling machine. Note that matches are case-insensitive
 by default. </p>
 
-<blockquote>
 <pre>
 /etc/postfix/main.cf:
     milter_header_checks = pcre:/etc/postfix/milter_header_checks
 </pre>
+
 <pre>
 /etc/postfix/milter_header_checks:
-    /^X-SPAM-FLAG:\s+YES]/ FILTER mysmtp:sanitizer.example.com:25
+    /^X-SPAM-FLAG:\s+YES/ FILTER mysmtp:sanitizer.example.com:25
 </pre>
-</blockquote> 
 
 <p> The milter_header_checks mechanism could also be used for
 whitelisting. For example it could be used to skip heavy content
-scanning for DKIM-signed mail from known friendly domains. </p>
+inspection for DKIM-signed mail from known friendly domains. </p>
 
 <p> This feature is available in Postfix 2.7, and as an optional
 patch for Postfix 2.6. </p>
index 74816dfb52f8260c15a5697699a39a8df783e61b..6ecfa4c3b01d290fc779408f7af8b064739608d9 100644 (file)
@@ -247,6 +247,7 @@ static void cleanup_milter_hbc_log(void *context, const char *action,
 static void cleanup_milter_header_prepend(void *context, int rec_type,
                                 const char *buf, ssize_t len, off_t offset)
 {
+    /* XXX save prepended header to buffer. */
     msg_warn("the milter_header/body_checks prepend action is not implemented");
 }
 
@@ -630,6 +631,7 @@ static const char *cleanup_add_header(void *context, const char *name,
        vstring_free(buf);
        return (cleanup_milter_error(state, errno));
     }
+    /* XXX emit prepended header, then clear it. */
     cleanup_out_header(state, buf);            /* Includes padding */
     vstring_free(buf);
     if ((reverse_ptr_offset = vstream_ftell(state->dst)) < 0) {
@@ -1007,6 +1009,7 @@ static const char *cleanup_patch_header(CLEANUP_STATE *state,
        msg_warn("%s: seek file %s: %m", myname, cleanup_path);
        CLEANUP_PATCH_HEADER_RETURN(cleanup_milter_error(state, errno));
     }
+    /* XXX emit prepended header, then clear it. */
     cleanup_out_header(state, buf);            /* Includes padding */
     if (msg_verbose > 1)
        msg_info("%s: %ld: write %.*s", myname, (long) new_hdr_offset,
index fcc5cebf8d5cb970e48cea27cca884eb8501ddd1..dfde2ad4bd9c74bfd8d20237da2e4855ef276ec7 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      "20090607"
+#define MAIL_RELEASE_DATE      "20090711"
 #define MAIL_VERSION_NUMBER    "2.7"
 
 #ifdef SNAPSHOT
index d49f656dd094b3423f2ad67733595f4c883bbcac..e839532f6a87a30473dd47421d5ad4d7d25af240 100644 (file)
@@ -1296,7 +1296,8 @@ static const char *milter8_event(MILTER8 *milter, int event,
            /*
             * Decision: quarantine. In Sendmail 8.13 this does not imply a
             * transition in the receiver state (reply, reject, tempfail,
-            * accept, discard).
+            * accept, discard). We should not transition, either, otherwise
+            * we get out of sync.
             */
        case SMFIR_QUARANTINE:
            /* XXX What to do with the "reason" text? */
@@ -1304,7 +1305,8 @@ static const char *milter8_event(MILTER8 *milter, int event,
                                  MILTER8_DATA_BUFFER, milter->buf,
                                  MILTER8_DATA_END) != 0)
                MILTER8_EVENT_BREAK(milter->def_reply);
-           MILTER8_EVENT_BREAK("H");
+           milter8_def_reply(milter, "H");
+           continue;
 
            /*
             * Decision: skip further events of this type.
index 6b04c8f00beb39371b8e5e721431c2d2411a9d3d..322f636618f6220ec6ad4c56ec9a685de3f6e48e 100644 (file)
@@ -572,7 +572,7 @@ static void pre_jail_init(char *unused_name, char **unused_argv)
      * 
      * The solution is to query a map type and obtain its properties before
      * opening it. A clean solution is to add a dict_info() API that is
-     * simlar to dict_open() except it returns properties (dict flags) only.
+     * similar to dict_open() except it returns properties (dict flags) only.
      * A pragmatic solution is to overload the existing API and have
      * dict_open() return a dummy map when given a null map name.
      *