unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tim Cross <theophilusx@gmail.com>
To: Ken Olum <kdo@cosmos.phy.tufts.edu>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: init_system_name fqdn?
Date: Sun, 18 Jun 2017 11:48:26 +1000	[thread overview]
Message-ID: <CAC=50j_X1qFdNRn2=fZ2LV6CS==nJS8VSB8LxJLUXZazHVQx_g@mail.gmail.com> (raw)
In-Reply-To: <q52injuem1u.fsf@cosmos.phy.tufts.edu>

[-- Attachment #1: Type: text/plain, Size: 3146 bytes --]

If you have a fqdn for a host and hostname -f does not return the fqdn,
then your system is not configured correctly. This would likely cause
errors or problems with other software as well.

Having a FQDN and a DNS entry are not the same thing. You can have a fqdn
without a DNS entry, though it isn't very useful of course as nobody else
can resolve the fqdn to an IP address (unless you put a manual entry in
/etc/hosts of course).

There are only incidental relationships between FQDN and the ability to
send/receive email. You definitely do not need a fqdn to send email and
there are a number of ways to have email delivered to a machine without a
fqdn or DNS entry e.g. fetchmail. mailhobs with local /etc/hosts entries
with 192.168.x.x or 10.x.x.x addresses etc.

There are many different ways for a system to support sending/receiving
email and it is extremely unlikely that Emacs will be able to determine
this correctly automatically. Any attempt to do so will almost certainly be
complex and error prone and a pain to maintain. Add to this that far fewer
hosts actually do email anymore. 20 years ago, I always setup a local mail
server on my system. Now I rarely do. ISPs now frequently block port 25 and
most medium to large organisations have very strict policies in place to
prevent users from setting up mail servers due to the frequency of
misconfiguration that either caused errors or created an open mail relay
which could be used for spam and potentially adversely impact on an
organisations reputation or result i their mail being blackholed etc.

I think I'm with Stefan on this one. The only sane and maintainable
solution is to have emacs check for an explicit mail address configuration
set by the user and if none exists, prompt the user for one when sending
email. In reality, you will probably have to prompt for the name of the
mail server as well and possibly a password as many mail servers now use
authenticated smtp and you cannot assume the local host has a configured
MTA.

Or you just display a message saying to cut and paste your message into
your preferred mail client and send it that way.

Tim

On 18 June 2017 at 00:17, Ken Olum <kdo@cosmos.phy.tufts.edu> wrote:

> 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
>
>


-- 
regards,

Tim

--
Tim Cross

[-- Attachment #2: Type: text/html, Size: 3958 bytes --]

  parent reply	other threads:[~2017-06-18  1:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-16 14:17 init_system_name fqdn? Ken Olum
2017-06-16 14:33 ` Yuri Khan
2017-06-16 18:10   ` Ken Olum
2017-06-17  3:45     ` Tim Cross
2017-06-17 14:17       ` Ken Olum
2017-06-17 16:30         ` Stefan Monnier
2017-06-18  1:48         ` Tim Cross [this message]
2017-06-17 15:29 ` Stefan Monnier
2017-06-17 17:10   ` Ken Olum
2017-06-17 17:29     ` Stefan Monnier
2017-06-17 18:52       ` Paul Eggert
2017-06-17 19:51         ` Lars Ingebrigtsen
2017-06-17 22:30           ` Ken Olum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAC=50j_X1qFdNRn2=fZ2LV6CS==nJS8VSB8LxJLUXZazHVQx_g@mail.gmail.com' \
    --to=theophilusx@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=kdo@cosmos.phy.tufts.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).