diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-09 12:31:34 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-09 12:31:34 +0100 |
commit | 3d3687fa135c49e6ad471c0f071b592988378ad5 (patch) | |
tree | ce2d75813596a9c2e5f5066d31c5b84c641fd321 /lualib/lua_cfg_transform.lua | |
parent | bd5e5291ebda01d36236f93fd37d93efc9f83e98 (diff) | |
download | rspamd-3d3687fa135c49e6ad471c0f071b592988378ad5.tar.gz rspamd-3d3687fa135c49e6ad471c0f071b592988378ad5.zip |
[Minor] Neural: Enable cfg.options.check_all_filters when neural is enabled
Diffstat (limited to 'lualib/lua_cfg_transform.lua')
-rw-r--r-- | lualib/lua_cfg_transform.lua | 12 |
1 files changed, 12 insertions, 0 deletions
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 |