From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ken Olum Newsgroups: gmane.emacs.devel Subject: Re: init_system_name fqdn? Date: Sat, 17 Jun 2017 10:17:01 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1497709033 22036 195.159.176.226 (17 Jun 2017 14:17:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 17 Jun 2017 14:17:13 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 17 16:17:09 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMEXF-0005WA-Dp for ged-emacs-devel@m.gmane.org; Sat, 17 Jun 2017 16:17:09 +0200 Original-Received: from localhost ([::1]:34924 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMEXK-0006BG-4A for ged-emacs-devel@m.gmane.org; Sat, 17 Jun 2017 10:17:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMEXB-0006B7-Tc for emacs-devel@gnu.org; Sat, 17 Jun 2017 10:17:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMEX8-0002cn-RD for emacs-devel@gnu.org; Sat, 17 Jun 2017 10:17:05 -0400 Original-Received: from cosmos.phy.tufts.edu ([130.64.84.253]:57233) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dMEX8-0002cS-Mi for emacs-devel@gnu.org; Sat, 17 Jun 2017 10:17:02 -0400 Original-Received: from kdo by cosmos.phy.tufts.edu ([local]:local) with local id 1dMEX7-0007oW-3w - Using Exim-4.84 (MandrivaLinux) MTA (return-path ); Sat, 17 Jun 2017 10:17:01 -0400 In-Reply-To: (message from Tim Cross on Sat, 17 Jun 2017 13:45:18 +1000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 130.64.84.253 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:215696 Archived-At: If your system has no fully qualified domain name, i.e., there is no DNS entry that points to this host, then of course you cannot receive and probably cannot send email, and I don't think it's very important exactly how it fails. But if your system is properly set up as an Internet host but gethostname does not return the FQDN (e.g., because you put the short name first in /etc/hosts), then I think init_system_name should use the FQDN. In the cases in which I have observed this, "hostname -f" does return the FQDN. In emacs-24, the procedure of init_system_name was to first do gethostname, but if that didn't return a qualified name, it would try getaddrinfo with ai_canonname, and if that failed look in the list of aliases given by gethostbyname. Later all this code was removed and now it just calls gethostname. Ken