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

share|improve this question

3 Answers 3

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 foo.mail.example.com) and put the domain you want sent to gmail (example.com) in the relay-domains file. Then the server would "accept" mail for example.com but then relay it based on MX.

Alternatively you could try putting 'example.com' 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.
HTH

share|improve this answer

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.