PDA

View Full Version : [SOLVED] Sendmail w/ Google Apps Conflict



Joeb454
December 20th, 2010, 11:04 PM
I have sendmail installed on my server, and it sends emails fine, as you'd expect it to. That is, provided the email isn't anyuser@mydomain.com, which it then just sends locally, despite the MX records pointing to Google's servers.

dig mx +short mydomain.com returns
5 alt1.aspmx.l.google.com.
10 aspmx2.googlemail.com.
1 aspmx.l.google.com.
5 alt2.aspmx.l.google.com. So I know that the MX records also resolve properly.

I've tried editing /etc/hosts to read host.mydomain.com, but then it stops sending emails altogether.

Is there any way to make sendmail send these emails to users at my domain as well as everybody else?

stmiller
December 21st, 2010, 06:05 AM
You can try this with sendmail to in effect disable local delivery:

http://serverfault.com/questions/65365/disable-local-delivery-in-sendmail


define(`MAIL_HUB', `example.com.')dnl
define(`LOCAL_RELAY', `example.com.')dnl

SeijiSensei
December 21st, 2010, 03:54 PM
The file /etc/mail/local-host-names contains a list of all domains and hostnames for which sendmail uses local delivery. Often the installer will put entries there for the local machine. If you don't want local delivery for anything other than localhost, remove the remaining entries from local-host-names.

Joeb454
December 22nd, 2010, 01:09 PM
The file /etc/mail/local-host-names contains a list of all domains and hostnames for which sendmail uses local delivery. Often the installer will put entries there for the local machine. If you don't want local delivery for anything other than localhost, remove the remaining entries from local-host-names.

I saw this mentioned on a few sites I looked at before posting here, oddly the domain name in question was never in that file, only localhost was.


You can try this with sendmail to in effect disable local delivery:

http://serverfault.com/questions/65365/disable-local-delivery-in-sendmail


define(`MAIL_HUB', `example.com.')dnl
define(`LOCAL_RELAY', `example.com.')dnl

Adding those 2 lines to the end of /etc/sendmail.mc and re-running sendmailconfig worked perfectly, thanks!