summaryrefslogtreecommitdiff
path: root/test/scripts/4000-scanning/4003
blob: d9849c3413077d065f6d0ac6e788cbba00659b86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# content scan interface: spamassassin
#
# The spooled file for scanning includes the test-runner's user name
# hence size varies.  Munge that.
munge scanfile_size
#
#
# A good-comms test, returning not-spam.
# (we could use a second one that returns is-spam...)
server 7833
<REPORT SPAMC
<User:
<Content-length:
<
<From
<X-Envelope-From
<X-Envelope-To
<Received:
<	by
<	(envelope
<	id
<	for
<Content-type: text/plain
<Message-Id:
<From:
<Date:
<
<test
>SPAMD/1.1 0 EX_OK
>Spam: False ; 4.5 / 5.0
>
>Spam detection software, running on the system "demo",
>has NOT identified this incoming email as spam.  The original
>message has been attached to this so you can view it or label
>similar future email.  If you have any questions, see
>@@CONTACT_ADDRESS@@ for details.
>
>Content preview:  test [...]
>
>Content analysis details:   (4.5 points, 5.0 required)
>
> pts rule name              description
>---- ---------------------- --------------------------------------------------
>-1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
> 1.2 MISSING_HEADERS        Missing To: header
> 1.0 MISSING_FROM           Missing From: header
> 1.8 MISSING_SUBJECT        Missing Subject: header
> 1.4 MISSING_DATE           Missing Date: header
> 0.1 MISSING_MID            Missing Message-Id: header
>
*eof
****
exim -odi -oMt fromuser -bs
ehlo test.ex
mail from:<fromuser@myhost.test.ex>
rcpt to:<userx@test.ex>
data
Content-type: text/plain

test
.
quit
****
#
#
#
#
# Server spec line with timeout option, not exercised
# (could we cut down the massive content?)
server 7833
<REPORT SPAMC
<User:
<Content-length:
<
<From
<X-Envelope-From
<X-Envelope-To
<Received:
<	by
<	(envelope
<	id
<	for
<Content-type: text/plain
<Message-Id:
<From:
<Date:
<
<test
>SPAMD/1.1 0 EX_OK
>Spam: False ; 4.5 / 5.0
>
>Spam detection software, running on the system "demo",
>has NOT identified this incoming email as spam.  The original
>message has been attached to this so you can view it or label
>similar future email.  If you have any questions, see
>@@CONTACT_ADDRESS@@ for details.
>
>Content preview:  test [...]
>
>Content analysis details:   (4.5 points, 5.0 required)
>
> pts rule name              description
>---- ---------------------- --------------------------------------------------
>-1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
> 1.2 MISSING_HEADERS        Missing To: header
> 1.0 MISSING_FROM           Missing From: header
> 1.8 MISSING_SUBJECT        Missing Subject: header
> 1.4 MISSING_DATE           Missing Date: header
> 0.1 MISSING_MID            Missing Message-Id: header
>
*eof
****
exim -odi -oMt fromuser -bs -DOPT='127.0.0.1 7833 retry=10s'
ehlo test.ex
mail from:<fromuser@myhost.test.ex>
rcpt to:<userx@test.ex>
data
Content-type: text/plain

test
.
quit
****
#
#
#
# Server spec line with timeout option, exercised
server -i 2 7833
<REPORT SPAMC
<User:
<Content-length:
<
<From
<X-Envelope-From
<X-Envelope-To
<Received:
<	by
<	(envelope
<	id
<	for
<Content-type: text/plain
<Message-Id:
<From:
<Date:
<
<test
>SPAMD/1.1 0 EX_OK
>Spam: False ; 4.5 / 5.0
>
>Spam detection software, running on the system "demo",
>has NOT identified this incoming email as spam.  The original
>message has been attached to this so you can view it or label
>similar future email.  If you have any questions, see
>@@CONTACT_ADDRESS@@ for details.
>
>Content preview:  test [...]
>
>Content analysis details:   (4.5 points, 5.0 required)
>
> pts rule name              description
>---- ---------------------- --------------------------------------------------
>-1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
> 1.2 MISSING_HEADERS        Missing To: header
> 1.0 MISSING_FROM           Missing From: header
> 1.8 MISSING_SUBJECT        Missing Subject: header
> 1.4 MISSING_DATE           Missing Date: header
> 0.1 MISSING_MID            Missing Message-Id: header
>
*eof
****
exim -odi -oMt fromuser -bs -DOPT='127.0.0.1 7833 retry=4s'
ehlo test.ex
mail from:<fromuser@myhost.test.ex>
rcpt to:<userx@test.ex>
data
Content-type: text/plain

test
.
quit
****
#
#
#
# Multiple servers, prioritised, with timeout spec; first one fails
# List separator changed
server 7833
<REPORT SPAMC
<User:
<Content-length:
<
<From
<X-Envelope-From
<X-Envelope-To
<Received:
<	by
<	(envelope
<	id
<	for
<Content-type: text/plain
<Message-Id:
<From:
<Date:
<
<test
>SPAMD/1.1 0 EX_OK
>Spam: False ; 4.5 / 5.0
>
>Spam detection software, running on the system "demo",
>has NOT identified this incoming email as spam.  The original
>message has been attached to this so you can view it or label
>similar future email.  If you have any questions, see
>@@CONTACT_ADDRESS@@ for details.
>
>Content preview:  test [...]
>
>Content analysis details:   (4.5 points, 5.0 required)
>
> pts rule name              description
>---- ---------------------- --------------------------------------------------
>-1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
> 1.2 MISSING_HEADERS        Missing To: header
> 1.0 MISSING_FROM           Missing From: header
> 1.8 MISSING_SUBJECT        Missing Subject: header
> 1.4 MISSING_DATE           Missing Date: header
> 0.1 MISSING_MID            Missing Message-Id: header
>
*eof
****
exim -odi -oMt fromuser -bs -DOPT='<; 127.0.0.1 7833 ; HOSTIPV4 7834 pri=2 tmo=2s'
ehlo test.ex
mail from:<fromuser@myhost.test.ex>
rcpt to:<userx@test.ex>
data
Content-type: text/plain

test
.
quit
****
#
#