[Dovecot] Mailbox to maildir conversion

Aaron Gallagher habnabit at gmail.com
Fri Mar 28 10:29:46 EET 2008

I just today wrote Yet Another Conversion Script. This one differs  
from the rest that I've seen in that it will generate a dovecot- 
uidlist index. I've done some testing, but not any absolutely  
extensive testing. It works well from what I've tried.

Invocation is simple. You pass the script the maildir and the mailbox  
file and it parses the mailbox file. The index file is generated if  
there is at least one e-mail with an X-IMAP header which contains the  
last ID used and the IMAP UIDVALIDITY. My old mail setup was ipop3d +  
sendmail (now dovecot + postfix) and it had a DON'T DELETE THIS  
MESSAGE e-mail with the aforementioned X-IMAP header. This e-mail  
will not be saved in the maildir. All e-mails with an X-UID header  
will get an entry in the uidlist file.

The script works with python 2.3 or later. I haven't tested it on  
pre-2.3 python versions as I don't have any installed.


I can answer questions about it if needed. I'm also willing to try to  
add any suggested features.

More information about the dovecot mailing list