Cron job in cPanel to Delete Emails after 21 days
I'm having some issues with a cron job to delet开发者_如何学编程e emails after 21 days. I've read through many examples and have tried many different variations of this command but I can't get it to work:
find /home/cont/mail///cur -name "*" -mtime +21 -exec rm {} \;
Currently this runs and I get a message back from every mail box that doesn't have any files in the folder: "rm: cannot remove `/home/cont/mail/example.com/admin/cur': Is a directory"
I then check the directories that do have files in them and nothing is deleted. I'm sure I'm missing something simple...
Thanks.
I'm glad no one answered this and made me look even more stupid. It is working, the messages back are just because there are no emails but I am seeing the emails deleted from other user's folders now.
精彩评论