因此,我设置了一个 Postfix 邮件服务器,当我运行以下命令时:
telnet smtp.gmail.com 25
------------------------------------
Trying 142.250.147.108...
Trying 2a00:1450:4025:c01::6d...
telnet: Unable to connect to remote host: Network is unreachable
但是当我尝试发送电子邮件时:
root@vps:~# mail -a FROM:[email protected] *my address*@gmail.com
Cc: mail
Subject: test
test
然后日志说:
Feb 8 19:11:15 chatenium postfix/local[3680]: 9E6654D6A3: to=<mail@chatenium>, relay=local, delay=0.08, delays=0.05/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to mailbox)
Feb 8 19:11:27 chatenium postfix/smtp[3669]: connect to gmail-smtp-in.l.google.com[142.250.27.27]:25: Connection timed out
Feb 8 19:11:45 chatenium postfix/smtp[3681]: connect to gmail-smtp-in.l.google.com[142.250.27.27]:25: Connection timed out
你能告诉我为什么吗?谢谢!
答案1
您的 IPv6 配置已损坏。请修复它,或告诉 Postfix 仅使用 IPv4。
编辑/etc/postfix/main.cf
并更改inet_protocols = all
为inert_protocols = ipv4
强制 Postfix 仅使用 IPv4。