gitlab无法发送邮件

发布于 2022-09-06 15:52:34 字数 4336 浏览 13 评论 0

我在centos7上安装了gitlab 却无法发送邮件。

 gitlab_rails['gitlab_email_enabled'] = true
 gitlab_rails['gitlab_email_from'] = '939950559@email.xn--eqrt2go2a13sj93e.top'
 user['git_user_email'] = "939950559@email.xn--eqrt2go2a13sj93e.top"
 gitlab_rails['smtp_openssl_verify_mode'] = 'none'

 gitlab_rails['smtp_enable'] = true
 gitlab_rails['smtp_address'] = "smtp.exmail.qq.com"
 gitlab_rails['smtp_port'] = 465
 gitlab_rails['smtp_user_name'] = "939950559@email.xn--eqrt2go2a13sj93e.top"
 gitlab_rails['smtp_password'] = "bMtWut4jW252imQ"
 gitlab_rails['smtp_domain'] = "email.xn--eqrt2go2a13sj93e.top"
 gitlab_rails['smtp_authentication'] = "login"
 gitlab_rails['smtp_enable_starttls_auto'] = true
 gitlab_rails['smtp_tls'] = ture    

postfix 我也删了

然后用控制台就是这个错误
Notify#test_email: processed outbound mail in 280.6ms

Sent mail to 939950559@qq.com (60045.9ms)
Date: Tue, 27 Feb 2018 11:20:40 +0800
From: Example <939950559@email.xn--eqrt2go2a13sj93e.top>
Reply-To: Example <noreply@gitlab.example.com>
To: 939950559@qq.com
Message-ID: <5a94ce88ec57e_1f7a3ffb905db10c973bf@izwz963kajb8wuzwbphs6fz.mail>
Subject: 1
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><p>123</p></body></html>

Net::ReadTimeout: Net::ReadTimeout

    from /opt/gitlab/embedded/lib/ruby/2.3.0/net/protocol.rb:176:in `rbuf_fill'
    from /opt/gitlab/embedded/lib/ruby/2.3.0/net/protocol.rb:154:in `readuntil'
    from /opt/gitlab/embedded/lib/ruby/2.3.0/net/protocol.rb:164:in `readline'
    from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:955:in `recv_response'
    from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:556:in `block in do_start'
    from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:965:in `critical'
    from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:556:in `do_start'
    from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:521:in `start'
    from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/mail-2.7.0/lib/mail/network/delivery_methods/smtp.rb:109:in `start_smtp_session'
    from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/mail-2.7.0/lib/mail/network/delivery_methods/smtp.rb:100:in `deliver!'
    from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/mail-2.7.0/lib/mail/message.rb:2160:in `do_delivery'
    from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/mail-2.7.0/lib/mail/message.rb:260:in `block in deliver'
    from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionmailer-4.2.10/lib/action_mailer/base.rb:543:in `block in deliver_mail'
    from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:164:in `block in instrument'
    from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
    from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:164:in `instrument'
    from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionmailer-4.2.10/lib/action_mailer/base.rb:541:in `deliver_mail'
    from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/mail-2.7.0/lib/mail/message.rb:260:in `deliver'
    from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionmailer-4.2.10/lib/action_mailer/message_delivery.rb:85:in `deliver_now'
    from (irb):1
    from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands/console.rb:110:in `start'
    from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands/console.rb:9:in `start'
    from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:68:in `console'
    from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/railties-4.2.10/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:9:in `require'
    from bin/rails:9:in `<main>'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

变身佩奇 2022-09-13 15:52:34

解决了 解决方式参见这个博客 http://www.fayfox.com/post/39...

燕归巢 2022-09-13 15:52:34

我的用控制台发送成功,但是在网站发送收不到短信

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文