diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-04-07 09:55:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-07 09:55:10 +0100 |
commit | 11458a1123d3a89fa0fe8f07a8b5e57f0c99ad6b (patch) | |
tree | 0333f30e2e4910a3088c63b5cf1f28b7567b27ba | |
parent | 273390cf62b08ebf1261694444a92b156dc9661a (diff) | |
parent | 8f96812cdc2a9dbbd1921edf6642488716aa46cc (diff) | |
download | rspamd-11458a1123d3a89fa0fe8f07a8b5e57f0c99ad6b.tar.gz rspamd-11458a1123d3a89fa0fe8f07a8b5e57f0c99ad6b.zip |
Merge pull request #3708 from fatalbanana/clickhouse_nn
[Minor] rspamadm clickhouse : small fixes
-rw-r--r-- | lualib/rspamadm/clickhouse.lua | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lualib/rspamadm/clickhouse.lua b/lualib/rspamadm/clickhouse.lua index e09f866e8..f0faff9aa 100644 --- a/lualib/rspamadm/clickhouse.lua +++ b/lualib/rspamadm/clickhouse.lua @@ -172,7 +172,7 @@ local function get_excluded_symbols(known_symbols, correlations, seen_total) local composites = rspamd_config:get_all_opt('composites') local all_symbols = rspamd_config:get_symbols() local skip_flags = { - no_stat = true, + nostat = true, skip = true, idempotent = true, composite = true, @@ -189,17 +189,19 @@ local function get_excluded_symbols(known_symbols, correlations, seen_total) if composites[k] then remove[k] = 'composite symbol' - elseif all_symbols[k] then + elseif lower_count / higher_count >= 0.95 then + remove[k] = 'weak ham/spam correlation' + elseif v.seen / seen_total >= 0.9 then + remove[k] = 'omnipresent symbol' + elseif not all_symbols[k] then + remove[k] = 'nonexistent symbol' + else for fl,_ in pairs(all_symbols[k].flags or {}) do if skip_flags[fl] then remove[k] = fl .. ' symbol' break end end - elseif lower_count / higher_count >= 0.95 then - remove[k] = 'weak ham/spam correlation' - elseif v.seen / seen_total >= 0.9 then - remove[k] = 'omnipresent symbol' end known_symbols_list[v.id] = { seen = v.seen, @@ -410,6 +412,7 @@ local function handle_neural_train(args) end -- Generate symbols digest + table.sort(symbols_profile) local symbols_digest = lua_util.table_digest(symbols_profile) -- Create list of days to query data for local query_days = days_list(args.days) |