Project

General

Profile

Actions

Patch #33440

open

Emails not being processed because of

Added by Simon Song almost 4 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Email receiving
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

I have Redmine receive email via SMTP. I noticed about 90% of them go through just fine, that 90% of emails would update their associated tickets no problem.

However, the other 10% would not work. It would be stuck in limbo (in the inbox). I was able to track it down from the

mail_handler.rb > dispatch

The email's header for in_reply_to did not have the correct value to extract the proper object_id.

Here is an example:

References: <>,<>
In-Reply-To: <>

In this example, the 12345 was the correct ticket number, while 67890 does not exist in our Redmine.

I think the header array needs to switch from:

headers = [email.in_reply_to, email.references].flatten.compact

to:

headers = [email.references, email.in_reply_to].flatten.compact

OR

The regex for MESSAGE_ID_RE needs to point to include issue

OR

dispatch has a validation to check if the object_id exists or not. If it does not, it moves on to the next array key.

Actions

Also available in: Atom PDF