From: Dmitriy Alekseev <1865999+dragoangel@users.noreply.github.com> Date: Wed, 12 Jul 2023 10:23:33 +0000 (+0300) Subject: Optimize apple_ios_x_mailer regex X-Git-Tag: 3.6~39^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F4538%2Fhead;p=thirdparty%2Frspamd.git Optimize apple_ios_x_mailer regex --- diff --git a/rules/regexp/headers.lua b/rules/regexp/headers.lua index d6b8b3a083..85d6cfcfd0 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),