]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Reputation: Try to fix `split_symbol` default logic
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 17 May 2022 20:30:55 +0000 (21:30 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 17 May 2022 20:30:55 +0000 (21:30 +0100)
src/plugins/lua/reputation.lua

index 1dce44fafbed26140e9f168c2484147bd92279d2..b41f66f5126df7d8ba254df3603f9f2a58306daa 100644 (file)
@@ -77,7 +77,9 @@ local function add_symbol_score(task, rule, mult, params)
     if mult >= 0 then
       task:insert_result(rule.symbol .. '_SPAM', mult, params)
     else
-      task:insert_result(rule.symbol .. '_HAM', mult, params)
+      -- We assume that `HAM` symbol has negative score...
+      -- It is probably good to verify on config stage (TODO)
+      task:insert_result(rule.symbol .. '_HAM', math.abs(mult), params)
     end
   else
     task:insert_result(rule.symbol, mult, params)