emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: init_system_name fqdn?


From: Ken Olum
Subject: Re: init_system_name fqdn?
Date: Sat, 17 Jun 2017 13:10:37 -0400

   From: Stefan Monnier <address@hidden>
   Date: Sat, 17 Jun 2017 11:29:22 -0400

   > A while back, init_system_name tried to find the system's fully
   > qualified domain name.  Then this code was taken out, and now it just
   > uses whatever gethostname returns.  I think this is a poor choice.

   It depends on what it's used for.  What is your use for it where it's
   a poor choice?

The hostname of the machine I'm using is "cosmos", because that's what I
put in /etc/hostname.  Its FQDN is cosmos.phy.tufts.edu, and that's
where my email address is.  This is what "hostname -f" prints and what
the old code used to guess.  I connected to a server maintained by the
Tufts IT department and it was set up the same way.

   Indeed, gethostname doesn't return a good choice for mail-host-address.
   But of all the machines I have had access to in the last 10 years, not
   a single one had an FQDN that was a good choice for
   mail-host-address either.  So the only "advantage" of the old code was
   that it was more complex and could delay startup by 2min in some cases.

I don't know what was causing this delay, but certainly we don't want
it.  Can "hostname -f" cause a similar delay?

Would you suggest not guessing at all and requiring the installer to set
mail-host-address or the user to set user-mail-address before mail can
be sent?  I think if we're going to guess at all, "hostname -f" or some
equivalent code might be a better guess than gethostname().

   From: Stefan Monnier <address@hidden>
   Date: Sat, 17 Jun 2017 12:30:52 -0400

   How do you suggest Emacs decide whether the "system is properly set up as an
   Internet host"?

It cannot.  The question is whether to guess at all, and if so what to guess.

   Why don't you just set up /etc/hostname (I don't think /etc/hosts is
   consulted to compute `system-name`) with the FQDN instead of
   a short name on those hosts that are properly setup as an Internet host?

Of course I could do that.  I was thinking that maybe there were other
people who have similarly configured systems and would find it easier
for emacs to work "of the box" instead of having to change their
hostnames.  But as you say maybe it's unlikely that guessing would work
at all.  If that's so, rather than possibly making wrong guesses which
would lead replies to be discarded, maybe emacs by default should ask
for your email address instead of making any guess.  (Then it could set
user-mail-address in your init file in the usual way, so it wouldn't
have to ask again, except in the case of -Q.)

                                        Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]