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 was working on a sendmail server the other day and was really frustrated. Something in this machine somewhere is telling it to treat a domain as if it were locally on the box. The problem is, I can't figure out where this is getting done. It's not in the local-host-names file...there's nothing for it in the HOSTS file, DNS points away from the server...I grep'd for the domain name in the sendmail configuration directory...I got nothing. I was able to fix it last week by pointing unknown users of local domains to another mail server, but it's still bothering me today that I couldn't figure out where the configuration for treating a domain as local in sendmail is.

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

I figured out what was causing it. For some reason, there were multiple PTR records setup and one of them was the domain that was in question. Sendmail is doing a PTR lookup on the hostname and automatically adding everything returned as a local domain

share|improve this answer
add comment

Did your try RTFM?

sendmail uses the following configuration files:

Filename                    Function
/etc/mail/access            sendmail access database file
/etc/mail/aliases           Mailbox aliases
/etc/mail/local-host-names  Lists of hosts sendmail accepts mail for
/etc/mail/mailer.conf           Mailer program configuration
/etc/mail/mailertable           Mailer delivery table
/etc/mail/sendmail.cf           sendmail master configuration file
/etc/mail/virtusertable         Virtual users and domain tables

no more than 10 seconds of STFW

share|improve this answer
    
Did you try to read my comment? I said I grep'd all of /etc/mail for the domain name and it's not there. I looked in every single config file in /etc/mail. Maybe you should try not being such a condescending schmuk. –  Will Oct 3 '11 at 13:47
    
If your local hostnames are listed as names of one of the local IP addresses in your /etc/hosts, then none is needed in /etc/mail/local-host-names. You can see the list of host names which Sendmail considers local by running sendmail in "test mode" and expanding the $=w macro to see what hostnames it has already "discovered" as local: $ echo '$=w' | sendmail -bt –  Lazy Badger Oct 3 '11 at 14:01
    
Forgot to mention (long time away from sendmail) possible Cw option in sendmail.mc –  Lazy Badger Oct 3 '11 at 14:14
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.