[Mailman-Users] Updated mmfold.py

skip at pobox.com skip at pobox.com
Mon Jul 14 21:45:14 CEST 2008


A long time ago I wrote a small Python script to allow me to easily manage
held messages for a number of Mailman-managed mailing lists.  It worked well
for me, but was still a bit cumbersome because it required me to enter the
admin or moderator password for each list.  I fixed that a few days ago,
allowing urls to include the admpw parameter, e.g.:

    http://mail.python.org/mailman/admindb/list1?admpw=XYZABC

This makes it *much* easier to use.  I can now run through the held messages
in 11 Python-related lists in less than a minute (most lists don't actually
have any held messages) with a shell function like this:

    function mmcheck {
        for url in \
            http://mail.python.org/mailman/admindb/list1?admpw=XYZABC \
            http://mail.python.org/mailman/admindb/list2?admpw=ABCXYZ \
            http://mail.python.org/mailman/admindb/list3?admpw=FOOBAR \
            http://mail.python.org/mailman/admindb/list4?admpw=BARFOOD \
            ...
        ; do
            python ~/tmp/py/mmfold.py $url
        done
    }

The output looks like this:

    % mmcheck
    no messages await review for spambayes
    no messages await review for spambayes-dev
    2 items sent to browser for review
    no messages await review for python-3000
    no messages await review for python-mode
    no messages await review for pydotorg
    no messages await review for python-dev
    1 items sent to browser for review
    1 items sent to browser for review
    no messages await review for csv
    1 items sent to browser for review

Only those lists with pending messages generate pages in my web browser.
Just wait for the function to finish and then visit the resulting pages
(generally each will pop up in a separate tab, though I suspect that depends
on your default browser).

Unless you're running this on a shared machine there should be little risk
in recording list passwords in a file.  (If you manage several lists you
probably have them recorded online somewhere anyway.)

The updated mmfold.py script is here:

    http://www.webfast.com/~skip/python/mmfold.py

Let me know if you have any questions or comments.

-- 
Skip Montanaro - skip at pobox.com - http://www.webfast.com/~skip/
------
ELON MUSK: If fuel cells were good, don't think you'd see them somewhere, like
maybe in a laptop or a cell phone or a $200 million military satellite maybe?
And yet, where do you see them?
SPENCER MICHELS: You don't.
ELON MUSK: Exactly.


More information about the Mailman-Users mailing list