Patch #33440

Emails not being processed because of

Added by Simon Song about 1 year ago. Updated about 1 month ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Email receiving
Target version:-

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.

History

#1 Updated by Maximilian Eschenbacher about 1 month ago

We are experiencing a similar issue with mail reception in case of multiple redmine instances and agents answering to one instance into another instance.

However for our case, switching the header priority is not enough as we would need to distinguish between several redmine instances.

Also available in: Atom PDF