From 5f116f6edbeffd33ef0cbdbaf893c2587f4ae784 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 2 Dec 2019 15:17:01 +0000 Subject: [Minor] Fix dmarc after change --- src/plugins/lua/dmarc.lua | 2 +- src/plugins/lua/spf.lua | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/plugins/lua') diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua index c2fc4d9bb..08d9732d9 100644 --- a/src/plugins/lua/dmarc.lua +++ b/src/plugins/lua/dmarc.lua @@ -559,7 +559,7 @@ local function dmarc_callback(task) local hfromdom = ((from or E)[1] or E).domain local dmarc_domain local ip_addr = task:get_ip() - local dmarc_checks = task:get_mempool():get_variable('dmarc_checks', 'int') or 0 + local dmarc_checks = task:get_mempool():get_variable('dmarc_checks', 'double') or 0 local seen_invalid = false if dmarc_checks ~= 2 then diff --git a/src/plugins/lua/spf.lua b/src/plugins/lua/spf.lua index 2e4492b33..62f147f91 100644 --- a/src/plugins/lua/spf.lua +++ b/src/plugins/lua/spf.lua @@ -126,6 +126,10 @@ local function spf_check_callback(task) local sym = flag_to_symbol(flags) task:insert_result(sym, 1.0, err) end + + local dmarc_checks = task:get_mempool():get_variable('dmarc_checks', 'double') or 0 + dmarc_checks = dmarc_checks + 1 + task:get_mempool():set_variable('dmarc_checks', dmarc_checks) end rspamd_spf.resolve(task, spf_resolved_cb) -- cgit v1.2.3