summaryrefslogtreecommitdiff
path: root/localmb2md
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2005-06-30 23:01:11 +0000
committerJonas Smedegaard <dr@jones.dk>2005-06-30 23:01:11 +0000
commit39a5f8c74e209395ede31349b7f2c32df6bcb525 (patch)
tree24b80e28931fea8e82371b1ced14e1cf8ca79dce /localmb2md
parent81c3659cb2b0bd9dc1db58657017452ef5f29ded (diff)
New script to convert uw-imap style mboxes to dovecot-style Maildirs.
Diffstat (limited to 'localmb2md')
-rwxr-xr-xlocalmb2md20
1 files changed, 20 insertions, 0 deletions
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