| How do I delete old email from my users accounts? |
 |
 |
 |
I want to delete all email in my users account directories that is over 90 days old. This will help me to save disk space. How can I do this? I use Maildir mail boxes.
Answer:
Use a simple cron job to do this.
find /home/youruser/Maildir/new -type f -ctime +90 | xargs rm
clean up new york
What it means: look in the user's unread folder (Maildir/new) for any regular files (-type f) older than 90 days (-ctime +90) and send these files (xargs) to the delete command (rm).

|