[Dovecot] need convert-tool advice

Dave McGuire mcguire at neurotica.com
Sat Jul 31 04:14:20 EEST 2010

Hi folks,
  I've got a few thousand accounts that I'd like to convert from mbox to
maildir.  I'm looking at using convert-tool from the command line to do
this, but I'm uncertain about the command line syntax, so I hope someone
can take a moment to go over this with me.

  I'm running dovecot 1.1.6 on this system.  Mail accounts are not tied
to UNIX system accounts, I'm using the dovecot LDA, users do not have
home directories, everything is controlled from a database, and mail
directories take the form of:


  The mail directories contain mbox-style spool files, including "inbox"
and any user-created mbox-format folders.  The entire hierarchy is owned
by vmail.vmail.

  I'd like to batch-convert these offline in such a way that it's
transparent to users.  Here's what I have so far:

mv ${user} ${user}-mbox

convert_tool ${user} \
/var/spool/mail/${domain}/${user} \
INBOX=/var/spool/mail/${domain}/${user}-mbox/inbox \

  (sorry about that incomprehensibly long command line, I tried to break
it intelligently)

  ...then I'll change the "mail" field returned by the database query to
include maildir instead of mbox.  I'll wrap the whole thing in a script
and do it in one run.

  Is this correct usage of convert_tool's command line options?  The
thing that confuses me is the "home directory" command line option, not
sure what that's for, as my mail users don't have home directories...at
least not in the UNIX sense, does it mean something else?  Will the
users notice anything different here, with respect to UIDs, indices, or
anything like that?

  If this is completely the wrong way to do it, I'm not opposed to using
a different tool like mb2md.pl, but I looked at that and couldn't quite
figure out how to make it work within my current directory structure.


Dave McGuire
Port Charlotte, FL

More information about the dovecot mailing list