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.

  • 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
  • 1
    Possible duplicate of Sendmail : ignore local delivery – squarecandy May 9 '17 at 16:17

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

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

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

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

  • Maybe it should be converted to a comment, but it is in-network linking. – chicks Apr 13 '17 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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