]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix SPOOF_REPLYTO rule
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 18 Apr 2017 17:50:15 +0000 (18:50 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 18 Apr 2017 17:50:15 +0000 (18:50 +0100)
rules/misc.lua

index 58bef7f11e9ff596be485cfe62f43bdd4fb0f18f..6eab5c85a15eb645059fd019914a4f504048a372 100644 (file)
@@ -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