[kmail2] [Bug 344242] Mails that are copied do not appear on my harddrive

Knut Hildebrandt knut.hildebrandt at gmx.de
Sun Mar 15 08:39:38 GMT 2015


https://bugs.kde.org/show_bug.cgi?id=344242

Knut Hildebrandt <knut.hildebrandt at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |knut.hildebrandt at gmx.de

--- Comment #1 from Knut Hildebrandt <knut.hildebrandt at gmx.de> ---
I can confirm this bug and would call it severe, since it can cause the loss of
mails.

@piedro Your mails are probably in ~/.local/share/akonadi/file_db_data

Further reading about what is happening there you'll find in these bug reports
and forum posts:
https://bugs.kde.org/show_bug.cgi?id=333514
https://forum.kde.org/viewtopic.php?f=215&t=122797

My case is similar and to a certain extend worse. 

Since Kmail2 and Akonadi are not very reliable I keep besides my local archive
on the hard disk backup copies of all archived mails on my mail server for a
while. These copies as well as my inbox, sent mails folder etc. I access by
IMAP. All these mails do not appear in the directory tree under
~/.local/share/.local-mail.directory/ but are stored in above mentioned
directory and the Akonadi database as much as I understood.

When I archive mails I copy them from my inbox or send folder (IMAP) to the
backup folder (IMAP) and then I move them from the inbox or send folder (IMAP)
to a subfolder of my local archive which is stored under
~/.local/share/.local-mail.directory/. But not all of the moved mails
physically appear in the archive folders. Even though I could access them in
kmail they were not stored in the respective directories under
~/.local/share/.local-mail.directory/.

But it got worse when my home directory ran out of space. After a short
investigation into the matter I found out that
~/.local/share/akonadi/file_db_data had reached almost 3 GB and held more than
15.000 files, most of them emails which were up to two years old. Besides there
was a huge file_lost+found directory holding almost 3.000 files. After reading 
above mentioned posts I found it save to delete the latter. I also deleted 
~/.local/share/akonadi/file_db_data after making a backup copy. This did not
seem to have any of the negative effects described in the forum post. I could
access all my mails in the IMAP folders and no body was missing.

But when I searched for locally archived mails I saw, that some of the mail
bodies were empty. That was not true for the copies of these mails in the IMAP
backup folder. Digging a bit deeper into the matter I found out, that there
were no files for the empty mails in the subdirectories of
~/.local/share/.local-mail.directory/. They obviously had not been moved or
copied there when I moved the mails from the IMAP folder to the local archive. 

After playing back the 3GB file_db_data directory - and all other akonadi files
backed-up with it - I got back again the contents of all these mails. Big
drawback of this "solution": my home directory was running out of space again
and I had lost all notes attached to mails after the backup. I eventually found
a better solution. Since only my locally stored mails were affected and not the
contents of the IMAP folders and I had not stored anything locally after
deleting the file_db_data directory I just used the kmail archive function to
archive the local "archive folder" as a tar.bz. Then I went back to the before
saved current state of Akonadi, deleted the corrupted archive and imported the
tar.bz file. This brought back my complete archive folder with all missing mail
bodies. The afore missing mail files were, as expected, stored in the
subfolders of ~/.local/share/.local-mail.directory/ too. Only drop of
bitterness, a few thousand mails were marked "unread" now.

After rescanning my local mail archive - which temporally let grow file_db_data
up to 10.000 files again - I could not reproduce this behaviour anymore.
Everything seems to work as expected now. 

Right now I'm running KDE and Kontact 4.14.5 as well as Akonadi 1.13.0 under
Chakra Linux. My system always is kept up-to-date. The last update of KDE-Pim
and Akonadii was on March 4th 2015, a day before I deleted
~/.local/share/akonadi/file_db_data.

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Kdepim-bugs mailing list