]> source.dussan.org Git - rspamd.git/commitdiff
Improve REPLYTO_EQ_TO_ADDR based on corpus testing
authorSteve Freegard <steve@stevefreegard.com>
Mon, 19 Mar 2018 11:46:05 +0000 (11:46 +0000)
committerSteve Freegard <steve@stevefreegard.com>
Mon, 19 Mar 2018 11:46:05 +0000 (11:46 +0000)
rules/headers_checks.lua

index 2d2d8ec3d020e46d63fc3612dab4df6816e7f32f..0a7a3c16eb05d0a586b4460f5656806af893c3d5 100644 (file)
@@ -221,7 +221,13 @@ local check_replyto_id = rspamd_config:register_callback_symbol('CHECK_REPLYTO',
             -- See if Reply-To matches the To address
             local to = task:get_recipients(2)
             if (to and to[1] and to[1].addr:lower() == rt[1].addr:lower()) then
-              task:insert_result('REPLYTO_EQ_TO_ADDR', 1.0)
+                -- Ignore this for mailing-lists and automatic submissions
+                if (not (task:get_header('List-Unsubscribe') or
+                         task:get_header('X-List') or
+                         task:get_header('Auto-Submitted'))) 
+                then
+                   task:insert_result('REPLYTO_EQ_TO_ADDR', 1.0)
+                end
             else
               task:insert_result('REPLYTO_DOM_NEQ_FROM_DOM', 1.0)
            end