aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-17 18:28:59 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-17 18:28:59 +0100
commitad5b6f45a6f9bf59e0a8ad47173c2d987fa74864 (patch)
tree11f0dfbcb5e004711a40c6af395d7349936bc387
parente9b80391e0dc97249c40397ceaa34c2e466b34ef (diff)
downloadrspamd-ad5b6f45a6f9bf59e0a8ad47173c2d987fa74864.tar.gz
rspamd-ad5b6f45a6f9bf59e0a8ad47173c2d987fa74864.zip
[Minor] Use HELO when SMTP from is empty
-rw-r--r--src/plugins/lua/mx_check.lua6
1 files changed, 6 insertions, 0 deletions
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