腾讯企业邮箱配置如下,其他邮箱同样适用。
找到配置
1 2 3 4 5 6 7 8 9
| gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "smtp.exmail.qq.com" gitlab_rails['smtp_port'] = 465 gitlab_rails['smtp_user_name'] = "[email protected]" gitlab_rails['smtp_password'] = "xxxxxxxxxxxxxxxxxx" gitlab_rails['smtp_domain'] = "wudinaonao.com" gitlab_rails['smtp_authentication'] = "login" gitlab_rails['smtp_enable_starttls_auto'] = true gitlab_rails['smtp_tls'] = true
|
在找到配置
1 2 3 4
| # gitlab 发件邮箱 gitlab_rails['gitlab_email_from'] = '[email protected]' # 默认标题 gitlab_rails['gitlab_email_display_name'] = 'Gitlab'
|
重载gitlab配置
登录到你搭建的Gitlab发一封重置密码的邮件试试
成功
阿里云企业邮箱配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "smtp.yourself.com" gitlab_rails['smtp_port'] = 465 gitlab_rails['smtp_user_name'] = "yourself user name" gitlab_rails['smtp_password'] = "yourself password" gitlab_rails['smtp_domain'] = "yourself hostname" gitlab_rails['smtp_authentication'] = "login" gitlab_rails['smtp_enable_starttls_auto'] = false gitlab_rails['smtp_tls'] = true
###! **Can be: 'none', 'peer', 'client_once', 'fail_if_no_peer_cert'** ###! Docs: http://api.rubyonrails.org/classes/ActionMailer/Base.html gitlab_rails['smtp_openssl_verify_mode'] = 'none'
|
更多邮箱配置参见官方
https://docs.gitlab.com/omnibus/settings/smtp.html
参考链接
https://docs.gitlab.com/omnibus/settings/smtp.html
https://gitlab.com/gitlab-org/gitlab-foss/-/issues/446