From ad5b6f45a6f9bf59e0a8ad47173c2d987fa74864 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 17 Sep 2016 18:28:59 +0100 Subject: [PATCH] [Minor] Use HELO when SMTP from is empty --- src/plugins/lua/mx_check.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/lua/mx_check.lua b/src/plugins/lua/mx_check.lua index 07eae027c..637dfaec7 100644 --- a/src/plugins/lua/mx_check.lua +++ b/src/plugins/lua/mx_check.lua @@ -37,6 +37,12 @@ local function mx_check(task) if from and from[1] and from[1]['domain'] and not from[2] then mx_domain = rspamd_util.get_tld(from[1]['domain']) + else + mx_domain = task:get_helo() + + if mx_domain then + mx_domain = rspamd_util.get_tld(mx_domain) + end end if not mx_domain then -- 2.39.5