[Mailman-Developers] Marc Perkel's Feature Wish List

Owen Taylor otaylor@redhat.com
02 Jan 2002 21:03:50 -0500


--=-=-=


Marc Perkel <marc@perkel.com> writes:

> User Aliases
> -------------
> I'd like to be able to enter (and/or allow the user to enter) other
> email addresses that if they sens email from the other address they have
> the same membership privileges as the original member email address.
> Thus if gnu@eff.org is in the list but the email comes from gnu@toad.com
> then it is treated the same. Ideally - the user could make these aliases
> and it would apply to all lists the user is a member of.

What we do for gnome.org is allow people to subscribe addresses to
post-only@gnome.org, and any address subscribed to post-only@gnome.org
can post to any list without being subscribed to it.

(Trivial and hackish patch against 2.0.x attached)

Low tech, but works.

Regards,
                                        Owen


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
  filename=mailman-2.0beta5-postonly.patch
Content-Description: Patch for post-only list

--- 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)

--=-=-=--