more comments on Fedora Core
Gordon Messmer
yinyang at eburg.com
Sun Sep 28 12:17:03 UTC 2003
shrek-m at gmx.de wrote:
> Elton Woo wrote:
>
>> On September 27, 2003 08:08 pm, Dave Ashby <Dave Ashby
>> <dave.ashby at 1993.usna.com>> wrote:
>>
>>> Make sure the first line in your /etc/hosts file is 127.0.0.1 and your
>>> box name (technically FQN and then nickname). If you have other entries
>>> above it, sendmail will hang during boot.
>>
>> My /etc/hosts file:
>> # Do not remove the following line, or various programs
>> # that require network functionality will fail.
>> 127.0.0.1 localhost.localdomain localhost
>> 127.0.0.1 dhcp-133-74 localhost
>
> i think that the second line with 127.0.0.1 will be ignored
> try this, all in *one* line
>
> 127.0.0.1 dhcp-133-74 localhost.localdomain localhost
>
> and sendmail should start in a short time.
Horseshit, all of it. The order of lines in the hosts file doesn't
matter. All lines present will be processed.
Sendmail takes a long time to boot because it calls gethostbyname (or
something like it) for information on the addresses associated with the
local hostname. If all of the required data isn't in /etc/hosts, then
the resolver needs to do a DNS lookup on your hostname.
If your hostname is an FQDN, then that FQDN must appear in /etc/hosts.
If my hostname is "host1.example.com", then /etc/hosts should contain at
least these entries:
127.0.0.1 localhost.localdomain localhost
127.0.0.1 host1.example.com
If your hostname is *not* an FQDN, then your hosts file must contain
both the short version of the local hostname, and its FQDN, as the
resolver is going to search for it based on the "search" entry in
/etc/resolv.conf. If my hostname is "host1" and /etc/resolv.conf
contains the line "search example.com", then the file /etc/hosts must
have at least these entries:
127.0.0.1 localhost.localdomain localhost
127.0.0.1 host1.example.com host1
As long as your hosts file contains an entry for the local hostname, and
the FQDN (which should be the same thing), sendmail will not need to
consult DNS, and will start up properly.
More information about the test
mailing list