I'm attempting to setup header anonymization on my mail server, running Postfix and Dovecot on Debian. I've setup some regular expressions to prevent certain meta data, like a client’s IP address, from being leaked.
My /etc/postfix/header_checks
file currently looks as follows:
/^Received:.*/ IGNORE
/^X-Originating-IP:/ IGNORE
/^User-Agent:/ IGNORE
/^X-Mailer:/ IGNORE
It seems to mostly work fine, however the IP address of my mail server and the other mail server are still in the mail header:
...
Received: from mx1.riseup.net (mx1-pn.riseup.net [10.0.1.33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange
...
Received: from [hostname].[my-domain].net ([my-domain].net [my-mail-server-ip-address]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by mx1.riseup.net
...
Should I leave it like this, or is it recommended to try to mask these IPs, too?
Thanks.