From: Vsevolod Stakhov Date: Wed, 11 Feb 2026 09:12:10 +0000 (+0000) Subject: [Minor] Warn when symbols are filtered by alpha_score X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3959c79893a1aa5809457c4992edc9cd13146ce;p=thirdparty%2Frspamd.git [Minor] Warn when symbols are filtered by alpha_score --- diff --git a/lualib/rspamadm/logstats.lua b/lualib/rspamadm/logstats.lua index 332cc3d78f..b5749dfff3 100644 --- a/lualib/rspamadm/logstats.lua +++ b/lualib/rspamadm/logstats.lua @@ -271,6 +271,7 @@ local function handler(args) local total_spam = 0 local total_junk = 0 local sym_res = {} + local alpha_filtered = {} local actions = {} local timeStamp = {} local scanTime = { max = 0, total = 0 } @@ -356,6 +357,7 @@ local function handler(args) if caps[4] then sym_score = (tonumber(tostring(caps[4])) or 0) * (symbols_mult[sym_name] or 1.0) if math.abs(sym_score) < diff_alpha then + alpha_filtered[sym_name] = (alpha_filtered[sym_name] or 0) + 1 goto continue_sym end local bm = bidir_match[sym_name] @@ -613,6 +615,16 @@ local function handler(args) end end + if next(alpha_filtered) then + io.write(string.format( + "\nWARNING: the following symbols were found but ignored" .. + " due to score < alpha_score (%.2f):\n", diff_alpha)) + for sym, count in pairs(alpha_filtered) do + io.write(string.format(" %s: %d hit(s)\n", sym, count)) + end + io.write("Use --alpha-score 0 to include them.\n") + end + io.write(string.format("\n=== Summary %s\nMessages scanned: %d", string.rep('=', 68), total)) if timeStamp['start'] then