如何讓 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

相關內容