On 6/22/2010 11:51 AM, Michael Anderson wrote:
I have several lists on the same server, all with the same domain name.
I currently have a public "listinfo" page which displays only selected
lists that have the "advertise" option enabled.
How can I set up a second private (protected with .htaccess) page which
shows all of the lists?
Mike, if it was me I'd do the following:
* Set up the directory you want the page to be in, with the .htaccess
protection you want
* Set up an index.html page there that uses Apache's server side include
mechanism to include index.inc, with something like:
<p>We have the following mailing lists:</p>
<ul>
<!--#include virtual="index.inc" -->
</ul>
* Then do the following, either manually or probably more likely on a
regular basis via cron:
rm -f /path/to/index.inc; ls -1 /var/lib/mailman/archives/private |
egrep -v mbox | perl -ne 'chomp; s#/$##; print qq^<li><a
href="/mailman/listinfo/$_">$_</a></li>\n^;' >> /path/to/index.inc
(with that ls -1 command being all on one line)
There are a lot of assumptions there, for example that your archive
directory is in /var/lib/mailman/archives, that no one will access the
page in the very small time between the rm and the ls/perl, etc.
You could make it fancier (such as writing to a temp file and then
moving over the original inc file), but for me the above would probably
be "good enough".
hope this helps,
Anthony
------------------------------------------------------
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe:
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org