aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/bayes_expiry.lua11
-rw-r--r--src/plugins/lua/reputation.lua5
2 files changed, 10 insertions, 6 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
diff --git a/src/plugins/lua/reputation.lua b/src/plugins/lua/reputation.lua
index e91c6ebb7..b72c00719 100644
--- a/src/plugins/lua/reputation.lua
+++ b/src/plugins/lua/reputation.lua
@@ -897,8 +897,9 @@ end
local function reputation_redis_init(rule, cfg, ev_base, worker)
local our_redis_params = {}
- if not lua_redis.try_load_redis_servers(rule.backend.config,
- rspamd_config, our_redis_params) then
+ our_redis_params = lua_redis.try_load_redis_servers(rule.backend.config, rspamd_config,
+ true)
+ if not our_redis_params then
our_redis_params = redis_params
end
if not our_redis_params then