How do I send mail to my google apps mail server from the webserver with the same name (using sendmail)?

南楼画角 提交于 2019-12-11 21:59:13

问题


Mail for my domain is handled by google apps service, all required DNS MX records entered correctly. Also I have webserver that handles HTTP requests for the domain. And I can't send mail from that server to my mail domain, sendmail ignores MX records and always trying to deliver all messages for my domain locally.

Looks like it consider domain name as local if it resolves to local ip address.

This is a cut from the logs:

Feb  7 18:03:03 vds sendmail[4100]: n17I33c2004100: test@example.com... User unknown
Feb  7 18:03:03 vds sendmail[4100]: n17I33c2004100: to=test@example.com, delay=00:00:00, mailer=local, pri=0, dsn=5.1.1, stat=User unknown
Feb  7 18:03:03 vds sendmail[4100]: n17I33c2004100: from=root, size=36, class=0, nrcpts=1, msgid=<200902071803.n17I33c2004100@vds.xxxxxx.com>, relay=root@localhost

回答1:


Well. Found a solution for my case.

Just add the following line to your source .mc-file and recreate sendmail.cf

define(`confDONT_PROBE_INTERFACES', `true')



回答2:


Ditch sendmail and get postfix. Sendmail is difficult to configure correctly, and difficult to keep secure. Postfix is easy on both counts. I have no experience with them, but I'm told that qmail and exim are equally good.




回答3:


While I'm looking for the solution for the same issue on my server, there is a work around for you: go to your google app email box, to settings/accounts, then create a new account to pull the emails from, as mail server specify IP of your own server and also give it username and password that was working for your previous mailing solution (before google apps).

That way you'll have google sign into your local mail server and pick up all the 'lost' emails, each 10 or so minutes.



来源:https://stackoverflow.com/questions/524224/how-do-i-send-mail-to-my-google-apps-mail-server-from-the-webserver-with-the-sam

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!