aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/external_services.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-01-18 14:55:00 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-01-18 14:55:00 +0000
commitc361d5a35f5e64d3ea429f6358cdc078c29a15c8 (patch)
treeba97e3b0d8966e81b68510e8be92654759fdfd50 /src/plugins/lua/external_services.lua
parentdd4ad1e446ebd8e804bd14714e3a4c565a8ddece (diff)
downloadrspamd-c361d5a35f5e64d3ea429f6358cdc078c29a15c8.tar.gz
rspamd-c361d5a35f5e64d3ea429f6358cdc078c29a15c8.zip
[Minor] Lua_scanners: Various fixes in VadeSecure plugin
Diffstat (limited to 'src/plugins/lua/external_services.lua')
-rw-r--r--src/plugins/lua/external_services.lua20
1 files changed, 19 insertions, 1 deletions
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