Bug 402803

Summary: Bulk importing mail into sent-mail folder makes most sent messages unreadable
Product: [Applications] kmail2 Reporter: Blase Johnson <bjohnson655>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Blase Johnson 2019-01-02 22:11:50 UTC
SUMMARY

I was trying to bulk import about 500 messages into the "sent-mail" folder. For all but about the earliest one-fifth of messages in this folder, having a message selected produces an empty HTML message preview, double clicking the message makes a message transfer dialog box appear (which hangs), and an error message is displayed at the bottom of the window (but is cut-off):

Unable to fetch item from backend (collection -1): Unable to retrieve item from resource: [LRCONFLICT] Resource akonadi_maildir_resource_0 tries to modify item <some number> () (in collection 15) with dirty payload, ab...

If I attempt to drag any of these messages into another folder, the following error message is displayed in a dialog box:

Unable to retrieve item from resource: [LRCONFLICT] Resource akonadi_maildir_resource_0 tries to modify item <some number> () (in collection 15) with dirty payload, aborting STORE.

I have both tried to import these messages using the Thunderbird/Mozilla import filter and from an MBOX file. In either case the results are the same.

STEPS TO REPRODUCE
1. Import a large number of messages into the "sent-mail" folder.
2. Attempt to preview/open all messages.
3. Some messages cannot be opened and produce the above error messages.

OBSERVED RESULT

Some messages in the "sent-mail" folder cannot be viewed, opened, or moved, and error messages are displayed in attempts to do so.

EXPECTED RESULT

All messages in the "sent-mail" folder can be viewed, opened, or moved without errors.

SOFTWARE/OS VERSIONS

Operating System: Arch Linux 
KDE Plasma Version: 5.14.4
Qt Version: 5.12.0
KDE Frameworks Version: 5.53.0
Kernel Version: 4.20.0-arch1-1-ARCH