Skip to content

Commit

Permalink
[Minor] External_services: Fix symbol fail assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Aug 16, 2019
1 parent 6ead927 commit 61512ce
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/plugins/lua/external_services.lua
Expand Up @@ -126,21 +126,22 @@ 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',
opts.type, opts.symbol)
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
Expand Down

0 comments on commit 61512ce

Please sign in to comment.