summaryrefslogtreecommitdiffstats
path: root/lualib/lua_cfg_transform.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-16 13:03:17 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-16 13:03:17 +0100
commitbb61a273fde49e2f0e8adb784ee93910b117ab61 (patch)
tree0994a80fec3036c62b2690c9718979795d5d580f /lualib/lua_cfg_transform.lua
parentd32a22c106dc484bae439f12f418034f19290a96 (diff)
downloadrspamd-bb61a273fde49e2f0e8adb784ee93910b117ab61.tar.gz
rspamd-bb61a273fde49e2f0e8adb784ee93910b117ab61.zip
[Minor] Further ip_score sanity fix
Diffstat (limited to 'lualib/lua_cfg_transform.lua')
-rw-r--r--lualib/lua_cfg_transform.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/lualib/lua_cfg_transform.lua b/lualib/lua_cfg_transform.lua
index 43d4a2929..010c3fdb8 100644
--- a/lualib/lua_cfg_transform.lua
+++ b/lualib/lua_cfg_transform.lua
@@ -360,7 +360,7 @@ return function(cfg)
end
-- Deal with IP_SCORE
- if cfg.ip_score then
+ if cfg.ip_score and (cfg.ip_score.servers or cfg.redis) then
logger.warnx(rspamd_config, 'ip_score module is deprecated in honor of reputation module!')
if not cfg.reputation then
@@ -384,6 +384,10 @@ return function(cfg)
}
}
+ if cfg.ip_score.servers then
+ cfg.reputation.rules.ip_score.backend.redis.servers = cfg.ip_score.servers
+ end
+
if cfg.symbols and cfg.symbols['IP_SCORE'] then
local t = cfg.symbols['IP_SCORE']