diff options
author | Steve Freegard <steve@stevefreegard.com> | 2018-03-19 11:46:05 +0000 |
---|---|---|
committer | Steve Freegard <steve@stevefreegard.com> | 2018-03-19 11:46:05 +0000 |
commit | a91100df14b0421960e482d2df6b167d978f4d6e (patch) | |
tree | fc4a314f5f86be42559212954366e3b199123f52 /rules | |
parent | b94cecf7513a2b1f4b878546d07c819da6e1d412 (diff) | |
download | rspamd-a91100df14b0421960e482d2df6b167d978f4d6e.tar.gz rspamd-a91100df14b0421960e482d2df6b167d978f4d6e.zip |
Improve REPLYTO_EQ_TO_ADDR based on corpus testing
Diffstat (limited to 'rules')
-rw-r--r-- | rules/headers_checks.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rules/headers_checks.lua b/rules/headers_checks.lua index 2d2d8ec3d..0a7a3c16e 100644 --- a/rules/headers_checks.lua +++ b/rules/headers_checks.lua @@ -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 |