[Mailman-Users] Password reminder on private archive login page

Mark Sapiro mark at msapiro.net
Tue Jul 21 05:20:22 CEST 2009

liste yoneticisi wrote:
>I have two main questions.
>First; We once asked about adding password reminder to private archive
>login page. We tried some modifications but couldn't succeed. I copied the
>previous correspondence below.
>>Can I put the password reminder on private archive login page? So that,
>>list members who want to see the archive, but do not remember their
>>passwords, can quickly learn their passwords. Otherwise, password
>>reminder is too hard to find using the links on general list info page..
>This is a good idea. I think I'll implement it for Mailman 2.2.
>What needs to be done is the reminder button has to be added to the
>private.html archive login template and code needs to be added to
>Mailman/Cgi/private.py to recognize the button and send the reminder.
>You can look at Mailman/Cgi/options.py for how it's done there.
>I have added the following lines to
>        print Utils.maketext(
>            'private.html',
>            {'action'  : Utils.websafe(action),
>             'realname': mlist.real_name,
>             'message' : message,
>             }, mlist=mlist)
>        return
>### My Lines 7/4/2009 Eklenti baslangic
>    if cgidata.has_key('emailpw'):
>        mlist.MailUserPassword(user)
>        options_page(
>            mlist, doc, user, cpuser, userlang,
>            _('A reminder of your password has been emailed to you.'))
>        print doc.Format()
>        return
>### My Lines 7/4/2009 Eklenti bitis
>    lang = mlist.getMemberLanguage(username)
>    i18n.set_language(lang)
>    doc.set_language(lang)
>    # Authorization confirmed... output the desired file
>    try:
>        ctype, enc = guess_type(path, strict=0)
>But nothing changed.:-(

There are several things wrong with the above.

You have copied the wrong code from options.py. That code processes the
reminder button from the logged-in options page (I'm not sure why
there is a reminder there, but the list admin could use it to send a
reminder to the user). You want the code that follows the comment

    # Are we processing a password reminder from the login screen?

but if you copy it verbatim as you did with the other, you'll have the
problem that it calls the function loginpage() just as the above calls
options_page() and those functions are local to the options.py module
and undefined in private.py. You don't want to call either of those.

The final problem is you've inserted your code in the wrong place. You
put it where it is only reached if the user is already authenticated
or provided a valid authentication.

>What else can we do about it?

Find someone who knows some Python to do this for you.

You can try the insert in the attached reminder.txt file, but note that
this is untested and may cause problems.

>Mailman version is 2.1.9
>The second question is about vesion upgrade.
>Mailman, in our system, is running on Debian.
>Python version is 2.4.4
>I heard that 2.1.12 doesn't work properly on 2.4.4 but I am informed that
>the newer version of Python  doesn't exist on Debian Package.
>It seems difficult to upgrade under these circumstances.
>What are the major differences between the Mailman versions 2.1.9 and
>2.1.12 with regard to security, usability?


Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: reminder.txt
URL: <http://mail.python.org/pipermail/mailman-users/attachments/20090720/47ea6b2d/attachment-0001.txt>

More information about the Mailman-Users mailing list