X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/7cd171b76e5bd3cb825c2a8720bc1fe4ad9b37e0..2546388c27720eaaada4bb63574ba1f32e6ddf4e:/src/src/routers/dnslookup.c diff --git a/src/src/routers/dnslookup.c b/src/src/routers/dnslookup.c index b4ad5eafd..e4f7a2539 100644 --- a/src/src/routers/dnslookup.c +++ b/src/src/routers/dnslookup.c @@ -2,7 +2,7 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2009 */ +/* Copyright (c) University of Cambridge 1995 - 2015 */ /* See the file NOTICE for conditions of use and distribution. */ #include "../exim.h" @@ -291,6 +291,11 @@ for (;;) /* Deferral returns forthwith, and anything other than failure breaks the loop. */ + if (rc == HOST_FIND_SECURITY) + { + addr->message = US"host lookup done insecurely"; + return DEFER; + } if (rc == HOST_FIND_AGAIN) { if (rblock->pass_on_timeout) @@ -305,6 +310,22 @@ for (;;) 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 @@ -335,22 +356,6 @@ for (;;) 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; }