wasm-demo/demo/ermis-f/imap-protocol/cur/1600095016.22656.mbox:2,S

36 lines
1.7 KiB
Plaintext

MBOX-Line: From tss at iki.fi Sat Nov 2 13:52:42 2013
To: imap-protocol@u.washington.edu
From: Timo Sirainen <tss@iki.fi>
Date: Fri Jun 8 12:34:51 2018
Subject: [Imap-protocol] NILs
Message-ID: <9F0687D5-B209-4922-93EB-B728B8B8869B@iki.fi>
I realized today I had several bugs related to NILs. I?ll add these to imaptest, but thought I?d mention here also in case others have similar issues:
1. My understanding from RFC 3501 is that NILs are case-insensitive, because of:
Note: [ABNF] rules MUST be followed strictly; in
particular:
(1) Except as noted otherwise, all alphabetic characters
are case-insensitive. The use of upper or lower case
characters to define token strings is for editorial clarity
only. Implementations MUST accept these strings in a
case-insensitive fashion.
I was checking only for uppercase NILs. Then again there weren't actually any IMAP command parameters where NIL was allowed before I implemented SETMETADATA today.
2. NIL is a valid atom in astrings, and must be treated the same as ?NIL?:
Note: NIL is never used for any data item which takes the
form of an atom. For example, a mailbox name of "NIL" is a
mailbox named NIL as opposed to a non-existent mailbox
name. This is because mailbox uses "astring" syntax which
is an atom or a string.
And of course this needs to work case-sensitively when used in mailbox names, so NIL != nil.
3. When sending NIL (case-insensitive) astring to clients, it?s better to send it quoted. Clients are much less likely to implement 2 correctly, and I?m sure in some cases my code is calling write_astring() when it?s really nstring in ABNF.