by JoKeru

Postfix Headers CleanUp

Set up Postfix to remove / change specific headers within emails that pass through their systems. The most common use for this is to set up a relaying server that will remove any reference of where source emails originated and relevant information about the sender's computer. Another useful application for this type of header_checks is to remove details about additional functions of your mail server that you do not want made available to the world.

$ vi /etc/postfix/
$ vi /etc/postfix/headers-cleanup
$ service postfix reload


header_checks = regexp:/etc/postfix/headers-cleanup


/^Message-Id: <(.*)>$/ REPLACE Message-Id: <$>
/^Received: by (.*)$/ REPLACE Received: by $1
/^Received: from IGNORE