commit e5407f6: [Minor] Force_actions: Another fix

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Oct 16 10:28:07 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-10-16 11:25:44 +0100
URL: https://github.com/rspamd/rspamd/commit/e5407f6caba295084e61552b743e4e0f1833f802 (HEAD -> master)

[Minor] Force_actions: Another fix

---
 src/plugins/lua/force_actions.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/lua/force_actions.lua b/src/plugins/lua/force_actions.lua
index 69cc63a66..6e9ef9200 100644
--- a/src/plugins/lua/force_actions.lua
+++ b/src/plugins/lua/force_actions.lua
@@ -102,7 +102,7 @@ local function gen_cb(params)
 
     local ret = e:process(task)
     lua_util.debugm(N, task, "expression %s returned %s", params.expr, ret)
-    if (not params.limit) or ret > params.limit then
+    if (not params.limit and ret > 0) or ret > params.limit then
       if params.subject then
         task:set_metric_subject(params.subject)
       end


More information about the Commits mailing list