aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/external_services.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-16 18:34:47 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-16 18:34:47 +0100
commit61512ce9488c18d2daf56f17efffa4287317cc5a (patch)
tree293888928501d5685d729641775e8335b81f6d32 /src/plugins/lua/external_services.lua
parent6ead92784f0e5852410140feb220d60ec7970dee (diff)
downloadrspamd-61512ce9488c18d2daf56f17efffa4287317cc5a.tar.gz
rspamd-61512ce9488c18d2daf56f17efffa4287317cc5a.zip
[Minor] External_services: Fix symbol fail assignment
Diffstat (limited to 'src/plugins/lua/external_services.lua')
-rw-r--r--src/plugins/lua/external_services.lua15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/lua/external_services.lua b/src/plugins/lua/external_services.lua
index 9aba7f8a6..7b20e629c 100644
--- a/src/plugins/lua/external_services.lua
+++ b/src/plugins/lua/external_services.lua
@@ -126,14 +126,7 @@ local function add_scanner_rule(sym, opts)
return nil
end
- if not opts.symbol_fail then
- opts.symbol_fail = opts.symbol .. '_FAIL'
- end
-
local rule = cfg.configure(opts)
- rule.type = opts.type
- rule.symbol_fail = opts.symbol_fail
- rule.redis_params = redis_params
if not rule then
rspamd_logger.errx(rspamd_config, 'cannot configure %s for %s',
@@ -141,6 +134,14 @@ local function add_scanner_rule(sym, opts)
return nil
end
+ rule.type = opts.type
+
+ if not rule.symbol_fail then
+ rule.symbol_fail = opts.symbol .. '_FAIL'
+ end
+
+ rule.redis_params = redis_params
+
-- if any mime_part filter defined, do not scan all attachments
if opts.mime_parts_filter_regex ~= nil
or opts.mime_parts_filter_ext ~= nil then