end
local function yield_result(task, rule, vname)
+ local all_whitelisted = true
if type(vname) == 'string' then
local symname = match_patterns(rule['symbol'], vname, rule['patterns'])
if rule['whitelist'] and rule['whitelist']:get_key(vname) then
if rule['whitelist'] and rule['whitelist']:get_key(vn) then
rspamd_logger.infox(task, '%s: "%s" is in whitelist', rule['type'], vn)
else
+ all_whitelisted = false
task:insert_result(symname, 1.0, vn)
rspamd_logger.infox(task, '%s: virus found: "%s"', rule['type'], vn)
end
end
if rule['action'] then
if type(vname) == 'table' then
+ if all_whitelisted then return end
vname = table.concat(vname, '; ')
end
task:set_pre_result(rule['action'],