On Fri, May 24, 2024 at 05:22:13PM +0100, Joe wrote: > On Fri, 24 May 2024 11:40:30 -0400 > Greg Wooledge <g...@wooledge.org> wrote: > > > On Fri, May 24, 2024 at 05:22:14PM +0200, Marco Moock wrote: > > > Am 24.05.2024 um 17:17:45 Uhr schrieb to...@tuxteam.de: > > > > > > > On Fri, May 24, 2024 at 04:49:18PM +0200, Marco Moock wrote: > > > > > > > > [...] > > > > > > > > > If you operate mail servers, you must have a FQDN. .lan can't be > > > > > used for the global DNS stuff, so set a proper FQDN that > > > > > belongs to you. > > > > > > > > I think this is wrong in that sweeping generality. > > > > > > In the case it should communicate with other MTAs in the internet, > > > this will be true because many of them require a resolvable (also > > > reverse) FQDN in HELO/EHLO that matches the IPv4/IPv6 addresses of > > > the server. > > > > Most MTAs do not look in /etc/hosts when reading their configuration. > > Whatever name they identify with (in the HELO or EHLO command) comes > > from some MTA-specific configuration file. > > > > Thus, the contents of /etc/hosts are for *other* things, not related > > to MTA configuration. Just being able to resolve your own hostname > > to any address that "works" is the goal. 127.0.1.1 works well for > > this, which is why Debian uses it as the default. If you've got a > > static LAN address, you can use that instead. > > > > Long ago, lo used to be just 127.0.0.1, which is what most people would > try to ping to check localhost, and what appeared in /etc/hosts. There > is some subtle reason, which I used to know but have now long forgotten, > why Debian started using 127.0.1.1 in /etc/hosts instead. As far as I'm > aware, any 127. address will resolve to localhost. >
My understanding is that 127.0.1.1 is used for hostnames defined by the user on setup. In setup, you don't specify an IP for your box, so the hostname goes in the 127.0.1.1. Later, the user can edit the hosts file to specify a fixed IP if he has one. Paul -- Paul M. Foster Personal Blog: http://noferblatz.com Company Site: http://quillandmouse.com Software Projects: https://gitlab.com/paulmfoster