gitlab8邮件通知配置


更改配置文件/home/git/gitlab/config/initializers下面的

mv smtp_settings.rb.sample smtp_settings.rb

更改如下:

# To enable smtp email delivery for your GitLab instance do the following:
# 1. Rename this file to smtp_settings.rb
# 2. Edit settings inside this file
# 3. Restart GitLab instance
#
# For full list of options and their values see http://api.rubyonrails.org/classes/ActionMailer/Base.html
#
# If you change this file in a Merge Request, please also create a Merge Request on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests

if Rails.env.production?
Gitlab::Application.config.action_mailer.delivery_method = :smtp

ActionMailer::Base.smtp_settings = {
  address: "smtp.126.com",
    port: 25,
    user_name: "apabi",
    password: "123456",
    domain: "126.com",
authentication: :login,
enable_starttls_auto: true,
openssl_verify_mode: 'peer' # See ActionMailer documentation for other possible options
}
end

修改gitlab主配置文件:

/home/git/gitlab

vim config/gitlab.yml

email_from: apabi@126.com
email_display_name: Gitlab
email_reply_to: apabi@126.com

修改后重启服务生效:

service gitlab restart

QQ截图20151125173347QQ截图20151125180534

安装参考:http://www.iyunv.com/thread-140548-1-1.html


Whatever is worth doing is worth doing well.