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.
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.
===================================================
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
===================================================
<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>
<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>
<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
<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
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-
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,
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.
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.
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
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
<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>
<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
<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
<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>
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:
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 \
*
* 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)
}
/* 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) {
}
/* 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])
/* If we have a saved PTR record, it points to start of header. */
break;
}
+ ptr_offset = 0;
last_type = rec_type;
}
--- /dev/null
+open test-queue-file6.tmp
+
+ins_header 1 X-Virus-Scanned hya
+
+close
--- /dev/null
+open test-queue-file6.tmp
+
+ins_header 1 X-Virus-Scanned hya
+ins_header 2 Domainkey-Signature hya
+
+close
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+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
--- /dev/null
+*** 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 ***
--- /dev/null
+*** 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 ***
--- /dev/null
+*** 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 ***
--- /dev/null
+*** 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 ***
--- /dev/null
+*** 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 ***
--- /dev/null
+*** 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 ***
* 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
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);
}
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);
}
/* 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 */