diff options
Diffstat (limited to 'src/libserver/spf.c')
-rw-r--r-- | src/libserver/spf.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/libserver/spf.c b/src/libserver/spf.c index 2d6f864ba..5eb8dbd1c 100644 --- a/src/libserver/spf.c +++ b/src/libserver/spf.c @@ -670,11 +670,8 @@ spf_record_dns_callback (struct rdns_reply *reply, gpointer arg) break; case SPF_RESOLVE_REDIRECT: if (elt_data->type == RDNS_REQUEST_TXT) { - if (spf_process_txt_record (rec, cb->resolved, reply)) { - cb->addr->flags |= RSPAMD_SPF_FLAG_RESOLVED; - } - else { - cb->addr->flags &= ~RSPAMD_SPF_FLAG_RESOLVED; + cb->addr->flags |= RSPAMD_SPF_FLAG_RESOLVED; + if (!spf_process_txt_record (rec, cb->resolved, reply)) { cb->addr->flags |= RSPAMD_SPF_FLAG_PERMFAIL; } } @@ -683,12 +680,8 @@ spf_record_dns_callback (struct rdns_reply *reply, gpointer arg) break; case SPF_RESOLVE_INCLUDE: if (elt_data->type == RDNS_REQUEST_TXT) { - if (spf_process_txt_record (rec, cb->resolved, reply)) { - cb->addr->flags |= RSPAMD_SPF_FLAG_RESOLVED; - } - else { - cb->addr->flags &= ~RSPAMD_SPF_FLAG_RESOLVED; - } + cb->addr->flags |= RSPAMD_SPF_FLAG_RESOLVED; + spf_process_txt_record (rec, cb->resolved, reply); } goto end; |