gitlab管理员邮箱配置

源码安装gitlab后,管理员邮箱设置

1.修改vi gitlab/config/gitlab.yml

email_from: [email protected]

下面提供了163.QQ企业邮箱和smtp的配置。

2. vi /home/git/gitlab/config/initializers/smtp_settings.rb
163:
if Rails.env.production?
  Gitlab::Application.config.action_mailer.delivery_method = :smtp
  ActionMailer::Base.smtp_settings = {
    address: "smtp.163.com",
    port: 25,
    user_name: "wpgitlab",
    password: "123456",
    domain: "163.com",
    authentication: :plain,
    enable_starttls_auto: true
  }
end



QQ企业邮箱:

if Rails.env.production?
  Gitlab::Application.config.action_mailer.delivery_method = :smtp
  ActionMailer::Base.smtp_settings = {
    address: "smtp.exmail.qq.com",
    port: 25,
    user_name: "[email protected]",
    password: "123456",
    domain: "smtp.qq.com",
    authentication: :plain,
    enable_starttls_auto: true,
  }
end



公司自建smtp:

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

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



你可能感兴趣的:(linux)