From: AL Date: Tue, 25 Oct 2016 10:59:38 +0000 (+0300) Subject: Change logic for MX-check plugin X-Git-Tag: 1.4.0~196^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c95a6f83eb0aea3ea2f88150e0c1a732f1fef82d;p=thirdparty%2Frspamd.git Change logic for MX-check plugin Old version: FROM realy check "vov.ru" New version: FROM realy check "test.vov.ru" --- diff --git a/src/plugins/lua/mx_check.lua b/src/plugins/lua/mx_check.lua index 896e702a84..51b3029379 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