kmail: Storage of messages in subfolders

Sandro Knauß sknauss at kde.org
Sun Jan 1 17:22:38 GMT 2017


Hey,

Well Volker is right, that the folder should exist, but unfortunately, there 
are circumstances, why the folder do not exist.

So I outline the problem, that happens:
When the first mail is copied/moved to the folder, akonadi tries to create the 
folder and place the mail inside. 
After the initial creation all mails will placed to this folder. Everything is 
fine.

But when the creation of the folder fails, Akonadi never tries again to create 
that folder. But Akonadi don't stop the user from adding more mails to that 
folder nor informs the user about that problem. But because the mails are 
never written to disk, Akonadi now is storing data and is not only a cache for 
that folder. So what is missing is the code path, that retries to create the 
folder and place all mails. But there are unfortunatelly also some more 
cornercases, that makes it hard to fix that problem properly. Just one problem: 
If we create that folder Akonadi thinks instantly, oh the folder is empty, 
Akonadi is only cache, so the user has deleted all mails in that folder, so 
I'll cleanup the cache. And than all mails are gone in that folder. On the 
otherside there may be hickups in the filesystem, that stops Akonadi to write 
files to disk. Or there may be other processes placing mails to these 
folders...

So far as workaround:
* create a new folder, test if this exists on the filesystem
* move the mails to that folder, should trigger akonadi to place the mails to 
disk.
* recreate old folder
* move mails back.

Best regards,

sandro

PS: IMO thinks that discussion, should take place in the users mailinglist: 
kdepim-users at kde.org



--
Am Sonntag, 1. Januar 2017, 08:24:40 CET schrieb Volker Wysk:
> On Sunday, 1 January 2017 07:55:01 CET Rüdiger Härtel wrote:
> > On the file system there is no .mailing-lists.directory folder.
> > 
> > I repeated your step with the subfolder in drafts. Kmail does not create
> > the .drafts.directory folder on the filesystem. Then I copied an email
> > into the bla-folder (within kmail) just to see if the directory on the
> > filesystem is created only when needed. But still there is no
> > .drafts.direcotry folder in the filesystem.
> 
> That's odd.  Try this:
> 
> Settings -> Configure KMail -> Accounts -> Local Folders -> Modify.
> 
> This displays the path where your "local folders" are stored.
> 
> > For what I know akonadi stores metadata not the real data. However from
> > what I see now I conclude this is not the case. So, is this an akonadi
> > issue then?
> 
> No, it shouldn't, since it works as expected on my machine.
> 
> PS: You need to delete your new "bla" folder in the file system, in order to
> get rid of it again. That's a KMail bug.
> 
> Bye,
> Volker





More information about the kde-pim mailing list