[Logcheck-users] hostname problem
David Nicholls
hagakure@nildram.co.uk
Tue, 31 May 2005 20:19:56 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello There,
I'm using logcheck 1.2.39 on Debian Sarge.
On the emails I am getting from logcheck, some of the servers are not
correctly reporting their hostnames. There is no obvious difference in
the configuration of the servers that report the correct hostname and
those that don't.
I took a looksee at the /usr/sbin/logcheck code and see that the
relevant section is:
# Get the details for the email message
# Hostname either fully qualified or not.
if [ -z "$FQDN" ]; then
HOSTNAME="$(hostname --short)"
else
HOSTNAME="$(hostname --fqdn)"
fi
Trying commands directly from the command line:
hostname gives officefirewall
hostname --short gives localhost
hostname --fqdn gives localhost.localdomain
I just wondered if anyone had an idea asto what the problem might be.
Thanks,
Dave
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFCnLjc62r58u1gKlkRAmO2AJ9j6EcnEA6uVHh2IfEnSlQIJBpnTACgypdQ
QZqq+Bo4cx8XKecCL9tFZdU=
=udTK
-----END PGP SIGNATURE-----