Our directory structure is setup like this: /home/region2/user1 /home/region2/user2 /home/region3/user1 ...
This script is made to run accross 6 mail servers (which is why it gathers a list of regions as well as users). I'm sure it can be easily modified for any directory structure. I run it out of cron (which e-mails me the little summary that this script prints out). I archive the dirs first then delete. Which reminds me...I need to delete a bunch of tar files now. It would be easy enough to check if the tars are six months old or however long one would want to keep mailbox archives. I'll probably just add it to the end of this script. Let me know if there are any questions. -- Brendon Colby Systems Administrator Midcontinent Communications
cleanup-mail-dirs.pl
Description: Perl program
