Greetings,
For gnu.org, we have always had gatewaying between Usenet and mailman for quite a few lists, e.g., help-gnu-emacs and bug-gnu-utils.
When a message is gatewayed *from* Usenet to the mailing list, Mailman evidently omits any of the usual moderation features (generic_nonmember_action and the like). Mark (Sapiro) mentioned this in http://mail.python.org/pipermail/mailman-users/2008-April/061154.html, and it's also the behavior that we have always seen. Evidently due to the inq.enqueue call in gate_news, around line 179 in 2.1.15.
However, spam does get posted to Usenet, and we don't want it to simply be blindly injected into the mailing lists. The workaround we've been using is to add "Newsgroups:" to the "Spam Filter Regexp" with Action=Hold for header_filter_rules (in Privacy Options > Spam filters).
That holds the incoming posts from Usenet. But the downside is significant: every Usenet post is held, even when it would otherwise be approved (e.g., it comes from a known whitelisted address).
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 :(.
Thanks, Karl
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
inq.enqueue(msg,
listname = mlist.internal_name(),
fromusenet = 1)
to
inq.enqueue(msg,
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'):
to
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@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
karl@freefriends.org
-
Mark Sapiro