From: Vsevolod Stakhov Date: Tue, 9 Jul 2019 11:31:34 +0000 (+0100) Subject: [Minor] Neural: Enable cfg.options.check_all_filters when neural is enabled X-Git-Tag: 2.0~621 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d3687fa135c49e6ad471c0f071b592988378ad5;p=thirdparty%2Frspamd.git [Minor] Neural: Enable cfg.options.check_all_filters when neural is enabled --- diff --git a/lualib/lua_cfg_transform.lua b/lualib/lua_cfg_transform.lua index 971a341b46..83b979ac51 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