[Mailman-Users] deleting pending requests

Donal Hunt Donal.Hunt2 at mail.dcu.ie
Sat May 12 19:26:23 CEST 2001


Haisam,

I posted a script on thursday about how to do it in the latest version of
mailman (mailman-2.0).

I don't know at what stage the mailman developers changed the way admin
requests are stored, but a search through the change log will probably tell
ya. :)  The script below should work for Mailman Version 1.x though...

Regards

Donal

-------------------------------------------------------------------------
#! /usr/bin/env python
# argv[1] should be the name of the list.
"""Clear pending admin requests for a list from the command line. [Mailman
1.x afaik]

Usage:
    clear_requests listname

Where:

    listname
        The name of the Mailman list you want clear the request from.  It
must
        already exist.


"""


import sys
import os
import string
import getopt
import paths
import Mailman.MailList
import Mailman.Utils
import Mailman.Message
import Mailman.Errors
import Mailman.mm_cfg

def usage(status, msg=''):
    if msg:
        print msg
    print __doc__ % globals()
    sys.exit(status)


^L
def main():
    try:
        ml = Mailman.MailList.MailList(sys.argv[1])
    except Mailman.Errors.MMUnknownListError:
        usage(1, 'You must first create the list by running: newlist %s' %
              listname)
    try:
        ml.requests = {}
        ml.Save()
    finally:
        ml.Unlock()

main()

-------------------------------------------------------------------------
From:    "Haisam K. Ido" <haisam at ido.org>
Subject: [Mailman-Users] deleting pending requests
To:      mailman-users at python.org

On a mailing list which I maintain I have over 350 pending requests.  Is
there a way to delete them all without going throught the GUI?  I am using
version 1.1.  Yes I will upgrade soon :-)

Thanks in advance.


Haisam Ido




More information about the Mailman-Users mailing list