Postfix:无法将电子邮件转发至 GMail

Postfix:无法将电子邮件转发至 GMail

在我的(网络服务器)机器上,我只希望能够发送和接收电子邮件,并将发往特定地址的电子邮件转发到我的 GMail 收件箱。

现在,我已经安装postfix并创建了一个~/.forward文件:

[email protected]

如果我使用以下命令之一向自己发送邮件,我会在我的 GMail 邮箱中正确收到该邮件(尽管在垃圾邮件文件夹中):

mail [email protected]
mail [email protected]

但是,如果我尝试从另一台主机发送电子邮件(即,我尝试从我的 GMail 发送邮件到[email protected]),它根本就不会到达,甚至不会出现在垃圾邮件文件夹中。

奇怪的是,/var/log/mail.info显示收货和送回 GMail 的信息:

Sep  6 10:39:53 rage postfix/smtpd[13924]: B05BB22018C: client=mail-qw0-f44.google.com[209.85.216.44]
Sep  6 10:39:53 rage postfix/cleanup[13929]: B05BB22018C: message-id=<CADuqLwaaT-MU4hFoL8U-SMBEU8VCQ6aPnB4x0-tzghaAayonBQ@mail.gmail.com>
Sep  6 10:39:53 rage postfix/qmgr[13684]: B05BB22018C: from=<[email protected]>, size=1462, nrcpt=1 (queue active)
Sep  6 10:39:53 rage postfix/cleanup[13929]: E2CB422018F: message-id=<CADuqLwaaT-MU4hFoL8U-SMBEU8VCQ6aPnB4x0-tzghaAayonBQ@mail.gmail.com>
Sep  6 10:39:53 rage postfix/local[13930]: B05BB22018C: to=<[email protected]>, relay=local, delay=0.31, delays=0.31/0/0/0, dsn=2.0.0, status=sent (forwarded as E2CB422018F)
Sep  6 10:39:53 rage postfix/qmgr[13684]: E2CB422018F: from=<[email protected]>, size=1585, nrcpt=1 (queue active)
Sep  6 10:39:53 rage postfix/qmgr[13684]: B05BB22018C: removed
Sep  6 10:39:54 rage postfix/smtp[13931]: E2CB422018F: to=<[email protected]>, orig_to=<[email protected]>, relay=gmail-smtp-in.l.google.com[74.125.77.27]:25, delay=0.53, delays=0/0/0.08/0.45, dsn=2.0.0, status=sent (250 2.0.0 OK 1315298394 46si2836091een.211)
Sep  6 10:39:54 rage postfix/qmgr[13684]: E2CB422018F: removed

它明确地说status=sent

GMail 会丢失我的邮件吗?如果是这样,我该怎么办?

答案1

这似乎是一个常见问题:

https://serverfault.com/questions/255300/postfix-not-forwarding-to-forward-address

https://serverfault.com/questions/288863/forward-mails-to-gmail

似乎 Gmail 不接受转发回同一帐户的邮件。尝试发送电子邮件至[电子邮件保护]来自其他帐户,即不是应该转发到的 Gmail 帐户。这样应该可以。

答案2

有解决办法吗?我很确定几年前这个在我的服务器上有效,但现在不行了。

我原本以为.forward设置文件后,所有电子邮件都会转发到该地址,而不是本地计算机。但mail.log我看到电子邮件仍然发送到root@localmachine转发地址,而不是转发地址。

答案3

据我所知,Gmail 检测到收到的电子邮件与您通过 Gmail 本身发送的电子邮件完全相同,因此不会通知用户。我猜逻辑是“为什么要通知用户他收到了他/她写的相同消息?”。

相关内容