Red Hat Bugzilla – Bug 65897
Hostname is, when set via dhcpcd, not FQDN
Last modified: 2007-04-18 12:42:54 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.4.9-31SGI_XFS_1.1 i686)
Description of problem:
When an interface is configured via dhcpcd, the hostname is set if there was no
hostname set before except localhost or localhost.localdomain. The problem is
that the hostname is not set as FQDN. Several services want an FQDN to start up
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Configure interface as 'dhcp'
2. set HOSTNAME=localhost.localdomain in /etc/sysconfig/network
Actual Results: hostname should be set to
Expected Results: hostname is set to
hostname -f shows the full name.
The hostname should be set to FQDN because many services refuse to start up if
hostname does not contain FQDN (postfix is an example here).
There are people using corporate servers with DHCP :)
postfix needs fixing! :) Can you give any other examples of packages that have a
problem with hostname != FQDN?
It's an error if FQDN cannot be determined (and the hostname is always involved
in this process) but it's not an error for hostname != FQDN to be true.
Hm, IIRC there were other services as well in the past but you're right, on
current systems it's only postfix. Nevertheless I think there is a reason why
postfix does it this way? If you install a system without hostname, the RedHat
installer configures localhost.localdomain and not only localhost for hostname.
Of course, it's not an error but is there a reason why not to change the
There are bound to be systems where hostname != FQDN even without dhcpcd's help, so
it would seem logical to fix postfix instead of dhcpcd.
Bero, you own postfix, any ideas on why it behaves as it does?
Reassigning to postfix, hostname != FQDN is not a bug.
I'm going to close this bug out. This is the way postfix works, its
been that way for a long time. If gethostname does not return a FQDN
there is a trival workaround, you can set $mydomain in
I suppose we could patch things so we call gethostbyaddr if
gethostname does not return a FQDN, but what happens in the case were
there is more than one network? Which address do we use? Plus then we
have a non-standard implementation. Nah, seems to me the right answer
in these corner cases is to use the config file, that's what its there