X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/67794d2b830fc580f87b0635718d95e32b467be1..79e5ebf9e9bb833ce004be65c04b2f8eea91c337:/src/src/spf.c diff --git a/src/src/spf.c b/src/src/spf.c index 9b053ccf9..fd9831c43 100644 --- a/src/src/spf.c +++ b/src/src/spf.c @@ -72,6 +72,18 @@ int dns_rc; DEBUG(D_receive) debug_printf("SPF_dns_exim_lookup '%s'\n", domain); +/* Shortcircuit SPF RR lookups by returning HOST_NOT_FOUND (shortest code path +in libspf2). They were obsoleted by RFC 6686/7208 years ago. see bug #1294 +*/ + +if (rr_type == T_SPF) + { + HDEBUG(D_host_lookup) debug_printf("faking HOST_NOT_FOUND for SPF RR(99) lookup\n"); + srr.herrno = HOST_NOT_FOUND; + SPF_dns_rr_dup(&spfrr, &srr); + return spfrr; + } + switch (dns_rc = dns_lookup(dnsa, US domain, rr_type, NULL)) { case DNS_SUCCEED: srr.herrno = NETDB_SUCCESS; break;