2

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.

Chris Muench
  • 487
  • 3
  • 10
  • 31

3 Answers3

0

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

dtoubelis
  • 4,677
  • 1
  • 29
  • 32
0

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

mdpc
  • 11,856
  • 28
  • 53
  • 67
0

I just answered this in another question.

adamo
  • 6,925
  • 3
  • 30
  • 58