]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Use HELO when SMTP from is empty
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 17 Sep 2016 17:28:59 +0000 (18:28 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 17 Sep 2016 17:28:59 +0000 (18:28 +0100)
src/plugins/lua/mx_check.lua

index 07eae027cc3ef7f8581f486e484842522bde81ab..637dfaec7dcf5d85808b3138406417f138dc9ea3 100644 (file)
@@ -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