4
回答
求救 gitlab收不到注册邮件
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

配置了gitlab,能用下面这条命令发送邮件成功,但是在注册页面,新用户注册没有邮件,而且/var/log/maillog 没有日志输出。

irb(main):003:0> Notify.test_email('destination_email@address.com', 'Message Subject', 'Message Body').deliver_now

/etc/gitlab/gitlab.rb 的配置

gitlab_rails['smtp_enable'] = true
 gitlab_rails['smtp_address'] = "smtp.exmail.qq.com"
 gitlab_rails['smtp_port'] = 465
 gitlab_rails['smtp_user_name'] = "xxx@xx.com"
 gitlab_rails['smtp_password'] = "!qazXS2"
 gitlab_rails['smtp_authentication'] = "login"
 gitlab_rails['smtp_enable_starttls_auto'] = true
 gitlab_rails['smtp_tls'] = true
 gitlab_rails['gitlab_email_from'] = 'xxx@xxx.com'
 

举报
vfish
发帖于3个月前 4回/174阅

1.检查QQ是否开启了SMTP

2.检查服务器网络是否能连到SMTP地址

 

--- 共有 1 条评论 ---
vfish网络都没问题,可以telnet通smtp端口和网络 3个月前 回复

关闭smtp_tls 使用25端口试试看,还有看看你邮箱有没有启用安全,如果启用安全密码应该是要到邮箱上去生成一大串的哪个密码

--- 共有 1 条评论 ---
vfish还是收不到, 这个是 tail 的日志 ==> /var/log/gitlab/gitlab-rails/production.log <== Started POST "/users/confirmation" for 192.168.2.191 at 2017-09-04 06:40:34 -0400 Processing by ConfirmationsController#create 3个月前 回复

==> /var/log/gitlab/gitlab-rails/production.log <==
Started POST "/users/confirmation" for 192.168.2.191 at 2017-09-04 06:40:34 -0400
Processing by ConfirmationsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"nld88fqbk8GLTHxcgWi0nE+Nm/fv3AkfHVOqUBF+FpzbOtrN8zW3qrGXTGtZ97hT47/r8bJxPD8hBIz5bodMyA==", "user"=>{"email"=>"117001301@qq.com"}}
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 7e74b54f-a7ed-4f0b-b0f0-f9f124f37b4f) to Sidekiq(mailers) with arguments: "DeviseMailer", "confirmation_instructions", "deliver_now", gid://gitlab/User/1, "LJZ3yvXXuRhAczDQ75jH", {:to=>"117001301@qq.com"}
 

顶部