summaryrefslogtreecommitdiff
path: root/test/scripts/4050-pipe-conn/4052
blob: c85fb5b085043af00793d1bf38d4723a953d5fcb (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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# pipelined-connect, cache invalidation
#
#
# Not attempted without a cache entry
exim -bd -DSERVER=server -DCONNECTCOND=* -oX PORT_D
****
#
exim nocache@test.ex
Subject test 1

****
exim -DCONTROL=127.0.0.1 -q
****
exim -DNOTDAEMON -DSERVER=server -q
****
#
#
#
# Go for it.  This one should do early-pipelinng.
exim hascache@test.ex
Subject test 2

****
exim -DCONTROL=127.0.0.1 -q
****
exim -DNOTDAEMON -DSERVER=server -q
****
#
#
# Check that client doesn't try when the cache entry is too old
# It will however create a new entry
sleep 2
#
exim client_old@test.ex
Subject test 3

****
exim -DRETRY=1s -DCONTROL=127.0.0.1 -q
****
exim -DNOTDAEMON -DSERVER=server -q
****
#
killdaemon
#
#
#
sudo rm DIR/spool/db/misc
#
# Check that the cache is invalidated on SMTP errors from the server for the banner
#
server PORT_D
>220 banner
<EHLO
>250-esmtp-resp
>250-PIPELINING
>250-X_PIPE_CONNECT
>250 ok
<MAIL
>250 mail-from accepted
<RCPT
>250 rcpt-to accepted
<DATA
>354 data go-ahead
.
>250 message accepted
<QUIT
>220 bye
*eof
****
exim -DCONTROL=127.0.0.1 -odi nocache2@test.ex
body 2
****
server PORT_D
>220 banner
<EHLO
>250-esmtp-resp
>250-PIPELINING
>250-X_PIPE_CONNECT
>250 ok
<MAIL
>250 mail-from accepted
<RCPT
>250 rcpt-to accepted
<DATA
>354 data go-ahead
.
>250 message accepted
<QUIT
>220 bye
*eof
****
exim -DCONTROL=127.0.0.1 -odi withcache2@test.ex
body 2a
****
server PORT_D
*sleep 2
<EHLO
<MAIL
<RCPT
<DATA
>450 sorry no banner for you today
>550 sync error
>550 sync error
>550 sync error
>550 sync error
<QUIT
>>220 bye
*eof
****
exim -DCONTROL=127.0.0.1 -odi badbanner@test.ex
body 2b
****
#
# Check that the cache is not invalidated on SMTP errors from the server after early-pipelining
#
server PORT_D
>220 banner
<EHLO
>250-esmtp-resp
>250-PIPELINING
>250-X_PIPE_CONNECT
>250 ok
<MAIL
>250 mail-from accepted
<RCPT
>250 rcpt-to accepted
<DATA
>354 data go-ahead
.
>250 message accepted
<QUIT
>220 bye
*eof
****
exim -DCONTROL=127.0.0.1 -odi nocache3@test.ex
body
****
server PORT_D
>220 banner
<EHLO
>250-esmtp-resp
>250-PIPELINING
>250-X_PIPE_CONNECT
>250 ok
<MAIL
>250 mail-from accepted
<RCPT
>250 rcpt-to accepted
<DATA
>354 data go-ahead
.
>250 message accepted
<QUIT
>220 bye
*eof
****
exim -DCONTROL=127.0.0.1 -odi withcache3@test.ex
body
****
server PORT_D
*sleep 2
<EHLO
<MAIL
<RCPT
<DATA
>220 banner
>250-esmtp-resp
>250-PIPELINING
>250-X_PIPE_CONNECT
>250 ok
>250 mail good
>250 rcpt good
>550 obscure data error
<QUIT
>>220 bye
*eof
****
exim -DCONTROL=127.0.0.1 -odi baddata3@test.ex
body
****
server PORT_D
*sleep 2
<EHLO
<MAIL
<RCPT
<DATA
>220 banner
>250-esmtp-resp
>250-PIPELINING
>250-X_PIPE_CONNECT
>250 ok
>250 mail good
>550 rcpt refused
>550 data cmd rejected - no valid recipient
<QUIT
>>220 bye
*eof
****
exim -DCONTROL=127.0.0.1 -odi badrcpt3@test.ex
body
****
server PORT_D
*sleep 2
<EHLO
<MAIL
<RCPT
<DATA
>220 banner
>250-esmtp-resp
>250-PIPELINING
>250-X_PIPE_CONNECT
>250 ok
>550 mail cmd refused
>550 rcpt cmd rejected - no valid mail
>550 data cmd rejected - no valid mail
<QUIT
>>220 bye
*eof
****
exim -DCONTROL=127.0.0.1 -odi badmail3@test.ex
body
****
server PORT_D
*sleep 2
>220 banner
<EHLO
>250-esmtp-resp
>250-PIPELINING
>250-X_PIPE_CONNECT
>250 ok
<MAIL
>250 mail-from accepted
<RCPT
>250 rcpt-to accepted
<DATA
>354 data go-ahead
.
>250 message accepted
<QUIT
>220 bye
*eof
****
exim -DCONTROL=127.0.0.1 -odi withcache23@test.ex
body
****
#
#
# Check that the cache is updated on a change of advertised extensions
# The conn will be made pipelined anyway (because we don't find out early)
# but it's the DB dump that matters.  Unfortunately the dump doesn't show
# us the (binary) record content, only the key.  So you need to look at the
# debug output after all.
server PORT_D 1
>220 banner
<EHLO
>250-esmtp-resp
>250-PIPELINING
>250-X_PIPE_CONNECT
>250-STARTTLS
>250 ok
<MAIL
>250 mail-from accepted
<RCPT
>250 rcpt-to accepted
<DATA
>354 data go-ahead
.
>250 message accepted
<QUIT
>220 bye
*eof
****
exim -d-all+transport -DCONTROL=127.0.0.1 -odi extchange@test.ex
body
****
dump misc
#
no_msglog_check