diff options
author | Wolfgang Breyha <wbreyha@gmx.net> | 2020-01-02 13:27:25 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2020-01-07 13:14:01 +0000 |
commit | 79e5ebf9e9bb833ce004be65c04b2f8eea91c337 (patch) | |
tree | 852ea3edec0d064881cc177c2bd0819c1ccda8dc /src | |
parent | 67794d2b830fc580f87b0635718d95e32b467be1 (diff) |
SPF: shortcircuit SPF RR lookups. Bug 1294
Diffstat (limited to 'src')
-rw-r--r-- | src/src/spf.c | 12 |
1 files changed, 12 insertions, 0 deletions
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; |