I would suggest that you could do this with a cron job. cron is a program which can run other programs periodically. You could write a very short shell script which finds files (those files being mail messages you want to delete) which are older than 1 month and then delete them. You can then run the shell script every day as a cron job for user root.
This will delete files older than 30 days old
find /path/to/mailmsgs -mtime +30 -delete
*BEWARE* - test this code on unimportant files first, otherwise you can get a nasty shock and lose files.
Put this code in a scripts file, let's call it rm_old_mail.sh
Using crontab -e you can create a cron job for user root. Just google crontab examples to get some information on how to use cron. Then you would run the rm_old_mail.sh script everyday at 1am, for example.