rfc5530.IMAP_Response_codes.txt 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. Network Working Group A. Gulbrandsen
  2. Request for Comments: 5530 Oryx Mail Systems GmbH
  3. Category: Standards Track May 2009
  4. IMAP Response Codes
  5. Status of This Memo
  6. This document specifies an Internet standards track protocol for the
  7. Internet community, and requests discussion and suggestions for
  8. improvements. Please refer to the current edition of the "Internet
  9. Official Protocol Standards" (STD 1) for the standardization state
  10. and status of this protocol. Distribution of this memo is unlimited.
  11. Copyright Notice
  12. Copyright (c) 2009 IETF Trust and the persons identified as the
  13. document authors. All rights reserved.
  14. This document is subject to BCP 78 and the IETF Trust's Legal
  15. Provisions Relating to IETF Documents in effect on the date of
  16. publication of this document (http://trustee.ietf.org/license-info).
  17. Please review these documents carefully, as they describe your rights
  18. and restrictions with respect to this document.
  19. Abstract
  20. IMAP responses consist of a response type (OK, NO, BAD), an optional
  21. machine-readable response code, and a human-readable text.
  22. This document collects and documents a variety of machine-readable
  23. response codes, for better interoperation and error reporting.
  24. Gulbrandsen Standards Track [Page 1]
  25. RFC 5530 IMAP Response Codes May 2009
  26. 1. Introduction
  27. Section 7.1 of [RFC3501] defines a number of response codes that can
  28. help tell an IMAP client why a command failed. However, experience
  29. has shown that more codes are useful. For example, it is useful for
  30. a client to know that an authentication attempt failed because of a
  31. server problem as opposed to a password problem.
  32. Currently, many IMAP servers use English-language, human-readable
  33. text to describe these errors, and a few IMAP clients attempt to
  34. translate this text into the user's language.
  35. This document names a variety of errors as response codes. It is
  36. based on errors that have been checked and reported on in some IMAP
  37. server implementations, and on the needs of some IMAP clients.
  38. This document doesn't require any servers to test for these errors or
  39. any clients to test for these names. It only names errors for better
  40. reporting and handling.
  41. 2. Conventions Used in This Document
  42. Formal syntax is defined by [RFC5234] as modified by [RFC3501].
  43. Example lines prefaced by "C:" are sent by the client and ones
  44. prefaced by "S:" by the server. "[...]" means elision.
  45. 3. Response Codes
  46. This section defines all the new response codes. Each definition is
  47. followed by one or more examples.
  48. UNAVAILABLE
  49. Temporary failure because a subsystem is down. For example, an
  50. IMAP server that uses a Lightweight Directory Access Protocol
  51. (LDAP) or Radius server for authentication might use this
  52. response code when the LDAP/Radius server is down.
  53. C: a LOGIN "fred" "foo"
  54. S: a NO [UNAVAILABLE] User's backend down for maintenance
  55. AUTHENTICATIONFAILED
  56. Authentication failed for some reason on which the server is
  57. unwilling to elaborate. Typically, this includes "unknown
  58. user" and "bad password".
  59. Gulbrandsen Standards Track [Page 2]
  60. RFC 5530 IMAP Response Codes May 2009
  61. This is the same as not sending any response code, except that
  62. when a client sees AUTHENTICATIONFAILED, it knows that the
  63. problem wasn't, e.g., UNAVAILABLE, so there's no point in
  64. trying the same login/password again later.
  65. C: b LOGIN "fred" "foo"
  66. S: b NO [AUTHENTICATIONFAILED] Authentication failed
  67. AUTHORIZATIONFAILED
  68. Authentication succeeded in using the authentication identity,
  69. but the server cannot or will not allow the authentication
  70. identity to act as the requested authorization identity. This
  71. is only applicable when the authentication and authorization
  72. identities are different.
  73. C: c1 AUTHENTICATE PLAIN
  74. [...]
  75. S: c1 NO [AUTHORIZATIONFAILED] No such authorization-ID
  76. C: c2 AUTHENTICATE PLAIN
  77. [...]
  78. S: c2 NO [AUTHORIZATIONFAILED] Authenticator is not an admin
  79. EXPIRED
  80. Either authentication succeeded or the server no longer had the
  81. necessary data; either way, access is no longer permitted using
  82. that passphrase. The client or user should get a new
  83. passphrase.
  84. C: d login "fred" "foo"
  85. S: d NO [EXPIRED] That password isn't valid any more
  86. PRIVACYREQUIRED
  87. The operation is not permitted due to a lack of privacy. If
  88. Transport Layer Security (TLS) is not in use, the client could
  89. try STARTTLS (see Section 6.2.1 of [RFC3501]) and then repeat
  90. the operation.
  91. C: d login "fred" "foo"
  92. S: d NO [PRIVACYREQUIRED] Connection offers no privacy
  93. C: d select inbox
  94. S: d NO [PRIVACYREQUIRED] Connection offers no privacy
  95. Gulbrandsen Standards Track [Page 3]
  96. RFC 5530 IMAP Response Codes May 2009
  97. CONTACTADMIN
  98. The user should contact the system administrator or support
  99. desk.
  100. C: e login "fred" "foo"
  101. S: e OK [CONTACTADMIN]
  102. NOPERM
  103. The access control system (e.g., Access Control List (ACL), see
  104. [RFC4314]) does not permit this user to carry out an operation,
  105. such as selecting or creating a mailbox.
  106. C: f select "/archive/projects/experiment-iv"
  107. S: f NO [NOPERM] Access denied
  108. INUSE
  109. An operation has not been carried out because it involves
  110. sawing off a branch someone else is sitting on. Someone else
  111. may be holding an exclusive lock needed for this operation, or
  112. the operation may involve deleting a resource someone else is
  113. using, typically a mailbox.
  114. The operation may succeed if the client tries again later.
  115. C: g delete "/archive/projects/experiment-iv"
  116. S: g NO [INUSE] Mailbox in use
  117. EXPUNGEISSUED
  118. Someone else has issued an EXPUNGE for the same mailbox. The
  119. client may want to issue NOOP soon. [RFC2180] discusses this
  120. subject in depth.
  121. C: h search from fred@example.com
  122. S: * SEARCH 1 2 3 5 8 13 21 42
  123. S: h OK [EXPUNGEISSUED] Search completed
  124. CORRUPTION
  125. The server discovered that some relevant data (e.g., the
  126. mailbox) are corrupt. This response code does not include any
  127. information about what's corrupt, but the server can write that
  128. to its logfiles.
  129. C: i select "/archive/projects/experiment-iv"
  130. S: i NO [CORRUPTION] Cannot open mailbox
  131. Gulbrandsen Standards Track [Page 4]
  132. RFC 5530 IMAP Response Codes May 2009
  133. SERVERBUG
  134. The server encountered a bug in itself or violated one of its
  135. own invariants.
  136. C: j select "/archive/projects/experiment-iv"
  137. S: j NO [SERVERBUG] This should not happen
  138. CLIENTBUG
  139. The server has detected a client bug. This can accompany all
  140. of OK, NO, and BAD, depending on what the client bug is.
  141. C: k1 select "/archive/projects/experiment-iv"
  142. [...]
  143. S: k1 OK [READ-ONLY] Done
  144. C: k2 status "/archive/projects/experiment-iv" (messages)
  145. [...]
  146. S: k2 OK [CLIENTBUG] Done
  147. CANNOT
  148. The operation violates some invariant of the server and can
  149. never succeed.
  150. C: l create "///////"
  151. S: l NO [CANNOT] Adjacent slashes are not supported
  152. LIMIT
  153. The operation ran up against an implementation limit of some
  154. kind, such as the number of flags on a single message or the
  155. number of flags used in a mailbox.
  156. C: m STORE 42 FLAGS f1 f2 f3 f4 f5 ... f250
  157. S: m NO [LIMIT] At most 32 flags in one mailbox supported
  158. OVERQUOTA
  159. The user would be over quota after the operation. (The user
  160. may or may not be over quota already.)
  161. Note that if the server sends OVERQUOTA but doesn't support the
  162. IMAP QUOTA extension defined by [RFC2087], then there is a
  163. quota, but the client cannot find out what the quota is.
  164. C: n1 uid copy 1:* oldmail
  165. S: n1 NO [OVERQUOTA] Sorry
  166. C: n2 uid copy 1:* oldmail
  167. S: n2 OK [OVERQUOTA] You are now over your soft quota
  168. Gulbrandsen Standards Track [Page 5]
  169. RFC 5530 IMAP Response Codes May 2009
  170. ALREADYEXISTS
  171. The operation attempts to create something that already exists,
  172. such as when the CREATE or RENAME directories attempt to create
  173. a mailbox and there is already one of that name.
  174. C: o RENAME this that
  175. S: o NO [ALREADYEXISTS] Mailbox "that" already exists
  176. NONEXISTENT
  177. The operation attempts to delete something that does not exist.
  178. Similar to ALREADYEXISTS.
  179. C: p RENAME this that
  180. S: p NO [NONEXISTENT] No such mailbox
  181. 4. Formal Syntax
  182. The following syntax specification uses the Augmented Backus-Naur
  183. Form (ABNF) notation as specified in [RFC5234]. [RFC3501] defines
  184. the non-terminal "resp-text-code".
  185. Except as noted otherwise, all alphabetic characters are case-
  186. insensitive. The use of upper or lowercase characters to define
  187. token strings is for editorial clarity only.
  188. resp-text-code =/ "UNAVAILABLE" / "AUTHENTICATIONFAILED" /
  189. "AUTHORIZATIONFAILED" / "EXPIRED" /
  190. "PRIVACYREQUIRED" / "CONTACTADMIN" / "NOPERM" /
  191. "INUSE" / "EXPUNGEISSUED" / "CORRUPTION" /
  192. "SERVERBUG" / "CLIENTBUG" / "CANNOT" /
  193. "LIMIT" / "OVERQUOTA" / "ALREADYEXISTS" /
  194. "NONEXISTENT"
  195. 5. Security Considerations
  196. Revealing information about a passphrase to unauthenticated IMAP
  197. clients causes bad karma.
  198. Response codes are easier to parse than human-readable text. This
  199. can amplify the consequences of an information leak. For example,
  200. selecting a mailbox can fail because the mailbox doesn't exist,
  201. because the user doesn't have the "l" right (right to know the
  202. mailbox exists) or "r" right (right to read the mailbox). If the
  203. server sent different responses in the first two cases in the past,
  204. only malevolent clients would discover it. With response codes it's
  205. possible, perhaps probable, that benevolent clients will forward the
  206. Gulbrandsen Standards Track [Page 6]
  207. RFC 5530 IMAP Response Codes May 2009
  208. leaked information to the user. Server authors are encouraged to be
  209. particularly careful with the NOPERM and authentication-related
  210. responses.
  211. 6. IANA Considerations
  212. The IANA has created the IMAP Response Codes registry. The registry
  213. has been populated with the following codes:
  214. NEWNAME RFC 2060 (obsolete)
  215. REFERRAL RFC 2221
  216. ALERT RFC 3501
  217. BADCHARSET RFC 3501
  218. PARSE RFC 3501
  219. PERMANENTFLAGS RFC 3501
  220. READ-ONLY RFC 3501
  221. READ-WRITE RFC 3501
  222. TRYCREATE RFC 3501
  223. UIDNEXT RFC 3501
  224. UIDVALIDITY RFC 3501
  225. UNSEEN RFC 3501
  226. UNKNOWN-CTE RFC 3516
  227. UIDNOTSTICKY RFC 4315
  228. APPENDUID RFC 4315
  229. COPYUID RFC 4315
  230. URLMECH RFC 4467
  231. TOOBIG RFC 4469
  232. BADURL RFC 4469
  233. HIGHESTMODSEQ RFC 4551
  234. NOMODSEQ RFC 4551
  235. MODIFIED RFC 4551
  236. COMPRESSIONACTIVE RFC 4978
  237. CLOSED RFC 5162
  238. NOTSAVED RFC 5182
  239. BADCOMPARATOR RFC 5255
  240. ANNOTATE RFC 5257
  241. ANNOTATIONS RFC 5257
  242. TEMPFAIL RFC 5259
  243. MAXCONVERTMESSAGES RFC 5259
  244. MAXCONVERTPARTS RFC 5259
  245. NOUPDATE RFC 5267
  246. METADATA RFC 5464
  247. NOTIFICATIONOVERFLOW RFC 5465
  248. BADEVENT RFC 5465
  249. UNDEFINED-FILTER RFC 5466
  250. UNAVAILABLE RFC 5530
  251. AUTHENTICATIONFAILED RFC 5530
  252. AUTHORIZATIONFAILED RFC 5530
  253. Gulbrandsen Standards Track [Page 7]
  254. RFC 5530 IMAP Response Codes May 2009
  255. EXPIRED RFC 5530
  256. PRIVACYREQUIRED RFC 5530
  257. CONTACTADMIN RFC 5530
  258. NOPERM RFC 5530
  259. INUSE RFC 5530
  260. EXPUNGEISSUED RFC 5530
  261. CORRUPTION RFC 5530
  262. SERVERBUG RFC 5530
  263. CLIENTBUG RFC 5530
  264. CANNOT RFC 5530
  265. LIMIT RFC 5530
  266. OVERQUOTA RFC 5530
  267. ALREADYEXISTS RFC 5530
  268. NONEXISTENT RFC 5530
  269. The new registry can be extended by sending a registration request to
  270. IANA. IANA will forward this request to a Designated Expert,
  271. appointed by the responsible IESG Area Director, CCing it to the IMAP
  272. Extensions mailing list at <ietf-imapext@imc.org> (or a successor
  273. designated by the Area Director). After either allowing 30 days for
  274. community input on the IMAP Extensions mailing list or a successful
  275. IETF Last Call, the expert will determine the appropriateness of the
  276. registration request and either approve or disapprove the request by
  277. sending a notice of the decision to the requestor, CCing the IMAP
  278. Extensions mailing list and IANA. A denial notice must be justified
  279. by an explanation, and, in cases where it is possible, concrete
  280. suggestions on how the request can be modified so as to become
  281. acceptable should be provided.
  282. For each response code, the registry contains a list of relevant RFCs
  283. that describe (or extend) the response code and an optional response
  284. code status description, such as "obsolete" or "reserved to prevent
  285. collision with deployed software". (Note that in the latter case,
  286. the RFC number can be missing.) Presence of the response code status
  287. description means that the corresponding response code is NOT
  288. RECOMMENDED for widespread use.
  289. The intention is that any future allocation will be accompanied by a
  290. published RFC (including direct submissions to the RFC Editor). But
  291. in order to allow for the allocation of values prior to the RFC being
  292. approved for publication, the Designated Expert can approve
  293. allocations once it seems clear that an RFC will be published, for
  294. example, before requesting IETF LC for the document.
  295. The Designated Expert can also approve registrations for response
  296. codes used in deployed software when no RFC exists. Such
  297. registrations must be marked as "reserved to prevent collision with
  298. deployed software".
  299. Gulbrandsen Standards Track [Page 8]
  300. RFC 5530 IMAP Response Codes May 2009
  301. Response code registrations may not be deleted; response codes that
  302. are no longer believed appropriate for use (for example, if there is
  303. a problem with the syntax of said response code or if the
  304. specification describing it was moved to Historic) should be marked
  305. "obsolete" in the registry, clearly marking the lists published by
  306. IANA.
  307. 7. Acknowledgements
  308. Peter Coates, Mark Crispin, Philip Guenther, Alexey Melnikov, Ken
  309. Murchison, Chris Newman, Timo Sirainen, Philip Van Hoof, Dale
  310. Wiggins, and Sarah Wilkin helped with this document.
  311. 8. References
  312. 8.1. Normative References
  313. [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
  314. 4rev1", RFC 3501, March 2003.
  315. [RFC5234] Crocker, D., Ed., and P. Overell, "Augmented BNF for
  316. Syntax Specifications: ABNF", STD 68, RFC 5234, January
  317. 2008.
  318. 9. Informative References
  319. [RFC2087] Myers, J., "IMAP4 QUOTA extension", RFC 2087, January
  320. 1997.
  321. [RFC2180] Gahrns, M., "IMAP4 Multi-Accessed Mailbox Practice", RFC
  322. 2180, July 1997.
  323. [RFC4314] Melnikov, A., "IMAP4 Access Control List (ACL) Extension",
  324. RFC 4314, December 2005.
  325. Author's Address
  326. Arnt Gulbrandsen
  327. Oryx Mail Systems GmbH
  328. Schweppermannstr. 8
  329. D-81671 Muenchen
  330. Germany
  331. Fax: +49 89 4502 9758
  332. EMail: arnt@oryx.com
  333. Gulbrandsen Standards Track [Page 9]