From: Vsevolod Stakhov Date: Tue, 23 Aug 2016 19:27:53 +0000 (+0100) Subject: [Feature] Add condition to do antiviral check X-Git-Tag: 1.4.0~572 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab58c4cf42362df91c570afc2fec47917616c36b;p=thirdparty%2Frspamd.git [Feature] Add condition to do antiviral check --- diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index 05b089cf0d..79250eeb5b 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