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

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

3 Answers 3

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).

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

I just answered this in another question.

share|improve this answer

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

Your Answer

 
discard

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.