migrate Maildir to mdbox

Aki Tuomi aki.tuomi at dovecot.fi
Tue May 2 09:58:21 EEST 2017

Assuming your maildir path is /path/to/mail/Maildir You could do it like 


Then run

doveadm import -A -s maildir:~/Maildir "" ALL

mdbox should end up in


Please try it with doveadm import -u username first and keep backups, 


On 2017-05-02 09:51, Tamas Papp wrote:
> Hi,
> I replaced HDDs in my home server and reinstalled the OS (Ubuntu
> 17.04). Since I had some time I reviewed my Dovecot configuration and
> changed a couple of things, including mailbox format.
> Now I would like to migrate e-mail (about 20G -- I use this server as an
> e-mail archive). The Maildir is available on the (old) hard disk.  The
> new dovecot is running. What should I use? Would mbsync work? I would
> prefer a solution that does not mess up the UUIDs, but I can live with
> that too.
> $ dovecot --version
> 2.2.27 (c0f36b0)
> Incidentally, would you recommend sdbox or mdbox? Lots of e-mails, many
> of them have large attachments.
> best,
> Tamas

More information about the dovecot mailing list