nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] repl doesn't like return address

2015-09-02 10:10:54
but in the particular case of this thread, it sounds like including
the '.' in the middle of a contiguous name isn't a bug, according to
ken, right?  or did i mis-read all that?

Weeeellll .... it's all about how strict you want to be.

So, to recap.

- An email address is:

  name-addr       =   [display-name] angle-addr
  display-name    =   phrase
  phrase          =   1*word / obs-phrase

And, basically, a "word"  cannot contain an unquoted '.' (along with
other characters).

But ... obs-phrase is the wrinkle.  §4.1 of RFC 5322 has the definitive
answer:

      Note: The "period" (or "full stop") character (".") in obs-phrase
      is not a form that was allowed in earlier versions of this or any
      other specification.  Period (nor any other character from
      specials) was not allowed in phrase because it introduced a
      parsing difficulty distinguishing between phrases and portions of
      an addr-spec (see section 4.4).  It appears here because the
      period character is currently used in many messages in the
      display-name portion of addresses, especially for initials in
      names, and therefore must be interpreted properly

At the beginning of §4, the RFC says in part (about all of the obsolete
syntax documented later):

      Though these syntactic forms MUST NOT be generated according to
      the grammar in section 3, they MUST be accepted and parsed by a
      conformant receiver.

So ... any MUA that generates an obs-phrase is NOT RFC-compliant, but
any MUA that doesn't interpret it is ALSO not RFC-compliant.  So we
can't really complain to others about RFC violations when we're not RFC
compliant.

I took a look at our email parser (it's in sbr/mf.c, and boy, does that
filename seem appropriate now, because that's what I shouted when I was
reading it).  I am unclear how it works at all for the trailing '.' case,
but in any event we don't have enough lookahead to determine if a period
is part of a display name or an email address.  Fixing that is going to
be ... challenging.

David Levine wrote some code for repl that should fix up these addresses,
at least good enough to make replies work; I don't know why that isn't
working, but I need to investigate that as it would be a good stopgap
fix.

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>