]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] RBL: don't register duplicate monitoring
authorAndrew Lewis <nerf@judo.za.org>
Fri, 7 Jul 2017 08:25:38 +0000 (10:25 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Fri, 7 Jul 2017 08:25:38 +0000 (10:25 +0200)
src/plugins/lua/rbl.lua

index f5d8d1bf8ca8ceeaf7399ec3618143c09426e035..a6b54539ead484b56fb76c07d98c4b7e4a3938bf 100644 (file)
@@ -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',