Timo Sirainen
2007-Mar-20 20:07 UTC
[Dovecot] The perfect Courier -> Dovecot conversion tool
I've tested this only with a test user. http://dovecot.org/tools/courier-dovecot-migrate.pl http://wiki.dovecot.org/Migration/Courier # Migrate Courier IMAP (any version) and Courier POP3 (v0.43+) to Dovecot v1.0 # by Timo Sirainen. This is public domain. # Usage: [--quiet] [--convert] [--overwrite] [--recursive] [<conversion path>] # --quiet: Print only errors # --convert: Do the actual conversion. Without this it only shows if it works. # --overwrite: Ovewrite dovecot-uidlist file even if it exists already. # --recursive: Recursively find maildirs to convert # <conversion path>: Maildir directory, or with --recursive its parent # directory or its parent's parent # - If courierpop3dsizelist is found, it makes its best effort to keep the # POP3 UIDLs, unless the file is more than 30 days older than # courierimapuiddb (user probably stopped using POP3). # - If courierpop3dsizelist isn't found (or it's old), the dovecot-uidlist # is directly converted keeping all the UIDs. # - Keywords are converted from courierimapkeywords/ to maildir filename # flags and dovecot-keywords file # - Subscriptions from courierimapsubscribed are added to Dovecot's # subscriptions file -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20070320/7927443d/attachment.bin>
Timo Sirainen wrote:> I've tested this only with a test user. > > http://dovecot.org/tools/courier-dovecot-migrate.plThanks! The initial runs are looking good; could you beef up the convert_subscriptions() function to spit out debugging info when run in test mode? I have people with really gnarly folder names that I want to be sure look like they'll be converted correctly. So instead of returning, maybe something like: my ($fin, $fout); open ($fin, $in_fname) || die $!; if ($do_conversion) open($fout, ">$out_fname") || die $!; else $fout = STDOUT; while (<$fin>) { chomp $_; (warning, I'm not a perl hacker - it looks good on paper to me. :)) This way it'll spit out to screen what would be going into subscriptions. Or maybe some better variation of my idea... thx, -te -- Troy Engel | Systems Engineer Fluid, Inc | http://www.fluid.com
Possibly Parallel Threads
- Dovecot NFS Indexes and IMAP Migration
- Concat Multiple Plots into one PNG figure
- Bug in keywords conversion with courier-dovecot-migrate.pl v1.1.7
- Can't use string ("0") as a HASH ref while "strict refs" in use at /usr/local/sbin/courier-dovecot-migrate.pl line 300.
- [PATCH] Pop3 order in courier migration script