Gitlab smtp configuration

Ive configured smtp by following SMTP settings | GitLab.

gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = ""
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "MyUserName"
gitlab_rails['smtp_password'] = "MyPassword"
gitlab_rails['smtp_domain'] = ""
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true

but when I try

 Ruby:         ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-linux]
 GitLab:       15.3.2 (e5a7085d434) FOSS
 GitLab Shell: 14.10.0
 PostgreSQL:   14.5
------------------------------------------------------------[ booted in 61.79s ]
Loading production environment (Rails
irb(main):001:0> Notify.test_email('', 'foo', 'bar').deliver_now
Delivered mail 63e1f7958062a_da913466421465@gitlab.mail (294.4ms)
Traceback (most recent call last):
        1: from (irb):1
Net::SMTPFatalError (554 Message rejected: Email address is not verified. The following identities failed the check in region myzone: GitLab <>,

My gitlab domain is β€˜.com’ and my smtp domain is β€˜.in’

this same config on other apps works fine.


Try setting:

gitlab_rails['gitlab_email_from'] = ''

if not using this field, it defaults to as you see which is the name of your Gitlab server. If your mail server is not configured to process emails for it fails like you saw.

1 Like

Thankyou! It worked!

1 Like