如何配置SMTP邮件设置?

本镜像建议使用第三方的SMTP镜像邮件发送,具体步骤如下:

  1. 以QQ邮箱为例,将如下参考拷贝到GitLab配置文件,需要注意的是密码中不能包含单引号,否则出错

    gitlab_rails['smtp_enable'] = true
    gitlab_rails['smtp_address'] = "smtp.exmail.qq.com"
    gitlab_rails['smtp_port'] = 465
    gitlab_rails['smtp_user_name'] = "xxxx@xx.com"
    gitlab_rails['smtp_password'] = "password"
    gitlab_rails['smtp_authentication'] = "login"
    gitlab_rails['smtp_enable_starttls_auto'] = true
    gitlab_rails['smtp_tls'] = true
    gitlab_rails['gitlab_email_from'] = 'xxxx@xx.com'
  2. 重启配置文件服务

    [root@iZbp1i4rjdsy216yq7lgucZ ~]# sudo gitlab-ctl reconfigure

Last updated