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.

link|improve this question

feedback

4 Answers

up vote 0 down vote accepted

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

include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`nullclient setup')dnl
OSTYPE(`linux')dnl
FEATURE(`nullclient',`your.mail.server.address.or.name')dnl

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

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

Do you run a DNS server locally? And do you have an MX record local and with ISP?

link|improve this answer
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 domain.com – Chris Muench Feb 23 '11 at 14:15
feedback

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

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

I just answered this in another question.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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