From: Anton Yuzhaninov Date: Tue, 22 Dec 2020 13:23:48 +0000 (+0000) Subject: [Minor] Add {header} for header regexps X-Git-Tag: 2.7~47^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=badadf505179068165d4bae6c0892b5eeee1a23b;p=thirdparty%2Frspamd.git [Minor] Add {header} for header regexps --- diff --git a/rules/regexp/headers.lua b/rules/regexp/headers.lua index 516fc12323..ff16fd886a 100644 --- a/rules/regexp/headers.lua +++ b/rules/regexp/headers.lua @@ -623,7 +623,7 @@ reconf['REPTO_QUOTE_YAHOO'] = { } reconf['FAKE_REPLY'] = { - re = [[Subject=/^re:/i & !(header_exists(In-Reply-To) | header_exists(References))]], + re = [[Subject=/^re:/i{header} & !(header_exists(In-Reply-To) | header_exists(References))]], description = 'Fake reply', score = 1.0, group = 'headers' @@ -969,7 +969,7 @@ local old_x_mailers = { reconf['OLD_X_MAILER'] = { description = 'X-Mailer has a very old MUA version', - re = string.format('X-Mailer=/^(?:%s)/', table.concat(old_x_mailers, '|')), + re = string.format('X-Mailer=/^(?:%s)/{header}', table.concat(old_x_mailers, '|')), score = 2.0, group = 'headers', } @@ -989,7 +989,7 @@ local bad_x_mailers = { reconf['FORGED_X_MAILER'] = { description = 'Forged X-Mailer header', - re = string.format('X-Mailer=/^(?:%s)/', table.concat(bad_x_mailers, '|')), + re = string.format('X-Mailer=/^(?:%s)/{header}', table.concat(bad_x_mailers, '|')), score = 4.0, group = 'headers', }