Date: Sun, 1 May 2005 12:54:02 +0300 From: Odhiambo Washington <wash@wananchi.com> To: freebsd-isp@freebsd.org Subject: migration from courier-imapd to dovecot Message-ID: <20050501095402.GE89689@ns2.wananchi.com>
next in thread | raw e-mail | index | archive | help
Hiya Labourers, Happy Labour Day! I have been using courier-imapd and squirrelmail for quite some time now. However, I'd like to try out dovecot (in production). According to the migration docs, it looks rather simplistic, until you realize that you have to migrate over 10k users, some of whom have created web folders, and with different names (some even with spaces). I am writing a simple shell script to accomplish the steps dovecot docs say are reqd for change over, but I am not getting far as far as the display of the folders on the squirrelmail web interface. I know I have to do two things: 1. Copying of the files in ~/Maildir/ (see the script below) 2. I also need to do this for, I believe, the $user.prefs file in squirrelmail's data directory. I am wondering if anyone in an ISP environment, having used SM and courier-imapd, ever migrated to dovecot and if they are willing to share the scripts they used in the process. I am for sure still missing on something I need to do, because when I make the changes, successfully hopefully, only default folders are displayed. Here is mine, which is still not clean, but which seems to do what is said at: http://wiki.dovecot.org/moin.cgi/Migration#head-06970f94fb8698efb2155667265adf3a834d15ea It's simplistic, and perhaps needs perfecting: If an #!/usr/local/bin/bash # Script to create the necessary files in ~/Maildir for # migrating from courier-imap to dovecot. 20050501 # store a user's home directory here for testing purposes DIRNAME="/home/wash/Administration/IMAP/TESTDIR" cd $DIRNAME # In every directory in $TESTDIR, go in, find the files named # courierimapsubscribed and courierimapuiddb and make the # dovecot equiv. for userdir in `ls -1`; do cd $userdir/Maildir for dir in `find . -type d \! -name "." -name ".*"`; do cd $dir if [ -f courierimapsubscribed ]; then cp courierimapsubscribed .subscriptions if [ -f .subscriptions ] ; then sed -i.bak -e "s/INBOX.//g" .subscriptions if [ -f courierimapuiddb ]; then cp courierimapuiddb dovecot-uidlist fi fi fi rm -f .subscriptions.bak done done # This appears to do what I want, at least, but .... -Wash http://www.netmeister.org/news/learn2quote.html -- +======================================================================+ |\ _,,,---,,_ | Odhiambo Washington <wash@wananchi.com> Zzz /,`.-'`' -. ;-;;,_ | Wananchi Online Ltd. www.wananchi.com |,4- ) )-,_. ,\ ( `'-'| Tel: +254 20 313985-9 +254 20 313922 '---''(_/--' `-'\_) | GSM: +254 722 743223 +254 733 744121 +======================================================================+ Put no trust in cryptic comments.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050501095402.GE89689>