[Mailman-Users] Deleting old msgs?

Mark Sapiro mark at msapiro.net
Thu Dec 8 19:44:07 CET 2011


On 12/8/2011 8:31 AM, Sebastian Hagedorn wrote:
> 
>> You inspired me. I've created a script for pruning archives. See "NOTE
>> ON PRUNING OLD MESSAGES:" in the FAQ at <http://wiki.list.org/x/2YA9>
>> for links.
> 
> this script is very welcome, but I'm having trouble getting it to work:
> 
> /usr/lib/mailman/bin/prune_arch -v -l test -d 1700 -n
> Traceback (most recent call last):
>  File "/usr/lib/mailman/bin/prune_arch", line 190, in ?
>    main()
>  File "/usr/lib/mailman/bin/prune_arch", line 142, in main
>    except (IOError, mailbox.NoSuchMailboxError), e:
> AttributeError: 'module' object has no attribute 'NoSuchMailboxError'
> 
> The list exists. We're running Red Hat Enterprise Linux, which comes
> with Python 2.4 ... I've seen that newer versions have that attribute.
> Mailman 2.1.14 officially supports Python 2.4, so perhaps the script
> should reflect that?


I can look into revising the script to use the mailbox.UnixMailbox class
instead. which will work with python 2.4.

Note that I run a production CentOS 5 server on which I have installed
Python 2.6.5 from source. The default Python on this server is still
2.4.3 as changing the default breaks yum and possibly other things, but
I use python2.6 for things I install from source like Mailman, bzr and
mod_wsgi.


> Update: I noticed that there are so many dependencies on new features of
> the mailbox module that it doesn't seem feasible to use Python 2.4. Do
> you know what the minimum required Python version would be? I suggest
> you add that info to the script.


It should work with Python 2.5. I will either fix the script to work
with Python 2.4 or add a "requires at least Python 2.5" note to it.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list