commit 936e100: [Minor] Avoid callback symbol to be treated as normal

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Sep 30 14:56:09 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-09-30 15:49:55 +0100
URL: https://github.com/rspamd/rspamd/commit/936e1003745892c1491754918243d69e08aa1594 (HEAD -> master)

[Minor] Avoid callback symbol to be treated as normal

---
 src/plugins/lua/reputation.lua | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/plugins/lua/reputation.lua b/src/plugins/lua/reputation.lua
index 86fd20767..aa3215b57 100644
--- a/src/plugins/lua/reputation.lua
+++ b/src/plugins/lua/reputation.lua
@@ -1168,9 +1168,14 @@ local function parse_rule(name, tbl)
   end)
 
   -- We now generate symbol for checking
+  local rule_type = 'normal'
+  if rule.selector.config.split_symbols then
+    rule_type = 'callback'
+  end
+
   local id = rspamd_config:register_symbol{
     name = rule.symbol,
-    type = 'normal',
+    type = rule_type,
     callback = callback_gen(reputation_filter_cb, rule),
   }
 


More information about the Commits mailing list