[Kde-pim] KMail dimap cache migration

Kevin Krammer kevin.krammer at gmx.at
Wed May 19 12:14:17 BST 2010


Hi all,

during last week I have been working on an Akonadi resource for KMail's main 
local mail directory.
This is basically a maildir tree with binary index files (though here can be 
MBox files in it as well).

Now, the dimap cache is almost identical, it is also a top level directory 
with nested maildir trees, each maildir directory having an index file.

Part of these index files are the IMAP UIDs of the messages.

I've experiemented a bit and I think I can import the dimap cache on 
migration.

There are two approaches that I think would work:

1) let the IMAP resource sync the collection tree and then, for each 
collection, look up the cache collection. Load the cache collection's items 
and set the remoteId to the UID from the index file.
Use ItemCreateJob with a session object that uses the resource's identifier, 
thus making the adding "invisible" to the resource (it is using the same 
session identifier, its monitor filters on that).

2) let the IMAP resource sync the collection tree but also all items, header-
only.
Let the migrator react to each "itemAdded" with a lookup based on UID and do 
an ItemModifyJob with the FullPayload, again using the "hidden session" trick.

I have basic testing for the first approach. For the second I am not sure how 
Akonadi will treat the full payload if the cache policy is only specifying 
headers.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100519/671f234d/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list