gerrit安裝中smtp配置

在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.from

Designates 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即可

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章