Project

General

Profile

Actions

Defect #1401

closed

Related e-mail notifications aren't threaded

Added by Colan Schwartz almost 16 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Email notifications
Target version:
Start date:
2008-06-06
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

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

Has duplicate Redmine - Feature #603: Don't include new status for issues in email subjectClosed2008-02-04

Actions
Actions #1

Updated by Paul Rivier almost 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.

Actions #2

Updated by Jean-Philippe Lang almost 16 years ago

I think we should use something like a hash instead of raw project identifiers.

Actions #3

Updated by Jean-Philippe Lang almost 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 ?

Actions #4

Updated by Paul Rivier almost 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.

Actions #5

Updated by Jean-Philippe Lang almost 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.

Actions #6

Updated by Paul Rivier almost 16 years ago

Fixed length and [0-9a-f] only

Ok. This adress the fobidden chars by the way.

Actions #7

Updated by James Turnbull over 15 years ago

+1

Actions #8

Updated by Andreas Huggel over 15 years ago

+1

Actions #9

Updated by Jean-Philippe Lang about 15 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.

Actions #10

Updated by Gaurav Pandey over 9 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.

Actions #11

Updated by Jean-Baptiste Barth over 9 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.

Actions #12

Updated by Toshi MARUYAMA over 9 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.

Actions #13

Updated by Toshi MARUYAMA over 9 years ago

Jean-Baptiste Barth wrote:

Do you have a documentation about that ?

See #17096#note-13.

Actions #14

Updated by Jean-Baptiste Barth over 9 years ago

Thanks Toshi, I let you take care of that then :)

Actions

Also available in: Atom PDF