鍍金池/ 問(wèn)答/Linux/ gitlab設(shè)置阿里企業(yè)郵箱smtp服務(wù)器時(shí),測(cè)試時(shí)報(bào)錯(cuò),改了N也不行

gitlab設(shè)置阿里企業(yè)郵箱smtp服務(wù)器時(shí),測(cè)試時(shí)報(bào)錯(cuò),改了N也不行

Gitlab 設(shè)置 阿里企業(yè) 測(cè)試發(fā)送時(shí)報(bào)錯(cuò)

配置

gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.mxhichina.com"
gitlab_rails['smtp_port'] = 25//465也試過(guò)
gitlab_rails['smtp_user_name'] = "gitlab@gwoole.com"
gitlab_rails['smtp_password'] = "xxxxxx"
gitlab_rails['smtp_domain'] = "smtp.mxhichina.com"
gitlab_rails['smtp_authentication'] = "login"http://"plain"都試過(guò)
gitlab_rails['smtp_enable_starttls_auto'] = true

結(jié)果

[root@izuf690jwvj8z9113kwd4oz ~]# gitlab-rails console
Loading production environment (Rails 4.2.10)
irb(main):001:0> Notify.test_email('chenzhi@meishubao.com', 'Message Subject', 'Message Body').deliver_now

Notify#test_email: processed outbound mail in 302.9ms

Sent mail to chenzhi@meishubao.com (30013.7ms)
Date: Mon, 29 Jan 2018 19:59:04 +0800
From: GitLab <gitlab@gitlab.gwoole.com>
Reply-To: GitLab <noreply@gitlab.gwoole.com>
To: chenzhi@meishubao.com
Message-ID: <5a6f0c88819b9_68673f9e7ebdb10c52761@izuf690jwvj8z9113kwd4oz.mail>
Subject: Message Subject
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>Message Body</p></body></html>

Net::OpenTimeout: execution expired
    from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:542:in `initialize'
    from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:542:in `open'
    from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:542:in `tcp_socket'
    from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:552:in `block in do_start'
    from /opt/gitlab/embedded/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
    from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:551: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>'
irb(main):002:0>
回答
編輯回答
心沉

解決了@_@

2017年3月29日 14:24
編輯回答
紓惘

請(qǐng)問(wèn)一下怎么解決的

2017年5月31日 11:05