Don't moderate any senders from a specific domain
I have a list running on Mailman 2.1.26. For this list I want everybody moderated except for people who’s email address is from a specific domain. Is there a way to specify a domain that will bypass moderation? What I plan on doing right now is to manually check or uncheck the “mod” checkbox for all individual subscribers as needed. The problem is that manual intervention is required to make sure new subscriptions are configured with the correct “mod” setting. I want to avoid the manual intervention. Under the Sender Filters section there is a setting for Non-member filters that allows you to specify a regex for accept_these_nonmembers. There is no such regex for members to automatically accept their posts. If there were such an option I would set emergency moderation of the list and then set the regex for the desired domain. Unless I can find a place to set a regex for a domain to automatically accept posts from members, I will stick to manually setting the “mod” checkbox for all members.
On 11/9/20 9:54 AM, Andy Cravens wrote:
Unless I can find a place to set a regex for a domain to automatically accept posts from members, I will stick to manually setting the “mod” checkbox for all members.
There is no such setting. If you have the ability to patch the code, it's a two line patch: --- Mailman/Handlers/Moderate.py 2018-06-17 23:47:34 +0000 +++ Mailman/Handlers/Moderate.py 2020-11-10 04:24:49 +0000 @@ -63,6 +63,8 @@ else: sender = None if sender: + if re.search('your_regex', sender): + return # If the member's moderation flag is on, then perform the moderation # action. if mlist.getMemberOption(sender, mm_cfg.Moderate): -- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 11/9/20 9:54 AM, Andy Cravens wrote:
If there were such an option I would set emergency moderation of the list and then set the regex for the desired domain. Unless I can find a place to set a regex for a domain to automatically accept posts from members, I will stick to manually setting the “mod” checkbox for all members.
If you do install the patch I sent in my prior reply, it won't work to set emergency moderation because emergency moderation will hold all but pre-approved messages without doing other checks. You would need a different patch to Mailman/Handlers/Emergency.py.
With the patch I provided, you'd need to set Privacy options... -> Sender filters -> default_member_moderation = Yes and then set all current members moderated via Membership Management... -> Membership List -> Additional Member Tasks
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Andy Cravens
-
Mark Sapiro