commit d4d8063: [Minor] Rbl: Workaround for 'rules'
Vsevolod Stakhov
vsevolod at highsecure.ru
Fri Nov 13 11:35:06 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-11-13 11:21:53 +0000
URL: https://github.com/rspamd/rspamd/commit/d4d8063ebb915a7c1fd50e6b207d78e13fd8db3f
[Minor] Rbl: Workaround for 'rules'
---
src/plugins/lua/rbl.lua | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
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
More information about the Commits
mailing list