testcases for PRDR
authorJeremy Harris <jgh146exb@wizmail.org>
Mon, 1 Aug 2016 23:24:00 +0000 (00:24 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Tue, 2 Aug 2016 15:46:32 +0000 (16:46 +0100)
test/confs/0900
test/confs/5590 [new symlink]
test/confs/5591 [new symlink]
test/log/5590 [new file with mode: 0644]
test/log/5591 [new file with mode: 0644]
test/scripts/5500-PRDR/5590 [new file with mode: 0644]
test/scripts/5500-PRDR/5591 [new file with mode: 0644]
test/scripts/5500-PRDR/REQUIRES
test/stdout/5591 [new file with mode: 0644]

index 245d9fa96450a5bf4c4b02a7b81bc70d505071f8..427669c4bf1e29a61cb9c9a2c0c37659e5b8faaa 100644 (file)
@@ -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 (symlink)
index 0000000..1bb9871
--- /dev/null
@@ -0,0 +1 @@
+0900
\ No newline at end of file
diff --git a/test/confs/5591 b/test/confs/5591
new file mode 120000 (symlink)
index 0000000..1bb9871
--- /dev/null
@@ -0,0 +1 @@
+0900
\ No newline at end of file
diff --git a/test/log/5590 b/test/log/5590
new file mode 100644 (file)
index 0000000..1959dac
--- /dev/null
@@ -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=<bad1@test.ex> refusal
+1999-03-02 09:44:33 10HmaX-0005vi-00 PRDR R=<good@test.ex> acceptance
+1999-03-02 09:44:33 10HmaX-0005vi-00 PRDR R=<bad2@test.ex> 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 (file)
index 0000000..0b9bd84
--- /dev/null
@@ -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 (file)
index 0000000..a9722ff
--- /dev/null
@@ -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:<someone@some.domain> PRDR
+??? 250
+RCPT TO:<bad1@test.ex>
+??? 250
+RCPT TO:<good@test.ex>
+??? 250
+RCPT TO:<bad2@test.ex>
+??? 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 (file)
index 0000000..67b9de2
--- /dev/null
@@ -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.
+****
+#
+#
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..bca921eaf62aa7903bee35af2e9dfe495d1f3e38 100644 (file)
@@ -0,0 +1 @@
+support PRDR
diff --git a/test/stdout/5591 b/test/stdout/5591
new file mode 100644 (file)
index 0000000..1a65e06
--- /dev/null
@@ -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:<usery@the.local.host.name>
+250 OK
+RCPT TO:<userz@the.local.host.name>
+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