commit b92db87: [Minor] Reputation: Try to fix `split_symbol` default logic
Vsevolod Stakhov
vsevolod at rspamd.com
Tue May 17 20:35:03 UTC 2022
Author: Vsevolod Stakhov
Date: 2022-05-17 21:30:55 +0100
URL: https://github.com/rspamd/rspamd/commit/b92db870b74f62562746c7e85c925d00d6949025 (HEAD -> master)
[Minor] Reputation: Try to fix `split_symbol` default logic
---
src/plugins/lua/reputation.lua | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/plugins/lua/reputation.lua b/src/plugins/lua/reputation.lua
index 1dce44faf..b41f66f51 100644
--- a/src/plugins/lua/reputation.lua
+++ b/src/plugins/lua/reputation.lua
@@ -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)
More information about the Commits
mailing list