This didn't work right on FreeBSD (4.11) so I modified it until it did. Just for others out there trying to get it to work on other systems, this might be useful.

#!/bin/sh
#
# courier2dovecot -- Converts a Courier maildir to Dovecot format.
# Copyright (c) 2005 Arto Bendiken. Released under the GNU GPL.
# Newest version available from http://bendiken.net/scripts/
# Modified by Tim Martin
# 
# 2005-10-21 initial version for Dovecot 1.0.
# 2006-10-14 revised version to work on FreeBSD 4.11 (requires "rename")
#
dir="$1"
if [ -z "$dir" ] || [ "$dir" = "-?" ] || [ "$dir" = "-h" ] || [ "$dir" = "--help" ]; then
  echo "Usage: $0 maildirpath"
  exit 1
fi
if [ ! -d "$dir" ] || [ ! -e "$dir/courierimapsubscribed" ]; then
  echo "$dir is not a path to a Courier maildir"
  exit 1
fi
find $dir -name courierimapsubscribed | xargs -I oldfile mv oldfile ${dir}subscriptions
find $dir -name subscriptions -print0 | xargs -0 sed -i .back 's/INBOX\.//'
find $dir -name subscriptions.back -print0 | xargs -0 rm -vf
find $dir -name courierimapuiddb | xargs -I oldfile rename -s/courierimapuiddb/dovecot-uidl$
find $dir -name courierimaphieracl -print0 | xargs -0 rm -vrf
find $dir -name courierimapacl -print0 | xargs -0 rm -vf
find $dir -name courierimapkeywords -print0 | xargs -0 rm -vrf

Reply

Please solve the math problem above and type in the result. e.g. for 1+1, type 2
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <pre> <code> <ul> <ol> <li> <dl> <dt> <dd> <sub> <sup> <tt>
  • Lines and paragraphs break automatically.
More information about formatting options