3 # Tests to see if bursting MIME messages works correctly.
9 # Create a one-part test message that we can burst
13 msgnum="${msgpath##*/}"
16 From: Test Burst Message <burst1@example.com>
17 To: Test Recipient <recipient@example.com>
18 Date: Friday, 29 Sep 2006 00:00:00
19 Subject: Test MIME digest
21 Content-type: message/rfc822
23 From: Mister Burster <burst2@example.com>
24 To: Nobody 1 <nobody1@example.com>
25 Date: Thursday, 28 Sep 2006 00:01:00
28 - - This line should not be unstuffed
32 runandcheck "burst $msgnum" <<!
33 burst: message 11 not in digest format, continuing...
36 runandcheck "scan $msgnum-l" <<!
37 11 2006-09-29 00:00 Test Burst Messag Test MIME digest
41 # Create another test message that does multipart/digest checking
45 msgnum="${msgpath##*/}"
47 cat > "$msgpath" <<EOF
48 From: Test Burst Message <burst1@example.com>
49 To: Test Recipient <recipient@example.com>
50 Date: Friday, 29 Sep 2006 00:00:00
53 Content-Type: multipart/digest; boundary="----- =_aaaaaaaaaa0"
59 Content-Type: message/rfc822
61 From: Mister Burster <burst2@example.com>
62 To: Nobody 1 <nobody1@example.com>
63 Date: Thursday, 28 Sep 2006 00:01:00
66 - -This is message one
70 From: Mister Burster <burst3@example.com>
71 To: Nobody 2 <nobody2@example.com>
72 Date: Thursday, 28 Sep 2006 00:02:00
80 From: Mister Burster <burst4@example.com>
81 To: Nobody 3 <nobody3@example.com>
82 Date: Thursday, 28 Sep 2006 00:03:00
83 Subject: Message three
87 ------- =_aaaaaaaaaa0--
91 runandcheck "burst $msgnum" <<!
94 runandcheck "scan $msgnum-l" <<!
95 12 2006-09-29 00:00 Test Burst Messag Test digest
96 13+ `date +'%Y-%m-%d %H:%M'`
97 14 2006-09-28 00:02 Mister Burster Message two
98 15 2006-09-28 00:03 Mister Burster Message three
102 # Check to see if each message is what we expect
105 folder -fast "$msgnum" >/dev/null
107 runandcheck "next" <<!
109 part message/rfc822 157
110 Date: Thu, 28 Sep 2006 00:01:00
111 From: Mister Burster <burst2@example.com>
112 To: Nobody 1 <nobody1@example.com>
119 runandcheck "next" <<!
120 Date: Thu, 28 Sep 2006 00:02:00
121 From: Mister Burster <burst3@example.com>
122 To: Nobody 2 <nobody2@example.com>
131 # The CR/LF that appears right before the boundary line is considered part
132 # of the boundary line, so this has the practical effect of "eating" a
133 # blank line if it's before the boundary (RFC 2046. 5.1.1). So make sure
134 # a double blank line results in only one blank line at the end of a message.
137 runandcheck "next" <<!
138 Date: Thu, 28 Sep 2006 00:03:00
139 From: Mister Burster <burst4@example.com>
140 To: Nobody 3 <nobody3@example.com>
141 Subject: Message three