[Top] [All Lists]

Spaces in quoted-string (was: Last Call: draft-klensin-rfc2821bis (Simple Mail Transfer Protocol) to Draft Standard)

2007-12-30 16:07:47

Alexey Melnikov wrote:

RFC 821 allowed for space characters (0x20) in local part of
email addresses, but RFC 2821 and 2821bis don't allow for that

| <quoted-string> ::=  """ <qtext> """
| <qtext> ::=  "\" <x> | "\" <x> <qtext> | <q> | <q> <qtext>
| <q> ::= any one of the 128 ASCII characters except <CR>, <LF>,
|         quote ("), or backslash (\)

That allowed NO-WS-CTL, SP, and even NUL in a <quoted-string>
outside of a <quoted-pair>, we obviously don't want it "as is".

Quoted-string  = DQUOTE *qcontent DQUOTE
qtext          = NO-WS-CTL /     ; Non white space controls
                 %d33 /          ; The rest of the US-ASCII
                 %d35-91 /       ;  characters not including "\"
                 %d93-126        ;  or the quote character
qcontent       = qtext / quoted-pair

Right, no SP outside of <quoted-pair>.  You can still have SP
within <quoted-pair>, at the moment (2822upd-03):

| quoted-pair    = ("\" text) / obs-qp
| text           = %d1-9 /          ; Characters excluding CR
|                  %d11 /           ;  and LF
|                  %d12 /
|                  %d14-127

And with <obs-qp> anything down to NUL goes :-(  Fiddling with
SP is very critical, it could break RFC 2821 implementations.

Whatever 2821bis will do, that needs a fat *caveat* somewhere.
And it has to be in sync with 2822upd, we can't have different
approaches in 2821bis and 2822upd for a local part <shudder />

Prohibition of spaces in quoted parts breaks gatewaying 
to/from X.400 (MIXER, RFC 2156).

RFC 2156 is still based on 822 (STD 11), it has to be updated
for future full "2821ter/2822fin" standards.  In 2156 4.3.4:

| 2. If the 822.local-part uses the 822.quoted-string encoding,
|    remove this quoting.  If the resulting unquoted
|    822.local-part has leading space, trailing space, or two
|    adjacent spaces go to stage II.

Apparently X.400 can do single embedded spaces in "stage I".

I don't see in 4.3.4 where they deal with any <quoted-pair>s,
how is that supposed to work ?  There's no backslash in 3.3.3
<printablestring>, and no abbreviation in 3.4 <ps-encoded>, a
backslash might end up as "(092)".

Anyway, it is possible to use space in a <quoted-pair> on the
RFC 822 side, isn't that good enough for MIXER ?  IOW, who is
planning to update their MIXER implementation for 2821/2822,
or better for 2821bis/2822upd ?  

2821 and 2821bis have a clear "stay away from quoted-string"
SHOULD at the end of 4.1.2, with text indicating that this is
as near to a MUST as possible without explicitly saying so.


<Prev in Thread] Current Thread [Next in Thread>
  • Spaces in quoted-string (was: Last Call: draft-klensin-rfc2821bis (Simple Mail Transfer Protocol) to Draft Standard), Frank Ellermann <=