Email setup with new install not yet working

I have a VM installed locally running Ubuntu Server 14.04.1 and I used the CE Omnibus package to install GitLab 7.7.2.

I am having trouble getting email working, I think I am almost there but I am fairly new to most of this setup.

I do not have postfix installed, I instead installed ssmtp to work with my existing hosting site’s mail server.
I can successfully run ssmtp myemail@outlook.com, I copied across the settings into /etc/gitlab/gitlab.rc following this page https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/smtp.md

ssmtp.conf
    # Config file for sSMTP sendmail
    # The person who gets all mail for userids < 1000
    # Make this empty to disable rewriting.
    root=MYUSER@MYDOMAIN.COM
    
    # The place where the mail goes. The actual machine name is required no 
    # MX records are consulted. Commonly mailhosts are named mail.domain.com
    mailhub=HOSTINGDOMAIN.COM:465
    
    # Use SSL/TLS before starting negotiation
    UseTLS=Yes
    #UseSTARTTLS=Yes
    
    
    # Where will the mail seem to come from?
    rewriteDomain=MYDOMAIN.COM
    
    # The full hostname
    hostname=ubuntu
    
    # Are users allowed to set their own From: address?
    # YES - Allow the user to specify their own From: address
    # NO - Use the system generated From: address
    FromLineOverride=YES
    
    AuthUser=MYUSER@MYDOMAIN.COM
    AuthPass=PASS

gitlab.rb

    ## Url on which GitLab will be reachable.
    external_url 'http://ubuntu:88'
    
    gitlab_rails['gitlab_email_from'] = MYUSER@DOMAIN.COM'
    
    ################################
    # GitLab email server settings #
    ################################
    # Use smtp instead of sendmail/postfix.
    gitlab_rails['smtp_enable'] = true
    gitlab_rails['smtp_address'] = "HOSTINGDOMAIN.COM"
    gitlab_rails['smtp_port'] = 456
    gitlab_rails['smtp_user_name'] = "MYUSER@MYDOMAIN.COM"
    gitlab_rails['smtp_password'] = "PASS"
    gitlab_rails['smtp_domain'] = "ubuntu"
    gitlab_rails['smtp_authentication'] = "login"
    gitlab_rails['smtp_enable_starttls_auto'] = false
    gitlab_rails['smtp_tls'] = true
    gitlab_rails['smtp_openssl_verify_mode'] = false

In /var/log/gitlab/gitlab-rails/production.log I am seeing a send mail being repeated but I cannot find any error messages across the log files.
Is there a step missing to associate GitLab with using ssmtp or a log file that could point in the right direction?

Thanks.

Hi logictom,

Have you been able to resolve the issue related to sending mails from gitlab?

We have gitlab CE omnibus set up on out local Ubuntu 12.04 server. We are trying to configure the smtp settings in gitlab.rb as shown below. The users created are not receiving an email notification about their accounts being created.

Really appreciate your help.
Below are the details:

gitlab.rb

--Use smtp instead of sendmail/postfix.
gitlab_rails['smtp_enable'] = true
--organization smtp server IP address
gitlab_rails['smtp_address'] = "xxx.xxx.xxx.xxx" 
--organization smpt server port
gitlab_rails['smtp_port'] = "xx"
gitlab_rails['smtp_user_name'] = "username"
gitlab_rails['smtp_password'] = "password"
gitlab_rails['smtp_domain'] = "domain.org.net"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] =true
gitlab_rails['smtp_openssl_verify_mode'] = 'none' http://api.rubyonrails.org/classes/ActionMailer/Base.html
--gitlab_rails['smtp_ca_path'] = "/etc/ssl/certs"
--gitlab_rails['smtp_ca_file'] = "/etc/ssl/certs/ca-certificates.crt"

Here are the logs

