Re: Fwd: [MeeGo-dev] Allowing non-subscribers to post on the mailing lists



On Fri, Oct 22, 2010 at 09:03:43AM -0600, Christer Edwards wrote:
> Auke Kok wrote:
> > On 10/21/10 05:08, Dave Neary wrote:
> >> Felipe Contreras wrote:
> >>> One way to achieve this is to only require a subscription to _one_
> >>> list, in order to allow sending messages to all of them. I have never
> >>> seen anybody doing this though.
> >>
> >> GNOME has a "post-only" email list, which anyone can subscribe to. If
> >> they're subscribed to that list, they can post to any public email list
> >> on gnome.org without moderation.
> >
> > That sounds really interesting, I'll see if this is currently
> > technically possible, and if so, I'll propose this to be implemented.
> >
> > Auke
> 
> Christer, I've suggested a "post-only" list for meego.com but I'm not
> sure how GNOME does it. Do you know how it works?

Mailman since recent versions allows you to configure the
accept_these_nonmembers to allow members of another mailing list. So our
current patch does exactly that, see mailman-2.1.10-post-only.patch.

Due to the new functionality, you could even write a cron script to
ensure all the mailing lists have @post-only in the
accept_these_nonmembers configuration. For an example cron script you
could use one of our scripts as an example:
http://git.gnome.org/browse/sysadmin-bin/tree/mail/mailman-moderated-lists

Older mailman versions didn't allow accept_these_nonmembers to contain a
mailing list. So we at one point used something which you can find in
mailman-2.1.5-post-only.patch. Note that this way allows people in
post-only to bypass certain checks. In practice, people in post-only
could post to moderated mailing lists without it going through the
moderation stage. Somewhat annoying for replies to announce lists. This
only for 2.1.5 patch, the 2.1.10 one doesn't have this problem.

-- 
Regards,
Olav
--- mailman-2.1.10/Mailman/Handlers/Moderate.py.post-only	2008-04-21 18:28:22.000000000 +0000
+++ mailman-2.1.10/Mailman/Handlers/Moderate.py	2008-06-07 09:36:09.000000000 +0000
@@ -90,7 +90,11 @@
         sender = msg.get_sender()
     # From here on out, we're dealing with non-members.
     listname = mlist.internal_name()
-    if matches_p(sender, mlist.accept_these_nonmembers, listname):
+    # Accept post-only members only if non-members aren't held by default
+    accept_these_nonmembers = mlist.accept_these_nonmembers[:]
+    if mlist.default_member_moderation == 0:
+        accept_these_nonmembers.append('@post-only')
+    if matches_p(sender, accept_these_nonmembers, listname):
         return
     if matches_p(sender, mlist.hold_these_nonmembers, listname):
         Hold.hold_for_approval(mlist, msg, msgdata, Hold.NonMemberPost)
--- mailman-2.1.5/Mailman/Handlers/Moderate.py.orig	2004-05-19 19:29:46.000000000 +0000
+++ mailman-2.1.5/Mailman/Handlers/Moderate.py	2004-05-19 19:33:43.000000000 +0000
@@ -24,6 +24,8 @@
 from Mailman import mm_cfg
 from Mailman import Utils
 from Mailman import Message
+from Mailman import MailList
+from Mailman import MemberAdaptor
 from Mailman import Errors
 from Mailman.i18n import _
 from Mailman.Handlers import Hold
@@ -44,6 +46,15 @@
 
 
 
+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') or msgdata.get('fromusenet'):
         return
@@ -89,6 +100,8 @@
     # From here on out, we're dealing with non-members.
     if matches_p(sender, mlist.accept_these_nonmembers):
         return
+    if CheckPostOnly(sender):
+        return
     if matches_p(sender, mlist.hold_these_nonmembers):
         Hold.hold_for_approval(mlist, msg, msgdata, Hold.NonMemberPost)
         # No return


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]