Convert mbox to Maildir for all users

From Wiki

Jump to: navigation, search
#!/bin/bash

for user in `ls /tmp/test_maildir/stevemail/`
do
       mkdir /var/mail/$user
       chown $user.users /var/mail/$user
       su - $user -c "mb2md -s /tmp/test_maildir/stevemail/$user -d /var/mail/$user/" -s /bin/bash

done
Personal tools