From: Alexey AL Date: Thu, 12 Feb 2015 17:45:28 +0000 (+0300) Subject: Fix helo checks in rbl.lua X-Git-Tag: 0.9.0~721^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4ce366470467ef4052c171f02bf5e6fa6e1a5c57;p=rspamd.git Fix helo checks in rbl.lua --- 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