From: MB Date: Mon, 3 Apr 2017 10:55:02 +0000 (+0200) Subject: Handling ACC messages for sophos X-Git-Tag: 1.5.5~56^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=302621bc496f0176f4483f6800b471351fec95f1;p=rspamd.git Handling ACC messages for sophos --- diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index 04ef394a2..ed06e4796 100644 --- a/src/plugins/lua/antivirus.lua +++ b/src/plugins/lua/antivirus.lua @@ -450,7 +450,7 @@ local function sophos_check(task, rule) local streamsize = string.format('SCANDATA %d\n', task:get_size()) local bye = 'BYE\n' - local function sophos_callback(err, data) + local function sophos_callback(err, data, conn) if err then if err == 'IO timeout' then if retransmits > 0 then @@ -484,6 +484,8 @@ local function sophos_check(task, rule) rspamd_logger.infox(task, '%s [%s]: message is clean', rule['symbol'], rule['type']) end save_av_cache(task, rule, 'OK') + elseif string.find(data, 'ACC') then + conn:add_read(sophos_callback) else rspamd_logger.errx(task, 'unhandled response: %s', data) end