summaryrefslogtreecommitdiffstats
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.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/lualib/lua_scanners/clamav.lua b/lualib/lua_scanners/clamav.lua
index 1ff3cdc4f..01386cfe7 100644
--- a/lualib/lua_scanners/clamav.lua
+++ b/lualib/lua_scanners/clamav.lua
@@ -156,6 +156,14 @@ local function clamav_check(task, content, digest, rule)
end
end
+ if rule.dynamic_scan then
+ local pre_check, pre_check_msg = common.check_metric_results(task, rule)
+ if pre_check then
+ rspamd_logger.infox(task, '%s: aborting: %s', rule.log_prefix, pre_check_msg)
+ return true
+ end
+ end
+
tcp.request({
task = task,
host = addr:to_string(),