[Mailman-Users] Passing the list name to the cgi scripts, called with backticks in Perl

Mark Sapiro msapiro at value.net
Tue Jul 17 20:40:59 CEST 2007


BobLaJolla wrote:
> 
>My problem is, to get any list-specific output from the  mailman/cgi-bin/* 
>scripts, I need to be able to pass the listname to the script  - and I can't 
>figure out how to do this with the shell command.  If  I follow the standard 
>syntax from the web (e.g.  `/usr/local/mailman/cgi-bin/listinfo/somelist`) the 
>shell looks for a  non-existent program in the non-existent listinfo directory 
>(listinfo is,  of course, a script).
> 
>Using the scheme outlined above, how can I pass the listname to the  various 
>cgi-bin scripts from mailman to capture their list-specific output for  
>customized pages?  


You need to do what your web server does. Namely, in the above example,
it sets

PATH_INFO='/somelist'

in the environment it passes to the CGI. In general, an HTTP GET for a
URL like <http://example.com/mailman/wrapper/more/stuff?query> will
result in the web server setting

PATH_INFO='/more/stuff'
QUERY_STRING='query'

(and a bunch of other stuff, most of which we don't look at) in the
environment it passes to the wrapper.

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



More information about the Mailman-Users mailing list