From c361d5a35f5e64d3ea429f6358cdc078c29a15c8 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 18 Jan 2019 14:55:00 +0000 Subject: [Minor] Lua_scanners: Various fixes in VadeSecure plugin --- src/plugins/lua/external_services.lua | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/lua/external_services.lua b/src/plugins/lua/external_services.lua index 6ee0535ba..c5889112f 100644 --- a/src/plugins/lua/external_services.lua +++ b/src/plugins/lua/external_services.lua @@ -251,7 +251,25 @@ if opts and type(opts) == 'table' then group = N }) elseif type(sym) == 'table' then - reg_symbols(sym) + if sym.symbol then + rspamd_config:register_symbol({ + type = 'virtual', + name = sym.symbol, + parent = id, + group = N + }) + + if sym.score then + rspamd_config:set_metric_symbol({ + name = sym.symbol, + score = sym.score, + description = sym.description, + group = sym.group or N, + }) + end + else + reg_symbols(sym) + end end end end -- cgit v1.2.3