[Mailman-Users] Suppress moderation message in mailman 2.1 ?

Mark Sapiro mark at msapiro.net
Mon Nov 6 14:04:27 EST 2017

On 11/06/2017 10:17 AM, John Levine wrote:
> In article <851008d1-e6dd-bafe-9e85-e1ebaf1b81a9 at msapiro.net> you write:
>> So my first question is how/why are the posts being held?
> Because the people posting from usenet aren't list subscribers. They
> read the messages on usenet.

Then your Mailman must be 2.1.17 or later, and you have a regexp
matching anything in hold_these_nonmembers or your Mailman is older than
2.1.3. From 2.1.3 to 2.1.16, posts from usenet were not subject to
membership tests. Since then, posts from usenet with a sender who is a
moderated member or a non-member matching a pattern in
hold_these_nonmembers will be held.

>>> When mailman mdoerates the message, it sends the usual moderation
>>> message to the usenet poster, which many posters find confusing.
>> This should not happen. The code that sends the user notice of a held
>> post specifically exempts posts from usenet.
> Clearly it is expecting something that my gateway isn't including.
> How does it try to guess that a message came from a usenet gateway?

cron/gate_news sets fromusenet = True in the message metadata. This and
not sending notices to posters from usenet has been the case since at
least 2.1.1.

The code in cron/gate_news is

>                 # Post the message to the locked list
>                 inq = get_switchboard(mm_cfg.INQUEUE_DIR)
>                 inq.enqueue(msg,
>                             listname = mlist.internal_name(),
>                             fromusenet = 1)

The code in Mailman/Handlers/Hold.py is

>     # We may want to send a notification to the original sender too
>     fromusenet = msgdata.get('fromusenet')
>     # Since we're sending two messages, which may potentially be in different
>     # languages (the user's preferred and the list's preferred for the admin),
>     # we need to play some i18n games here.  Since the current language
>     # context ought to be set up for the user, let's craft his message first.
>     cookie = mlist.pend_new(Pending.HELD_MESSAGE, id)
>     if not fromusenet and ackp(msg) and mlist.respond_to_post_requests and \
>            mlist.autorespondToSender(sender, mlist.getMemberLanguage(sender)):

followed by sending the message conditional on 'not fromusnet' and the
other conditions.

What do you have in those modules? What Mailman version is this? What
packager's patches are included?

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