Testsuite: avoid using STARTTLS in a non-TLS testcase
[exim.git] / test / scripts / 4050-pipe-conn / 4052
1 # pipelined-connect, cache invalidation
2 #
3 #
4 # Not attempted without a cache entry
5 exim -bd -DSERVER=server -DCONNECTCOND=* -oX PORT_D
6 ****
7 #
8 exim nocache@test.ex
9 Subject test 1
10
11 ****
12 exim -DCONTROL=127.0.0.1 -q
13 ****
14 exim -DNOTDAEMON -DSERVER=server -q
15 ****
16 #
17 #
18 #
19 # Go for it. This one should do early-pipelinng.
20 exim hascache@test.ex
21 Subject test 2
22
23 ****
24 exim -DCONTROL=127.0.0.1 -q
25 ****
26 exim -DNOTDAEMON -DSERVER=server -q
27 ****
28 #
29 #
30 # Check that client doesn't try when the cache entry is too old
31 # It will however create a new entry
32 sleep 2
33 #
34 exim client_old@test.ex
35 Subject test 3
36
37 ****
38 exim -DRETRY=1s -DCONTROL=127.0.0.1 -q
39 ****
40 exim -DNOTDAEMON -DSERVER=server -q
41 ****
42 #
43 killdaemon
44 #
45 #
46 #
47 sudo rm DIR/spool/db/misc
48 #
49 # Check that the cache is invalidated on SMTP errors from the server for the banner
50 #
51 server PORT_D
52 >220 banner
53 <EHLO
54 >250-esmtp-resp
55 >250-PIPELINING
56 >250-X_PIPE_CONNECT
57 >250 ok
58 <MAIL
59 >250 mail-from accepted
60 <RCPT
61 >250 rcpt-to accepted
62 <DATA
63 >354 data go-ahead
64 .
65 >250 message accepted
66 <QUIT
67 >220 bye
68 *eof
69 ****
70 exim -DCONTROL=127.0.0.1 -odi nocache2@test.ex
71 body 2
72 ****
73 server PORT_D
74 >220 banner
75 <EHLO
76 >250-esmtp-resp
77 >250-PIPELINING
78 >250-X_PIPE_CONNECT
79 >250 ok
80 <MAIL
81 >250 mail-from accepted
82 <RCPT
83 >250 rcpt-to accepted
84 <DATA
85 >354 data go-ahead
86 .
87 >250 message accepted
88 <QUIT
89 >220 bye
90 *eof
91 ****
92 exim -DCONTROL=127.0.0.1 -odi withcache2@test.ex
93 body 2a
94 ****
95 server PORT_D
96 *sleep 2
97 <EHLO
98 <MAIL
99 <RCPT
100 <DATA
101 >450 sorry no banner for you today
102 >550 sync error
103 >550 sync error
104 >550 sync error
105 >550 sync error
106 <QUIT
107 >>220 bye
108 *eof
109 ****
110 exim -DCONTROL=127.0.0.1 -odi badbanner@test.ex
111 body 2b
112 ****
113 #
114 # Check that the cache is not invalidated on SMTP errors from the server after early-pipelining
115 #
116 server PORT_D
117 >220 banner
118 <EHLO
119 >250-esmtp-resp
120 >250-PIPELINING
121 >250-X_PIPE_CONNECT
122 >250 ok
123 <MAIL
124 >250 mail-from accepted
125 <RCPT
126 >250 rcpt-to accepted
127 <DATA
128 >354 data go-ahead
129 .
130 >250 message accepted
131 <QUIT
132 >220 bye
133 *eof
134 ****
135 exim -DCONTROL=127.0.0.1 -odi nocache3@test.ex
136 body
137 ****
138 server PORT_D
139 >220 banner
140 <EHLO
141 >250-esmtp-resp
142 >250-PIPELINING
143 >250-X_PIPE_CONNECT
144 >250 ok
145 <MAIL
146 >250 mail-from accepted
147 <RCPT
148 >250 rcpt-to accepted
149 <DATA
150 >354 data go-ahead
151 .
152 >250 message accepted
153 <QUIT
154 >220 bye
155 *eof
156 ****
157 exim -DCONTROL=127.0.0.1 -odi withcache3@test.ex
158 body
159 ****
160 server PORT_D
161 *sleep 2
162 <EHLO
163 <MAIL
164 <RCPT
165 <DATA
166 >220 banner
167 >250-esmtp-resp
168 >250-PIPELINING
169 >250-X_PIPE_CONNECT
170 >250 ok
171 >250 mail good
172 >250 rcpt good
173 >550 obscure data error
174 <QUIT
175 >>220 bye
176 *eof
177 ****
178 exim -DCONTROL=127.0.0.1 -odi baddata3@test.ex
179 body
180 ****
181 server PORT_D
182 *sleep 2
183 <EHLO
184 <MAIL
185 <RCPT
186 <DATA
187 >220 banner
188 >250-esmtp-resp
189 >250-PIPELINING
190 >250-X_PIPE_CONNECT
191 >250 ok
192 >250 mail good
193 >550 rcpt refused
194 >550 data cmd rejected - no valid recipient
195 <QUIT
196 >>220 bye
197 *eof
198 ****
199 exim -DCONTROL=127.0.0.1 -odi badrcpt3@test.ex
200 body
201 ****
202 server PORT_D
203 *sleep 2
204 <EHLO
205 <MAIL
206 <RCPT
207 <DATA
208 >220 banner
209 >250-esmtp-resp
210 >250-PIPELINING
211 >250-X_PIPE_CONNECT
212 >250 ok
213 >550 mail cmd refused
214 >550 rcpt cmd rejected - no valid mail
215 >550 data cmd rejected - no valid mail
216 <QUIT
217 >>220 bye
218 *eof
219 ****
220 exim -DCONTROL=127.0.0.1 -odi badmail3@test.ex
221 body
222 ****
223 server PORT_D
224 *sleep 2
225 >220 banner
226 <EHLO
227 >250-esmtp-resp
228 >250-PIPELINING
229 >250-X_PIPE_CONNECT
230 >250 ok
231 <MAIL
232 >250 mail-from accepted
233 <RCPT
234 >250 rcpt-to accepted
235 <DATA
236 >354 data go-ahead
237 .
238 >250 message accepted
239 <QUIT
240 >220 bye
241 *eof
242 ****
243 exim -DCONTROL=127.0.0.1 -odi withcache23@test.ex
244 body
245 ****
246 #
247 #
248 # Check that the cache is updated on a change of advertised extensions
249 # The conn will be made pipelined anyway (because we don't find out early)
250 # but it's the DB dump that matters. Unfortunately the dump doesn't show
251 # us the (binary) record content, only the key. So you need to look at the
252 # debug output after all.
253 # This server offers SIZE where the previous did not; we should see in
254 # test-stderr a line "EHLO cleartext extensions changed" then another
255 # "writing clr 0160/0000 cry 0000/0000"
256 server PORT_D 1
257 >220 banner
258 <EHLO
259 >250-esmtp-resp
260 >250-PIPELINING
261 >250-X_PIPE_CONNECT
262 >250-SIZE
263 >250 ok
264 <MAIL
265 >250 mail-from accepted
266 <RCPT
267 >250 rcpt-to accepted
268 <DATA
269 >354 data go-ahead
270 .
271 >250 message accepted
272 <QUIT
273 >220 bye
274 *eof
275 ****
276 exim -d-all+transport -DCONTROL=127.0.0.1 -odi extchange@test.ex
277 body
278 ****
279 dump misc
280 #
281 no_msglog_check