diff options
author | Carsten Rosenberg <c.rosenberg@heinlein-support.de> | 2019-01-28 11:30:33 +0100 |
---|---|---|
committer | Carsten Rosenberg <c.rosenberg@heinlein-support.de> | 2019-04-29 20:10:12 +0200 |
commit | d0b4431f818c1034a62d2754bba972a735219e6a (patch) | |
tree | 3185ad96f117568c7e498d1b6837d121bdfabe8d /src/plugins/lua/external_services.lua | |
parent | 4d95a0327becd78123212a2adf0138e08c4fac7d (diff) | |
download | rspamd-d0b4431f818c1034a62d2754bba972a735219e6a.tar.gz rspamd-d0b4431f818c1034a62d2754bba972a735219e6a.zip |
[Minor] lua_scanners - try dynamic scan
Diffstat (limited to 'src/plugins/lua/external_services.lua')
-rw-r--r-- | src/plugins/lua/external_services.lua | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/plugins/lua/external_services.lua b/src/plugins/lua/external_services.lua index 056eefcee..9aba7f8a6 100644 --- a/src/plugins/lua/external_services.lua +++ b/src/plugins/lua/external_services.lua @@ -194,13 +194,23 @@ if opts and type(opts) == 'table' then rspamd_logger.errx(rspamd_config, 'cannot add rule: "' .. k .. '"') else m = nrule - local id = rspamd_config:register_symbol({ - type = 'normal', - name = m['symbol'], + + local t = { + name = m.symbol, callback = cb, score = 0.0, group = N - }) + } + + if m.symbol_type == 'postfilter' then + t.type = 'postfilter' + t.priority = 3 + else + t.type = 'normal' + end + + local id = rspamd_config:register_symbol(t) + rspamd_config:register_symbol({ type = 'virtual,nostat', name = m['symbol_fail'], |