emailsmtpgerritmail-sender

Gerrit how to change notification sending email? (virtual host)


Can I change the email address that gerrit uses to send notifications? And how?

I have consulted the documentation but I can only find how to change the name of the sender, not the sending adress...


My configuration and why this is a problem:

My gerrit service is located on an Ubuntu server called "devserver" and redirected by name-based virtual hosting in apache2 to the address "gerrit.mydomain.com". The issue I have is that the emails are sent from "root@devserver". Because of this, Outlook sends all the notifications to junk, and we can't unblock the sender because the adresse is invalid (most likely because it doesnt end with @domain.something).

I'm guessing "root" can be replaced by "gerrit" once I replace the account running gerrit which was "root" for test purposes, but how can I replace "devserver" by gerrit.mydomain.com? Is this a gerrit issue, an smtp issue, or something else entirely?


Solution

  • Set the following in the GERRIT-SITE/etc/gerrit.config file:

    [user]
        name = Gerrit
        email = gerrit@YOUR-DOMAIN
    
    [sendemail]
        from = SERVER
    

    More info in the Gerrit documentation here1 and here2.