From 0b20855c02c44cb79a33824596e3ad8dc906131f Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Tue, 2 Aug 2016 00:24:00 +0100 Subject: [PATCH] testcases for PRDR --- test/confs/0900 | 8 +++++++ test/confs/5590 | 1 + test/confs/5591 | 1 + test/log/5590 | 7 ++++++ test/log/5591 | 4 ++++ test/scripts/5500-PRDR/5590 | 40 +++++++++++++++++++++++++++++++++ test/scripts/5500-PRDR/5591 | 32 ++++++++++++++++++++++++++ test/scripts/5500-PRDR/REQUIRES | 1 + test/stdout/5591 | 24 ++++++++++++++++++++ 9 files changed, 118 insertions(+) create mode 120000 test/confs/5590 create mode 120000 test/confs/5591 create mode 100644 test/log/5590 create mode 100644 test/log/5591 create mode 100644 test/scripts/5500-PRDR/5590 create mode 100644 test/scripts/5500-PRDR/5591 create mode 100644 test/stdout/5591 diff --git a/test/confs/0900 b/test/confs/0900 index 245d9fa96..427669c4b 100644 --- a/test/confs/0900 +++ b/test/confs/0900 @@ -3,6 +3,7 @@ SERVER= X= Y= OPT= +ALLOW= exim_path = EXIM_PATH keep_environment = @@ -20,6 +21,7 @@ tls_advertise_hosts = ${if eq {Y}{tls} {*}} domainlist local_domains = @ : test.ex acl_smtp_rcpt = check_recipient +acl_smtp_data_prdr = check_prdr acl_smtp_data = check_data trusted_users = CALLER queue_only @@ -29,6 +31,8 @@ log_selector = +received_recipients tls_certificate = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail} tls_privatekey = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail} +ALLOW + # ----- ACL ----- begin acl @@ -38,6 +42,10 @@ check_recipient: accept domains = +local_domains deny message = relay not permitted +check_prdr: + accept local_parts = good + deny + check_data: warn message = X-acl-message-linecount: $message_linecount accept diff --git a/test/confs/5590 b/test/confs/5590 new file mode 120000 index 000000000..1bb987150 --- /dev/null +++ b/test/confs/5590 @@ -0,0 +1 @@ +0900 \ No newline at end of file diff --git a/test/confs/5591 b/test/confs/5591 new file mode 120000 index 000000000..1bb987150 --- /dev/null +++ b/test/confs/5591 @@ -0,0 +1 @@ +0900 \ No newline at end of file diff --git a/test/log/5590 b/test/log/5590 new file mode 100644 index 000000000..1959dac0f --- /dev/null +++ b/test/log/5590 @@ -0,0 +1,7 @@ + +******** SERVER ******** +1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 +1999-03-02 09:44:33 10HmaX-0005vi-00 PRDR R= refusal +1999-03-02 09:44:33 10HmaX-0005vi-00 PRDR R= acceptance +1999-03-02 09:44:33 10HmaX-0005vi-00 PRDR R= refusal +1999-03-02 09:44:33 10HmaX-0005vi-00 <= someone@some.domain H=(tester) [127.0.0.1] P=esmtp PRDR K S=sss for bad1@test.ex good@test.ex bad2@test.ex diff --git a/test/log/5591 b/test/log/5591 new file mode 100644 index 000000000..0b9bd84ef --- /dev/null +++ b/test/log/5591 @@ -0,0 +1,4 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 <= sender_gets_replaced@the.local.host.name U=CALLER P=local S=sss for usery userz +1999-03-02 09:44:33 10HmaX-0005vi-00 => usery@the.local.host.name R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] PRDR C="250 first rcpt was good" +1999-03-02 09:44:33 10HmaX-0005vi-00 -> userz@the.local.host.name R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] PRDR C="250 second rcpt was good" +1999-03-02 09:44:33 10HmaX-0005vi-00 Completed diff --git a/test/scripts/5500-PRDR/5590 b/test/scripts/5500-PRDR/5590 new file mode 100644 index 000000000..a9722ff81 --- /dev/null +++ b/test/scripts/5500-PRDR/5590 @@ -0,0 +1,40 @@ +# PRDR and CHUNKING reception +exim -DALLOW=prdr_enable -DSERVER=server -bd -oX PORT_D +**** +# +client 127.0.0.1 PORT_D +??? 220 +EHLO tester +??? 250- +??? 250-SIZE +??? 250-8BITMIME +??? 250-PIPELINING +??? 250-CHUNKING +??? 250-PRDR +??? 250 +MAIL FROM: PRDR +??? 250 +RCPT TO: +??? 250 +RCPT TO: +??? 250 +RCPT TO: +??? 250 +BDAT 100 last +To: Susan@random.com +From: Sam@random.com +Subject: This is a bodyfull test message + +1234567890 +??? 353 +??? 550 +??? 250 +??? 550 +??? 250 +QUIT +??? 221 +**** +# +# +killdaemon +no_msglog_check diff --git a/test/scripts/5500-PRDR/5591 b/test/scripts/5500-PRDR/5591 new file mode 100644 index 000000000..67b9de298 --- /dev/null +++ b/test/scripts/5500-PRDR/5591 @@ -0,0 +1,32 @@ +# PRDR and CHUNKING transmission +need_ipv4 +no_msglog_check +# +# Two recipients, accepted by full PRDR response sequence +server PORT_S +220 Server ready +EHLO +250-hiya matey +250-PRDR +250-CHUNKING +250 OK +MAIL FROM:<> PRDR +250 OK +RCPT TO +250 OK +RCPT TO +250 OK +BDAT 317 LAST +*data 317 +353 prdr responses coming up +250 first rcpt was good +250 second rcpt was good +250 OK, overall +QUIT +250 OK +**** +exim -odi -f sender_gets_replaced usery userz +Some message text. +**** +# +# diff --git a/test/scripts/5500-PRDR/REQUIRES b/test/scripts/5500-PRDR/REQUIRES index e69de29bb..bca921eaf 100644 --- a/test/scripts/5500-PRDR/REQUIRES +++ b/test/scripts/5500-PRDR/REQUIRES @@ -0,0 +1 @@ +support PRDR diff --git a/test/stdout/5591 b/test/stdout/5591 new file mode 100644 index 000000000..1a65e063d --- /dev/null +++ b/test/stdout/5591 @@ -0,0 +1,24 @@ + +******** SERVER ******** +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO the.local.host.name +250-hiya matey +250-PRDR +250-CHUNKING +250 OK +MAIL FROM:<> PRDR +250 OK +RCPT TO: +250 OK +RCPT TO: +250 OK +BDAT 317 LAST +353 prdr responses coming up +250 first rcpt was good +250 second rcpt was good +250 OK, overall +QUIT +250 OK +End of script -- 2.30.2