migrate Maildir to mdbox

Michael Segel dovecot_mjs at hotmail.com
Tue May 2 17:09:29 EEST 2017


Silly question… 
Which is preferred? MailDir or Mbox?  (directory vs flat file) 

How would you do this when migrating from an old server to a new one? 

Thx

-Mike

> On May 2, 2017, at 1:58 AM, Aki Tuomi <aki.tuomi at dovecot.fi> wrote:
> 
> Assuming your maildir path is /path/to/mail/Maildir You could do it like this:
> 
> mail_home=/path/to/mail
> mail_location=mdbox:~/Mail
> 
> Then run
> 
> doveadm import -A -s maildir:~/Maildir "" ALL
> 
> mdbox should end up in
> 
> /path/to/mail/Mail
> 
> Please try it with doveadm import -u username first and keep backups, naturally.
> 
> Aki
> 
> 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