diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2022-05-26 20:11:43 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2022-05-26 20:11:43 +0100 |
commit | 315206fbf2d75c73de73deab89443ab645d96525 (patch) | |
tree | 7b2b7b2ea7a044f82719b883dee2269a9813d399 /test | |
parent | 462e2cd30639a1b0e9c7d9d08d70e124a147531b (diff) |
CHUNKING: handle protocol errors during reception
Diffstat (limited to 'test')
-rw-r--r-- | test/log/0900 | 3 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0900 | 27 | ||||
-rw-r--r-- | test/stdout/0900 | 42 |
3 files changed, 69 insertions, 3 deletions
diff --git a/test/log/0900 b/test/log/0900 index bab750609..f91741a43 100644 --- a/test/log/0900 +++ b/test/log/0900 @@ -13,5 +13,6 @@ 2017-07-30 18:51:05.712 H=(tester) [127.0.0.1] F=<someone@some.domain> rejected RCPT <dummy@reject.ex>: relay not permitted 2017-07-30 18:51:05.712 H=(tester) [127.0.0.1] F=<some3ne@some.domain> rejected RCPT <dummy@reject.ex>: relay not permitted 2017-07-30 18:51:05.712 H=(tester) [127.0.0.1] F=<some4ne@some.domain> rejected RCPT <dummy@reject.ex>: relay not permitted +2017-07-30 18:51:05.712 10HmbE-0005vi-00 <= some6ne@some.domain H=(tester) [127.0.0.1] P=esmtp K S=sss for CALLER@test.ex 2017-07-30 18:51:05.712 rejected from <someone@some.domain> H=(tester) [127.0.0.1]: Non-CRLF-terminated header, under CHUNKING: message abandoned -2017-07-30 18:51:05.712 10HmbE-0005vi-00 <= someone@some.domain H=(tester) [127.0.0.1] P=esmtp K S=sss for CALLER@test.ex +2017-07-30 18:51:05.712 10HmbF-0005vi-00 <= someone@some.domain H=(tester) [127.0.0.1] P=esmtp K S=sss for CALLER@test.ex diff --git a/test/scripts/0000-Basic/0900 b/test/scripts/0000-Basic/0900 index a8d2b0539..4edc82952 100644 --- a/test/scripts/0000-Basic/0900 +++ b/test/scripts/0000-Basic/0900 @@ -260,7 +260,7 @@ quit ??? 221 **** # -# Two rejected messages, pipielined, REST between +# Two rejected messages, pipielined, RSET between client 127.0.0.1 PORT_D ??? 220 EHLO tester @@ -296,6 +296,31 @@ quit ??? 221 **** # +# Two messages, pipielined, 1st abandoned midway, RSET between +client 127.0.0.1 PORT_D +??? 220 +EHLO tester +??? 250- +??? 250-SIZE +??? 250-8BITMIME +??? 250-PIPELINING +??? 250-CHUNKING +??? 250 HELP +MAIL FROM:<some5ne@some.domain>\r\nRCPT TO:<CALLER@test.ex>\r\nBDAT 86\r\nTo: Susan@random.com\r\nFrom: Sa5@random.com\r\nSubject: This is a bodyless test message\r\nRSET +??? 250 OK +??? 250 Accepted +??? 250 86 byte chunk received +??? 250 Reset OK +MAIL FROM:<some6ne@some.domain>\r\nRCPT TO:<CALLER@test.ex>\r\nBDAT 86\r\nTo: Susan@random.com\r\nFrom: Sa6@random.com\r\nSubject: This is a bodyless test message\r\nBDAT 6 LAST\r\nZZ\r\n +??? 250 OK +??? 250 Accepted +??? 250 86 byte chunk received +??? 250- 6 byte chunk, total 93 +??? 250 OK +QUIT +??? 221 +**** +# # # plain, small message (no body) # header line with bad line-ending diff --git a/test/stdout/0900 b/test/stdout/0900 index bcb177fb6..41e369735 100644 --- a/test/stdout/0900 +++ b/test/stdout/0900 @@ -422,6 +422,46 @@ End of script Connecting to 127.0.0.1 port 1225 ... connected ??? 220 <<< 220 testhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> EHLO tester +??? 250- +<<< 250-testhost.test.ex Hello tester [127.0.0.1] +??? 250-SIZE +<<< 250-SIZE 52428800 +??? 250-8BITMIME +<<< 250-8BITMIME +??? 250-PIPELINING +<<< 250-PIPELINING +??? 250-CHUNKING +<<< 250-CHUNKING +??? 250 HELP +<<< 250 HELP +>>> MAIL FROM:<some5ne@some.domain>\r\nRCPT TO:<CALLER@test.ex>\r\nBDAT 86\r\nTo: Susan@random.com\r\nFrom: Sa5@random.com\r\nSubject: This is a bodyless test message\r\nRSET +??? 250 OK +<<< 250 OK +??? 250 Accepted +<<< 250 Accepted +??? 250 86 byte chunk received +<<< 250 86 byte chunk received +??? 250 Reset OK +<<< 250 Reset OK +>>> MAIL FROM:<some6ne@some.domain>\r\nRCPT TO:<CALLER@test.ex>\r\nBDAT 86\r\nTo: Susan@random.com\r\nFrom: Sa6@random.com\r\nSubject: This is a bodyless test message\r\nBDAT 6 LAST\r\nZZ\r\n +??? 250 OK +<<< 250 OK +??? 250 Accepted +<<< 250 Accepted +??? 250 86 byte chunk received +<<< 250 86 byte chunk received +??? 250- 6 byte chunk, total 93 +<<< 250- 6 byte chunk, total 93 +??? 250 OK +<<< 250 OK id=10HmbE-0005vi-00 +>>> QUIT +??? 221 +<<< 221 testhost.test.ex closing connection +End of script +Connecting to 127.0.0.1 port 1225 ... connected +??? 220 +<<< 220 testhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 >>> ehlo tester ??? 250- <<< 250-testhost.test.ex Hello tester [127.0.0.1] @@ -483,7 +523,7 @@ Connecting to 127.0.0.1 port 1225 ... connected ??? 250- <<< 250- 98 byte chunk, total 100 ??? 250 -<<< 250 OK id=10HmbE-0005vi-00 +<<< 250 OK id=10HmbF-0005vi-00 >>> quit ??? 221 <<< 221 testhost.test.ex closing connection |