From a411a357b92966e9f785f23ff3f845969deef48e Mon Sep 17 00:00:00 2001 From: Michael Kuron Date: Wed, 20 Sep 2017 15:19:43 +0200 Subject: [PATCH] rspamd: exclude Mail Flow monitoring from logs and stats --- data/conf/rspamd/lua/rspamd.local.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/data/conf/rspamd/lua/rspamd.local.lua b/data/conf/rspamd/lua/rspamd.local.lua index 62383707..d44f0feb 100644 --- a/data/conf/rspamd/lua/rspamd.local.lua +++ b/data/conf/rspamd/lua/rspamd.local.lua @@ -107,4 +107,16 @@ rspamd_config:register_symbol({ return true end, priority = 20 -}) \ No newline at end of file +}) + +rspamd_config:register_symbol({ + name = 'NO_LOG_STAT_MAILFLOW', + type = 'postfilter', + callback = function(task) + local sender = task:get_header('From') + if sender == 'monitoring-system@everycloudtech.us' then + task:set_flag('no_log') + task:set_flag('no_stat') + end + end +})