Project

General

Profile

Actions

Defect #19558

closed

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

Defect #19558: Mail handler should not ignore emails with x-auto-response-suppress header

Added by Moritz Schepp over 11 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Email receiving
Target version:
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 1 (0 open — 1 closed)

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

Updated by Toshi MARUYAMA over 11 years ago Actions #1

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

Updated by Toshi MARUYAMA over 11 years ago Actions #2

  • Target version set to 3.0.2

Updated by Toshi MARUYAMA over 11 years ago Actions #3

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

Updated by Moritz Schepp over 11 years ago Actions #4

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

Updated by Toshi MARUYAMA over 11 years ago Actions #5

  • 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

Updated by Moritz Schepp over 11 years ago Actions #6

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

Updated by Toshi MARUYAMA over 11 years ago Actions #7

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

Updated by Sebastian Paluch over 11 years ago Actions #8

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.

Updated by Sebastian Paluch over 11 years ago Actions #9

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

Updated by Moritz Schepp over 11 years ago Actions #10

Guys, thanks for looking into this!

Updated by Jean-Philippe Lang over 11 years ago Actions #11

  • 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.

Updated by Jean-Philippe Lang over 11 years ago Actions #12

  • Status changed from Resolved to Closed

Updated by Fred B over 8 years ago Actions #13

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: PDF Atom