]> source.dussan.org Git - rspamd.git/commitdiff
rbl.lua: Don't ask for user unless called for by config
authorAndrew Lewis <nerf@judo.za.org>
Thu, 12 Feb 2015 13:01:04 +0000 (15:01 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Thu, 12 Feb 2015 13:22:51 +0000 (15:22 +0200)
src/plugins/lua/rbl.lua

index b235b13a1bc9aa9870c927580cb983da49a5c31f..9aa0d15cfebdf541f8640768d197f60cadf4a134 100644 (file)
@@ -63,14 +63,16 @@ local function rbl_cb (task)
   for k,rbl in pairs(rbls) do
 
     (function()
-      if not notgot['user'] and not havegot['user'] then
-       havegot['user'] = task:get_user()
-       if havegot['user'] == nil then
-         notgot['user'] = true
-       end
-      end
-      if havegot['user'] ~= nil and rbl['user'] == false then
-       return
+      if rbl['user'] == false then
+        if not havegot['user'] and not notgot['user'] then
+         havegot['user'] = task:get_user()
+         if havegot['user'] == nil then
+           notgot['user'] = true
+         end
+        end
+        if havegot['user'] ~= nil then
+         return
+        end
       end
 
       if rbl['helo'] then