SMTP for gitlab

Hi i want use smtp MIAB for mail setting on gitlab self hosted I have MIAB installed on other server,which setup need.thank you

GitLab has a configuration option you will need to manually edit (Not in web interface)

And then reconfigure the gitlab package:

Instructions:

hi thank you for reply i know about this just i want ask about the setting gitlab_rails[‘smtp_address’] = "smtp.server"
gitlab_rails[‘smtp_port’] = ?
gitlab_rails[‘smtp_user_name’] = "smtp user"
gitlab_rails[‘smtp_password’] = "smtp password"
gitlab_rails[‘smtp_domain’] = "example.com"
gitlab_rails[‘smtp_authentication’] = "login"
gitlab_rails[‘smtp_enable_starttls_auto’] = true
what i make there i try with my user and password but not working .

for username, use username@domain.com

smtp_address should match your username, or be an assigned alias to that username.

Port should be 587

1 Like

i will do like you said ,thank you for help

Hi,

I can’t get this to work… I get an authentication error in Gitlab. Here are the settings that I have:

General settings

gitlab_rails['gitlab_email_enabled'] = true;
gitlab_rails['gitlab_email_from'] = 'noreply@mydomain.com';
gitlab_rails['gitlab_email_display_name'] = 'Hello';
gitlab_rails['gitlab_email_reply_to'] = 'noreply@mydomain.com';

SMTP Settings

gitlab_rails['smtp_enable'] = true;
gitlab_rails['smtp_address'] = 'box.mydomain.com';
gitlab_rails['smtp_port'] = 587;
gitlab_rails['smtp_user_name'] = 'noreply@mydomain.com';
gitlab_rails['smtp_password'] = *****;
gitlab_rails['smtp_domain'] = 'mydomain.com';
gitlab_rails['smtp_authentication'] = 'login';
gitlab_rails['smtp_enable_starttls_auto'] = true;
gitlab_rails['smtp_openssl_verify_mode'] = 'peer';

What’s wrong with these settings? (there is a working noreply@mydomain.com account)

Any help really appreciated.

Thanks,

Did you find a way to solve it? I’m getting the same error

OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol

You must set the SSL settings to “TLS”:

gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = true

And if you are on a system with outdated CA certs also need:

gitlab_rails['smtp_openssl_verify_mode'] = 'none'

If you get authentication errors(Dont worry, it says plain but it is over TLS):

gitlab_rails['smtp_authentication'] = 'plain';

1 Like