[Mailman-Users] DEFAULT_HOSTNAME? (fwd)
Greg Ward
gward at mems-exchange.org
Tue Sep 25 20:25:16 CEST 2001
On 25 September 2001, eric-mailman at pretorious.net said:
> <sarcasm>Given the overwhelmingly thorough documentation that comes with
> Mailman, I can't imagine why anyone would experiment with anything that
> remotely resembles a glimpse of hope but isn't referenced in the
> documentation.</sarcasm>
I can sympathize. I don't like underdocumented software either.
> So do you have any answers? Or just bullets to shoot holes in my [futile]
> attempts to get Mailman to function logically?
No, sorry, I should have mentioned I didn't have any useful ideas -- I
just know that using cross-compilation options won't have much effect.
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
(NB. gethostbyname_ex() returns the canonical hostname, a list of
aliases, and a list of IP addresses.)
You might also want to see what the kernel thinks the hostname is:
>>> os.uname()[1]
'cthulhu'
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
More information about the Mailman-Users
mailing list