summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2015-12-20 20:01:52 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2015-12-20 23:33:19 +0000
commit379ba7d06d366c8cd151215e4c82424c36049375 (patch)
tree74f19dee2ddd074018e4e5665e6c03191b3ebddc /test
parent2decbec91a0b5f99322ba8356e3fac7be495a108 (diff)
dnslists: permit use with explicit key(s) in nonsmtp ACLs. Bug 1748
Diffstat (limited to 'test')
-rw-r--r--test/confs/057178
-rw-r--r--test/log/05714
-rw-r--r--test/rejectlog/057110
-rw-r--r--test/scripts/0000-Basic/057114
4 files changed, 106 insertions, 0 deletions
diff --git a/test/confs/0571 b/test/confs/0571
new file mode 100644
index 000000000..64383cdd8
--- /dev/null
+++ b/test/confs/0571
@@ -0,0 +1,78 @@
+# Exim test configuration 0571
+
+LOG_SELECTOR=
+
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+primary_hostname = myhost.test.ex
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+tls_advertise_hosts =
+
+# ----- Main settings -----
+
+disable_ipv6 = true
+
+addresslist ok_senders = ok@ok.ok
+
+domainlist local_domains = test.ex : *.test.ex
+
+qualify_domain = test.ex
+trusted_users = CALLER
+
+# Use first three components of from_domain to select ACL
+acl_not_smtp = ${if def:sender_address \
+ {acl_${sg{${tr{$sender_address_domain}{.}{_}}}{^(.*)_.*\$}{\$1}}} \
+ {accept control=queue_only}}
+
+# ----- ACLs -----
+
+begin acl
+
+acl_29_29_29:
+ deny dnslists = test.ex/$sender_address_domain
+ accept
+
+acl_29_29_0:
+ deny dnslists = test.ex
+ accept
+
+# ----- Transports -----
+
+begin transports
+
+t1:
+ driver = appendfile
+ file = DIR/test-mail/$local_part
+ user = CALLER
+
+t2:
+ driver = appendfile
+ file = DIR/test-mail/okbatch
+ user = CALLER
+ batch_max = 100
+ envelope_to_add
+
+# ----- Routers -----
+
+begin routers
+
+r0:
+ driver = accept
+ local_parts = ^ok
+ transport = t2
+
+r1:
+ driver = accept
+ local_parts = ^userx : ^cond-
+ transport = t1
+
+r2:
+ driver = redirect
+ local_parts = fail
+ allow_fail
+ data = :fail: here is a fail message
+
+# End
diff --git a/test/log/0571 b/test/log/0571
new file mode 100644
index 000000000..fc7dd5058
--- /dev/null
+++ b/test/log/0571
@@ -0,0 +1,4 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 F=<ted@29.29.0.com> rejected by non-SMTP ACL: cannot test keyless dnslists condition in non-SMTP ACL
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= <> R=10HmaX-0005vi-00 U=EXIMUSER P=local S=sss
+1999-03-02 09:44:33 10HmaY-0005vi-00 no immediate delivery: queued by ACL
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= bill@29.29.29.com U=CALLER P=local S=sss
diff --git a/test/rejectlog/0571 b/test/rejectlog/0571
new file mode 100644
index 000000000..494bffed6
--- /dev/null
+++ b/test/rejectlog/0571
@@ -0,0 +1,10 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 F=<ted@29.29.0.com> rejected by non-SMTP ACL: cannot test keyless dnslists condition in non-SMTP ACL
+Envelope-from: <ted@29.29.0.com>
+Envelope-to: <ok1@test.ex>
+P Received: from CALLER by myhost.test.ex with local (Exim x.yz)
+ (envelope-from <ted@29.29.0.com>)
+ id 10HmaX-0005vi-00
+ for ok1@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+I Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
+F From: ted@29.29.0.com
+ Date: Tue, 2 Mar 1999 09:44:33 +0000
diff --git a/test/scripts/0000-Basic/0571 b/test/scripts/0000-Basic/0571
new file mode 100644
index 000000000..3eab04cbf
--- /dev/null
+++ b/test/scripts/0000-Basic/0571
@@ -0,0 +1,14 @@
+# ACL - dnslists in non-smtp ACL
+#
+1
+exim -f ted@29.29.0.com -odq ok1@test.ex
+should fail
+.
+****
+#
+exim -f bill@29.29.29.com -odq ok1@test.ex
+should pass
+.
+****
+#
+no_msglog_check