- Posted on
- • Server
Remove or hide client sender IP from Postfix on SMTP relay
- Author
-
-
- User
- danpros
- Posts by this author
- Posts by this author
-
Sometimes we need to hide our IP address for security, if we use Cloudflare we need to create separate email server so our IP site origin will keep hidden.
The following is how to to remove client sender IP (X-Originating-IP) from Postfix generated email header and the only available data is IP from our email server.
Open /etc/postfix/master.cf and find:
cleanup unix n - n - 0 cleanup
Add below those line and become:
cleanup unix n - n - 0 cleanup
-o header_checks=pcre:/etc/postfix/header_checks
Edit /etc/postfix/header_checks and add below codes:
/^Received:/ IGNORE
Now restart postfix. Let say on CentOS:
service postfix restart