[ale] Reply-To controversy: a solution

Chris Farris chrisf at primeharbor.com
Tue Apr 22 07:39:52 EDT 2003


I would have responded sooner, but I was in NY then bit by that charter
outage yesterday.

I have a problem in (1) - a new mailing list just means there would be
twice as many things I need to do and won't get around to. 

If you send me a patch for reply-to munging on a per-user basis I would
consider it, but two lists is a bad idea.

Chris

On Mon, 2003-04-21 at 12:27, Joseph Knapka wrote:
> Hi folks,
> 
> Attached are two small patches to the Mailman 2.1.1 source that permit
> the ale-no-reply-to list scheme to work without requiring that the
> lists allow posts from nonsubscribers.  Once these are applied, the
> behavior of the list management UI's Privacy Options --> Sender
> Filters --> accept_these_nonmembers attribute changes: you may add an
> entry of the form "^+listname" in order to permit anyone subscribed to
> "listname" to post to the list being managed.
> 
> Apply the Moderate.py.diff patch to the file
> $mailman_install_dir/Mailman/Handlers/Moderate.py. This patch
> implements the additional moderation policy:
> 
>   mailman at localhost$ cd /usr/local/mailman/Mailman/Handlers
>   mailman at localhost$ patch < /path/to/Moderate.py.diff
> 
> Apply the GUIBase.py.diff patch to the file
> $mailman_install_dir/Mailman/Gui/GUIBase.py. This patch relaxes the
> input validation on the management screens to allow entries of the
> form ^+listname:
> 
>   mailman at localhost$ cd /usr/local/mailman/Mailman/Gui
>   mailman at localhost$ patch < /path/to/GUIBase.py.diff
> 
> Once these patches are applied, restart the Mailman queue-runner
> (mailmanctl stop ; mailmanctl start). Then apply this recipe, which is
> nearly identical to the one I previously posted:
> 
> (1) Create a new Mailman list, ale-no-reply-to at ale.org
> 
> (2) Configure ale-no-reply-to as follows (options named as per
> the Mailman WWW interface):
> 
>   . General Options/first_strip_reply_to = Yes
>   . General Options/reply_goes_to_list = Poster
>   . Non-Digest Options/msg_footer = [Nothing, nada, empty set, make it blank]
>   . Digest Options/digest_footer = [Nothing, nada, empty set, make it blank]
>   . Privacy Options/Sender Filters/accept_these_nonmembers = ^+ale
>   . Privacy Options/Recipient Filters/acceptable_aliases = ale
> 
> All other options may be left at their default values, or changed
> as needed (though I'm not certain changing some other options won't
> mess up this cunning plan; YMMV, etc).
> 
> (3) Change the configuration of ale at ale.org to accept posts from
> subscribers to ale-no-reply-to:
> 
>   . Privacy Options/Sender Filters/accept_these_nonmembers = ^+ale-no-reply-to
> 
> (4) Subscribe ale-no-reply-to at ale.org to ale at ale.org:
> 
> $mailman_home/bin/add_members -r - -w n ale <RETURN>
> ale-no-reply-to at ale.org <RETURN>
> ^D
> 
> 
> That's it. All that remains is for subscribers to resubscribe to
> the no-reply-to list, if that's what they want to do.
> 
> 
> Cheers,
> 
> -- Joe Knapka
> 
> 
> "Jim Popovitch" <jimpop at yahoo.com> writes:
> 
> > > -----Original Message-----
> > > From: Joseph Knapka
> > > Sent: Sunday, April 20, 2003 11:26 PM
> > > 
> > >  (3) Change the configuration of ale at ale.org to accept posts 
> > >    from nonsubscribers
> > 
> > That is a dangerous thing to do.  An alternative would be to have 
> > the ale-no-reply-to at ale.org members subscribe to ale at ale.org as
> > normal users and to set the no-mail flag for them.
> > 
> > -Jim P. 
> > 
> > 
> > 
> > _______________________________________________
> > Ale mailing list
> > Ale at ale.org
> > http://www.ale.org/mailman/listinfo/ale
> 
> ===File /usr/local/mailman/Moderate.py.diff=================
> --- /usr/local/mailman/src/mailman-2.1.1/Mailman/Handlers/Moderate.py	2002-12-30 20:28:41.000000000 -0700
> +++ Moderate.py	2003-04-21 09:43:18.000000000 -0600
> @@ -16,7 +16,6 @@
>  
>  """Posting moderation filter.
>  """
> -
>  import re
>  from email.MIMEMessage import MIMEMessage
>  from email.MIMEText import MIMEText
> @@ -28,6 +27,7 @@
>  from Mailman.i18n import _
>  from Mailman.Handlers import Hold
>  from Mailman.Logging.Syslog import syslog
> +import Mailman.MailList
>  
>  
>  
> @@ -115,14 +115,27 @@
>  
>  
>  def matches_p(sender, nonmembers):
> -    # First strip out all the regular expressions
> -    plainaddrs = [addr for addr in nonmembers if not addr.startswith('^')]
> +    # First do list inclusions.
> +    incAdd = []
> +    for linc in nonmembers:
> +        if linc.startswith('^+'):
> +            otherListName = linc[2:]
> +            try:
> +                otherList = Mailman.MailList.MailList(otherListName,lock=0)
> +                otherMembers = otherList.getMembers()
> +                incAdd = incAdd + otherMembers
> +            except:
> +                syslog.write("Moderator","Could not process list inclusion%s"%otherListName)
> +                pass
> +    nonmembers = nonmembers+incAdd
> +    # Strip out all the regular expressions and list inclusions
> +    plainaddrs = [addr for addr in nonmembers if not addr.startswith('^')] 
>      addrdict = Utils.List2Dict(plainaddrs, foldcase=1)
>      if addrdict.has_key(sender):
>          return 1
>      # Now do the regular expression matches
>      for are in nonmembers:
> -        if are.startswith('^'):
> +        if are.startswith('^') and not are.startswith('^+'):
>              try:
>                  cre = re.compile(are, re.IGNORECASE)
>              except re.error:
> ============================================================
> 
> ===File /usr/local/mailman/GUIBase.py.diff==================
> --- /usr/local/mailman/src/mailman-2.1.1/Mailman/Gui/GUIBase.py	2002-08-14 18:02:27.000000000 -0600
> +++ GUIBase.py	2003-04-21 07:16:55.000000000 -0600
> @@ -73,10 +73,11 @@
>                      # See if this is a context that accepts regular
>                      # expressions, and that the re is legal
>                      if wtype == mm_cfg.EmailListEx and addr.startswith('^'):
> -                        try:
> -                            re.compile(addr)
> -                        except re.error:
> -                            raise ValueError
> +                        if not addr.startswith('^+'):
> +                            try:
> +                                re.compile(addr)
> +                            except re.error:
> +                                raise ValueError
>                      else:
>                          raise
>                  addrs.append(addr)
> ============================================================
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list