Article View: news.software.nntp
Article #86452Re: Non-standard 'From' fields
From: Russ Allbery
Date: Sun, 15 Feb 2015 00:27
Date: Sun, 15 Feb 2015 00:27
40 lines
2963 bytes
2963 bytes
Tim <tim@nospam.invalid> writes:
> Is there a formal definition of it anywhere, to enable me to create a
> robust parser to detect and handle it?
It's defined in RFC 1036, but RFC 1036 is not, in general, rather formal.
It does explain the background, though.
RFC-822 specifies that all text in parentheses is to be interpreted
as a comment. It is common in Internet mail to place the full name
of the user in a comment at the end of the "From" line. This
standard specifies a more rigid syntax. The full name is not
considered a comment, but an optional part of the header line.
Either the full name is omitted, or it appears in parentheses after
the electronic address of the person posting the message, or it
appears before an electronic address which is enclosed in angle
brackets. Thus, the three permissible forms are:
From: mark@cbosgd.ATT.COM
From: mark@cbosgd.ATT.COM (Mark Horton)
From: Mark Horton <mark@cbosgd.ATT.COM>
Full names may contain any printing ASCII characters from space
through tilde, except that they may not contain "(" (left
parenthesis), ")" (right parenthesis), "<" (left angle bracket), or
">" (right angle bracket). Additional restrictions may be placed on
full names by the mail standard, in particular, the characters ","
(comma), ":" (colon), "@" (at), "!" (bang), "/" (slash), "="
(equal), and ";" (semicolon) are inadvisable in full names.
That format, where the name is expressed in a comment, is quite old. I
suspect it predates RFC 822. It is legal RFC 822 syntax, although
syntactically it just has a comment, with nothing to indicate (in formal
syntax) that the comment is a name.
--
Russ Allbery (eagle@eyrie.org) <http://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID:
<8761b42f4o.fsf@hope.eyrie.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20150601.mbox.gz!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.glorb.com!usenet.stanford.edu!usenet-its.stanford.edu!.POSTED!not-for-mailReferences:
<ukdvda99imjm7ba0j7o4u8hem7e8p79nbr@4ax.com>Show Full Headers
Complete Article Headers
Message-ID: <8761b42f4o.fsf@hope.eyrie.org> Subject: Re: Non-standard 'From' fields Date: Sat, 14 Feb 2015 16:27:19 -0800 From: Russ Allbery <eagle@eyrie.org> References: <ukdvda99imjm7ba0j7o4u8hem7e8p79nbr@4ax.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20150601.mbox.gz!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.glorb.com!usenet.stanford.edu!usenet-its.stanford.edu!.POSTED!not-for-mail Newsgroups: news.software.nntp Organization: The Eyrie Lines: 40 NNTP-Posting-Host: lothlorien.stanford.edu Mime-Version: 1.0 Content-Type: text/plain X-Trace: usenet-its.stanford.edu 1423960039 27033 68.65.164.14 (15 Feb 2015 X-Complaints-To: news@usenet-its.stanford.edu User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:VLLFH06pGDetsWoF0G+hnRpqLAM=