diff options
Diffstat (limited to 'dovecot')
-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 |