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

share|improve this question
add comment

2 Answers

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.

share|improve this answer
    
Shame on you for hacking on your sendmail.cf. ;) –  Brian Reiter Jun 17 '09 at 4:33
    
I would like to use the existing smtp server on the linux server. I just want it to deliver email to the server listed in the MX record for its domain rather than too itself. –  Mattew Jun 17 '09 at 5:17
    
What david said and set aliases or .forwards for local accounts. –  Jason Tan Jun 18 '09 at 17:12
add comment

You can use FEATURE(nullclient). Or, you can change ruleset 0 to do the same thing.

share|improve this answer
add comment

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.