Bug 65897 - Hostname is, when set via dhcpcd, not FQDN
Hostname is, when set via dhcpcd, not FQDN
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: postfix (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: John Dennis
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-06-03 17:22 EDT by Simon Matter
Modified: 2007-04-18 12:42 EDT (History)
1 user (show)

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


Attachments (Terms of Use)

  None (edit)
Description Simon Matter 2002-06-03 17:22:35 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
properly.

Version-Release number of selected component (if applicable):


How reproducible:
Always

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
xxl.abc.mycompany.com


Expected Results:  hostname is set to
xxl


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 07:52:47 EDT
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 10:55:44 EDT
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
behaviour?
Comment 3 Elliot Lee 2002-06-12 13:11:24 EDT
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 12:34:01 EDT
Reassigning to postfix, hostname != FQDN is not a bug.
Comment 5 John Dennis 2004-02-24 17:41:19 EST
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
/etc/postfix/main.cf.

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
for.

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