[Dovecot] courier2dovecot migration script
Arto Bendiken
arto.bendiken at gmail.com
Thu Nov 3 23:42:53 EET 2005
Howdy,
I've just migrated a couple of servers to Dovecot, and am loving it so
far. I thought I'd share the courier2dovecot shell script I whipped
together (based on the instructions I found in the wiki.dovecot.org
migration how-to), for converting Courier-IMAP maildirs to Dovecot
format. It can be downloaded from my home page:
http://bendiken.net/scripts/
While the script is rather simple, it can save a fair bit of typing
when migrating some hundreds of mail accounts... especially since
Courier stores some of its own state files recursively in each folder
of the maildir hierarchy, making it a real pain to otherwise manually
rename or remove all of them.
Here's a plain-English summary of what the script currently does, when
given a Courier maildir path as an argument:
- check that the given path is indeed a valid Courier maildir, and exit if not
- rename the file 'courierimapsubscribed' to 'subscriptions', and
strip the 'INBOX.' prefix from its contents
- recursively rename all of files of the name 'courierimapuiddb' to
'dovecot-uidlist'
- recursively delete all of files of the name 'courierimaphieracl',
'courierimapacl' and 'courierimapkeywords'
The script will also verbosely print out each action it does, handy
for redirecting the output to a log file for a large migration.
I hope people about to jump ship from Courier to Dovecot find this
useful. If anyone comes up with improvements to the script, please
send them my way :-)
Arto
More information about the dovecot
mailing list