On Fri, Aug 04, 2023 at 10:56:18PM +0200, Marcus C. Gottwald wrote:

>    find ~/mail/folder1/cur/ -maxdepth 1 -type f -not -name '.*' \
>                             -mtime +30 \
>                             -not -name '*:2,*F*' \
>                             -delete

> The conditions in the first line are generic, the other three
> lines should match your example: received more than 30 full days
> ago && not flagged => delete.

I think an mtime test is not the same as "date received" test.

You may have created the folder by recursive copy from somewhere
else, just to take the most obvious problem. Some of us also love
mutt's ability to modify messages after they're delivered (the E,
& and # keys).

I think for a true date received test, you have to look at the
timestamp part of the filename. Or look at the message headers, but
this would be much slower.

-- 
Ian

Reply via email to