Deleting old maildir messages, is what I'm doing OK?

Kevin J. McCarthy kevin at 8t8.us
Mon Feb 15 17:54:06 UTC 2021


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20210215/e17a45dd/attachment.asc>


More information about the Mutt-users mailing list