Check for lost connection or unexpected input at end of message.
[exim.git] / test / scripts / 0000-Basic / 0300
CommitLineData
59371ea7
PH
1# SMTP synchronization checks, with and without PIPELINING
2need_ipv4
3#
4exim -DSERVER=server -bd -oX PORT_D
5****
6client 127.0.0.1 PORT_D
7??? 220
8ehlo abcd\r\nmail from:<userx@test.ex>
9??? 554
10****
11# The pause (+++ 1) in the middle of this is to be sure the first message is
12# delivered before generating the sync error; without it, there's a race.
13client 127.0.0.1 PORT_D
14??? 220
15ehlo abcd
16??? 250-
17??? 250-
18??? 250-
19??? 250
20rset\r\nmail from:<userx@test.ex>\r\nrcpt to:<userx@test.ex>\r\ndata
21??? 250
22??? 250
23??? 250
24??? 354
25the message
58eb016e 26.
59371ea7 27+++ 1
58eb016e 28mail from:<userx@test.ex>
59371ea7
PH
29rcpt to:<userx@test.ex>\r\ndata\r\nthe message\r\nsecond line
30??? 250
31??? 250
32??? 250
33??? 554
34****
35sleep 1
36# This time, don't send EHLO
37client 127.0.0.1 PORT_D
38??? 220
39helo abcd
40??? 250
41mail from:<userx@test.ex>\r\nrcpt to:<userx@test.ex>
42??? 554
43****
44# This shouldn't get advertised pipelining
45client HOSTIPV4 PORT_D
46??? 220
47ehlo abcd
48??? 250-
49??? 250-
50??? 250
51mail from:<userx@test.ex>\r\nrcpt to:<userx@test.ex>
52??? 554
53****
54# Check on unrecognized commands
55client HOSTIPV4 PORT_D
56??? 220
57junk0
58??? 500
59junk1\r\njunk2
60??? 554
61****
62# Check on RSET and QUIT
63client 127.0.0.1 PORT_D
64??? 220
65ehlo abcd
66??? 250-
67??? 250-
68??? 250-
69??? 250
70rset\r\nquit
71??? 250
72??? 221
73****
74# Check on RSET and QUIT
75client HOSTIPV4 PORT_D
76??? 220
77ehlo abcd
78??? 250-
79??? 250-
80??? 250
81rset\r\nquit
82??? 554
83****
84# This one disables the check dynamically
85client 127.0.0.1 PORT_D
86??? 220
87ehlo dis.able
88??? 250-
89??? 250-
90??? 250-
91??? 250
92mail from:<userx@test.ex>\r\nrcpt to:<userx@test.ex>\r\ndata\r\nthe message\r\nsecond line
93.
94??? 250
95??? 250
96??? 354
97??? 250
98quit
99??? 221
100****
101killdaemon
102# In these next tests, PIPELINING is not advertised, and the server delays for
103# 1s before trying to send the banner to give the client time to send input.
104exim -DPAH= -DDELAY=1s -DSERVER=server -bd -oX PORT_D
105****
106# Send HELO without waiting for greeting
107client -t2 127.0.0.1 PORT_D
108helo abcd
109??? 554
110****
111# Disconnect without waiting for the greeting. This should
112# test the check for input that happens before sending the
113# banner (there was a bug at one point; missing error check).
114client -t2 127.0.0.1 PORT_D
115****
116killdaemon