From c95a6f83eb0aea3ea2f88150e0c1a732f1fef82d Mon Sep 17 00:00:00 2001 From: AL Date: Tue, 25 Oct 2016 13:59:38 +0300 Subject: Change logic for MX-check plugin Old version: FROM realy check "vov.ru" New version: FROM realy check "test.vov.ru" --- src/plugins/lua/mx_check.lua | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src') 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 -- cgit v1.2.3