On Mon, Feb 15, 2021 at 04:21:11PM +0000, Chris Green wrote:
I currently have the following two lines in my crontab to delete old
mails in my junk catching directories, is it OK/safe to do it like
this?

   20 02 * * * find /home/chris/mail/Ju/*/cur -type f -mtime +7 -exec rm {} \;
   30 02 * * * find /home/chris/mail/Ju/*/new -type f -mtime +7 -exec rm {} \;

That should be fine. The only caveat is header caching. If you delete messages outside of mutt, those messages won't be removed from the header cache. Probably not a big deal for "junk catching" folders, but once in a while you may want to regenerate your header caches.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to