I’ve been archiving old emails using kmail and akonadi lately, in an archive export things went bad, all my email disappeared, and akonadictl fsck put it all in $HOME/.local/share/akonadi/file_lost+found. How can I recover those emails?
I noticed this post while searching for something else …
Basically what you need to do is, import the files in ‘$HOME/.local/share/akonadi/file_lost+found/’ by means of the KMail “File → Import Messages…” tool.
Catch-22 is, that you have to first add either a “.mbox” or a “.eml” suffix to all the ???_r0/1/2/? “lost+found” files – what I do is to move all the “lost+found” files off to a “tmp” directory – perform the rename to add a suffix – and then point the KMail importer to those files.
I also have an additional local e-Mail folder with a sub-folder where I import the e-Mails to be restored – that way I can check that the import executed correctly before, moving the imported e-Mail off to where it should be located.