[Mailman-Developers] Disabling confirm on unsubscription 2.1b4

Links at Momsview links@momsview.com
Fri Nov 15 05:31:47 2002


I am running a list using 2.1b4 with open subscribe (ALLOW_OPEN_SUBSCRIBE=1
and DEFAULT_SUBSCRIBE_POLICY = 0)
I would like to also allow the equivalent of "open" unsubscriptions by
turning off confirmations.  I already have DEFAULT_UNSUBSCRIBE_POLICY = 0
but realized I would have to hack the code to do what I wanted (turn off
confirmations).

>From what I have gathered, the code of interest is in the cmd_unsubscribe.py
module in mailman/Mailman/Commands directory.

Below is the relevent section of code from cmd_unsubscribe.py
with my changes (commented out lines of code) clearly indicated:
---------------------------------------------
    # If we're doing admin-approved unsubs, don't worry about the password
    if mlist.unsubscribe_policy:
        try:
            mlist.DeleteMember(address, 'mailcmd')
        except Errors.MMNeedApproval:
            res.results.append(_("""\
Your unsubscription request has been forwarded to the list administrator for
approval."""))
#   elif password is None:
        # No password was given, so we need to do a mailback confirmation
        # instead of unsubscribing them here.
#       cpaddr = mlist.getMemberCPAddress(address)
#       mlist.ConfirmUnsubscription(cpaddr)
#       res.results.append(_('A removal confirmation message has been
sent.'))
#   else:
        # No admin approval is necessary, so we can just delete them if the
        # passwords match.
#       oldpw = mlist.getMemberPassword(address)
#       if oldpw <> password:
#           res.results.append(_('You gave the wrong password'))
#           return STOP
        mlist.ApprovedDeleteMember(address, 'mailcmd')
        res.results.append(_('Unsubscription request succeeded.'))
----------------------------------------------------------
This was just a quick hack that I intended to replace with a formal mm_cfg
controlled option once I verified that it worked.
To my suprise IT DIDN'T DISABLE THE CONFIRM even though the code was
commented out.

I made these changes in the untarred source in
/mailman-2.1b4/Mailman/Commands/ and did:
make clean
./configure
make install
I verified that the new .py and .pyc files made it to
/mailman/Mailman/Commands in the installation directory.

Can anyone tell me what I'm doing wrong?
Thank you in advance.






More information about the Mailman-Developers mailing list