]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.4-20070121
authorWietse Venema <wietse@porcupine.org>
Sun, 21 Jan 2007 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:32:50 +0000 (06:32 +0000)
47 files changed:
postfix/.indent.pro
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/src/cleanup/Makefile.in
postfix/src/cleanup/bug1.file
postfix/src/cleanup/bug1.ref
postfix/src/cleanup/bug1.text.ref
postfix/src/cleanup/bug2.file
postfix/src/cleanup/bug2.ref
postfix/src/cleanup/bug2.text.ref
postfix/src/cleanup/cleanup_milter.c
postfix/src/cleanup/cleanup_milter.in1
postfix/src/cleanup/cleanup_milter.in12 [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.ref1
postfix/src/cleanup/cleanup_milter.ref10a
postfix/src/cleanup/cleanup_milter.ref10b
postfix/src/cleanup/cleanup_milter.ref10c
postfix/src/cleanup/cleanup_milter.ref10d
postfix/src/cleanup/cleanup_milter.ref10e
postfix/src/cleanup/cleanup_milter.ref12 [new file with mode: 0644]
postfix/src/cleanup/cleanup_milter.ref2
postfix/src/cleanup/cleanup_milter.ref3
postfix/src/cleanup/cleanup_milter.ref4
postfix/src/cleanup/cleanup_milter.ref5
postfix/src/cleanup/cleanup_milter.ref6a
postfix/src/cleanup/cleanup_milter.ref6b
postfix/src/cleanup/cleanup_milter.ref6c
postfix/src/cleanup/cleanup_milter.ref7
postfix/src/cleanup/cleanup_milter.ref8
postfix/src/cleanup/cleanup_milter.ref9
postfix/src/cleanup/cleanup_out.c
postfix/src/cleanup/test-queue-file [changed mode: 0755->0644]
postfix/src/cleanup/test-queue-file10
postfix/src/cleanup/test-queue-file12 [new file with mode: 0644]
postfix/src/cleanup/test-queue-file2
postfix/src/cleanup/test-queue-file3
postfix/src/cleanup/test-queue-file4 [changed mode: 0755->0644]
postfix/src/cleanup/test-queue-file5
postfix/src/cleanup/test-queue-file6
postfix/src/cleanup/test-queue-file7
postfix/src/cleanup/test-queue-file8
postfix/src/cleanup/test-queue-file9
postfix/src/global/mail_version.h
postfix/src/global/rec_type.c
postfix/src/global/rec_type.h
postfix/src/global/record.c
postfix/src/global/record.h

index e759f3ea7a0b26d5499638bffc5b197b7a24e3af..d5c9972c1ddfbaf32fbd0ef5a463509bcf267381 100644 (file)
 -TXSASL_SERVER
 -TXSASL_SERVER_IMPL
 -TXSASL_SERVER_IMPL_INFO
+-Toff_t
 -Tregex_t
 -Tregmatch_t
 -Tsasl_conn_t
index 983a6a360f3f6fc0c155a2bad17fd943319e509e..8881cfe7be03b6302e29aa4325df6b397bf8364c 100644 (file)
@@ -13130,8 +13130,29 @@ Apologies for any names omitted.
        for !/file/name, and updated the documentation. File:
        util/match_list.c.
 
+20070119-21
+
+       Cleanup: pad short message headers with a filler record,
+       so that the result is never shorter than a pointer record.
+       This immensely simplified the support for Milter header
+       modification requests: three complex loops could be replaced
+       by one simpler loop.  The DTXT record type was re-purposed
+       from "deleted header text" to "short header padding", keeping
+       the change backwards compatible.  Files: cleanup/cleanup_out.c,
+       cleanup/cleanup_milter.c, global/record.c.
+
+       Cleanup: the Milter "add recipient" action always added the
+       recipient to the initial envelope segment, causing added
+       recipients to be separate from "sendmail -t" recipients.
+       This violated design, without impact on delivery (always_bcc
+       recipient are always at the end of the queue file even when
+       all other recipients are in the initial segment).  File:
+       global/rec_types.h.
+
 Wish list:
 
+       Update message content length when adding/removing headers.
+
        Need scache size limit.
 
        Don't transform bare username into user@localdomain.localdomain
index 0173df6bee14f8457e1908e4862a64f5b17a3abd..a3906991d56e883fe22169b6b18e05b0af488f3e 100644 (file)
@@ -17,6 +17,15 @@ Incompatibility with Postfix 2.2 and earlier
 If you upgrade from Postfix 2.2 or earlier, read RELEASE_NOTES-2.3
 before proceeding.
 
+Major changes with Postfix snapshot 20070121
+============================================
+
+The support for Milter header modification requests was revised.
+With minimal change in the on-disk representation, the code was
+greatly simplified, and regression tests were updated to ensure
+that old errors were not re-introduced.  The queue file format is
+entirely backwards compatible with Postfix 2.3.
+
 Incompatible changes with Postfix snapshot 20070116
 ===================================================
 
@@ -28,9 +37,9 @@ as it was before the body was replaced.
 Major changes with Postfix snapshot 20070116
 ============================================
 
-Support for Milter applications that replace the message body.
-Postfix now implements all the header/body modification requests
-that are available with Sendmail 8.13.
+Support for Milter requests to replace the message body.  Postfix
+now implements all the header/body modification requests that are
+available with Sendmail 8.13.
 
 Incompatible changes with Postfix snapshot 20061217
 ===================================================
index cbf1e44fe1dd5d12ee76e6f064a03fc01c759e3e..87f7aa12c3dbfa28385a9814f2380deeaab8c623 100644 (file)
@@ -74,7 +74,7 @@ milter_tests: cleanup_milter_test bug_tests \
        cleanup_milter_test5 cleanup_milter_test6 cleanup_milter_test7 \
        cleanup_milter_test8 cleanup_milter_test9 cleanup_milter_test10a \
        cleanup_milter_test10b cleanup_milter_test10c cleanup_milter_test10d \
-       cleanup_milter_test10e cleanup_milter_test11
+       cleanup_milter_test10e cleanup_milter_test11 cleanup_milter_test12
 
 root_tests:
 
@@ -287,6 +287,15 @@ cleanup_milter_test11: cleanup_milter test-queue-file11 cleanup_milter.in11 \
        diff cleanup_milter.ref11 cleanup_milter.tmp
        rm -f test-queue-file11.tmp cleanup_milter.tmp
 
+cleanup_milter_test12: cleanup_milter test-queue-file12 cleanup_milter.in12 \
+       cleanup_milter.ref12 ../postcat/postcat
+       cp test-queue-file12 test-queue-file12.tmp
+       chmod u+w test-queue-file12.tmp
+       ./cleanup_milter <cleanup_milter.in12
+       ../postcat/postcat -ov test-queue-file12.tmp 2>/dev/null >cleanup_milter.tmp
+       diff cleanup_milter.ref12 cleanup_milter.tmp
+       rm -f test-queue-file12.tmp 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 da59ed9638bed2d8aac84158ed6057be2b6c8cb9..8412ae352109edfd97e0d6c5544265a979a14d2c 100644 (file)
Binary files a/postfix/src/cleanup/bug1.file and b/postfix/src/cleanup/bug1.file differ
index 66fe730e2a465f806bdb01e591acd1fe54156bc0..362d2cb1ac7bada95d229b5c0047985beaa0e05c 100644 (file)
@@ -1,49 +1,56 @@
 *** ENVELOPE RECORDS bug1.file.tmp ***
-        0 message_size:             428             654               3               0
-       65 message_arrival_time: Sat May 13 21:04:18 2006
-       84 create_time: Sat May 13 21:04:27 2006
-      108 named_attribute: rewrite_context=local
-      131 sender: wietse@porcupine.org
-      153 named_attribute: client_name=tail.porcupine.org
-      185 named_attribute: client_address=IPv6:2001:240:587:0:2d0:b7ff:febe:ca9f
-      240 named_attribute: message_origin=tail.porcupine.org[2001:240:587:0:2d0:b7ff:febe:ca9f]
-      310 named_attribute: helo_name=tail.porcupine.org
-      340 named_attribute: protocol_name=SMTP
-      360 named_attribute: dsn_orig_rcpt=rfc822;wietse@porcupine.org
-      403 original_recipient: wietse@porcupine.org
-      425 recipient: wietse@porcupine.org
-      447 named_attribute: dsn_orig_rcpt=rfc822;alias@tail.porcupine.org
-      494 original_recipient: alias@tail.porcupine.org
-      520 recipient: wietse@porcupine.org
-      542 named_attribute: dsn_orig_rcpt=rfc822;alias@tail.porcupine.org
-      589 original_recipient: alias@tail.porcupine.org
-      615 recipient: root@porcupine.org
-      635 pointer_record:               0
-      652 *** MESSAGE CONTENTS bug1.file.tmp ***
-      654 regular_text: Received: from tail.porcupine.org (tail.porcupine.org [IPv6:2001:240:587:0:2d0:b7ff:febe:ca9f])
-      751 regular_text:        by tail.porcupine.org (Postfix) with SMTP id E0F703D1E36;
-      811 regular_text:        Sat, 13 May 2006 21:04:18 -0400 (EDT)
-      851 regular_text: X: 1
-      857 regular_text:  2
-      861 regular_text:  3
-      865 regular_text:  4
-      869 regular_text:  5
-      873 regular_text:  6
-      877 regular_text:  7
-      881 regular_text: Y: 1234567
-      893 regular_text: Message-Id: <20060514010427.E0F703D1E36@tail.porcupine.org>
-      954 regular_text: Date: Sat, 13 May 2006 21:04:18 -0400 (EDT)
-      999 regular_text: From: wietse@porcupine.org
-     1027 regular_text: To: undisclosed-recipients:;
-     1057 pointer_record:            1103
-     1103 pointer_record:            1147
-     1147 pointer_record:            1191
-     1191 pointer_record:            1235
-     1235 regular_text: Subject: long header text
-     1262 pointer_record:            1130
-     1130 pointer_record:            1074
-     1074 regular_text: 
-     1076 regular_text: text
-     1082 *** HEADER EXTRACTED bug1.file.tmp ***
-     1084 pointer_record:               0
-     1101 *** MESSAGE FILE END bug1.file.tmp ***
+        0 message_size:             441             813               3               0             441
+       81 message_arrival_time: Sat Jan 20 19:52:41 2007
+      100 create_time: Sat Jan 20 19:52:47 2007
+      124 named_attribute: rewrite_context=local
+      147 sender: wietse@porcupine.org
+      169 named_attribute: log_client_name=hades.porcupine.org
+      206 named_attribute: log_client_address=168.100.189.10
+      241 named_attribute: log_message_origin=hades.porcupine.org[168.100.189.10]
+      297 named_attribute: log_helo_name=hades.porcupine.org
+      332 named_attribute: log_protocol_name=SMTP
+      356 named_attribute: client_name=hades.porcupine.org
+      389 named_attribute: reverse_client_name=hades.porcupine.org
+      430 named_attribute: client_address=168.100.189.10
+      461 named_attribute: helo_name=hades.porcupine.org
+      492 named_attribute: client_address_type=2
+      515 named_attribute: dsn_orig_rcpt=rfc822;wietse@porcupine.org
+      558 original_recipient: wietse@porcupine.org
+      580 recipient: wietse@porcupine.org
+      602 named_attribute: dsn_orig_rcpt=rfc822;alias@hades.porcupine.org
+      650 original_recipient: alias@hades.porcupine.org
+      677 recipient: wietse@porcupine.org
+      699 named_attribute: dsn_orig_rcpt=rfc822;alias@hades.porcupine.org
+      747 original_recipient: alias@hades.porcupine.org
+      774 recipient: root@porcupine.org
+      794 pointer_record:               0
+      811 *** MESSAGE CONTENTS bug1.file.tmp ***
+      813 regular_text: Received: from hades.porcupine.org (hades.porcupine.org [168.100.189.10])
+      888 regular_text:        by hades.porcupine.org (Postfix) with SMTP id 38132290405;
+      949 regular_text:        Sat, 20 Jan 2007 19:52:41 -0500 (EST)
+      989 regular_text: X: 1
+      995 padding:         0
+     1006 regular_text:  2
+     1010 regular_text:  3
+     1014 regular_text:  4
+     1018 regular_text:  5
+     1022 regular_text:  6
+     1026 regular_text:  7
+     1030 regular_text: Y: 1234567
+     1042 padding:   0
+     1047 regular_text: Message-Id: <20070121005247.38132290405@hades.porcupine.org>
+     1109 regular_text: Date: Sat, 20 Jan 2007 19:52:41 -0500 (EST)
+     1154 regular_text: From: wietse@porcupine.org
+     1182 regular_text: To: undisclosed-recipients:;
+     1212 pointer_record:            1258
+     1258 pointer_record:            1302
+     1302 pointer_record:            1346
+     1346 pointer_record:            1390
+     1390 regular_text: Subject: long header text
+     1417 pointer_record:            1285
+     1285 pointer_record:            1229
+     1229 regular_text: 
+     1231 regular_text: text
+     1237 pointer_record:               0
+     1254 *** HEADER EXTRACTED bug1.file.tmp ***
+     1256 *** MESSAGE FILE END bug1.file.tmp ***
index 5b64c3899d4d68baad159c738930a0657fdd7ac1..72fe3dfd21afeab906463c6f65f21698048b6d17 100644 (file)
@@ -1,27 +1,32 @@
 *** ENVELOPE RECORDS bug1.file.tmp ***
-message_size:             428             654               3               0
-message_arrival_time: Sat May 13 21:04:18 2006
-create_time: Sat May 13 21:04:27 2006
+message_size:             441             813               3               0             441
+message_arrival_time: Sat Jan 20 19:52:41 2007
+create_time: Sat Jan 20 19:52:47 2007
 named_attribute: rewrite_context=local
 sender: wietse@porcupine.org
-named_attribute: client_name=tail.porcupine.org
-named_attribute: client_address=IPv6:2001:240:587:0:2d0:b7ff:febe:ca9f
-named_attribute: message_origin=tail.porcupine.org[2001:240:587:0:2d0:b7ff:febe:ca9f]
-named_attribute: helo_name=tail.porcupine.org
-named_attribute: protocol_name=SMTP
+named_attribute: log_client_name=hades.porcupine.org
+named_attribute: log_client_address=168.100.189.10
+named_attribute: log_message_origin=hades.porcupine.org[168.100.189.10]
+named_attribute: log_helo_name=hades.porcupine.org
+named_attribute: log_protocol_name=SMTP
+named_attribute: client_name=hades.porcupine.org
+named_attribute: reverse_client_name=hades.porcupine.org
+named_attribute: client_address=168.100.189.10
+named_attribute: helo_name=hades.porcupine.org
+named_attribute: client_address_type=2
 named_attribute: dsn_orig_rcpt=rfc822;wietse@porcupine.org
 original_recipient: wietse@porcupine.org
 recipient: wietse@porcupine.org
-named_attribute: dsn_orig_rcpt=rfc822;alias@tail.porcupine.org
-original_recipient: alias@tail.porcupine.org
+named_attribute: dsn_orig_rcpt=rfc822;alias@hades.porcupine.org
+original_recipient: alias@hades.porcupine.org
 recipient: wietse@porcupine.org
-named_attribute: dsn_orig_rcpt=rfc822;alias@tail.porcupine.org
-original_recipient: alias@tail.porcupine.org
+named_attribute: dsn_orig_rcpt=rfc822;alias@hades.porcupine.org
+original_recipient: alias@hades.porcupine.org
 recipient: root@porcupine.org
 *** MESSAGE CONTENTS bug1.file.tmp ***
-Received: from tail.porcupine.org (tail.porcupine.org [IPv6:2001:240:587:0:2d0:b7ff:febe:ca9f])
-       by tail.porcupine.org (Postfix) with SMTP id E0F703D1E36;
-       Sat, 13 May 2006 21:04:18 -0400 (EDT)
+Received: from hades.porcupine.org (hades.porcupine.org [168.100.189.10])
+       by hades.porcupine.org (Postfix) with SMTP id 38132290405;
+       Sat, 20 Jan 2007 19:52:41 -0500 (EST)
 X: 1
  2
  3
@@ -30,8 +35,8 @@ X: 1
  6
  7
 Y: 1234567
-Message-Id: <20060514010427.E0F703D1E36@tail.porcupine.org>
-Date: Sat, 13 May 2006 21:04:18 -0400 (EDT)
+Message-Id: <20070121005247.38132290405@hades.porcupine.org>
+Date: Sat, 20 Jan 2007 19:52:41 -0500 (EST)
 From: wietse@porcupine.org
 To: undisclosed-recipients:;
 Subject: long header text
index f5a7b019439f505e567c3413c43de75ec4e6815d..27a9ec74649695c15e99e68745ab208673291ea4 100644 (file)
Binary files a/postfix/src/cleanup/bug2.file and b/postfix/src/cleanup/bug2.file differ
index 89945f07bf9861e813c781f2ded0364da8e03212..6a0aab47885a63a36f30561e3243844e7b8df532 100644 (file)
@@ -1,27 +1,30 @@
 *** ENVELOPE RECORDS bug2.file.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 bug2.file.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 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 pointer_record:             552
-      552 regular_text: Subject: hey!
-      567 pointer_record:             584
-      584 regular_text: foo: foobar
-      597 pointer_record:             485
-      485 regular_text: 
-      487 regular_text: text
-      493 pointer_record:               0
-      510 *** HEADER EXTRACTED bug2.file.tmp ***
-      512 original_recipient: you@porcupine.org
-      531 recipient: you@porcupine.org
-      550 *** MESSAGE FILE END bug2.file.tmp ***
+        0 message_size:             332             199               1               0             332
+       81 message_arrival_time: Sat Jan 20 20:53:54 2007
+      100 create_time: Sat Jan 20 20:53:59 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 pointer_record:               0
+      197 *** MESSAGE CONTENTS bug2.file.tmp ***
+      199 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      261 regular_text:        id B85F1290407; Sat, 20 Jan 2007 20:53:59 -0500 (EST)
+      317 regular_text: From: me@porcupine.org
+      341 regular_text: To: you@porcupine.org
+      364 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      426 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      471 pointer_record:             573
+      573 regular_text: Subject: hey!
+      588 padding: 0
+      591 pointer_record:             489
+      489 pointer_record:             608
+      608 regular_text: foo: foobar
+      621 padding:  0
+      625 pointer_record:             506
+      506 regular_text: 
+      508 regular_text: text
+      514 pointer_record:               0
+      531 *** HEADER EXTRACTED bug2.file.tmp ***
+      533 original_recipient: you@porcupine.org
+      552 recipient: you@porcupine.org
+      571 *** MESSAGE FILE END bug2.file.tmp ***
index 1c7da0ddafa878932ab91234132a79511d734b56..fd5cfe16a99c6b299c738a60d5e3fbaca4d6076c 100644 (file)
@@ -1,13 +1,13 @@
 *** ENVELOPE RECORDS bug2.file.tmp ***
-message_size:             329             181               1               0
-message_arrival_time: Tue Jul 25 15:37:06 2006
-create_time: Tue Jul 25 15:37:06 2006
+message_size:             332             199               1               0             332
+message_arrival_time: Sat Jan 20 20:53:54 2007
+create_time: Sat Jan 20 20:53:59 2007
 named_attribute: rewrite_context=local
 sender_fullname: Wietse Venema
 sender: me@porcupine.org
 *** MESSAGE CONTENTS bug2.file.tmp ***
-Received: by bristle.watson.ibm.com (Postfix, from userid 0)
-       id 034B229013F; Tue, 25 Jul 2006 15:37:06 -0400 (EDT)
+Received: by hades.porcupine.org (Postfix, from userid 1001)
+       id B85F1290407; Sat, 20 Jan 2007 20:53:59 -0500 (EST)
 From: me@porcupine.org
 To: you@porcupine.org
 Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
index d3a9cb07a10a1e7f1d2b98304908ccc2be26da4d..7117808d00db7c813a7c8bc0d8dafa341b44a92c 100644 (file)
 #include <cleanup.h>
 
  /*
-  * How Postfix edits queue file information:
+  * How Postfix 2.4 edits queue file information:
   * 
   * Mail filter applications (Milters) can send modification requests after
   * receiving the end of the message body.  Postfix implements these
   * modifications in the cleanup server, so that it can edit the queue file
   * in place. This avoids the temporary files that would be needed when
-  * modifications were implemented in the SMTP server (where possible,
-  * Postfix does not store the whole message in main memory). Once a Milter
-  * is done editing, the queue file can be used as input for the next Milter,
-  * and so on. Finally, the cleanup server changes file permissions, calls
-  * fsync(), and waits for successful completion.
+  * modifications were implemented in the SMTP server (Postfix normally does
+  * not store the whole message in main memory). Once a Milter is done
+  * editing, the queue file can be used as input for the next Milter, and so
+  * on. Finally, the cleanup server changes file permissions, calls fsync(),
+  * and waits for successful completion.
   * 
   * To implement in-place queue file edits, we need to introduce surprisingly
   * little change to the existing Postfix queue file structure.  All we need
   * is a way to mark a record as deleted, and to jump from one place in the
   * queue file to another. We could implement deleted records with jumps, but
-  * marking is simpler, and it preserves information that may be useful for
-  * archival purposes.
+  * marking is sometimes simpler.
   * 
   * Postfix does not store queue files as plain text files. Instead all
-  * information is stored in records with an explicit type and length for
+  * information is stored in records with an explicit type and length, for
   * sender, recipient, arrival time, and so on.  Even the content that makes
   * up the message header and body is stored as records with explicit types
   * and lengths.  This organization makes it very easy to mark a record as
   * deleted, and to introduce the pointer records that we will use to jump
   * from one place in a queue file to another place.
   * 
-  * - Deleting a recipient or message header is easiest - simply modify the
-  * record type into one that is skipped by the software that delivers mail.
-  * We won't try to reuse the deleted recipient or message header for other
-  * purposes. When deleting a recipient, we must delete all recipient records
-  * that result from virtual alias expansion of the original recipient
-  * address. When deleting a long message header, multiple queue file records
-  * may need to be deleted. We use REC_TYPE_DRCP for deleted recipients, and
-  * REC_TYPE_DTXT for deleted text.
+  * - Deleting a recipient is easiest - simply modify the record type into one
+  * that is skipped by the software that delivers mail. We won't try to reuse
+  * the deleted recipient for other purposes. When deleting a recipient, we
+  * may need to delete multiple recipient records that result from virtual
+  * alias expansion of the original recipient address.
   * 
   * - Replacing a header record involves pointer records. A record is replaced
   * by overwriting it with a forward pointer to space after the end of the
   * queue file, putting the new record there, followed by a reverse pointer
-  * to the record that follows the replaced information. If the replaced
-  * record is shorter than a pointer record, we relocate the records that
-  * follow it to the new area as well, until we have enough space for the
-  * forward pointer record. See below for a discussion on what it takes to
-  * make this safe. Sendmail mail filters currently do not replace individual
-  * body records, but we could add support for this if need be.
+  * to the record that follows the replaced header. To simplify
+  * implementation we follow a short header record with a filler record so
+  * that we can always overwrite a header record with a pointer.
+  * 
+  * N.B. This is a major difference with Postfix version 2.3, which needed
+  * complex code to save records that follow a short header, before it could
+  * overwrite a short header record. This code contained two of the three
+  * post-release bugs that were found with Postfix header editing.
   * 
   * - Inserting a header record is like replacing one, except that we also
   * relocate the record that is being overwritten by the forward pointer.
   * 
+  * - Deleting a message header is simplest when we replace it by a "skip"
+  * pointer to the information that follows the header. With a multi-line
+  * header we need to update only the first line.
+  * 
   * - Appending a recipient or header record involves pointer records as well.
-  * To make this convenient, the queue file already contains dummy pointer
-  * record at the place where we want to append recipient or header content.
-  * To append, change the dummy pointer into a forward pointer to space after
-  * the end of a message, put the new recipient or header record there,
-  * followed by a reverse pointer to the record that follows the forward
-  * pointer.
+  * To make this convenient, the queue file already contains dummy pointer
+  * records at the locations where we want to append recipient or header
+  * content. To append, change the dummy pointer into a forward pointer to
+  * space after the end of a message, put the new recipient or header record
+  * there, followed by a reverse pointer to the record that follows the
+  * forward pointer.
   * 
-  * - To append another record of the same type, replace the reverse pointer by
-  * a forward pointer to space after the end of a message, put the new record
-  * there, followed by the value of the reverse pointer that we replace.
-  * Thus, there is no one-to-one correspondence between forward and backward
-  * pointers. Instead, there can be multiple forward pointers for one reverse
-  * pointer.
+  * - To append another header or recipient record, replace the reverse pointer
+  * by a forward pointer to space after the end of a message, put the new
+  * record there, followed by the value of the reverse pointer that we
+  * replace. Thus, there is no one-to-one correspondence between forward and
+  * backward pointers. Instead, there can be multiple forward pointers for
+  * one reverse pointer.
+  * 
+  * - When a mail filter wants to replace an entire body, we overwrite existing
+  * body records until we run out of space, and then write a pointer to space
+  * after the end of the queue file, followed by more body content. There may
+  * be multiple regions with body content; regions are connected by forward
+  * pointers, and the last region ends with a pointer to the marker that ends
+  * the message content segment. Body regions can be large and therefore they
+  * are reused to avoid wasting space. Sendmail mail filters currently do not
+  * replace individual body records, and that is a good thing.
   * 
   * Making queue file modifications safe:
   * 
   * record, without having to relocate a marker record, the cleanup server
   * places a dummy pointer record at the end of the recipients and at the end
   * of the message header. To support message body modifications, a dummy
-  * pointer record will also be needed at the end of the message content.
-  * 
-  * When a mail filter wants to replace an entire body, we have the option to
-  * overwrite existing body records until we run out of space, and then
-  * writing a pointer to space at the end of the queue file, followed by the
-  * remainder of the body, and a pointer to the marker that ends the message
-  * content segment.
+  * pointer record is also placed at the end of the message content.
   * 
-  * With all these changes, REC_TYPE_END is no longer guaranteed to be the last
-  * record in a queue file. If an application were to read beyond the
-  * REC_TYPE_END marker, it would go into an infinite loop, because records
-  * after REC_TYPE_END alternate with reverse pointers to the middle of the
-  * queue file. For robustness, the record reading routine skips forward to
-  * end-of-file position after reading the REC_TYPE_END marker.
+  * With all these changes in queue file organization, REC_TYPE_END is no longer
+  * guaranteed to be the last record in a queue file. If an application were
+  * to read beyond the REC_TYPE_END marker, it would go into an infinite
+  * loop, because records after REC_TYPE_END alternate with reverse pointers
+  * to the middle of the queue file. For robustness, the record reading
+  * routine skips forward to the end-of-file position after reading the
+  * REC_TYPE_END marker.
   */
 
 /*#define msg_verbose  2*/
@@ -281,7 +287,7 @@ static const char *cleanup_add_header(void *context, char *name, char *value)
     }
     buf = vstring_alloc(100);
     vstring_sprintf(buf, "%s: %s", name, value);
