JH/17 Fakereject: previously logged as a norml message arrival "<="; now
distinguished as "(=".
+JH/18 Bug 1867: make the fail_defer_domains option on a dnslookup router work
+ for missing MX records. Previously it only worked for missing A records.
+
Exim version 4.87
-----------------
if (rc != HOST_FIND_FAILED) break;
+ if (ob->fail_defer_domains)
+ switch(match_isinlist(fully_qualified_name,
+ CUSS &ob->fail_defer_domains, 0,
+ &domainlist_anchor, addr->domain_cache, MCL_DOMAIN, TRUE, NULL))
+ {
+ case DEFER:
+ addr->message = US"lookup defer for fail_defer_domains option";
+ return DEFER;
+
+ case OK:
+ DEBUG(D_route) debug_printf("%s router: matched fail_defer_domains\n",
+ rblock->name);
+ addr->message = US"missing MX, or all MXs point to missing A records,"
+ " and defer requested";
+ return DEFER;
+ }
/* Check to see if the failure is the result of MX records pointing to
non-existent domains, and if so, set an appropriate error message; the case
of an MX or SRV record pointing to "." is another special case that we can
addr->message);
}
}
- if (ob->fail_defer_domains)
- {
- switch(match_isinlist(fully_qualified_name,
- CUSS &ob->fail_defer_domains, 0,
- &domainlist_anchor, addr->domain_cache, MCL_DOMAIN, TRUE, NULL))
- {
- case DEFER:
- addr->message = US"lookup defer for fail_defer_domains";
- return DEFER;
-
- case OK:
- DEBUG(D_route) debug_printf("%s router: matched fail_defer_domains\n",
- rblock->name);
- return DEFER;
- }
- }
return DECLINE;
}
string_is_utf8(const uschar * s)
{
uschar c;
-while ((c = *s++)) if (c & 0x80) return TRUE;
+if (s) while ((c = *s++)) if (c & 0x80) return TRUE;
return FALSE;
}
bydns:
driver = dnslookup
- domains = mxt2.test.ex
+ domains = mxt2.test.ex : mxnonexist.test.ex
transport = smtp
fail_defer_domains = *
1999-03-02 09:44:33 10HmbC-0005vi-00 no IP address found for host nonexist.test.ex
1999-03-02 09:44:33 10HmbC-0005vi-00 == userx@nonexist R=all defer (-32): lookup of host "nonexist.test.ex" failed in all router
1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss for userx@mxt2.test.ex
-1999-03-02 09:44:33 10HmbD-0005vi-00 == userx@mxt2.test.ex R=bydns defer (-32): all relevant MX records point to non-existent hosts
+1999-03-02 09:44:33 10HmbD-0005vi-00 == userx@mxt2.test.ex R=bydns defer (-1): missing MX, or all MXs point to missing A records, and defer requested
+1999-03-02 09:44:33 10HmbE-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss for userx@mxnonexist.test.ex
+1999-03-02 09:44:33 10HmbE-0005vi-00 == userx@mxnonexist.test.ex R=bydns defer (-1): missing MX, or all MXs point to missing A records, and defer requested
****
dump retry
#
-# one for a lookup-failure (in manualroute)
+# a lookup-failure (in manualroute)
exim -odi userx@nonexist
Test message
****
-# one for a lookup-failure (in dnslookup)
+# a lookup-failure (good MX, missing A) in dnslookup, deferred
exim -odi userx@mxt2.test.ex
Test message
****
+# a lookup-failure (missing MX) in dnslookup, deferred
+exim -odi userx@mxnonexist.test.ex
+Test message
+****
dump retry
#
#
T:thisloop.test.ex:999 dd 65 Connection refused
first failed = time last try = time2 next try = time2 + 900
+++++++++++++++++++++++++++
- R:mxt2.test.ex -32 0 all relevant MX records point to non-existent hosts
-first failed = time last try = time2 next try = time2 + 1800
+ R:mxnonexist.test.ex -1 0 missing MX, or all MXs point to missing A records, and defer requested
+first failed = time last try = time2 next try = time2 + 900
+ R:mxt2.test.ex -1 0 missing MX, or all MXs point to missing A records, and defer requested
+first failed = time last try = time2 next try = time2 + 900
R:nonexist -32 0 lookup of host "nonexist.test.ex" failed in all router
first failed = time last try = time2 next try = time2 + 1800
T:thishost.test.ex:127.0.0.1:999 dd 65 Connection refused