Converting user mailboxes from maildir to sdbox

David Mehler dave.mehler at gmail.com
Wed May 22 03:31:10 EEST 2019


Hello,

I've got a Postfix/Dovecot server setup. Currently Dovecot is version
2.3.6, and it's using Maildir storage. The mailbox is:

mail_home = /home/vmail/mailboxes/%d/%n
mail_location = maildir:~/mail:LAYOUT=fs

I'm wanting to convert from Maildir to sdbox. I looked at:

https://wiki2.dovecot.org/MailboxFormat

I was initially thinking mdbox but that's multiple messages per file,
which I do not believe is what I want. Am I correct that in the sdbox
format if a single message file is corrupted only that message is
corrupt and not the rest of the messages as would be the case in a
mdbox setup?

On the page:

https://wiki2.dovecot.org/Migration/MailFormat
"
maildir -> sdbox migration. Set mail_location=sdbox:~/sdbox and run
dsync -u username mirror maildir:~/Maildir
"

If I set mail_location=sdbox:~/sdbox will that put the user mailboxes
in mail_home/sdbox?

So it would be:

/home/vmail/mailboxes/example.com/username/sdbox

I am needing to do this migration, but am paranoid about loosing mail
or corrupting mailboxes. All of my users are virtual users and they
are stored in a mysql database.

Thanks.
Dave.


More information about the dovecot mailing list