]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Add {header} for header regexps
authorAnton Yuzhaninov <citrin+git@citrin.ru>
Tue, 22 Dec 2020 13:23:48 +0000 (13:23 +0000)
committerAnton Yuzhaninov <citrin+git@citrin.ru>
Tue, 22 Dec 2020 13:29:20 +0000 (13:29 +0000)
rules/regexp/headers.lua

index 516fc12323449f4f24eb64d87cbfa2f6d4a9e11b..ff16fd886abb682dd95cb14e3d027e95194bc80a 100644 (file)
@@ -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',
 }