On Fri, Aug 04, 2023 at 02:34:44PM -0400, Ed Blackman wrote:
Any suggestions for a command line program to select emails for deletion based on command 
line options?  I specifically want one that can remove emails that were received more 
than X days ago, but can also express "but don't delete if they're flagged".

I had been using archivemail 
(https://manpages.debian.org/buster/archivemail/archivemail.1.en.html) from 
cron to delete emails in certain folders. It saves me from having to manually 
go in and purge folders for lists that I want to have available, but don't ever 
read old messages.

It allows commands like:
archivemail --quiet --delete --days=30 ~/mail/folder1/
archivemail --quiet --delete --days=30 --include-flagged ~/mail/folder2/

It supports reading Maildir, IMAP, mbox, MH, but the mailboxes I need to purge 
are all maildir.

When I recently upgraded to Debian 12, I found that archivemail has been 
removed from Debian because it's an unmaintained Python 2 program.

I could probably port archivemail to Python3 with enough time.


I make extensive, but very basic, use of archivemail. I'm concerned about its going away. Does anyone know of an equivalent, maintained,
program?  Shame if it is dropped.  Though the last update was what,
2011 I think, it has caused no problems, it just works.

Jon


--
Jon H. LaBadie                 j...@labadie.us
 154 Milkweed Dr                 (540) 868-8052 (H)
 Lake Frederick, VA 22630        (703) 935-6720 (M)

Reply via email to