The method of configuring email reminder for Gitlab in Linux system
This article mainly explains the "Linux system for Gitlab configuration email reminder method", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "Linux system for Gitlab configuration email reminder method" it!
Gitlab email reminders make it easy to track the progress of the project. Here we introduce two ways: one is to send mail using the system's sendmail, and the other is to send mail using GMAIL's stmp.
The first one uses the sendmail of the system to send mail.
The code is as follows:
Cd / home/gitlab/gitlab/
Vi config/environments/production.rb
Put this line
The code is as follows:
# config.action_mailer.delivery_method =: sendmail
Change to
The code is as follows:
Config.action_mailer.delivery_method =: sendmail
Save
The code is as follows:
Config/environments/production.rb
Edit config/gitlab.yml
The code is as follows:
Vi config/gitlab.yml
Modify the configuration accordingly
The code is as follows:
Web:
Host: gitlab123.com
Port: 80
Https: false
Email:
From: notify@gitlab123.com
Protocol: http
Host: gitlab123.com
Git_host:
Host: gitlab123.com
Edit / etc/hosts
Add your ip corresponding to gitlab123.com
The code is as follows:
10.0.0.71 gitlab123.com
The second kind of stmp of GMAIL to send mail.
The code is as follows:
Cd / home/gitlab/gitlab/
Vi config/environments/production.rb
Add under # config.action_mailer.delivery_method =: sendmail
The code is as follows:
Config.action_mailer.delivery_method =: smtp
Config.action_mailer.perform_deliveries = true
Config.action_mailer.raise_delivery_errors = true
Config.action_mailer.smtp_settings = {
: address = > "smtp.gmail.com"
: port = > 587
: domain = > 'gmail.com'
: user_name = > 'account@gmail.com'
: password = > 'password'
: authentication = >: plain
: enable_starttls_auto = > true
}
# configure your mailbox and password
Edit config/gitlab.yml
The code is as follows:
Vi config/gitlab.yml
Modify the configuration accordingly
The code is as follows:
Email:
From: account@gmail.com
Protocol: http
PS:gitlab configures Tencent enterprise mailbox
By default, gitlab cannot send confirmation email when registering with QQ Mail.
Next, let's talk about gitlab configuring Tencent enterprise mailbox.
The code is as follows:
# vim / etc/gitlab/gitlab.rb
Gitlab_rails ['smtp_enable'] = true
Gitlab_rails ['smtp_address'] = "smtp.exmail.qq.com"
Gitlab_rails ['smtp_port'] = 465
Gitlab_rails ['smtp_user_name'] = "support@ttlsa.com"
Gitlab_rails ['smtp_password'] = "www.ttlsa.com"
Gitlab_rails ['smtp_domain'] = "ttlsa.com"
Gitlab_rails ['smtp_authentication'] = "login"
Gitlab_rails ['smtp_enable_starttls_auto'] = true
Gitlab_rails ['smtp_tls'] = true
Gitlab_rails ['gitlab_email_from'] = "support@ttlsa.com"
Reload configuration
The code is as follows:
# gitlab-ctl reconfigure
Thank you for reading, the above is the content of "the method of configuring email reminders for Gitlab under the Linux system". After the study of this article, I believe you have a deeper understanding of the method of configuring email reminders for Gitlab under the Linux system, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!