プロジェクト

全般

プロフィール

Vote #76263

完了

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

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Email receiving_29
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
29
version_id:
94
issue_org_id:
19558
author_id:
58904
assigned_to_id:
1
comments:
13
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
92
ステータス-->[Closed]

説明

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.


journals

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I don't know about Exchange, should #19322 be reverted?
--------------------------------------------------------------------------------
... 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.
--------------------------------------------------------------------------------
I think #19322 is correct because Redmine version:3.0.1 ignores only "oof" and "all".
source:tags/3.0.1/app/models/mail_handler.rb#L76
<pre><code class="ruby">
@@ignored_emails_headers = {
'X-Auto-Response-Suppress' => /(oof|all)/,
'Auto-Submitted' => /\Aauto-(replied|generated)/,
'X-Autoreply' => 'yes'
}
</code></pre>

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

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

--------------------------------------------------------------------------------
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":https://msdn.microsoft.com/en-us/library/ee219609%28v=exchg.80%29.aspx header should not be there in first place.

"Detecting Outlook autoreply/out-of-office emails and X-Auto-Response-Suppress header":https://www.jitbit.com/maxblog/18-detecting-outlook-autoreplyout-of-office-emails-and-x-auto-response-suppress-header/
"Detecting Outlook autoreply/out-of-office emails":http://stackoverflow.com/questions/1027395/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):
<pre>
X-Auto-Response-Suppress: OOF
Auto-Submitted: auto-generated
</pre>
This results in suppressing only out-of-office responses but all the rest (e.g. delivery reports) are coming in.
It should be:
<pre>
X-Auto-Response-Suppress: All
Auto-Submitted: auto-generated
</pre>
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 attachment:mailer.patch should do the work.
--------------------------------------------------------------------------------
New patch doing both, removing the header from _mail_handler_ and changing it in _mailer_.
--------------------------------------------------------------------------------
Guys, thanks for looking into this!
--------------------------------------------------------------------------------
Patch committed in r14159, thanks for digging into this.
--------------------------------------------------------------------------------

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

In mailer.rb :

<pre>
X-Auto-Response-Suppress' => 'OOF' </pre>

Become
<pre>'X-Auto-Response-Suppress' => 'All'</pre>

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

--------------------------------------------------------------------------------


related_issues

relates,Closed,19322,Allow to ignore auto reply messages from Exchange server

Admin Redmine さんが3年以上前に更新

  • カテゴリEmail receiving_29 にセット
  • 対象バージョン3.0.2_94 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0