[Imap-protocol] SELECT of same mailbox
daboo at isamet.com
Wed Sep 7 11:28:06 PDT 2005
--On September 7, 2005 11:13:28 AM -0700 Mark Crispin
<mrc at CAC.Washington.EDU> wrote:
>> I ask because the CMU server remains in the previous selected state, if
>> a subsequent SELECT results in a 'BAD' response. It correctly leaves
>> selected state if a subsequent SELECT results in a 'NO'.
> That's the (only) correct behavior.
> Sadly, a NO response from SELECT requires that an UNSELECT be done; this
> is the result of a mistake made in RFC 1730. Nevertheless, this can only
> happen because the command was recognized.
> BAD means that the command isn't recognized due to syntax problems. In
> order for a SELECT that returns BAD to have UNSELECT semantics, there
> would have to be some sort of requirement that an unrecognized command be
> "half-recognized". I hope that nobody wants to go there.
There is a terminology issue here: rfc3501 uses the term 'command line',
'command' and 'arguments'. So consider the following:
a SELECT INBOX foobar
I consider the above to be a SELECT command with invalid arguments. So in
my interpretation the command is recognised as a 'SELECT command', but the
arguments are wrong and that causes the BAD. So when we have the statement:
Consequently, if a mailbox is selected and a SELECT command that
fails is attempted, no mailbox is selected.
I consider 'fails' to mean either 'NO' or 'BAD'.
I guess all I am asking for is a change to that sentence, something like:
Consequently, if a mailbox is selected and an attempted SELECT
fails with a NO response, no mailbox is selected.
More information about the Imap-protocol