Please Help Me with Mail Server configuration

Hello,

I am Using Gitlab CE
GitLab 10.6.4
GitLab Shell 6.0.4
GitLab Workhorse v4.0.0
GitLab API v4
Ruby 2.3.6p384
Rails 4.2.10
postgresql 9.6.8

I would enable email notification. I am sure of the Exchange server Mail configuration (already on some other on-premise platform services.

I try many configuration in gitlab.rb.

Each time, i change the configuration, ten i run sudo gitlab-ctl reconfigure, and when finished, i test.

When i try the mail with the commande "Notify.test_email(‘myemail@mydomain.com’, ‘Message Subject’, ‘Message Body’).deliver_now

i get answer :
Message-ID: 5b6d952d3ad3f_44e3fe6c22db0e86197b@VM-SalomonIsland.mail
Subject: Message Subject
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8Content-Transfer-Encoding: 7bit
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All

Message Body

Net::SMTPSyntaxError: 504 5.7.4 Unrecognized authentication type

    from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:992:in `check_auth_continue'
    from /opt/gitlab/embedded/lib/ruby/2.3.0/net/smtp.rb:748:in `block in auth_login'
    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:747:in `auth_login'
    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/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):2
    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>'

My config :

gitlab_rails[‘smtp_enable’] = true
gitlab_rails[‘smtp_address’] = “mail.mydomain.com
gitlab_rails[‘smtp_port’] = “25”
gitlab_rails[‘smtp_user_name’] = “emailofserviceuser@mydomain.com
gitlab_rails[‘smtp_password’] = “mypassword”
gitlab_rails[‘smtp_domain’] = “mydomain.com
gitlab_rails[‘smtp_authentication’] = “login” #login pour login, plain pour sans authentification
gitlab_rails[‘smtp_enable_starttls_auto’] = true

Please help me

Finally,

I configured ;
gitlab_rails[‘smtp_enable’] = true
gitlab_rails[‘smtp_address’] = “mail.mydomain.com
gitlab_rails[‘smtp_port’] = “25”
gitlab_rails[‘smtp_domain’] = “mail.mydomain.com
gitlab_rails[‘smtp_authentication’] = false
gitlab_rails[‘smtp_enable_starttls_auto’] = true

1 Like