diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2020-05-05 18:47:29 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2020-05-05 18:47:29 +0100 |
commit | 0f9c36e64b3ded09b1972515fc62a673e1be2b8d (patch) | |
tree | 15e677a470eb10564e2fdb08d8fd55884141a6f5 /test | |
parent | 978d20c05940889f38b35fb3f6137f53dab24f48 (diff) |
Ensure lookup-result variables are dropped between messages on a connection
Diffstat (limited to 'test')
-rw-r--r-- | test/aux-fixed/0623.list | 4 | ||||
-rw-r--r-- | test/confs/0623 | 23 | ||||
-rw-r--r-- | test/log/0623 | 6 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0623 | 57 | ||||
-rw-r--r-- | test/stderr/0623 | 29 | ||||
-rw-r--r-- | test/stdout/0623 | 65 |
6 files changed, 184 insertions, 0 deletions
diff --git a/test/aux-fixed/0623.list b/test/aux-fixed/0623.list new file mode 100644 index 000000000..737a751a0 --- /dev/null +++ b/test/aux-fixed/0623.list @@ -0,0 +1,4 @@ +fred: yes +jim: him also +good1.ex: yup +good2.ex: ok diff --git a/test/confs/0623 b/test/confs/0623 new file mode 100644 index 000000000..7ac0ad3c5 --- /dev/null +++ b/test/confs/0623 @@ -0,0 +1,23 @@ +# Exim test configuration 0623 + +.include DIR/aux-var/std_conf_prefix + + +# ----- Main settings ----- + +domainlist local_domains = @ + +acl_smtp_rcpt = chk_rcpt + +queue_only + + +# ----- ACL ----- + +begin acl + +chk_rcpt: + accept local_parts = lsearch;DIR/aux-fixed/TESTNUM.list + domains = lsearch;DIR/aux-fixed/TESTNUM.list + +# End diff --git a/test/log/0623 b/test/log/0623 new file mode 100644 index 000000000..c84f87428 --- /dev/null +++ b/test/log/0623 @@ -0,0 +1,6 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local-smtp S=sss + +******** SERVER ******** +1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port PORT_D +1999-03-02 09:44:33 10HmaY-0005vi-00 <= a@test.ex H=(tester) [127.0.0.1] P=smtp S=sss +1999-03-02 09:44:33 10HmaZ-0005vi-00 <= b@test.ex H=(tester) [127.0.0.1] P=smtp S=sss diff --git a/test/scripts/0000-Basic/0623 b/test/scripts/0000-Basic/0623 new file mode 100644 index 000000000..d43d13ca6 --- /dev/null +++ b/test/scripts/0000-Basic/0623 @@ -0,0 +1,57 @@ +# free of local_part_data, domain_data, sender_data +# +exim -bh 99.99.99.99 +HELO tester +MAIL FROM:<a@test.ex> +RCPT TO:<fred@good1.ex> +DATA +. +RSET +MAIL FROM:<b@test.ex> +RCPT TO:<jim@good2.ex> +DATA +. +QUIT +**** +# +# +exim -bd -DSERVER=server -oX PORT_D +**** +client 127.0.0.1 PORT_D +??? 220 +HELO tester +??? 250 +MAIL FROM:<a@test.ex> +??? 250 +RCPT TO:<fred@good1.ex> +??? 250 +DATA +??? 354 +. +??? 250 +RSET +??? 250 +MAIL FROM:<b@test.ex> +??? 250 +RCPT TO:<jim@good2.ex> +??? 250 +DATA +??? 354 +. +??? 250 +QUIT +**** +killdaemon +# +# +exim -bs +HELO tester +MAIL FROM:<a@test.ex> +RCPT TO:<fred@good1.ex> +DATA +. +QUIT +**** +# +# +no_msglog_check diff --git a/test/stderr/0623 b/test/stderr/0623 new file mode 100644 index 000000000..21ac5f241 --- /dev/null +++ b/test/stderr/0623 @@ -0,0 +1,29 @@ +>>> host in hosts_connection_nolog? no (option unset) +>>> host in host_lookup? no (option unset) +>>> host in host_reject_connection? no (option unset) +>>> host in sender_unqualified_hosts? no (option unset) +>>> host in recipient_unqualified_hosts? no (option unset) +>>> host in helo_verify_hosts? no (option unset) +>>> host in helo_try_verify_hosts? no (option unset) +>>> host in helo_accept_junk_hosts? no (option unset) +>>> tester in helo_lookup_domains? no (end of list) +>>> using ACL "chk_rcpt" +>>> processing "accept" (TESTSUITE/test-config 20) +>>> check local_parts = lsearch;TESTSUITE/aux-fixed/0623.list +>>> fred in "lsearch;TESTSUITE/aux-fixed/0623.list"? yes (matched "lsearch;TESTSUITE/aux-fixed/0623.list") +>>> check domains = lsearch;TESTSUITE/aux-fixed/0623.list +>>> good1.ex in "lsearch;TESTSUITE/aux-fixed/0623.list"? yes (matched "lsearch;TESTSUITE/aux-fixed/0623.list") +>>> accept: condition test succeeded in ACL "chk_rcpt" +>>> end of ACL "chk_rcpt": ACCEPT +LOG: 10HmbA-0005vi-00 <= a@test.ex H=(tester) [99.99.99.99] P=smtp S=sss +>>> using ACL "chk_rcpt" +>>> processing "accept" (TESTSUITE/test-config 20) +>>> check local_parts = lsearch;TESTSUITE/aux-fixed/0623.list +>>> jim in "lsearch;TESTSUITE/aux-fixed/0623.list"? yes (matched "lsearch;TESTSUITE/aux-fixed/0623.list") +>>> check domains = lsearch;TESTSUITE/aux-fixed/0623.list +>>> good2.ex in "lsearch;TESTSUITE/aux-fixed/0623.list"? yes (matched "lsearch;TESTSUITE/aux-fixed/0623.list") +>>> accept: condition test succeeded in ACL "chk_rcpt" +>>> end of ACL "chk_rcpt": ACCEPT +LOG: 10HmbB-0005vi-00 <= b@test.ex H=(tester) [99.99.99.99] P=smtp S=sss + +******** SERVER ******** diff --git a/test/stdout/0623 b/test/stdout/0623 new file mode 100644 index 000000000..27103d94f --- /dev/null +++ b/test/stdout/0623 @@ -0,0 +1,65 @@ + +**** SMTP testing session as if from host 99.99.99.99 +**** but without any ident (RFC 1413) callback. +**** This is not for real! + +220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250 the.local.host.name Hello tester [99.99.99.99]
+250 OK
+250 Accepted
+354 Enter message, ending with "." on a line by itself
+250 OK id=10HmbA-0005vi-00
+ +**** SMTP testing: that is not a real message id! + +250 Reset OK
+250 OK
+250 Accepted
+354 Enter message, ending with "." on a line by itself
+250 OK id=10HmbB-0005vi-00
+ +**** SMTP testing: that is not a real message id! + +221 the.local.host.name closing connection
+Connecting to 127.0.0.1 port 1225 ... connected +??? 220 +<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> HELO tester +??? 250 +<<< 250 the.local.host.name Hello tester [127.0.0.1] +>>> MAIL FROM:<a@test.ex> +??? 250 +<<< 250 OK +>>> RCPT TO:<fred@good1.ex> +??? 250 +<<< 250 Accepted +>>> DATA +??? 354 +<<< 354 Enter message, ending with "." on a line by itself +>>> . +??? 250 +<<< 250 OK id=10HmaY-0005vi-00 +>>> RSET +??? 250 +<<< 250 Reset OK +>>> MAIL FROM:<b@test.ex> +??? 250 +<<< 250 OK +>>> RCPT TO:<jim@good2.ex> +??? 250 +<<< 250 Accepted +>>> DATA +??? 354 +<<< 354 Enter message, ending with "." on a line by itself +>>> . +??? 250 +<<< 250 OK id=10HmaZ-0005vi-00 +>>> QUIT +End of script +220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250 the.local.host.name Hello CALLER at tester
+250 OK
+250 Accepted
+354 Enter message, ending with "." on a line by itself
+250 OK id=10HmaX-0005vi-00
+221 the.local.host.name closing connection
|