I've developped a few php scripts for the users of some of my lists, what I need is to have only users effectively subscribed and authenticated to the lists to be able to use the scripts.
I also need to know what is the user's login in the php scripts.
Is there a way to do that , either by reproducing the mailman auth process in php or by reusing the mailman cookie ?
Anyone has already done that or knows of a way to do that ?
thanks
"timduru" == <timduru@timduru.org> writes:
timduru> I've developped a few php scripts for the users of some
timduru> of my lists, what I need is to have only users
timduru> effectively subscribed and authenticated to the lists to
timduru> be able to use the scripts.
timduru> I also need to know what is the user's login in the php
timduru> scripts.
timduru> Is there a way to do that , either by reproducing the
timduru> mailman auth process in php or by reusing the mailman
timduru> cookie ?
timduru> Anyone has already done that or knows of a way to do that
timduru> ?
I'm not aware of anybody doing that, but in Mailman 2.1, you could hook into the membership API to extract a given user's password. In Mailman all user passwords are kept in cleartext in the config.pck file. Site admin and list admin passwords are not, so that's why you can't get a reminder for a forgotten list admin password.
You could certainly reuse the Mailman cookie code, or protocol. See SecurityManager.py for details of how it works.
-Barry
On Thu, Oct 25, 2001 at 02:12:09AM -0400, Barry A. Warsaw wrote:
"timduru" == <timduru@timduru.org> writes:
timduru> I've developped a few php scripts for the users of some timduru> of my lists, what I need is to have only users timduru> effectively subscribed and authenticated to the lists to timduru> be able to use the scripts.
I did something similar to this except I was just checking for list membership instead of authenticating the passwd. I made a small withlist module that returned depending on whether the address was subscribed, and a suid mailman wrapper around withlist. It's not the clean solution but it works.
In case anyone is interested, this was done in order to have a web board interface to mailman lists. Mailman gates the lists to a local news server (leafnode). A heavily hacked set of php scripts called phnntp interfaces to the news server. It sends all posts back to the list instead of through the news server (leafnode doesn't do moderated groups), so moderation and other list features work. The previously mentioned withlist script makes sure that groups marked private will only be visible to subscribers of the mailing list.
It's convoluted but works well so far. Once I get around to it I would like to rewrite it for Zope, basically as an nntp reader that can authenticate users from Mailman.
-Adam
"AH" == Adam Hupp <hupp@upl.cs.wisc.edu> writes:
AH> It's convoluted but works well so far. Once I get around to
AH> it I would like to rewrite it for Zope, basically as an nntp
AH> reader that can authenticate users from Mailman.
Neat. You might also be interested in Mailman/Post.py from MM2.1. It provides a cleaner interface for external processes to post messages to Mailman lists (either directly via Python function call, or through a command line interface).
-Barry
participants (3)
-
Adam Hupp -
barry@zope.com -
timduru