Menu

#16 Auto Approval of subscriptions for certain domains

open-accepted
None
3
2007-08-19
2001-01-01
Mark Tearle
No

A patch to enable automatic approval for certain domains, eg people
in the example.com are automatically approved all others have to wait for the moderator

Discussion

  • Barry Warsaw

    Barry Warsaw - 2002-11-19
    • labels: 300100 --> 310391
    • priority: 5 --> 1
    • milestone: --> 172189
     
  • Thomas Wouters

    Thomas Wouters - 2003-03-11
    • priority: 1 --> 3
    • labels: 310391 -->
    • milestone: 172189 -->
     
  • Thomas Wouters

    Thomas Wouters - 2003-03-11

    Logged In: YES
    user_id=34209

    Is this still necessary with Mailman 2.1, which has more
    'automatic' options (as well as 'memberadaptors') ? In any
    case, the patch is likely heavily out of date by now, I'm
    moving this to Feature Requests for now. Feel free to
    respond if you (still) have a need.

     
  • Mark Sapiro

    Mark Sapiro - 2006-03-11
    • assigned_to: nobody --> msapiro
    • status: open --> pending-accepted
     
  • Mark Sapiro

    Mark Sapiro - 2006-03-11

    Logged In: YES
    user_id=1123998

    The attached patch is against a 2.1.8a1 installed base
    (installed because it patches Defaults.py and not
    Defaults.py.in). It is a modification and extension of the
    original patch. It implements a new list attribute
    'subscribe_auto_approval' which is a list of email addresses
    and regular expressions matching email addresses whose
    subscriptions are exempt from admin approval. It implements
    the original intent if one just uses regexps that match domains.

    This will go in Mailman 2.2, but it would be nice to get
    some feedback from people who are interested in this feature
    and are willing to try the patch.

     
  • Mark Sapiro

    Mark Sapiro - 2006-03-11

    Patch 2.1.8a1 to implement auto approval

     
  • Jim Popovitch

    Jim Popovitch - 2006-03-13

    Logged In: YES
    user_id=3142

    I've successfully applied this against a v2.1.8 system and
    it works well. Thanks!!

     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending-accepted --> closed-accepted
     
  • Jim Popovitch

    Jim Popovitch - 2006-07-31

    Logged In: YES
    user_id=3142

    New feature request for this patch, seeking feedback.

    Most of my lists automatically moderate new subscribers, in
    addition some require admin approval for subsciption, except
    for domains listed in subscribe_auto_approval. A nice
    addition to this patch would be to not moderate subscribers
    whose domains are listed in subscribe_auto_approval.

     
  • Mark Sapiro

    Mark Sapiro - 2007-08-19

    Logged In: YES
    user_id=1123998
    Originator: NO

    Reopened. Pending/closed was a mistake.

     
  • Mark Sapiro

    Mark Sapiro - 2007-08-19
    • status: closed-accepted --> open-accepted
     
  • Juan

    Juan - 2008-12-15

    Hi, i've applied the patch in 2.1.10, it works fine, but i had this error with the old lists:
    admin(11349): [----- Mailman Version: 2.1.10 -----]
    admin(11349): [----- Traceback ------]
    admin(11349): Traceback (most recent call last):
    admin(11349): File "/usr/local/mailman/scripts/driver", line 101, in run_main
    admin(11349): main()
    admin(11349): File "/usr/local/mailman/Mailman/Cgi/confirm.py", line 117, in main
    admin(11349): subscription_confirm(mlist, doc, cookie, cgidata)
    admin(11349): File "/usr/local/mailman/Mailman/Cgi/confirm.py", line 357, in subscription_confirm
    admin(11349): cookie, userdesc)
    admin(11349): File "/usr/local/mailman/Mailman/MailList.py", line 1222, in ProcessConfirmation
    admin(11349): not self.HasAutoApprovedSender(addr):
    admin(11349): File "/usr/local/mailman/Mailman/MailList.py", line 1506, in HasAutoApprovedSender
    admin(11349): if self.GetPattern(sender, self.subscribe_auto_approval):
    admin(11349): File "/usr/local/mailman/Mailman/MailList.py", line 147, in __getattr__
    admin(11349): raise AttributeError, name
    admin(11349): AttributeError: subscribe_auto_approval
    admin(11349): [----- Python Information -----]

    i've sorted this error, in the file MailList.py, in the line 1501:
    def HasAutoApprovedSender(self, sender):
    """Returns True and logs if sender matches address or pattern
    in subscribe_auto_approval. Otherwise returns False.
    """
    auto_approve = False
    try:
    if self.GetPattern(sender, self.subscribe_auto_approval):
    auto_approve = True
    syslog('vette', '%s: auto approved subscribe from %s',
    self.internal_name(), sender)
    except:
    return auto_approve
    return auto_approve

     
  • Mark Sapiro

    Mark Sapiro - 2008-12-15

    You don't need to patch MailList.py as you did. The real problem is this part of the patch.

    --- Mailman/Version.py 2006-03-10 09:56:54.000000000 -0800
    +++ Mailman/Version.py 2006-03-11 09:29:57.468750000 -0800
    @@ -36,7 +36,7 @@
    (REL_LEVEL << 4) | (REL_SERIAL << 0))

    # config.pck schema version number
    -DATA_FILE_VERSION = 96
    +DATA_FILE_VERSION = 97

    # qfile/*.db schema version number
    QFILE_SCHEMA_VERSION = 3

    This is intended to increment the DATA_FILE_VERSION in Version.py and in 2.1.8a1 it did that, but in Mailman 2.1.10, DATA_FILE_VERSION is already 97 so you have to increment it to 98 so that Mailman will detect that the existing config.pck data are not up to date and will run versions.Update which will add the subscribe_auto_approval attribute to the list.

     

Log in to post a comment.