diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2021-03-14 20:39:03 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2021-03-16 16:43:49 +0000 |
commit | 001bf8f58763581d117edaa391aa13ac139eb39b (patch) | |
tree | 6af8ef88382cba84e148612ccced6841b4a89264 /test/scripts/0000-Basic | |
parent | 843edb3830b89e01fd2b956d2a0d23d13e29b55e (diff) |
Pipeline QUIT after data
Diffstat (limited to 'test/scripts/0000-Basic')
-rw-r--r-- | test/scripts/0000-Basic/0623 | 114 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0904 | 51 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0911 | 142 |
3 files changed, 284 insertions, 23 deletions
diff --git a/test/scripts/0000-Basic/0623 b/test/scripts/0000-Basic/0623 new file mode 100644 index 000000000..315bc4914 --- /dev/null +++ b/test/scripts/0000-Basic/0623 @@ -0,0 +1,114 @@ +# PIPELINING of QUIT +need_ipv4 +# +# Baseline: no error. Check the QUIT arrived befre we ack message-data +server PORT_D +220 Server ready +EHLO +250-hi there +250-PIPELINING +250 OK +MAIL FROM +250 OK mail +RCPT TO +250 OK rcpt +DATA +300 go ahead +. +QUIT +250 OK message data +221 Closing connection +**** +exim -odi good@test.ex +**** +# +# QUIT-pipeliining should not be done when PIPELINING not advertised +server PORT_D +220 Server ready +EHLO +250-hi there +250 OK +MAIL FROM +250 OK mail +RCPT TO +250 OK rcpt +DATA +300 go ahead +. +250 OK message data +*sleep 1 +<< +QUIT +221 Closing connection +**** +exim -odi nopipe@test.ex +**** +# +# Temp-error response to message-data +# Check specifically for a close, and no repeated command +# Also check Exim's list of commands sent +server PORT_D +220 Server ready +EHLO +250-hi there +250-PIPELINING +250 OK +MAIL FROM +250 OK mail +RCPT TO +250 OK rcpt +DATA +300 go ahead +. +QUIT +451 Service not available +221 Closing connection +*eof +**** +exim -d-all+transport -odi tempreject@test.ex +**** +exim -Mrm $msg1 +**** +# +# Perm-error response to message-data +server PORT_D +220 Server ready +EHLO +250-hi there +250-PIPELINING +250 OK +MAIL FROM +250 OK mail +RCPT TO +250 OK rcpt +DATA +300 go ahead +. +QUIT +550 content rejected +221 Closing connection +*eof +**** +exim -d-all+transport -odi permreject@test.ex +**** +# +# Channel-close response to message-data +server PORT_D +220 Server ready +EHLO +250-hi there +250-PIPELINING +250 OK +MAIL FROM +250 OK mail +RCPT TO +250 OK rcpt +DATA +300 go ahead +. +>*eof +**** +exim -d-all+transport -odi permreject@test.ex +**** +exim -Mrm $msg1 +**** diff --git a/test/scripts/0000-Basic/0904 b/test/scripts/0000-Basic/0904 index fa72256c0..9f09a84ef 100644 --- a/test/scripts/0000-Basic/0904 +++ b/test/scripts/0000-Basic/0904 @@ -206,29 +206,34 @@ QUIT **** # # Error case: server wrongly expected more data, client gets timeout for data-ack -server PORT_S -220 Greetings -EHLO -250-Hello there -250-PIPELINING -250 CHUNKING -MAIL FROM -RCPT TO -BDAT 329 LAST -*data 330 -250 good mail cmd -**** -sudo exim -odf -bS -EHLO test -MAIL FROM:<sender@source.dom> -RCPT TO:<q@test.ex> -DATA -Subject: foo - -data -. -QUIT -**** +# XXX This is a problem with data/quit pipelining. The succeeding SMTP command cannot +# be distinguished from the data, by the errroneous server. +# Of course, we could avoid such pipelining on the client side, when BDAT is used. +# But - is this any worse than a server failing to spot the data-dot under DATA? +# I think not; both are culpable, and there is only so much the client can do. +#server PORT_S +#220 Greetings +#EHLO +#250-Hello there +#250-PIPELINING +#250 CHUNKING +#MAIL FROM +#RCPT TO +#BDAT 329 LAST +#*data 330 +#250 good mail cmd +#**** +#sudo exim -odf -bS +#EHLO test +#MAIL FROM:<sender@source.dom> +#RCPT TO:<q@test.ex> +#DATA +#Subject: foo +# +#data +#. +#QUIT +#**** # # Error case: server wrongly expected less data # client get the data-ack, sends quit - but server diff --git a/test/scripts/0000-Basic/0911 b/test/scripts/0000-Basic/0911 new file mode 100644 index 000000000..c6979899b --- /dev/null +++ b/test/scripts/0000-Basic/0911 @@ -0,0 +1,142 @@ +# CHUNKING and PIPELINING of QUIT +need_ipv4 +# +# Chunking Baseline: no error. Check the QUIT arrived befre we ack message-data +server PORT_D +220 Server ready +EHLO +250-hi there +250-PIPELINING +250-CHUNKING +250 OK +MAIL FROM +RCPT TO +BDAT 313 LAST +250 OK mail +250 OK rcpt +*data 313 +QUIT +250 OK chunked message data +221 Closing connection +**** +sudo exim -d-all+transport -odi -bs +helo tester +mail from:<fred@myhost.test.ex> +rcpt to:<good@test.ex> +data +. +quit +**** +# +# QUIT-pipeliining should not be done when PIPELINING not advertised +server PORT_D +220 Server ready +EHLO +250-hi there +250-CHUNKING +250 OK +MAIL FROM +250 OK mail +RCPT TO +250 OK rcpt +BDAT 315 LAST +*data 315 +250 OK chunked message data +QUIT +221 Closing connection +**** +sudo exim -d-all+transport -odi -bs +helo tester +mail from:<fred@myhost.test.ex> +rcpt to:<nopipe@test.ex> +data +. +quit +**** +# +# Temp-error response to message-data +# Check specifically for a close, and no repeated command +# Also check Exim's list of commands sent +server PORT_D +220 Server ready +EHLO +250-hi there +250-PIPELINING +250-CHUNKING +250 OK +MAIL FROM +250 OK mail +RCPT TO +250 OK rcpt +BDAT 319 LAST +*data 319 +QUIT +451 Service not available +221 Closing connection +*eof +**** +sudo exim -d-all+transport -odi -bs +helo tester +mail from:<fred@myhost.test.ex> +rcpt to:<tempreject@test.ex> +data +. +quit +**** +exim -Mrm $msg1 +**** +# +# Perm-error response to message-data +server PORT_D +220 Server ready +EHLO +250-hi there +250-PIPELINING +250-CHUNKING +250 OK +MAIL FROM +250 OK mail +RCPT TO +250 OK rcpt +BDAT 319 LAST +*data 319 +QUIT +550 content rejected +221 Closing connection +*eof +**** +sudo exim -d-all+transport -odi -bs +helo tester +mail from:<fred@myhost.test.ex> +rcpt to:<permreject@test.ex> +data +. +quit +**** +# +# Channel-close response to message-data +server PORT_D +220 Server ready +EHLO +250-hi there +250-PIPELINING +250-CHUNKING +250 OK +MAIL FROM +250 OK mail +RCPT TO +250 OK rcpt +BDAT 317 LAST +*data 317 +>*eof +**** +sudo exim -d-all+transport -odi -bs +helo tester +mail from:<fred@myhost.test.ex> +rcpt to:<dataloss@test.ex> +data +. +quit +**** +exim -Mrm $msg1 +**** |