]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.4-20061221
authorWietse Venema <wietse@porcupine.org>
Thu, 21 Dec 2006 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:32:44 +0000 (06:32 +0000)
28 files changed:
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/html/postconf.5.html
postfix/html/postqueue.1.html
postfix/man/man1/postqueue.1
postfix/man/man5/postconf.5
postfix/proto/postconf.proto
postfix/src/cleanup/Makefile.in
postfix/src/cleanup/cleanup_milter.c
postfix/src/cleanup/cleanup_milter.in6a [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.in6b [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.in6c [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.in7 [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.in8 [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.in9 [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.ref6a [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.ref6b [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.ref6c [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.ref7 [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.ref8 [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.ref9 [new file with mode: 0644]
postfix/src/cleanup/test-queue-file6 [new file with mode: 0644]
postfix/src/cleanup/test-queue-file7 [new file with mode: 0644]
postfix/src/cleanup/test-queue-file8 [new file with mode: 0644]
postfix/src/cleanup/test-queue-file9 [new file with mode: 0644]
postfix/src/global/mail_version.h
postfix/src/milter/milter8.c
postfix/src/postqueue/postqueue.c

index 8c1e6ede69dd03989da57596ebf255ac5b3bd7f2..37bc435e4bf00e72301aa2b929f23e1656c3fd0b 100644 (file)
@@ -13011,6 +13011,12 @@ Apologies for any names omitted.
        deferred queue to the incoming queue.  Files: flush/flush.c,
        qmgr/qmgr_scan.c.
 
+       Cleanup: the sendmail and postqueue commands no longer
+       terminate with a non-standard error status after a run-time
+       error in some Postfix internal routine (typically, some
+       essential file is not accessible, or the system is out of
+       memory). Files: sendmail/sendmail.c, postqueue/postqueue.c.
+
        Feature: "sendmail -qIqueueid" and "postqueue -i queueid"
        to flush a specific queue file. Files: sendmail/sendmail.c,
        postqueue/postqueue.c, global/flush_clnt.c, flush/flush.c.
@@ -13025,6 +13031,20 @@ Apologies for any names omitted.
        flush/flush.c, *qmgr/qmgr.c, *qmgr/qmgr_scan.c,
        *qmgr/qmgr_active.c, *qmgr/qmgr_message.c.
 
+20061220
+
+       Workaround: PMilter 0.95 does not deliver SMFIC_EOB+data
+       to the application as SMFIC_BODY+data followed by SMFIC_EOB.
+       To avoid compatibility problems, Postfix now sends
+       SMFIC_BODY+data followed by SMFIC_EOB.  File: milter/milter8.c.
+
+       Bugfix (introduced with Postfix 2.3): when inserting
+       Milter-generated headers at increasing positions in a
+       message, a later header could end up at a previously used
+       insertion point.  Thus, inserting headers at positions (N,
+       N+M) could work as if (N, N) had been specified. Problem
+       reported by Mark Martinec.  File: milter/milter8.c.
+
 Wish list:
 
        Update MILTER_README with Martinec info.
index c10dd823e0a665506016f52509de816f5dd1ebae..8f14d782786d9db9a912770e997f28738342029f 100644 (file)
@@ -21,9 +21,16 @@ Incompatible changes with Postfix snapshot 20061217
 ===================================================
 
 Postfix no longer requires a domain name. It uses "localdomain" as
-the default Internet domain name when no domain is specified in
-main.cf, and when the machine hostname does not include domain name
-information.
+the default Internet domain name when no domain is specified via
+main.cf or via the machine's hostname.
+
+Major changes with Postfix snapshot 20061217
+============================================
+
+More precise queue flushing with the ETRN, "postqueue -s site", and
+"sendmail -qRsite" commands, after minimization of race conditions.
+New per-queue-file flushing with "postqueue -i queueid" and "sendmail
+-qIqueueid".
 
 Incompatible changes with Postfix snapshot 20061209
 ===================================================
index c1e0f2b4c97a9b2ab4b44c3089a27e159339a9d1..03fbe53db4998312f45fa50909331db8ed8645f4 100644 (file)
@@ -2088,7 +2088,7 @@ The default time unit is s (seconds).
 
 <p>
 Disable DNS lookups in the Postfix SMTP and LMTP clients. When
-disabled, hosts are looked up with the gethostbyname() system
+disabled, hosts are looked up with the getaddrinfo() system
 library routine which normally also looks in /etc/hosts.
 </p>
 
@@ -9247,7 +9247,7 @@ This feature is available in Postfix 2.0 and later.  </dd>
 <dd>Reject the request when the client hostname is listed with the
 A record "<i>d.d.d.d</i>" under <i>rbl_domain</i> (Postfix version
 2.1 and later only).  If no "<i>=d.d.d.d</i>" is specified, reject
-the request when the reversed client network address is listed with
+the request when the client hostname is listed with
 any A record under <i>rbl_domain</i>. See the <a href="postconf.5.html#reject_rbl_client">reject_rbl_client</a>
 description above for additional RBL related configuration parameters.
 This feature is available in Postfix 2.0 and later.  </dd>
@@ -10156,7 +10156,7 @@ rejected requests (default: 504). </dd>
 <dd>Reject the request when the RCPT TO domain is listed with the
 A record "<i>d.d.d.d</i>" under <i>rbl_domain</i> (Postfix version
 2.1 and later only).  If no "<i>=d.d.d.d</i>" is specified, reject
-the request when the reversed client network address is listed with
+the request when the RCPT TO domain is listed with
 any A record under <i>rbl_domain</i>. <br> The <a href="postconf.5.html#maps_rbl_reject_code">maps_rbl_reject_code</a>
 parameter specifies the response code for rejected requests (default:
 554); the <a href="postconf.5.html#default_rbl_reply">default_rbl_reply</a> parameter specifies the default server
@@ -10668,7 +10668,7 @@ rejected requests (default: 504). </dd>
 <dd>Reject the request when the MAIL FROM domain is listed with
 the A record "<i>d.d.d.d</i>" under <i>rbl_domain</i> (Postfix
 version 2.1 and later only).  If no "<i>=d.d.d.d</i>" is specified,
-reject the request when the reversed client network address is
+reject the request when the MAIL FROM domain is
 listed with any A record under <i>rbl_domain</i>. <br> The
 <a href="postconf.5.html#maps_rbl_reject_code">maps_rbl_reject_code</a> parameter specifies the response code for
 rejected requests (default:  554); the <a href="postconf.5.html#default_rbl_reply">default_rbl_reply</a> parameter
index 0a96c5486cc8eb5fcbcaaea51f25433e60e37551..6061cfa58d8a3e82cac1c7ab5fd794b0ae464b9c 100644 (file)
@@ -43,10 +43,14 @@ POSTQUEUE(1)                                                      POSTQUEUE(1)
               other mail.
 
        <b>-i</b> <i>queue</i><b>_</b><i>id</i>
-              Schedule immediate delivery of mail with the speci-
-              fied  queue  ID.   This  feature  uses the <a href="flush.8.html"><b>flush</b>(8)</a>
-              server, and  is  available  with  Postfix  2.4  and
-              later.
+              Schedule immediate delivery of deferred  mail  with
+              the specified queue ID.
+
+              This option implements the traditional <b>sendmail -qI</b>
+              command, by contacting the <a href="flush.8.html"><b>flush</b>(8)</a> server.
+
+              This feature is available with Postfix version  2.4
+              and later.
 
        <b>-p</b>     Produce a traditional sendmail-style queue listing.
               This option implements the traditional  <b>mailq</b>  com-
index 79a49f6afe0af452c07ed0748d5f23130d13bd11..a6f51534ca33310a431bd2fd26349ee95c115abc 100644 (file)
@@ -39,9 +39,13 @@ by contacting the Postfix \fBqmgr\fR(8) daemon.
 Warning: flushing undeliverable mail frequently will result in
 poor delivery performance of all other mail.
 .IP "\fB-i \fIqueue_id\fR"
-Schedule immediate delivery of mail with the specified queue ID.
-This feature uses the \fBflush\fR(8) server, and is available
-with Postfix 2.4 and later.
+Schedule immediate delivery of deferred mail with the
+specified queue ID.
+
+This option implements the traditional \fBsendmail -qI\fR
+command, by contacting the \fBflush\fR(8) server.
+
+This feature is available with Postfix version 2.4 and later.
 .IP \fB-p\fR
 Produce a traditional sendmail-style queue listing.
 This option implements the traditional \fBmailq\fR command,
index 22a49f1bbac5b7e58e60615c8f8312d0bf01e1fe..64c3e303c168ab533c492dc147a5aa4d62568f44 100644 (file)
@@ -1132,7 +1132,7 @@ Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 The default time unit is s (seconds).
 .SH disable_dns_lookups (default: no)
 Disable DNS lookups in the Postfix SMTP and LMTP clients. When
-disabled, hosts are looked up with the gethostbyname() system
+disabled, hosts are looked up with the getaddrinfo() system
 library routine which normally also looks in /etc/hosts.
 .PP
 DNS lookups are enabled by default.
@@ -5451,7 +5451,7 @@ This feature is available in Postfix 2.0 and later.
 Reject the request when the client hostname is listed with the
 A record "\fId.d.d.d\fR" under \fIrbl_domain\fR (Postfix version
 2.1 and later only).  If no "\fI=d.d.d.d\fR" is specified, reject
-the request when the reversed client network address is listed with
+the request when the client hostname is listed with
 any A record under \fIrbl_domain\fR. See the reject_rbl_client
 description above for additional RBL related configuration parameters.
 This feature is available in Postfix 2.0 and later.
@@ -6025,7 +6025,7 @@ rejected requests (default: 504).
 Reject the request when the RCPT TO domain is listed with the
 A record "\fId.d.d.d\fR" under \fIrbl_domain\fR (Postfix version
 2.1 and later only).  If no "\fI=d.d.d.d\fR" is specified, reject
-the request when the reversed client network address is listed with
+the request when the RCPT TO domain is listed with
 any A record under \fIrbl_domain\fR.
 .br
 The maps_rbl_reject_code
@@ -6359,7 +6359,7 @@ rejected requests (default: 504).
 Reject the request when the MAIL FROM domain is listed with
 the A record "\fId.d.d.d\fR" under \fIrbl_domain\fR (Postfix
 version 2.1 and later only).  If no "\fI=d.d.d.d\fR" is specified,
-reject the request when the reversed client network address is
+reject the request when the MAIL FROM domain is
 listed with any A record under \fIrbl_domain\fR.
 .br
 The
index e73e498477a94197dd93c0fed27ca40be97c73d5..abbd8714bde0f79a057bbf9bc224b7458dd336da 100644 (file)
@@ -4635,7 +4635,7 @@ This feature is available in Postfix 2.0 and later.  </dd>
 <dd>Reject the request when the client hostname is listed with the
 A record "<i>d.d.d.d</i>" under <i>rbl_domain</i> (Postfix version
 2.1 and later only).  If no "<i>=d.d.d.d</i>" is specified, reject
-the request when the reversed client network address is listed with
+the request when the client hostname is listed with
 any A record under <i>rbl_domain</i>. See the reject_rbl_client
 description above for additional RBL related configuration parameters.
 This feature is available in Postfix 2.0 and later.  </dd>
@@ -5305,7 +5305,7 @@ rejected requests (default: 504). </dd>
 <dd>Reject the request when the RCPT TO domain is listed with the
 A record "<i>d.d.d.d</i>" under <i>rbl_domain</i> (Postfix version
 2.1 and later only).  If no "<i>=d.d.d.d</i>" is specified, reject
-the request when the reversed client network address is listed with
+the request when the RCPT TO domain is listed with
 any A record under <i>rbl_domain</i>. <br> The maps_rbl_reject_code
 parameter specifies the response code for rejected requests (default:
 554); the default_rbl_reply parameter specifies the default server
@@ -5656,7 +5656,7 @@ rejected requests (default: 504). </dd>
 <dd>Reject the request when the MAIL FROM domain is listed with
 the A record "<i>d.d.d.d</i>" under <i>rbl_domain</i> (Postfix
 version 2.1 and later only).  If no "<i>=d.d.d.d</i>" is specified,
-reject the request when the reversed client network address is
+reject the request when the MAIL FROM domain is
 listed with any A record under <i>rbl_domain</i>. <br> The
 maps_rbl_reject_code parameter specifies the response code for
 rejected requests (default:  554); the default_rbl_reply parameter
@@ -6591,7 +6591,7 @@ The default time unit is h (hours).
 
 <p>
 Disable DNS lookups in the Postfix SMTP and LMTP clients. When
-disabled, hosts are looked up with the gethostbyname() system
+disabled, hosts are looked up with the getaddrinfo() system
 library routine which normally also looks in /etc/hosts.
 </p>
 
index 2b1993750cc20b11375f40d59bcd4cdf715436b2..2bf737122db22bb9047a762347236c24e84f4257 100644 (file)
@@ -67,7 +67,7 @@ cleanup_milter: cleanup_milter.o $(CLEANUP_MILTER_OBJS) $(LIBS)
 
 tests: cleanup_masquerade_test cleanup_milter_test bug_tests \
        cleanup_milter_test2 cleanup_milter_test3 cleanup_milter_test4 \
-       cleanup_milter_test5
+       cleanup_milter_test5 cleanup_milter_test6 cleanup_milter_test7
 
 root_tests:
 
@@ -166,6 +166,57 @@ cleanup_milter_test5: cleanup_milter test-queue-file5 cleanup_milter.in5 \
        diff cleanup_milter.ref5 cleanup_milter.tmp
        rm -f test-queue-file5.tmp cleanup_milter.tmp
 
+cleanup_milter_test6: cleanup_milter_test6a cleanup_milter_test6b cleanup_milter_test6c
+       rm -f test-queue-file6.tmp cleanup_milter.tmp
+
+cleanup_milter_test6a: cleanup_milter test-queue-file6 cleanup_milter.in6a \
+       cleanup_milter.ref6a test-queue-file6 ../postcat/postcat
+       cp test-queue-file6 test-queue-file6.tmp
+       chmod u+w test-queue-file6.tmp
+       ./cleanup_milter <cleanup_milter.in6a
+       ../postcat/postcat -ov test-queue-file6.tmp 2>/dev/null >cleanup_milter.tmp
+       diff cleanup_milter.ref6a cleanup_milter.tmp
+
+cleanup_milter_test6b: cleanup_milter test-queue-file6 cleanup_milter.in6b \
+       cleanup_milter.ref6b test-queue-file6 ../postcat/postcat
+       cp test-queue-file6 test-queue-file6.tmp
+       chmod u+w test-queue-file6.tmp
+       ./cleanup_milter <cleanup_milter.in6b
+       ../postcat/postcat -ov test-queue-file6.tmp 2>/dev/null >cleanup_milter.tmp
+       diff cleanup_milter.ref6b cleanup_milter.tmp
+
+cleanup_milter_test6c: cleanup_milter test-queue-file6 cleanup_milter.in6c \
+       cleanup_milter.ref6c test-queue-file6 ../postcat/postcat
+       cp test-queue-file6 test-queue-file6.tmp
+       chmod u+w test-queue-file6.tmp
+       ./cleanup_milter <cleanup_milter.in6c
+       ../postcat/postcat -ov test-queue-file6.tmp 2>/dev/null >cleanup_milter.tmp
+       diff cleanup_milter.ref6c cleanup_milter.tmp
+
+cleanup_milter_test7: cleanup_milter test-queue-file7 cleanup_milter.in7 \
+       cleanup_milter.ref7 test-queue-file7 ../postcat/postcat
+       cp test-queue-file7 test-queue-file7.tmp
+       chmod u+w test-queue-file7.tmp
+       ./cleanup_milter <cleanup_milter.in7
+       ../postcat/postcat -ov test-queue-file7.tmp 2>/dev/null >cleanup_milter.tmp
+       diff cleanup_milter.ref7 cleanup_milter.tmp
+
+cleanup_milter_test8: cleanup_milter test-queue-file8 cleanup_milter.in8 \
+       cleanup_milter.ref8 test-queue-file8 ../postcat/postcat
+       cp test-queue-file8 test-queue-file8.tmp
+       chmod u+w test-queue-file8.tmp
+       ./cleanup_milter <cleanup_milter.in8
+       ../postcat/postcat -ov test-queue-file8.tmp 2>/dev/null >cleanup_milter.tmp
+       diff cleanup_milter.ref8 cleanup_milter.tmp
+
+cleanup_milter_test9: cleanup_milter test-queue-file9 cleanup_milter.in9 \
+       cleanup_milter.ref9 test-queue-file9 ../postcat/postcat
+       cp test-queue-file9 test-queue-file9.tmp
+       chmod u+w test-queue-file9.tmp
+       ./cleanup_milter <cleanup_milter.in9
+       ../postcat/postcat -ov test-queue-file9.tmp 2>/dev/null >cleanup_milter.tmp
+       diff cleanup_milter.ref9 cleanup_milter.tmp
+
 depend: $(MAKES)
        (sed '1,/^# do not edit/!d' Makefile.in; \
        set -e; for i in [a-z][a-z0-9]*.c; do \
index 5836159c4037a7e0585dac82f52af6d72c453aaf..da4fddb1fa2c22b1ba26c02fc9405bc7d27973fa 100644 (file)
@@ -401,6 +401,10 @@ static off_t cleanup_find_header(CLEANUP_STATE *state, ssize_t index,
      * 
      * Thus, header insert operations are relative to the content as delivered,
      * that is, the content including our own Received: header.
+     * 
+     * None of the above is applicable after a Milter inserts a header before
+     * our own Received: header. From then on, our own Received: header
+     * becomes just like other headers.
      */
 #define CLEANUP_FIND_HEADER_NOTFOUND   (-1)
 #define CLEANUP_FIND_HEADER_IOERROR    (-2)
@@ -460,8 +464,7 @@ static off_t cleanup_find_header(CLEANUP_STATE *state, ssize_t index,
        }
        /* The middle of a multi-record header. */
        else if (last_type == REC_TYPE_CONT || IS_SPACE_TAB(STR(buf)[0])) {
-           /* Reset the saved PTR record. */
-           ptr_offset = 0;
+           /* Reset the saved PTR record and update last_type. */
        }
        /* No more message headers. */
        else if ((len = is_header(STR(buf))) == 0) {
@@ -469,7 +472,7 @@ static off_t cleanup_find_header(CLEANUP_STATE *state, ssize_t index,
        }
        /* This the start of a message header. */
        else if (hdr_count++ < skip_headers)
-           continue;
+            /* 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])
@@ -478,6 +481,7 @@ static off_t cleanup_find_header(CLEANUP_STATE *state, ssize_t index,
            /* If we have a saved PTR record, it points to start of header. */
            break;
        }
+       ptr_offset = 0;
        last_type = rec_type;
     }
 
diff --git a/postfix/src/cleanup/cleanup_milter.in6a b/postfix/src/cleanup/cleanup_milter.in6a
new file mode 100644 (file)
index 0000000..aec3d3a
--- /dev/null
@@ -0,0 +1,5 @@
+open test-queue-file6.tmp
+
+ins_header 1 X-Virus-Scanned hya
+
+close
diff --git a/postfix/src/cleanup/cleanup_milter.in6b b/postfix/src/cleanup/cleanup_milter.in6b
new file mode 100644 (file)
index 0000000..832a54a
--- /dev/null
@@ -0,0 +1,6 @@
+open test-queue-file6.tmp
+
+ins_header 1 X-Virus-Scanned hya
+ins_header 2 Domainkey-Signature hya
+
+close
diff --git a/postfix/src/cleanup/cleanup_milter.in6c b/postfix/src/cleanup/cleanup_milter.in6c
new file mode 100644 (file)
index 0000000..3ef53ff
--- /dev/null
@@ -0,0 +1,7 @@
+open test-queue-file6.tmp
+
+ins_header 1 X-Virus-Scanned hya
+ins_header 2 Domainkey-Signature hya
+ins_header 2 DKIM-Signature hya
+
+close
diff --git a/postfix/src/cleanup/cleanup_milter.in7 b/postfix/src/cleanup/cleanup_milter.in7
new file mode 100644 (file)
index 0000000..13ff78c
--- /dev/null
@@ -0,0 +1,7 @@
+open test-queue-file7.tmp
+
+ins_header 2 X-Virus-Scanned hya
+ins_header 2 Domainkey-Signature hya
+ins_header 2 DKIM-Signature hya
+
+close
diff --git a/postfix/src/cleanup/cleanup_milter.in8 b/postfix/src/cleanup/cleanup_milter.in8
new file mode 100644 (file)
index 0000000..508b4ad
--- /dev/null
@@ -0,0 +1,7 @@
+open test-queue-file8.tmp
+
+ins_header 1 inserted-at-1 hya
+ins_header 2 inserted-at-2 hya
+ins_header 3 inserted-at-3 hya
+
+close
diff --git a/postfix/src/cleanup/cleanup_milter.in9 b/postfix/src/cleanup/cleanup_milter.in9
new file mode 100644 (file)
index 0000000..3bbdc3f
--- /dev/null
@@ -0,0 +1,7 @@
+open test-queue-file9.tmp
+
+ins_header 1 inserted-at-1 hya
+ins_header 3 inserted-at-3 hya
+ins_header 5 inserted-at-5 hya
+
+close
diff --git a/postfix/src/cleanup/cleanup_milter.ref6a b/postfix/src/cleanup/cleanup_milter.ref6a
new file mode 100644 (file)
index 0000000..4b9e01d
--- /dev/null
@@ -0,0 +1,27 @@
+*** ENVELOPE RECORDS test-queue-file6.tmp ***
+        0 message_size:             329             181               1               0
+       65 message_arrival_time: Tue Jul 25 15:37:06 2006
+       82 create_time: Tue Jul 25 15:37:06 2006
+      106 named_attribute: rewrite_context=local
+      129 sender_fullname: Wietse Venema
+      144 sender: me@porcupine.org
+      162 pointer_record:               0
+      179 *** MESSAGE CONTENTS test-queue-file6.tmp ***
+      181 pointer_record:             552
+      552 regular_text: X-Virus-Scanned: hya
+      574 regular_text: Received: by bristle.watson.ibm.com (Postfix, from userid 0)
+      636 pointer_record:             243
+      243 regular_text:        id 034B229013F; Tue, 25 Jul 2006 15:37:06 -0400 (EDT)
+      299 regular_text: From: me@porcupine.org
+      323 regular_text: To: you@porcupine.org
+      346 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      408 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      453 regular_text: Subject: hey!
+      468 pointer_record:               0
+      485 regular_text: 
+      487 regular_text: text
+      493 pointer_record:               0
+      510 *** HEADER EXTRACTED test-queue-file6.tmp ***
+      512 original_recipient: you@porcupine.org
+      531 recipient: you@porcupine.org
+      550 *** MESSAGE FILE END test-queue-file6.tmp ***
diff --git a/postfix/src/cleanup/cleanup_milter.ref6b b/postfix/src/cleanup/cleanup_milter.ref6b
new file mode 100644 (file)
index 0000000..38d7db0
--- /dev/null
@@ -0,0 +1,30 @@
+*** ENVELOPE RECORDS test-queue-file6.tmp ***
+        0 message_size:             329             181               1               0
+       65 message_arrival_time: Tue Jul 25 15:37:06 2006
+       82 create_time: Tue Jul 25 15:37:06 2006
+      106 named_attribute: rewrite_context=local
+      129 sender_fullname: Wietse Venema
+      144 sender: me@porcupine.org
+      162 pointer_record:               0
+      179 *** MESSAGE CONTENTS test-queue-file6.tmp ***
+      181 pointer_record:             552
+      552 regular_text: X-Virus-Scanned: hya
+      574 pointer_record:             653
+      653 regular_text: Domainkey-Signature: hya
+      679 regular_text: Received: by bristle.watson.ibm.com (Postfix, from userid 0)
+      741 pointer_record:             636
+      636 pointer_record:             243
+      243 regular_text:        id 034B229013F; Tue, 25 Jul 2006 15:37:06 -0400 (EDT)
+      299 regular_text: From: me@porcupine.org
+      323 regular_text: To: you@porcupine.org
+      346 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      408 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      453 regular_text: Subject: hey!
+      468 pointer_record:               0
+      485 regular_text: 
+      487 regular_text: text
+      493 pointer_record:               0
+      510 *** HEADER EXTRACTED test-queue-file6.tmp ***
+      512 original_recipient: you@porcupine.org
+      531 recipient: you@porcupine.org
+      550 *** MESSAGE FILE END test-queue-file6.tmp ***
diff --git a/postfix/src/cleanup/cleanup_milter.ref6c b/postfix/src/cleanup/cleanup_milter.ref6c
new file mode 100644 (file)
index 0000000..d979e7d
--- /dev/null
@@ -0,0 +1,32 @@
+*** ENVELOPE RECORDS test-queue-file6.tmp ***
+        0 message_size:             329             181               1               0
+       65 message_arrival_time: Tue Jul 25 15:37:06 2006
+       82 create_time: Tue Jul 25 15:37:06 2006
+      106 named_attribute: rewrite_context=local
+      129 sender_fullname: Wietse Venema
+      144 sender: me@porcupine.org
+      162 pointer_record:               0
+      179 *** MESSAGE CONTENTS test-queue-file6.tmp ***
+      181 pointer_record:             552
+      552 regular_text: X-Virus-Scanned: hya
+      574 pointer_record:             758
+      758 regular_text: DKIM-Signature: hya
+      779 pointer_record:             653
+      653 regular_text: Domainkey-Signature: hya
+      679 regular_text: Received: by bristle.watson.ibm.com (Postfix, from userid 0)
+      741 pointer_record:             636
+      636 pointer_record:             243
+      243 regular_text:        id 034B229013F; Tue, 25 Jul 2006 15:37:06 -0400 (EDT)
+      299 regular_text: From: me@porcupine.org
+      323 regular_text: To: you@porcupine.org
+      346 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      408 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      453 regular_text: Subject: hey!
+      468 pointer_record:               0
+      485 regular_text: 
+      487 regular_text: text
+      493 pointer_record:               0
+      510 *** HEADER EXTRACTED test-queue-file6.tmp ***
+      512 original_recipient: you@porcupine.org
+      531 recipient: you@porcupine.org
+      550 *** MESSAGE FILE END test-queue-file6.tmp ***
diff --git a/postfix/src/cleanup/cleanup_milter.ref7 b/postfix/src/cleanup/cleanup_milter.ref7
new file mode 100644 (file)
index 0000000..aa1f16e
--- /dev/null
@@ -0,0 +1,31 @@
+*** ENVELOPE RECORDS test-queue-file7.tmp ***
+        0 message_size:             329             181               1               0
+       65 message_arrival_time: Tue Jul 25 15:37:06 2006
+       82 create_time: Tue Jul 25 15:37:06 2006
+      106 named_attribute: rewrite_context=local
+      129 sender_fullname: Wietse Venema
+      144 sender: me@porcupine.org
+      162 pointer_record:               0
+      179 *** MESSAGE CONTENTS test-queue-file7.tmp ***
+      181 regular_text: Received: by bristle.watson.ibm.com (Postfix, from userid 0)
+      243 regular_text:        id 034B229013F; Tue, 25 Jul 2006 15:37:06 -0400 (EDT)
+      299 pointer_record:             658
+      658 regular_text: DKIM-Signature: hya
+      679 pointer_record:             615
+      615 regular_text: Domainkey-Signature: hya
+      641 pointer_record:             552
+      552 regular_text: X-Virus-Scanned: hya
+      574 regular_text: From: me@porcupine.org
+      598 pointer_record:             323
+      323 regular_text: To: you@porcupine.org
+      346 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      408 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      453 regular_text: Subject: hey!
+      468 pointer_record:               0
+      485 regular_text: 
+      487 regular_text: text
+      493 pointer_record:               0
+      510 *** HEADER EXTRACTED test-queue-file7.tmp ***
+      512 original_recipient: you@porcupine.org
+      531 recipient: you@porcupine.org
+      550 *** MESSAGE FILE END test-queue-file7.tmp ***
diff --git a/postfix/src/cleanup/cleanup_milter.ref8 b/postfix/src/cleanup/cleanup_milter.ref8
new file mode 100644 (file)
index 0000000..64ef7d1
--- /dev/null
@@ -0,0 +1,33 @@
+*** ENVELOPE RECORDS test-queue-file8.tmp ***
+        0 message_size:             329             181               1               0
+       65 message_arrival_time: Tue Jul 25 15:37:06 2006
+       82 create_time: Tue Jul 25 15:37:06 2006
+      106 named_attribute: rewrite_context=local
+      129 sender_fullname: Wietse Venema
+      144 sender: me@porcupine.org
+      162 pointer_record:               0
+      179 *** MESSAGE CONTENTS test-queue-file8.tmp ***
+      181 pointer_record:             552
+      552 regular_text: inserted-at-1: hya
+      572 pointer_record:             651
+      651 regular_text: inserted-at-2: hya
+      671 pointer_record:             750
+      750 regular_text: inserted-at-3: hya
+      770 regular_text: Received: by bristle.watson.ibm.com (Postfix, from userid 0)
+      832 pointer_record:             733
+      733 pointer_record:             634
+      634 pointer_record:             243
+      243 regular_text:        id 034B229013F; Tue, 25 Jul 2006 15:37:06 -0400 (EDT)
+      299 regular_text: From: me@porcupine.org
+      323 regular_text: To: you@porcupine.org
+      346 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      408 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      453 regular_text: Subject: hey!
+      468 pointer_record:               0
+      485 regular_text: 
+      487 regular_text: text
+      493 pointer_record:               0
+      510 *** HEADER EXTRACTED test-queue-file8.tmp ***
+      512 original_recipient: you@porcupine.org
+      531 recipient: you@porcupine.org
+      550 *** MESSAGE FILE END test-queue-file8.tmp ***
diff --git a/postfix/src/cleanup/cleanup_milter.ref9 b/postfix/src/cleanup/cleanup_milter.ref9
new file mode 100644 (file)
index 0000000..91cd760
--- /dev/null
@@ -0,0 +1,32 @@
+*** ENVELOPE RECORDS test-queue-file9.tmp ***
+        0 message_size:             329             181               1               0
+       65 message_arrival_time: Tue Jul 25 15:37:06 2006
+       82 create_time: Tue Jul 25 15:37:06 2006
+      106 named_attribute: rewrite_context=local
+      129 sender_fullname: Wietse Venema
+      144 sender: me@porcupine.org
+      162 pointer_record:               0
+      179 *** MESSAGE CONTENTS test-queue-file9.tmp ***
+      181 pointer_record:             552
+      552 regular_text: inserted-at-1: hya
+      572 regular_text: Received: by bristle.watson.ibm.com (Postfix, from userid 0)
+      634 pointer_record:             243
+      243 regular_text:        id 034B229013F; Tue, 25 Jul 2006 15:37:06 -0400 (EDT)
+      299 pointer_record:             651
+      651 regular_text: inserted-at-3: hya
+      671 regular_text: From: me@porcupine.org
+      695 pointer_record:             712
+      712 regular_text: inserted-at-5: hya
+      732 pointer_record:             323
+      323 regular_text: To: you@porcupine.org
+      346 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      408 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      453 regular_text: Subject: hey!
+      468 pointer_record:               0
+      485 regular_text: 
+      487 regular_text: text
+      493 pointer_record:               0
+      510 *** HEADER EXTRACTED test-queue-file9.tmp ***
+      512 original_recipient: you@porcupine.org
+      531 recipient: you@porcupine.org
+      550 *** MESSAGE FILE END test-queue-file9.tmp ***
diff --git a/postfix/src/cleanup/test-queue-file6 b/postfix/src/cleanup/test-queue-file6
new file mode 100644 (file)
index 0000000..f5a7b01
Binary files /dev/null and b/postfix/src/cleanup/test-queue-file6 differ
diff --git a/postfix/src/cleanup/test-queue-file7 b/postfix/src/cleanup/test-queue-file7
new file mode 100644 (file)
index 0000000..f5a7b01
Binary files /dev/null and b/postfix/src/cleanup/test-queue-file7 differ
diff --git a/postfix/src/cleanup/test-queue-file8 b/postfix/src/cleanup/test-queue-file8
new file mode 100644 (file)
index 0000000..f5a7b01
Binary files /dev/null and b/postfix/src/cleanup/test-queue-file8 differ
diff --git a/postfix/src/cleanup/test-queue-file9 b/postfix/src/cleanup/test-queue-file9
new file mode 100644 (file)
index 0000000..f5a7b01
Binary files /dev/null and b/postfix/src/cleanup/test-queue-file9 differ
index 98879f1e0731b5d1e3f5f9d7ff97206fa7a6c19c..87273163e7305bbbf78a3c5179a683d0d094987c 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      "20061217"
+#define MAIL_RELEASE_DATE      "20061221"
 #define MAIL_VERSION_NUMBER    "2.4"
 
 #ifdef SNAPSHOT
index f5ac7240aff38bc80396716b71d88c58d52ce4dd..2819f2c438b1fa5ddc6e6bc0cf138105ab37fb35 100644 (file)
@@ -2097,14 +2097,14 @@ static void milter8_body(void *ptr, int rec_type,
        vstring_memcat(milter->body, bp, count);
        bp += count;
        todo -= count;
-       /* Flush body chunk buffer when full. */
+       /* Flush body chunk buffer when full. See also milter8_eob(). */
        if (LEN(milter->body) == MILTER_CHUNK_SIZE) {
            msg_ctx->resp =
                milter8_event(milter, SMFIC_BODY, SMFIP_NOBODY,
                              DONT_SKIP_REPLY, msg_ctx->macros,
                              MILTER8_DATA_BUFFER, milter->body,
                              MILTER8_DATA_END);
-           if (msg_ctx->resp != 0 || milter->state != MILTER8_STAT_MESSAGE)
+           if (MILTER8_MESSAGE_DONE(milter, msg_ctx))
                break;
            VSTRING_RESET(milter->body);
        }
@@ -2129,10 +2129,30 @@ static void milter8_eob(void *ptr)
        return;
     if (msg_verbose)
        msg_info("%s: eob milter %s", myname, milter->m.name);
+
+    /*
+     * Flush partial body chunk buffer. See also milter8_body().
+     * 
+     * XXX Sendmail 8 libmilter accepts SMFIC_EOB+data, and delivers it to the
+     * application as two events: SMFIC_BODY+data followed by SMFIC_EOB. This
+     * breaks with the PMilter 0.95 protocol re-implementation, which
+     * delivers the SMFIC_EOB event and ignores the data. To avoid such
+     * compatibility problems we separate the events in the client. With
+     * this, we also prepare for a future where different event types can
+     * have different macro lists.
+     */
+    if (LEN(milter->body) > 0) {
+       msg_ctx->resp =
+           milter8_event(milter, SMFIC_BODY, SMFIP_NOBODY,
+                         DONT_SKIP_REPLY, msg_ctx->macros,
+                         MILTER8_DATA_BUFFER, milter->body,
+                         MILTER8_DATA_END);
+       if (MILTER8_MESSAGE_DONE(milter, msg_ctx))
+           return;
+    }
     msg_ctx->resp =
        milter8_event(msg_ctx->milter, SMFIC_BODYEOB, 0,
                      DONT_SKIP_REPLY, msg_ctx->macros,
-                     MILTER8_DATA_BUFFER, milter->body,
                      MILTER8_DATA_END);
 }
 
index c8fa2d8709947cf0d411ad800c760bc3eeb721f9..c26f4a3fcc090d89c269d8a352fbdf37ffd3343a 100644 (file)
 /*     Warning: flushing undeliverable mail frequently will result in
 /*     poor delivery performance of all other mail.
 /* .IP "\fB-i \fIqueue_id\fR"
-/*     Schedule immediate delivery of mail with the specified queue ID.
-/*     This feature uses the \fBflush\fR(8) server, and is available
-/*     with Postfix 2.4 and later.
+/*     Schedule immediate delivery of deferred mail with the
+/*     specified queue ID.
+/*
+/*     This option implements the traditional \fBsendmail -qI\fR
+/*     command, by contacting the \fBflush\fR(8) server.
+/*
+/*     This feature is available with Postfix version 2.4 and later.
 /* .IP \fB-p\fR
 /*     Produce a traditional sendmail-style queue listing.
 /*     This option implements the traditional \fBmailq\fR command,
 
  /*
   * Modes of operation.
+  * 
+  * XXX To support flush by recipient domain, or for destinations that have no
+  * mapping to logfile, the server has to defend against resource exhaustion
+  * attacks. A malicious user could fork off a postqueue client that starts
+  * an expensive requests and then kills the client immediately; this way she
+  * could create a high Postfix load on the system without ever exceeding her
+  * own per-user process limit. To prevent this, either the server needs to
+  * establish frequent proof of client liveliness with challenge/response, or
+  * the client needs to restrict expensive requests to privileged users only.
+  * 
+  * We don't have this problem with queue listings. The showq server detects
+  * an EPIPE error after reporting a few queue entries.
   */
 #define PQ_MODE_DEFAULT                0       /* noop */
 #define PQ_MODE_MAILQ_LIST     1       /* list mail queue */