Hi billymayday,
Sorry for the delay but I've been away for a few days.
Your "find" routine looks promising but I have a couple of problems.
I get an error message if I put "/path/cur" in the name pattern field
"find: warning: Unix filenames usually don't contain slashes (though pathnames do). That means that '-name `/*'' will probably evaluate to false all the time on this system. You might find the '-wholename' test more useful, or perhaps '-samefile'. Alternatively, if you are using GNU grep, you could use 'find ... -print0 | grep -FzZ `/*''."
emails are located at the following
/var/vmail/domainname/mailboxname/cur/
/var/vmail/domainname/mailboxname/new/
/var/vmail/domainname/mailboxname/tmp/
/var/vmail/domainname/mailboxname/.spam/cur/
/var/vmail/domainname/mailboxname/.spam/new/
/var/vmail/domainname/mailboxname/.spam/tmp/
I have tried the following:
Code:
find /var/vmail/*/*/cur/ -type f -name "*" -mtime +13 -exec rm {} \;
and it seems to work ok.
So if I set up a daily cron job using the six locations above hopefully that will do the job.
Thanks for your help