From: Andrew Lewis Date: Fri, 7 Jul 2017 08:25:38 +0000 (+0200) Subject: [Minor] RBL: don't register duplicate monitoring X-Git-Tag: 1.6.2~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5c631c922ae329bdca994d0a2967eee80d830cd3;p=rspamd.git [Minor] RBL: don't register duplicate monitoring --- diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index f5d8d1bf8..a6b54539e 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -456,6 +456,7 @@ local id = rspamd_config:register_symbol({ flags = 'empty,nice' }) +local is_monitored = {} for key,rbl in pairs(opts['rbls']) do (function() if rbl['disabled'] then return end @@ -545,7 +546,8 @@ for key,rbl in pairs(opts['rbls']) do end end if rbl['rbl'] then - if not rbl['disable_monitoring'] and not rbl['is_whitelist'] then + if not rbl['disable_monitoring'] and not rbl['is_whitelist'] and not is_monitored[rbl['rbl']] then + is_monitored[rbl['rbl']] = true rbl.monitored = rspamd_config:register_monitored(rbl['rbl'], 'dns', { rcode = 'nxdomain',