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

I've got a domain (example.com) registered with Google Apps, and have their mailservers registered as the MX record for my domain. I also have a site with a central mailserver (Exim4 on Ubuntu), and a number of other servers. Each server is set to use this mailserver as a smarthost for outgoing mail.

The issue I have is that when a server sends mail to an address of the format user@hostname.example.com (e.g. when a cronjob fails), the mailserver doesn't know what to do with it. It tries to make an SMTP connection directly to hostname.exmple.com, which fails.

How would I configure exim so that it knows to deliver @*.example.com to the MX record for example.com?

share|improve this question

1 Answer 1

In DNS for your zone, create an MX record for hostname.example.com, pointed to the same hostname that example.com MX is pointed to.

Or configure your various servers to send mail from *@example.com instead of *@hostname.example.com.

share|improve this answer

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.