more comments on Fedora Core

shrek-m at gmx.de shrek-m at gmx.de
Sun Sep 28 20:18:20 UTC 2003


Gordon Messmer wrote:

> shrek-m at gmx.de wrote:
>
>> Elton Woo wrote:
>>
>>> 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. 


and i could bet that the order of lines does matter  ;-)

192.168.0.100   horseshit
192.168.0.101   horseshit
192.168.0.200   bullshit
192.168.0.201   bullshit

$ ping horseshit
PING horseshit (192.168.0.100) from 192.168.0.10 : 56(84) bytes of data.

$ ping bullshit
PING bullshit (192.168.0.200) from 192.168.0.10 : 56(84) bytes of data.

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


thanks for the clarification.

since rhl 6.x i could always solve the long sendmail startup with

127.0.0.1   hostname hostname.localdomain localhost localhost.localdomain

without "search localdomain" in /etc/resolv.conf


-- 
shrek-m





More information about the fedora-test-list mailing list