Scrub header for internal servers in Postfix?

Solution 1:

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.