[kdepim-users] importing maildir

O. Sinclair o.sinclair at gmail.com
Thu Apr 9 07:08:46 BST 2015

On 09/04/2015 00:16, Ingo Klöcker wrote:
> On Tuesday 07 April 2015 22:35:39 Stephan Olbrich wrote:
>> Am Dienstag, 7. April 2015, 21:26:53 schrieb Ingo Klöcker:
>>> 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".)
>> KMail behaves very strange. No mail in the exported archive has
>> any ":2,*" ending. When I look at the original maildir some do
>> indeed end with ":2,S" but not all (and all were marked as read
>> in KMail). So exporting seems to remove all this information.
> Apparently. :(
>> The archive has about 2000 more mails than the original
>> maildir??? I guess this has to do with this bug here 
>> https://bugs.kde.org/show_bug.cgi?id=341192
>> None of the mails in the maildir which kmail is currently using
>> have any ":2,S" endings, although I marked a lot of folders as
>> read.
> I don't know how quickly the information is added to the filenames
> (if at all). Maybe KMail thinks that the maildir is read-only. Or
> it's just broken.
>> I guess I'll just setup a local dovecot and use the imap
>> resource. Maildir seems to be too broken...
> Yes. IMAP seems to be working way better than anything else.
> Regards,
I have been through the "import old maildir structure" a few times as
I have at some points over the years chosen to do a "fresh .kde
.local" setup and then imported old maildirs.

In my experience the mails will be imported but always as unread (boy
did I get tired of that) and yes, you have to move your imported mail
from a funny subfolder to where you want them to be.

One by one folder or you get massive headaches but not data loss so
long as you leave the original maildirs where they are. At least not
in my experience.

Akonadi is just one big headache in my humble opinion. Pre-Akonadi
KMail was rock solid. I am still to find any advantage in the whole
Akonadi concept.

Kind regards,

KDE PIM users mailing list
Subscription management: https://mail.kde.org/mailman/listinfo/kdepim-users

More information about the kdepim-users mailing list