aboutsummaryrefslogtreecommitdiffstats
path: root/lualib/lua_scanners/clamav.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lualib/lua_scanners/clamav.lua')
-rw-r--r--lualib/lua_scanners/clamav.lua15
1 files changed, 9 insertions, 6 deletions
diff --git a/lualib/lua_scanners/clamav.lua b/lualib/lua_scanners/clamav.lua
index 4ca3e8a8b..0f97028ea 100644
--- a/lualib/lua_scanners/clamav.lua
+++ b/lualib/lua_scanners/clamav.lua
@@ -32,7 +32,7 @@ local default_message = '${SCANNER}: virus found: "${VIRUS}"'
local function clamav_config(opts)
local clamav_conf = {
- N = N,
+ name = N,
scan_mime_parts = true,
scan_text_mime = false,
scan_image_mime = false,
@@ -70,7 +70,7 @@ local function clamav_config(opts)
clamav_conf.default_port)
if clamav_conf['upstreams'] then
- lua_util.add_debug_alias('antivirus', clamav_conf.N)
+ lua_util.add_debug_alias('antivirus', clamav_conf.name)
return clamav_conf
end
@@ -103,7 +103,8 @@ local function clamav_check(task, content, digest, rule)
upstream = rule.upstreams:get_upstream_round_robin()
addr = upstream:get_addr()
- lua_util.debugm(rule.N, task, '%s: retry IP: %s', rule.log_prefix, addr)
+ lua_util.debugm(rule.name, task, '%s: retry IP: %s',
+ rule.log_prefix, addr)
tcp.request({
task = task,
@@ -123,13 +124,15 @@ local function clamav_check(task, content, digest, rule)
upstream:ok()
data = tostring(data)
local cached
- lua_util.debugm(rule.N, task, '%s: got reply: %s', rule.log_prefix, data)
+ lua_util.debugm(rule.name, task, '%s: got reply: %s',
+ rule.log_prefix, data)
if data == 'stream: OK' then
cached = 'OK'
if rule['log_clean'] then
- rspamd_logger.infox(task, '%s: message or mime_part is clean', rule.log_prefix)
+ rspamd_logger.infox(task, '%s: message or mime_part is clean',
+ rule.log_prefix)
else
- lua_util.debugm(rule.N, task, '%s: message or mime_part is clean', rule.log_prefix)
+ lua_util.debugm(rule.name, task, '%s: message or mime_part is clean', rule.log_prefix)
end
else
local vname = string.match(data, 'stream: (.+) FOUND')