commit 38a7c90: [Fix] Fix DMARC_NA behaviour in case of no valid policies

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Sep 2 11:49:04 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-09-02 12:43:39 +0100
URL: https://github.com/rspamd/rspamd/commit/38a7c9073a03014a2a46ef02bea227775a8b3863 (HEAD -> master)

[Fix] Fix DMARC_NA behaviour in case of no valid policies
Issue: #2955
Submitted by: @mguesdon

---
 src/plugins/lua/dmarc.lua | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua
index e9524c0b5..b2175a331 100644
--- a/src/plugins/lua/dmarc.lua
+++ b/src/plugins/lua/dmarc.lua
@@ -663,6 +663,11 @@ local function dmarc_callback(task)
               end
             end
           end
+
+          if not has_valid_policy then
+            policy_target.err = lookup_domain .. ':' .. ' no valid DMARC record'
+            policy_target.symbol = dmarc_symbols['na']
+          end
         end
       end
 


More information about the Commits mailing list