diff options
author | Carsten Rosenberg <c.rosenberg@heinlein-support.de> | 2019-01-28 11:30:33 +0100 |
---|---|---|
committer | Carsten Rosenberg <c.rosenberg@heinlein-support.de> | 2019-04-29 20:10:12 +0200 |
commit | d0b4431f818c1034a62d2754bba972a735219e6a (patch) | |
tree | 3185ad96f117568c7e498d1b6837d121bdfabe8d /lualib/lua_scanners/sophos.lua | |
parent | 4d95a0327becd78123212a2adf0138e08c4fac7d (diff) | |
download | rspamd-d0b4431f818c1034a62d2754bba972a735219e6a.tar.gz rspamd-d0b4431f818c1034a62d2754bba972a735219e6a.zip |
[Minor] lua_scanners - try dynamic scan
Diffstat (limited to 'lualib/lua_scanners/sophos.lua')
-rw-r--r-- | lualib/lua_scanners/sophos.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lualib/lua_scanners/sophos.lua b/lualib/lua_scanners/sophos.lua index 159e8abdc..59facc845 100644 --- a/lualib/lua_scanners/sophos.lua +++ b/lualib/lua_scanners/sophos.lua @@ -41,9 +41,7 @@ local function sophos_config(opts) retransmits = 2, cache_expire = 3600, -- expire redis in one hour message = default_message, - savdi_report_encrypted = false, detection_category = "virus", - savdi_report_oversize = false, } sophos_conf = lua_util.override_defaults(sophos_conf, opts) @@ -159,6 +157,14 @@ local function sophos_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(), |