Gitlab will not send emails - omnibus Gitlab CentOS 6.5

just install the new Gitlab installation using the omnibus installer on the newly created CentOS 6.5 virtual machine. I am a bit of Linux noob, but I tried to configure the installation of Gitlab and can access the installation through the host.

What does not work is sending email to newly created users. I tried setting up SMTP in /etc/gitlab/gitlab.rb using the instructions https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#sending-application-email-via-smtp .

I set the rights to the gitlab.rb file to 600. It is worth noting that our SMTP server does not require authentication on the internal network, and the Omnibus documentation does not provide an example for this type of setup. For this reason, I skipped some lines that are usually passed to the gitlab.rb file for SMTP (which may be incorrect). The entire contents of my gitlab.rb file has been edited as follows:

 gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "smtp.mycompany.com" gitlab_rails['smtp_port'] = 25 gitlab_rails['smtp_domain'] = "mycompany.com" gitlab_rails['smtp_authentication'] = false gitlab_rails['smtp_enable_starttls_auto'] = false 

And my output from gitlab-ctl show-config

  "gitlab-rails": { "smtp_enable": true, "smtp_address": "smtp.mycompany.com", "smtp_port": 25, "smtp_user_name": " gitlab@mycompany.com ", "smtp_domain": "mycompany.com", "smtp_authentication": false, "smtp_enable_starttls_auto": false, 

When I create a new user, the user never receives an email. Does anyone have any recommendations on where to start to fix this problem? There are some things in Stack, but none of them match my installation (CentOS and the omnibus installation of Gitlab).

Also, if I run the SMTP relay command line test that I refer to, I receive an email right away, so I know this is not a problem.

Thanks!

+6
source share
2 answers

In the latest omnibus version (7.6.1), I managed to get this working with the following settings

 gitlab_rails['gitlab_email_from'] = ' john.smith@mycompany.com ' #Important for our SMTP server gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "mail.mycompany.com" gitlab_rails['smtp_port'] = 25 #gitlab_rails['smtp_user_name'] = "" Commented out! #gitlab_rails['smtp_password'] = "" Commented out! gitlab_rails['smtp_domain'] = "mycompany.com" gitlab_rails['smtp_authentication'] = false gitlab_rails['smtp_enable_starttls_auto'] = false gitlab_rails['smtp_tls'] = false gitlab_rails['smtp_openssl_verify_mode'] = false 
+8
source

Unfortunately this will not work. I tried all kinds of combinations and Googled for ages until I found the answer at https://gitlab.com/gitlab-org/omnibus-gitlab/issues/155 where they stated that it was broken and will be fixed in version 7.

Omnibus already comes with Postfix, so if you delete these lines in gitlab.r , run gitlab-ctl reconfigure and gitlab-ctl status to ensure that processes start subsequent emails for new users should be sent fined. If they have not been submitted yet, learn the basics, such as IP and DNS settings, and then go on to troubleshooting Postfix.

+3
source

Source: https://habr.com/ru/post/970762/


All Articles