From 7c8bd501c816d097d5fbc0e9b7a219512a67e33b Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 18 Apr 2017 18:50:15 +0100 Subject: [PATCH] [Fix] Fix SPOOF_REPLYTO rule --- rules/misc.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.5