-    cleanup_out_header(state, buf);
+    cleanup_out_header(state, buf);            /* Includes padding */
     vstring_free(buf);
     if ((reverse_ptr_offset = vstream_ftell(state->dst)) < 0) {
        msg_warn("%s: vstream_ftell file %s: %m", myname, cleanup_path);
@@ -293,6 +299,12 @@ static const char *cleanup_add_header(void *context, char *name, char *value)
     /*
      * Pointer flipping: update the old "header append" pointer record value
      * with the location of the new header record.
+     * 
+     * XXX To avoid unnecessary seek operations when the new header immediately
+     * follows the old append header pointer, write a null pointer or make
+     * the record reading loop smarter. Making vstream_fseek() smarter does
+     * not help, because it doesn't know if we're going to read or write
+     * after a write+seek sequence.
      */
     if (vstream_fseek(state->dst, state->append_hdr_pt_offset, SEEK_SET) < 0) {
        msg_warn("%s: seek file %s: %m", myname, cleanup_path);
@@ -316,15 +328,16 @@ static const char *cleanup_add_header(void *context, char *name, char *value)
     return (CLEANUP_OUT_OK(state) ? 0 : cleanup_milter_error(state, 0));
 }
 
-/* cleanup_find_header - find specific header instance */
+/* cleanup_find_header_start - find specific header instance */
 
-static off_t cleanup_find_header(CLEANUP_STATE *state, ssize_t index,
-                                    const char *header_label, VSTRING *buf,
-                                        int *prec_type,
-                                        int allow_ptr_backup,
-                                        int skip_headers)
+static off_t cleanup_find_header_start(CLEANUP_STATE *state, ssize_t index,
+                                              const char *header_label,
+                                              VSTRING *buf,
+                                              int *prec_type,
+                                              int allow_ptr_backup,
+                                              int skip_headers)
 {
-    const char *myname = "cleanup_find_header";
+    const char *myname = "cleanup_find_header_start";
     off_t   curr_offset;               /* offset after found record */
     off_t   ptr_offset;                        /* pointer to found record */
     VSTRING *ptr_buf = 0;
@@ -356,8 +369,8 @@ static off_t cleanup_find_header(CLEANUP_STATE *state, ssize_t index,
      * When the specified header is found, its first record is stored in the
      * caller-provided read buffer, and the result value is the queue file
      * offset of that record. The file read position is left at the start of
-     * the next queue file record, which can be the remainder of a
-     * multi-record header.
+     * the next (non-filler) queue file record, which can be the remainder of
+     * multi-record header.
      * 
      * When a header is found and allow_ptr_backup is non-zero, then the result
      * is either the first record of that header, or it is the pointer record
@@ -366,18 +379,16 @@ static off_t cleanup_find_header(CLEANUP_STATE *state, ssize_t index,
      * to do some optimizations when inserting text multiple times at the
      * same place.
      * 
-     * XXX We don't use the MIME processor here. It not only buffers up the
+     * XXX We can't use the MIME processor here. It not only buffers up the
      * input, it also reads the record that follows a complete header before
      * it invokes the header call-back action. This complicates the way that
      * we discover header offsets and boundaries. Worse is that the MIME
      * processor is unaware that multi-record message headers can have PTR
-     * records in the middle. This means that we can't correctly mark
-     * multi-record text as deleted. We could avoid the latter by never
-     * breaking up multi-record headers.
+     * records in the middle.
      * 
      * XXX The draw-back of not using the MIME processor is that we have to
-     * duplicate some of its logic here and in the routines that delete or
-     * modify header records. To minimize the duplication we define an ugly
+     * duplicate some of its logic here and in the routine that finds the end
+     * of the header record. To minimize the duplication we define an ugly
      * macro that is used in all code that scans for header boundaries.
      * 
      * XXX Sendmail compatibility (based on Sendmail 8.13.6 measurements).
@@ -429,6 +440,7 @@ static off_t cleanup_find_header(CLEANUP_STATE *state, ssize_t index,
     if (rec_type != REC_TYPE_NORM && rec_type != REC_TYPE_CONT \
        && rec_type != REC_TYPE_PTR) \
        break;
+    /* End of hairy macros. */
 
     if (vstream_fseek(state->dst, state->data_offset, SEEK_SET) < 0) {
        msg_warn("%s: seek file %s: %m", myname, cleanup_path);
@@ -441,6 +453,9 @@ static off_t cleanup_find_header(CLEANUP_STATE *state, ssize_t index,
            cleanup_milter_set_error(state, errno);
            CLEANUP_FIND_HEADER_RETURN(CLEANUP_FIND_HEADER_IOERROR);
        }
+       /* Don't follow the "append header" pointer. */
+       if (curr_offset == state->append_hdr_pt_offset)
+           break;
        /* Caution: this macro terminates the loop at end-of-message. */
        /* Don't do complex processing while breaking out of this loop. */
        GET_NEXT_TEXT_OR_PTR_RECORD(rec_type, state, buf, curr_offset,
@@ -490,14 +505,34 @@ static off_t cleanup_find_header(CLEANUP_STATE *state, ssize_t index,
      */
     if (index > 0) {
        curr_offset = CLEANUP_FIND_HEADER_NOTFOUND;
-    }
+    } else {
 
-    /*
-     * Optionally return the saved PTR record instead of the start of the
-     * message header. In that case the file read position is undefined
-     * (actually it is after the first text record that follows this header).
-     */
-    else {
+       /*
+        * Skip over short-header padding, so that the file read pointer is
+        * always positioned at the first non-padding record after the header
+        * record. Insist on padding after short a header record, so that a
+        * short header record can safely be overwritten by a pointer record.
+        */
+       if (LEN(buf) < REC_TYPE_PTR_PAYL_SIZE) {
+           VSTRING *rbuf = (ptr_offset ? buf :
+                            (ptr_buf ? ptr_buf :
+                             (ptr_buf = vstring_alloc(100))));
+           int     rval;
+
+           if ((rval = rec_get_raw(state->dst, rbuf, 0, REC_FLAG_NONE)) < 0) {
+               cleanup_milter_set_error(state, errno);
+               CLEANUP_FIND_HEADER_RETURN(CLEANUP_FIND_HEADER_IOERROR);
+           }
+           if (rval != REC_TYPE_DTXT)
+               msg_panic("%s: short header without padding", myname);
+       }
+
+       /*
+        * Optionally return a pointer to the message header, instead of the
+        * start of the message header itself. In that case the file read
+        * position is undefined (actually it is at the first non-padding
+        * record that follows the message header record).
+        */
        if (ptr_offset != 0) {
            rec_type = REC_TYPE_PTR;
            curr_offset = ptr_offset;
@@ -505,7 +540,6 @@ static off_t cleanup_find_header(CLEANUP_STATE *state, ssize_t index,
        }
        *prec_type = rec_type;
     }
-
     if (msg_verbose)
        msg_info("%s: index %ld name %s type %d offset %ld",
                 myname, (long) index, header_label ?
@@ -514,22 +548,67 @@ static off_t cleanup_find_header(CLEANUP_STATE *state, ssize_t index,
     CLEANUP_FIND_HEADER_RETURN(curr_offset);
 }
 
+/* cleanup_find_header_end - find end of header */
+
+static off_t cleanup_find_header_end(CLEANUP_STATE *state,
+                                            VSTRING *rec_buf,
+                                            int last_type)
+{
+    const char *myname = "cleanup_find_header_end";
+    off_t   read_offset;
+    int     rec_type;
+
+    /*
+     * This routine is called immediately after cleanup_find_header_start().
+     * rec_buf is the cleanup_find_header_start() result record; last_type is
+     * the corresponding record type: REC_TYPE_PTR or REC_TYPE_NORM; the file
+     * read position is at the first non-padding record after the result
+     * header record.
+     */
+    for (;;) {
+       if ((read_offset = vstream_ftell(state->dst)) < 0) {
+           msg_warn("%s: read file %s: %m", myname, cleanup_path);
+           cleanup_milter_error(state, errno);
+           return (-1);
+       }
+       /* Don't follow the "append header" pointer. */
+       if (read_offset == state->append_hdr_pt_offset)
+           break;
+       /* Caution: this macro terminates the loop at end-of-message. */
+       /* Don't do complex processing while breaking out of this loop. */
+       GET_NEXT_TEXT_OR_PTR_RECORD(rec_type, state, rec_buf, read_offset,
+       /* Warning and errno->error mapping are done elsewhere. */
+                                   return (-1));
+       if (rec_type == REC_TYPE_PTR) {
+           if (rec_goto(state->dst, STR(rec_buf)) < 0) {
+               msg_warn("%s: read file %s: %m", myname, cleanup_path);
+               cleanup_milter_error(state, errno);
+               return (-1);
+           }
+           /* Don't update last_type; PTR may follow REC_TYPE_CONT. */
+           continue;
+       }
+       /* Start of header or message body. */
+       if (last_type != REC_TYPE_CONT && !IS_SPACE_TAB(STR(rec_buf)[0]))
+           break;
+       last_type = rec_type;
+    }
+    return (read_offset);
+}
+
 /* cleanup_patch_header - patch new header into an existing header */
 
 static const char *cleanup_patch_header(CLEANUP_STATE *state,
                                                const char *new_hdr_name,
                                                const char *new_hdr_value,
                                                off_t old_rec_offset,
-                                               int rec_type,
+                                               int old_rec_type,
                                                VSTRING *old_rec_buf,
-                                               ssize_t avail_space,
-                                               off_t read_offset)
+                                               off_t next_offset)
 {
     const char *myname = "cleanup_patch_header";
     VSTRING *buf = vstring_alloc(100);
     off_t   new_hdr_offset;
-    off_t   saved_read_offset;
-    off_t   write_offset;
 
 #define CLEANUP_PATCH_HEADER_RETURN(ret) do { \
        vstring_free(buf); \
@@ -541,34 +620,24 @@ static const char *cleanup_patch_header(CLEANUP_STATE *state,
                 myname, new_hdr_name, new_hdr_value, (long) old_rec_offset);
 
     /*
-     * Allocate space after the end of the queue file, and save the new
-     * header and existing record(s) until we have enough space to replace
-     * the saved record(s) by a forward pointer record. If the saved record
-     * was not a PTR record, follow the saved records by a reverse pointer
-     * record that points to the record after the original location of the
-     * last saved record. Note: while moving data, we may move the "header
-     * append" pointer record, so we have to update the in-memory offset for
-     * that record.
+     * Allocate space after the end of the queue file for the new header and
+     * optionally save an existing record to make room for a forward pointer
+     * record. If the saved record was not a PTR record, follow the saved
+     * record by a reverse pointer record that points to the record after the
+     * original location of the saved record.
      * 
      * We update the queue file in a safe manner: save the new header and the
      * existing records after the end of the queue file, write the reverse
      * pointer, and only then overwrite the saved records with the forward
      * pointer to the new header.
-     */
-
-    /*
-     * old_rec_offset, rec_type, and old_rec_buf specify the record that we
+     * 
+     * old_rec_offset, old_rec_type, and old_rec_buf specify the record that we
      * are about to overwrite with a pointer record. If the record needs to
      * be saved (i.e. old_rec_type > 0), the buffer contains the data content
      * of exactly one PTR or text record.
      * 
-     * When rec_type specifies a text record, avail_space specifies the amount
-     * of contiguous space for the forward pointer record before the records
-     * beginning at read_offset. It's the text record data size, or the
-     * amount of contiguous space at the start of a multi-record header.
-     * 
-     * When rec_type specifies a pointer record, the avail_space and read_offset
-     * arguments are ignored.
+     * next_offset specifies the record that follows the to-be-overwritten
+     * record. It is ignored when the to-be-saved record is a pointer record.
      */
 
     /*
@@ -580,80 +649,39 @@ static const char *cleanup_patch_header(CLEANUP_STATE *state,
        CLEANUP_PATCH_HEADER_RETURN(cleanup_milter_error(state, errno));
     }
     vstring_sprintf(buf, "%s: %s", new_hdr_name, new_hdr_value);
-    cleanup_out_header(state, buf);
+    cleanup_out_header(state, buf);            /* Includes padding */
     if (msg_verbose > 1)
        msg_info("%s: %ld: write %.*s", myname, (long) new_hdr_offset,
                 LEN(buf) > 30 ? 30 : (int) LEN(buf), STR(buf));
 
     /*
      * Optionally, save the existing text record or pointer record that will
-     * be overwritten with the forward pointer.
+     * be overwritten with the forward pointer. Pad a short saved record to
+     * ensure that it, too, can be overwritten by a pointer.
      */
-    if (rec_type > 0) {
-       CLEANUP_OUT_BUF(state, rec_type, old_rec_buf);
+    if (old_rec_type > 0) {
+       CLEANUP_OUT_BUF(state, old_rec_type, old_rec_buf);
+       if (LEN(old_rec_buf) < REC_TYPE_PTR_PAYL_SIZE)
+           rec_pad(state->dst, REC_TYPE_DTXT,
+                   REC_TYPE_PTR_PAYL_SIZE - LEN(old_rec_buf));
        if (msg_verbose > 1)
            msg_info("%s: write %.*s", myname, LEN(old_rec_buf) > 30 ?
                     30 : (int) LEN(old_rec_buf), STR(old_rec_buf));
     }
 
     /*
-     * Save additional existing records to make space to write the forward
-     * pointer. We go for simplicity instead of speed, because we rarely need
-     * to do this. Special case: don't create additional space after saving a
-     * pointer record. Requirement: the message headers (and body) always end
-     * in a pointer record.
-     */
-    while (rec_type != REC_TYPE_PTR && avail_space < REC_TYPE_PTR_PAYL_SIZE) {
-       /* Read existing text or pointer record. */
-       if (vstream_fseek(state->dst, read_offset, SEEK_SET) < 0) {
-           msg_warn("%s: seek file %s: %m", myname, cleanup_path);
-           CLEANUP_PATCH_HEADER_RETURN(cleanup_milter_error(state, errno));
-       }
-       if ((rec_type = rec_get_raw(state->dst, buf, 0, REC_FLAG_NONE)) < 0) {
-           msg_warn("%s: read file %s: %m", myname, cleanup_path);
-           CLEANUP_PATCH_HEADER_RETURN(cleanup_milter_error(state, errno));
-       }
-       if (msg_verbose > 1)
-           msg_info("%s: %ld: read %.*s", myname, (long) read_offset,
-                    LEN(buf) > 30 ? 30 : (int) LEN(buf), STR(buf));
-       if (rec_type != REC_TYPE_NORM && rec_type != REC_TYPE_CONT
-           && rec_type != REC_TYPE_PTR && rec_type != REC_TYPE_DTXT)
-           msg_panic("%s: non-text/ptr record type %d in header, file %s",
-                     myname, rec_type, cleanup_path);
-       saved_read_offset = read_offset;
-       if ((read_offset = vstream_ftell(state->dst)) < 0) {
-           msg_warn("%s: vstream_ftell file %s: %m", myname, cleanup_path);
-           CLEANUP_PATCH_HEADER_RETURN(cleanup_milter_error(state, errno));
-       }
-       avail_space += (read_offset - saved_read_offset);
-       /* Save the text or pointer record. */
-       if ((write_offset = vstream_fseek(state->dst, (off_t) 0, SEEK_END)) < 0) {
-           msg_warn("%s: seek file %s: %m", myname, cleanup_path);
-           CLEANUP_PATCH_HEADER_RETURN(cleanup_milter_error(state, errno));
-       }
-       /* The saved "append header" pointer record may still contain "0". */
-       if (saved_read_offset == state->append_hdr_pt_offset)
-           cleanup_out_format(state, REC_TYPE_PTR, REC_TYPE_PTR_FORMAT,
-                              (long) state->append_hdr_pt_target);
-       else
-           CLEANUP_OUT_BUF(state, rec_type, buf);
-       if (msg_verbose > 1)
-           msg_info("%s: %ld: write %.*s", myname, (long) write_offset,
-                    LEN(buf) > 30 ? 30 : (int) LEN(buf), STR(buf));
-       /* Update cached location of "append header" pointer record. */
-       if (saved_read_offset == state->append_hdr_pt_offset)
-           state->append_hdr_pt_offset = write_offset;
-    }
-
-    /*
-     * If the saved records didn't already end with an old PTR record, write
-     * the reverse pointer after the saved records.
+     * If the saved record wasn't a PTR record, write the reverse pointer
+     * after the saved records. A reverse pointer value of -1 means we were
+     * confused about what we were going to save.
      */
-    if (rec_type != REC_TYPE_PTR) {
+    if (old_rec_type != REC_TYPE_PTR) {
+       if (next_offset < 0)
+           msg_panic("%s: bad reverse pointer %ld",
+                     myname, (long) next_offset);
        cleanup_out_format(state, REC_TYPE_PTR, REC_TYPE_PTR_FORMAT,
-                          (long) read_offset);
+                          (long) next_offset);
        if (msg_verbose > 1)
-           msg_info("%s: write PTR %ld", myname, (long) read_offset);
+           msg_info("%s: write PTR %ld", myname, (long) next_offset);
     }
 
     /*
@@ -694,8 +722,7 @@ static const char *cleanup_ins_header(void *context, ssize_t index,
     VSTRING *old_rec_buf = vstring_alloc(100);
     off_t   old_rec_offset;
     int     old_rec_type;
-    off_t   read_offset;
-    ssize_t avail_space;
+    off_t   next_offset;
     const char *ret;
 
 #define CLEANUP_INS_HEADER_RETURN(ret) do { \
@@ -708,11 +735,7 @@ static const char *cleanup_ins_header(void *context, ssize_t index,
                 myname, (long) index, new_hdr_name, new_hdr_value);
 
     /*
-     * Look for a header at the specified position. If none exists, simply
-     * append the header to the linked list at the "header append" pointer
-     * record. Otherwise, save both the new and the existing header to new
-     * storage at the end of the queue file, and link the new storage with a
-     * forward and reverse pointer.
+     * Look for a header at the specified position.
      * 
      * The lookup result may be a pointer record. This allows us to make some
      * optimization when multiple insert operations happen in the same place.
@@ -726,32 +749,40 @@ static const char *cleanup_ins_header(void *context, ssize_t index,
 
     if (index < 1)
        index = 1;
-    old_rec_offset = cleanup_find_header(state, index, NO_HEADER_NAME,
-                                        old_rec_buf, &old_rec_type,
-                                        ALLOW_PTR_BACKUP,
-                                        DONT_SKIP_HEADERS);
+    old_rec_offset = cleanup_find_header_start(state, index, NO_HEADER_NAME,
+                                              old_rec_buf, &old_rec_type,
+                                              ALLOW_PTR_BACKUP,
+                                              DONT_SKIP_HEADERS);
     if (old_rec_offset == CLEANUP_FIND_HEADER_IOERROR)
        /* Warning and errno->error mapping are done elsewhere. */
        CLEANUP_INS_HEADER_RETURN(cleanup_milter_error(state, 0));
-    if (old_rec_offset < 0) {
+
+    /*
+     * If the header does not exist, simply append the header to the linked
+     * list at the "header append" pointer record.
+     */
+    if (old_rec_offset < 0)
        CLEANUP_INS_HEADER_RETURN(cleanup_add_header(context, new_hdr_name,
                                                     new_hdr_value));
+
+    /*
+     * If the header does exist, save both the new and the existing header to
+     * new storage at the end of the queue file, and link the new storage
+     * with a forward and reverse pointer (don't write a reverse pointer if
+     * we are starting with a pointer record).
+     */
+    if (old_rec_type == REC_TYPE_PTR) {
+       next_offset = -1;
     } else {
-       if (old_rec_type == REC_TYPE_PTR) {
-           read_offset = -1;
-           avail_space = -1;
-       } else {
-           if ((read_offset = vstream_ftell(state->dst)) < 0) {
-               msg_warn("%s: read file %s: %m", myname, cleanup_path);
-               CLEANUP_INS_HEADER_RETURN(cleanup_milter_error(state, errno));
-           }
-           avail_space = LEN(old_rec_buf);
+       if ((next_offset = vstream_ftell(state->dst)) < 0) {
+           msg_warn("%s: read file %s: %m", myname, cleanup_path);
+           CLEANUP_INS_HEADER_RETURN(cleanup_milter_error(state, errno));
        }
-       ret = cleanup_patch_header(state, new_hdr_name, new_hdr_value,
-                                  old_rec_offset, old_rec_type, old_rec_buf,
-                                  avail_space, read_offset);
-       CLEANUP_INS_HEADER_RETURN(ret);
     }
+    ret = cleanup_patch_header(state, new_hdr_name, new_hdr_value,
+                              old_rec_offset, old_rec_type,
+                              old_rec_buf, next_offset);
+    CLEANUP_INS_HEADER_RETURN(ret);
 }
 
 /* cleanup_upd_header - modify or append message header */
@@ -764,12 +795,8 @@ static const char *cleanup_upd_header(void *context, ssize_t index,
     CLEANUP_STATE *state = (CLEANUP_STATE *) context;
     VSTRING *rec_buf;
     off_t   old_rec_offset;
-    ssize_t avail_space;
-    off_t   read_offset;
-    off_t   saved_read_offset;
-    int     rec_type;
+    off_t   next_offset;
     int     last_type;
-    int     jumped;
     const char *ret;
 
     if (msg_verbose)
@@ -783,11 +810,7 @@ static const char *cleanup_upd_header(void *context, ssize_t index,
        msg_panic("%s: null header name", myname);
 
     /*
-     * Find the header that is being modified. If none is found, simply
-     * append the header to the linked list at the "header append" pointer
-     * record. Otherwise, find the end of the old header, save the new header
-     * to new storage at the end of the queue file, and link the new storage
-     * with a forward and reverse pointer.
+     * Find the header that is being modified.
      * 
      * The lookup result will never be a pointer record.
      * 
@@ -806,67 +829,34 @@ static const char *cleanup_upd_header(void *context, ssize_t index,
     } while (0)
 
     rec_buf = vstring_alloc(100);
-    old_rec_offset = cleanup_find_header(state, index, new_hdr_name,
-                                        rec_buf, &last_type,
-                                        NO_PTR_BACKUP,
-                                        SKIP_ONE_HEADER);
+    old_rec_offset = cleanup_find_header_start(state, index, new_hdr_name,
+                                              rec_buf, &last_type,
+                                              NO_PTR_BACKUP,
+                                              SKIP_ONE_HEADER);
     if (old_rec_offset == CLEANUP_FIND_HEADER_IOERROR)
        /* Warning and errno->error mapping are done elsewhere. */
        CLEANUP_UPD_HEADER_RETURN(cleanup_milter_error(state, 0));
-    if (old_rec_offset < 0) {
+
+    /*
+     * If no old header is found, simply append the new header to the linked
+     * list at the "header append" pointer record.
+     */
+    if (old_rec_offset < 0)
        CLEANUP_UPD_HEADER_RETURN(cleanup_add_header(context, new_hdr_name,
                                                     new_hdr_value));
-    } else {
-       /* Find the end of this header. */
-       avail_space = LEN(rec_buf);
-       if ((read_offset = vstream_ftell(state->dst)) < 0) {
-           msg_warn("%s: read file %s: %m", myname, cleanup_path);
-           CLEANUP_UPD_HEADER_RETURN(cleanup_milter_error(state, errno));
-       }
-       for (jumped = 0, ret = 0; ret == 0; /* void */ ) {
-           if (CLEANUP_OUT_OK(state) == 0)
-               /* Warning and errno->error mapping are done elsewhere. */
-               CLEANUP_UPD_HEADER_RETURN(cleanup_milter_error(state, 0));
-           saved_read_offset = read_offset;
-           /* Caution: this macro terminates the loop at end-of-message. */
-           /* Don't do complex processing while breaking out of this loop. */
-           GET_NEXT_TEXT_OR_PTR_RECORD(rec_type, state, rec_buf, read_offset,
-           /* Warning and errno->error mapping are done elsewhere. */
-                CLEANUP_UPD_HEADER_RETURN(cleanup_milter_error(state, 0)));
-           if ((read_offset = vstream_ftell(state->dst)) < 0) {
-               msg_warn("%s: read file %s: %m", myname, cleanup_path);
-               CLEANUP_UPD_HEADER_RETURN(cleanup_milter_error(state, errno));
-           }
-           if (rec_type == REC_TYPE_PTR) {
-               /* The "append header" pointer record content must be saved. */
-               if (saved_read_offset == state->append_hdr_pt_offset)
-                   break;
-               if (jumped == 0) {
-                   /* Enough contiguous space for writing a PTR record. */
-                   avail_space += read_offset - saved_read_offset;
-                   jumped = 1;
-               }
-               if (rec_goto(state->dst, STR(rec_buf)) < 0
-                   || (read_offset = vstream_ftell(state->dst)) < 0) {
-                   msg_warn("%s: read file %s: %m", myname, cleanup_path);
-                   CLEANUP_UPD_HEADER_RETURN(cleanup_milter_error(state,
-                                                                  errno));
-               }
-               /* Don't update last_type; PTR may follow REC_TYPE_CONT. */
-               continue;
-           }
-           /* Start of header or message body. */
-           if (last_type != REC_TYPE_CONT && !IS_SPACE_TAB(STR(rec_buf)[0]))
-               break;
-           if (jumped == 0)
-               avail_space += read_offset - saved_read_offset;
-           last_type = rec_type;
-       }
-       ret = cleanup_patch_header(state, new_hdr_name, new_hdr_value,
-                           old_rec_offset, DONT_SAVE_RECORD, (VSTRING *) 0,
-                                  avail_space, saved_read_offset);
-       CLEANUP_UPD_HEADER_RETURN(ret);
-    }
+
+    /*
+     * If the old header is found, find the end of the old header, save the
+     * new header to new storage at the end of the queue file, and link the
+     * new storage with a forward and reverse pointer.
+     */
+    if ((next_offset = cleanup_find_header_end(state, rec_buf, last_type)) < 0)
+       /* Warning and errno->error mapping are done elsewhere. */
+       CLEANUP_UPD_HEADER_RETURN(cleanup_milter_error(state, 0));
+    ret = cleanup_patch_header(state, new_hdr_name, new_hdr_value,
+                              old_rec_offset, DONT_SAVE_RECORD,
+                              (VSTRING *) 0, next_offset);
+    CLEANUP_UPD_HEADER_RETURN(ret);
 }
 
 /* cleanup_del_header - delete message header */
@@ -878,8 +868,7 @@ static const char *cleanup_del_header(void *context, ssize_t index,
     CLEANUP_STATE *state = (CLEANUP_STATE *) context;
     VSTRING *rec_buf;
     off_t   header_offset;
-    off_t   curr_offset;
-    int     rec_type;
+    off_t   next_offset;
     int     last_type;
 
     if (msg_verbose)
@@ -892,76 +881,42 @@ static const char *cleanup_del_header(void *context, ssize_t index,
        msg_panic("%s: null header name", myname);
 
     /*
-     * Find the header that is being deleted, and write over it with a
-     * "deleted text" record type. We first read all the record offsets of
-     * this header, and then mark the records as deleted. If headers were
-     * guaranteed to be contiguous in the queue file (no PTRs in the middle)
-     * then we could use cleanup_out_header() instead of doing multiple seek
-     * + write operations.
+     * Find the header that is being deleted.
      * 
      * The lookup result will never be a pointer record.
      * 
      * Index 1 is the first matching header instance.
      */
-    rec_buf = vstring_alloc(100);
-    header_offset = cleanup_find_header(state, index, hdr_name, rec_buf,
-                                       &last_type, NO_PTR_BACKUP,
-                                       SKIP_ONE_HEADER);
-    if (header_offset == CLEANUP_FIND_HEADER_IOERROR) {
-       vstring_free(rec_buf);
-       /* Warning and errno->error mapping are done elsewhere. */
-       return (cleanup_milter_error(state, 0));
-    }
-    /* Memory usage for header offsets is limited by header_size_limit. */
-    if (header_offset > 0) {
-       ssize_t off_len = 1;
-       ssize_t off_used = 1;
-       off_t  *off_list = (off_t *) mymalloc(off_len * sizeof(*off_list));
-       int     n;
-
 #define CLEANUP_DEL_HEADER_RETURN(ret) do { \
        vstring_free(rec_buf); \
-       myfree((char *) off_list); \
        return (ret); \
     } while (0)
 
-       off_list[0] = header_offset;
-       for (;;) {
-           curr_offset = vstream_ftell(state->dst);
-           /* Caution: this macro terminates the loop at end-of-message. */
-           /* Don't do complex processing while breaking out of this loop. */
-           GET_NEXT_TEXT_OR_PTR_RECORD(rec_type, state, rec_buf, curr_offset,
+    rec_buf = vstring_alloc(100);
+    header_offset = cleanup_find_header_start(state, index, hdr_name, rec_buf,
+                                             &last_type, NO_PTR_BACKUP,
+                                             SKIP_ONE_HEADER);
+    if (header_offset == CLEANUP_FIND_HEADER_IOERROR)
+       /* Warning and errno->error mapping are done elsewhere. */
+       CLEANUP_DEL_HEADER_RETURN(cleanup_milter_error(state, 0));
+
+    /*
+     * Overwrite the beginning of the header record with a pointer to the
+     * information that follows the header. We can't simply use
+     * cleanup_out_header() with a special record type, because there may be
+     * a PTR record in the middle of a multi-line header.
+     */
+    if (header_offset > 0) {
+       if ((next_offset = cleanup_find_header_end(state, rec_buf, last_type)) < 0)
            /* Warning and errno->error mapping are done elsewhere. */
-                CLEANUP_DEL_HEADER_RETURN(cleanup_milter_error(state, 0)));
-           if (rec_type == REC_TYPE_PTR) {
-               if (rec_goto(state->dst, STR(rec_buf)) < 0) {
-                   msg_warn("%s: read file %s: %m", myname, cleanup_path);
-                   CLEANUP_DEL_HEADER_RETURN(cleanup_milter_error(state,
-                                                                  errno));
-               }
-               /* Don't update last_type; PTR may follow REC_TYPE_CONT. */
-               continue;
-           }
-           /* Start of header or message body. */
-           if (last_type != REC_TYPE_CONT && !IS_SPACE_TAB(STR(rec_buf)[0]))
-               break;
-           /* Save this header text record offset. */
-           if (off_used >= off_len) {
-               off_len *= 2;
-               off_list = (off_t *) myrealloc((char *) off_list,
-                                              off_len * sizeof(*off_list));
-           }
-           off_list[off_used++] = curr_offset;
-           last_type = rec_type;
-       }
-       /* Mark the header text records as deleted. */
-       for (n = 0; n < off_used; n++) {
-           if (rec_put_type(state->dst, REC_TYPE_DTXT, off_list[n]) < 0) {
-               msg_warn("%s: write file %s: %m", myname, cleanup_path);
-               CLEANUP_DEL_HEADER_RETURN(cleanup_milter_error(state, errno));
-           }
+           CLEANUP_DEL_HEADER_RETURN(cleanup_milter_error(state, 0));
+       /* Mark the header as deleted. */
+       if (vstream_fseek(state->dst, header_offset, SEEK_SET) < 0) {
+           msg_warn("%s: seek file %s: %m", myname, cleanup_path);
+           CLEANUP_DEL_HEADER_RETURN(cleanup_milter_error(state, errno));
        }
-       myfree((char *) off_list);
+       rec_fprintf(state->dst, REC_TYPE_PTR, REC_TYPE_PTR_FORMAT,
+                   (long) next_offset);
     }
     vstring_free(rec_buf);
 
@@ -1674,6 +1629,7 @@ int     var_enable_orcpt = DEF_ENABLE_ORCPT;
 MAPS   *cleanup_virt_alias_maps;
 char   *var_milt_daemon_name = "host.example.com";
 char   *var_milt_v = DEF_MILT_V;
+MILTERS *cleanup_milters = (MILTERS *) ((char *) sizeof(*cleanup_milters));
 
 /* Dummies to satisfy unused external references. */
 
@@ -1775,7 +1731,8 @@ static void open_queue_file(CLEANUP_STATE *state, const char *path)
            } else if (rec_type == REC_TYPE_PTR) {
                if (state->data_offset < 0)
                    msg_fatal("file %s: missing SIZE record", cleanup_path);
-               if (curr_offset < state->data_offset) {
+               if (curr_offset < state->data_offset
+                   || curr_offset > state->xtra_offset) {
                    if (state->append_rcpt_pt_offset < 0) {
                        state->append_rcpt_pt_offset = curr_offset;
                        if (atol(STR(buf)) != 0)
@@ -1785,7 +1742,7 @@ static void open_queue_file(CLEANUP_STATE *state, const char *path)
                             vstream_ftell(state->dst)) < 0)
                            msg_fatal("file %s: vstream_ftell: %m", cleanup_path);
                    }
-               } else if (curr_offset < state->xtra_offset) {
+               } else {
                    if (state->append_hdr_pt_offset < 0) {
                        state->append_hdr_pt_offset = curr_offset;
                        if (atol(STR(buf)) != 0)
@@ -1794,17 +1751,13 @@ static void open_queue_file(CLEANUP_STATE *state, const char *path)
                        if ((state->append_hdr_pt_target =
                             vstream_ftell(state->dst)) < 0)
                            msg_fatal("file %s: vstream_ftell: %m", cleanup_path);
-                       break;
                    }
                }
            }
+           if (state->append_rcpt_pt_offset > 0
+               && state->append_hdr_pt_offset > 0)
+               break;
        }
-       if (state->append_rcpt_pt_offset < 0)
-           msg_fatal("file %s: no append recipient pointer record",
-                     cleanup_path);
-       if (state->append_hdr_pt_offset < 0)
-           msg_fatal("file %s: no append header pointer record",
-                     cleanup_path);
        if (msg_verbose) {
            msg_info("append_rcpt_pt_offset %ld append_rcpt_pt_target %ld",
                     (long) state->append_rcpt_pt_offset,
index 4d11edeb37e3fc64b81bd445fb2c6376a8ddb4f0..85cc3ea23eed1ff69a99b25d65b2d04741b5b925 100644 (file)
@@ -7,7 +7,7 @@ open test-queue-file.tmp
 
 add_rcpt xxxx
 add_rcpt yyyy
-del_rcpt alias@tail.porcupine.org
+del_rcpt alias@hades.porcupine.org
 del_rcpt yyyy
 
 # Insert a short header X2 at the position of a short multi-line
diff --git a/postfix/src/cleanup/cleanup_milter.in12 b/postfix/src/cleanup/cleanup_milter.in12
new file mode 100644 (file)
index 0000000..bf44e60
--- /dev/null
@@ -0,0 +1,22 @@
+#verbose on
+open test-queue-file12.tmp
+
+# Add a recipient to a message that was received with "sendmail -t"
+# so that all the recipients are in the extracted queue file segment.
+
+add_rcpt me@porcupine.org
+
+# Delete the recipient added above.
+
+del_rcpt me@porcupine.org
+
+# Add a new recipient, using a different address than above, so that
+# the duplicate filter won't suppress it.
+
+add_rcpt em@porcupine.org
+
+# Delete the recipient.
+
+del_rcpt em@porcupine.org
+
+close
index 41f298dc461c0cfda9f902d5961ce97f82575cab..8e35af84059cd2849f031f2d7cc030fa2aebc7d1 100644 (file)
@@ -1,52 +1,58 @@
 *** ENVELOPE RECORDS test-queue-file.tmp ***
-        0 message_size:             428             654               3               0
-       65 message_arrival_time: Sat May 13 21:04:18 2006
-       84 create_time: Sat May 13 21:04:27 2006
-      108 named_attribute: rewrite_context=local
-      131 sender: wietse@porcupine.org
-      153 named_attribute: client_name=tail.porcupine.org
-      185 named_attribute: client_address=IPv6:2001:240:587:0:2d0:b7ff:febe:ca9f
-      240 named_attribute: message_origin=tail.porcupine.org[2001:240:587:0:2d0:b7ff:febe:ca9f]
-      310 named_attribute: helo_name=tail.porcupine.org
-      340 named_attribute: protocol_name=SMTP
-      360 named_attribute: dsn_orig_rcpt=rfc822;wietse@porcupine.org
-      403 original_recipient: wietse@porcupine.org
-      425 recipient: wietse@porcupine.org
-      447 named_attribute: dsn_orig_rcpt=rfc822;alias@tail.porcupine.org
-      494 original_recipient: alias@tail.porcupine.org
-      520 canceled_recipient: wietse@porcupine.org
-      542 named_attribute: dsn_orig_rcpt=rfc822;alias@tail.porcupine.org
-      589 original_recipient: alias@tail.porcupine.org
-      615 canceled_recipient: root@porcupine.org
-      635 pointer_record:            1103
-     1103 named_attribute: notify_flags=1
-     1119 original_recipient: xxxx
-     1125 recipient: xxxx
-     1131 pointer_record:            1148
-     1148 named_attribute: notify_flags=1
-     1164 original_recipient: yyyy
-     1170 canceled_recipient: yyyy
-     1176 pointer_record:             652
-      652 *** MESSAGE CONTENTS test-queue-file.tmp ***
-      654 regular_text: Received: from tail.porcupine.org (tail.porcupine.org [IPv6:2001:240:587:0:2d0:b7ff:febe:ca9f])
-      751 regular_text:        by tail.porcupine.org (Postfix) with SMTP id E0F703D1E36;
-      811 regular_text:        Sat, 13 May 2006 21:04:18 -0400 (EDT)
-      851 pointer_record:            1193
-     1193 pointer_record:            1236
-     1236 deleted_text: X2: v2
-     1244 pointer_record:            1386
-     1386 regular_text: X: X-replaced-header replacement header text
-     1432 pointer_record:            1271
-     1271 regular_text: X2: test header value 3
-     1296 regular_text: Y: 1234567
-     1308 regular_text: Message-Id: <20060514010427.E0F703D1E36@tail.porcupine.org>
-     1369 pointer_record:             954
-      954 regular_text: Date: Sat, 13 May 2006 21:04:18 -0400 (EDT)
-      999 regular_text: From: wietse@porcupine.org
-     1027 regular_text: To: undisclosed-recipients:;
-     1057 pointer_record:               0
-     1074 regular_text: 
-     1076 regular_text: text
-     1082 *** HEADER EXTRACTED test-queue-file.tmp ***
-     1084 pointer_record:               0
-     1101 *** MESSAGE FILE END test-queue-file.tmp ***
+        0 message_size:             441             813               3               0             441
+       81 message_arrival_time: Sat Jan 20 19:52:41 2007
+      100 create_time: Sat Jan 20 19:52:47 2007
+      124 named_attribute: rewrite_context=local
+      147 sender: wietse@porcupine.org
+      169 named_attribute: log_client_name=hades.porcupine.org
+      206 named_attribute: log_client_address=168.100.189.10
+      241 named_attribute: log_message_origin=hades.porcupine.org[168.100.189.10]
+      297 named_attribute: log_helo_name=hades.porcupine.org
+      332 named_attribute: log_protocol_name=SMTP
+      356 named_attribute: client_name=hades.porcupine.org
+      389 named_attribute: reverse_client_name=hades.porcupine.org
+      430 named_attribute: client_address=168.100.189.10
+      461 named_attribute: helo_name=hades.porcupine.org
+      492 named_attribute: client_address_type=2
+      515 named_attribute: dsn_orig_rcpt=rfc822;wietse@porcupine.org
+      558 original_recipient: wietse@porcupine.org
+      580 recipient: wietse@porcupine.org
+      602 named_attribute: dsn_orig_rcpt=rfc822;alias@hades.porcupine.org
+      650 original_recipient: alias@hades.porcupine.org
+      677 canceled_recipient: wietse@porcupine.org
+      699 named_attribute: dsn_orig_rcpt=rfc822;alias@hades.porcupine.org
+      747 original_recipient: alias@hades.porcupine.org
+      774 canceled_recipient: root@porcupine.org
+      794 pointer_record:            1258
+     1258 named_attribute: notify_flags=1
+     1274 original_recipient: xxxx
+     1280 recipient: xxxx
+     1286 pointer_record:            1303
+     1303 named_attribute: notify_flags=1
+     1319 original_recipient: yyyy
+     1325 canceled_recipient: yyyy
+     1331 pointer_record:             811
+      811 *** MESSAGE CONTENTS test-queue-file.tmp ***
+      813 regular_text: Received: from hades.porcupine.org (hades.porcupine.org [168.100.189.10])
+      888 regular_text:        by hades.porcupine.org (Postfix) with SMTP id 38132290405;
+      949 regular_text:        Sat, 20 Jan 2007 19:52:41 -0500 (EST)
+      989 pointer_record:            1348
+     1348 pointer_record:            1399
+     1399 pointer_record:            1365
+     1365 pointer_record:            1492
+     1492 regular_text: X: X-replaced-header replacement header text
+     1538 pointer_record:            1433
+     1433 regular_text: X2: test header value 3
+     1458 regular_text: Y: 1234567
+     1470 padding:   0
+     1475 pointer_record:            1047
+     1047 regular_text: Message-Id: <20070121005247.38132290405@hades.porcupine.org>
+     1109 regular_text: Date: Sat, 20 Jan 2007 19:52:41 -0500 (EST)
+     1154 regular_text: From: wietse@porcupine.org
+     1182 regular_text: To: undisclosed-recipients:;
+     1212 pointer_record:               0
+     1229 regular_text: 
+     1231 regular_text: text
+     1237 pointer_record:               0
+     1254 *** HEADER EXTRACTED test-queue-file.tmp ***
+     1256 *** MESSAGE FILE END test-queue-file.tmp ***
index e7b4c1ea6eed5be26bf7836977e6d890397e59fa..3f5c1cbc3d51edb378f65f6c57bde588a7dfe494 100644 (file)
@@ -1,52 +1,53 @@
 *** ENVELOPE RECORDS test-queue-file10.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-file10.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 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:             485
-      485 regular_text: 
-      487 pointer_record:             552
-      552 regular_text: Sed ut perspiciatis unde omnis iste natus error sit voluptatem\r
-      617 regular_text: accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\r
-      684 regular_text: quae ab illo inventore veritatis et quasi architecto beatae vitae\r
-      752 regular_text: dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\r
-      821 regular_text: aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\r
-      890 regular_text: eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam\r
-      956 regular_text: est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci\r
-     1024 regular_text: velit, sed quia non numquam eius modi tempora incidunt ut labore\r
-     1091 regular_text: et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima\r
-     1156 regular_text: veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,\r
-     1230 regular_text: nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure\r
-     1299 regular_text: reprehenderit qui in ea voluptate velit esse quam nihil molestiae\r
-     1367 regular_text: consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\r
-     1434 regular_text: pariatur?\r
-     1446 regular_text: \r
-     1449 regular_text: At vero eos et accusamus et iusto odio dignissimos ducimus qui\r
-     1514 regular_text: blanditiis praesentium voluptatum deleniti atque corrupti quos\r
-     1579 regular_text: dolores et quas molestias excepturi sint occaecati cupiditate non\r
-     1647 regular_text: provident, similique sunt in culpa qui officia deserunt mollitia\r
-     1714 regular_text: animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis\r
-     1785 regular_text: est et expedita distinctio. Nam libero tempore, cum soluta nobis\r
-     1852 regular_text: est eligendi optio cumque nihil impedit quo minus id quod maxime\r
-     1919 regular_text: placeat facere possimus, omnis voluptas assumenda est, omnis dolor\r
-     1988 regular_text: repellendus. Temporibus autem quibusdam et aut officiis debitis aut\r
-     2058 regular_text: rerum necessitatibus saepe eveniet ut et voluptates repudiandae\r
-     2124 regular_text: sint et molestiae non recusandae. Itaque earum rerum hic tenetur a\r
-     2193 regular_text: sapiente delectus, ut aut reiciendis voluptatibus maiores alias\r
-     2259 regular_text: consequatur aut perferendis doloribus asperiores repellat.\r
-     2320 pointer_record:             510
-      510 *** HEADER EXTRACTED test-queue-file10.tmp ***
-      512 original_recipient: you@porcupine.org
-      531 recipient: you@porcupine.org
-      550 *** MESSAGE FILE END test-queue-file10.tmp ***
+        0 message_size:             332             199               1               0             332
+       81 message_arrival_time: Sat Jan 20 20:53:54 2007
+      100 create_time: Sat Jan 20 20:53:59 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 pointer_record:               0
+      197 *** MESSAGE CONTENTS test-queue-file10.tmp ***
+      199 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      261 regular_text:        id B85F1290407; Sat, 20 Jan 2007 20:53:59 -0500 (EST)
+      317 regular_text: From: me@porcupine.org
+      341 regular_text: To: you@porcupine.org
+      364 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      426 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      471 regular_text: Subject: hey!
+      486 padding: 0
+      489 pointer_record:             506
+      506 regular_text: 
+      508 pointer_record:             573
+      573 regular_text: Sed ut perspiciatis unde omnis iste natus error sit voluptatem\r
+      638 regular_text: accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\r
+      705 regular_text: quae ab illo inventore veritatis et quasi architecto beatae vitae\r
+      773 regular_text: dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\r
+      842 regular_text: aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\r
+      911 regular_text: eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam\r
+      977 regular_text: est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci\r
+     1045 regular_text: velit, sed quia non numquam eius modi tempora incidunt ut labore\r
+     1112 regular_text: et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima\r
+     1177 regular_text: veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,\r
+     1251 regular_text: nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure\r
+     1320 regular_text: reprehenderit qui in ea voluptate velit esse quam nihil molestiae\r
+     1388 regular_text: consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\r
+     1455 regular_text: pariatur?\r
+     1467 regular_text: \r
+     1470 regular_text: At vero eos et accusamus et iusto odio dignissimos ducimus qui\r
+     1535 regular_text: blanditiis praesentium voluptatum deleniti atque corrupti quos\r
+     1600 regular_text: dolores et quas molestias excepturi sint occaecati cupiditate non\r
+     1668 regular_text: provident, similique sunt in culpa qui officia deserunt mollitia\r
+     1735 regular_text: animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis\r
+     1806 regular_text: est et expedita distinctio. Nam libero tempore, cum soluta nobis\r
+     1873 regular_text: est eligendi optio cumque nihil impedit quo minus id quod maxime\r
+     1940 regular_text: placeat facere possimus, omnis voluptas assumenda est, omnis dolor\r
+     2009 regular_text: repellendus. Temporibus autem quibusdam et aut officiis debitis aut\r
+     2079 regular_text: rerum necessitatibus saepe eveniet ut et voluptates repudiandae\r
+     2145 regular_text: sint et molestiae non recusandae. Itaque earum rerum hic tenetur a\r
+     2214 regular_text: sapiente delectus, ut aut reiciendis voluptatibus maiores alias\r
+     2280 regular_text: consequatur aut perferendis doloribus asperiores repellat.\r
+     2341 pointer_record:             531
+      531 *** HEADER EXTRACTED test-queue-file10.tmp ***
+      533 original_recipient: you@porcupine.org
+      552 recipient: you@porcupine.org
+      571 *** MESSAGE FILE END test-queue-file10.tmp ***
index e7b4c1ea6eed5be26bf7836977e6d890397e59fa..3f5c1cbc3d51edb378f65f6c57bde588a7dfe494 100644 (file)
@@ -1,52 +1,53 @@
 *** ENVELOPE RECORDS test-queue-file10.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-file10.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 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:             485
-      485 regular_text: 
-      487 pointer_record:             552
-      552 regular_text: Sed ut perspiciatis unde omnis iste natus error sit voluptatem\r
-      617 regular_text: accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\r
-      684 regular_text: quae ab illo inventore veritatis et quasi architecto beatae vitae\r
-      752 regular_text: dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\r
-      821 regular_text: aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\r
-      890 regular_text: eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam\r
-      956 regular_text: est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci\r
-     1024 regular_text: velit, sed quia non numquam eius modi tempora incidunt ut labore\r
-     1091 regular_text: et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima\r
-     1156 regular_text: veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,\r
-     1230 regular_text: nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure\r
-     1299 regular_text: reprehenderit qui in ea voluptate velit esse quam nihil molestiae\r
-     1367 regular_text: consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\r
-     1434 regular_text: pariatur?\r
-     1446 regular_text: \r
-     1449 regular_text: At vero eos et accusamus et iusto odio dignissimos ducimus qui\r
-     1514 regular_text: blanditiis praesentium voluptatum deleniti atque corrupti quos\r
-     1579 regular_text: dolores et quas molestias excepturi sint occaecati cupiditate non\r
-     1647 regular_text: provident, similique sunt in culpa qui officia deserunt mollitia\r
-     1714 regular_text: animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis\r
-     1785 regular_text: est et expedita distinctio. Nam libero tempore, cum soluta nobis\r
-     1852 regular_text: est eligendi optio cumque nihil impedit quo minus id quod maxime\r
-     1919 regular_text: placeat facere possimus, omnis voluptas assumenda est, omnis dolor\r
-     1988 regular_text: repellendus. Temporibus autem quibusdam et aut officiis debitis aut\r
-     2058 regular_text: rerum necessitatibus saepe eveniet ut et voluptates repudiandae\r
-     2124 regular_text: sint et molestiae non recusandae. Itaque earum rerum hic tenetur a\r
-     2193 regular_text: sapiente delectus, ut aut reiciendis voluptatibus maiores alias\r
-     2259 regular_text: consequatur aut perferendis doloribus asperiores repellat.\r
-     2320 pointer_record:             510
-      510 *** HEADER EXTRACTED test-queue-file10.tmp ***
-      512 original_recipient: you@porcupine.org
-      531 recipient: you@porcupine.org
-      550 *** MESSAGE FILE END test-queue-file10.tmp ***
+        0 message_size:             332             199               1               0             332
+       81 message_arrival_time: Sat Jan 20 20:53:54 2007
+      100 create_time: Sat Jan 20 20:53:59 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 pointer_record:               0
+      197 *** MESSAGE CONTENTS test-queue-file10.tmp ***
+      199 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      261 regular_text:        id B85F1290407; Sat, 20 Jan 2007 20:53:59 -0500 (EST)
+      317 regular_text: From: me@porcupine.org
+      341 regular_text: To: you@porcupine.org
+      364 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      426 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      471 regular_text: Subject: hey!
+      486 padding: 0
+      489 pointer_record:             506
+      506 regular_text: 
+      508 pointer_record:             573
+      573 regular_text: Sed ut perspiciatis unde omnis iste natus error sit voluptatem\r
+      638 regular_text: accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\r
+      705 regular_text: quae ab illo inventore veritatis et quasi architecto beatae vitae\r
+      773 regular_text: dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\r
+      842 regular_text: aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\r
+      911 regular_text: eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam\r
+      977 regular_text: est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci\r
+     1045 regular_text: velit, sed quia non numquam eius modi tempora incidunt ut labore\r
+     1112 regular_text: et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima\r
+     1177 regular_text: veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,\r
+     1251 regular_text: nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure\r
+     1320 regular_text: reprehenderit qui in ea voluptate velit esse quam nihil molestiae\r
+     1388 regular_text: consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\r
+     1455 regular_text: pariatur?\r
+     1467 regular_text: \r
+     1470 regular_text: At vero eos et accusamus et iusto odio dignissimos ducimus qui\r
+     1535 regular_text: blanditiis praesentium voluptatum deleniti atque corrupti quos\r
+     1600 regular_text: dolores et quas molestias excepturi sint occaecati cupiditate non\r
+     1668 regular_text: provident, similique sunt in culpa qui officia deserunt mollitia\r
+     1735 regular_text: animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis\r
+     1806 regular_text: est et expedita distinctio. Nam libero tempore, cum soluta nobis\r
+     1873 regular_text: est eligendi optio cumque nihil impedit quo minus id quod maxime\r
+     1940 regular_text: placeat facere possimus, omnis voluptas assumenda est, omnis dolor\r
+     2009 regular_text: repellendus. Temporibus autem quibusdam et aut officiis debitis aut\r
+     2079 regular_text: rerum necessitatibus saepe eveniet ut et voluptates repudiandae\r
+     2145 regular_text: sint et molestiae non recusandae. Itaque earum rerum hic tenetur a\r
+     2214 regular_text: sapiente delectus, ut aut reiciendis voluptatibus maiores alias\r
+     2280 regular_text: consequatur aut perferendis doloribus asperiores repellat.\r
+     2341 pointer_record:             531
+      531 *** HEADER EXTRACTED test-queue-file10.tmp ***
+      533 original_recipient: you@porcupine.org
+      552 recipient: you@porcupine.org
+      571 *** MESSAGE FILE END test-queue-file10.tmp ***
index 4b4ce665979c906780fe9902114b7bfb45628490..d920c6b7787ac343584611c08c667d7a2c2123a2 100644 (file)
@@ -1,82 +1,83 @@
 *** ENVELOPE RECORDS test-queue-file10.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-file10.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 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:             485
-      485 regular_text: 
-      487 pointer_record:             552
-      552 regular_text: Sed ut perspiciatis unde omnis iste natus error sit voluptatem\r
-      617 regular_text: accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\r
-      684 regular_text: quae ab illo inventore veritatis et quasi architecto beatae vitae\r
-      752 regular_text: dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\r
-      821 regular_text: aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\r
-      890 regular_text: eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam\r
-      956 regular_text: est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci\r
-     1024 regular_text: velit, sed quia non numquam eius modi tempora incidunt ut labore\r
-     1091 regular_text: et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima\r
-     1156 regular_text: veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,\r
-     1230 regular_text: nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure\r
-     1299 regular_text: reprehenderit qui in ea voluptate velit esse quam nihil molestiae\r
-     1367 regular_text: consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\r
-     1434 regular_text: pariatur?\r
-     1446 regular_text: \r
-     1449 regular_text: At vero eos et accusamus et iusto odio dignissimos ducimus qui\r
-     1514 regular_text: blanditiis praesentium voluptatum deleniti atque corrupti quos\r
-     1579 regular_text: dolores et quas molestias excepturi sint occaecati cupiditate non\r
-     1647 regular_text: provident, similique sunt in culpa qui officia deserunt mollitia\r
-     1714 regular_text: animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis\r
-     1785 regular_text: est et expedita distinctio. Nam libero tempore, cum soluta nobis\r
-     1852 regular_text: est eligendi optio cumque nihil impedit quo minus id quod maxime\r
-     1919 regular_text: placeat facere possimus, omnis voluptas assumenda est, omnis dolor\r
-     1988 regular_text: repellendus. Temporibus autem quibusdam et aut officiis debitis aut\r
-     2058 regular_text: rerum necessitatibus saepe eveniet ut et voluptates repudiandae\r
-     2124 regular_text: sint et molestiae non recusandae. Itaque earum rerum hic tenetur a\r
-     2193 regular_text: sapiente delectus, ut aut reiciendis voluptatibus maiores alias\r
-     2259 regular_text: consequatur aut perferendis doloribus asperiores repellat.\r
-     2320 pointer_record:            2337
-     2337 regular_text: \r
-     2340 regular_text: Sed ut perspiciatis unde omnis iste natus error sit voluptatem\r
-     2405 regular_text: accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\r
-     2472 regular_text: quae ab illo inventore veritatis et quasi architecto beatae vitae\r
-     2540 regular_text: dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\r
-     2609 regular_text: aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\r
-     2678 regular_text: eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam\r
-     2744 regular_text: est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci\r
-     2812 regular_text: velit, sed quia non numquam eius modi tempora incidunt ut labore\r
-     2879 regular_text: et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima\r
-     2944 regular_text: veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,\r
-     3018 regular_text: nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure\r
-     3087 regular_text: reprehenderit qui in ea voluptate velit esse quam nihil molestiae\r
-     3155 regular_text: consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\r
-     3222 regular_text: pariatur?\r
-     3234 regular_text: \r
-     3237 regular_text: At vero eos et accusamus et iusto odio dignissimos ducimus qui\r
-     3302 regular_text: blanditiis praesentium voluptatum deleniti atque corrupti quos\r
-     3367 regular_text: dolores et quas molestias excepturi sint occaecati cupiditate non\r
-     3435 regular_text: provident, similique sunt in culpa qui officia deserunt mollitia\r
-     3502 regular_text: animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis\r
-     3573 regular_text: est et expedita distinctio. Nam libero tempore, cum soluta nobis\r
-     3640 regular_text: est eligendi optio cumque nihil impedit quo minus id quod maxime\r
-     3707 regular_text: placeat facere possimus, omnis voluptas assumenda est, omnis dolor\r
-     3776 regular_text: repellendus. Temporibus autem quibusdam et aut officiis debitis aut\r
-     3846 regular_text: rerum necessitatibus saepe eveniet ut et voluptates repudiandae\r
-     3912 regular_text: sint et molestiae non recusandae. Itaque earum rerum hic tenetur a\r
-     3981 regular_text: sapiente delectus, ut aut reiciendis voluptatibus maiores alias\r
-     4047 regular_text: consequatur aut perferendis doloribus asperiores repellat.\r
-     4108 pointer_record:             510
-      510 *** HEADER EXTRACTED test-queue-file10.tmp ***
-      512 original_recipient: you@porcupine.org
-      531 recipient: you@porcupine.org
-      550 *** MESSAGE FILE END test-queue-file10.tmp ***
+        0 message_size:             332             199               1               0             332
+       81 message_arrival_time: Sat Jan 20 20:53:54 2007
+      100 create_time: Sat Jan 20 20:53:59 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 pointer_record:               0
+      197 *** MESSAGE CONTENTS test-queue-file10.tmp ***
+      199 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      261 regular_text:        id B85F1290407; Sat, 20 Jan 2007 20:53:59 -0500 (EST)
+      317 regular_text: From: me@porcupine.org
+      341 regular_text: To: you@porcupine.org
+      364 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      426 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      471 regular_text: Subject: hey!
+      486 padding: 0
+      489 pointer_record:             506
+      506 regular_text: 
+      508 pointer_record:             573
+      573 regular_text: Sed ut perspiciatis unde omnis iste natus error sit voluptatem\r
+      638 regular_text: accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\r
+      705 regular_text: quae ab illo inventore veritatis et quasi architecto beatae vitae\r
+      773 regular_text: dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\r
+      842 regular_text: aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\r
+      911 regular_text: eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam\r
+      977 regular_text: est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci\r
+     1045 regular_text: velit, sed quia non numquam eius modi tempora incidunt ut labore\r
+     1112 regular_text: et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima\r
+     1177 regular_text: veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,\r
+     1251 regular_text: nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure\r
+     1320 regular_text: reprehenderit qui in ea voluptate velit esse quam nihil molestiae\r
+     1388 regular_text: consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\r
+     1455 regular_text: pariatur?\r
+     1467 regular_text: \r
+     1470 regular_text: At vero eos et accusamus et iusto odio dignissimos ducimus qui\r
+     1535 regular_text: blanditiis praesentium voluptatum deleniti atque corrupti quos\r
+     1600 regular_text: dolores et quas molestias excepturi sint occaecati cupiditate non\r
+     1668 regular_text: provident, similique sunt in culpa qui officia deserunt mollitia\r
+     1735 regular_text: animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis\r
+     1806 regular_text: est et expedita distinctio. Nam libero tempore, cum soluta nobis\r
+     1873 regular_text: est eligendi optio cumque nihil impedit quo minus id quod maxime\r
+     1940 regular_text: placeat facere possimus, omnis voluptas assumenda est, omnis dolor\r
+     2009 regular_text: repellendus. Temporibus autem quibusdam et aut officiis debitis aut\r
+     2079 regular_text: rerum necessitatibus saepe eveniet ut et voluptates repudiandae\r
+     2145 regular_text: sint et molestiae non recusandae. Itaque earum rerum hic tenetur a\r
+     2214 regular_text: sapiente delectus, ut aut reiciendis voluptatibus maiores alias\r
+     2280 regular_text: consequatur aut perferendis doloribus asperiores repellat.\r
+     2341 pointer_record:            2358
+     2358 regular_text: \r
+     2361 regular_text: Sed ut perspiciatis unde omnis iste natus error sit voluptatem\r
+     2426 regular_text: accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\r
+     2493 regular_text: quae ab illo inventore veritatis et quasi architecto beatae vitae\r
+     2561 regular_text: dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\r
+     2630 regular_text: aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\r
+     2699 regular_text: eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam\r
+     2765 regular_text: est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci\r
+     2833 regular_text: velit, sed quia non numquam eius modi tempora incidunt ut labore\r
+     2900 regular_text: et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima\r
+     2965 regular_text: veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,\r
+     3039 regular_text: nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure\r
+     3108 regular_text: reprehenderit qui in ea voluptate velit esse quam nihil molestiae\r
+     3176 regular_text: consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\r
+     3243 regular_text: pariatur?\r
+     3255 regular_text: \r
+     3258 regular_text: At vero eos et accusamus et iusto odio dignissimos ducimus qui\r
+     3323 regular_text: blanditiis praesentium voluptatum deleniti atque corrupti quos\r
+     3388 regular_text: dolores et quas molestias excepturi sint occaecati cupiditate non\r
+     3456 regular_text: provident, similique sunt in culpa qui officia deserunt mollitia\r
+     3523 regular_text: animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis\r
+     3594 regular_text: est et expedita distinctio. Nam libero tempore, cum soluta nobis\r
+     3661 regular_text: est eligendi optio cumque nihil impedit quo minus id quod maxime\r
+     3728 regular_text: placeat facere possimus, omnis voluptas assumenda est, omnis dolor\r
+     3797 regular_text: repellendus. Temporibus autem quibusdam et aut officiis debitis aut\r
+     3867 regular_text: rerum necessitatibus saepe eveniet ut et voluptates repudiandae\r
+     3933 regular_text: sint et molestiae non recusandae. Itaque earum rerum hic tenetur a\r
+     4002 regular_text: sapiente delectus, ut aut reiciendis voluptatibus maiores alias\r
+     4068 regular_text: consequatur aut perferendis doloribus asperiores repellat.\r
+     4129 pointer_record:             531
+      531 *** HEADER EXTRACTED test-queue-file10.tmp ***
+      533 original_recipient: you@porcupine.org
+      552 recipient: you@porcupine.org
+      571 *** MESSAGE FILE END test-queue-file10.tmp ***
index e7b4c1ea6eed5be26bf7836977e6d890397e59fa..3f5c1cbc3d51edb378f65f6c57bde588a7dfe494 100644 (file)
@@ -1,52 +1,53 @@
 *** ENVELOPE RECORDS test-queue-file10.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-file10.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 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:             485
-      485 regular_text: 
-      487 pointer_record:             552
-      552 regular_text: Sed ut perspiciatis unde omnis iste natus error sit voluptatem\r
-      617 regular_text: accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\r
-      684 regular_text: quae ab illo inventore veritatis et quasi architecto beatae vitae\r
-      752 regular_text: dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\r
-      821 regular_text: aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\r
-      890 regular_text: eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam\r
-      956 regular_text: est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci\r
-     1024 regular_text: velit, sed quia non numquam eius modi tempora incidunt ut labore\r
-     1091 regular_text: et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima\r
-     1156 regular_text: veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,\r
-     1230 regular_text: nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure\r
-     1299 regular_text: reprehenderit qui in ea voluptate velit esse quam nihil molestiae\r
-     1367 regular_text: consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\r
-     1434 regular_text: pariatur?\r
-     1446 regular_text: \r
-     1449 regular_text: At vero eos et accusamus et iusto odio dignissimos ducimus qui\r
-     1514 regular_text: blanditiis praesentium voluptatum deleniti atque corrupti quos\r
-     1579 regular_text: dolores et quas molestias excepturi sint occaecati cupiditate non\r
-     1647 regular_text: provident, similique sunt in culpa qui officia deserunt mollitia\r
-     1714 regular_text: animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis\r
-     1785 regular_text: est et expedita distinctio. Nam libero tempore, cum soluta nobis\r
-     1852 regular_text: est eligendi optio cumque nihil impedit quo minus id quod maxime\r
-     1919 regular_text: placeat facere possimus, omnis voluptas assumenda est, omnis dolor\r
-     1988 regular_text: repellendus. Temporibus autem quibusdam et aut officiis debitis aut\r
-     2058 regular_text: rerum necessitatibus saepe eveniet ut et voluptates repudiandae\r
-     2124 regular_text: sint et molestiae non recusandae. Itaque earum rerum hic tenetur a\r
-     2193 regular_text: sapiente delectus, ut aut reiciendis voluptatibus maiores alias\r
-     2259 regular_text: consequatur aut perferendis doloribus asperiores repellat.\r
-     2320 pointer_record:             510
-      510 *** HEADER EXTRACTED test-queue-file10.tmp ***
-      512 original_recipient: you@porcupine.org
-      531 recipient: you@porcupine.org
-      550 *** MESSAGE FILE END test-queue-file10.tmp ***
+        0 message_size:             332             199               1               0             332
+       81 message_arrival_time: Sat Jan 20 20:53:54 2007
+      100 create_time: Sat Jan 20 20:53:59 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 pointer_record:               0
+      197 *** MESSAGE CONTENTS test-queue-file10.tmp ***
+      199 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      261 regular_text:        id B85F1290407; Sat, 20 Jan 2007 20:53:59 -0500 (EST)
+      317 regular_text: From: me@porcupine.org
+      341 regular_text: To: you@porcupine.org
+      364 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      426 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      471 regular_text: Subject: hey!
+      486 padding: 0
+      489 pointer_record:             506
+      506 regular_text: 
+      508 pointer_record:             573
+      573 regular_text: Sed ut perspiciatis unde omnis iste natus error sit voluptatem\r
+      638 regular_text: accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\r
+      705 regular_text: quae ab illo inventore veritatis et quasi architecto beatae vitae\r
+      773 regular_text: dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\r
+      842 regular_text: aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\r
+      911 regular_text: eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam\r
+      977 regular_text: est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci\r
+     1045 regular_text: velit, sed quia non numquam eius modi tempora incidunt ut labore\r
+     1112 regular_text: et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima\r
+     1177 regular_text: veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,\r
+     1251 regular_text: nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure\r
+     1320 regular_text: reprehenderit qui in ea voluptate velit esse quam nihil molestiae\r
+     1388 regular_text: consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\r
+     1455 regular_text: pariatur?\r
+     1467 regular_text: \r
+     1470 regular_text: At vero eos et accusamus et iusto odio dignissimos ducimus qui\r
+     1535 regular_text: blanditiis praesentium voluptatum deleniti atque corrupti quos\r
+     1600 regular_text: dolores et quas molestias excepturi sint occaecati cupiditate non\r
+     1668 regular_text: provident, similique sunt in culpa qui officia deserunt mollitia\r
+     1735 regular_text: animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis\r
+     1806 regular_text: est et expedita distinctio. Nam libero tempore, cum soluta nobis\r
+     1873 regular_text: est eligendi optio cumque nihil impedit quo minus id quod maxime\r
+     1940 regular_text: placeat facere possimus, omnis voluptas assumenda est, omnis dolor\r
+     2009 regular_text: repellendus. Temporibus autem quibusdam et aut officiis debitis aut\r
+     2079 regular_text: rerum necessitatibus saepe eveniet ut et voluptates repudiandae\r
+     2145 regular_text: sint et molestiae non recusandae. Itaque earum rerum hic tenetur a\r
+     2214 regular_text: sapiente delectus, ut aut reiciendis voluptatibus maiores alias\r
+     2280 regular_text: consequatur aut perferendis doloribus asperiores repellat.\r
+     2341 pointer_record:             531
+      531 *** HEADER EXTRACTED test-queue-file10.tmp ***
+      533 original_recipient: you@porcupine.org
+      552 recipient: you@porcupine.org
+      571 *** MESSAGE FILE END test-queue-file10.tmp ***
index 81b05025d816fff3ddb9021016cc07517bc068c3..490c6224708406b4df63563287b3f226ffd49a20 100644 (file)
@@ -1,86 +1,89 @@
 *** ENVELOPE RECORDS test-queue-file10.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-file10.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 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:             552
-      552 regular_text: foo1: foobar
-      566 pointer_record:            2368
-     2368 regular_text: foo2: foobar
-     2382 pointer_record:             485
-      485 regular_text: 
-      487 pointer_record:             583
-      583 regular_text: Sed ut perspiciatis unde omnis iste natus error sit voluptatem\r
-      648 regular_text: accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\r
-      715 regular_text: quae ab illo inventore veritatis et quasi architecto beatae vitae\r
-      783 regular_text: dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\r
-      852 regular_text: aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\r
-      921 regular_text: eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam\r
-      987 regular_text: est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci\r
-     1055 regular_text: velit, sed quia non numquam eius modi tempora incidunt ut labore\r
-     1122 regular_text: et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima\r
-     1187 regular_text: veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,\r
-     1261 regular_text: nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure\r
-     1330 regular_text: reprehenderit qui in ea voluptate velit esse quam nihil molestiae\r
-     1398 regular_text: consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\r
-     1465 regular_text: pariatur?\r
-     1477 regular_text: \r
-     1480 regular_text: At vero eos et accusamus et iusto odio dignissimos ducimus qui\r
-     1545 regular_text: blanditiis praesentium voluptatum deleniti atque corrupti quos\r
-     1610 regular_text: dolores et quas molestias excepturi sint occaecati cupiditate non\r
-     1678 regular_text: provident, similique sunt in culpa qui officia deserunt mollitia\r
-     1745 regular_text: animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis\r
-     1816 regular_text: est et expedita distinctio. Nam libero tempore, cum soluta nobis\r
-     1883 regular_text: est eligendi optio cumque nihil impedit quo minus id quod maxime\r
-     1950 regular_text: placeat facere possimus, omnis voluptas assumenda est, omnis dolor\r
-     2019 regular_text: repellendus. Temporibus autem quibusdam et aut officiis debitis aut\r
-     2089 regular_text: rerum necessitatibus saepe eveniet ut et voluptates repudiandae\r
-     2155 regular_text: sint et molestiae non recusandae. Itaque earum rerum hic tenetur a\r
-     2224 regular_text: sapiente delectus, ut aut reiciendis voluptatibus maiores alias\r
-     2290 regular_text: consequatur aut perferendis doloribus asperiores repellat.\r
-     2351 pointer_record:            2399
-     2399 regular_text: \r
-     2402 regular_text: Sed ut perspiciatis unde omnis iste natus error sit voluptatem\r
-     2467 regular_text: accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\r
-     2534 regular_text: quae ab illo inventore veritatis et quasi architecto beatae vitae\r
-     2602 regular_text: dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\r
-     2671 regular_text: aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\r
-     2740 regular_text: eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam\r
-     2806 regular_text: est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci\r
-     2874 regular_text: velit, sed quia non numquam eius modi tempora incidunt ut labore\r
-     2941 regular_text: et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima\r
-     3006 regular_text: veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,\r
-     3080 regular_text: nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure\r
-     3149 regular_text: reprehenderit qui in ea voluptate velit esse quam nihil molestiae\r
-     3217 regular_text: consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\r
-     3284 regular_text: pariatur?\r
-     3296 regular_text: \r
-     3299 regular_text: At vero eos et accusamus et iusto odio dignissimos ducimus qui\r
-     3364 regular_text: blanditiis praesentium voluptatum deleniti atque corrupti quos\r
-     3429 regular_text: dolores et quas molestias excepturi sint occaecati cupiditate non\r
-     3497 regular_text: provident, similique sunt in culpa qui officia deserunt mollitia\r
-     3564 regular_text: animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis\r
-     3635 regular_text: est et expedita distinctio. Nam libero tempore, cum soluta nobis\r
-     3702 regular_text: est eligendi optio cumque nihil impedit quo minus id quod maxime\r
-     3769 regular_text: placeat facere possimus, omnis voluptas assumenda est, omnis dolor\r
-     3838 regular_text: repellendus. Temporibus autem quibusdam et aut officiis debitis aut\r
-     3908 regular_text: rerum necessitatibus saepe eveniet ut et voluptates repudiandae\r
-     3974 regular_text: sint et molestiae non recusandae. Itaque earum rerum hic tenetur a\r
-     4043 regular_text: sapiente delectus, ut aut reiciendis voluptatibus maiores alias\r
-     4109 regular_text: consequatur aut perferendis doloribus asperiores repellat.\r
-     4170 pointer_record:             510
-      510 *** HEADER EXTRACTED test-queue-file10.tmp ***
-      512 original_recipient: you@porcupine.org
-      531 recipient: you@porcupine.org
-      550 *** MESSAGE FILE END test-queue-file10.tmp ***
+        0 message_size:             332             199               1               0             332
+       81 message_arrival_time: Sat Jan 20 20:53:54 2007
+      100 create_time: Sat Jan 20 20:53:59 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 pointer_record:               0
+      197 *** MESSAGE CONTENTS test-queue-file10.tmp ***
+      199 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      261 regular_text:        id B85F1290407; Sat, 20 Jan 2007 20:53:59 -0500 (EST)
+      317 regular_text: From: me@porcupine.org
+      341 regular_text: To: you@porcupine.org
+      364 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      426 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      471 regular_text: Subject: hey!
+      486 padding: 0
+      489 pointer_record:             573
+      573 regular_text: foo1: foobar
+      587 padding: 0
+      590 pointer_record:            2392
+     2392 regular_text: foo2: foobar
+     2406 padding: 0
+     2409 pointer_record:             506
+      506 regular_text: 
+      508 pointer_record:             607
+      607 regular_text: Sed ut perspiciatis unde omnis iste natus error sit voluptatem\r
+      672 regular_text: accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\r
+      739 regular_text: quae ab illo inventore veritatis et quasi architecto beatae vitae\r
+      807 regular_text: dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\r
+      876 regular_text: aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\r
+      945 regular_text: eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam\r
+     1011 regular_text: est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci\r
+     1079 regular_text: velit, sed quia non numquam eius modi tempora incidunt ut labore\r
+     1146 regular_text: et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima\r
+     1211 regular_text: veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,\r
+     1285 regular_text: nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure\r
+     1354 regular_text: reprehenderit qui in ea voluptate velit esse quam nihil molestiae\r
+     1422 regular_text: consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\r
+     1489 regular_text: pariatur?\r
+     1501 regular_text: \r
+     1504 regular_text: At vero eos et accusamus et iusto odio dignissimos ducimus qui\r
+     1569 regular_text: blanditiis praesentium voluptatum deleniti atque corrupti quos\r
+     1634 regular_text: dolores et quas molestias excepturi sint occaecati cupiditate non\r
+     1702 regular_text: provident, similique sunt in culpa qui officia deserunt mollitia\r
+     1769 regular_text: animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis\r
+     1840 regular_text: est et expedita distinctio. Nam libero tempore, cum soluta nobis\r
+     1907 regular_text: est eligendi optio cumque nihil impedit quo minus id quod maxime\r
+     1974 regular_text: placeat facere possimus, omnis voluptas assumenda est, omnis dolor\r
+     2043 regular_text: repellendus. Temporibus autem quibusdam et aut officiis debitis aut\r
+     2113 regular_text: rerum necessitatibus saepe eveniet ut et voluptates repudiandae\r
+     2179 regular_text: sint et molestiae non recusandae. Itaque earum rerum hic tenetur a\r
+     2248 regular_text: sapiente delectus, ut aut reiciendis voluptatibus maiores alias\r
+     2314 regular_text: consequatur aut perferendis doloribus asperiores repellat.\r
+     2375 pointer_record:            2426
+     2426 regular_text: \r
+     2429 regular_text: Sed ut perspiciatis unde omnis iste natus error sit voluptatem\r
+     2494 regular_text: accusantium doloremque laudantium, totam rem aperiam, eaque ipsa\r
+     2561 regular_text: quae ab illo inventore veritatis et quasi architecto beatae vitae\r
+     2629 regular_text: dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit\r
+     2698 regular_text: aspernatur aut odit aut fugit, sed quia consequuntur magni dolores\r
+     2767 regular_text: eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam\r
+     2833 regular_text: est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci\r
+     2901 regular_text: velit, sed quia non numquam eius modi tempora incidunt ut labore\r
+     2968 regular_text: et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima\r
+     3033 regular_text: veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam,\r
+     3107 regular_text: nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure\r
+     3176 regular_text: reprehenderit qui in ea voluptate velit esse quam nihil molestiae\r
+     3244 regular_text: consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla\r
+     3311 regular_text: pariatur?\r
+     3323 regular_text: \r
+     3326 regular_text: At vero eos et accusamus et iusto odio dignissimos ducimus qui\r
+     3391 regular_text: blanditiis praesentium voluptatum deleniti atque corrupti quos\r
+     3456 regular_text: dolores et quas molestias excepturi sint occaecati cupiditate non\r
+     3524 regular_text: provident, similique sunt in culpa qui officia deserunt mollitia\r
+     3591 regular_text: animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis\r
+     3662 regular_text: est et expedita distinctio. Nam libero tempore, cum soluta nobis\r
+     3729 regular_text: est eligendi optio cumque nihil impedit quo minus id quod maxime\r
+     3796 regular_text: placeat facere possimus, omnis voluptas assumenda est, omnis dolor\r
+     3865 regular_text: repellendus. Temporibus autem quibusdam et aut officiis debitis aut\r
+     3935 regular_text: rerum necessitatibus saepe eveniet ut et voluptates repudiandae\r
+     4001 regular_text: sint et molestiae non recusandae. Itaque earum rerum hic tenetur a\r
+     4070 regular_text: sapiente delectus, ut aut reiciendis voluptatibus maiores alias\r
+     4136 regular_text: consequatur aut perferendis doloribus asperiores repellat.\r
+     4197 pointer_record:             531
+      531 *** HEADER EXTRACTED test-queue-file10.tmp ***
+      533 original_recipient: you@porcupine.org
+      552 recipient: you@porcupine.org
+      571 *** MESSAGE FILE END test-queue-file10.tmp ***
diff --git a/postfix/src/cleanup/cleanup_milter.ref12 b/postfix/src/cleanup/cleanup_milter.ref12
new file mode 100644 (file)
index 0000000..58dc6f5
--- /dev/null
@@ -0,0 +1,33 @@
+*** ENVELOPE RECORDS test-queue-file12.tmp ***
+        0 message_size:             332             182               1               0             332
+       81 message_arrival_time: Sun Jan 21 13:32:59 2007
+      100 create_time: Sun Jan 21 13:33:08 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 *** MESSAGE CONTENTS test-queue-file12.tmp ***
+      182 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      244 regular_text:        id DE040290405; Sun, 21 Jan 2007 13:33:08 -0500 (EST)
+      300 regular_text: From: me@porcupine.org
+      324 regular_text: To: you@porcupine.org
+      347 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      409 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      454 regular_text: Subject: hey!
+      469 padding: 0
+      472 pointer_record:               0
+      489 regular_text: 
+      491 regular_text: text
+      497 pointer_record:               0
+      514 *** HEADER EXTRACTED test-queue-file12.tmp ***
+      516 original_recipient: you@porcupine.org
+      535 recipient: you@porcupine.org
+      554 pointer_record:             573
+      573 named_attribute: notify_flags=1
+      589 original_recipient: me@porcupine.org
+      607 canceled_recipient: me@porcupine.org
+      625 pointer_record:             642
+      642 named_attribute: notify_flags=1
+      658 original_recipient: em@porcupine.org
+      676 canceled_recipient: em@porcupine.org
+      694 pointer_record:             571
+      571 *** MESSAGE FILE END test-queue-file12.tmp ***
index 1d3fdc5315ae258c0431c80eb99b1603c20e57b3..bdfc994e5485b1688ffdf611cc646760d4605ce5 100644 (file)
@@ -1,32 +1,36 @@
 *** ENVELOPE RECORDS test-queue-file2.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-file2.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 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 pointer_record:             552
-      552 pointer_record:             584
-      584 pointer_record:             616
-      616 regular_text: Subject: hey!
-      631 pointer_record:             648
-      648 pointer_record:             678
-      678 pointer_record:             708
-      708 pointer_record:             738
-      738 regular_text: foo: foobar
-      751 pointer_record:             485
-      485 regular_text: 
-      487 regular_text: text
-      493 pointer_record:               0
-      510 *** HEADER EXTRACTED test-queue-file2.tmp ***
-      512 original_recipient: you@porcupine.org
-      531 recipient: you@porcupine.org
-      550 *** MESSAGE FILE END test-queue-file2.tmp ***
+        0 message_size:             332             199               1               0             332
+       81 message_arrival_time: Sat Jan 20 20:53:54 2007
+      100 create_time: Sat Jan 20 20:53:59 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 pointer_record:               0
+      197 *** MESSAGE CONTENTS test-queue-file2.tmp ***
+      199 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      261 regular_text:        id B85F1290407; Sat, 20 Jan 2007 20:53:59 -0500 (EST)
+      317 regular_text: From: me@porcupine.org
+      341 regular_text: To: you@porcupine.org
+      364 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      426 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      471 pointer_record:             573
+      573 pointer_record:             608
+      608 pointer_record:             643
+      643 regular_text: Subject: hey!
+      658 padding: 0
+      661 pointer_record:             489
+      489 pointer_record:             678
+      678 pointer_record:             712
+      712 pointer_record:             746
+      746 pointer_record:             780
+      780 regular_text: foo: foobar
+      793 padding:  0
+      797 pointer_record:             695
+      695 pointer_record:             506
+      506 regular_text: 
+      508 regular_text: text
+      514 pointer_record:               0
+      531 *** HEADER EXTRACTED test-queue-file2.tmp ***
+      533 original_recipient: you@porcupine.org
+      552 recipient: you@porcupine.org
+      571 *** MESSAGE FILE END test-queue-file2.tmp ***
index 77c5b5c68f19f3a3efce530d376d2a59a13989f1..84ae4efb45e815a30a82018e2cd97d744e928140 100644 (file)
@@ -1,50 +1,52 @@
 *** ENVELOPE RECORDS test-queue-file3.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:             552
-      552 named_attribute: notify_flags=1
-      568 original_recipient: me@porcupine.org
-      586 canceled_recipient: me@porcupine.org
-      604 pointer_record:            1383
-     1383 named_attribute: notify_flags=1
-     1399 original_recipient: em@porcupine.org
-     1417 canceled_recipient: em@porcupine.org
-     1435 pointer_record:             179
-      179 *** MESSAGE CONTENTS test-queue-file3.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:             834
-      834 pointer_record:            1301
-     1301 pointer_record:            1342
-     1342 pointer_record:            1452
-     1452 pointer_record:            1706
-     1706 pointer_record:            1747
-     1747 regular_text: From: me@porcupine.org
-     1771 pointer_record:            1493
-     1493 pointer_record:            1788
-     1788 pointer_record:            1828
-     1828 regular_text: To: you@porcupine.org
-     1851 pointer_record:            1533
-     1533 pointer_record:            1868
-     1868 pointer_record:            1947
-     1947 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
-     2009 pointer_record:            1612
-     1612 pointer_record:            2026
-     2026 pointer_record:            2088
-     2088 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
-     2133 pointer_record:            1674
-     1674 pointer_record:            2150
-     2150 pointer_record:            2182
-     2182 regular_text: Subject: hey!
-     2197 pointer_record:             485
-      485 regular_text: 
-      487 regular_text: text
-      493 pointer_record:               0
-      510 *** HEADER EXTRACTED test-queue-file3.tmp ***
-      512 original_recipient: you@porcupine.org
-      531 recipient: you@porcupine.org
-      550 *** MESSAGE FILE END test-queue-file3.tmp ***
+        0 message_size:             332             199               1               0             332
+       81 message_arrival_time: Sat Jan 20 20:53:54 2007
+      100 create_time: Sat Jan 20 20:53:59 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 pointer_record:             573
+      573 named_attribute: notify_flags=1
+      589 original_recipient: me@porcupine.org
+      607 canceled_recipient: me@porcupine.org
+      625 pointer_record:            1413
+     1413 named_attribute: notify_flags=1
+     1429 original_recipient: em@porcupine.org
+     1447 canceled_recipient: em@porcupine.org
+     1465 pointer_record:             197
+      197 *** MESSAGE CONTENTS test-queue-file3.tmp ***
+      199 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      261 regular_text:        id B85F1290407; Sat, 20 Jan 2007 20:53:59 -0500 (EST)
+      317 pointer_record:             858
+      858 pointer_record:            1331
+     1331 pointer_record:            1372
+     1372 pointer_record:            1482
+     1482 pointer_record:            1739
+     1739 pointer_record:            1780
+     1780 regular_text: From: me@porcupine.org
+     1804 pointer_record:            1523
+     1523 pointer_record:            1821
+     1821 pointer_record:            1861
+     1861 regular_text: To: you@porcupine.org
+     1884 pointer_record:            1563
+     1563 pointer_record:            1901
+     1901 pointer_record:            1980
+     1980 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+     2042 pointer_record:            1642
+     1642 pointer_record:            2059
+     2059 pointer_record:            2121
+     2121 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+     2166 pointer_record:            1704
+     1704 pointer_record:            2183
+     2183 pointer_record:            2218
+     2218 regular_text: Subject: hey!
+     2233 padding: 0
+     2236 pointer_record:             489
+      489 pointer_record:               0
+      506 regular_text: 
+      508 regular_text: text
+      514 pointer_record:               0
+      531 *** HEADER EXTRACTED test-queue-file3.tmp ***
+      533 original_recipient: you@porcupine.org
+      552 recipient: you@porcupine.org
+      571 *** MESSAGE FILE END test-queue-file3.tmp ***
index 5dc13ca29b71945493950da17ecf2676368b4170..5c8993eee21f23f900b9985975b1ee675356031b 100644 (file)
@@ -1,55 +1,62 @@
 *** ENVELOPE RECORDS test-queue-file4.tmp ***
-        0 message_size:             428             654               3               0
-       65 message_arrival_time: Sat May 13 21:04:18 2006
-       84 create_time: Sat May 13 21:04:27 2006
-      108 named_attribute: rewrite_context=local
-      131 sender: wietse@porcupine.org
-      153 named_attribute: client_name=tail.porcupine.org
-      185 named_attribute: client_address=IPv6:2001:240:587:0:2d0:b7ff:febe:ca9f
-      240 named_attribute: message_origin=tail.porcupine.org[2001:240:587:0:2d0:b7ff:febe:ca9f]
-      310 named_attribute: helo_name=tail.porcupine.org
-      340 named_attribute: protocol_name=SMTP
-      360 named_attribute: dsn_orig_rcpt=rfc822;wietse@porcupine.org
-      403 original_recipient: wietse@porcupine.org
-      425 recipient: wietse@porcupine.org
-      447 named_attribute: dsn_orig_rcpt=rfc822;alias@tail.porcupine.org
-      494 original_recipient: alias@tail.porcupine.org
-      520 recipient: wietse@porcupine.org
-      542 named_attribute: dsn_orig_rcpt=rfc822;alias@tail.porcupine.org
-      589 original_recipient: alias@tail.porcupine.org
-      615 recipient: root@porcupine.org
-      635 pointer_record:            1103
-     1103 named_attribute: notify_flags=1
-     1119 original_recipient: 01
-     1123 canceled_recipient: 01
-     1127 pointer_record:            1144
-     1144 named_attribute: notify_flags=1
-     1160 original_recipient: 02
-     1164 canceled_recipient: 02
-     1168 pointer_record:            1185
-     1185 named_attribute: notify_flags=1
-     1201 original_recipient: 03
-     1205 canceled_recipient: 03
-     1209 pointer_record:             652
-      652 *** MESSAGE CONTENTS test-queue-file4.tmp ***
-      654 regular_text: Received: from tail.porcupine.org (tail.porcupine.org [IPv6:2001:240:587:0:2d0:b7ff:febe:ca9f])
-      751 regular_text:        by tail.porcupine.org (Postfix) with SMTP id E0F703D1E36;
-      811 regular_text:        Sat, 13 May 2006 21:04:18 -0400 (EDT)
-      851 regular_text: X: 1
-      857 regular_text:  2
-      861 regular_text:  3
-      865 regular_text:  4
-      869 regular_text:  5
-      873 regular_text:  6
-      877 regular_text:  7
-      881 regular_text: Y: 1234567
-      893 regular_text: Message-Id: <20060514010427.E0F703D1E36@tail.porcupine.org>
-      954 regular_text: Date: Sat, 13 May 2006 21:04:18 -0400 (EDT)
-      999 regular_text: From: wietse@porcupine.org
-     1027 regular_text: To: undisclosed-recipients:;
-     1057 pointer_record:               0
-     1074 regular_text: 
-     1076 regular_text: text
-     1082 *** HEADER EXTRACTED test-queue-file4.tmp ***
-     1084 pointer_record:               0
-     1101 *** MESSAGE FILE END test-queue-file4.tmp ***
+        0 message_size:             441             813               3               0             441
+       81 message_arrival_time: Sat Jan 20 19:52:41 2007
+      100 create_time: Sat Jan 20 19:52:47 2007
+      124 named_attribute: rewrite_context=local
+      147 sender: wietse@porcupine.org
+      169 named_attribute: log_client_name=hades.porcupine.org
+      206 named_attribute: log_client_address=168.100.189.10
+      241 named_attribute: log_message_origin=hades.porcupine.org[168.100.189.10]
+      297 named_attribute: log_helo_name=hades.porcupine.org
+      332 named_attribute: log_protocol_name=SMTP
+      356 named_attribute: client_name=hades.porcupine.org
+      389 named_attribute: reverse_client_name=hades.porcupine.org
+      430 named_attribute: client_address=168.100.189.10
+      461 named_attribute: helo_name=hades.porcupine.org
+      492 named_attribute: client_address_type=2
+      515 named_attribute: dsn_orig_rcpt=rfc822;wietse@porcupine.org
+      558 original_recipient: wietse@porcupine.org
+      580 recipient: wietse@porcupine.org
+      602 named_attribute: dsn_orig_rcpt=rfc822;alias@hades.porcupine.org
+      650 original_recipient: alias@hades.porcupine.org
+      677 recipient: wietse@porcupine.org
+      699 named_attribute: dsn_orig_rcpt=rfc822;alias@hades.porcupine.org
+      747 original_recipient: alias@hades.porcupine.org
+      774 recipient: root@porcupine.org
+      794 pointer_record:            1258
+     1258 named_attribute: notify_flags=1
+     1274 original_recipient: 01
+     1278 canceled_recipient: 01
+     1282 pointer_record:            1299
+     1299 named_attribute: notify_flags=1
+     1315 original_recipient: 02
+     1319 canceled_recipient: 02
+     1323 pointer_record:            1340
+     1340 named_attribute: notify_flags=1
+     1356 original_recipient: 03
+     1360 canceled_recipient: 03
+     1364 pointer_record:             811
+      811 *** MESSAGE CONTENTS test-queue-file4.tmp ***
+      813 regular_text: Received: from hades.porcupine.org (hades.porcupine.org [168.100.189.10])
+      888 regular_text:        by hades.porcupine.org (Postfix) with SMTP id 38132290405;
+      949 regular_text:        Sat, 20 Jan 2007 19:52:41 -0500 (EST)
+      989 regular_text: X: 1
+      995 padding:         0
+     1006 regular_text:  2
+     1010 regular_text:  3
+     1014 regular_text:  4
+     1018 regular_text:  5
+     1022 regular_text:  6
+     1026 regular_text:  7
+     1030 regular_text: Y: 1234567
+     1042 padding:   0
+     1047 regular_text: Message-Id: <20070121005247.38132290405@hades.porcupine.org>
+     1109 regular_text: Date: Sat, 20 Jan 2007 19:52:41 -0500 (EST)
+     1154 regular_text: From: wietse@porcupine.org
+     1182 regular_text: To: undisclosed-recipients:;
+     1212 pointer_record:               0
+     1229 regular_text: 
+     1231 regular_text: text
+     1237 pointer_record:               0
+     1254 *** HEADER EXTRACTED test-queue-file4.tmp ***
+     1256 *** MESSAGE FILE END test-queue-file4.tmp ***
index 49e8f0463366abf2faa7b921a9098d2fa481c37b..b5862a840aaf313017dab69d72ba500cd035642a 100644 (file)
@@ -1,29 +1,29 @@
 *** ENVELOPE RECORDS test-queue-file5.tmp ***
-        0 message_size:             370             221               1               0
-       65 message_arrival_time: Fri Jul 28 15:14:59 2006
-       84 create_time: Fri Jul 28 15:15:05 2006
-      108 named_attribute: rewrite_context=local
-      131 sender_fullname: Wietse Venema
-      146 sender: me@porcupine.org
-      164 original_recipient: you@porcupine.org
-      183 recipient: you@porcupine.org
-      202 pointer_record:               0
-      219 *** MESSAGE CONTENTS test-queue-file5.tmp ***
-      221 regular_text: Received: by bristle.watson.ibm.com (Postfix, from userid 1001)
-      286 regular_text:        id 78849290593; Fri, 28 Jul 2006 15:15:05 -0400 (EDT)
-      342 pointer_record:             750
-      750 regular_text: Subject: hya
-      764 pointer_record:             705
-      705 regular_text: X: whatevershebringswesing
-      733 pointer_record:             623
-      623 regular_text: Message-Id: <20060728191505.78849290593@bristle.watson.ibm.com>
-      688 pointer_record:             434
-      434 regular_text: Date: Fri, 28 Jul 2006 15:14:59 -0400 (EDT)
-      479 regular_text: From: me@porcupine.org (Wietse Venema)
-      519 regular_text: To: undisclosed-recipients:;
-      549 pointer_record:               0
-      566 regular_text: 
-      568 regular_text: text
-      574 pointer_record:               0
-      591 *** HEADER EXTRACTED test-queue-file5.tmp ***
-      593 *** MESSAGE FILE END test-queue-file5.tmp ***
+        0 message_size:             376             237               1               0             376
+       81 message_arrival_time: Sun Jan 21 11:26:46 2007
+      100 create_time: Sun Jan 21 11:26:59 2007
+      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 test-queue-file5.tmp ***
+      237 regular_text: Received: by hades.porcupine.org (Postfix, from userid 0)
+      296 regular_text:        id 38FA9290404; Sun, 21 Jan 2007 11:26:59 -0500 (EST)
+      352 pointer_record:             707
+      707 regular_text: Subject: hya
+      721 padding: 0
+      724 pointer_record:             662
+      662 regular_text: X: whatevershebringswesing
+      690 pointer_record:             394
+      394 regular_text: Message-Id: <20070121162659.38FA9290404@hades.porcupine.org>
+      456 regular_text: Date: Sun, 21 Jan 2007 11:26:46 -0500 (EST)
+      501 regular_text: From: me@porcupine.org (Wietse Venema)
+      541 regular_text: To: undisclosed-recipients:;
+      571 pointer_record:               0
+      588 regular_text: 
+      590 regular_text: text
+      596 pointer_record:               0
+      613 *** HEADER EXTRACTED test-queue-file5.tmp ***
+      615 *** MESSAGE FILE END test-queue-file5.tmp ***
index 4b9e01d5296ceefed13c61a8a50d3b4fd3bf2072..193960d36a95ec3b16e2af117bceb1dd1470869a 100644 (file)
@@ -1,27 +1,28 @@
 *** 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 ***
+        0 message_size:             332             199               1               0             332
+       81 message_arrival_time: Sat Jan 20 20:53:54 2007
+      100 create_time: Sat Jan 20 20:53:59 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 pointer_record:               0
+      197 *** MESSAGE CONTENTS test-queue-file6.tmp ***
+      199 pointer_record:             573
+      573 regular_text: X-Virus-Scanned: hya
+      595 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      657 pointer_record:             261
+      261 regular_text:        id B85F1290407; Sat, 20 Jan 2007 20:53:59 -0500 (EST)
+      317 regular_text: From: me@porcupine.org
+      341 regular_text: To: you@porcupine.org
+      364 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      426 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      471 regular_text: Subject: hey!
+      486 padding: 0
+      489 pointer_record:               0
+      506 regular_text: 
+      508 regular_text: text
+      514 pointer_record:               0
+      531 *** HEADER EXTRACTED test-queue-file6.tmp ***
+      533 original_recipient: you@porcupine.org
+      552 recipient: you@porcupine.org
+      571 *** MESSAGE FILE END test-queue-file6.tmp ***
index 38d7db0c29742dbd940aad22136e842be4734ea2..fdcb38e4b649007ca39ef5f876a0848f65b32fa6 100644 (file)
@@ -1,30 +1,31 @@
 *** 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 ***
+        0 message_size:             332             199               1               0             332
+       81 message_arrival_time: Sat Jan 20 20:53:54 2007
+      100 create_time: Sat Jan 20 20:53:59 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 pointer_record:               0
+      197 *** MESSAGE CONTENTS test-queue-file6.tmp ***
+      199 pointer_record:             573
+      573 regular_text: X-Virus-Scanned: hya
+      595 pointer_record:             674
+      674 regular_text: Domainkey-Signature: hya
+      700 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      762 pointer_record:             657
+      657 pointer_record:             261
+      261 regular_text:        id B85F1290407; Sat, 20 Jan 2007 20:53:59 -0500 (EST)
+      317 regular_text: From: me@porcupine.org
+      341 regular_text: To: you@porcupine.org
+      364 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      426 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      471 regular_text: Subject: hey!
+      486 padding: 0
+      489 pointer_record:               0
+      506 regular_text: 
+      508 regular_text: text
+      514 pointer_record:               0
+      531 *** HEADER EXTRACTED test-queue-file6.tmp ***
+      533 original_recipient: you@porcupine.org
+      552 recipient: you@porcupine.org
+      571 *** MESSAGE FILE END test-queue-file6.tmp ***
index d979e7d6882b4c7f13e2f1d8b95d34d95cc9fe3a..9d58b6dc64377496f01d57c5d1c867ec9e94a249 100644 (file)
@@ -1,32 +1,33 @@
 *** 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 ***
+        0 message_size:             332             199               1               0             332
+       81 message_arrival_time: Sat Jan 20 20:53:54 2007
+      100 create_time: Sat Jan 20 20:53:59 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 pointer_record:               0
+      197 *** MESSAGE CONTENTS test-queue-file6.tmp ***
+      199 pointer_record:             573
+      573 regular_text: X-Virus-Scanned: hya
+      595 pointer_record:             779
+      779 regular_text: DKIM-Signature: hya
+      800 pointer_record:             674
+      674 regular_text: Domainkey-Signature: hya
+      700 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      762 pointer_record:             657
+      657 pointer_record:             261
+      261 regular_text:        id B85F1290407; Sat, 20 Jan 2007 20:53:59 -0500 (EST)
+      317 regular_text: From: me@porcupine.org
+      341 regular_text: To: you@porcupine.org
+      364 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      426 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      471 regular_text: Subject: hey!
+      486 padding: 0
+      489 pointer_record:               0
+      506 regular_text: 
+      508 regular_text: text
+      514 pointer_record:               0
+      531 *** HEADER EXTRACTED test-queue-file6.tmp ***
+      533 original_recipient: you@porcupine.org
+      552 recipient: you@porcupine.org
+      571 *** MESSAGE FILE END test-queue-file6.tmp ***
index aa1f16eacb5c83f26c119f3dd8536210c6fb54a6..ffc63a3e647265de1796a126c3c8997363ccf687 100644 (file)
@@ -1,31 +1,32 @@
 *** 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 ***
+        0 message_size:             332             199               1               0             332
+       81 message_arrival_time: Sat Jan 20 20:53:54 2007
+      100 create_time: Sat Jan 20 20:53:59 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 pointer_record:               0
+      197 *** MESSAGE CONTENTS test-queue-file7.tmp ***
+      199 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      261 regular_text:        id B85F1290407; Sat, 20 Jan 2007 20:53:59 -0500 (EST)
+      317 pointer_record:             679
+      679 regular_text: DKIM-Signature: hya
+      700 pointer_record:             636
+      636 regular_text: Domainkey-Signature: hya
+      662 pointer_record:             573
+      573 regular_text: X-Virus-Scanned: hya
+      595 regular_text: From: me@porcupine.org
+      619 pointer_record:             341
+      341 regular_text: To: you@porcupine.org
+      364 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      426 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      471 regular_text: Subject: hey!
+      486 padding: 0
+      489 pointer_record:               0
+      506 regular_text: 
+      508 regular_text: text
+      514 pointer_record:               0
+      531 *** HEADER EXTRACTED test-queue-file7.tmp ***
+      533 original_recipient: you@porcupine.org
+      552 recipient: you@porcupine.org
+      571 *** MESSAGE FILE END test-queue-file7.tmp ***
index 64ef7d1be4e39162f16aff0b95537e10034a09bf..5aadfd49348b36c76bbd9e31f66daf19d7835667 100644 (file)
@@ -1,33 +1,34 @@
 *** 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 ***
+        0 message_size:             332             199               1               0             332
+       81 message_arrival_time: Sat Jan 20 20:53:54 2007
+      100 create_time: Sat Jan 20 20:53:59 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 pointer_record:               0
+      197 *** MESSAGE CONTENTS test-queue-file8.tmp ***
+      199 pointer_record:             573
+      573 regular_text: inserted-at-1: hya
+      593 pointer_record:             672
+      672 regular_text: inserted-at-2: hya
+      692 pointer_record:             771
+      771 regular_text: inserted-at-3: hya
+      791 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      853 pointer_record:             754
+      754 pointer_record:             655
+      655 pointer_record:             261
+      261 regular_text:        id B85F1290407; Sat, 20 Jan 2007 20:53:59 -0500 (EST)
+      317 regular_text: From: me@porcupine.org
+      341 regular_text: To: you@porcupine.org
+      364 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      426 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      471 regular_text: Subject: hey!
+      486 padding: 0
+      489 pointer_record:               0
+      506 regular_text: 
+      508 regular_text: text
+      514 pointer_record:               0
+      531 *** HEADER EXTRACTED test-queue-file8.tmp ***
+      533 original_recipient: you@porcupine.org
+      552 recipient: you@porcupine.org
+      571 *** MESSAGE FILE END test-queue-file8.tmp ***
index 91cd7609128e2b24afaf02d69abb819865ca6552..9cfd626528f851fd2471add1582fe7f423dec7de 100644 (file)
@@ -1,32 +1,33 @@
 *** 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 ***
+        0 message_size:             332             199               1               0             332
+       81 message_arrival_time: Sat Jan 20 20:53:54 2007
+      100 create_time: Sat Jan 20 20:53:59 2007
+      124 named_attribute: rewrite_context=local
+      147 sender_fullname: Wietse Venema
+      162 sender: me@porcupine.org
+      180 pointer_record:               0
+      197 *** MESSAGE CONTENTS test-queue-file9.tmp ***
+      199 pointer_record:             573
+      573 regular_text: inserted-at-1: hya
+      593 regular_text: Received: by hades.porcupine.org (Postfix, from userid 1001)
+      655 pointer_record:             261
+      261 regular_text:        id B85F1290407; Sat, 20 Jan 2007 20:53:59 -0500 (EST)
+      317 pointer_record:             672
+      672 regular_text: inserted-at-3: hya
+      692 regular_text: From: me@porcupine.org
+      716 pointer_record:             733
+      733 regular_text: inserted-at-5: hya
+      753 pointer_record:             341
+      341 regular_text: To: you@porcupine.org
+      364 regular_text: Message-Id: <20060725192735.5EC2D29013F@hades.porcupine.org>
+      426 regular_text: Date: Tue, 25 Jul 2006 15:27:19 -0400 (EDT)
+      471 regular_text: Subject: hey!
+      486 padding: 0
+      489 pointer_record:               0
+      506 regular_text: 
+      508 regular_text: text
+      514 pointer_record:               0
+      531 *** HEADER EXTRACTED test-queue-file9.tmp ***
+      533 original_recipient: you@porcupine.org
+      552 recipient: you@porcupine.org
+      571 *** MESSAGE FILE END test-queue-file9.tmp ***
index 52d3211fbac6da608a24e452ece4795575fc98cd..a5c5bf68d718974096240117879b467aee34d934 100644 (file)
@@ -168,6 +168,7 @@ void    cleanup_out_header(CLEANUP_STATE *state, VSTRING *header_buf)
     char   *start = vstring_str(header_buf);
     char   *line;
     char   *next_line;
+    ssize_t line_len;
 
     /*
      * Prepend a tab to continued header lines that went through the address
@@ -181,17 +182,26 @@ void    cleanup_out_header(CLEANUP_STATE *state, VSTRING *header_buf)
      * 10%, we truncate between line boundaries to avoid losing too much
      * text. This "unkind cut" may result in syntax errors and may trigger
      * warnings from down-stream MTAs.
+     * 
+     * If Milter is enabled, pad a short header record with a dummy record so
+     * that a header record can safely be overwritten by a pointer record.
+     * This simplifies header modification enormously.
      */
     for (line = start; line; line = next_line) {
        next_line = split_at(line, '\n');
-       if ((next_line ? next_line - 1 : line + strlen(line))
-           > start + var_header_limit) {
+       line_len = next_line ? next_line - 1 - line : strlen(line);
+       if (line + line_len > start + var_header_limit) {
            if (line - start > 0.9 * var_header_limit)  /* nice cut */
                break;
            start[var_header_limit] = 0;        /* unkind cut */
            next_line = 0;
        }
-       if (line == start || IS_SPACE_TAB(*line)) {
+       if (line == start) {
+           cleanup_out_string(state, REC_TYPE_NORM, line);
+           if (line_len < REC_TYPE_PTR_PAYL_SIZE)
+               rec_pad(state->dst, REC_TYPE_DTXT,
+                       REC_TYPE_PTR_PAYL_SIZE - line_len);
+       } else if (IS_SPACE_TAB(*line)) {
            cleanup_out_string(state, REC_TYPE_NORM, line);
        } else {
            cleanup_out_format(state, REC_TYPE_NORM, "\t%s", line);
old mode 100755 (executable)
new mode 100644 (file)
index da59ed9..8412ae3
Binary files a/postfix/src/cleanup/test-queue-file and b/postfix/src/cleanup/test-queue-file differ
index f5a7b019439f505e567c3413c43de75ec4e6815d..27a9ec74649695c15e99e68745ab208673291ea4 100644 (file)
Binary files a/postfix/src/cleanup/test-queue-file10 and b/postfix/src/cleanup/test-queue-file10 differ
diff --git a/postfix/src/cleanup/test-queue-file12 b/postfix/src/cleanup/test-queue-file12
new file mode 100644 (file)
index 0000000..4979c1d
Binary files /dev/null and b/postfix/src/cleanup/test-queue-file12 differ
index f5a7b019439f505e567c3413c43de75ec4e6815d..27a9ec74649695c15e99e68745ab208673291ea4 100644 (file)
Binary files a/postfix/src/cleanup/test-queue-file2 and b/postfix/src/cleanup/test-queue-file2 differ
index f5a7b019439f505e567c3413c43de75ec4e6815d..27a9ec74649695c15e99e68745ab208673291ea4 100644 (file)
Binary files a/postfix/src/cleanup/test-queue-file3 and b/postfix/src/cleanup/test-queue-file3 differ
old mode 100755 (executable)
new mode 100644 (file)
index da59ed9..8412ae3
Binary files a/postfix/src/cleanup/test-queue-file4 and b/postfix/src/cleanup/test-queue-file4 differ
index dedead44c5bc0a2f00779fcad1e96f649d81e3ff..d7adfb42df7585f076e97fb50189c91592db4919 100644 (file)
Binary files a/postfix/src/cleanup/test-queue-file5 and b/postfix/src/cleanup/test-queue-file5 differ
index f5a7b019439f505e567c3413c43de75ec4e6815d..27a9ec74649695c15e99e68745ab208673291ea4 100644 (file)
Binary files a/postfix/src/cleanup/test-queue-file6 and b/postfix/src/cleanup/test-queue-file6 differ
index f5a7b019439f505e567c3413c43de75ec4e6815d..27a9ec74649695c15e99e68745ab208673291ea4 100644 (file)
Binary files a/postfix/src/cleanup/test-queue-file7 and b/postfix/src/cleanup/test-queue-file7 differ
index f5a7b019439f505e567c3413c43de75ec4e6815d..27a9ec74649695c15e99e68745ab208673291ea4 100644 (file)
Binary files a/postfix/src/cleanup/test-queue-file8 and b/postfix/src/cleanup/test-queue-file8 differ
index f5a7b019439f505e567c3413c43de75ec4e6815d..27a9ec74649695c15e99e68745ab208673291ea4 100644 (file)
Binary files a/postfix/src/cleanup/test-queue-file9 and b/postfix/src/cleanup/test-queue-file9 differ
index 0849455a59bd1ad890ab918a906ff70a6b3f2275..fba0852908574a61418632f2da83c5d5dad340bf 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      "20070119"
+#define MAIL_RELEASE_DATE      "20070121"
 #define MAIL_VERSION_NUMBER    "2.4"
 
 #ifdef SNAPSHOT
index 8ba87b43e052e1b7656853d730c0acf89a58adbe..1ce2111f17d3f028a6956b0fc4e33bcec5063b38 100644 (file)
@@ -58,7 +58,7 @@ REC_TYPE_NAME rec_type_names[] = {
     REC_TYPE_MESG, "message_content",
     REC_TYPE_CONT, "unterminated_text",
     REC_TYPE_NORM, "regular_text",
-    REC_TYPE_DTXT, "deleted_text",
+    REC_TYPE_DTXT, "padding",
     REC_TYPE_XTRA, "extracted_info",
     REC_TYPE_RRTO, "return_receipt",
     REC_TYPE_ERTO, "errors_to",
index 60aa64cc1f37a87eba08bc080a5f2c0e91c3ff86..80313b310a17730d6550cbcd48b8d93c4310eb32 100644 (file)
@@ -83,8 +83,8 @@
   * have to read all the queue file records before starting delivery. This is
   * often the case with list mail, where such optimization is desirable.
   */
-#define REC_TYPE_ENV_RECIPIENT "MDRO/Kon"
-#define REC_TYPE_EXT_RECIPIENT "EDRO/Kon"
+#define REC_TYPE_ENV_RECIPIENT "DRO/Kon"
+#define REC_TYPE_EXT_RECIPIENT "DRO/Kon"
 
  /*
   * The types of records that I expect to see while processing different
index 12dbac4ba022ff16752aad4a94b11c1b771f8510..b82548ce55e5ca17d3fbcb34a07e82f0bd7eb559 100644 (file)
 /*     VSTREAM *stream;
 /*     const char *where;
 /*
+/*     int     rec_pad(stream, type, len)
+/*     VSTREAM *stream;
+/*     int     type;
+/*     int     len;
+/*
 /*     REC_SPACE_NEED(buflen, reclen)
 /*     ssize_t buflen;
 /*     ssize_t reclen;
@@ -81,8 +86,8 @@
 /*     and REC_FLAG_DEFAULT for normal use.
 /*
 /*     rec_get() is a wrapper around rec_get_raw() that always
-/*     enables the REC_FLAG_FOLLOW_PTR and REC_FLAG_SKIP_DTXT
-/*     features.
+/*     enables the REC_FLAG_FOLLOW_PTR, REC_FLAG_SKIP_DTXT
+/*     and REC_FLAG_SEEK_END features.
 /*
 /*     rec_put() stores the specified record and returns the record
 /*     type, or REC_TYPE_ERROR in case of problems.
 /*     means do nothing. The result is REC_TYPE_ERROR in case of
 /*     failure.
 /*
+/*     rec_pad() writes a record that occupies the larger of (the
+/*     specified amount) or (an implementation-defined minimum).
+/*
 /*     REC_SPACE_NEED(buflen, reclen) converts the specified buffer
 /*     length into a record length. This macro modifies its second
 /*     argument.
@@ -380,3 +388,13 @@ int     rec_fputs(VSTREAM *stream, int type, const char *str)
 {
     return (rec_put(stream, type, str, str ? strlen(str) : 0));
 }
+
+/* rec_pad - write padding record */
+
+int     rec_pad(VSTREAM *stream, int type, int len)
+{
+    int     width = len - 2;           /* type + length */
+
+    return (rec_fprintf(stream, type, "%*s",
+                       width < 1 ? 1 : width, "0"));
+}
index fdbddf453b3fd242759ebb3cdb730ec61f8d6d23..472da46c93d674da7e365eab9ec4a2d0c2257ad2 100644 (file)
@@ -38,6 +38,7 @@ extern int rec_put_type(VSTREAM *, int, off_t);
 extern int PRINTFLIKE(3, 4) rec_fprintf(VSTREAM *, int, const char *,...);
 extern int rec_fputs(VSTREAM *, int, const char *);
 extern int rec_goto(VSTREAM *, const char *);
+extern int rec_pad(VSTREAM *, int, int);
 
 #define REC_PUT_BUF(v, t, b) rec_put((v), (t), vstring_str(b), VSTRING_LEN(b))