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

Re: where is /etc/hosts supposed to come from?



On 2009-12-30 15:31:12 -0200, Henrique de Moraes Holschuh wrote:
> On Tue, 29 Dec 2009, Vincent Lefevre wrote:
> > On 2009-12-29 17:44:31 +0100, Milan P. Stanic wrote:
> > > Mutt in testing/unstable use /etc/mailname.
> > 
> > But not the official Mutt version.
> 
> Who lets you configure the correct domain you want it to use for email
> addresses in its config files, although I don't recall if you can tell it
> what to use for message-ids.

Yes, that's what I had to do after reporting Mutt bug 3298 (Mutt has
its own buggy way to determine the FQDN: it uses /etc/resolv.conf
while /etc/hosts may have the precedence).

> Debian mutt will autoconfigure better, but that's it.
> 
> That said, the canonical name is required by POSIX, but POSIX (looking at
> SuSv3) doesn't require it to be unique, doesn't give it any application
> usage notes, and in fact doesn't even require it to be a FQDN (which is, in
> fact a pratical requirement of the stuff that uses the canonical name).

POSIX says:

  If the AI_CANONNAME flag is specified and the nodename argument is
  not null, the function shall attempt to determine the canonical name
  corresponding to nodename (for example, if nodename is an alias or
  shorthand notation for a complete name).
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

So, it isn't intended to be a short name. As this is mostly
implementation defined, it may be difficult to be very accurate.

Also, otherwise, what would be the point of having a "canonical name"
in addition to a node name if there isn't any requirement?

> If you want proper message-ids, do it right and have a GUUID in it.

Perhaps, hoping that Message-Ids wouldn't be too long (I've seen
broken messages due to Message-Ids generated by Pine, related to
word-wrapping IIRC).

> If mutt depends on the result of gethostname() to be unique in the
> whole world to generate proper message-ids, it is broken.

Actually, there's a low probability of duplicates (but practically
possible) if many people use a broken FQDN such as "localhost".

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


Reply to: