From: Andrew Lewis Date: Tue, 23 May 2017 15:42:55 +0000 (+0200) Subject: [Minor] Prevent MID_CONTAINS_FROM from firing on empty address X-Git-Tag: 1.5.8~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0be0301fe90a1f9720ccefd94378219531ccfc1d;p=rspamd.git [Minor] Prevent MID_CONTAINS_FROM from firing on empty address --- diff --git a/rules/mid.lua b/rules/mid.lua index 08ccaf04a..337fbde86 100644 --- a/rules/mid.lua +++ b/rules/mid.lua @@ -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