我有一个 Ubuntu VPS,它使用 exim4 作为卫星电子邮件服务器,通过 Google Apps 发送邮件。
原本要发送到 Google 托管地址的邮件会被送达。这意味着“联系我们”网络表单之类的东西可以正常工作,因为它会发送到 Google Apps 托管的域。
从 Google 网络界面接收和发送的电子邮件运行正常,并且所有 MX 记录似乎都井然有序。
但是,由于某种原因,从服务器发送外发电子邮件到非 Google 托管的地址(例如,ASPMX.L.GOOGLE.COM 不知道的地址)。
这是我收到的 exim4 日志消息:
2009-05-19 13:25:54 1M6PKM-0008UQ-KL <= [email protected] U=user P=local S=1129
2009-05-19 13:25:58 1M6PKM-0008UQ-KL ** [email protected] R=smarthost T=remote_smtp_smarthost: SMTP error from remote mail server after RCPT TO:<[email protected]>: host gmail-smtp-in.l.google.com [209.85.217.49]: 550-5.1.1 The email account that you tried to reach does not exist. Please try\n550-5.1.1 double-checking the recipient's email address for typos or\n550-5.1.1 unnecessary spaces. Learn more at\n550 5.1.1 http://mail.google.com/support/bin/answer.py?answer=6596 1si10609358gxk.44
2009-05-19 13:25:58 1M6PKQ-0008UU-Bh <= <> R=1M6PKM-0008UQ-KL U=Debian-exim P=local S=2354
2009-05-19 13:25:58 1M6PKM-0008UQ-KL Completed
我是否可能错过了一些设置(无论是在服务器上还是在 Google Apps 本身中)?
显然,我需要告诉某个配置“不,这不适合你,只需将其发送过来”。有什么建议吗?(我很乐意发布任何配置)
我在 Google 上进行了广泛搜索,但没有找到任何针对我的问题的具体信息。
编辑:我还要补充一点,我在我的 Google 电子邮件帐户中(垃圾邮件文件夹中)收到了此邮件:
This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
[email protected]
SMTP error from remote mail server after RCPT TO:<[email protected]>:
host gmail-smtp-in.l.google.com [209.85.217.49]:
550-5.1.1 The email account that you tried to reach does not exist. Please try
550-5.1.1 double-checking the recipient's email address for typos or
550-5.1.1 unnecessary spaces. Learn more at
550 5.1.1 http://mail.google.com/support/bin/answer.py?answer=6596 1si10609358gxk.44
------ This is a copy of the message, including all the headers. ------
Return-path: <[email protected]>
Received: from zeta by example.com with local (Exim 4.69)
(envelope-from <[email protected]>)
id 1M6PKM-0008UQ-KL
for [email protected]; Tue, 19 May 2009 13:25:54 +0000
To: [email protected]
Subject: Account details for Test
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8Bit
X-Mailer: Drupal
Errors-To: [email protected]
Sender: [email protected]
Reply-To: [email protected]
From: [email protected]
Message-Id: <[email protected]>
Date: Tue, 19 May 2009 13:25:54 +0000
Test,
Thank you for registering...<snip>
答案1
至于为什么您的智能主机配置不起作用 - 您是否拥有 Google Apps 的高级版本?
您不能将免费版本用作出站中继。尝试这样做可能会显示“未找到用户”,因为可接受的地址范围仅限于 Google Apps 托管的域。
http://www.google.com/support/a/bin/answer.py?hl=en&answer=60730
“您必须拥有教育版或专业版才能使用 Google Apps 出站网关功能。”
答案2
好的,看来这是我的概念上的一点脱节。
我已将服务器设置为使用智能主机。它应该设置为互联网站点。正确配置后,它将直接连接到收件人,无需中继。只要反向 DNS 指向正确的域,它似乎就没有问题。
我运行:dpkg-reconfigure exim4-config
并选择仅监听 127.0.0.1 的“互联网站点”。这样我就无法接收传入连接(这是期望的结果),但仍然可以发送邮件。