[Mailman-Users] DEFAULT_HOSTNAME? (fwd)

eric-mailman at pretorious.net eric-mailman at pretorious.net
Fri Sep 28 09:56:40 CEST 2001


On Tue, 25 Sep 2001, Greg Ward wrote:

> One possibility is to see what the system resolver thinks your hostname
> is.  Try this:
>
>   $ python
>   Python 2.1 (#2, May  8 2001, 10:50:59)
>   [GCC 2.95.2 20000220 (Debian GNU/Linux)] on linux2
>   Type "copyright", "credits" or "license" for more information.
>   >>> from socket import *
>   >>> gethostname()
>   'cthulhu'
>   >>> gethostbyname("cthulhu")
>   '127.0.0.1'
>   >>> gethostbyname_ex("cthulhu")
>   ('cthulhu', ['localhost'], ['127.0.0.1'])
>
> On my system, this is all determined by /etc/hostname and /etc/hosts:
>
>   $ cat /etc/hostname
>   cthulhu
>   $ head -1 /etc/hosts
>   127.0.0.1       cthulhu localhost
>
> One thing that *might* work is to add your FQDN to /etc/hosts, so the
> resolver in libc (which is what Python's socket.gethost*() functions
> use) knows about it.

Greg:

Thanks for the suggestions.

Before configuring Mailman this time, I used `hostname www` and
`domainname funkYmonkeybutt.com` to set these values. I also entered the
FQDN "www.fuNkymonkeybutt.com" in /etc/hosts. (Again, pay special
attention capitalization...)

Using the python functions that you used above, gethostname() returned
"www" and gethostbyname("www") returned the system's IP address.

Mailman, though, failed to take the bait and instead used the
pretorious.net values [from a reverse-DNS of pretorious.net I suppose] in
the blue banner across the top of the cgi-bin/admin page. From somewhere -
only God knows where - Mailman found the FQDN that I had intended and used
it in the blue banner across the top of the cgi-bin/listinfo page. (The
FQDN doesn't have any of the upper-case typing that I've been using in
order to identify where Mailman is getting its info so I am still
stumped!)

Thanks, again.

-- 
Eric P.
Los Gatos, CA





More information about the Mailman-Users mailing list