CentOS Sendmail – Ignoring MX Records for Local Domain

centossendmail

I have set up my domain to use google apps for its mail server. I have set up the appropriate MX entries in DNS. Any mail sent from the server to outside mail works fine. The problem is when I am sending mail to users on my domain. For example mail to "me@example.com" will go to my local mailbox for user "me", instead of checking the MX record for example.com and going to gmail.

I have searched google for hours and found people with this same problem, I haven't found any solutions yet though.

EDIT:
For the record, I have DontProbeInterfaces set to true and I don't have the my domain in Class w

Best Answer

Some people in #sendmail on freenode helped me figure out that the problem in this particular case was not with send mail, but my dns records. I had a CNAME for my domain name pointing to the application server that was sending the mail, using an A record instead fixed the problem.