0

We have all internal Centos servers sending mail to 2 outgoing MX servers in our business. I want to scrub the headers on our 2 outgoing MX servers to remove the information from where they originated. I don't know the syntax of this very well and the MAN pages don't give enough examples. I want internal IPs and Hostnames scrubbed from header.

We are using postfix on every server, including our public facing MX servers.

sysadmin1138
  • 133,124
  • 18
  • 176
  • 300
travmi
  • 11
  • 5

1 Answers1

4

What you want to use is the header_checks rules. You will need to tweak this for your particular servers but this is an example:

/^Received:.* \[127\.0\.\.0\1\]\) by \S+\.server\.com \(Postfix\)/ IGNORE 

See http://www.postfix.org/header_checks.5.html for more details and options.

See for an example post from someone doing the same thing: http://zcentric.com/2013/04/15/remove-internal-hosts-in-postfix/

And this, for someone's comment about whether it's right to do this or not - postfix remote received header ... to be taken with a grain of salt. Hiding internal relay may not be totally in violation of the RFC. Don't want to debate that, just want to give you various points of view.

ETL
  • 6,513
  • 1
  • 28
  • 48