On Fri 24 May 2024 at 13:40:38 (-0400), Jeffrey Walton wrote:
> On Fri, May 24, 2024 at 11:13 AM Paul M Foster <pa...@quillandmouse.com> 
> wrote:
> >
> > Folks:
> >
> > In my /etc/hosts file, there's a line:
> >
> > 127.0.1.1 yosemite.mars.lan yosemite
> >
> > I think Debian put it there.
> >
> > Later in the file, I've got:
> >
> > 192.168.254.30  yosemite.mars.lan   yosemite
> >
> > So there are two entries for the same (my) machine. Is this a problem?
> > Specifically, could it cause problems with email (Exim4 or OpenSMTPD)?
> 
> 127.0.1.1 is traditionally used for the fully qualified domain name
> (fqdn). So I would expect to see 'yosemite.mars.lan', but not
> 'yosemite'.
> 
> Also, fqdn's end in dot '.' to denote the top of the dns tree. So I
> would expect to see 'yosemite.mars.lan.' (note the trailing dot), and
> not 'yosemite.mars.lan' (note the lack of the trailing dot). What can
> happen with 'yosemite.mars.lan' is, search domains can be added to it.
> So if dhcp says 'isp.com' is a search domain, then your network stack
> might make requests for 'yosemite.mars.lan.isp.com'.

You must have a very unusual hosts file then, on both those counts.

I would expect just the 127.0.1.1 line as written, and I'm going to
guess that the 192.168.254.30 line was added as a misguided attempt
to get LAN mail working. As noted by others, /etc/hosts is not the
correct place for that.

Cheers,
David.

Reply via email to