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?
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"
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.