Email threading broken

My email client no longer groups emails from Discourse in threads. I assume it has to do with the fact that In-Reply-To never matches a previous Message-ID:

First post:

Message-ID: <topic/>
References: <topic/>

1st reply:

Message-ID: <topic/1084/>
In-Reply-To: <topic/>
References: <topic/>

2nd reply

Message-ID: <topic/1084/>
In-Reply-To: <topic/1084/>
References: <topic/>

My instance runs Discourse 2.9.0.beta2 (ea3a58d051)


@martin recently worked on this and fixed issues, can you try updating to latest?


Hi @tomtjes ,

Thanks for reporting. We have received a report that this new threading is not working well with Thunderbird, are you using that as your email client, or something else?

We may consider further refinements to it if it’s causing more people issues.


Hmm, so it does indeed depend on the client. My main client is MailMate, but I now tested a few other ones and there the threading works just fine.


I think it’s not the problem of thunderbird, but of any mail client which supports threading. But I don’t know whether the difference between different informations within in-reply-to and references here may depend on different interpretations.

What I actually see is that you fixed References by now, according to rfc5322:
In-Reply-To: quotes the message-id of the message you reply to.
References: appends the message id of the replied message to the former references

First post

Message-ID: <msg-id1>
…and no References

1st reply

Message-ID: <msg-id2>
In-Reply-To: <msg-id1>
References: <msg-id1>

2nd reply:

Message-ID: <msg-id3>
In-Reply-To: <msg-id2>
References: <msg-id1>  <msg-id2>

However, you broke the message IDs as indicated within

BTW: Is there another bug that marking multiple lines as preformatted text does include the cmd-e marking not once, but many times, for each line one?

1 Like

Thank you for reporting that too – I hope to schedule some work on on this soonish.


Hi all, as member of the openstreetmap I found several problems with disourse, which is used for their online forum now.

I was told that the mailing list interface should work very well. However, I found a but that threading becomes broken when you reply by e-mail. Then a new message ID is generated instead of re-using the original ones

The main concept is ok - it used e.g.

format: thread msg-id in-reply-id
1 topic/851.

the initial thread

1.1 topic/851/2747. topic/851

Message 2747 in thread 851 is a reply to initial topic 851, as indicated by the headers in-reply-to: and references:

1.1.1 ee76eed4-a255-6d1c-0f5b-59da9772f230@gmx topic/851/2747.

That’s an e-mail reply to topic/851/2747 with message id ee76eed4-a255-6d1c-0f5b-59da9772f230@gmx topic/851/2749. ee76eed4-a255-6d1c-0f5b-59da9772f230@gmx

Here the forum reply 2749 threads properly to my message-id ee76eed4-a255-6d1c-0f5b-59da9772f230@gmx 07289952-0e88-c08a-ea66-b34774c8554e@gmx topic/851/2749.

…and so on

However, when I do reply in msg-id ee76eed4-a255-6d1c-0f5b-59da9772f230@gmx to the previous topic, I reference

References:… <topic/851/2747. bae9c8af72f1f7ef599f1bcd @OSM>

But my own message (a HTML forum version) is sent back to me with
References: …
<topic/851/2747. ae42d62b1252f1572b2a9a07 @OSM>

Do you notice the difference within the message id of the references?

The forum’s system does break message ids within references!

This results in broken threads with
1.2 topic/851/2748. topic/851/2747.
1.3 topic/851/2751. topic/851/2749.

where 1.2 is the forum version of 1.1.1 (new message-id topic/851/2748.e6be773dbcc599ad5f35bae5@OSM instead of my original message-id)
and 1.3 is the forum version of

I did not verify yet whether others receive crippled threads - since they would not receive my original reply with message-id of
1.1.1 ee76eed4-a255-6d1c-0f5b-59da9772f230@gmx,
but would also receive the forum version
1.2 with message id topic/851/2748.e6be773dbcc599ad5f35bae5@OSM, while also receiving reply with references to ee76eed4-a255-6d1c-0f5b-59da9772f230@gmx

I have crippled the domain names here since this forum translates those message IDs to mailto links and thus exceeds my limit of permitted links

1 Like

Closing this topic in favour of Discourse email messages are incorrectly threaded - #35 by martin , we are sorting this all out there.

1 Like