[Dovecot] NONEXISTENT status code

Michael M. Slusarz
Fri, 20 Nov 2009 22:43:06 -0000

I'm going to take exception to the way dovecot (1.2.8) is returning
the NONEXISTENT response code in certain cases.  For example, these
transactions:

c: 1 EXAMINE "foo"
S: 1 NO [NONEXISTENT] Mailbox doesn't exist: foo

C: 2 STATUS "foo" (MESSAGES)
S: 2 NO [NONEXISTENT] Mailbox doesn't exist: foo

...don't appear to be the proper usage of NONEXISTENT.

 From RFC 5530[3]:

NONEXISTENT

     The operation attempts to delete something that does not exist.

NONEXISTENT should be used for RENAME or DELETE (also the UID EXPUNGE)
commands.  Although the textual description is appropriate in the
above situations - the mailbox truly doesn't exist - this is not what
the response code indicates.  Under the RFCs, it seems that failure of
a STATUS or EXAMINE command with a NO response *could* mean the
mailbox doesn't exist, but there is no method of reporting this via a
response code.

michael