aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-11-13 11:21:53 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-11-13 11:30:00 +0000
commitd4d8063ebb915a7c1fd50e6b207d78e13fd8db3f (patch)
treee72a67b57105e14dd00ae2ee52a1601fe8f6401b
parent36963c3fa3b053812dbb9abea386b27a78a5d062 (diff)
downloadrspamd-d4d8063ebb915a7c1fd50e6b207d78e13fd8db3f.tar.gz
rspamd-d4d8063ebb915a7c1fd50e6b207d78e13fd8db3f.zip
[Minor] Rbl: Workaround for 'rules'
-rw-r--r--src/plugins/lua/rbl.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index 7828d74d1..534a4855b 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -1119,12 +1119,18 @@ end
opts = lua_util.override_defaults(rbl_common.default_options, opts)
+if opts.rules and opts.rbls then
+ -- Common issue :(
+ rspamd_logger.infox(rspamd_config, 'merging `rules` and `rbls` keys for compatibility')
+ opts.rbls = lua_util.override_defaults(opts.rbls, opts.rules)
+end
+
if(opts['local_exclude_ip_map'] ~= nil) then
local_exclusions = lua_maps.map_add(N, 'local_exclude_ip_map', 'radix',
'RBL exclusions map')
end
-for key,rbl in pairs(opts.rbls or opts.rules) do
+for key,rbl in pairs(opts.rbls ) do
if type(rbl) ~= 'table' or rbl.disabled == true or rbl.enabled == false then
rspamd_logger.infox(rspamd_config, 'disable rbl "%s"', key)
else