diff options
author | Carsten Rosenberg <c.rosenberg@heinlein-support.de> | 2019-01-18 14:33:38 +0100 |
---|---|---|
committer | Carsten Rosenberg <c.rosenberg@heinlein-support.de> | 2019-01-18 14:33:38 +0100 |
commit | 4d152f93625f6a9249bb2f9a4e1c5e19227f7029 (patch) | |
tree | 6276ced3dd06d4dafc2697f01c32cbbb42cff941 /lualib/lua_scanners/savapi.lua | |
parent | 968d92d048430fd26ad86e741c7e73d83a9c1ca7 (diff) | |
download | rspamd-4d152f93625f6a9249bb2f9a4e1c5e19227f7029.tar.gz rspamd-4d152f93625f6a9249bb2f9a4e1c5e19227f7029.zip |
[Minor] lua_scanners - use pattern for FAIL symbol
Diffstat (limited to 'lualib/lua_scanners/savapi.lua')
-rw-r--r-- | lualib/lua_scanners/savapi.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lualib/lua_scanners/savapi.lua b/lualib/lua_scanners/savapi.lua index 4a7b7082a..13dbb7136 100644 --- a/lualib/lua_scanners/savapi.lua +++ b/lualib/lua_scanners/savapi.lua @@ -160,6 +160,7 @@ local function savapi_check(task, content, digest, rule) if not virus then rspamd_logger.errx(task, "%s: virus result unparseable: %s", rule['type'], result) + common.yield_result(task, rule, 'virus result unparseable: ' .. result, 0.0, 'fail') return end end @@ -185,6 +186,7 @@ local function savapi_check(task, content, digest, rule) else rspamd_logger.errx(task, '%s: invalid product id %s', rule['type'], rule['product_id']) + common.yield_result(task, rule, 'invalid product id: ' .. result, 0.0, 'fail') conn:add_write(savapi_fin_cb, 'QUIT\n') end end @@ -222,7 +224,7 @@ local function savapi_check(task, content, digest, rule) }) else rspamd_logger.errx(task, '%s [%s]: failed to scan, maximum retransmits exceed', rule['symbol'], rule['type']) - task:insert_result(rule['symbol_fail'], 0.0, 'failed to scan and retransmits exceed') + common.yield_result(task, rule, 'failed to scan and retransmits exceed', 0.0, 'fail') end else upstream:ok() |