summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2015-02-11 16:14:43 +0200
committerAndrew Lewis <nerf@judo.za.org>2015-02-11 16:15:12 +0200
commit816df6604d473175bc60b65e55cbded42e17cfce (patch)
tree56584ad5bd480f4ff06b84f37a5c965d3e3f5bce /src/plugins
parente9c1446f0afc281546dc356943358ff33491378e (diff)
downloadrspamd-816df6604d473175bc60b65e55cbded42e17cfce.tar.gz
rspamd-816df6604d473175bc60b65e55cbded42e17cfce.zip
Amendment for rbl.lua update
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/rbl.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index 9258c1e86..a5d67d414 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -60,7 +60,10 @@ local function rbl_cb (task)
local havegot = {}
local notgot = {}
local function check_user()
- if not havegot['user'] and not notgot['user'] then
+ if notgot['user'] then
+ return false
+ end
+ if not havegot['user'] then
havegot['user'] = task:get_user()
if havegot['user'] == nil then
notgot['user'] = true
@@ -153,7 +156,7 @@ local function rbl_cb (task)
return
end
for _,rh in ipairs(havegot['received']) do
- if rh['real_ip'] and rh['real_ip']:to_string() ~= '0.0.0.0' then
+ if rh['real_ip'] and rh['real_ip']:is_valid() then
for k,rbl in pairs(rbls) do
if (rh['real_ip']:get_version() == 6 and rbl['ipv6']) or
(rh['real_ip']:get_version() == 4 and rbl['ipv4']) then