diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-15 22:06:27 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-15 22:06:27 +0000 |
commit | 6ef35e3b2219338be95a1f1fc31f77c5c8cbed29 (patch) | |
tree | cfeb39368ff3a43bf12e0f268a020a90afb2a297 /src/plugins | |
parent | 734034db2f98ae71cc7b53ad4d8d56b295a72a0b (diff) | |
download | rspamd-6ef35e3b2219338be95a1f1fc31f77c5c8cbed29.tar.gz rspamd-6ef35e3b2219338be95a1f1fc31f77c5c8cbed29.zip |
Ignore SPF results in case of DNS failure
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/spf.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/plugins/spf.c b/src/plugins/spf.c index d7f1031c7..583a46a44 100644 --- a/src/plugins/spf.c +++ b/src/plugins/spf.c @@ -386,12 +386,18 @@ spf_check_list (struct spf_resolved *rec, struct rspamd_task *task) guint i; struct spf_addr *addr; - for (i = 0; i < rec->elts->len; i ++) { - addr = &g_array_index (rec->elts, struct spf_addr, i); - if (spf_check_element (addr, task)) { - break; + if (!rec->failed) { + for (i = 0; i < rec->elts->len; i ++) { + addr = &g_array_index (rec->elts, struct spf_addr, i); + if (spf_check_element (addr, task)) { + break; + } } } + else { + msg_info_task ("<%s>: ignore spf results due to DNS failure", + task->message_id); + } } static void |