From: Vsevolod Stakhov Date: Tue, 18 Apr 2017 17:50:15 +0000 (+0100) Subject: [Fix] Fix SPOOF_REPLYTO rule X-Git-Tag: 1.5.6~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7c8bd501c816d097d5fbc0e9b7a219512a67e33b;p=rspamd.git [Fix] Fix SPOOF_REPLYTO rule --- diff --git a/rules/misc.lua b/rules/misc.lua index 58bef7f11..6eab5c85a 100644 --- a/rules/misc.lua +++ b/rules/misc.lua @@ -532,9 +532,10 @@ rspamd_config:register_symbol{ rspamd_config.SPOOF_REPLYTO = { callback = function (task) -- First check for a Reply-To header - local rt = task:get_header('Reply-To') - if not rt then return false end + local rt = task:get_header_full('Reply-To') + if not rt or not rt[1] then return false end -- Get From and To headers + rt = rt[1]['value'] local from = task:get_from(2) local to = task:get_recipients(2) if not (from and from[1] and from[1].addr) then return false end