From d7917e831cfc1c34ce2631059efb610797729b5d Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 19 Jan 2016 20:55:54 +0000 Subject: [PATCH] Always treat DNS timeouts as temporary fail for SPF --- src/libserver/spf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libserver/spf.c b/src/libserver/spf.c index e9c805d6e..cef96e0b8 100644 --- a/src/libserver/spf.c +++ b/src/libserver/spf.c @@ -703,8 +703,9 @@ spf_record_dns_callback (struct rdns_reply *reply, gpointer arg) break; } } - else if (cb->cur_action == SPF_RESOLVE_INCLUDE || - cb->cur_action == SPF_RESOLVE_REDIRECT) { + else if ((cb->cur_action == SPF_RESOLVE_INCLUDE || + cb->cur_action == SPF_RESOLVE_REDIRECT) || + reply->code == RDNS_RC_TIMEOUT) { cb->addr->flags |= RSPAMD_SPF_FLAG_TEMPFAIL; msg_info_spf ( "<%s>: spf error for domain %s: cannot resolve DNS record for" -- 2.39.5