From 39a5f8c74e209395ede31349b7f2c32df6bcb525 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 30 Jun 2005 23:01:11 +0000 Subject: New script to convert uw-imap style mboxes to dovecot-style Maildirs. --- localmb2md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 localmb2md (limited to 'localmb2md') diff --git a/localmb2md b/localmb2md new file mode 100755 index 0000000..c2739cf --- /dev/null +++ b/localmb2md @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +test -f /usr/bin/mb2md + +test ! -f ~/.procmailrc + +echo 'DEFAULT=$HOME/Maildir/' > ~/.procmailrc + +#FIXME: check spool file lock before reading the spool file + +if [ -f "/var/mail/$user" ]; then + mb2md -s mail -m + echo '' > "/var/mail/$user" +fi + +mb2md -s mail + +mv ~/.mailboxlist ~/Maildir/.subscriptions -- cgit v1.2.3