From: Heiko Schlittermann (HS12) Date: Wed, 13 May 2015 06:59:31 +0000 (+0200) Subject: Testsuite: Check dnssec_{request,require}_domains for dnslookup X-Git-Tag: exim-4_86_RC1~34 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/abe1353ec23012ab13e5d9962cc982b6bd8dbfad?ds=sidebyside Testsuite: Check dnssec_{request,require}_domains for dnslookup --- diff --git a/src/src/host.c b/src/src/host.c index 206751757..0a7a212b4 100644 --- a/src/src/host.c +++ b/src/src/host.c @@ -2047,10 +2047,9 @@ for (i = 1; i <= times; } #endif /* HAVE_IPV6 */ - if ( slow_lookup_log - && (time_msec = get_time_in_ms() - time_msec) > slow_lookup_log - ) - log_long_lookup(US"name", host->name, time_msec); + if (slow_lookup_log + && (time_msec = get_time_in_ms() - time_msec) > slow_lookup_log) + log_long_lookup(US"name", host->name, time_msec); if (hostdata == NULL) { diff --git a/test/confs/4800 b/test/confs/4800 new file mode 100644 index 000000000..a257eff41 --- /dev/null +++ b/test/confs/4800 @@ -0,0 +1,10 @@ + +begin routers + dnslookup: + driver = dnslookup + dnssec_request_domains = * + transport = smtp + +begin transports + smtp: + driver = smtp diff --git a/test/confs/4801 b/test/confs/4801 new file mode 100644 index 000000000..86ec20698 --- /dev/null +++ b/test/confs/4801 @@ -0,0 +1,10 @@ + +begin routers + dnslookup: + driver = dnslookup + dnssec_require_domains = * + transport = smtp + +begin transports + smtp: + driver = smtp diff --git a/test/dnszones-src/db.test.ex b/test/dnszones-src/db.test.ex index 05deca5d3..da084529f 100644 --- a/test/dnszones-src/db.test.ex +++ b/test/dnszones-src/db.test.ex @@ -396,6 +396,16 @@ _client._smtp.csa2 SRV 1 1 0 csa2.test.ex. csa1 A V4NET.9.8.7 csa2 A V4NET.9.8.8 +; ------- Testing DNSSEC ---------- + +mx-unsec-a-unsec MX 5 a-unsec +mx-unsec-a-sec MX 5 a-sec +DNSSEC mx-sec-a-unsec MX 5 a-unsec +DNSSEC mx-sec-a-sec MX 5 a-sec + +a-unsec A V4NET.0.0.100 +DNSSEC a-sec A V4NET.0.0.100 + ; ------- Testing DANE ------------ ; full suite dns chain, sha512 diff --git a/test/scripts/4800-dnssec-dnslookup/4800 b/test/scripts/4800-dnssec-dnslookup/4800 new file mode 100644 index 000000000..d695a5d34 --- /dev/null +++ b/test/scripts/4800-dnssec-dnslookup/4800 @@ -0,0 +1,9 @@ +# dnssec_request_domains +exim -bt user@mx-unsec-a-unsec.test.ex +**** +exim -bt user@mx-unsec-a-sec.test.ex +**** +exim -bt user@mx-sec-a-unsec.test.ex +**** +exim -bt user@mx-sec-a-sec.test.ex +**** diff --git a/test/scripts/4800-dnssec-dnslookup/4801 b/test/scripts/4800-dnssec-dnslookup/4801 new file mode 100644 index 000000000..30ba44ed0 --- /dev/null +++ b/test/scripts/4800-dnssec-dnslookup/4801 @@ -0,0 +1,12 @@ +# dnssec_require_domains +1 +exim -bt user@mx-unsec-a-unsec.test.ex +**** +1 +exim -bt user@mx-unsec-a-sec.test.ex +**** +2 +exim -bt user@mx-sec-a-unsec.test.ex +**** +exim -bt user@mx-sec-a-sec.test.ex +**** diff --git a/test/scripts/4800-dnssec-dnslookup/REQUIRES b/test/scripts/4800-dnssec-dnslookup/REQUIRES new file mode 100644 index 000000000..0092709b9 --- /dev/null +++ b/test/scripts/4800-dnssec-dnslookup/REQUIRES @@ -0,0 +1,2 @@ +support DNSSEC +router dnslookup diff --git a/test/stderr/4801 b/test/stderr/4801 new file mode 100644 index 000000000..4a9d58975 --- /dev/null +++ b/test/stderr/4801 @@ -0,0 +1,6 @@ +LOG: host_lookup_failed MAIN + dnssec fail on MX for mx-unsec-a-unsec.test.ex +LOG: host_lookup_failed MAIN + dnssec fail on MX for mx-unsec-a-sec.test.ex +LOG: host_lookup_failed MAIN + dnssec fail on A for a-unsec.test.ex diff --git a/test/stdout/4800 b/test/stdout/4800 new file mode 100644 index 000000000..67fea4313 --- /dev/null +++ b/test/stdout/4800 @@ -0,0 +1,12 @@ +user@mx-unsec-a-unsec.test.ex + router = dnslookup, transport = smtp + host a-unsec.test.ex [V4NET.0.0.100] MX=5 ad=no +user@mx-unsec-a-sec.test.ex + router = dnslookup, transport = smtp + host a-sec.test.ex [V4NET.0.0.100] MX=5 ad=no +user@mx-sec-a-unsec.test.ex + router = dnslookup, transport = smtp + host a-unsec.test.ex [V4NET.0.0.100] MX=5 ad=no +user@mx-sec-a-sec.test.ex + router = dnslookup, transport = smtp + host a-sec.test.ex [V4NET.0.0.100] MX=5 ad=yes diff --git a/test/stdout/4801 b/test/stdout/4801 new file mode 100644 index 000000000..3b06a2f02 --- /dev/null +++ b/test/stdout/4801 @@ -0,0 +1,6 @@ +user@mx-unsec-a-unsec.test.ex cannot be resolved at this time: host lookup did not complete +user@mx-unsec-a-sec.test.ex cannot be resolved at this time: host lookup did not complete +user@mx-sec-a-unsec.test.ex is undeliverable: all relevant MX records point to non-existent hosts +user@mx-sec-a-sec.test.ex + router = dnslookup, transport = smtp + host a-sec.test.ex [V4NET.0.0.100] MX=5 ad=yes