0

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

KJG
  • 111
  • 1
  • 5

3 Answers3

1

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.

KJG
  • 111
  • 1
  • 5
0

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.

David Mackintosh
  • 14,223
  • 6
  • 46
  • 77
0

Do you still actually need sendmail on the server, now that you're using gmail ?
If your users are using google mail for both SMTP and POP/IMAP, then the answer is more than likely NO.
I have set up 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 email.
This setup removed any hassles I had similar to yours.
HTH

user2066657
  • 336
  • 2
  • 13
aussielunix
  • 151
  • 4