diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-09-11 19:13:21 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-09-11 19:13:21 +0100 |
commit | 678f31bbe6ad07767984db5f22b4ffd47909e0f6 (patch) | |
tree | c32022007b12544c7bef039d1d79022eb3d419a6 | |
parent | 1d97688bc861c24ed746d3bf5af2974b452bc48c (diff) | |
download | rspamd-678f31bbe6ad07767984db5f22b4ffd47909e0f6.tar.gz rspamd-678f31bbe6ad07767984db5f22b4ffd47909e0f6.zip |
[Minor] Improve logging in antivirus module
-rw-r--r-- | src/plugins/lua/antivirus.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index 4802b239e..2b072f096 100644 --- a/src/plugins/lua/antivirus.lua +++ b/src/plugins/lua/antivirus.lua @@ -268,7 +268,11 @@ end local function message_not_too_large(task, rule) local max_size = tonumber(rule['max_size']) if not max_size then return true end - if task:get_size() > max_size then return false end + if task:get_size() > max_size then + rspamd_loger.infox("skip %s AV check as it is too large: %s (%s is allowed)", + rule.type, task:get_size(), max_size) + return false + end return true end @@ -280,6 +284,9 @@ local function need_av_check(task, rule) end end + rspamd_loger.infox("skip %s AV check as there are no attachments in a message", + rule.type) + return false else return message_not_too_large(task, rule) @@ -753,6 +760,7 @@ local function add_antivirus_rule(sym, opts) end rule = cfg.configure(opts) + rule.type = opts.type if not rule then rspamd_logger.errx(rspamd_config, 'cannot configure %s for %s', |