Need help with a delete /.Trash cron job on reseller hosting box

ncalsurfer

Registered
Jul 21, 2007
1
0
51
Hello,

I have a small webhosting business on a rented shared cPanel server. I'm trying to write a cron job for some of my accounts that will delete all trash email older than 24hours in the mail /.Trash folder once a day.

I've tried a few jobs similar to below, but none are working:
find /mail/domainname/*/.Trash/* -type f -mtime +1 | xargs rm -f

I think my folder structure is wrong as I keep receiving "no such file or directory" errors. 24 hour parameter isn't absolutely necessary as I could run a more generic job 2x a week.

Any help would be greatly appreciated.

Thanks everyone!