鍍金池/ 問答/HTML5  Linux/ gitlab無法發(fā)送郵件

gitlab無法發(fā)送郵件

我在centos7上安裝了gitlab 卻無法發(fā)送郵件。

 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>'

回答
編輯回答
挽青絲

解決了 解決方式參見這個博客 http://www.fayfox.com/post/39...

2017年12月18日 03:07