这两天给我们开发的Chrome插件:Youtube中文配音增加了账户注册和登录功能,其中有一步是邮箱验证,所以这边会在Spring Boot后台给用户的邮箱发个验证信息。如果发邮件,之前的文章教程里就有,这里就不说了,着重说说这两天发现所有用Gmail注册的用户都被退件的问题。
报错现象
先来看看具体报错(如果您也碰到这种情况,那么可以看看后面的内容):
退信原因:发件人(youtubedubbing@mail.spring4all.com)域名的DNS记录未设置或设置错误导致对方拒收此邮件。 host gmail-smtp-in.l.google.com[142.251.10.26] said: 550-5.7.26 This mail is unauthenticated, which poses a security risk to the sender and Gmail users, and has been blocked. The sender must authenticate with at least one of SPF or DKIM. For this message, DKIM checks did not pass and SPF check for [mail.spring4all.com] did not pass with ip: [54.204.34.130]. The sender should visit https://support.google.com/mail/answer/81126#authentication for instructions on setting up authentication. k191-20020a636fc8000000b00565bcd33890si6279798pgc.848 - 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 。