Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am setting up a Gitlab server and am finishing the installation.

While everything with Gitlab runs fine, the verification of email addresses fails. I am getting the following error:

Date: Wed, 08 Jan 2014 15:41:50 +0100
From: Mail Delivery System <Mailer-Daemon@git.example.com>
To: git@git.example.com
Subject: Mail failure - no recipient addresses

A message that you sent using the -t command line option contained no
addresses that were not also on the command line, and were therefore
suppressed. This left no recipient addresses, and so no delivery could
be attempted.

------ This is a copy of your message, including all the headers. ------

Date: Wed, 08 Jan 2014 15:41:50 +0100
From: git@git.example.com
Reply-To: git@git.example.com
To: username@myemail.com
Message-ID: <52cd63ae85c0d_1802235567aa687b9@example.hostname.mail>
Subject: Confirmation instructions
Mime-Version: 1.0
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

<p>Welcome shade!</p>

  <p>You can confirm your email (username@myemail.com) through the link below:</p>

<p><a href="https://git.example.com/users/confirmation?confirmation_token=XXXXXXXXXXXXX">Confirm my account</a></p>

Is this a bug in Gitlab, or have I messed up the Exim configuration?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

As you can see in description of exim command line options, if command line option -t is used then recipients are taken from standard input of exim command (from headers of email) and then recipients taken from command line are subtracted from this list. Looks like you have same recipients in command line and in email headers.

You can remove it from command line, if configuration of Gitlab permit this, or you can use no_extract_addresses_remove_arguments options in Exim configuration, so Exim try to add recipients from command line and not subtracts them (duplicates will be handled correctly, so you should get what you want).

share|improve this answer
    
It seems that I had used this answer for a workaround back in January. Setting as selected answer (sorry for the delay). –  Shade Sep 11 at 15:41

According to this issue, it´s a bug either in upstream Ruby or Exim4.

A patch is available:

# diff -u /opt/gitlab/embedded/service/gitlab-rails/config/application.rb.org /opt/gitlab/embedded/service/gitlab-rails/config/application.rb
--- /opt/gitlab/embedded/service/gitlab-rails/config/application.rb.org 2014-09-11 16:21:11.641493626 +0200
+++ /opt/gitlab/embedded/service/gitlab-rails/config/application.rb     2014-09-11 16:21:51.959381839 +0200
@@ -7,6 +7,9 @@

 module Gitlab
   class Application < Rails::Application
+    #Fix for compatibility issue with exim as explained at https://github.com/gitlabhq/gitlabhq/issues/4866
+    config.action_mailer.sendmail_settings = { :arguments => "-i" }
+
     # Settings in config/environments/* take precedence over those specified here.
     # Application configuration should go into files in config/initializers
     # -- all .rb files in that directory are automatically loaded.

Restart Gitlab afterwards:

gitlab-ctl restart
share|improve this answer
    
Nice, thanks. I did find a workaround, so it works now, but I can no longer remember what the workaround was... Will try to check and get back to this answer. –  Shade Sep 11 at 15:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.