]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Feature] Add condition to do antiviral check
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 23 Aug 2016 19:27:53 +0000 (20:27 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 23 Aug 2016 19:29:03 +0000 (20:29 +0100)
src/plugins/lua/antivirus.lua

index 05b089cf0d468f75d58efc9cac180160ff0390e4..79250eeb5b14eda0d8205c065c183a54de8018da 100644 (file)
@@ -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