aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/bayes_expiry.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/lua/bayes_expiry.lua')
-rw-r--r--src/plugins/lua/bayes_expiry.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/lua/bayes_expiry.lua b/src/plugins/lua/bayes_expiry.lua
index 9f5d7a68f..6e2c328dc 100644
--- a/src/plugins/lua/bayes_expiry.lua
+++ b/src/plugins/lua/bayes_expiry.lua
@@ -97,10 +97,13 @@ local function check_redis_classifier(cls, cfg)
end
-- Now try to load redis_params if needed
- local redis_params = {}
- if not lredis.try_load_redis_servers(cls, rspamd_config, redis_params) then
- if not lredis.try_load_redis_servers(cfg[N] or E, rspamd_config, redis_params) then
- if not lredis.try_load_redis_servers(cfg['redis'] or E, rspamd_config, redis_params) then
+ local redis_params
+ redis_params = lredis.try_load_redis_servers(cls, rspamd_config, false, 'bayes')
+ if not redis_params then
+ redis_params = lredis.try_load_redis_servers(cfg[N] or E, rspamd_config, false, 'bayes')
+ if not redis_params then
+ redis_params = lredis.try_load_redis_servers(cfg[N] or E, rspamd_config, true)
+ if not redis_params then
return false
end
end