On Thu, May 30, 2013 at 11:49 PM, Mark Sapiro <m...@msapiro.net> wrote:
> On 05/30/2013 11:37 AM, Seun Ojedeji wrote: > > Hello, > > > > I was wondering, is there a way i could discard all pending moderation > > messages and also simultaneously add the sender's address to discard for > > subsequent mails? > > > If there aren't too many, it should be easy enough to go to the admindb > interface for the list and for each sender in the summary of held > messages, check the "Add xxx to one of these sender filters:" box and > select the 'Discards' radio button and finally check the 'Discard all > messages marked Defer' box and submit changes. > > Yeah i am very much aware of this option at it works well > If there are so many that this is unwieldy, This is the case...and thanks for providing this script...will test it out. ;-) Thanks! > you could do this with a > withlist script. Something along the lines of the following totally > untested script: > > from Mailman import mm_cfg > def discard(mlist): > for id in mlist.GetHeldMessageIds(): > sender = mlist.GetRecord(id)[1] > if sender not in mlist.discard_these_nonmembers: > mlist.discard_these_nonmembers.append(sender) > mlist.HandleRequest(id, mm_cfg.DISCARD) > > > See 'bin/withlist --help' for what to do with this. > > -- > Mark Sapiro <m...@msapiro.net> The highway is for gamblers, > San Francisco Bay Area, California better use your sense - B. Dylan > -- ------------------------------------------------------------------------ *Seun Ojedeji, Federal University Oye-Ekiti web: http://www.fuoye.edu.ng Mobile: +2348035233535 **alt email: <http://goog_1872880453>seun.ojed...@fuoye.edu.ng* ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org