Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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

Discussion in 'E-mail Discussion' started by ncalsurfer, Jun 8, 2010.

  1. ncalsurfer

    ncalsurfer Registered

    Joined:
    Jul 21, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    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!
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice