]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix Mozilla Message-ID detection 3634/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Fri, 5 Feb 2021 19:09:58 +0000 (22:09 +0300)
committerGitHub <noreply@github.com>
Fri, 5 Feb 2021 19:09:58 +0000 (22:09 +0300)
The left part of the Mozilla Message-ID is a hexadecimal timestamp. The regexp was mistakenly limited to 2021-01-14.

rules/regexp/headers.lua

index 430c88fd3f9ef0413efe462c60ba1355fb69fb58..f606778bab26510353b8f35dd1f9687981e9f3e0 100644 (file)
@@ -445,7 +445,7 @@ local user_agent_mozilla    = string.format('(%s) & !(%s) & !(%s) & !(%s)', user_ag
 -- Mozilla based common Message-ID template
 local mozilla_msgid_common     = 'Message-ID=/^\\s*<[\\dA-F]{8}\\.\\d{1,7}\\@([^>\\.]+\\.)+[^>\\.]+>$/H'
 local mozilla_msgid_common_sec = 'Message-ID=/^\\s*<[\\da-f]{8}-([\\da-f]{4}-){3}[\\da-f]{12}\\@([^>\\.]+\\.)+[^>\\.]+>$/H'
-local mozilla_msgid            = 'Message-ID=/^\\s*<(3[3-9A-F]|4[\\dA-F]|5[\\dA-F])[\\dA-F]{6}\\.(\\d0){1,4}\\d\\@([^>\\.]+\\.)+[^>\\.]+>$/H'
+local mozilla_msgid            = 'Message-ID=/^\\s*<(3[3-9A-F]|[4-9A-F][\\dA-F])[\\dA-F]{6}\\.(\\d0){1,4}\\d\\@([^>\\.]+\\.)+[^>\\.]+>$/H'
 -- Summary rule for forged Mozilla Mail Message-ID header
 reconf['FORGED_MUA_MOZILLA_MAIL_MSGID'] = {
   re = string.format('(%s) & (%s) & !(%s) & !(%s)', user_agent_mozilla, mozilla_msgid_common, mozilla_msgid, unusable_msgid),