You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

仅IPv6环境下Postfix无法向Yahoo邮箱发送邮件的问题求助

仅IPv6环境下Postfix无法向Yahoo邮箱发送邮件的问题求助

我刚搭建了一台纯IPv6的云服务器,已经配置好AAAA和MX记录,Postfix也完成了安装与配置,目前发邮件到Gmail一切正常,但发送到Yahoo邮箱时却出现报错,想请教下各位大佬原因和解决办法。

我的Postfix配置

编辑主配置文件的命令:

$ sudo nano /etc/postfix/main.cf

配置内容如下:

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 3.6 on
# fresh installs.
compatibility_level = 3.6
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_security_level=may
smtp_tls_CApath=/etc/ssl/certs
smtp_tls_security_level=may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = ubuntu-4gb-fsn1-1
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv6
myorigin = /etc/mailname
virtual_alias_domains = hash:/etc/postfix/virtual_domains
virtual_alias_maps = hash:/etc/postfix/virtual_forwards

另外我设置了邮件转发规则,将所有收到的邮件转到我的Google邮箱,配置转发规则的命令:

$ sudo nano /etc/postfix/virtual_forwards

转发内容:

contact@xxx.net xxx@googlemail.com

正常测试(发往Gmail)

执行发送命令:

$ echo "test email" | sendmail -F "L XXX" -f "contact@xxx.net" xxx15081975@gmail.com

查看/var/log/mail.log日志片段:

Jul 18 15:48:22 ubuntu-4gb-fsn1-1 postfix/pickup[46761]: 6766367234: uid=0 from=contact@xxx.net
Jul 18 15:48:22 ubuntu-4gb-fsn1-1 postfix/cleanup[48067]: 6766367234: message-id=20230718154822.6766367234@ubuntu-4gb-fsn1-1
Jul 18 15:48:22 ubuntu-4gb-fsn1-1 postfix/qmgr[46403]: 6766367234: from=contact@xxx.net, size=271, nrcpt=1 (queue active)
Jul 18 15:48:23 ubuntu-4gb-fsn1-1 postfix/smtp[48069]: 6766367234: to=xxx15081975@gmail.com, relay=gmail-smtp-in.l.google.com[2a00:1450:400c:c08::1a]:25, delay=0.8, delays=0.02/0.02/0.12/0.65, dsn=2.0.0, status=sent (250 2.0.0 OK 1689695303 a5-20020adfeec5000000b003143d46910bsi1155011wrp.645 - gsmtp)
Jul 18 15:48:23 ubuntu-4gb-fsn1-1 postfix/qmgr[46403]: 6766367234: removed

异常情况(发往Yahoo)

执行发送命令:

$ echo "test email" | sendmail -F "L XXX" -f "contact@xxx.net" xxx@yahoo.co.uk

查看/var/log/mail.log日志片段:

Jul 18 15:52:17 ubuntu-4gb-fsn1-1 postfix/cleanup[48086]: 7FC9567234: message-id=20230718155217.7FC9567234@ubuntu-4gb-fsn1-1
Jul 18 15:52:17 ubuntu-4gb-fsn1-1 postfix/qmgr[46403]: 7FC9567234: from=contact@xxx.net, size=271, nrcpt=1 (queue active)
Jul 18 15:52:17 ubuntu-4gb-fsn1-1 postfix/smtp[48088]: warning: no MX host for yahoo.co.uk has a valid address record
Jul 18 15:52:17 ubuntu-4gb-fsn1-1 postfix/smtp[48088]: 7FC9567234: to=xxx@yahoo.co.uk, relay=none, delay=0.04, delays=0.02/0.02/0/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=mx-eu.mail.am0.yahoodns.net type=AAAA: Host found but no data record of requested type)
Jul 18 15:52:17 ubuntu-4gb-fsn1-1 postfix/cleanup[48086]: 8D9F567235: message-id=20230718155217.8D9F567235@ubuntu-4gb-fsn1-1
Jul 18 15:52:17 ubuntu-4gb-fsn1-1 postfix/bounce[48089]: 7FC9567234: sender non-delivery notification: 8D9F567235
Jul 18 15:52:17 ubuntu-4gb-fsn1-1 postfix/qmgr[46403]: 8D9F567235: from=<>, size=2440, nrcpt=1 (queue active)
Jul 18 15:52:17 ubuntu-4gb-fsn1-1 postfix/qmgr[46403]: 7FC9567234: removed

之前用IPv4服务器的时候发Yahoo邮箱完全正常,换成纯IPv6环境就出现这个问题了,会不会是Yahoo对IPv6有特殊限制?有没有办法解决这个问题?

备注:内容来源于stack exchange,提问作者Run

火山引擎 最新活动