Project

General

Profile

Actions

Defect #10955

closed

Mail not sending in 2.0.0

Added by Daniel Munn almost 12 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Email notifications
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Evening,

After testing the installation of Redmine on server it became apparent from the mail queues that redmine seems to be failing to generate emails with a valid To: portion resulting in a number of rejections - this can be seen when using the sendmail configuration.

From dev logs (configuratioin was setup on default to ensure same configuration accross the board):
Started GET "/admin/test_email" for 2.221.67.137 at 2012-05-17 22:16:38 +0100
Processing by AdminController#test_email as HTML
[[1m[[36m (0.3ms)^[[0m [[1mSELECT MAX AS max_id FROM `settings` ^[[0m
^[[1m
[[35mUser Load (0.2ms)^[[0m SELECT `users`.* FROM `users` WHERE `users`.`type` IN ('User', 'AnonymousUser') AND `users`.`id` = 1 AND (users.status = 1) LIMIT 1
Rendered mailer/test_email.text.erb within layouts/mailer (0.4ms)
Rendered mailer/test_email.html.erb within layouts/mailer (0.3ms)

Sent mail to (577ms)
Date: Thu, 17 May 2012 22:16:39 +0100
From: Munnster project tracking <issues@#censored#>
Message-ID: <4fb56ab73077d_1b0fb9751d486150@#censored#>
Subject: Redmine test
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_4fb56ab71c047_1b0fb9751d485841";
charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Mailer: Redmine
X-Redmine-Host: #censored#
X-Redmine-Site: #censored#
X-Auto-Response-Suppress: OOF
Auto-Submitted: auto-generated
List-Id: #censored#

The same is seen when it distributes based on issue updates etc.

The running environment:
Environment:
Redmine version 2.0.0.stable
Ruby version 1.9.3 (x86_64-linux)
Rails version 3.2.3
Environment production
Database adapter Mysql2
Redmine plugins:
redmine_mylyn_connector 2.7.7.stable

Actions #1

Updated by Daniel Munn almost 12 years ago

After some further investigation, its happening with both BCC and standard mailing configuration when using sendmail - Works fine on SMTP.

Actions #2

Updated by Jeremy Cowgar almost 12 years ago

My 2.0.2 installation is not sending email. Looking at the production log I see:

Sent mail to (20328ms)

Email was working fine before I upgraded from 1.1.2. I did migrate my old/config/email.yml to new/config/configuration.yml.

The user that is doing the sending (redmine) also gets messages back from postfix stating that the message could not be delivered because it contains no recipients.

Actions #3

Updated by Björn Peemöller almost 12 years ago

I have the same issue, and already posted in on the board at

http://www.redmine.org/boards/2/topics/30982

Unfortunately, I have no clue how to further investigate this issue (help appreciated!).

Actions #4

Updated by Jeremy Cowgar almost 12 years ago

I got mine working. I did two things:

First, Uncheck the BCC option from Administration > Settings > Email notifications

Second change my config/configuration.yml to read

production:
  email_delivery:
    delivery_method: :async_sendmail
    async_sendmail_settings:
      arguments: -i

First, the :sendmail delivery method caused a 30 second delay. sendmail at the command line works instantly, so not sure what is going on there.
Second, the default arguments to sendmail was -i -t. When -t was in the arguments, my redmine email account (who mails come from) would get messages stating there was no difference between the email addresses supplied on the command line vs. what were found in the email, thus no valid recipients existed and the email simply would not be delivered.

So, with those changes to my configuration, things work now. Unsure of why good old :sendmail w/no config changes worked in 1.1.2, but the above works for me in 2.0.2.

Actions #5

Updated by Björn Peemöller almost 12 years ago

Today I had a look at the sendmail log and found out the following:

  • I used a non-existing e-mail address for sending e-mails, which is why they were filtered out by our mail system.
  • Nevertheless, this worked with Redmine 1.4.1.

For Redmine 2.0.0, the log says:

postfix/pickup[11871]: 7F76E8542: uid=... from=<non-existent-address@domain>
postfix/cleanup[15230]: 7F76E8542: message-id=<...>
postfix/qmgr[1451]: 7F76E8542: from=<non-existent-address@domain>, size=959, nrcpt=1 (queue active)
postfix/smtp[15232]: 7F76E8542: to=<my-address>, relay=<my-relay>, delay=1.5, delays=0.16/0/0.02/1.3, dsn=2.0.0, status=sent (250 2.0.0 q5F9g85r024863 Message accepted for delivery)
postfix/qmgr[1451]: 7F76E8542: removed

but the mail gets filtered out. If I change the sender's address to a valid one, it works.

In contrast, with Redmine 1.4.1 the log says:

postfix/pickup[11871]: F31DD8542: uid=... from=<my-user-name>
postfix/cleanup[15230]: F31DD8542: message-id=<...>
postfix/qmgr[1451]: F31DD8542: from=<my-address>, size=918, nrcpt=1 (queue active)
postfix/smtp[15232]: F31DD8542: to=<my-address>, relay=<my-relay>, delay=1.4, delays=0.18/0/0.02/1.2, dsn=2.0.0, status=sent (250 2.0.0 q5F9hPPA024924 Message accepted for delivery)
postfix/qmgr[1451]: F31DD8542: removed

I don't know why Redmine 1.4.1 does not use the sender's address here, but at least I got 2.0.0 working again!

Actions #6

Updated by Karel Pičman over 11 years ago

production:
  email_delivery:
    delivery_method: :async_sendmail
    async_sendmail_settings:
      arguments: -i

Works fine even with checked BCC option from Administration > Settings > Email notifications.
Thank you very much. I spent a few hours solving this problem with no result. It works fine now.

Actions #7

Updated by Karel Pičman about 11 years ago

It works fine except the rake task redmine:send_reminders that generates empty emails. The final solution was to use sendmail with -i option:

production:
  email_delivery:
    delivery_method: :sendmail
    sendmail_settings:
      arguments: -i
Actions #8

Updated by Marius BĂLTEANU over 2 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid
Actions

Also available in: Atom PDF