[gentoo-user] getting the right answer from `hostname --long'
Sun, 29 Jan 2006 06:46:09
Just trashed the mobo on my gentoo machine and reinstalled on a
different machine entirely.
I'm setting up sendmail... something I've done many times but each
time it has been a right pain in the butt. No exception this time...
I'm not running a mailserver, just a stand alone machine that
retrieves and sends my personal mail.
I've used sendmail successfully for 8-9 yrs and have no interest in
changing MTA's unless there is a very good reason.
In previous installs I haven't had this particular problem. Sendmail
and other apps complain of not finding a qualified host name.
I've always used a home-made host name (for 8-9 yrs now)...
in this case:
I've setup these files:
hosts - resolv.conf - /etc/conf.d/hostname - /etc/conf.d/domainname
I'm not running bind or anything involving /etc/nsswitch
Putting the right stuff in these has always done the trick but not
this time. I may be forgetting something:
127.0.0.1 localhost chub
192.168.x.xx chub.local.net0 chub # gentoo
nameserver 192.168.0.20 # Its a gateway router that queries
# IPS nameservers
# Set to the hostname of this machine
# When setting up resolv.conf, what should take precedence?
# If you wish to always override DHCP/whatever, set this to 1.
# To have a proper FQDN, you need to setup /etc/hosts and /etc/resolv.conf
# properly (domain entry in /etc/resolv.conf, and FQDN in /etc/hosts).
# This only set what /bin/hostname returns. If you need to setup NIS, meaning
# what /bin/domainname returns, please see:
With all this set the `hostname' command returns:
hostname --long localhost
I want to see `local.net0' not `localhost'... so does sendmail and
squid I think.
Can anyone spot what I've forgotten or messed up?
firstname.lastname@example.org mailing list