Message threading - requesting some wisdom
![](https://secure.gravatar.com/avatar/b009b2809a98fc29d87d2ef8a9609005.jpg?s=120&d=mm&r=g)
Hi folks
I assume a great deal of thought has gone into message threading and how it works. Is there anyone willing to share the basics with me - specifically as it relates to Mailman and related projects?
There is of course plenty of information on google which I am researching including the seminal http://www.jwz.org/doc/threading.html but if there is anyone on the Mailman team willing to give me a Mailman oriented understanding that would be great. It appears to me there are a number of ways to implement threading, and how it is done is somewhat arbitrary. For example, this description of Gmail threading http://xkahn.zoned.net/software/evolution/threads/ seems to suggest that Gmail includes arbitrary business rules for threading based on message content (i.e. subject prefix).
In particular I want to know the basics of message threading - i.e.
** What data defines how emails are connected to one another? ** How is that connecting data organised (i.e. in a tree, a flat list, by date, whatever)? ** What happens when thread data is missing (i.e. a message in a thread is deleted)? ** Are there any algorithms/mechanisms/patterns that are effective for implementing threading? ** Any code in Mailman/Hyperkitty/elsewhere that is particularly good to study? ** Anything else I should know?
I’m wanting to find the most simple and effective way to deal with threading which of course has the potential to be complex if I get it wrong.
thanks!
as
![](https://secure.gravatar.com/avatar/334b870d5b26878a79b2dc4cfcc500bc.jpg?s=120&d=mm&r=g)
Andrew Stuart writes:
I assume a great deal of thought has gone into message threading and how it works. Is there anyone willing to share the basics with me - specifically as it relates to Mailman and related projects?
Currently Mailman and Postorius don't care at all. HyperKitty has its own threading mechanism, and this is a core function of an MUA or archive (which is sort of a read-only MUA). AFAICS, Jamie's threading.html is all you really need to know about this. There's also the IMAP THREAD extension, an alternative specification of Jamie's algorithm: https://tools.ietf.org/html/rfc5256.
a Mailman oriented understanding
I don't understand what you mean by this. Mailman's current distribution and administration functions don't care about threads at all, and (as I alluded to above) HyperKitty is just a read-only MUA for this purpose.
Dynamic sublists (as implemented by the Systers fork) and some proposals for anonymous lists using threading information, but Systers does it by creating a separate channel (which may have subthreads defined by links) while the anonymous list use case is as yet undesigned.
example, this description of Gmail threading http://xkahn.zoned.net/software/evolution/threads/ seems to suggest that Gmail includes arbitrary business rules for threading based on message content (i.e. subject prefix).
Jamie's algorithm also uses the subject field when links are unavailable.
** What data defines how emails are connected to one another?
The In-Reply-To and References header fields are references to earlier messages in the thread. Most MUAs also create pseudo-threads by sorting on Subject and Date when those fields are unavailable.
** How is that connecting data organised (i.e. in a tree, a flat list, by date, whatever)?
Organized where? Conceptually it's a tree.
** What happens when thread data is missing (i.e. a message in a thread is deleted)?
Implementation detail.
** Are there any algorithms/mechanisms/patterns that are effective for implementing threading?
The two documents referenced above.
** Any code in Mailman/Hyperkitty/elsewhere that is particularly good to study?
HyperKitty must do threading, but what algorithm it uses I don't know. I find that mailing lists are generally not very demanding of the threading algorithm, most work fine.
participants (2)
-
Andrew Stuart
-
Stephen J. Turnbull