clamav {
# If set force this action if any virus is found (default unset: no action is forced)
# action = "reject";
+ # If set, then rejection message is set to this value (mention single quotes)
+ # message = '${SCANNER}: virus found: "${VIRUS}"';
# if `true` only messages with non-image attachments will be checked (default true)
attachments_only = true;
# If `max_size` is set, messages > n bytes in size are not scanned
return
end
+local default_message = '${SCANNER}: virus found: "${VIRUS}"'
+
local function match_patterns(default_sym, found, patterns)
if type(patterns) ~= 'table' then return default_sym end
if not patterns[1] then
vname = table.concat(vname, '; ')
end
task:set_pre_result(rule['action'],
- string.format('%s: virus found: "%s"', rule['type'], vname))
+ lua_util.template(rule.message or 'Rejected', {
+ SCANNER = rule['type'],
+ VIRUS = vname,
+ }))
end
end
timeout = 15.0,
retransmits = 2,
cache_expire = 3600, -- expire redis in one hour
+ message = default_message,
}
for k,v in pairs(opts) do
log_clean = false,
retransmits = 2,
cache_expire = 3600, -- expire redis in one hour
+ message = default_message,
}
for k,v in pairs(opts) do
log_clean = false,
retransmits = 2,
cache_expire = 3600, -- expire redis in one hour
+ message = default_message,
}
for k,v in pairs(opts) do
timeout = 15.0,
retransmits = 2,
cache_expire = 3600, -- expire redis in one hour
+ message = default_message,
}
for k,v in pairs(opts) do