Mark Fletcher: > On Sun, Jan 24, 2021 at 12:17:55AM +0100, Jochen Spieker wrote: >> >> 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...
:-) Yes, I was hoping that one could more or less blindly do a few simple substitutions and get that code running again. But I guess if it was that easy, somebody else would have already done that. > 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, Yes, I am trying to use that for archivemail as well. > which is what I think /var/mail/<user> is. Yes, as others have already confirmed, those mailboxes are simple mboxes. > 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. The problem is mostly that it was written for Python 2.3 using deprecated modules that are not available anymore for Python3. But, I have to day, email.utils and friend do provide a lot of drop-in replacements for stuff from the old rfc822 module, at least according to the docstrings. > 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 was already wondering whether I should suggest this, but I assumed that the requirement for interaction makes this a bad approach. It is probably even possible to script this using mutt, but that would be a hackish approach. >> 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) I might get back to you about this, if I don't lose interest very quickly. Is anybody still using MH mailboxes? J. -- If I had to live on a desert island I would take a mobile phone, preferably a Nokia 8810. [Agree] [Disagree] <http://archive.slowlydownward.com/NODATA/data_enter2.html>
signature.asc
Description: PGP signature