[Mailman-Developers] CGI variables question - hostname used in URL

Ken Manheimer klm@python.org
Tue, 12 May 1998 18:46:11 -0400 (EDT)

As i mentioned in my sendmail question, i have someone that will need
to run mailman to handle multiple lists in different domains.
(Thanks, scott, for the pointer to sendmails ruleset 1 - i'll be able
to point the system guys in the right direction.)  It looks like
mailman handles that just fine, *except* for one addition i had made.

The overarching listinfo and admin pages, which provide the roster of
lists on the system, need to show only the (advertised) lists for that
virtual system - not the ones that are effectively on a different
system.  My problem is that i seem to have only a server-specific
mechanism for getting the hostname part of the URL by which the script
was visited, and i'm wondering whether there's a more general way.

Running apache (1.2.0), i see that HTTP_HOST has the info i need, and
can compare that with the list's host_name (checking whether one
includes the other or vice versa), excluding those lists that do not.
However, it does not look like HTTP_HOST is by any means universal.

The provisional thing i've implemented is to just ignore the list's
host_name setting if no HTTP_HOST env var is found, and show all
advertised lists in that case.  What i'm wondering is whether there
are other variable names i should check for other servers, or some
more general mechanism.

(It's nice to have a bunch of knowledgeable people on the list to tap
into for info, btw.)