The mail account and password works in our JIRA and Confluence, but it just cannot work in my environment. I've check online and tried about 1 week, but still cannot find the solution. May I know what's wrong?
Thanks.
The /etc/gitlab/gitlab.rb:
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_port'] = 25
gitlab_rails['smtp_password'] = 'password'
# gitlab_rails['smtp_authentication'] = 'login' or 'plain'
gitlab_rails['smtp_authentication'] = 'plain'
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = false
gitlab_rails['smtp_openssl_verify_mode'] = 'none'
/opt/gitlab/embedded/service/gitlab-rails/config/environments/production.rb:
# config.action_mailer.delivery_method = :sendmail
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.eager_load = true
config.allow_concurrency = false
The test command shows:
Notify#test_email: processed outbound mail in 1.3ms
Date: Tue, 07 Mar 2017 23:24:36 +0800
Message-ID: <58bed0b46c4d4_1dc...@Gitlab.mail>
Subject: Message Subject
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<html><body><p>Message Body</p></body></html>
Net::SMTPAuthenticationError: 503 5.5.1 Error: authentication not enabled
from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:977:in `check_auth_response'
from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:741:in `auth_plain'
from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:733:in `authenticate'
from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:568:in `do_start'
from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:521:in `start'
from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/mail-2.6.4/lib/mail/network/delivery_methods/smtp.rb:113:in `deliver!'
from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/mail-2.6.4/lib/mail/message.rb:2149:in `do_delivery'
from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/mail-2.6.4/lib/mail/message.rb:237:in `block in deliver'
from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/actionmailer-4.2.7.1/lib/action_mailer/base.rb:543:in `block in deliver_mail'
from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:164:in `block in instrument'
from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:164:in `instrument'
from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/actionmailer-4.2.7.1/lib/action_mailer/base.rb:541:in `deliver_mail'
from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/mail-2.6.4/lib/mail/message.rb:237:in `deliver'
from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/actionmailer-4.2.7.1/lib/action_mailer/message_delivery.rb:85:in `deliver_now'
from (irb):2
from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/console.rb:110:in `start'
from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/console.rb:9:in `start'
from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:68:in `console'
from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/railties-4.2.7.1/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:9:in `require'
from bin/rails:9:in `<main>'
irb(main):003:0> exit