diff options
author | MB <mb@nts.ch> | 2017-04-03 12:55:02 +0200 |
---|---|---|
committer | MB <mb@nts.ch> | 2017-04-03 12:55:02 +0200 |
commit | 302621bc496f0176f4483f6800b471351fec95f1 (patch) | |
tree | be53d1213ed7007579931dc387564d8171a96a4e | |
parent | 3a8236c9344d6c757760a785510315d851bcbe62 (diff) | |
download | rspamd-302621bc496f0176f4483f6800b471351fec95f1.tar.gz rspamd-302621bc496f0176f4483f6800b471351fec95f1.zip |
Handling ACC messages for 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..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 |