[Dovecot] conversion to maildir

Eric S. Johansson esj at harvee.org
Tue Aug 26 22:55:47 EEST 2003


Timo Sirainen explained:

> Next Dovecot version will support both mboxes and maildir. That could do
> it at least one mailbox at a time.

I wonder if we're both envisioning the same thing?  I'm envisioning a sequence 
where the maildir directory is looked for first and failing that, trying for a 
mbox one.  for example, if you have a mailbox called plugh it would look for a 
maildir directory called plugh and if it did not exist, look for a mbox file 
called plugh. Granted it would make the subscription to semantics a little funky 
but not unmanageable.

then, if the mbox file was the only mailbox, its contents would be converted to 
maildir and the mbox file would be moved to a "junk" directory

>>to relate this to dovecot: this is probably not the job of the imap server but 
>>it would be real nice to be able to fit in some sort of a plug-in that could 
>>automatically do the conversion on a mailbox as it is opened.
> 
> 
> Yes, that should be possible.

in addition to my ramblings above, seems to me that might be more practical to 
specify a "magic" directory addition to the imap directory representation which 
contains the hierarchy of mbox files which would allow users to copy and then 
delete mboxes to convert formats.

I personally prefer the automatic invisible conversion if at all possible 
because it makes the customer experience a dream (if it works right).

> We'd need a Python plugin :) I don't think it was difficult to export C
> stuff from .h files to Python using some tool .. which I can't remember
> anymore.
> 
http://psyco.sourceforge.net/

but it's not all that you need.  You want to embed python in dovecot and find a 
way to invoke dovecot functions mailbox from python.

---eric




More information about the dovecot mailing list