diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-08-23 20:27:53 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-08-23 20:29:03 +0100 |
commit | ab58c4cf42362df91c570afc2fec47917616c36b (patch) | |
tree | fd6d4d6a097bf3e38776834087ff5eaa22c5f702 /src/plugins/lua | |
parent | a5147929d0b6d2f780a41040550d85c27ae6c4d6 (diff) | |
download | rspamd-ab58c4cf42362df91c570afc2fec47917616c36b.tar.gz rspamd-ab58c4cf42362df91c570afc2fec47917616c36b.zip |
[Feature] Add condition to do antiviral check
Diffstat (limited to 'src/plugins/lua')
-rw-r--r-- | src/plugins/lua/antivirus.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index 05b089cf0..79250eeb5 100644 --- a/src/plugins/lua/antivirus.lua +++ b/src/plugins/lua/antivirus.lua @@ -196,10 +196,13 @@ local function clamav_check(task, rule) stop_pattern = '\0' }) end - if check_av_cache(task, rule, clamav_check_uncached) then - return - else - clamav_check_uncached() + + if need_av_check(task, rule) then + if check_av_cache(task, rule, clamav_check_uncached) then + return + else + clamav_check_uncached() + end end end |