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