]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Allow to check negative scores in force_actions
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 17 Nov 2017 18:59:21 +0000 (18:59 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 17 Nov 2017 18:59:21 +0000 (18:59 +0000)
MFH: rspamd-1.6

src/plugins/lua/force_actions.lua

index d8d29b3231e738e8deabc6f0a7f52deddd9c9c0a..a733a14257586166838c27f8e105893c8ce6b67c 100644 (file)
@@ -44,7 +44,7 @@ local function gen_cb(expr, act, pool, message, subject, raction, honor, limit)
   local function process_atom(atom, task)
     local f_ret = task:has_symbol(atom)
     if f_ret then
-      f_ret = task:get_symbol(atom)[1].score
+      f_ret = math.abs(task:get_symbol(atom)[1].score)
       if f_ret < 0.001 then
         -- Adjust some low score to distinguish from pure zero
         f_ret = 0.001