aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/rspamadm
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-04-06 14:29:30 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-04-06 14:29:30 +0100
commit2599241bba1788d902398a637d6657e816193c21 (patch)
treef57d812597815e9009d6cf1bbdff528163a635e3 /lualib/rspamadm
parentfd05dc559036804f5a1c3503d957ac53ef5fcaa4 (diff)
downloadrspamd-2599241bba1788d902398a637d6657e816193c21.tar.gz
rspamd-2599241bba1788d902398a637d6657e816193c21.zip
[Minor] Rspamadm: Exclude nostat symbols
Diffstat (limited to 'lualib/rspamadm')
-rw-r--r--lualib/rspamadm/clickhouse.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/lualib/rspamadm/clickhouse.lua b/lualib/rspamadm/clickhouse.lua
index 899fbd51c..2571664a8 100644
--- a/lualib/rspamadm/clickhouse.lua
+++ b/lualib/rspamadm/clickhouse.lua
@@ -168,6 +168,7 @@ local function get_excluded_symbols(known_symbols, correlations, seen_total)
local remove = {}
local known_symbols_list = {}
local composites = rspamd_config:get_all_opt('composites')
+ local all_symbols = rspamd_config:get_symbols()
for k, v in pairs(known_symbols) do
local lower_count, higher_count
if v.seen_spam > v.seen_ham then
@@ -179,6 +180,8 @@ local function get_excluded_symbols(known_symbols, correlations, seen_total)
end
if composites[k] then
remove[k] = 'composite symbol'
+ elseif (all_symbols[k] or {flags = {}}).flags.nostat then
+ remove[k] = 'nostat symbol'
elseif lower_count / higher_count >= 0.95 then
remove[k] = 'weak ham/spam correlation'
elseif v.seen / seen_total >= 0.9 then