现象
发送到 QQ 邮箱没问题啊,对方(测试qq邮箱)能接受到。发送到 gmail 对方就收不到了,原因为何?
报错信息
邮件主体:
无法发送到 xxx@gmail.com
邮件内容:
收到 PostMaster 的邮件
很抱歉您发送的邮件被退回,以下是该邮件的相关信息:
退信原因
发件人(aaa@bbb.com)域名的DNS记录未设置或设置错误导致对方拒收此邮件。 host gmail-smtp-in.l.google.com[74.125.23.26] said: 550-5.7.26 Your email 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 [bbb.com] with ip: [54.92.39.34] = did not pass For instructions on setting up authentication, go to https://support.google.com/mail/answer/81126#authentication d9443c01a7336-1ff58f0c3ebsi14176765ad.77 - gsmtp (in reply to end of DATA command)
解决办法
设置域名 dns 解析
TXT记录值设置要求如下:
主机记录:@或为空
记录类型:TXT
记录值为:v=spf1 include:spf.mail.qq.com ~all
结果如