diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-12-02 15:17:01 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-12-02 15:17:01 +0000 |
commit | 5f116f6edbeffd33ef0cbdbaf893c2587f4ae784 (patch) | |
tree | 7c544cf87cdfdef8457c76936495ccab1be367d5 /src | |
parent | 0bf45936043f24d24c79bc960641f9efd5df0312 (diff) | |
download | rspamd-5f116f6edbeffd33ef0cbdbaf893c2587f4ae784.tar.gz rspamd-5f116f6edbeffd33ef0cbdbaf893c2587f4ae784.zip |
[Minor] Fix dmarc after change
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/dkim_check.c | 3 | ||||
-rw-r--r-- | src/plugins/lua/dmarc.lua | 2 | ||||
-rw-r--r-- | src/plugins/lua/spf.lua | 4 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c index 3a88d9bb6..133feef2f 100644 --- a/src/plugins/dkim_check.c +++ b/src/plugins/dkim_check.c @@ -1121,7 +1121,8 @@ dkim_symbol_callback (struct rspamd_task *task, GError *err = NULL; struct rspamd_mime_header *rh, *rh_cur; struct dkim_check_result *res = NULL, *cur; - guint checked = 0, *dmarc_checks; + guint checked = 0; + gdouble *dmarc_checks; struct dkim_ctx *dkim_module_ctx = dkim_get_context (task->cfg); /* Allow dmarc */ 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) |