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]

Reply via email to