From 7f169bd819f5b35cd3237308b3e4441cc02934ff Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 11 Jul 2018 21:29:16 +0100 Subject: [Minor] Avoid pre-result overriding --- src/plugins/lua/dmarc.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/lua/dmarc.lua') diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua index 53ece7aa4..a7f53b6b2 100644 --- a/src/plugins/lua/dmarc.lua +++ b/src/plugins/lua/dmarc.lua @@ -198,6 +198,8 @@ local function dmarc_callback(task) local function maybe_force_action(disposition) local force_action = dmarc_actions[disposition] if force_action then + -- Don't do anything if pre-result has been already set + if task:has_pre_result() then return end task:set_pre_result(force_action, 'Action set by DMARC') end end -- cgit v1.2.3