diff options
-rw-r--r-- | src/plugins/lua/rbl.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index e4e4c1ae8..c3c4e7136 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -531,6 +531,7 @@ local id = rspamd_config:register_symbol({ }) local is_monitored = {} +local rbls_count = 0 for key,rbl in pairs(opts['rbls']) do (function() if type(rbl) ~= 'table' or rbl['disabled'] then @@ -588,12 +589,13 @@ for key,rbl in pairs(opts['rbls']) do (not rbl['returncodes'])) then rbl['symbol'] = key end - if type(rspamd_config.get_api_version) ~= 'nil' and rbl['symbol'] then + if rbl['symbol'] then rspamd_config:register_symbol({ name = rbl['symbol'], parent = id, type = 'virtual' }) + rbls_count = rbls_count + 1 if rbl['dkim'] then need_dkim = true @@ -638,7 +640,7 @@ for key,rbl in pairs(opts['rbls']) do end)() end -if #opts.rbls == 0 then +if rbls_count == 0 then lua_util.disable_module(N, "config") end |