All the following commands/edits will need to be done as root:
Install mb2md:
aptitude install mb2mdStop the mail servers:
/etc/init.d/postfix stop
/etc/init.d/dovecot stopEdt the /etc/posfix/main.cf:
home_mailbox = Maildir/Edit the /etc/procmailrc (if you are using procmail for local delivery/filtering):
ORGMAIL=$HOME/Maildir/
MAILDIR=$ORGMAIL
DEFAULT=$ORGMAILEdit the /etc/dovecot/dovecot.conf:
mail_location = maildir:~/MaildirAt this point I'd backup the user accounts just in case there is an issue.
Create a bash script with the following and execute it:
for i in $( ls -1 /home ); do
su -l -c 'mb2md -m' $i; ## convert /var/spool/mail/USER
su -l -c 'mb2md -s mail -R' $i;
doneAt this point you will need to restart the mail servers:
/etc/init.d/dovecot start
/etc/init.d/postfix start
No comments:
Post a Comment