summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-12 21:24:24 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-12 21:24:24 +0000
commit1d7e4cbd19287af3decfc8a0adb293120b802cab (patch)
tree576250a8426b21b42e000aa37adc379b5016ae41 /src
parent85e3b5a78c783bb1a49ac76ef40a6b5227a74b8a (diff)
parentdd991d1106912bcf8642468d0d580e0690191515 (diff)
downloadrspamd-1d7e4cbd19287af3decfc8a0adb293120b802cab.tar.gz
rspamd-1d7e4cbd19287af3decfc8a0adb293120b802cab.zip
Merge pull request #159 from AlexeySa/master
Update Hfilter and rbl.lua
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/rbl.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index f89055f26..9abac0067 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -1,6 +1,7 @@
local rbls = {}
local rspamd_logger = require "rspamd_logger"
+local rspamd_ip = require "rspamd_ip"
local function ip_to_rbl(ip, rbl)
return table.concat(ip:inversed_str_octets(), ".") .. '.' .. rbl
@@ -82,7 +83,7 @@ local function rbl_cb (task)
end
if not havegot['helo'] then
havegot['helo'] = task:get_helo()
- if havegot['helo'] == nil or string.sub(havegot['helo'],1,1) == '[' then
+ if not havegot['helo'] or string.sub(havegot['helo'],1,1) == '[' or rspamd_ip.from_string(havegot['helo']):is_valid() then
notgot['helo'] = true
return
end