我尝试使用 postfix 只是为了允许我的博客发送电子邮件,我不需要任何像 webmail 这样的花哨的东西。我只想让它向我的 gmail 或 google apps 帐户发送消息。
我尝试使用 mailutils 和 PHP“邮件”函数发送测试消息。日志报告:
Apr 20 03:28:07 vultr postfix/qmgr[5680]: 4FD1D2BB10: from=<xxx@xxx>, size=350, nrcpt=1 (queue active)
Apr 20 03:28:07 vultr postfix/smtp[8359]: connect to aspmx.l.google.com[2607:f8b0:4001:c05::1b]:25: Network is unreachable
Apr 20 03:28:37 vultr postfix/smtp[8359]: connect to aspmx.l.google.com[74.125.70.27]:25: Connection timed out
Apr 20 03:28:37 vultr postfix/smtp[8359]: connect to alt2.aspmx.l.google.com[2607:f8b0:400c:c06::1a]:25: Network is unreachable
Apr 20 03:28:37 vultr postfix/smtp[8359]: connect to alt1.aspmx.l.google.com[2607:f8b0:400d:c01::1b]:25: Network is unreachable
Apr 20 03:29:07 vultr postfix/smtp[8359]: connect to alt2.aspmx.l.google.com[74.125.141.26]:25: Connection timed out
Apr 20 03:29:07 vultr postfix/smtp[8359]: 4FD1D2BB10: to=<[email protected]>, relay=none, delay=2694, delays=2634/0.01/60/0, dsn=4.4.1, status=deferred (connect to alt2.aspmx.l.google.com[74.125.141.26]:25: Connection timed out)
我已用“xxx”替换了实际的电子邮件地址,但它们是正确的。
我在向其他非 Google 托管的地址发送邮件时也遇到了同样的问题:
Apr 20 03:24:11 vultr postfix/smtp[7528]: connect to mailgate3.unl.edu[129.93.2.76]:25: Connection timed out
Apr 20 03:24:41 vultr postfix/smtp[7528]: connect to mailgate4.unl.edu[129.93.88.70]:25: Connection timed out
Apr 20 03:25:11 vultr postfix/smtp[7528]: connect to mailgate7.dfw.rackspace.its-sys.unl.edu[104.130.124.23]:25: Connection timed out
Apr 20 03:25:41 vultr postfix/smtp[7528]: connect to mailgate6.unl.edu[129.93.88.28]:25: Connection timed out
Apr 20 03:25:41 vultr postfix/smtp[7528]: 3DE6E2BB12: to=<[email protected]>, relay=none, delay=1576, delays=1423/0.01/154/0, dsn=4.4.1, status=deferred (connect to mailgate6.unl.edu[129.93.88.28]:25: Connection timed out)
怎么回事?为什么我无法连接到任何外发站点?ufw 已禁用,没有运行防火墙,除非 ubuntu 在安装 postfix 时自动启用防火墙而不询问?