How does Gitlab configure email notification notifications through smtp?

Source: Internet
Author: User

1. First switch to the gitlab installation directory and find the smtp configuration file:

[Root @ 21 yunwei gitlab] # vim/etc/gitlab. rb
Note: basically all gitlab configuration files are modified, such as the web entry address, port, and smtp.
################################
# GitLab email server settings #
################################
# See https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/smtp.md#smtp-settings
# Use smtp instead of sendmail/postfix.
 
Gitlab_rails ['smtp _ enable'] = true
Gitlab_rails ['smtp _ address'] = "mail.21yunwei.com"
Gitlab_rails ['smtp _ port'] = 25
Gitlab_rails ['smtp _ user_name '] = "gitlab"
Gitlab_rails ['smtp _ password'] = "xxxxxx"
Gitlab_rails ['smtp _ domain '] = "21yunwei.com"
Gitlab_rails ['smtp _ authentication '] = "login"
Gitlab_rails ['smtp _ enable_starttls_auto'] = true
Gitlab_rails ['smtp _ tls '] = false
Gitlab_rails ['smtp _ openssl_verify_mode '] = 'none' # Can be: 'none', 'peer', 'Client _ once ', 'fail _ if_no_peer_cert', see http://api.rubyonrails.org/classes/ActionMailer/Base.html
Gitlab_rails ['smtp _ ca_path '] = "/etc/ssl/certs"
Gitlab_rails ['smtp _ ca_file '] = "/etc/ssl/certs/ca-certificates.crt"
After modification, you can use gitlab-ctl reconfigure after the configuration takes effect.
Restart gitlab: gitlab-ctl restart
Note: Some friends forget to configure the environment variables, and the command does not take effect. Modify/etc/profile to add the bin path of gitlab-ctl and the source/etc/profile takes effect.
Now add or modify the user, you can see the gitlab@21yunwei.com sent the mail

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.