When I run the command hostname
(on Ubuntu 10.04 LTS Server) it returns 'mail.mydomain.com'
When I run hostname -f
I get 'mail' as a response.
These seem backwards to me, shouldn't hostname -f
return the FQDN? Where did I misconfigure this?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityWhen I run the command hostname
(on Ubuntu 10.04 LTS Server) it returns 'mail.mydomain.com'
When I run hostname -f
I get 'mail' as a response.
These seem backwards to me, shouldn't hostname -f
return the FQDN? Where did I misconfigure this?
Yes, hostname -f
should return the FQDN. Try:
/etc/hostname
put the "short" hostname (mail
). /etc/resolv.conf
put domain mydomain.com
.There are probably other ways to do it; that's just how I have my system configured (and it seems to work).
mail
instead of the FQDN. I did add domain mydomain.com
to resolv.conf as well. (Rebooted for good measure to test too. :)
Jul 25, 2011 at 2:45
/etc/hosts
and add an entry there, if appropriate. Let us know!
127.0.0.1 mail.mydomain.com mail
:) Thank you for the help, couldn't have done this without you!
Jul 25, 2011 at 2:51