<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Glenn Steen wrote:
<blockquote
cite="mid:223f97700908060753h91db832j85fa43235f21f8cb@mail.gmail.com"
type="cite">
<pre wrap="">2009/8/6 Erik Bloodaxe <a class="moz-txt-link-rfc2396E" href="mailto:E.Bloodaxe@gold.ac.uk"><E.Bloodaxe@gold.ac.uk></a>:
</pre>
<blockquote type="cite">
<pre wrap="">Julian Field wrote:
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">
# grep Hostname /opt/MailScanner/etc/MailScanner.conf
# definition of "Hostname" for an example.
# Hostname = the %org-name% ($HOSTNAME) MailScanner
#Hostname = the %org-name% ($HOSTNAME) MailScanner
Hostname = the %org-name% MailScanner (on $HOSTNAME)
And HOSTNAME cones out as blank.
</pre>
</blockquote>
<pre wrap="">Unfortunate.
</pre>
</blockquote>
<pre wrap="">Am I to conclude that there is no solution then?
Erik
</pre>
</blockquote>
<pre wrap=""><!---->
Erik,
I suspect you may not have set your host(s) name(s) correctly
(inferred from your first comment). Setting it can differ a bit
depending on the rc-scripts involved, but on most RH-type installs you
either have to correctly set up nsswitch.cnf (and friends, for yp/NIS
"disabed" systems:-) or the /etc/sysconfig/network file (simply put a
line with HOSTNAME=<your hosts FQDN> in there). If you haven't done
that, gethostbyname or gethostname will fail to return the name and
thus give the result you see.
An alternative (if CentOS 5.3 has changed things in a drastic way:-)
would be to call hostname (see the manpage) in /etc/rc.local, but...
This has been like this for ages, so I suspect you wouldn't need to.
Having either the NIS stuff correct, or the file (if you don't use NIS
for this), will make some appropriate rc-script run the hostname
command for you upon reboot... So, as usual, you don't really need
reboot, just fix the config and run the command by hand.
As usual, especially when I'm fresh back from vacation, I might be
totally wrong;-).
Cheers
</pre>
</blockquote>
the hostname command produces the right output so the hostname was set
up correctly during install.<br>
Curiously uname -a and hostname work despite
HOSTNAME=localdomain.localhost in /etc/sysconfig/network.<br>
<br>
This is a realy simple standard out of the box RH install.<br>
<br>
I solved it as suggested by adding a <br>
HOSTNAME=`/bin/hostname`<br>
export HOSTNAME<br>
<br>
to the start up script, but this should work out of the box.<br>
<br>
I suspect this is related to the various diffrent notions of domain and
host name under Linux (solaris is simpler here)<br>
on the box the dns domain name is set but the domiain name not!<br>
<br>
Erik<br>
<br>
</body>
</html>