diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2015-09-17 13:35:16 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2015-09-17 13:35:16 +0100 |
commit | 14b3c5bc64a16df07583fe4b5ef2e0129d063893 (patch) | |
tree | 76f33f84acdf7e5af636dbea346da58e1cb09cc0 /test/confs | |
parent | f64fbe039033d51be277431ce09fabd3ebbc7e74 (diff) |
DNS: time-limit cached returns, using TTL. Bug 1395
This can matter for fast-changing data such as DNSBLs.
Diffstat (limited to 'test/confs')
-rw-r--r-- | test/confs/2200 | 17 | ||||
-rw-r--r-- | test/confs/2201 | 37 |
2 files changed, 54 insertions, 0 deletions
diff --git a/test/confs/2200 b/test/confs/2200 index 3bef13363..ae5988cee 100644 --- a/test/confs/2200 +++ b/test/confs/2200 @@ -1,4 +1,5 @@ # Exim test configuration 2200 +# Check for dnsdb cache TTL handling exim_path = EXIM_PATH host_lookup_order = bydns @@ -8,4 +9,20 @@ log_file_path = DIR/spool/log/%slog gecos_pattern = "" gecos_name = CALLER_NAME +# ----- Main settings ----- + +acl_not_smtp = check_rcpt +queue_only + +begin acl + +check_rcpt: + warn + set acl_m1 = ${map {<,$recipients} \ + {${lookup dnsdb{a=${domain:$item}}{$value}fail}}} + delay = 4s + set acl_m1 = ${map {<,$recipients} \ + {${lookup dnsdb{a=${domain:$item}}{$value}fail}}} + accept + # End diff --git a/test/confs/2201 b/test/confs/2201 index ae17b7cb4..7b257cce3 100644 --- a/test/confs/2201 +++ b/test/confs/2201 @@ -12,11 +12,43 @@ gecos_name = CALLER_NAME trusted_users = CALLER +acl_smtp_rcpt = check_rcpt +acl_not_smtp = check_sndr +queue_only + +# - ACL -- +begin acl + +check_rcpt: + # Do not care about result, looking at debug output + # expect an original lookup, a cached lookup avoidance + # then a TTL-required repeat lookup + warn dnslists = rbl.test.ex/V4NET.11.12.14 + dnslists = rbl.test.ex/V4NET.11.12.14 + delay = 4s + dnslists = rbl.test.ex/V4NET.11.12.14 + accept + +check_sndr: + # Do not care about result, looking at debug output + # expect an original lookup, a cached lookup avoidance + # then a TTL-required repeat lookup + warn sender_domains = dnsdb;a=$sender_address_domain + sender_domains = dnsdb;a=$sender_address_domain + delay = 4s + sender_domains = dnsdb;a=$sender_address_domain + accept + # ----- Routers ----- begin routers +r0: + driver = accept + senders = a@shorthost.test.ex + transport = remote_delivery + r1: driver = accept domains = dnsdb;$domain @@ -41,6 +73,11 @@ local_delivery: file = DIR/test-mail/$local_part user = CALLER +remote_delivery: + driver = smtp + hosts = 127.0.0.1 + allow_localhost + port = PORT_D # ----- Retry ----- |