Sendmail Configuration to not deliver mail to local machine

emailsendmail

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.

Matt

Best Answer

If you are playing the "sendmail.mc" game:

define(`SMART_HOST',`smtp.your.provider')

If you hack sendmail.cf directly:

DSsmtp.your.provider

...but if you hack sendmail.cf 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.

Related Topic