diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-04-30 19:20:42 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-04-30 19:20:42 +0100 |
commit | f7c2caf78350a26b33c7919a45e87e5e448bdf93 (patch) | |
tree | 1114a11f0f32613cd0a2b0c8a1f4055e5520718f /src/plugins/lua/antivirus.lua | |
parent | 416f92636ecc6db7305db352638f2cc83f824449 (diff) | |
download | rspamd-f7c2caf78350a26b33c7919a45e87e5e448bdf93.tar.gz rspamd-f7c2caf78350a26b33c7919a45e87e5e448bdf93.zip |
[Minor] Fix issues with fail symbol in AV module
Diffstat (limited to 'src/plugins/lua/antivirus.lua')
-rw-r--r-- | src/plugins/lua/antivirus.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index 5abf652f8..ff64618cb 100644 --- a/src/plugins/lua/antivirus.lua +++ b/src/plugins/lua/antivirus.lua @@ -393,10 +393,12 @@ local function fprot_check(task, rule) }) else rspamd_logger.errx(task, 'failed to scan, maximum retransmits exceed') + task:insert_result(rule['symbol_fail'], 0.0, 'retransmits exceed') upstream:fail() end else rspamd_logger.errx(task, 'failed to scan: %s', err) + task:insert_result(rule['symbol_fail'], 0.0, 'failed to scan') upstream:fail() end else @@ -776,6 +778,7 @@ local av_types = { local function add_antivirus_rule(sym, opts) if not opts['type'] then + rspamd_logger.errx(rspamd_config, 'unknown type for AV rule %s', sym) return nil end @@ -793,6 +796,7 @@ local function add_antivirus_rule(sym, opts) local rule = cfg.configure(opts) rule.type = opts.type + rule.symbol_fail = opts.symbol_fail if not rule then |