summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-18 18:50:15 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-18 18:50:15 +0100
commit7c8bd501c816d097d5fbc0e9b7a219512a67e33b (patch)
treeda9c1b6d923917df44201e37889c36e20aa9c03b /rules
parentf3c9fac98382f0e2fc6da1033117f2ee368e4cad (diff)
downloadrspamd-7c8bd501c816d097d5fbc0e9b7a219512a67e33b.tar.gz
rspamd-7c8bd501c816d097d5fbc0e9b7a219512a67e33b.zip
[Fix] Fix SPOOF_REPLYTO rule
Diffstat (limited to 'rules')
-rw-r--r--rules/misc.lua5
1 files 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