Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 "" will go to my local mailbox for user "me", instead of checking the MX record for 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

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer

Check the contents of localhostnames. If the destination is there, or sendmail is configured to think that it is authoritative for that domain, it delivers locally because hey, it's authoritative.

One way to get around it is to put the machine in a totally different domain (ie and put the domain you want sent to gmail ( in the relay-domains file. Then the server would "accept" mail for but then relay it based on MX.

Alternatively you could try putting '' in the mailertable, but you'd be putting in a specific destination, not a MX record.

share|improve this answer

Do you still actually need sendmail on the server now that your using gmail ?
If your users are using google mail for both SMTP and POP/IMAP then the answer is more than liekely NO.
I have setup several clients with google mail and I remove sendmail from the box and replace it with SSMTP or nullmailer so that cron and web apps can still send out emails.
This removed any hassles I had similar to you.

share|improve this answer

Your Answer


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.