aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Roessner <c@roessner-network-solutions.com>2017-03-01 14:47:05 +0100
committerChristian Roessner <c@roessner-network-solutions.com>2017-03-01 14:47:05 +0100
commit4e07209204575efbff2a78689b197ef0d35b16fd (patch)
treeb5e963f99e288c3ba5b430126c6017173ddfd089 /src
parent6bc88cf287a9af5a194ae6087a3c633dde41a265 (diff)
downloadrspamd-4e07209204575efbff2a78689b197ef0d35b16fd.tar.gz
rspamd-4e07209204575efbff2a78689b197ef0d35b16fd.zip
[Minor] SAVAPI deal correctly with archives
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/antivirus.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua
index d848d789b..de455f805 100644
--- a/src/plugins/lua/antivirus.lua
+++ b/src/plugins/lua/antivirus.lua
@@ -529,7 +529,9 @@ local function savapi_check(task, rule)
elseif string.find(result, '310') then
-- infected message
rspamd_logger.debugm(N, task, 'infected message')
- local vname = rspamd_str_split(result, ' ')[4]
+ -- Recursive result
+ local parts = rspamd_str_split(result, ' <<< ')
+ local vname = rspamd_str_split(parts[2], ';')[1]:match "^%s*(.-)%s*$"
rspamd_logger.infox(task, 'SAVAPI: virus found: %s', vname)
yield_result(task, rule, vname)
save_av_cache(task, rule, vname)