[Dovecot] mbox to maildir conversion

Brian Wilson brian at wildsong.biz
Sun Mar 19 20:16:39 EET 2006


Timo writes:
> BTW. Nowadays Dovecot includes its own conversion tool also, which might
> work better than mb2md. Usage is something like:
> 
> src/plugin/convert-tool user /home/user mbox:/home/user/mail:INBOX=/var/mail/%u maildir:/home/user/Maildir

I would RTFM but searching wiki.dovecot.org turns up nothing.
Give me more hints and I will add a new wiki page.

The feedback the command gives is

   $ ./convert-tool
   Fatal: Usage: <username> <home dir> <source mail env> <dest mail env>

Why does the tool want a home directory? What does it look for there?

I know you say the syntax is the same for other tools but I don't know
it for them yet either. :-) Guessing at the syntax for the source, it
looks like the first thing is the format of the source (mbox:)
followed by a directory containing mbox format files. The INBOX
portion specifies the location of the mbox that the MDA puts incoming
messages into.

I can see the variables defined in doc/variables.txt, got that already.

Is it intended to run both directions? That is, if I swap the last two
args is will it convert maildirs into mboxes?

This comment from Stian seemed pertinent as well.

> But there is at least one "bug" with this; you should convert .'s in
> mbox names to underscore or something, else it looks weird. Other than
> that, it seems to work fine :)

..but I am unsure what 'looks weird' means. Can you give an example?

Why is this tool under 'plugins' when it appears to be a separate utility?
My guess is that it was easier to put there due to the build environment.
Maybe it should install to a bin or sbin location?

Thanks for all you do,

Brian




More information about the dovecot mailing list