Re: Revisiting the hostname/FQDN issue, adding libnss-myhostname
On Tue, Oct 14, 2025 at 07:47:09AM +0200, Jochen Sprickerhof wrote:
* Simon McVittie <smcv@debian.org> [2025-10-13 23:51]:
libnss-myhostname does this dynamically rather than by writing
static configuration, so it will try to use one of the machine's
reachable IP addresses (192.0.2.123 or something), falling back to
127.0.0.2 if there's nothing better available. 127.0.0.2 is
conceptually similar to 127.0.1.1, just a slightly different
implementation choice.
An additional benefit is that libnss-myhostname allows deleting
/etc/hosts so one file less to manually keep in sync and that could
influence the system.
Then the system would have no means to find its FQDN.
The underlying problem is that exim's primary hostname is not fully
qualified if the systemd doesn't find its FQDN:
| $primary_hostname
|
| This variable contains the value set by primary_hostname in the
| configuration file, or read by the uname() function. If uname() returns a
| single-component name, Exim calls gethostbyname() (or getipnodebyname()
| where available) in an attempt to acquire a fully qualified host name. See
| also $smtp_active_hostname.
Does exim do the right thing here? This behavior had an affected system
not send mail for weeks until I noticed and investgated.
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
Reply to: