]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Neural: Enable cfg.options.check_all_filters when neural is enabled
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 9 Jul 2019 11:31:34 +0000 (12:31 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 9 Jul 2019 11:31:34 +0000 (12:31 +0100)
lualib/lua_cfg_transform.lua

index 971a341b4642a15f16fe034bec865c5cd679b014..83b979ac5103f73e3b223461e335fe279eca35be 100644 (file)
@@ -346,5 +346,17 @@ return function(cfg)
     end
   end
 
+  -- If neural network is enabled we MUST have `check_all_filters` flag
+  if cfg.neural then
+    if not cfg.options then
+      cfg.options = {}
+    end
+
+    if not cfg.options.check_all_filters then
+      logger.infox(rspamd_config, 'enable `options.check_all_filters` for neural network')
+      cfg.options.check_all_filters = true
+    end
+  end
+
   return ret, cfg
 end