From 6c0e2ece642fdfd3dbbea5fa96c4e69e2f9831ec Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Wed, 21 Sep 2016 14:55:08 +0200 Subject: [PATCH] [Fix] Yield R_SPF_DNSFAIL if lookup of included record fails --- src/libserver/spf.c | 1 + src/plugins/spf.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libserver/spf.c b/src/libserver/spf.c index a4870f294..95bcc7628 100644 --- a/src/libserver/spf.c +++ b/src/libserver/spf.c @@ -729,6 +729,7 @@ spf_record_dns_callback (struct rdns_reply *reply, gpointer arg) cb->rec->sender_domain, cb->resolved->cur_domain); cb->addr->flags &= ~RSPAMD_SPF_FLAG_PARSED; + cb->addr->flags |= RSPAMD_SPF_FLAG_TEMPFAIL; break; case SPF_RESOLVE_EXP: break; diff --git a/src/plugins/spf.c b/src/plugins/spf.c index bc05cd9fe..6d5517db9 100644 --- a/src/plugins/spf.c +++ b/src/plugins/spf.c @@ -442,7 +442,7 @@ spf_plugin_callback (struct spf_resolved *record, struct rspamd_task *task, struct spf_resolved *l; struct rspamd_async_watcher *w = ud; - if (record && record->elts->len == 0) { + if (record && record->elts->len == 0 && !record->failed) { rspamd_task_insert_result (task, spf_module_ctx->symbol_na, 1, -- 2.39.5