[kdepim-users] importing maildir

Ingo Klöcker kloecker at kde.org
Tue Apr 7 20:26:53 BST 2015

On Thursday 02 April 2015 21:49:03 Stephan Olbrich wrote:
> Hi,
> I'm trying to migrate my local mails from one kmail to another.
> I exported the mail to an bz2 archive.
> If I try to import the archive I end up with local-folders/inbox/local-
> folders/inbox structure. Moving those folders to back to toplevel where they
> belong (with lots of subfolders and mails) around seems to confuse akonadi
> so much that at some point I can't move some folders anymore. Also a lot of
> mails are marked as unread although they were all marked as read before and
> if I check the maildir directly, all are in the cur folder (in the
> archive).

cur contains messages which are not new. If a message is read then an 'S' 
(seen) is added to the name (resp. after the ":2,") of the file containing 
this message. See http://cr.yp.to/proto/maildir.html for details.

> If I try to just point local-folders to the (extracted) archive, the folders
> are at the correct place, but now all mails are marked as unread! Is this a
> bug or a feature?? And is there a way to mark all mails as read? (There are
> lots of subfolders)

Hmm. It seems the old KMail only stored the "read" information in Akonadi. You 
could try adding the 'S' (or ":2,S") to the filenames of the mail files to 
mark them as read. Do this while neither KMail nor Akonadi is running. (You 
can stop Akonadi with "akonadictl stop".)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdepim-users/attachments/20150407/82b2d449/attachment.sig>
-------------- next part --------------
KDE PIM users mailing list
Subscription management: https://mail.kde.org/mailman/listinfo/kdepim-users

More information about the kdepim-users mailing list