diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-10-03 16:17:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-03 16:17:07 +0100 |
commit | 6f4826ce47e641aadeee889cc1badac98c464673 (patch) | |
tree | 392f845b16278a125c18b0952371c639788f6004 /src | |
parent | cf3bb83a7c095269368c662e50d8e79eb70651e9 (diff) | |
parent | 6d183977c8dbb26ddf478b53308eb6ce9352d214 (diff) | |
download | rspamd-6f4826ce47e641aadeee889cc1badac98c464673.tar.gz rspamd-6f4826ce47e641aadeee889cc1badac98c464673.zip |
Merge pull request #998 from fatalbanana/spf
[Minor] Fix a SPF_DNSFAIL case
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/spf.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libserver/spf.c b/src/libserver/spf.c index d5ca24cc9..2d6f864ba 100644 --- a/src/libserver/spf.c +++ b/src/libserver/spf.c @@ -1876,6 +1876,14 @@ spf_dns_callback (struct rdns_reply *reply, gpointer arg) addr->flags |= RSPAMD_SPF_FLAG_NA; g_ptr_array_insert (resolved->elts, 0, addr); } + else if (reply->code != RDNS_RC_NOREC && reply->code != RDNS_RC_NXDOMAIN + && rec->dns_requests == 0) { + resolved = rspamd_spf_new_addr_list (rec, rec->sender_domain); + addr = g_slice_alloc0 (sizeof(*addr)); + addr->flags = 0; + addr->flags |= RSPAMD_SPF_FLAG_TEMPFAIL; + g_ptr_array_insert (resolved->elts, 0, addr); + } if (resolved) { if (!spf_process_txt_record (rec, resolved, reply)) { |