在gerrit安装中配置smtp后,确认smtpserver,用户名、密码全都正确后,发送邮件报错:
1.Mail Error: SMTP server rejected auth: 535 5.7.3 Authentication unsuccessful
解决方法:不能直接在gerrit.config中修改配置信息,需重新安装,在安装过程中输入正确用户名密码等信息即可。
2.Mail Error: Server x.x.x rejected message body: 550 5.7.1 Client does not have permissions to send as this sender
报此错网上查的一般都说:服务端没有开放给此用户发送权限,但是此用户在别的系统是可以发送邮件的,丢弃此想法,后来在gerrit的Document里的“Section sendemail”中看到一段:
“
sendemail.fromDesignates what name and address Gerrit will place in the From field of any generated email messages. The supported values are:
-
USER
Gerrit will set the From header to use the current user’s Full Name and Preferred Email. This may cause messsages to be classified as spam if the user’s domain has SPF or DKIM enabled andsendemail.smtpServer is not a trusted relay for that domain.
”
在gerrit.config里,[sendemail]下添加 “ from = xxx” 后,重启gerrit即可
本文解决在Gerrit中配置SMTP后,发送邮件时遇到的MailError问题,包括SMTP认证失败和邮件发送权限不足的情况,并提供了解决方案。
2万+

被折叠的 条评论
为什么被折叠?



