如何从具有相同名称的网络服务器向我的谷歌应用邮件服务器发送邮件(使用sendmail)?

时间:2022-12-01 15:58: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.

我的域名邮件由谷歌应用服务处理,所有必需的DNS MX记录输入正确。此外,我还有处理域的HTTP请求的Web服务器。我无法将邮件从该服务器发送到我的邮件域,sendmail忽略MX记录并始终尝试在本地为我的域发送所有邮件。

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

看起来它将域名视为本地,如果它解析为本地IP地址。

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

3 个解决方案

#1


Well. Found a solution for my case.

好。为我的案子找到了解决方案。

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

只需将以下行添加到源.mc文件并重新创建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.

沟通sendmail并获得postfix。 Sendmail很难正确配置,并且难以保持安全。 Postfix在两个方面都很容易。我没有经验,但我被告知qmail和exim同样好。

#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).

虽然我正在为我的服务器上的同一问题寻找解决方案,但有一个解决方法:转到您的谷歌应用程序电子邮箱,设置/帐户,然后创建一个新帐户来提取电子邮件,作为邮件服务器指定您自己的服务器的IP,并为其提供用于您之前的邮件解决方案的用户名和密码(在谷歌应用程序之前)。

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

这样你就可以谷歌登录到你的本地邮件服务器并收取所有“丢失”的电子邮件,每10分钟左右。

#1


Well. Found a solution for my case.

好。为我的案子找到了解决方案。

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

只需将以下行添加到源.mc文件并重新创建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.

沟通sendmail并获得postfix。 Sendmail很难正确配置,并且难以保持安全。 Postfix在两个方面都很容易。我没有经验,但我被告知qmail和exim同样好。

#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).

虽然我正在为我的服务器上的同一问题寻找解决方案,但有一个解决方法:转到您的谷歌应用程序电子邮箱,设置/帐户,然后创建一个新帐户来提取电子邮件,作为邮件服务器指定您自己的服务器的IP,并为其提供用于您之前的邮件解决方案的用户名和密码(在谷歌应用程序之前)。

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

这样你就可以谷歌登录到你的本地邮件服务器并收取所有“丢失”的电子邮件,每10分钟左右。