On Sun, Jan 24, 2021 at 12:17:55AM +0100, Jochen Spieker wrote:
> Thank you for pointing out that archivemail will be gone soon. Since I
> am using it as well, I took a quick look at it ("how hard can it be??")
> and tried a quick conversion to Python3:
> https://github.com/solexx/archivemail
> 
> Luckily there is a test suite and only about two thirds of the tests are
> failing, otherwise I might have thought it should work. ;-)
> 
> The main problem is that one has to replace a few modules/functions,
> mostly the long-obsolete rfc822. I think I can get away with throwing
> away the get_filename function completely, which was a little
> problematic due to the dependencies. I guess I have only "solved" the
> easy problems for now, but I still think the conversion should be
> doable.

On digging around prompted by Brian's earlier input I found a 
conversation between a couple of other people and they seemed to start 
that process and then give up on the basis that it was a lot harder than 
they thought...

I'm probably going to just write a python3 script of my own to handle my 
use-case, which is just to sift through /var/mail/<user> to delete mails 
older than a month. I've found the python3 "mailbox" library which 
includes support for mbox type mail files, which is what I think 
/var/mail/<user> is. Looking at the API it doesn't look that hard, and I 
have to assume the complexity of porting archivemail comes either from 
the paradigm it operates in or from functionality it provides other than 
simply deleting old mail.

On my travels today I discovered mutt can do the job I want for me with 
a simple command, but I don't want to have to run mutt to do it -- I'm 
"away" for long periods and I want the mail box size to stay under 
control while I'm not paying attention, accepting that means I will 
never read some mail that goes to the mailing list. Hence I want an 
automated solution that happens whether I am paying attention or not.

> 
> I have no idea whether or when I will be able to finish this, because I
> am severly time-constrained due to the pandemic (daycare in the morning,
> regular work in the afternoon until late at night). I am also aware that
> it is probably too late for bullseye, but archivemail can be dropped to
> ~/bin/ easily.
> 
> But well, first me or somebody else has to fix those failing tests.
> 

Despite my decision to have a crack at writing something local for my 
own usecase, I do think it would be good if archivemail made a comeback, 
so I wish you well in that endeavour. I'd offer to help test but as I've 
illustrated, my usecase is very simple...

(still, happy to test that usecase if it would be helpful)

Mark

Reply via email to