aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2017-07-07 10:25:38 +0200
committerAndrew Lewis <nerf@judo.za.org>2017-07-07 10:25:38 +0200
commit5c631c922ae329bdca994d0a2967eee80d830cd3 (patch)
treed4be208eb228185381f9b3b2ef7d5231c5f3cf32
parentb1d6eb4b4090acee9be46983d3b478942cf56450 (diff)
downloadrspamd-5c631c922ae329bdca994d0a2967eee80d830cd3.tar.gz
rspamd-5c631c922ae329bdca994d0a2967eee80d830cd3.zip
[Minor] RBL: don't register duplicate monitoring
-rw-r--r--src/plugins/lua/rbl.lua4
1 files changed, 3 insertions, 1 deletions
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',