wiki'd

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/main.cf
$ vi /etc/postfix/headers-cleanup
$ service postfix reload

/etc/postfix/main.cf

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

/etc/postfix/headers-cleanup

/^Message-Id: <(.*)@mail.wiki.ro>$/ REPLACE Message-Id: <$1@wiki.jokeru.ro>
/^Received: by mail.wiki.ro (.*)$/ REPLACE Received: by wiki.jokeru.ro $1
/^Received: from mail.wiki.ro/ IGNORE

Comments