diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-30 09:12:42 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-30 09:14:29 +0100 |
commit | 98080882fd1c67c6640cbe20799ceb17b17cda64 (patch) | |
tree | 92dfcec0b6daeaf749ecd9ba977408e308825bcb /lualib | |
parent | 195ca5a2a30a6c04daaedfa97a5bf9d928911151 (diff) | |
download | rspamd-98080882fd1c67c6640cbe20799ceb17b17cda64.tar.gz rspamd-98080882fd1c67c6640cbe20799ceb17b17cda64.zip |
[Minor] Rbl: Improve migration portability
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_cfg_transform.lua | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lualib/lua_cfg_transform.lua b/lualib/lua_cfg_transform.lua index 3a3b8e0ee..17e77645d 100644 --- a/lualib/lua_cfg_transform.lua +++ b/lualib/lua_cfg_transform.lua @@ -239,9 +239,8 @@ local function surbl_section_convert(cfg, section) local wl = section.whitelist for name,value in pairs(section.rules or {}) do if rbl_section[name] then - logger.warnx(rspamd_config, 'conflicting names in surbl and rbl rules: %s, ignore rbl rule!', + logger.warnx(rspamd_config, 'conflicting names in surbl and rbl rules: %s, prefer surbl rule!', name) - rbl_section[name] = {} end local converted = { urls = true, @@ -284,7 +283,7 @@ local function surbl_section_convert(cfg, section) converted[k] = lua_util.deepcopy(v) end end - rbl_section[name] = converted + rbl_section[name] = lua_util.override_defaults(rbl_section[name], converted) end end @@ -294,9 +293,8 @@ local function emails_section_convert(cfg, section) local wl = section.whitelist for name,value in pairs(section.rules or {}) do if rbl_section[name] then - logger.warnx(rspamd_config, 'conflicting names in emails and rbl rules: %s, ignore rbl rule!', + logger.warnx(rspamd_config, 'conflicting names in emails and rbl rules: %s, prefer emails rule!', name) - rbl_section[name] = {} end local converted = { emails = true, @@ -338,7 +336,7 @@ local function emails_section_convert(cfg, section) converted[k] = lua_util.deepcopy(v) end end - rbl_section[name] = converted + rbl_section[name] = lua_util.override_defaults(rbl_section[name], converted) end end |