[Dovecot] dsync: mbox to maildir

Burckhard Schmidt bschmidt at cms.hu-berlin.de
Fri Sep 3 18:31:29 EEST 2010


Hello,

I started converting INBOX and folder from mbox to maildir.

The old folders comming from Dovecot 1.0.13 with a mail_location 
mbox:%h:INBOX=/inbox/%u.

The new instalation on a different server is Dovecot 2.0.1,
mail-location maildir:~/maildir:INDEX=/addons/index/%u:
CONTROL=~/control:LAYOUT=fs

No user has logged in before.

I have copied tho old Inbox and folders into /mailstore1/import-inbox 
and /mailstore1/import-home to the new server.

my dsync command
dsync -v -u account mirror 
mbox:/mailstore1/import-home/~account:INBOX=/mailstore1/import-inbox/account

This works fine.
But there are some problems too:

1. autocreate
The plugin autocreate = AutoCleanSpam is activated for lda and imap.
There is no user with such folder.
dsync ceates two:

dsync(account): Info: AutoCleanSpam: only in source
dsync(account): Info: AutoCleanSpam: only in dest

I saw AutoCleanSpam and AutoCleanSpam_73fc7f01efa3804cb4290000b68194d6, 
both empty.

I deletet it with
doveadm mailbox delete -u account -s 
"AutoCleanSpam_73fc7f01efa3804cb4290000b68194d6"

Furthermore I have had before autocreate = Sent ( and some more)
If the user has such a folder then again two folders are created, "Sent" 
which is empty and "Sent_any characters" like above. This folder 
contains the emails of the old folder Sent.

2. missing skip_broken_mailboxes, skip_dotdirs
dsync reports errors like
Error: Failed to sync mailbox xyz: Mailbox isn't a valid mbox file
After a few minutes dsync stops.
Or a file like .mlbxlsttmp causes the same error.

I remembered my tests with convert-tool (dovecot-V1.2.12) and could use 
skip_broken_mailboxes skip_dotdirs. That was fine and I'm missing it.

I will have to convert several thousands of users. May be I have to 
clean their folders before?

3. empty folder
I have seen some empty folders. These have not been generated by dsync. 
Some user could missing them?

On ballance dsync converts 10 Gb of mbox to maildir successfully.

-- 
Regards - Burckhard Schmidt


More information about the dovecot mailing list