==> /var/log/gitlab/sidekiq/current <==
2015-04-08_09:46:21.80989 2015-04-08T09:46:21.809Z 5973 TID-at5ns Sidekiq::Extensions::DelayedMailer JID-0936bce39d65265b02b5eb00 INFO: fail: 5.42 sec
2015-04-08_09:46:21.81124 2015-04-08T09:46:21.811Z 5973 TID-at5ns WARN: {"retry"=>true, "queue"=>"default", "class"=>"Sidekiq::Extensions::DelayedMailer", "args"=>["---\n- !ruby/class 'Notify'\n- :new_user_email\n- - 17\n  - MXdzb5CmHKXjzuseuMAy\n"], "jid"=>"0936bce39d65265b02b5eb00", "enqueued_at"=>1428486358.2126946, "error_message"=>"504 5.7.4 Unrecognized authentication type\n", "error_class"=>"Net::SMTPSyntaxError", "failed_at"=>1428486381.8091736, "retry_count"=>0}
2015-04-08_09:46:21.81129 2015-04-08T09:46:21.811Z 5973 TID-at5ns WARN: 504 5.7.4 Unrecognized authentication type
2015-04-08_09:46:21.81130
2015-04-08_09:46:21.81148 2015-04-08T09:46:21.811Z 5973 TID-at5ns WARN: /opt/gitlab/embedded/lib/ruby/2.1.0/net/smtp.rb:975:in `check_auth_continue'
2015-04-08_09:46:21.81151 /opt/gitlab/embedded/lib/ruby/2.1.0/net/smtp.rb:747:in `block in auth_login'
2015-04-08_09:46:21.81153 /opt/gitlab/embedded/lib/ruby/2.1.0/net/smtp.rb:948:in `critical'
2015-04-08_09:46:21.81153 /opt/gitlab/embedded/lib/ruby/2.1.0/net/smtp.rb:746:in `auth_login'
2015-04-08_09:46:21.81154 /opt/gitlab/embedded/lib/ruby/2.1.0/net/smtp.rb:732:in `authenticate'
2015-04-08_09:46:21.81155 /opt/gitlab/embedded/lib/ruby/2.1.0/net/smtp.rb:567:in `do_start'
2015-04-08_09:46:21.81156 /opt/gitlab/embedded/lib/ruby/2.1.0/net/smtp.rb:520:in `start'
2015-04-08_09:46:21.81157 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/mail-2.6.3/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
2015-04-08_09:46:21.81158 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/mail-2.6.3/lib/mail/message.rb:2141:in `do_delivery'
2015-04-08_09:46:21.81158 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/mail-2.6.3/lib/mail/message.rb:236:in `block in deliver'
2015-04-08_09:46:21.81159 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/actionmailer-4.1.9/lib/action_mailer/base.rb:527:in `block in deliver_mail'
2015-04-08_09:46:21.81160 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.1.9/lib/active_support/notifications.rb:159:in `block in instrument'
2015-04-08_09:46:21.81163 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.1.9/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2015-04-08_09:46:21.81164 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/activesupport-4.1.9/lib/active_support/notifications.rb:159:in `instrument'
2015-04-08_09:46:21.81164 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/actionmailer-4.1.9/lib/action_mailer/base.rb:525:in `deliver_mail'
2015-04-08_09:46:21.81165 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/mail-2.6.3/lib/mail/message.rb:236:in `deliver'
2015-04-08_09:46:21.81166 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/extensions/action_mailer.rb:32:in `deliver'
2015-04-08_09:46:21.81167 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/extensions/action_mailer.rb:20:in `perform'
2015-04-08_09:46:21.81168 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/processor.rb:75:in `execute_job'
2015-04-08_09:46:21.81169 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/processor.rb:52:in `block (2 levels) in process'
2015-04-08_09:46:21.81172 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/middleware/chain.rb:127:in `call'
2015-04-08_09:46:21.81173 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/middleware/chain.rb:127:in `block in invoke'
2015-04-08_09:46:21.81174 /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/sidekiq_middleware/memory_killer.rb:16:in `call'
2015-04-08_09:46:21.81175 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
2015-04-08_09:46:21.81179 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/middleware/server/active_record.rb:6:in `call'
2015-04-08_09:46:21.81180 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
2015-04-08_09:46:21.81180 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/middleware/server/retry_jobs.rb:74:in `call'
2015-04-08_09:46:21.81181 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
2015-04-08_09:46:21.81182 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'
2015-04-08_09:46:21.81185 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/logging.rb:22:in `with_context'
2015-04-08_09:46:21.81185 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/middleware/server/logging.rb:7:in `call'
2015-04-08_09:46:21.81186 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
2015-04-08_09:46:21.81187 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/middleware/chain.rb:132:in `call'
2015-04-08_09:46:21.81188 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/middleware/chain.rb:132:in `invoke'
2015-04-08_09:46:21.81188 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/processor.rb:51:in `block in process'
2015-04-08_09:46:21.81189 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/processor.rb:98:in `stats'
2015-04-08_09:46:21.81190 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/sidekiq-3.3.0/lib/sidekiq/processor.rb:50:in `process'
2015-04-08_09:46:21.81190 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `public_send'
2015-04-08_09:46:21.81193 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `dispatch'
2015-04-08_09:46:21.81194 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:122:in `dispatch'
2015-04-08_09:46:21.81194 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in `block in invoke'
2015-04-08_09:46:21.81195 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:in `block in task'
2015-04-08_09:46:21.81196 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in `block in task'
2015-04-08_09:46:21.81197 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:in `block in initialize'
2015-04-08_09:46:21.81197 /opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks/task_fiber.rb:15:in `block in create'
^C/opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.0.7/lib/omnibus-ctl.rb:292:in `system': Interrupt
        from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.0.7/lib/omnibus-ctl.rb:292:in `tail'
        from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.0.7/lib/omnibus-ctl.rb:366:in `run'
        from /opt/gitlab/embedded/lib/ruby/gems/2.1.0/gems/omnibus-ctl-0.0.7/bin/omnibus-ctl:27:in `<top (required)>'

Hi Shweta,
Unfortunately not, I was trying to use our external email host but gave up in the end and switched to using mandrillapp.com instead as our email count will be well within their free service. I think there was a mismatch with the security settings without existing host that I just couldn’t get working no matter what settings I used.

Hope you have more luck.

Can you try and change

gitlab_rails['smtp_authentication'] = "login"

to

gitlab_rails['smtp_authentication'] = "plain"

?