]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix DMARC_NA behaviour in case of no valid policies
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 2 Sep 2019 11:43:39 +0000 (12:43 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 2 Sep 2019 11:43:39 +0000 (12:43 +0100)
Issue: #2955
Submitted by: @mguesdon

src/plugins/lua/dmarc.lua

index e9524c0b501ac3cda243a8e2dd3652222a2243be..b2175a331e646b31ff2902d3456f44709bd2b1ee 100644 (file)
@@ -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