[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
Timo Sirainen wrote:
I've tested this only with a test user.
Thanks! 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
participants (2)
-
Timo Sirainen
-
Troy Engel