rc = verify_check_this_host(&arg, sender_host_cache, NULL,
(sender_host_address == NULL)? US"" : sender_host_address,
CUSS &host_data);
- if (host_data != NULL) host_data = string_copy_malloc(host_data);
+ if (rc == DEFER) *log_msgptr = search_error_message;
+ if (host_data) host_data = string_copy_malloc(host_data);
break;
case ACLC_LOCAL_PARTS:
int sep = 0;
const uschar *s = arg;
uschar *ss;
- while ((ss = string_nextinlist(&s, &sep, big_buffer, big_buffer_size))
- != NULL)
+ while ((ss = string_nextinlist(&s, &sep, big_buffer, big_buffer_size)))
{
if (Ustrcmp(ss, "main") == 0) logbits |= LOG_MAIN;
else if (Ustrcmp(ss, "panic") == 0) logbits |= LOG_PANIC;
switch (error_num)
{
case HOST_NOT_FOUND: error = US"HOST_NOT_FOUND"; break;
- case TRY_AGAIN: error = US"TRY_AGAIN"; break;
- case NO_RECOVERY: error = US"NO_RECOVERY"; break;
- case NO_DATA: error = US"NO_DATA"; break;
+ case TRY_AGAIN: error = US"TRY_AGAIN"; break;
+ case NO_RECOVERY: error = US"NO_RECOVERY"; break;
+ case NO_DATA: error = US"NO_DATA"; break;
#if NO_DATA != NO_ADDRESS
- case NO_ADDRESS: error = US"NO_ADDRESS"; break;
+ case NO_ADDRESS: error = US"NO_ADDRESS"; break;
#endif
default: error = US"?"; break;
}
case DEFER:
if (error == NULL)
- error = string_sprintf("DNS lookup of %s deferred", ss);
+ error = string_sprintf("DNS lookup of \"%s\" deferred", ss);
if (ignore_defer)
{
HDEBUG(D_lists) debug_printf("%s: item ignored by +ignore_defer\n",
log_write(0, LOG_MAIN, "%s: accepted by +include_defer", error);
return OK;
}
+ if (!search_error_message) search_error_message = error;
goto DEFER_RETURN;
/* The ERROR return occurs when checking hosts, when either a forward
--- /dev/null
+# Exim test configuration 0605
+
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/SERVER%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+
+# ----- Main settings -----
+
+acl_smtp_rcpt = accept hosts = test.again.dns
+
+queue_only
+
+# End
+
--- /dev/null
+# dns retry in hostlist
+# Exim test configuration 0605
+#
+#
+exim -bh HOSTIPV4
+helo test
+mail from:<ralph@dustyshoes.tld>
+rcpt to:<bob@anotherone.tld>
+quit
+****
>>> processing "deny"
>>> check hosts = +include_defer : test.again.dns
>>> test.again.dns in dns_again_means_nonexist? no (option unset)
-LOG: DNS lookup of test.again.dns deferred: accepted by +include_defer
+LOG: DNS lookup of "test.again.dns" deferred: accepted by +include_defer
>>> deny: condition test succeeded in ACL "check_recipienta"
>>> end of ACL "check_recipienta": DENY
LOG: H=[V4NET.0.0.13] F=<userx@myhost.test.ex> rejected RCPT <a@test.ex>
>>> test.again.dns in dns_again_means_nonexist? no (option unset)
>>> host in "test.again.dns : V4NET.0.0.13"? list match deferred for test.again.dns
>>> accept: condition test deferred in ACL "check_recipientb"
-LOG: H=[V4NET.0.0.13] F=<userx@test.ex> temporarily rejected RCPT <b@test.ex>
+LOG: H=[V4NET.0.0.13] F=<userx@test.ex> temporarily rejected RCPT <b@test.ex>: DNS lookup of "test.again.dns" deferred
>>> host in hosts_connection_nolog? no (option unset)
>>> host in host_lookup? no (option unset)
>>> host in host_reject_connection? no (option unset)
>>> processing "accept"
>>> check hosts = +ignore_defer : test.again.dns : V4NET.0.0.13
>>> test.again.dns in dns_again_means_nonexist? no (option unset)
->>> DNS lookup of test.again.dns deferred: item ignored by +ignore_defer
+>>> DNS lookup of "test.again.dns" deferred: item ignored by +ignore_defer
>>> host in "+ignore_defer : test.again.dns : V4NET.0.0.13"? yes (matched "V4NET.0.0.13")
>>> accept: condition test succeeded in ACL "check_recipientc"
>>> end of ACL "check_recipientc": ACCEPT
--- /dev/null
+>>> 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)
+>>> test in helo_lookup_domains? no (end of list)
+>>> processing "accept"
+>>> check hosts = test.again.dns
+>>> test.again.dns in dns_again_means_nonexist? no (option unset)
+>>> host in "test.again.dns"? list match deferred for test.again.dns
+>>> accept: condition test deferred in inline ACL
+LOG: H=(test) [ip4.ip4.ip4.ip4] F=<ralph@dustyshoes.tld> temporarily rejected RCPT <bob@anotherone.tld>: DNS lookup of "test.again.dns" deferred
--- /dev/null
+
+**** SMTP testing session as if from host ip4.ip4.ip4.ip4
+**** 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\r
+250 the.local.host.name Hello test [ip4.ip4.ip4.ip4]\r
+250 OK\r
+451 Temporary local problem - please try later\r
+221 the.local.host.name closing connection\r