Fix continued-transport with LIMITS
[exim.git] / test / scripts / 4500-DKIM / 4500
1 # DKIM verify, simple canonicalisation
2 #
3 exim -DSERVER=server -DMSIZE='rsa=512 ed25519=250' -bd -oX PORT_D
4 ****
5 #
6 # (A)
7 # This should pass.
8 #  - sha1, 1024b
9 # Mail original in aux-fixed/4500.msg1.txt
10 # Sig generated by: perl aux-fixed/dkim/sign.pl --method=simple/simple < aux-fixed/4500.msg1.txt
11 # NB: simple canon does not affect tabs-vs-spaces in header continuation lines, which
12 # likely matters in the DKIM sig header.  Take care!
13 client 127.0.0.1 PORT_D
14 ??? 220
15 HELO xxx
16 ??? 250
17 MAIL FROM:<CALLER@bloggs.com>
18 ??? 250
19 RCPT TO:<a@test.ex>
20 ??? 250
21 DATA
22 ??? 354
23 DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=test.ex; h=from:to
24         :date:message-id:subject; s=sel; bh=OB9dZVu7+5/ufs3TH9leIcEpXSo=; b=
25         CoaRNB2Z59hSnhTzT8bYbMIN3P57XAVcFeV5oGEl4aKmhm6Mtu2uIc7B2z9k5+A/
26         +KFIE9HRj7eg9kPzagoPIvI84WE5PN5yRehMjJI6WqhM3V+bQDHkb8ubSmiaYxY5
27         B2Pd/kEGgHUlMDB0Hug4FMMt7GcFxagKspthOT/Pso0=
28 From: mrgus@test.ex
29 To: bakawolf@yahoo.com
30 Date: Thu, 19 Nov 2015 17:00:07 -0700
31 Message-ID: <qwerty1234@disco-zombie.net>
32 Subject: simple test
33
34 This is a simple test.
35 .
36 ??? 250
37 QUIT
38 ??? 221
39 ****
40 #
41 # (B)
42 # This should pass.
43 #  - sha1, 512b
44 # Mail original in aux-fixed/4500.msg1.txt
45 # Sig generated by: perl aux-fixed/dkim/sign.pl --method=simple/simple --selector=ses \
46 #                       --keyfile=aux-fixed/dkim/dkim512.private < aux-fixed/4500.msg1.txt
47 client 127.0.0.1 PORT_D
48 ??? 220
49 HELO xxx
50 ??? 250
51 MAIL FROM:<CALLER@bloggs.com>
52 ??? 250
53 RCPT TO:<a@test.ex>
54 ??? 250
55 DATA
56 ??? 354
57 DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=test.ex; h=from:to
58         :date:message-id:subject; s=ses; bh=OB9dZVu7+5/ufs3TH9leIcEpXSo=; b=
59         cIErF1eueIT9AU4qG54FyT3yrlVDDM7RZnuU6fWTevZpAuMqhYcRO8tU3U4vtKWB
60         +I2vd+F1gzqCzBcRtfLhZg==
61 From: mrgus@text.ex
62 To: bakawolf@yahoo.com
63 Date: Thu, 19 Nov 2015 17:00:07 -0700
64 Message-ID: <qwerty1234@disco-zombie.net>
65 Subject: simple test
66
67 This is a simple test.
68 .
69 ??? 250
70 QUIT
71 ??? 221
72 ****
73 #
74 # (C)
75 # This should pass.
76 #  - sha256, 1024b
77 # Mail original in aux-fixed/4500.msg1.txt
78 # Sig generated by: perl aux-fixed/dkim/sign.pl --algorithm=rsa-sha256 \
79 #                       --method=simple/simple < aux-fixed/4500.msg1.txt
80 client 127.0.0.1 PORT_D
81 ??? 220
82 HELO xxx
83 ??? 250
84 MAIL FROM:<CALLER@bloggs.com>
85 ??? 250
86 RCPT TO:<a@test.ex>
87 ??? 250
88 DATA
89 ??? 354
90 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=test.ex; h=from:to
91         :date:message-id:subject; s=sel; bh=3UbbJTudPxmejzh7U1Zg33U3QT+1
92         6kfV2eOTvMeiEis=; b=xQSD/JMqz0C+xKf0A1NTkPTbkDuDdJbpBuyjjT9iYvyP
93         Zez+xl0TkoPobFGVa6EN8+ZeYV18zjifhtWYLSsNmPinUtcpKQLG1zxAKmmS0JEh
94         +qihlWbeGJ5+tK588ugUzXHPj+4JBW0H6kxHvdH0l2SlQE5xs/cdggnx5QX5USY=
95 From: mrgus@text.ex
96 To: bakawolf@yahoo.com
97 Date: Thu, 19 Nov 2015 17:00:07 -0700
98 Message-ID: <qwerty1234@disco-zombie.net>
99 Subject: simple test
100
101 This is a simple test.
102 .
103 ??? 250
104 QUIT
105 ??? 221
106 ****
107 #
108 #
109 # (D)
110 # This should pass.  The pubkey dns decord has a additional sha1-only h= field
111 #
112 #  - sha1, 512b
113 # Mail original in aux-fixed/4500.msg1.txt
114 # Sig generated by: perl aux-fixed/dkim/sign.pl --keyfile=aux-fixed/dkim/dkim512.private \
115 #                       --method=simple/simple --selector=ses_sha1 < aux-fixed/4500.msg1.txt
116 client 127.0.0.1 PORT_D
117 ??? 220
118 HELO xxx
119 ??? 250
120 MAIL FROM:<CALLER@bloggs.com>
121 ??? 250
122 RCPT TO:<a@test.ex>
123 ??? 250
124 DATA
125 ??? 354
126 DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=test.ex; h=from:to
127         :date:message-id:subject; s=ses_sha1; bh=OB9dZVu7+5/ufs3TH9leIcE
128         pXSo=; b=hG14R3Eb/f13Pw6J0LmovHAL01KHVmVrTZ7KJrqieYTQemUaseoU2pB
129         7/g8NUwG/AsYoaw3gaAK8PqxSk2lcIQ==
130 From: mrgus@text.ex
131 To: bakawolf@yahoo.com
132 Date: Thu, 19 Nov 2015 17:00:07 -0700
133 Message-ID: <qwerty1234@disco-zombie.net>
134 Subject: simple test
135
136 This is a simple test.
137 .
138 ??? 250
139 QUIT
140 ??? 221
141 ****
142 #
143 #
144 killdaemon
145 #
146 # A verifier that refuses sha1
147 exim -DSERVER=server -DOPTION -DMSIZE='rsa=512 ed25519c=32' -bd -oX PORT_D
148 ****
149 #
150 # (E)
151 # This should fail despite being a passing submission above (with the unlimited verifier).
152 #  - sha1, 1024b
153 # Mail original in aux-fixed/4500.msg1.txt
154 # Sig generated by: perl aux-fixed/dkim/sign.pl --method=simple/simple < aux-fixed/4500.msg1.txt
155 client 127.0.0.1 PORT_D
156 ??? 220
157 HELO xxx
158 ??? 250
159 MAIL FROM:<CALLER@bloggs.com>
160 ??? 250
161 RCPT TO:<a@test.ex>
162 ??? 250
163 DATA
164 ??? 354
165 DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=test.ex; h=from:to
166         :date:message-id:subject; s=sel; bh=OB9dZVu7+5/ufs3TH9leIcEpXSo=; b=
167         PeUA8iBGfStWv+9/BBKkvCEYj/AVMl4e9k+AqWOXKyuEUfHxqAnV+sPnOejpmvT8
168         41kuM4u0bICvK371YvB/yO61vtliRhyqU76Y2e55p2uvMADb3UyDhLyzpco4+yBo
169         1w0AuIxu0VU4TK8UmOLyCw/1hxrh1DcEInbEMEKJ7kI=
170 From: mrgus@text.ex
171 To: bakawolf@yahoo.com
172 Date: Thu, 19 Nov 2015 17:00:07 -0700
173 Message-ID: <qwerty1234@disco-zombie.net>
174 Subject: simple test
175
176 This is a simple test.
177 .
178 ??? 250
179 QUIT
180 ??? 221
181 ****
182 killdaemon
183 #
184 #
185 #
186 #
187 #
188 #
189 # (F)
190 # With the default keysize minima, a 512b key should fail
191 exim -DSERVER=server -bd -oX PORT_D
192 ****
193 #  - sha1, 512b
194 # Mail original in aux-fixed/4500.msg1.txt
195 # Sig generated by: perl aux-fixed/dkim/sign.pl --method=simple/simple --selector=ses \
196 #                       --keyfile=aux-fixed/dkim/dkim512.private < aux-fixed/4500.msg1.txt
197 client 127.0.0.1 PORT_D
198 ??? 220
199 HELO xxx
200 ??? 250
201 MAIL FROM:<CALLER@bloggs.com>
202 ??? 250
203 RCPT TO:<a@test.ex>
204 ??? 250
205 DATA
206 ??? 354
207 DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=test.ex; h=from:to
208         :date:message-id:subject; s=ses; bh=OB9dZVu7+5/ufs3TH9leIcEpXSo=; b=
209         cIErF1eueIT9AU4qG54FyT3yrlVDDM7RZnuU6fWTevZpAuMqhYcRO8tU3U4vtKWB
210         +I2vd+F1gzqCzBcRtfLhZg==
211 From: mrgus@text.ex
212 To: bakawolf@yahoo.com
213 Date: Thu, 19 Nov 2015 17:00:07 -0700
214 Message-ID: <qwerty1234@disco-zombie.net>
215 Subject: simple test
216
217 This is a simple test.
218 .
219 ??? 250
220 QUIT
221 ??? 221
222 ****
223 #
224 #
225 # (G)
226 # Two signature, one pass one fail.  Checking for "at least one pass".
227 # Sigs from (F) and (C) above
228 client 127.0.0.1 PORT_D
229 ??? 220
230 HELO xxx
231 ??? 250
232 MAIL FROM:<CALLER@bloggs.com>
233 ??? 250
234 RCPT TO:<a@test.ex>
235 ??? 250
236 DATA
237 ??? 354
238 DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=test.ex; h=from:to
239         :date:message-id:subject; s=ses; bh=OB9dZVu7+5/ufs3TH9leIcEpXSo=; b=
240         cIErF1eueIT9AU4qG54FyT3yrlVDDM7RZnuU6fWTevZpAuMqhYcRO8tU3U4vtKWB
241         +I2vd+F1gzqCzBcRtfLhZg==
242 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=test.ex; h=from:to
243         :date:message-id:subject; s=sel; bh=3UbbJTudPxmejzh7U1Zg33U3QT+1
244         6kfV2eOTvMeiEis=; b=xQSD/JMqz0C+xKf0A1NTkPTbkDuDdJbpBuyjjT9iYvyP
245         Zez+xl0TkoPobFGVa6EN8+ZeYV18zjifhtWYLSsNmPinUtcpKQLG1zxAKmmS0JEh
246         +qihlWbeGJ5+tK588ugUzXHPj+4JBW0H6kxHvdH0l2SlQE5xs/cdggnx5QX5USY=
247 From: mrgus@text.ex
248 To: bakawolf@yahoo.com
249 Date: Thu, 19 Nov 2015 17:00:07 -0700
250 Message-ID: <qwerty1234@disco-zombie.net>
251 Subject: simple test
252
253 This is a simple test.
254 .
255 ??? 250
256 QUIT
257 ??? 221
258 ****
259 killdaemon
260 #
261 no_stdout_check
262 no_msglog_check