diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-04-04 11:58:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-04 11:58:14 +0100 |
commit | 59354af039ce15c7160b43095acf5b380a59ecbe (patch) | |
tree | 502c564c418288fa3a39e5d1d759c0a750a0bf3c | |
parent | 58e6cb1a4fce75ef521233bd734a7706b2f5e26f (diff) | |
parent | 21efd616891f34b03418e577622ed802a9212df6 (diff) | |
download | rspamd-59354af039ce15c7160b43095acf5b380a59ecbe.tar.gz rspamd-59354af039ce15c7160b43095acf5b380a59ecbe.zip |
Merge pull request #1576 from humbapa/master
Handle for ACC and OK messages from sophos
-rw-r--r-- | src/plugins/lua/antivirus.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index 04ef394a2..96ff2c6ae 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') or string.find(data, 'OK SSSP') then + conn:add_read(sophos_callback) else rspamd_logger.errx(task, 'unhandled response: %s', data) end |