Need a patch written for 2.1 for post-only access.

I'm not a Python programmer but I need a patch written to add a feature that someone had written a patch for in version 2.0. The patch called a "post-only" patch allowed me to create a list called "post-only" and members of this list were allowed to post to all other lists. I am the systems administration for the Electronic Frontier Foundation (http://www.eff.org). We are currently running 2.0 with this patch. The reason we need it is because we are running about 65 internal lists and several of our members have multiple email addresses they post from. The burden of adding several hundred alieases and maintaining them across this many lists would be too much to deal with. I have upgraded to 2.1 on my own personal server and I feel that it would greatly benefit EFF to upgrade to 2.1. But - I can not do it until I have this patch. I am therefore asking that someone out there write this patch. If you write it - I will publicly thank you in our newsletter that goes out to about 30,000 of our members. I offer 15 minutes of fame, and - you'll be helping us get important work done. EFF relies heavilly on Mailman. Below is the code for the current patch for 2.0. It looks to me that doing this for 2.1 would be trivial for someone who knew what they were doing. I would REALLY appreciate it if someone were to volunteer to do this. Alternatively - I would be willing to pay someone out of my own pocket - and donate the code back to the public - if I can't find someone to do it for free. Thanks in Advance Marc Perkel /root EFF Here's the current 2.0 patch --- mailman-2.0beta5/Mailman/Handlers/Hold.py.postonly Tue Aug 1 19:02:28 2000 +++ mailman-2.0beta5/Mailman/Handlers/Hold.py Sat Aug 5 18:31:50 2000 @@ -43,6 +43,8 @@ from Mailman import Message from Mailman import mm_cfg from Mailman import Utils +from Mailman import MailList +from Mailman import Errors from Mailman.Logging.Syslog import syslog @@ -104,6 +106,13 @@ +def CheckPostOnly (sender): + try: + m = MailList.MailList('post-only', lock=0) + return m.IsMember (sender) + except Errors.MMListError: + return 0 + def process(mlist, msg, msgdata): if msgdata.get('approved'): return @@ -141,7 +150,8 @@ if mlist.member_posting_only: posters = Utils.List2Dict(map(string.lower, mlist.posters)) if not mlist.IsMember(sender) and \ - not Utils.FindMatchingAddresses(sender, posters): + not Utils.FindMatchingAddresses(sender, posters) and \ + not CheckPostOnly(sender): # the sender is neither a member of the list, nor in the list of # explicitly approved posters hold_for_approval(mlist, msg, msgdata, NonMemberPost)

The functionality was moved from the Hold.py module over to the Moderate.py module. From there it is almost identical. I applied the old patch by hand to that module and I'm testing it now. Jon Carnes On Mon, 2003-01-27 at 09:27, Marc Perkel wrote:
I'm not a Python programmer but I need a patch written to add a feature that someone had written a patch for in version 2.0.
The patch called a "post-only" patch allowed me to create a list called "post-only" and members of this list were allowed to post to all other lists.
I am the systems administration for the Electronic Frontier Foundation (http://www.eff.org). We are currently running 2.0 with this patch. The reason we need it is because we are running about 65 internal lists and several of our members have multiple email addresses they post from. The burden of adding several hundred alieases and maintaining them across this many lists would be too much to deal with. I have upgraded to 2.1 on my own personal server and I feel that it would greatly benefit EFF to upgrade to 2.1. But - I can not do it until I have this patch.
I am therefore asking that someone out there write this patch. If you write it - I will publicly thank you in our newsletter that goes out to about 30,000 of our members. I offer 15 minutes of fame, and - you'll be helping us get important work done. EFF relies heavilly on Mailman.
Below is the code for the current patch for 2.0. It looks to me that doing this for 2.1 would be trivial for someone who knew what they were doing. I would REALLY appreciate it if someone were to volunteer to do this. Alternatively - I would be willing to pay someone out of my own pocket - and donate the code back to the public - if I can't find someone to do it for free.
Thanks in Advance
Marc Perkel /root EFF
Here's the current 2.0 patch
--- mailman-2.0beta5/Mailman/Handlers/Hold.py.postonly Tue Aug 1 19:02:28 2000 +++ mailman-2.0beta5/Mailman/Handlers/Hold.py Sat Aug 5 18:31:50 2000 @@ -43,6 +43,8 @@ from Mailman import Message from Mailman import mm_cfg from Mailman import Utils +from Mailman import MailList +from Mailman import Errors from Mailman.Logging.Syslog import syslog
@@ -104,6 +106,13 @@
+def CheckPostOnly (sender): + try: + m = MailList.MailList('post-only', lock=0) + return m.IsMember (sender) + except Errors.MMListError: + return 0 + def process(mlist, msg, msgdata): if msgdata.get('approved'): return @@ -141,7 +150,8 @@ if mlist.member_posting_only: posters = Utils.List2Dict(map(string.lower, mlist.posters)) if not mlist.IsMember(sender) and \ - not Utils.FindMatchingAddresses(sender, posters): + not Utils.FindMatchingAddresses(sender, posters) and \ + not CheckPostOnly(sender): # the sender is neither a member of the list, nor in the list of # explicitly approved posters hold_for_approval(mlist, msg, msgdata, NonMemberPost)
participants (2)
-
Jon Carnes
-
Marc Perkel