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/spamassassin.lua | |
parent | 4d95a0327becd78123212a2adf0138e08c4fac7d (diff) | |
download | rspamd-d0b4431f818c1034a62d2754bba972a735219e6a.tar.gz rspamd-d0b4431f818c1034a62d2754bba972a735219e6a.zip |
[Minor] lua_scanners - try dynamic scan
Diffstat (limited to 'lualib/lua_scanners/spamassassin.lua')
-rw-r--r-- | lualib/lua_scanners/spamassassin.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lualib/lua_scanners/spamassassin.lua b/lualib/lua_scanners/spamassassin.lua index eae934610..2227de235 100644 --- a/lualib/lua_scanners/spamassassin.lua +++ b/lualib/lua_scanners/spamassassin.lua @@ -136,6 +136,14 @@ local function spamassassin_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(), @@ -172,6 +180,8 @@ local function spamassassin_config(opts) default_score = 1, action = false, extended = false, + symbol_type = 'postfilter', + dynamic_scan = true, } spamassassin_conf = lua_util.override_defaults(spamassassin_conf, opts) |