When using threading strategy "Perfect and by references", moved messages are threaded randomly in the tree under the thread starter. In the same folder, the direct parent (from In-Reply-To) is also present, but the message not threaded under it.
The resulting folder structure is a complete mess. Restarting kmail and/or akonadi doesn't help.
Changing to threading startegy "Perfect only" shows the correct tree, but obviously creates separate trees when a message is missing. Switching back to "Perfect and by references" seems to fix the threading.
I have not noticed any problems with threading of new incoming emails, only when moving messages between folders. The messages are moved within the same account, which uses online imap as its backend.
The message list aggregation is set to "Threaded" with the following config:
Group expand policy: -
Threading: perfect and by references
Thread leader: Topmost message
Thread expand policy: Expand threads with unread or important messages
Fill view strategy: Favor interactivity
It is not just threading that breaks. Kmail messes up the whole relation between headers and bodies of emails. In other words, message 1 gets the headers from message 2 and so on. This leads to wrong threading, but also to replying to the wrong message or even deleting them, making this a data-loss bug.
1. Select multiple messages in a folder (preferably with different subject, thus from different threads, as it will show the bug more easily).
2. Move those messages to another folder
3. Notice that in the target folder, headers and bodies of the moved emails don't match with each other.
This can be fixed (until the next move) by clearing the cache for the target folder in akonadiconsole.
Is there anything I can do/provide to get some movement on this bug?