----- Original Message ----- 
From: "Stephen J. Turnbull" <[EMAIL PROTECTED]>
To: "Robert Echlin" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, August 12, 2004 3:37 AM
Subject: Re: [Mailman-Users] BIG discard problem

Thanks, Stephen

That looks like an interesting solution. I'll make a note of it for next
time.

The docs describe how to start "withlist", but I think I would have to learn
the internals of the Python code pretty thoroughly to be able to reproduce
this from scratch.

Is "m" a standard variable automagically defined by withlist to be the mail
list mentioned on the python command line?
Is mm_cfg.DISCARD a function that HandleRequest is expecting to call to do
the real work, or a constant that tells HandleRequest which of several
predefined tasks it should do?
What's going on in the ...? And what will it prompt me with that I need to
hit <return>?

I also think this answers one of my previous questions - it would have been
useful to ask the developers list. As you suggest, writing a one line loop
of Python code would be the standard solution there.

Is there any other place where this "standard" solution would be found?

Robert

> Didn't you find the standard solution?  To wit:
>
>     As user mailman (I think actually you just need write permissions
>     in the relevant places, so group mailman Works For Me YMMV) execute:
>
>     python -i bin/withlist listname
>
>     Then type:
>
>     >>> m.Lock()
>     >>> from Mailman import mm_cfg
>     >>> h = m.GetHeldMessageIds()
>     >>> for i in h: m.HandleRequest(i,mm_cfg.DISCARD)
>     ... <return>
>     >>> m.Save()
>     >>> <ctrl-d>
>
> The triple punctuation are Python prompts; you don't type those, you
> wait for them to appear and then type.  All the punctuation (including
> empty parens) must be typed as shown, capitalization must be exactly
> as shown.  The stuff in <angle brackets> are names of single keys
> (Enter and Control + d), not to be typed literally.
>
> On a Red Hat Linux system you probably will need to use python2,
> python2.2 or python2.3 instead of just python, because python
> corresponds to the Golden Oldie 1.5.2 version.


------------------------------------------------------
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/

Reply via email to