commit 3d3687f: [Minor] Neural: Enable cfg.options.check_all_filters when neural is enabled

Vsevolod Stakhov vsevolod at highsecure.ru
Tue Jul 9 11:35:05 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-07-09 12:31:34 +0100
URL: https://github.com/rspamd/rspamd/commit/3d3687fa135c49e6ad471c0f071b592988378ad5 (HEAD -> master)

[Minor] Neural: Enable cfg.options.check_all_filters when neural is enabled

---
 lualib/lua_cfg_transform.lua | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lualib/lua_cfg_transform.lua b/lualib/lua_cfg_transform.lua
index 971a341b4..83b979ac5 100644
--- a/lualib/lua_cfg_transform.lua
+++ b/lualib/lua_cfg_transform.lua
@@ -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


More information about the Commits mailing list