That worked :) - Thank you Viktor, much appreciated! Denis
> On 7 May 2024, at 12:14, Viktor Dukhovni via Postfix-users > <postfix-users@postfix.org> wrote: > > On Tue, May 07, 2024 at 10:07:15AM +0200, Denis Krienbühl via Postfix-users > wrote: > >> Ultimately, I ended up with the following rule, but I have a problem with it >> (or any other that I've found): >> >> /^\s*Received:[^\n]+(.*)/ REPLACE Received: from >> [127.0.0.1] (localhost [127.0.0.1])$1 > > That "\s*" is best left out. > >> This works just fine with postmap: >> >> cat mail.txt | postmap -h -q - pcre:/etc/postfix/auth_header_checks.pcre > ---- >> postconf -P >> >> smtps/inet/cleanup_service_name = privacy_cleanup >> privacy_cleanup/unix/header_checks = >> regexp:/etc/postfix/auth_header_checks.pcre > ------ > > I hope those underlines make the problem clear. > >> /etc/postfix/auth_header_checks.pcre >> >> /^\s*Received:[^\n]+(.*)/ REPLACE Received: from >> [127.0.0.1] (localhost [127.0.0.1])$1 > > Instead: > > /^Received:[^\n]+(.*)/ REPLACE Received: from [127.0.0.1] (localhost > [127.0.0.1])$1 > > -- > Viktor. > _______________________________________________ > Postfix-users mailing list -- postfix-users@postfix.org > To unsubscribe send an email to postfix-users-le...@postfix.org _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org