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 sendmail which works great sending to external domains, but for its own internal domain it tries to deliver mail locally instead of externally based on the MX records. Is there a way to fix this?

I have looked at other posts, but haven't been able to figure it out.

share|improve this question
Do you run a DNS server locally? And do you have an MX record local and with ISP? – Seth Feb 22 '11 at 21:10
this was obviously not an answer, I will adjust momentarily – Seth Feb 22 '11 at 21:12
I do not run a dns server locally for – Chris Muench Feb 23 '11 at 14:15
up vote 0 down vote accepted

I think you may benefit from "nullclient" configuration of sendmail. Just put the following in your /etc/mail/

VERSIONID(`nullclient setup')dnl

It will forward everything to an external mail server except mail addressed to 'root' (at least this is how it works on Centos).

share|improve this answer
This didn't work for me on Ubuntu – Chris Muench Feb 23 '11 at 20:15

Just a wild guess, maybe the domainame is in the /etc/mail/local-host-names file? and thus gets interpreted local.

share|improve this answer
I tried that too, I removed the domain and it didn't work – Chris Muench Feb 23 '11 at 20:15

I just answered this in another question.

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.