Correct procedure to convert Maildir format to Mdbox

Aki Tuomi aki.tuomi at open-xchange.com
Wed Jun 9 09:01:35 EEST 2021


> On 09/06/2021 00:10 Marco Usai <ddr2pw at yahoo.com> wrote:
> 
> 
> Hi,
> 
> I need to migrate mail from a shared hosting that stores mail in the Maildir format to another one that uses the Mdbox format. 
> 
> Both hosts use Dovecot, though I don't know what version, because neither has Dovecot command line/ssh utilities available.
> 
> So I installed Debian 10.9 + Dovecot-imapd (ver.2.3.4.1 stable), then in "/etc/dovecot/conf.d/10-mail.conf" I changed "mail_location = mbox:~/mail:INBOX=/var/mail/%u" to "mail_location = mdbox:~/mdbox" and "#separator =" to "separator = /" . I moved the contents of the folder containing the mail in Maildir format to ~/Maildir/ and then I ran "dsync -v -u user mirror maildir:~/Maildir/".
> 
> 
> The only users on the system are root and a limited priviledges user, but on the Debian server I didn't recreate any mail account/user that existed on the source server.
> 
> The conversion command is executed without showing errors: the resulting ~/mdbox folder has a size of 370 MB while the ~/Maildir/ folder was 456 MB.
> 
> I would like to know if the procedure I followed is correct and if the absence of errors when the command is executed means that the conversion was successful, or if I need to do some other test/check to make sure the whole conversion process is ok.
> 
> Thank you.
>

Yep. That's a good way to do the conversion. See https://wiki.dovecot.org/Migration/MailFormat for details.

Aki


More information about the dovecot mailing list