🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #79736

Re: RFC 2822 question was Re: From field, esp. in Xnews

#79736
From: Dirk Nimmich
Date: Fri, 01 Jun 2001 19:35
73 lines
3967 bytes
Luu Tran wrote:
> Using the real-name <email> format, then where they occur in real name, \ 
> and " should be escaped with \, and if \ " . , @ occur in real-name, then 
> real-name should be enclosed in " ", right? What about < > and ( )?

from            =       "From:" mailbox-list CRLF
mailbox-list    =       (mailbox *("," mailbox)) / obs-mbox-list
mailbox         =       name-addr / addr-spec
name-addr       =       [display-name] angle-addr

(obs-*, addr-spec and angle-addr are of no interest here)

display-name    =       phrase
phrase          =       1*word / obs-phrase
word            =       atom / quoted-string
atom            =       [CFWS] 1*atext [CFWS]

Atext is any character except controls, SP, and specials. (For a
definition of these, see RFC 2822.) => If any other character
appears in the "real name", you must quote them using quoted-string
(and not just by quoted-pair!):

quoted-string   =       [CFWS]
                        DQUOTE *([FWS] qcontent) [FWS] DQUOTE
                        [CFWS]
qcontent        =       qtext / quoted-pair

Qtext is any US-ASCII char except white space, backslash and double
quote.

So you can use " and \ only in quoted-strings, and you must use a
quoted-pair then (prepending it with another backslash). If any
other character not mentioned by atext occurs in the real name you
should enclose it (the real name, or the part of the real name with
that character) in double quotes. < > ( ) are no exception here.


Don't forget to dequote any quoted-string and quoted-pair when
extracting the "real name" part of the address. When the From:
reads

  From: "Dirk Nimmich" <nimmich@uni-muenster.de>

the real name part is

  Dirk Nimmich

and not

  "Dirk Nimmich"

because the double quotes are part of the protocol (some news
readers get this wrong). Also note that dequoting is more difficult
than quoting as described above because there are more ways to
generate a real name part. (E.g., it is possible to use a mix of
atoms, quoted-strings and comments.)

> Also, there doesn't seem to be any restriction for real-name, except that 
> it's all US printable chars, correct?

No, you can use control chars in a quoted-string. Besides from
that, characters beyond code 127 are not permitted, yes. For that
case there is RFC 2047 (for which you have to know the character
set used to compose the name) for now and (hopefully) UTF-8 in the
future. You can also use RFC 2047 words to encode any of the
special cases above, BTW, so there would be no need to use quoted-
strings at all.


While being on RFC 2047, I don't know if there's still the bug in
XNews that does not remove *all* white space between two
immediately following RFC 2047 encoded words.
Technical Details
Message-ID: <9f8qpk$v1a$1@redenix.uni-muenster.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news-nue1.dfn.de!news-han1.dfn.de!news-koe1.dfn.de!uni-muenster.de!not-for-mail
References: <Xns90A8E1DBFD75Djkorpelacstutfi@193.64.137.17> <Xns90B2A335E2789luutrangeocities@206.13.28.182>

Show Full Headers
Complete Article Headers
Message-ID: <9f8qpk$v1a$1@redenix.uni-muenster.de>
Subject: Re: RFC 2822 question was Re: From field, esp. in Xnews
Date: Fri, 01 Jun 2001 19:35:16 +0000
From: Dirk Nimmich <nimmich@uni-muenster.de>
References: <Xns90A8E1DBFD75Djkorpelacstutfi@193.64.137.17> <Xns90B2A335E2789luutrangeocities@206.13.28.182>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!news-lei1.dfn.de!news-nue1.dfn.de!news-han1.dfn.de!news-koe1.dfn.de!uni-muenster.de!not-for-mail
Newsgroups: news.software.readers
Organization: Westfaelische Wilhelms-Universitaet Muenster, Germany
Lines: 72
Sender: "Dirk Nimmich" <nimmich@uni-muenster.de>
NNTP-Posting-Host: asterix.uni-muenster.de
X-Trace: redenix.uni-muenster.de 991424116 31786 128.176.188.90 (1 Jun 2001 19:35:16 GMT)
X-Complaints-To: abuse@uni-muenster.de
NNTP-Posting-Date: 1 Jun 2001 19:35:16 GMT