如何让 postfix 和 dovecot 连接到外部域?

如何让 postfix 和 dovecot 连接到外部域?

在过去的几个小时里,我一直在尝试让 dovecot 和 postfix 向 GMail 和网络托管电子邮件等服务发送电子邮件。我知道(并希望)他们没有阻止我的服务器。它是运行 Ubuntu 14.10 的 Google Compute Engine 服务器,我已打开正确的端口(25、143 和 993),但仍然无法连接。我刚刚运行了以下命令:

echo "test email text." | mail -s "test email" [email protected]

它尝试发送它。以下是 的输出tail -f /var/logs/mail.log

Mar 21 23:09:01 realitysoftware postfix/qmgr[5928]: 44C63413ED: from=<[email protected]>, size=742, nrcpt=1 (queue active)
Mar 21 23:09:01 realitysoftware postfix/local[6815]: 44C63413ED: to=<[email protected]>, orig_to=<root>, relay=local, delay=0.02, delays=0.01/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Mar 21 23:09:01 realitysoftware postfix/qmgr[5928]: 44C63413ED: removed
Mar 21 23:14:55 realitysoftware postfix/qmgr[5928]: 037D741394: from=<[email protected]>, size=387, nrcpt=1 (queue active)
Mar 21 23:15:25 realitysoftware postfix/smtp[6942]: connect to gmail-smtp-in.l.google.com[74.125.201.27]:25: Connection timed out
Mar 21 23:15:25 realitysoftware postfix/smtp[6942]: connect to gmail-smtp-in.l.google.com[2607:f8b0:4001:c01::1a]:25: Network is unreachable
Mar 21 23:15:55 realitysoftware postfix/smtp[6942]: connect to alt1.gmail-smtp-in.l.google.com[173.194.208.27]:25: Connection timed out
Mar 21 23:15:55 realitysoftware postfix/smtp[6942]: connect to alt1.gmail-smtp-in.l.google.com[2607:f8b0:400d:c0a::1a]:25: Network is unreachable
Mar 21 23:15:55 realitysoftware postfix/smtp[6942]: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400c:c06::1a]:25: Network is unreachable
Mar 21 23:15:55 realitysoftware postfix/smtp[6942]: 037D741394: to=<[email protected]>, relay=none, delay=537, delays=476/0.01/60/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400c:c06::1a]:25: Network is unreachable)

我正在尝试使用 Round Cube 版本 1.1.1 设置电子邮件服务,希望对您有所帮助。我有 php5 版本 PHP 5.5.12-2ubuntu4.3 (cli)(构建时间:2015 年 3 月 16 日 20:50:26)和 PHP 5.5.12-2ubuntu4.3(构建时间:2015 年 3 月 16 日 20:50:26);Zend Engine v2.5.0,版权所有 (c) 1998-2014 Zend Technologies,以及 Zend OPcache v7.0.4-dev,版权所有 (c) 1999-2014,由 Zend Technologies 提供

我一次又一次地尝试解决这个问题,但根本没成功。有人能帮我吗?

答案1

Google 计算引擎不允许发送电子邮件 - 但通过 sendgrid 提供免费的中继服务:

https://cloud.google.com/compute/docs/tutorials/sending-mail

相关内容