Project

General

Profile

Actions

Defect #19558

closed

Mail handler should not ignore emails with x-auto-response-suppress header

Added by Moritz Schepp over 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Email receiving
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

I can see from the code that certain values within x-auto-response-suppress headers in received mail make redmine ignore the mail. It seems to me that this is not correct since the header is about suppressing (subsequent) auto responses, not about flagging the current mail as auto response. See https://msdn.microsoft.com/en-us/library/ee219609%28v=exchg.80%29.aspx

For example, when adding redmine to an Exchange 2010 distribution list, it will always receive the header for mail sent via that list.


Files

mailer.patch (1.18 KB) mailer.patch trunk @14155 Sebastian Paluch, 2015-04-06 20:07
mailer.patch (2.09 KB) mailer.patch trunk @14155 Sebastian Paluch, 2015-04-06 20:17

Related issues

Related to Redmine - Patch #19322: Allow to ignore auto reply messages from Exchange serverClosedJean-Philippe Lang

Actions
Actions #1

Updated by Toshi MARUYAMA over 9 years ago

  • Related to Patch #19322: Allow to ignore auto reply messages from Exchange server added
Actions #2

Updated by Toshi MARUYAMA over 9 years ago

  • Target version set to 3.0.2
Actions #3

Updated by Toshi MARUYAMA over 9 years ago

I don't know about Exchange, should #19322 be reverted?

Actions #4

Updated by Moritz Schepp over 9 years ago

... well the header x-auto-response-suppress is only used by exchange. As far as I understand the docs, the header doesn't identify auto-reponses. It has been added as an exclusion pattern to the mail_handler for #10607. Afaik, it should'nt have been.

Actions #5

Updated by Toshi MARUYAMA over 9 years ago

  • Status changed from New to Needs feedback
  • Target version deleted (3.0.2)

I think #19322 is correct because Redmine 3.0.1 ignores only "oof" and "all".
source:tags/3.0.1/app/models/mail_handler.rb#L76

  @@ignored_emails_headers = {
    'X-Auto-Response-Suppress' => /(oof|all)/,
    'Auto-Submitted' => /\Aauto-(replied|generated)/,
    'X-Autoreply' => 'yes'
  }

http://serverfault.com/questions/277515/how-does-exchange-2010-prevent-auto-reply-loop

Actions #6

Updated by Moritz Schepp over 9 years ago

... so the header sais: "do not send auto replies to this email", it doesn't say "this email is an auto reply". Exchange seems to add the header to auto replies (that's what the second answer on serverfault sais and it makes sense to prevent loops). That doesn't mean that the header's presence is an indication for an auto reply. For example, Exchange adds the header to all mails sent to distribution list members (makes sense because some recipient might always be on holiday and the sender usually doesn't care). Those would then be filtered by redmine.

Actions #7

Updated by Toshi MARUYAMA over 9 years ago

  • Status changed from Needs feedback to New
  • Target version set to 3.0.2
Actions #8

Updated by Sebastian Paluch over 9 years ago

well.. I dig a bit more on this and it seems that Moritz is right, not only the patch #19322 is wrong but the X-Auto-Response-Suppress header should not be there in first place.

Detecting Outlook autoreply/out-of-office emails and X-Auto-Response-Suppress header
Detecting Outlook autoreply/out-of-office emails

Instead the outgoing emails, send by Redmine, should have the header set correctly.

Currently, the only related headers in outgoing emails that are set are (per Redmine 3.0.0):

X-Auto-Response-Suppress: OOF
Auto-Submitted: auto-generated

This results in suppressing only out-of-office responses but all the rest (e.g. delivery reports) are coming in.
It should be:
X-Auto-Response-Suppress: All
Auto-Submitted: auto-generated

I my case the Redmine's mail box was full of undelivered reports (thousands of emails) that mail_handler was not handling correctly. Reverting #19322 and applying attached mailer.patch should do the work.

Actions #9

Updated by Sebastian Paluch over 9 years ago

New patch doing both, removing the header from mail_handler and changing it in mailer.

Actions #10

Updated by Moritz Schepp over 9 years ago

Guys, thanks for looking into this!

Actions #11

Updated by Jean-Philippe Lang over 9 years ago

  • Subject changed from Mail handler and x-auto-response-suppress to Mail handler should not ignore emails with x-auto-response-suppress header
  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Patch committed in r14159, thanks for digging into this.

Actions #12

Updated by Jean-Philippe Lang over 9 years ago

  • Status changed from Resolved to Closed
Actions #13

Updated by Fred B over 6 years ago

I don't get this patch.. It turn the suppression from Out of Office to All?

In mailer.rb :

X-Auto-Response-Suppress' => 'OOF' 

Become

'X-Auto-Response-Suppress' => 'All'


It should do the opposite. Only suppress OOF and turn the other mails into issues?

P.S. I came to this patche because on Redmine 2.4.3 some of the forwarded email are ignored.

Actions

Also available in: Atom PDF