2

I've a single host with CentOS 6.3. I manage that host via SSH. The server itself is uname -n: servername.foo.com. On this host I've multiple, unrelated httpd vhosts.

The problm is: when one vhost sends a mail with PHP mail(), the sent mail header contains multiple servername.foo.com traces (Message ID is xyx@servername.foo.com, Received by is servername.foo.com and so on).

The mail are sent by postfix. No other mail services are used on this server.

The question is: how can I sent e-mail from each vhost pretending to be thatVhost.com instead of leaving traces of servername.foo.com in the mail headers?

0
1

No, you can't. It has been asked long time ago and yet the answer is still no.

Parameter myhostname in main.cf was used to control the Message-ID/Received value in mail header. By default myhostname was set to hostname of server (uname -a). If you want to change servername.foo.com to another name then you can define that paramater. But again, you can't has myhostname unique per virtual host. SMTP isn't HTTP who has header Host.

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