Issue Description
Stalwart can not assign correct threadId to outgoing mails and breaks the chain although the headers correctly align.
Expected Behavior
Stalwart should connect messages in-reply-to each other with the correct threadId so that the responses go into the correct thread.
Actual Behavior
Although the Message-ID and the response’s In-Reply-To labels match identically; Stalwart creates a new thread for the responses I make.
Reproduction Steps
- Have a mail from outside ([email protected]) sent to your Inbox on Stalwart ([email protected]) (This is thread 1)
- Reply to this mail (from [email protected]). Your response will create a new thread although it should not. (Now we have thread 2)
- Then respond again to the mail received in [email protected]. This response will correctly append to thread 2, which is created on step 2.
- Then respond from [email protected] again; now we have thread 3, a new thread created again although it should not have been.
Stalwart Version
v0.16.x
Installation Method
Binary (Linux)
Database Backend
PostgreSQL
Blob Storage
PostgreSQL
Search Engine
PostgreSQL
Directory Backend
Internal
Additional Context
Example threadId “baa”:
The first message is received:
Message-ID: VI1PR01MB7117F571D7BB27FD41B3945CBEBB2@VI1PR01MB7117.eurprd01.prod.exchangelabs.com
Then I reply to this message and a new threadId is assigned as “bbp”. Here is my response:
Message-ID: [email protected]
In-Reply-To: VI1PR01MB7117F571D7BB27FD41B3945CBEBB2@VI1PR01MB7117.eurprd01.prod.exchangelabs.com
References: VI1PR01MB7117F571D7BB27FD41B3945CBEBB2@VI1PR01MB7117.eurprd01.prod.exchangelabs.com
As you see, In-Reply-To matches identically to the first received message which created “baa” thread. Now why wouldn’t Stalwart append the message to “baa” thread and create a new one (bbp) instead?
Then the peer responds to my reply and this time their response is correctly appended to the thread bbp:
Message-ID: PR3PR01MB7115F3965C11A5ECAE88FCB5BEBA2@PR3PR01MB7115.eurprd01.prod.exchangelabs.com
In-Reply-To: [email protected]
References: VI1PR01MB7117F571D7BB27FD41B3945CBEBB2@VI1PR01MB7117.eurprd01.prod.exchangelabs.com, [email protected]
And when I reply to this new response; my mail creates yet another thread although the headers match again:
Message-ID: [email protected]
In-Reply-To: PR3PR01MB7115F3965C11A5ECAE88FCB5BEBA2@PR3PR01MB7115.eurprd01.prod.exchangelabs.com
References: VI1PR01MB7117F571D7BB27FD41B3945CBEBB2@VI1PR01MB7117.eurprd01.prod.exchangelabs.com, [email protected], PR3PR01MB7115F3965C11A5ECAE88FCB5BEBA2@PR3PR01MB7115.eurprd01.prod.exchangelabs.com
Now we have thread “bpf”, yet another one created with this response.
(Note: I redacted only the domain name to be example.com)
As you see, reference chain is correctly adding up. And as you see, all Message-IDs are identical to the In-Reply-To ids. Yet Stalwart creates a new thread in every response and doesn’t append it to the thread which Stalwart already has all information of.
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on