Logging: disable the verbose DKIM verification line by default; add a tag to <= lines.
[exim.git] / test / scripts / 4500-DKIM / 4506
CommitLineData
2a27d0e4
JH
1# DKIM verify, errors
2#
02c4f8fb 3exim -DSERVER=server -bd -oX PORT_D
2a27d0e4
JH
4****
5#
6# This should fail verify (missing header hash in sig header)
7# - sha1, 1024b
8# Mail original in aux-fixed/4500.msg1.txt
9# Sig generated by: perl aux-fixed/dkim/sign.pl --method=simple/simple < aux-fixed/4500.msg1.txt
10client 127.0.0.1 PORT_D
11??? 220
12HELO xxx
13??? 250
14MAIL FROM:<CALLER@bloggs.com>
15??? 250
16RCPT TO:<a@test.ex>
17??? 250
18DATA
19??? 354
20DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=test.ex; h=from:to
21 :date:message-id:subject; s=sel; bh=OB9dZVu7+5/ufs3TH9leIcEpXSo=;
22From: mrgus@text.ex
23To: bakawolf@yahoo.com
24Date: Thu, 19 Nov 2015 17:00:07 -0700
25Message-ID: <qwerty1234@disco-zombie.net>
26Subject: simple test
27
28This is a simple test.
29.
30??? 250
31QUIT
32??? 221
33****
34#
35#
36# This should fail verify (missing body hash in sig header)
37# - sha1, 1024b
38# Mail original in aux-fixed/4500.msg1.txt
39# Sig generated by: perl aux-fixed/dkim/sign.pl --method=simple/simple < aux-fixed/4500.msg1.txt
40client 127.0.0.1 PORT_D
41??? 220
42HELO xxx
43??? 250
44MAIL FROM:<CALLER@bloggs.com>
45??? 250
46RCPT TO:<a@test.ex>
47??? 250
48DATA
49??? 354
50DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=test.ex; h=from:to
51 :date:message-id:subject; s=sel; b=
52 PeUA8iBGfStWv+9/BBKkvCEYj/AVMl4e9k+AqWOXKyuEUfHxqAnV+sPnOejpmvT8
53 41kuM4u0bICvK371YvB/yO61vtliRhyqU76Y2e55p2uvMADb3UyDhLyzpco4+yBo
54 1w0AuIxu0VU4TK8UmOLyCw/1hxrh1DcEInbEMEKJ7kI=
55From: mrgus@text.ex
56To: bakawolf@yahoo.com
57Date: Thu, 19 Nov 2015 17:00:07 -0700
58Message-ID: <qwerty1234@disco-zombie.net>
59Subject: simple test
60
61This is a simple test.
62.
63??? 250
64QUIT
65??? 221
66****
67#
68#
69# This should fail verify (missing body)
70# - sha1, 1024b
71# Mail original in aux-fixed/4500.msg1.txt
72# Sig generated by: perl aux-fixed/dkim/sign.pl --method=simple/simple < aux-fixed/4500.msg1.txt
73client 127.0.0.1 PORT_D
74??? 220
75HELO xxx
76??? 250
77MAIL FROM:<CALLER@bloggs.com>
78??? 250
79RCPT TO:<a@test.ex>
80??? 250
81DATA
82??? 354
83DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=test.ex; h=from:to
84 :date:message-id:subject; s=sel; bh=OB9dZVu7+5/ufs3TH9leIcEpXSo=; b=
85 PeUA8iBGfStWv+9/BBKkvCEYj/AVMl4e9k+AqWOXKyuEUfHxqAnV+sPnOejpmvT8
86 41kuM4u0bICvK371YvB/yO61vtliRhyqU76Y2e55p2uvMADb3UyDhLyzpco4+yBo
87 1w0AuIxu0VU4TK8UmOLyCw/1hxrh1DcEInbEMEKJ7kI=
88From: mrgus@text.ex
89To: bakawolf@yahoo.com
90Date: Thu, 19 Nov 2015 17:00:07 -0700
91Message-ID: <qwerty1234@disco-zombie.net>
92Subject: simple test
93.
94??? 250
95QUIT
96??? 221
97****
98#
99#
100#
b9df1829
JH
101# This should refuse to do verification (over-long body line)
102# The sig is bogus, but we don't verify it
103write test-data 1x16386
104++++
105****
106#
107client 127.0.0.1 PORT_D
108??? 220
109HELO xxx
110??? 250
111MAIL FROM:<CALLER@bloggs.com>
112??? 250
113RCPT TO:<a@test.ex>
114??? 250
115DATA
116??? 354
117DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=test.ex; h=from:to
118 :date:message-id:subject; s=sel; bh=OB9dZVu7+5/ufs3TH9leIcEpXSo=; b=
119 PeUA8iBGfStWv+9/BBKkvCEYj/AVMl4e9k+AqWOXKyuEUfHxqAnV+sPnOejpmvT8
120 41kuM4u0bICvK371YvB/yO61vtliRhyqU76Y2e55p2uvMADb3UyDhLyzpco4+yBo
121 1w0AuIxu0VU4TK8UmOLyCw/1hxrh1DcEInbEMEKJ7kI=
122From: mrgus@text.ex
123To: bakawolf@yahoo.com
124Date: Thu, 19 Nov 2015 17:00:07 -0700
125Message-ID: <qwerty1234@disco-zombie.net>
126Subject: simple test
127
128<<< test-data
129another data line
130.
131??? 250
132QUIT
133??? 221
134****
2a27d0e4
JH
135#
136#
135e9496
JH
137# This should fail as the sig on the mail uses sha1 but the dns record requires sha256
138#
139# - sha256, 512b
140# Mail original in aux-fixed/4500.msg1.txt
141# Sig generated by: perl aux-fixed/dkim/sign.pl --keyfile=aux-fixed/dkim/dkim512.private \
142# --method=simple/simple --selector=ses_sha1 < aux-fixed/4500.msg1.txt
143# and then modifying the s= manually
144client 127.0.0.1 PORT_D
145??? 220
146HELO xxx
147??? 250
148MAIL FROM:<CALLER@bloggs.com>
149??? 250
150RCPT TO:<a@test.ex>
151??? 250
152DATA
153??? 354
154DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=test.ex; h=from:to
155 :date:message-id:subject; s=ses_sha256; bh=OB9dZVu7+5/ufs3TH9leIcE
156 pXSo=; b=hG14R3Eb/f13Pw6J0LmovHAL01KHVmVrTZ7KJrqieYTQemUaseoU2pB
157 7/g8NUwG/AsYoaw3gaAK8PqxSk2lcIQ==
158From: mrgus@text.ex
159To: bakawolf@yahoo.com
160Date: Thu, 19 Nov 2015 17:00:07 -0700
161Message-ID: <qwerty1234@disco-zombie.net>
162Subject: simple test
163
ce93c6d8
JH
164This is a simple test.
165.
166??? 250
167QUIT
168??? 221
169****
170killdaemon
171#
172#
173# See what happens when we do a DNS lookup from the DKIM ACL
174exim -DSERVER=server -DBAD=bad -bd -oX PORT_D
175****
176# This should fail verify (missing header hash in sig header)
177# - sha1, 1024b
178# Mail original in aux-fixed/4500.msg1.txt
179# Sig generated by: perl aux-fixed/dkim/sign.pl --method=simple/simple < aux-fixed/4500.msg1.txt
180client 127.0.0.1 PORT_D
181??? 220
182HELO xxx
183??? 250
184MAIL FROM:<CALLER@bloggs.com>
185??? 250
186RCPT TO:<a@test.ex>
187??? 250
188DATA
189??? 354
190DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=test.ex; h=from:to
191 :date:message-id:subject; s=sel; bh=OB9dZVu7+5/ufs3TH9leIcEpXSo=;
192From: mrgus@text.ex
193To: bakawolf@yahoo.com
194Date: Thu, 19 Nov 2015 17:00:07 -0700
195Message-ID: <qwerty1234@disco-zombie.net>
196Subject: simple test
197
135e9496
JH
198This is a simple test.
199.
200??? 250
201QUIT
202??? 221
203****
204#
205#
2a27d0e4 206killdaemon
2c47372f
JH
207#
208#
209# A deny return from the dkim ACL should reject the message
210exim -DSERVER=server -DSTRICT=y -bd -oX PORT_D
211****
212# This should fail verify (missing header hash in sig header)
213# - sha1, 1024b
214# Mail original in aux-fixed/4500.msg1.txt
215# Sig generated by: perl aux-fixed/dkim/sign.pl --method=simple/simple < aux-fixed/4500.msg1.txt
216client 127.0.0.1 PORT_D
217??? 220
218HELO xxx
219??? 250
220MAIL FROM:<shouldfail@bloggs.com>
221??? 250
222RCPT TO:<a@test.ex>
223??? 250
224DATA
225??? 354
226DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=test.ex; h=from:to
227 :date:message-id:subject; s=sel; bh=OB9dZVu7+5/ufs3TH9leIcEpXSo=;
228From: mrgus@text.ex
229To: bakawolf@yahoo.com
230Date: Thu, 19 Nov 2015 17:00:07 -0700
231Message-ID: <qwerty1234@disco-zombie.net>
232Subject: simple test
233
234This is a simple test.
235.
236??? 550
237QUIT
238??? 221
239****
240#
241#
242killdaemon
2a27d0e4
JH
243no_stdout_check
244no_msglog_check