commit 2599241: [Minor] Rspamadm: Exclude nostat symbols

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Apr 6 13:35:05 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-04-06 14:29:30 +0100
URL: https://github.com/rspamd/rspamd/commit/2599241bba1788d902398a637d6657e816193c21 (HEAD -> master)

[Minor] Rspamadm: Exclude nostat symbols

---
 lualib/rspamadm/clickhouse.lua | 3 +++
 1 file changed, 3 insertions(+)

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


More information about the Commits mailing list