aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAL <AlexeySa@users.noreply.github.com>2016-10-25 13:59:38 +0300
committerGitHub <noreply@github.com>2016-10-25 13:59:38 +0300
commitc95a6f83eb0aea3ea2f88150e0c1a732f1fef82d (patch)
tree77e48b92edac7b8920515bceb23db443e025ea3e /src
parente3788b3fbf3b4ec6c07ac41676148a22edb908e4 (diff)
downloadrspamd-c95a6f83eb0aea3ea2f88150e0c1a732f1fef82d.tar.gz
rspamd-c95a6f83eb0aea3ea2f88150e0c1a732f1fef82d.zip
Change logic for MX-check plugin
Old version: FROM <one@test.vov.ru> realy check "vov.ru" New version: FROM <one@test.vov.ru> realy check "test.vov.ru"
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/mx_check.lua9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/plugins/lua/mx_check.lua b/src/plugins/lua/mx_check.lua
index 896e702a8..51b302937 100644
--- a/src/plugins/lua/mx_check.lua
+++ b/src/plugins/lua/mx_check.lua
@@ -40,15 +40,10 @@ local function mx_check(task)
local from = task:get_from('smtp')
local mx_domain
-
if from and from[1] and from[1]['domain'] and not from[2] then
- mx_domain = rspamd_util.get_tld(from[1]['domain'])
+ mx_domain = from[1]['domain']
else
- mx_domain = task:get_helo()
-
- if mx_domain then
- mx_domain = rspamd_util.get_tld(mx_domain)
- end
+ mx_domain = rspamd_util.get_tld(task:get_helo())
end
if not mx_domain then