From 3a2a55244fd0644ab982b5b24177e5064e1627ec Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 22 Jan 2016 19:00:45 +0000 Subject: [PATCH] Use `task:get_from()` to get sender --- rules/misc.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/misc.lua b/rules/misc.lua index 50b857c06..90767d70c 100644 --- a/rules/misc.lua +++ b/rules/misc.lua @@ -149,7 +149,7 @@ rspamd_config.BROKEN_HEADERS = { rspamd_config.HEADER_RCONFIRM_MISMATCH = { callback = function (task) - local header_from = task:get_header('From') + local header_from = task:get_from('mime')[1] local header_cread = task:get_header('X-Confirm-Reading-To') if header_from and header_cread then @@ -169,7 +169,7 @@ rspamd_config.HEADER_RCONFIRM_MISMATCH = { rspamd_config.HEADER_FORGED_MDN = { callback = function (task) local header_mdn = task:get_header('Disposition-Notification-To') - local header_rp = task:get_header('Return-Path') + local header_rp = task:get_from('smtp')[1] if header_mdn and not header_rp then return true end if header_rp and not header_mdn then return true end -- 2.39.5