aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/external_services.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/lua/external_services.lua')
-rw-r--r--src/plugins/lua/external_services.lua26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/plugins/lua/external_services.lua b/src/plugins/lua/external_services.lua
index 4858979e1..4e0ee29c9 100644
--- a/src/plugins/lua/external_services.lua
+++ b/src/plugins/lua/external_services.lua
@@ -136,8 +136,14 @@ local function add_scanner_rule(sym, opts)
rule.type = opts.type
- if not rule.symbol_fail then
- rule.symbol_fail = opts.symbol .. '_FAIL'
+ if not opts.symbol_fail then
+ opts.symbol_fail = opts.symbol .. '_FAIL'
+ end
+ if not opts.symbol_encrypted then
+ opts.symbol_encrypted = opts.symbol .. '_ENCRYPTED'
+ end
+ if not opts.symbol_macro then
+ opts.symbol_macro = opts.symbol .. '_MACRO'
end
rule.redis_params = redis_params
@@ -215,12 +221,26 @@ if opts and type(opts) == 'table' then
local id = rspamd_config:register_symbol(t)
rspamd_config:register_symbol({
- type = 'virtual,nostat',
+ type = 'virtual',
name = m['symbol_fail'],
parent = id,
score = 0.0,
group = N
})
+ rspamd_config:register_symbol({
+ type = 'virtual',
+ name = m['symbol_encrypted'],
+ parent = id,
+ score = 0.0,
+ group = N
+ })
+ rspamd_config:register_symbol({
+ type = 'virtual',
+ name = m['symbol_macro'],
+ parent = id,
+ score = 0.0,
+ group = N
+ })
has_valid = true
if type(m['patterns']) == 'table' then
if m['patterns'][1] then