I configured GitLab on Google Cloud Platform to send mail. This is the configuration
root@mojlab:/home/d# cat /etc/gitlab/gitlab.rb
...
nginx['listen_addresses'] = ["0.0.0.0", "[::]"]
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.sendgrid.net"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "du"
gitlab_rails['smtp_password'] = "fakePas$"
gitlab_rails['smtp_domain'] = "smtp.sendgrid.net"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = false
root@mojlab:/home/d#
Mail messages I get are from a GitLab
address name and the GitLab
sender name.
I am trying to change the sender name. I change a file /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
in the line 42 from
email_display_name:
to
email_display_name: NewName
but after a command gitlab-ctl reconfigure
the change disappears. The value turns back to blank.
How to change the sender name?
If you do have a gitlab.rb
, it would be best to try and set that parameter in gitlab.rb
, not in gitlab.yml
.
See this diff for example.
gitlab_rails['gitlab_email_display_name'] = 'Example'
Then try the gitlab-ctl reconfigure
again, which will take into account gitlab.rb
value.