summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2021-02-05 22:09:58 +0300
committerGitHub <noreply@github.com>2021-02-05 22:09:58 +0300
commit4aebb2b5de725a1dd68714ca3e93bdf47f3f892e (patch)
treef4c76ccb5636b5bffde5e4b8c51855adfefe24cc /rules
parentb4cda5986a7c1f234fe670f7c9e32736ecc1fd61 (diff)
downloadrspamd-4aebb2b5de725a1dd68714ca3e93bdf47f3f892e.tar.gz
rspamd-4aebb2b5de725a1dd68714ca3e93bdf47f3f892e.zip
[Fix] Fix Mozilla Message-ID detection
The left part of the Mozilla Message-ID is a hexadecimal timestamp. The regexp was mistakenly limited to 2021-01-14.
Diffstat (limited to 'rules')
-rw-r--r--rules/regexp/headers.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules/regexp/headers.lua b/rules/regexp/headers.lua
index 430c88fd3..f606778ba 100644
--- a/rules/regexp/headers.lua
+++ b/rules/regexp/headers.lua
@@ -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),