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 up and running on an Ubuntu 8.04 machine. It can send mail correctly to all but the domain to which it is a part. How do I configure it to not send to itself for email addresses on its domain? I want it to use the MX records for its own domain just like it does for other domains, so that the email is delivered to the mail server for the domain, not to itself.


share|improve this question

If you are playing the "" game:


If you hack directly:


...but if you hack directly you probably already knew that.

This tells the system that for accounts in its own domain that it doesn't directly know about, send mail to smtp.your.provider which presumably knows what to do with it. Note that accounts that it does know about (ie root) will need to be aliased to a non-local account or messages to root will be delivered locally.

share|improve this answer
Shame on you for hacking on your ;) – Brian Reiter Jun 17 '09 at 4:33
I would like to use the existing smtp server on the linux server. I just want it to deliver email to the server listed in the MX record for its domain rather than too itself. – Mattew Jun 17 '09 at 5:17
What david said and set aliases or .forwards for local accounts. – Jason Tan Jun 18 '09 at 17:12

You can use FEATURE(nullclient). Or, you can change ruleset 0 to do the same thing.

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.