Delete the (.*?)$ at the end. <-- this works flawesly, same results as before, thanks :) Replace the (.*?) at the start with .+ <-- this only works if the subject starts with the given string, when filtering on a part of a subject it doesn't trigger, is there a smarter way to do this?
With regards, Michiel Hazelhof. On 28/01/2026 18:20, Wietse Venema via Postfix-users wrote:
Michiel Hazelhof via Postfix-users:Let's specify in main.cf: header_checks = pcre:/etc/postfix/header_checks.pcre In /etc/postfix/header_checks.pcre add: /^Subject: (.*?)RandomStringToKeepEverythingFunctioning(.*?)$/ REJECT Then send an email where the subject contains "RandomStringToKeepEverythingFunctioningMoreText", it will get rejected (correctly) Now let's send another email where the subject contains "RandomStringToKeepEverythingFunctioning`MoreText", will pass the filter, the left single quotation mark (U+2018) will make the email bypass all regex/pcre filters.Delete the (.*?)$ at the end. Replace the (.*?) at the start with .+ Wietse _______________________________________________ Postfix-users mailing list -- [email protected] To unsubscribe send an email to [email protected]
OpenPGP_0xEECB9B96355B5EBF.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Postfix-users mailing list -- [email protected] To unsubscribe send an email to [email protected]
