Viktor Dukhovni via Postfix-users:
> On Mon, Feb 03, 2025 at 05:56:45PM -0500, Wietse Venema via Postfix-users 
> wrote:
> 
> > There is no built-in featrue to delete IP addresses from headers.
> 
> But, given the expected header form, it is not difficult to craft a PCRE
> table that does the job well.

Not difficult for some people. One would need to transform this:

    Received: from client-helo (client-name [client-addr])
            TLS and SASL login stuff...
            by $myhostname ($mail_name) with XXX id YYY;
            date-stamp

Remove the client, TLS, and SASL bits, leaving this:

    Received: by myhostname ($mail_name) with XXX id YYY;
            date-stamp

That is:

master.cf:
    submission  .. .. .. .. .. .. .. smtpd
        -o { header_checks = pcre:{{/^(Received:\s).+\s(by\s.+)/ 
                REPLACE $1$2 }} }
        ...other -o options...

(ditto for port 465, also known as smtps or submissions.)

I'll add this to the default master.cf file. It will have to be
regexp style, not pcre, to avoid a hard external dependency.

        Wietse
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to