commit ebc1286: [Minor] Slightly extend 'forbidden' flags
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Apr 6 14:00:04 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-04-06 14:59:07 +0100
URL: https://github.com/rspamd/rspamd/commit/ebc1286073fb291de96adc97e5305234cfb3b6c0 (HEAD -> master)
[Minor] Slightly extend 'forbidden' flags
---
lualib/rspamadm/clickhouse.lua | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/lualib/rspamadm/clickhouse.lua b/lualib/rspamadm/clickhouse.lua
index 2571664a8..3f9a7cb73 100644
--- a/lualib/rspamadm/clickhouse.lua
+++ b/lualib/rspamadm/clickhouse.lua
@@ -169,6 +169,12 @@ local function get_excluded_symbols(known_symbols, correlations, seen_total)
local known_symbols_list = {}
local composites = rspamd_config:get_all_opt('composites')
local all_symbols = rspamd_config:get_symbols()
+ local skip_flags = {
+ nostat = true,
+ skip = true,
+ idempotent = true,
+ composite = true,
+ }
for k, v in pairs(known_symbols) do
local lower_count, higher_count
if v.seen_spam > v.seen_ham then
@@ -178,10 +184,16 @@ local function get_excluded_symbols(known_symbols, correlations, seen_total)
lower_count = v.seen_spam
higher_count = v.seen_ham
end
+
if composites[k] then
remove[k] = 'composite symbol'
- elseif (all_symbols[k] or {flags = {}}).flags.nostat then
- remove[k] = 'nostat symbol'
+ elseif all_symbols[k] then
+ 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
More information about the Commits
mailing list