Bug 65897 - Hostname is, when set via dhcpcd, not FQDN
Summary: Hostname is, when set via dhcpcd, not FQDN
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: postfix (Show other bugs)
(Show other bugs)
Version: 7.2
Hardware: i386 Linux
Target Milestone: ---
Assignee: John Dennis
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2002-06-03 21:22 UTC by Simon Matter
Modified: 2007-04-18 16:42 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-02-24 22:41:19 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Simon Matter 2002-06-03 21:22:35 UTC
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):

How reproducible:

Steps to Reproduce:
1. Configure interface as 'dhcp'
2. set HOSTNAME=localhost.localdomain in /etc/sysconfig/network
3. Restart

Actual Results:  hostname should be set to

Expected Results:  hostname is set to

Additional info:

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 :)

Comment 1 Elliot Lee 2002-06-12 11:52:47 UTC
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.

Comment 2 Simon Matter 2002-06-12 14:55:44 UTC
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

Comment 3 Elliot Lee 2002-06-12 17:11:24 UTC
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?

Comment 4 Elliot Lee 2002-06-20 16:34:01 UTC
Reassigning to postfix, hostname != FQDN is not a bug.

Comment 5 John Dennis 2004-02-24 22:41:19 UTC
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

Note You need to log in before you can comment on or make changes to this bug.