[Imap-protocol] [noob] select & unseen?
guenther+imap at sendmail.com
Sun Nov 6 14:02:57 PST 2011
On Sun, 6 Nov 2011, Petite Abeille wrote:
> One more minor clarification...
> In the example above, both dovecot and cyrus suffix the response with a
> bit of free form text:
> * OK [UNSEEN 123] First unseen. <- "First unseen."
> * OK [UNSEEN 123] Ok <- "Ok"
> Is that trailing text mandatory? It doesn't seem to add much of anything
> functional to the response. Can the response dispense with it?
> * OK [UNSEEN 123]
Live by the ABNF:
response-data = "*" SP (resp-cond-state / resp-cond-bye /
mailbox-data / message-data / capability-data) CRLF
resp-cond-state = ("OK" / "NO" / "BAD") SP resp-text
resp-text = ["[" resp-text-code "]" SP] text
text = 1*TEXT-CHAR
Ergo, the close bracket must be followed by a space and at least one other
character before the CRLF. If it fails to do that, then it's not actually
a response code!
More information about the Imap-protocol