]> source.dussan.org Git - rspamd.git/commitdiff
Unbreak operation of rbl.lua in certain instances
authorAndrew Lewis <nerf@judo.za.org>
Tue, 17 Feb 2015 07:46:40 +0000 (09:46 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Tue, 17 Feb 2015 07:46:40 +0000 (09:46 +0200)
src/plugins/lua/rbl.lua

index 82955f13c429d7856c539011c8cadc1ab1814c09..198e725f44d8429931144b16983eee66e18acb44 100644 (file)
@@ -36,10 +36,7 @@ local private_ips = nil
 local rspamd_logger = require "rspamd_logger"
 local rspamd_ip = require "rspamd_ip"
 
-local function validate_dns(lstr, rstr)
-  if (lstr:len() + rstr:len()) > 252 then
-    return false
-  end
+local function validate_dns(lstr)
   for v in lstr:gmatch("[^%.]+") do
     if not v:match("^[%w-]+$") or v:len() > 63
       or v:match("^-") or v:match("-$") then
@@ -144,7 +141,7 @@ local function rbl_cb (task)
          if not havegot['helo'] then
            havegot['helo'] = task:get_helo()
            if havegot['helo'] == nil or
-              not validate_dns(havegot['helo'], rbl['rbl']) then
+              not validate_dns(havegot['helo']) then
              notgot['helo'] = true
              return
            end