Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a centos 5 box running exim. The box hosts many domain names which send outgoing email. The problem is that the emails show that the email is coming the box's hostname (say, rather than from each domain name ( and How can I set this up so that an email sent from actually says that it's coming from

share|improve this question

migrated from Nov 4 '11 at 17:45

This question came from our site for computer enthusiasts and power users.

If you are asking about the host name in the Received: header this is correct behavior. Just add an MX record for all your domains referencing the box's hostname. Also consider adding SPF records to the domains. If your server is Internet facing, it needs a static address, and it IP address should have a PTR record returning its FQDN (Fully Qualified Domain Name).

If you are asking about what recipients see in their mail clients this is determined by the mail user-agent sending the message: If it puts the appropriate From: or Reply-to: headers in the outgoing e-mail, these should show up appropriately when the email is read.
For exim you can put entries in /etc/email-addresses to change the default domain and/or name for particular users.

share|improve this answer
There's a lot of information here - many thanks but I'm still flailing. So let's say the server name is and it has a static IP address. On the same box, I host at a different IP address. I send out emails from, say,, but in my email client, it says Received: from, presumably because that's the main IP address of the box. So should I somehow be telling exim to send the email from the IP address of – farhadf Nov 11 '11 at 19:56
No, but you should add an MX record for pointing to Also make sure that the PTR record for's IP address resolves to – BillThor Nov 11 '11 at 21:36

Your Answer


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.