Moving mail users from partition to partition
- Get the latest mailbox information from the mboxutil -l output
mboxutil -l [-p MUTF7 IMAP pattern | -P regular expression]To get just the INBOXs. You don't want any of the other stuff.
- Now you need to split the mailboxes into their partition specific files
One way:
sort +4 userlist.inbox > userlist.inbox.sortpart
The first few entries will seem out of order, but that is because the people have not logged in and there is no last login date for their mail. Delete these entries.
- Now it is simple to grep out the partitions into their own files
grep " mp1 " userlist.inbox.sortpart > userlist.inbox.sortpart.mp1
- To get the partition in command form, use
awk '{print "./mboxutil -r "$7" "$7" mpt3"}' userlist.inbox.sortpart.mp2 > userlist.inbox.sortpart.mp2.cmd
- Finally, at the beginning of each of the script files, prepend a cd into the directory which contains the mboxutil program.
- Your end result in the file should look like:
cd /global/mailds/mailapps/ims52/bin/msg/admin/bin./mboxutil -r user/netid1/INBOX user/netid1/INBOX mpt2
./mboxutil -r user/netid2/INBOX user/netid2/INBOX mpt2
./mboxutil -r user/netid3/INBOX user/netid3/INBOX mpt2
./mboxutil -r user/netid4/INBOX user/netid4/INBOX mpt2
./mboxutil -r user/netid5/INBOX user/netid5/INBOX mpt2
./mboxutil -r user/netid6/INBOX user/netid6/INBOX mpt2
./mboxutil -r user/netid7/INBOX user/netid7/INBOX mpt2
./mboxutil -r user/netid8/INBOX user/netid8/INBOX mpt2
I took the first 100 entries from all the partition files and tried that as a test. I was able to do six files at a time without much of a performance penalty. The backups were running and probably slowed things down quite a bit.