diff options
author | Andrew Lewis <nerf@judo.za.org> | 2017-01-17 11:16:34 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2017-01-17 11:25:30 +0200 |
commit | 69d3b4e5bf7d51955678476044b180a4c29ad48f (patch) | |
tree | 91db2a1413b4d151f92c0e0fa6966179fb278e08 | |
parent | 87e155bad8691d417dd281f1b5735f8b5328b473 (diff) | |
download | rspamd-69d3b4e5bf7d51955678476044b180a4c29ad48f.tar.gz rspamd-69d3b4e5bf7d51955678476044b180a4c29ad48f.zip |
[Minor] DMARC: always return policy
-rw-r--r-- | src/plugins/lua/dmarc.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua index 14e7bc52d..36a13d1b9 100644 --- a/src/plugins/lua/dmarc.lua +++ b/src/plugins/lua/dmarc.lua @@ -306,21 +306,21 @@ local function dmarc_callback(task) local spf_tmpfail = task:get_symbol(symbols['spf_tempfail_symbol']) local dkim_tmpfail = task:get_symbol(symbols['dkim_tempfail_symbol']) if (spf_tmpfail or dkim_tmpfail) then - task:insert_result(dmarc_symbols['dnsfail'], 1.0, lookup_domain .. ' : ' .. 'SPF/DKIM temp error') + task:insert_result(dmarc_symbols['dnsfail'], 1.0, lookup_domain .. ' : ' .. 'SPF/DKIM temp error', dmarc_policy) return maybe_force_action('dnsfail') end if dmarc_policy == 'quarantine' then if not pct or pct == 100 or (math.random(100) <= pct) then - task:insert_result(dmarc_symbols['quarantine'], res, lookup_domain .. ' : ' .. reason_str) + task:insert_result(dmarc_symbols['quarantine'], res, lookup_domain .. ' : ' .. reason_str, dmarc_policy) disposition = "quarantine" end elseif dmarc_policy == 'reject' then if not pct or pct == 100 or (math.random(100) <= pct) then - task:insert_result(dmarc_symbols['reject'], res, lookup_domain .. ' : ' .. reason_str) + task:insert_result(dmarc_symbols['reject'], res, lookup_domain .. ' : ' .. reason_str, dmarc_policy) disposition = "reject" end else - task:insert_result(dmarc_symbols['softfail'], res, lookup_domain .. ' : ' .. reason_str) + task:insert_result(dmarc_symbols['softfail'], res, lookup_domain .. ' : ' .. reason_str, dmarc_policy) end else task:insert_result(dmarc_symbols['allow'], res, lookup_domain, dmarc_policy) |