summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/src/host.c7
-rw-r--r--test/confs/480010
-rw-r--r--test/confs/480110
-rw-r--r--test/dnszones-src/db.test.ex10
-rw-r--r--test/scripts/4800-dnssec-dnslookup/48009
-rw-r--r--test/scripts/4800-dnssec-dnslookup/480112
-rw-r--r--test/scripts/4800-dnssec-dnslookup/REQUIRES2
-rw-r--r--test/stderr/48016
-rw-r--r--test/stdout/480012
-rw-r--r--test/stdout/48016
10 files changed, 80 insertions, 4 deletions
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