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
On Fri, 2010-09-03 at 17:31 +0200, Burckhard Schmidt wrote:> 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 destHmm. I don't really see any clean way to solve this. One a bit ugly way that would work is running dsync with -o mail_plugins= parameter where you specify only those plugins that are actually wanted, which doesn't include autocreate. A perhaps good long term fix would be to rewrite the whole autocreate plugin. Actually that's probably a good idea in any case, since now it always wastes time and maybe disk I/O doing a "does this mailbox exist?" check for each login. An alternative would be to make it work similar to INBOX works, where the mailbox itself isn't created until it's actually tried to be opened, but it's still always listed. And then MAILBOX_LIST_ITER_NO_AUTO_INBOX flag could be renamed to MAILBOX_LIST_ITER_NO_AUTO_MAILBOXES. dsync already uses this flag, so this would solve the problem also.> 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.I don't think this is a real problem? It shows that error, but finishes the conversion anyway.> 3. empty folder > I have seen some empty folders. These have not been generated by dsync. > Some user could missing them?Fixed: http://hg.dovecot.org/dovecot-2.0/rev/02d78c4a0a51