Hi there.

I am new to the world of postfix. I have managed to successfully implement Postfix etc using workaround.org's excellent guide.

My current item on the wish list is how to sweep items from the users Spam folders after a defined number of days.

I have located this script from http://moze.koze.net/?p=161

   #!/bin/bash

   find /var/vmail -type d | sed 's/ /\\ /g' | grep "Maildir/.Spam/" |
   while read line
   do
   find ${line}new/ -mtime +365 2>/dev/null -exec rm {} \;
   find ${line}cur/ -mtime +365 2>/dev/null -exec rm {} \;

   done

My guess as to what this does is the following

1. Find any occurances of .Spam directory under /var/vmail

2. for each .Spam directory found, locate and delete any items found in new and cur directories over 365 days old.

Am I correct here?

If so what do I do with this script and how do I use it in a weekly cron job?

Many thanks for your help here.

Regards

Justin

Reply via email to