[Mailman-Users] filtering based on message content

Mark Sapiro mark at msapiro.net
Sun Jul 11 19:02:17 CEST 2010

Russell Clemings wrote:
>Thanks. For the archives, this appears to work on a list named "testlist"


>new file lists/testlist/extend.py:
>import copy
>from Mailman import mm_cfg
>def extend(mlist):
>  mlist.pipeline = copy.copy(mm_cfg.GLOBAL_PIPELINE)
>  # The next line inserts MyHandler ahead of Moderate.
>  mlist.pipeline.insert(mlist.pipeline.index('Moderate'), 'MyHandler')

Perhaps you have thought this through and want this handler before
Moderate, but I would put it after with either

  mlist.pipeline.insert(mlist.pipeline.index('Moderate')+1, 'MyHandler')


  mlist.pipeline.insert(mlist.pipeline.index('Hold'), 'MyHandler')

My thinking is that with MyHandler before Moderate, a non-member post
can be held for 'bad words' before list membership is checked. Then if
the moderator decides the bad words hold is a false positive or should
be passed anyway, she may approve the post without realizing it's from
a non-member. The approved post will then bypass membership checks.

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