]> source.dussan.org Git - rspamd.git/commitdiff
Update mx_check.lua
authorAL <AlexeySa@users.noreply.github.com>
Tue, 25 Oct 2016 11:05:50 +0000 (14:05 +0300)
committerGitHub <noreply@github.com>
Tue, 25 Oct 2016 11:05:50 +0000 (14:05 +0300)
src/plugins/lua/mx_check.lua

index 51b302937972c56b36cff6990fc0f37fb18b6670..39ba95b0b5889cfc26cab41813fbdf34eab10576 100644 (file)
@@ -43,11 +43,11 @@ local function mx_check(task)
   if from and from[1] and from[1]['domain'] and not from[2] then
     mx_domain = from[1]['domain']
   else
-    mx_domain = rspamd_util.get_tld(task:get_helo())
-  end
+    mx_domain = task:get_helo()
 
-  if not mx_domain then
-    return
+    if mx_domain then
+      mx_domain = rspamd_util.get_tld(mx_domain)
+    end
   end
 
   local valid = false