]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Prevent MID_CONTAINS_FROM from firing on empty address
authorAndrew Lewis <nerf@judo.za.org>
Tue, 23 May 2017 15:42:55 +0000 (17:42 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Tue, 23 May 2017 15:42:55 +0000 (17:42 +0200)
rules/mid.lua

index 08ccaf04abf8815f8bf85012fbfb4974966f7d04..337fbde863da4ed31bcd3d82a46b20e4c75e3227 100644 (file)
@@ -36,7 +36,7 @@ local function mid_check_func(task)
   end
   -- Check From address atrributes against MID
   local from = task:get_from(2)
-  if (from and from[1] and from[1].domain) then
+  if (from and from[1] and from[1].domain and from[1].domain ~= '') then
     local fd = from[1].domain:lower()
     local _,_,md = mid:find("@([^>]+)>?$")
     -- See if all or part of the From address