commit 7ff31bd: Optimize apple_ios_x_mailer regex
GitHub
noreply at github.com
Wed Jul 12 10:49:05 UTC 2023
Author: Dmitriy Alekseev
Date: 2023-07-12 13:23:33 +0300
URL: https://github.com/rspamd/rspamd/commit/7ff31bdb955abffa37f21782b9a01ccd1acca155 (refs/pull/4538/head)
Optimize apple_ios_x_mailer regex
---
rules/regexp/headers.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rules/regexp/headers.lua b/rules/regexp/headers.lua
index d6b8b3a08..85d6cfcfd 100644
--- a/rules/regexp/headers.lua
+++ b/rules/regexp/headers.lua
@@ -975,7 +975,7 @@ reconf['APPLE_MAILER'] = {
-- Detect Apple iPhone/iPad Mail
-- Apple iPhone/iPad Mail X-Mailer contains iOS build number, e. g. 9B206, 16H5, 18G5023c
-- https://en.wikipedia.org/wiki/IOS_version_history
-local apple_ios_x_mailer = [[i(?:Phone|Pad) Mail \((?:1[AC]|[34][AB]|5[ABCFGH]|7[A-E]|8[ABCEFGHJKL]|9[AB]|\d{2}[A-Z])\d+[a-z]?\)]]
+local apple_ios_x_mailer = [[i(?:Phone|Pad) Mail \(\d{1,2}[A-Z]\d{1,4}[a-z]?\)]]
reconf['APPLE_IOS_MAILER'] = {
description = 'Sent with Apple iPhone/iPad Mail',
re = string.format('X-Mailer=/^%s/{header}', apple_ios_x_mailer),
More information about the Commits
mailing list