Defect #1401
closedRelated e-mail notifications aren't threaded
0%
Description
Related notifications, those belonging to the same issue for example, don't show up as e-mail messages in the same thread. They each belong to separate threads. Notifications should be setting the necessary message headers.
Related issues
Updated by Paul Rivier over 16 years ago
- Assignee set to Paul Rivier
Indeed. Email headers should contain two fields, Message-ID, and References.
Message-ID must be unique, therefore I propose (capital words are variables) :
redmine.PROJECT-NAME.issue-NUMBER.reply-REPLY-NUMBER@HOSTNAME
Any email notification can include multiple references to other notifications, for exemple, for 2nd reply to issue 49 for current redmine project :
Message-ID: <redmine.redmine.issue-49.reply-2@redmine.org> References: <redmine.redmine.issue-49.reply-1@redmine.org> <redmine.redmine.issue-49.reply-0@redmine.org>
That will give, in the MUA, a very deep unary thread. This might seem a bit inconvenient, but it is the only way I see to ensure working threading for anyone subscribing in the middle of the discussion.
I can not unfortunatly put this on top of my todo list, so I put it fairly deep, but if someone want to volunteer, patches are welcome.
Updated by Jean-Philippe Lang over 16 years ago
I think we should use something like a hash instead of raw project identifiers.
Updated by Jean-Philippe Lang over 16 years ago
Something like this:
# Generates a message id for the given object def message_id_for(obj) s = "redmine.%s.%s.%08d.%s" % [obj.project.identifier, obj.class.name, obj.id, obj.created_on.to_s] hash = Digest::MD5.hexdigest(s) host = Setting.mail_from.to_s.gsub(%r{^.*@}, '') "<#{hash}@#{host}>" end
What do you think ?
Updated by Paul Rivier over 16 years ago
I have no particular position on using readable string or hash. Why do you think a hash is better suited ?
Also, if using a hash, you should ensure to strip-out any character in [<>@], as specified in the internet text messages RFC.
Also, for objects having multiple revisions (edited message content, edited wiki page), message-id must be uniquified for each revision. It might be needed at some point in the future.
Updated by Jean-Philippe Lang over 16 years ago
Why do you think a hash is better suited ?
Fixed length and [0-9a-f] only
Also, for objects having multiple revisions (edited message content, edited wiki page), message-id must be uniquified for each revision. It might be needed at some point in the future.
Good point.
Updated by Paul Rivier over 16 years ago
Fixed length and [0-9a-f] only
Ok. This adress the fobidden chars by the way.
Updated by Jean-Philippe Lang almost 16 years ago
- Category set to Email notifications
- Status changed from New to Closed
- Target version set to 0.9.0
- Resolution set to Fixed
Headers added in r2281 for issues and messages.
Updated by Gaurav Pandey about 10 years ago
Related messages are still not getting threaded in Microsoft Outlook 2010 and 2013. Microsoft Outlook 2010 and 2013 thread emails based on thread-topic and thread-index email headers and these headers are missing in Redmine emails.
Updated by Jean-Baptiste Barth about 10 years ago
Gaurav Pandey wrote:
Related messages are still not getting threaded in Microsoft Outlook 2010 and 2013. Microsoft Outlook 2010 and 2013 thread emails based on thread-topic and thread-index email headers and these headers are missing in Redmine emails.
Do you have a documentation about that ? I can dig into that issue if I have a solid spec or documentation about what to add in Redmine headers. Also, I'd prefer a new issue for that, please make a new one and assign it to me directly. This issue is pretty old and already "solved" for most use cases.
Updated by Toshi MARUYAMA about 10 years ago
Gaurav Pandey wrote:
Related messages are still not getting threaded in Microsoft Outlook 2010 and 2013. Microsoft Outlook 2010 and 2013 thread emails based on thread-topic and thread-index email headers and these headers are missing in Redmine emails.
It is #17096.
Updated by Toshi MARUYAMA about 10 years ago
Updated by Jean-Baptiste Barth about 10 years ago
Thanks Toshi, I let you take care of that then :)