On Tue, Feb 20, 2024 at 06:02:22PM -0500, Wietse Venema via Postfix-users wrote:
- You'd better add $$ at the end of the pattern, to anchor the regular
expression.
On 20.02.24 20:22, Viktor Dukhovni via Postfix-users wrote:
Actually, that hostname is typically followed by additional data
separated by whitespace or a ';'.
header_checks = pcre:{ {/^Authentication-Results: \Q$myhostname\E$$/ IGNORE} }
Note that pcre, not regexp.
Indeed PCRE is best here:
header_checks = pcre:{ {/^Authentication-Results: \Q$myhostname\E[\s;]/
IGNORE} }
Thanks to both of you for recommendation, especially about the escaping - It
didn't come so my mind.
I did a little change to the RE, so multiple spaces between header name and
value doesn't make the avoid this check:
header_checks = pcre:{ {/^Authentication-Results:\s+\Q$myhostname\E[\s;]/
IGNORE} }
I have tested this and the multiple space hack was necessary as headers with
multiple spaces were not deleted.
I can now also say that these milters:
pyspf-milter
opendkim
opendmarc
(at least their versions in Debian 12)
do NOT remove existing Authentication-Results: and thus this ste is
necessary to avoid possible confusion of mail filters.
the "openarc" milter seems to detect and remove offending header.
--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Spam is for losers who can't get business any other way.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org