5

I've just installed git git-1.8.1.2 and gitlab gitlab_6.7.2-omnibus-1.ubuntu.12.04_amd64.deb on fresh install of Ubuntu 12.04 lts following: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#ubuntu-12-04 and: https://www.gitlab.com/2014/03/12/packaged-gitlab-with-omnibus/

When setting up a new user in gitlab, it attempts to send out an email with temporary passwords but postfix gets an error from the relay host: Bad sender address syntax (in reply to MAIL FROM command)

My /etc/gitlab/config/environments/production.rb looks like this

config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true

config.action_mailer.smtp_settings = {
      :address              => 'mail.domain.com',
      :port                 => 587,
      :domain               => 'domain.com',
      :user_name            => 'username@domain.com',
      :password             => 'password',
      :authentication       => 'password',
      :enable_starttls_auto => true
}

I can send email via command line with postfix using I think the same relay host. echo “This will go into the body of the mail.” | sendmail “Hello world” myemail@domain.com

What might be going wrong and where should I look?

kbrown
  • 51
  • 1
  • 1
  • 3
  • Take a look at http://stackoverflow.com/questions/10690255/gitlab-email-setup. Also if you're able to send email via sendmail, you may want to use sendmail instead of smtp. – Steven V Apr 04 '14 at 15:04
  • I finally had success by setting up to use gmail according to: Turns out the outgoing smtp I was attempting to use didn't like the fact I was sending from an ip address with no associated domain name, and bounced with a bad address syntax error. – kbrown Apr 07 '14 at 14:52

1 Answers1

1

I have also had the same problem on AWS using SES. After wasting 2 days debugging, reading docs and forums, I tried to loose the Security Group inbound rules, which were restricted only to the ports 22, 80 and 443.

Firstly I opened all inbound traffic for debug purposes. As soon as I open all ports to the world (0.0.0.0/0), the issue was gone. But this cannot stay so, then I closed all inbound ports, except 22 (SSH), 90 (HTTP), 443 (HTTPS) and additionally 25 (SMTP) to the IP of the SMTP-Server and it is still working.

So, to sum up, the SES needs to be able to communicate with the server using the SMTP port. That's why the port must be open for inbound traffic as well.

Елин Й.
  • 953
  • 10
  • 25