[Mailman-Users] newsgroup->mailman moderation

Mark Sapiro mark at msapiro.net
Sat Jun 29 16:20:12 CEST 2013

On 06/28/2013 11:48 AM, Karl Berry wrote:
> So, we would really like to have posts from Usenet be subject to the
> normal mailman moderation rules (for purposes of both holding and
> accepting messages).  Is it feasible to hack gate_news to make that
> happen?  Help?  Unfortunately my own mailman-fu is not nearly up to the
> job :(.

You could hack gate_news by changing

                            listname = mlist.internal_name(),
                            fromusenet = 1)


                            listname = mlist.internal_name(),

i.e., just drop the fromusenet = 1, but DO NOT DO THIS. It will work,
but if your usenet gating is bidirectional it will possibly cause a mail
loop as the post from usenet will be posted back to usenet.

It's better to leave gate_news as is and make the following changes.

To enable list membership and *_these_nonmembers tests, at about line 50
in Mailman/Handlers/Moderate.py, change

    if msgdata.get('approved') or msgdata.get('fromusenet'):


    if msgdata.get('approved'):

The various miscellaneous holds applied by Mailman/Handlers/Hold.py are
already applied to usnet posts with the exception of
require_explicit_destination which you don't want anyway, so no changes
should be necessary there.

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