[Mailman-Developers] Piping Mailman's HTML through PHP

Fil fil at rezo.net
Fri Jul 23 10:05:50 CEST 2004


> Right now I moved all the programs in
> /usr/local/mailman/cgi-bin to
> /usr/local/mailman/cgi-bin.orig, then created shell
> scripts in cgi-bin that look like this:
> 
> --- start file: listinfo ---
> #!/bin/sh
> 
> ../cgi-bin.orig/listinfo | /usr/bin/php
> --- end file: listinfo ---
> 
> That's all there is to it.  Now I can add PHP directives
> in Mailman's HTML code, and they get parsed.

And what if I send an HTML file to your list with php code included? You get
a security issue here.

Better way in my view is to write a wrapper script in php, that does the
graphics and such things, then pushes the web page. You get the wrapper to
work in lieu of the cgi by configuring Apache to do so (RewriteRule, or
Alias).

-- Fil



More information about the Mailman-Developers mailing list