connect to aspmx.l.google.com:25: Network is unreachable 是什么意思?

use*_*834 15 postfix

我有带有 RHEL 6 和 postfix (postfix-2.6.6-2.2.el6) 的服务器,当我尝试向 Google 发送电子邮件时,我在 /var/logmaillog 中收到了这个:

postfix/smtp[13414]: 6F4DC10406E7: to=<XXX@englishonlineuniversity.com>, relay=none, delay=0.16, delays=0.02/0/0.14/0, dsn=4.4.1, status=deferred (connect to aspmx.l.google.com[2a00:1450:4013:c01::1b]:25: Network is unreachable)
Run Code Online (Sandbox Code Playgroud)

此错误仅发生在此域 (englishonlineuniversity.com) 上。

connect to aspmx.l.google.com:25: Network is unreachable 是什么意思?

eta*_*klo 20

这意味着您的 MTA 正在尝试通过 IPv6 (2a00:1450:4013:c01::1b) 连接到 Google SMTP。这不起作用,因为您的网络可能不支持 IPv6。

要摆脱错误消息,您可以通过/etc/postfix/main.cf使用以下指令编辑您的 Postfix 来配置 Postfix 不使用 IPv6 :

inet_protocols = ipv4
Run Code Online (Sandbox Code Playgroud)

之后,您必须重新启动 postfix:

/etc/init.d/postfix restart
Run Code Online (Sandbox Code Playgroud)

  • 您还可以使用 `smtp_address_preference = ipv4` 而不是完全禁用 ipv6 (2认同)