I'm having some issues with a cron job to delete 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.