gitlab7配置smtp邮箱

以163为例
先注册个邮箱,开启smtp服务,需要验证手机号。
修改配置文件

$ sudo vi /etc/gitlab/gitlab.rb
gitlab_rails['gitlab_email_from'] = '[email protected]'
gitlab_rails['smtp_enable'] = truegitlab_rails['smtp_address'] = "smtp.163.com"gitlab_rails['smtp_port'] = 25gitlab_rails['smtp_user_name'] = "[email protected]"gitlab_rails['smtp_password'] = "123456"gitlab_rails['smtp_domain'] = "163.com"gitlab_rails['smtp_authentication'] = "login"gitlab_rails['smtp_enable_starttls_auto'] = true
user['git_user_email'] = "[email protected]"
$ sudo gitlab-ctl reconfigure #更新配置文件
发送邮件[测试](http://lib.csdn.net/base/softwaretest)下
如果不成功用下面命令看错误信息
$sudo gitlab-ctl tail

新增exchange 企业邮箱

[email protected]为例
先注册个邮箱,开启smtp服务,需要验证手机号。
修改配置文件

$ sudo vi /etc/gitlab/gitlab.rb
gitlab_rails['gitlab_email_from'] = '[email protected]'
gitlab_rails['smtp_enable'] = truegitlab_rails['smtp_address'] = "smtp.example.com"gitlab_rails['smtp_port'] = 25gitlab_rails['smtp_user_name'] = "xxxxxxxx" //此处之前添邮箱就发生 authentication unsuccessful 后来换成了登陆名即不用加@的部分(区分大小写)就可以发送了但是,发现发件箱里,并没有发件记录不知道什么原因,有知道的告诉我下gitlab_rails['smtp_password'] = "123456"gitlab_rails['smtp_domain'] = "example.com"gitlab_rails['smtp_authentication'] = "login"gitlab_rails['smtp_enable_starttls_auto'] = true
user['git_user_email'] = "[email protected]"
$ sudo gitlab-ctl reconfigure #更新配置文件
发送邮件测试下
如果不成功用下面命令看错误信息
$sudo gitlab-ctl tail

你可能感兴趣的:(gitlab7配置smtp邮箱)