我在Debian Wheezy上使用Postfix和Dovecot来发送和接收电子邮件。 鸽舍似乎工作得很好; 我可以连接,检索,移动,删除等已经在帐户中存在的电子邮件(从过去的cron作业)。 Postfix似乎不能正常工作。 这是发生了什么事情:
我的错误日志:
Aug 19 18:12:26 debian postfix/smtp[17822]: 3F920CFC2B4: to=<[MY GMAIL USERNAME]@gmail.com>, relay=none, delay=1282, delays=1219/0.01/63/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smail-smtp-in.l.google.com[74.125.130.26]:25: Connection timed out) Aug 19 18:14:56 debian postfix/qmgr[17804]: 3F920CFC2B4: from=<ian@[MYDOMAIN].com>, size=2701, nrcpt=1 (queue active) Aug 19 18:14:56 debian postfix/smtp[17836]: connect to gmail-smtp-in.l.google.com[2607:f8b0:400e:c01::1a]:25: Network is unreachable Aug 19 18:15:17 debian postfix/smtp[17836]: connect to gmail-smtp-in.l.google.com[173.194.79.26]:25: Connection timed out Aug 19 18:15:38 debian postfix/smtp[17836]: connect to alt1.gmail-smtp-in.l.google.com[74.125.142.26]:25: Connection timed out Aug 19 18:15:38 debian postfix/smtp[17836]: connect to alt1.gmail-smtp-in.l.google.com[2607:f8b0:400e:c01::1b]:25: Network is unreachable Aug 19 18:15:38 debian postfix/smtp[17836]: connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:400e:c01::1b]:25: Network is unreachable
*编辑出我的域名和Gmail用户名。
我有一个Comcast住宅线路(静态IP),我的防火墙不是问题,端口是开放的。
我也不能发送电子邮件到我的Postfix服务器。 我已经尝试从我的Gmail帐户向我的域发送电子邮件,我也尝试从我的域内向自己发送电子邮件; 既不可行 日志中没有错误,并且没有收到邮件。
我在Postfix和Dovecot上使用STARTTLS(证书是自签名的)。 我大部分都使用这个指南 。
日志对于出站电子邮件来说是非常明显的,在你的情况下,电子邮件发送到Gmail。 您的邮件服务器无法连接到端口25上的Gmail邮件服务器。您可以简单地通过从邮件服务器通过Gmail邮件服务器进行validation,
telnet gmail-smtp-in.l.google.com. 25 telnet alt1.gmail-smtp-in.l.google.com. 25 telnet alt2.gmail-smtp-in.l.google.com. 25
您的DNS正在工作,因为您的邮件服务器能够检索gmail的MXlogging。 我会假定Comcast阻止出站端口25连接。