腾讯企业自定义域名邮箱发送邮件到谷歌Gmail失败

记于:2024-04-10 晚上
地点:浙江省·温州市·家里
天气:晴天

背景#

我的邮箱域名是绑定到腾讯企业邮箱的,今天发了一封邮件到一个gmail邮箱,被退回了,退信原因如下:


很抱歉您发送的邮件被退回,以下是该邮件的相关信息:
…省略…
退信原因 发件人(…省略…)域名的DNS记录未设置或设置错误导致对方拒收此邮件。
host gmail-smtp-in.l.google.com[74.125.23.26] said: 550-5.7.26 This mail has been blocked because the sender is unauthenticated. Gmail requires all senders to authenticate with either SPF or DKIM. Authentication results: DKIM = did not pass SPF [yeshimin.com] with ip: [54.206.16.166] = did not pass For instructions on setting up authentication, go to https://support.google.com/mail/answer/81126#authentication y23-20020a17090264d700b001e3d3ac40a1si8808240pli.17 - gsmtp (in reply to end of DATA command)
解决方案 请通知你的邮箱管理员为邮箱域名设置正确的DNS(SPF、DKIM、DMARC)记录。详细请见 http://service.exmail.qq.com/cgi-bin/help?subtype=1&&no=1000580&&id=20012。

此外,您还可以 点击这里 获取更多关于退信的帮助信息。


根据以上信息得知,发现是因为邮箱域名缺少SPF、DKIM、DMARC记录导致的,所以需要在域名解析中添加这些记录。

解决过程#

1.添加SPF记录和DMARC记录#

参考:https://open.work.weixin.qq.com/help2/pc/19820?person_id=1&subtype=1&id=29&no=188

1.1 添加SPF记录#

添加一条TXT记录,主机名为@,记录值为:v=spf1 include:spf.mail.qq.com ~all

1.2 添加DMARC记录#

添加一条TXT记录,主机名为_dmarc,记录值为:v=DMARC1; p=none; rua=mailto:mailauth-reports@qq.com

2.添加DKIM记录#

2.1 以管理员身份进入腾讯企业邮箱后台
2.2 菜单【工具箱】 -> 【DKIM验证】
2.3 根据配置信息,在域名解析中添加相应TXT记录即可