Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Any one the settings to remove hostname and IP address in mail headers sent from Postfix mail server.

Tried, myhostname=domain.com in main.cf but now working as expected.

Any config pls share

Regards Siva

share|improve this question

3 Answers 3

You cannot remove the hostname or IP. However, you can change them if you don't want to expose the actual hostname.

in the main.cf file:

myhostname=myhostname.mydomain.com
myorigin=mydomain.com (or /etc/mailname and put your domain name in there)
inet_interfaces = <my_alt_IP>

Create a virtual NIC with it's own IP (eg eth0:0). Edit /etc/hosts to add the new IP and alt hostname.

share|improve this answer

Do you mean that you want to amend or remove the Received: entry placed into an email header by your mail server? If so, note that section 4.4 of RFC 2821 says clearly that

An Internet mail program MUST NOT change a Received: line that was previously added to the message header. SMTP servers MUST prepend Received lines to messages

and moreover that your Received: line

SHOULD contain both (1) the name of the source host as presented in the EHLO command and (2) an address literal containing the IP address of the source, determined from the TCP connection.

In other words, what you ask is an RFC violation. Don't do it, no matter who else thinks it's a good idea.

share|improve this answer

The Received-Header which contains the ip/helo/reverse dns of your postfix server is written by the RECEIVING mail server, not by your postfix, so there is no way to remove this. you could only remove received headers which contain information about the submitting mail client (header checks IGNORE rule)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.