[Imap-protocol] [noob] select & unseen?

David Harris David.Harris at pmail.gen.nz
Sun Nov 6 16:45:00 PST 2011

On 6 Nov 2011 at 21:15, Petite Abeille wrote:

> Given a mailbox containing only \Seen messages, what kind of

> UNSEEN response is SELECT supposed to return?


> Looking at, say, dovecot implementation, it doesn't return any

> UNSEEN data if all messages are \Seen:


> On the other hand, the spec for SELECT seems to mandate returning

> all the data: "the server MUST send the following untagged data".

It is in the very nature of [UNSEEN] that it *cannot* be sent if the
mailbox has no unread messages: the ABNF requires its parameter to
be an nz-number, but there is no possible valid nz-number that can be
sent in such a situation. Simple commonsense dictates that the
intention of the RFC must be that [UNSEEN] is mandatory *if the
mailbox contains any unread messages*, but that it *must* in fact be
*omitted* otherwise.

Thanks for this thread - it has lead to a minor correction in my server
(an oversight that I found when I went to check that I was in


-- David --

------------------ David Harris -+- Pegasus Mail ----------------------
Box 5451, Dunedin, New Zealand | e-mail:
David.Harris at pmail.gen.nz
Phone: +64 3 453-6880 | Fax: +64 3 453-6612

True life insurance claim:
"I saw a slow-moving, sad-faced old gentleman as he
bounced off the hood of my car."

More information about the Imap-protocol mailing list