aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-09-30 12:36:25 +0200
committerAndrew Lewis <nerf@judo.za.org>2016-09-30 12:36:25 +0200
commitebd2a08ccc5c72c2302f5550983025958b434f5d (patch)
tree4b3d6518c91bd295639b92ea889eff8a95f1643d /src/plugins
parentac77a153fea7cfc809ce6a546f2eb4fccf3cbd53 (diff)
downloadrspamd-ebd2a08ccc5c72c2302f5550983025958b434f5d.tar.gz
rspamd-ebd2a08ccc5c72c2302f5550983025958b434f5d.zip
[Minor] SPF: Make (almost) all unresolveable records PERMFAIL
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/spf.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/plugins/spf.c b/src/plugins/spf.c
index 99d09fd01..aa09eecac 100644
--- a/src/plugins/spf.c
+++ b/src/plugins/spf.c
@@ -397,7 +397,12 @@ spf_check_element (struct spf_resolved *rec, struct spf_addr *addr,
spf_result[0] = '-';
spf_message = "(SPF): spf fail";
if (addr->flags & RSPAMD_SPF_FLAG_ANY) {
- if (rec->temp_failed) {
+ if (rec->perm_failed) {
+ msg_info_task ("do not apply SPF failed policy, as we have "
+ "some addresses unresolved");
+ spf_symbol = spf_module_ctx->symbol_permfail;
+ }
+ else if (rec->temp_failed) {
msg_info_task ("do not apply SPF failed policy, as we have "
"some addresses unresolved");
spf_symbol = spf_module_ctx->symbol_dnsfail;
@@ -411,7 +416,12 @@ spf_check_element (struct spf_resolved *rec, struct spf_addr *addr,
spf_result[0] = '~';
if (addr->flags & RSPAMD_SPF_FLAG_ANY) {
- if (rec->temp_failed) {
+ if (rec->perm_failed) {
+ msg_info_task ("do not apply SPF failed policy, as we have "
+ "some addresses unresolved");
+ spf_symbol = spf_module_ctx->symbol_permfail;
+ }
+ else if (rec->temp_failed) {
msg_info_task ("do not apply SPF failed policy, as we have "
"some addresses unresolved");
spf_symbol = spf_module_ctx->symbol_dnsfail;
@@ -478,7 +488,7 @@ spf_plugin_callback (struct spf_resolved *record, struct rspamd_task *task,
1,
NULL);
}
- else if (record && record->perm_failed) {
+ else if (record && record->elts->len == 0 && record->perm_failed) {
rspamd_task_insert_result (task,
spf_module_ctx->symbol_permfail,
1,