diff options
author | Jonas Smedegaard <dr@jones.dk> | 2003-11-03 13:29:34 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2003-11-03 13:29:34 +0000 |
commit | da34cafef66459ea468d4b328bc63c35a3969278 (patch) | |
tree | d437dc4dcacbe84a43c7bfaeb4446c19b8dacc55 | |
parent | 187a21fe3334fec7f55f58555607fdfd2fc80e81 (diff) |
Add new script uwimap2dovecot.sh to convert from UW imapd to Dovecot imap.
-rwxr-xr-x | dovecot/uwimap2dovecot.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dovecot/uwimap2dovecot.sh b/dovecot/uwimap2dovecot.sh new file mode 100755 index 0000000..fc242ae --- /dev/null +++ b/dovecot/uwimap2dovecot.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +for mbox in `ls -1 /home/*/mail/mbox`; do + user=`echo $mbox|sed 's,/home/\(.\+\)/mail/mbox,\1,'` + inbox=/var/mail/$user + if test -s $inbox; then + cat $inbox >> $mbox + fi + mv $mbox $inbox + user-init $user +done +for oldlist in `ls -1 /home/*/.mailboxlist`; do + user=`echo $oldlist|sed 's,/home/\(.\+\)/.mailboxlist,\1,'` + newlist=/home/$user/mail/.subscriptions + mv $oldlist $newlist + user-init $user +done |