I agree with Steve. In general you cannot solve the problem with only the 
information contained in the message headers. You will need to maintain 
parallel meta-data for each message/thread. The header info would provide an 
initialization at the time of insertion. Presumedly this thread tree could be 
edited by an administrator to "correct" broken chains, etc.

On Apr 5, 2012, at 10:10 AM, Stephen J. Turnbull wrote:

> On Thu, Apr 5, 2012 at 10:41 PM, Pierre-Yves Chibon <pin...@pingoured.fr> 
> wrote:
> 
>> In HyperKitty to be able to easily retrieve from the database all the
>> threads of a given month or just all the emails of a thread, I created a
>> Field in the database called ThreadID.
>> When I load the archives from mailman into mongo, I look for the absence
>> of the headers 'References' or 'In-Reply-To' to define an email that
>> starts a new thread.
> 
> This fails when a thread crosses channels.  Eg,
> 
> To: Pierre
> From: Steve
> Message-Id: <x@y.z>
> 
> is followed by
> 
> To: Steve
> From: Pierre
> Cc: SomeList
> References: <x@y.z>
> Message-Id: <a@b.c>


> I haven't thought about it deeply, but I would say just give the
> thread an arbitrary ID in the database.  Message-IDs are supposed to
> universally unique, so what's wrong with keeping the thread in the
> database as a tree of message IDs?  Some Message-IDs will not have
> corresponding messages but that's always a problem with threading (see
> http://www.jwz.org/doc/threading.html, and RFC 5256).
> 
> There are other problems with threading that need to be dealt with as
> well, such as References being inconsistent across messages in the
> same thread and people who continue a thread with a new message, etc.

_______________________________________________
Mailman-Developers mailing list
Mailman-Developers@python.org
http://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Reply via email to