diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-08-30 22:48:13 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-08-30 22:48:13 +0200 |
commit | 29a701bbd03931a9d5cff1e75927b9171371227d (patch) | |
tree | e2ccbc3d4315675e8702037edc8edcf7a3c70411 /src | |
parent | 4cda052e317aecc95842c5c650591cdb9d1965a8 (diff) | |
download | rspamd-29a701bbd03931a9d5cff1e75927b9171371227d.tar.gz rspamd-29a701bbd03931a9d5cff1e75927b9171371227d.zip |
[Minor] Fix forcing actions in DMARC plugin
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/dmarc.lua | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua index 1c290b31f..fc85c4766 100644 --- a/src/plugins/lua/dmarc.lua +++ b/src/plugins/lua/dmarc.lua @@ -55,13 +55,6 @@ local elts_re = rspamd_regexp.create_cached("\\s*\\\\{0,1};\\s*") local dmarc_reporting = false local dmarc_actions = {} -local function maybe_force_action(disposition) - local force_action = dmarc_actions[disposition] - if force_action then - task:set_pre_result(force_action, 'Action set by DMARC') - end -end - local function dmarc_report(task, spf_ok, dkim_ok, disposition) local ip = task:get_from_ip() if not ip:is_valid() then @@ -75,6 +68,12 @@ local function dmarc_report(task, spf_ok, dkim_ok, disposition) end local function dmarc_callback(task) + local function maybe_force_action(disposition) + local force_action = dmarc_actions[disposition] + if force_action then + task:set_pre_result(force_action, 'Action set by DMARC') + end + end local from = task:get_from(2) local dmarc_domain local ip_addr = task:get_ip() |