]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Return policy in DMARC_POLICY_ACCEPT options 973/head
authorAndrew Lewis <nerf@judo.za.org>
Wed, 21 Sep 2016 11:30:18 +0000 (13:30 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Wed, 21 Sep 2016 11:49:48 +0000 (13:49 +0200)
src/plugins/lua/dmarc.lua

index 350c66072cbd59bca71dafbe4be7bbfec51667c6..718eb309b969e2daf081eba960f053cd7f1a0a19 100644 (file)
@@ -306,7 +306,13 @@ local function dmarc_callback(task)
         task:insert_result(dmarc_symbols['softfail'], res, lookup_domain .. ' : ' .. reason_str)
       end
     else
-      task:insert_result(dmarc_symbols['allow'], res, lookup_domain)
+      local real_policy = 'none'
+      if strict_policy then
+        real_policy = 'reject'
+      elseif quarantine_policy then
+        real_policy = 'quarantine'
+      end
+      task:insert_result(dmarc_symbols['allow'], res, lookup_domain, real_policy)
     end
 
     if rua and redis_params and dmarc_reporting then