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.6.0~147 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=efd7a58f732c855e51cead1c1571ad3ddef4b987;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