Your IP address of your computer, tablet, or phone can be found in your outgoing email headers. This can expose your physical location at the time the message is sent.

The following is an example of how to remove your device IP on your sent messages with Postfix.

In, add a new task that will run header checks:

subcleanup unix n - - - 0 cleanup  
  -o header_checks=pcre:/etc/postfix/header_checks
submission inet n - - - - smtpd  
  -o cleanup_service_name=subcleanup

Put these lines in header_checks, where is your own mail server domain:

/^Received:.*by smtp\.example\.com/m IGNORE
/^User-Agent/ IGNORE
/^X-Originating-IP:/ IGNORE

Notice we’re only taking out the Received header where it matches your domain.

Finally, don’t forget to run postmap before reloading Postfix for the changes to take effect.

postmap header_checks