rfc4466.Collected_extensions_to_IMAP4_ABNF.txt 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955
  1. Network Working Group A. Melnikov
  2. Request for Comments: 4466 Isode Ltd.
  3. Updates: 2088, 2342, 3501, 3502, 3516 C. Daboo
  4. Category: Standards Track April 2006
  5. Collected Extensions to IMAP4 ABNF
  6. Status of This Memo
  7. This document specifies an Internet standards track protocol for the
  8. Internet community, and requests discussion and suggestions for
  9. improvements. Please refer to the current edition of the "Internet
  10. Official Protocol Standards" (STD 1) for the standardization state
  11. and status of this protocol. Distribution of this memo is unlimited.
  12. Copyright Notice
  13. Copyright (C) The Internet Society (2006).
  14. Abstract
  15. Over the years, many documents from IMAPEXT and LEMONADE working
  16. groups, as well as many individual documents, have added syntactic
  17. extensions to many base IMAP commands described in RFC 3501. For
  18. ease of reference, this document collects most of such ABNF changes
  19. in one place.
  20. This document also suggests a set of standard patterns for adding
  21. options and extensions to several existing IMAP commands defined in
  22. RFC 3501. The patterns provide for compatibility between existing
  23. and future extensions.
  24. This document updates ABNF in RFCs 2088, 2342, 3501, 3502, and 3516.
  25. It also includes part of the errata to RFC 3501. This document
  26. doesn't specify any semantic changes to the listed RFCs.
  27. Melnikov & Daboo Standards Track [Page 1]
  28. RFC 4466 Collected Extensions to IMAP4 ABNF April 2006
  29. Table of Contents
  30. 1. Introduction ....................................................2
  31. 1.1. Purpose of This Document ...................................2
  32. 1.2. Conventions Used in This Document ..........................3
  33. 2. IMAP ABNF Extensions ............................................3
  34. 2.1. Optional Parameters with the SELECT/EXAMINE Commands .......3
  35. 2.2. Extended CREATE Command ....................................4
  36. 2.3. Extended RENAME Command ....................................5
  37. 2.4. Extensions to FETCH and UID FETCH Commands .................6
  38. 2.5. Extensions to STORE and UID STORE Commands .................6
  39. 2.6. Extensions to SEARCH Command ...............................7
  40. 2.6.1. Extended SEARCH Command .............................7
  41. 2.6.2. ESEARCH untagged response ...........................8
  42. 2.7. Extensions to APPEND Command ...............................8
  43. 3. Formal Syntax ...................................................9
  44. 4. Security Considerations ........................................14
  45. 5. Normative References ...........................................15
  46. 6. Acknowledgements ...............................................15
  47. 1. Introduction
  48. 1.1. Purpose of This Document
  49. This document serves several purposes:
  50. 1. rationalize and generalize ABNF for some existing IMAP
  51. extensions;
  52. 2. collect the ABNF in one place in order to minimize cross
  53. references between documents;
  54. 3. define building blocks for future extensions so that they can
  55. be used together in a compatible way.
  56. It is expected that a future revision of this document will be
  57. incorporated into a revision of RFC 3501.
  58. This document updates ABNF in RFCs 2088, 2342, 3501, 3502, and 3516.
  59. It also includes part of the errata to RFC 3501. This document
  60. doesn't specify any semantic changes to the listed RFCs.
  61. The ABNF in section 6 of RFC 2342 got rewritten to conform to the
  62. ABNF syntax as defined in RFC 4234 and to reference new non-terminals
  63. from RFC 3501. It was also restructured to allow for better
  64. readability. There were no changes "on the wire".
  65. Section 2 extends ABNF for SELECT, EXAMINE, CREATE, RENAME, FETCH/UID
  66. FETCH, STORE/UID STORE, SEARCH, and APPEND commands in a consistent
  67. manner. Extensions to all the commands but APPEND have the same
  68. Melnikov & Daboo Standards Track [Page 2]
  69. RFC 4466 Collected Extensions to IMAP4 ABNF April 2006
  70. structure. Extensibility for the APPEND command was done slightly
  71. differently in order to preserve backward compatibility with existing
  72. extensions.
  73. Section 2 also defines a new ESEARCH response, whose purpose is to
  74. define a better version of the SEARCH response defined in RFC 3501.
  75. Section 3 defines the collected ABNF that replaces pieces of ABNF in
  76. the aforementioned RFCs. The collected ABNF got generalized to allow
  77. for easier future extensibility.
  78. 1.2. Conventions Used in This Document
  79. In examples, "C:" and "S:" indicate lines sent by the client and
  80. server, respectively.
  81. The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY"
  82. in this document are to be interpreted as defined in "Key words for
  83. use in RFCs to Indicate Requirement Levels" [KEYWORDS].
  84. 2. IMAP ABNF Extensions
  85. This section is not normative. It provides some background on the
  86. intended use of different extensions and it gives some guidance about
  87. how future extensions should extend the described commands.
  88. 2.1. Optional Parameters with the SELECT/EXAMINE Commands
  89. This document adds the ability to include one or more parameters with
  90. the IMAP SELECT (section 6.3.1 of [IMAP4]) or EXAMINE (section 6.3.2
  91. of [IMAP4]) commands, to turn on or off certain standard behaviors,
  92. or to add new optional behaviors required for a particular extension.
  93. There are two possible modes of operation:
  94. o A global state change where a single use of the optional parameter
  95. will affect the session state from that time on, irrespective of
  96. subsequent SELECT/EXAMINE commands.
  97. o A per-mailbox state change that will affect the session only for
  98. the duration of the new selected state. A subsequent
  99. SELECT/EXAMINE without the optional parameter will cancel its
  100. effect for the newly selected mailbox.
  101. Optional parameters to the SELECT or EXAMINE commands are added as a
  102. parenthesized list of attribute/value pairs, and appear after the
  103. mailbox name in the standard SELECT or EXAMINE command. The order of
  104. individual parameters is arbitrary. A parameter value is optional
  105. Melnikov & Daboo Standards Track [Page 3]
  106. RFC 4466 Collected Extensions to IMAP4 ABNF April 2006
  107. and may consist of atoms, strings, or lists in a specific order. If
  108. the parameter value is present, it always appears in parentheses (*).
  109. Any parameter not defined by extensions that the server supports must
  110. be rejected with a BAD response.
  111. Example:
  112. C: a SELECT INBOX (ANNOTATE)
  113. S: ...
  114. S: a OK SELECT complete
  115. In the above example, a single parameter is used with the SELECT
  116. command.
  117. Example:
  118. C: a EXAMINE INBOX (ANNOTATE RESPONSES ("UID Responses")
  119. CONDSTORE)
  120. S: ...
  121. S: a OK EXAMINE complete
  122. In the above example, three parameters are used with the EXAMINE
  123. command. The second parameter consists of two items: an atom
  124. "RESPONSES" followed by a quoted string.
  125. Example:
  126. C: a SELECT INBOX (BLURDYBLOOP)
  127. S: a BAD Unknown parameter in SELECT command
  128. In the above example, a parameter not supported by the server is
  129. used. This results in the BAD response from the server.
  130. (*) - if a parameter has a mandatory value, which can always be
  131. represented as a number or a sequence-set, the parameter value does
  132. not need the enclosing (). See ABNF for more details.
  133. 2.2. Extended CREATE Command
  134. Arguments: mailbox name
  135. OPTIONAL list of CREATE parameters
  136. Responses: no specific responses for this command
  137. Result: OK - create completed
  138. NO - create failure: cannot create mailbox with
  139. that name
  140. BAD - argument(s) invalid
  141. Melnikov & Daboo Standards Track [Page 4]
  142. RFC 4466 Collected Extensions to IMAP4 ABNF April 2006
  143. This document adds the ability to include one or more parameters with
  144. the IMAP CREATE command (see section 6.3.3 of [IMAP4]), to turn on or
  145. off certain standard behaviors, or to add new optional behaviors
  146. required for a particular extension. No CREATE parameters are
  147. defined in this document.
  148. Optional parameters to the CREATE command are added as a
  149. parenthesized list of attribute/value pairs after the mailbox name.
  150. The order of individual parameters is arbitrary. A parameter value
  151. is optional and may consist of atoms, strings, or lists in a specific
  152. order. If the parameter value is present, it always appears in
  153. parentheses (*). Any parameter not defined by extensions that the
  154. server supports must be rejected with a BAD response.
  155. (*) - if a parameter has a mandatory value, which can always be
  156. represented as a number or a sequence-set, the parameter value does
  157. not need the enclosing (). See ABNF for more details.
  158. 2.3. Extended RENAME Command
  159. Arguments: existing mailbox name
  160. new mailbox name
  161. OPTIONAL list of RENAME parameters
  162. Responses: no specific responses for this command
  163. Result: OK - rename completed
  164. NO - rename failure: cannot rename mailbox with
  165. that name, cannot rename to mailbox with
  166. that name, etc.
  167. BAD - argument(s) invalid
  168. This document adds the ability to include one or more parameters with
  169. the IMAP RENAME command (see section 6.3.5 of [IMAP4]), to turn on or
  170. off certain standard behaviors, or to add new optional behaviors
  171. required for a particular extension. No RENAME parameters are
  172. defined in this document.
  173. Optional parameters to the RENAME command are added as a
  174. parenthesized list of attribute/value pairs after the new mailbox
  175. name. The order of individual parameters is arbitrary. A parameter
  176. value is optional and may consist of atoms, strings, or lists in a
  177. specific order. If the parameter value is present, it always appears
  178. in parentheses (*). Any parameter not defined by extensions that the
  179. server supports must be rejected with a BAD response.
  180. Melnikov & Daboo Standards Track [Page 5]
  181. RFC 4466 Collected Extensions to IMAP4 ABNF April 2006
  182. (*) - if a parameter has a mandatory value, which can always be
  183. represented as a number or a sequence-set, the parameter value does
  184. not need the enclosing (). See ABNF for more details.
  185. 2.4. Extensions to FETCH and UID FETCH Commands
  186. Arguments: sequence set
  187. message data item names or macro
  188. OPTIONAL fetch modifiers
  189. Responses: untagged responses: FETCH
  190. Result: OK - fetch completed
  191. NO - fetch error: cannot fetch that data
  192. BAD - command unknown or arguments invalid
  193. This document extends the syntax of the FETCH and UID FETCH commands
  194. (see section 6.4.5 of [IMAP4]) to include optional FETCH modifiers.
  195. No fetch modifiers are defined in this document.
  196. The order of individual modifiers is arbitrary. Each modifier is an
  197. attribute/value pair. A modifier value is optional and may consist
  198. of atoms and/or strings and/or lists in a specific order. If the
  199. modifier value is present, it always appears in parentheses (*). Any
  200. modifiers not defined by extensions that the server supports must be
  201. rejected with a BAD response.
  202. (*) - if a modifier has a mandatory value, which can always be
  203. represented as a number or a sequence-set, the modifier value does
  204. not need the enclosing (). See ABNF for more details.
  205. 2.5. Extensions to STORE and UID STORE Commands
  206. Arguments: message set
  207. OPTIONAL store modifiers
  208. message data item name
  209. value for message data item
  210. Responses: untagged responses: FETCH
  211. Result: OK - store completed
  212. NO - store error: cannot store that data
  213. BAD - command unknown or arguments invalid
  214. This document extends the syntax of the STORE and UID STORE commands
  215. (see section 6.4.6 of [IMAP4]) to include optional STORE modifiers.
  216. No store modifiers are defined in this document.
  217. Melnikov & Daboo Standards Track [Page 6]
  218. RFC 4466 Collected Extensions to IMAP4 ABNF April 2006
  219. The order of individual modifiers is arbitrary. Each modifier is an
  220. attribute/value pair. A modifier value is optional and may consist
  221. of atoms and/or strings and/or lists in a specific order. If the
  222. modifier value is present, it always appears in parentheses (*). Any
  223. modifiers not defined by extensions that the server supports must be
  224. rejected with a BAD response.
  225. (*) - if a modifier has a mandatory value, which can always be
  226. represented as a number or a sequence-set, the modifier value does
  227. not need the enclosing (). See ABNF for more details.
  228. 2.6. Extensions to SEARCH Command
  229. 2.6.1. Extended SEARCH Command
  230. Arguments: OPTIONAL result specifier
  231. OPTIONAL [CHARSET] specification
  232. searching criteria (one or more)
  233. Responses: REQUIRED untagged response: SEARCH (*)
  234. Result: OK - search completed
  235. NO - search error: cannot search that [CHARSET] or
  236. criteria
  237. BAD - command unknown or arguments invalid
  238. This section updates definition of the SEARCH command described in
  239. section 6.4.4 of [IMAP4].
  240. The SEARCH command is extended to allow for result options. This
  241. document does not define any result options.
  242. The order of individual options is arbitrary. Individual options may
  243. contain parameters enclosed in parentheses (**). If an option has
  244. parameters, they consist of atoms and/or strings and/or lists in a
  245. specific order. Any options not defined by extensions that the
  246. server supports must be rejected with a BAD response.
  247. (*) - An extension to the SEARCH command may require another untagged
  248. response, or no untagged response to be returned. Section 2.6.2
  249. defines a new ESEARCH untagged response that replaces the SEARCH
  250. untagged response. Note that for a given extended SEARCH command the
  251. SEARCH and ESEARCH responses SHOULD be mutually exclusive, i.e., only
  252. one of them should be returned.
  253. (**) - if an option has a mandatory parameter, which can always be
  254. represented as a number or a sequence-set, the option parameter does
  255. not need the enclosing (). See ABNF for more details.
  256. Melnikov & Daboo Standards Track [Page 7]
  257. RFC 4466 Collected Extensions to IMAP4 ABNF April 2006
  258. 2.6.2. ESEARCH untagged response
  259. Contents: one or more search-return-data pairs
  260. The ESEARCH response SHOULD be sent as a result of an extended SEARCH
  261. or UID SEARCH command specified in section 2.6.1.
  262. The ESEARCH response starts with an optional search correlator. If
  263. it is missing, then the response was not caused by a particular IMAP
  264. command, whereas if it is present, it contains the tag of the command
  265. that caused the response to be returned.
  266. The search correlator is followed by an optional UID indicator. If
  267. this indicator is present, all data in the ESEARCH response refers to
  268. UIDs, otherwise all returned data refers to message numbers.
  269. The rest of the ESEARCH response contains one or more search data
  270. pairs. Each pair starts with unique return item name, followed by a
  271. space and the corresponding data. Search data pairs may be returned
  272. in any order. Unless specified otherwise by an extension, any return
  273. item name SHOULD appear only once in an ESEARCH response.
  274. Example: S: * ESEARCH UID COUNT 5 ALL 4:19,21,28
  275. Example: S: * ESEARCH (TAG "a567") UID COUNT 5 ALL 4:19,21,28
  276. Example: S: * ESEARCH COUNT 5 ALL 1:17,21
  277. 2.7. Extensions to APPEND Command
  278. The IMAP BINARY extension [BINARY] extends the APPEND command to
  279. allow a client to append data containing NULs by using the <literal8>
  280. syntax. The ABNF was rewritten to allow for easier extensibility by
  281. IMAP extensions. This document hasn't specified any semantical
  282. changes to the [BINARY] extension.
  283. In addition, the non-terminal "literal8" defined in [BINARY] got
  284. extended to allow for non-synchronizing literals if both [BINARY] and
  285. [LITERAL+] extensions are supported by the server.
  286. The IMAP MULTIAPPEND extension [MULTIAPPEND] extends the APPEND
  287. command to allow a client to append multiple messages atomically.
  288. This document defines a common syntax for the APPEND command that
  289. takes into consideration syntactic extensions defined by both
  290. [BINARY] and [MULTIAPPEND] extensions.
  291. Melnikov & Daboo Standards Track [Page 8]
  292. RFC 4466 Collected Extensions to IMAP4 ABNF April 2006
  293. 3. Formal Syntax
  294. The following syntax specification uses the Augmented Backus-Naur
  295. Form (ABNF) notation as specified in [ABNF].
  296. Non-terminals referenced but not defined below are as defined by
  297. [IMAP4].
  298. Except as noted otherwise, all alphabetic characters are case-
  299. insensitive. The use of uppercase or lowercase characters to define
  300. token strings is for editorial clarity only. Implementations MUST
  301. accept these strings in a case-insensitive fashion.
  302. append = "APPEND" SP mailbox 1*append-message
  303. ;; only a single append-message may appear
  304. ;; if MULTIAPPEND [MULTIAPPEND] capability
  305. ;; is not present
  306. append-message = append-opts SP append-data
  307. append-ext = append-ext-name SP append-ext-value
  308. ;; This non-terminal define extensions to
  309. ;; to message metadata.
  310. append-ext-name = tagged-ext-label
  311. append-ext-value= tagged-ext-val
  312. ;; This non-terminal shows recommended syntax
  313. ;; for future extensions.
  314. append-data = literal / literal8 / append-data-ext
  315. append-data-ext = tagged-ext
  316. ;; This non-terminal shows recommended syntax
  317. ;; for future extensions,
  318. ;; i.e., a mandatory label followed
  319. ;; by parameters.
  320. append-opts = [SP flag-list] [SP date-time] *(SP append-ext)
  321. ;; message metadata
  322. charset = atom / quoted
  323. ;; Exact syntax is defined in [CHARSET].
  324. create = "CREATE" SP mailbox
  325. [create-params]
  326. ;; Use of INBOX gives a NO error.
  327. Melnikov & Daboo Standards Track [Page 9]
  328. RFC 4466 Collected Extensions to IMAP4 ABNF April 2006
  329. create-params = SP "(" create-param *( SP create-param) ")"
  330. create-param-name = tagged-ext-label
  331. create-param = create-param-name [SP create-param-value]
  332. create-param-value= tagged-ext-val
  333. ;; This non-terminal shows recommended syntax
  334. ;; for future extensions.
  335. esearch-response = "ESEARCH" [search-correlator] [SP "UID"]
  336. *(SP search-return-data)
  337. ;; Note that SEARCH and ESEARCH responses
  338. ;; SHOULD be mutually exclusive,
  339. ;; i.e., only one of the response types
  340. ;; should be
  341. ;; returned as a result of a command.
  342. examine = "EXAMINE" SP mailbox [select-params]
  343. ;; modifies the original IMAP EXAMINE command
  344. ;; to accept optional parameters
  345. fetch = "FETCH" SP sequence-set SP ("ALL" / "FULL" /
  346. "FAST" / fetch-att /
  347. "(" fetch-att *(SP fetch-att) ")")
  348. [fetch-modifiers]
  349. ;; modifies the original IMAP4 FETCH command to
  350. ;; accept optional modifiers
  351. fetch-modifiers = SP "(" fetch-modifier *(SP fetch-modifier) ")"
  352. fetch-modifier = fetch-modifier-name [ SP fetch-modif-params ]
  353. fetch-modif-params = tagged-ext-val
  354. ;; This non-terminal shows recommended syntax
  355. ;; for future extensions.
  356. fetch-modifier-name = tagged-ext-label
  357. literal8 = "~{" number ["+"] "}" CRLF *OCTET
  358. ;; A string that might contain NULs.
  359. ;; <number> represents the number of OCTETs
  360. ;; in the response string.
  361. ;; The "+" is only allowed when both LITERAL+ and
  362. ;; BINARY extensions are supported by the server.
  363. Melnikov & Daboo Standards Track [Page 10]
  364. RFC 4466 Collected Extensions to IMAP4 ABNF April 2006
  365. mailbox-data =/ Namespace-Response /
  366. esearch-response
  367. Namespace = nil / "(" 1*Namespace-Descr ")"
  368. Namespace-Command = "NAMESPACE"
  369. Namespace-Descr = "(" string SP
  370. (DQUOTE QUOTED-CHAR DQUOTE / nil)
  371. *(Namespace-Response-Extension) ")"
  372. Namespace-Response-Extension = SP string SP
  373. "(" string *(SP string) ")"
  374. Namespace-Response = "NAMESPACE" SP Namespace
  375. SP Namespace SP Namespace
  376. ;; This response is currently only allowed
  377. ;; if the IMAP server supports [NAMESPACE].
  378. ;; The first Namespace is the Personal Namespace(s)
  379. ;; The second Namespace is the Other Users' Namespace(s)
  380. ;; The third Namespace is the Shared Namespace(s)
  381. rename = "RENAME" SP mailbox SP mailbox
  382. [rename-params]
  383. ;; Use of INBOX as a destination gives
  384. ;; a NO error, unless rename-params
  385. ;; is not empty.
  386. rename-params = SP "(" rename-param *( SP rename-param) ")"
  387. rename-param = rename-param-name [SP rename-param-value]
  388. rename-param-name = tagged-ext-label
  389. rename-param-value= tagged-ext-val
  390. ;; This non-terminal shows recommended syntax
  391. ;; for future extensions.
  392. response-data = "*" SP response-payload CRLF
  393. response-payload= resp-cond-state / resp-cond-bye /
  394. mailbox-data / message-data / capability-data
  395. search = "SEARCH" [search-return-opts]
  396. SP search-program
  397. search-correlator = SP "(" "TAG" SP tag-string ")"
  398. Melnikov & Daboo Standards Track [Page 11]
  399. RFC 4466 Collected Extensions to IMAP4 ABNF April 2006
  400. search-program = ["CHARSET" SP charset SP]
  401. search-key *(SP search-key)
  402. ;; CHARSET argument to SEARCH MUST be
  403. ;; registered with IANA.
  404. search-return-data = search-modifier-name SP search-return-value
  405. ;; Note that not every SEARCH return option
  406. ;; is required to have the corresponding
  407. ;; ESEARCH return data.
  408. search-return-opts = SP "RETURN" SP "(" [search-return-opt
  409. *(SP search-return-opt)] ")"
  410. search-return-opt = search-modifier-name [SP search-mod-params]
  411. search-return-value = tagged-ext-val
  412. ;; Data for the returned search option.
  413. ;; A single "nz-number"/"number" value
  414. ;; can be returned as an atom (i.e., without
  415. ;; quoting). A sequence-set can be returned
  416. ;; as an atom as well.
  417. search-modifier-name = tagged-ext-label
  418. search-mod-params = tagged-ext-val
  419. ;; This non-terminal shows recommended syntax
  420. ;; for future extensions.
  421. select = "SELECT" SP mailbox [select-params]
  422. ;; modifies the original IMAP SELECT command to
  423. ;; accept optional parameters
  424. select-params = SP "(" select-param *(SP select-param) ")"
  425. select-param = select-param-name [SP select-param-value]
  426. ;; a parameter to SELECT may contain one or
  427. ;; more atoms and/or strings and/or lists.
  428. select-param-name= tagged-ext-label
  429. select-param-value= tagged-ext-val
  430. ;; This non-terminal shows recommended syntax
  431. ;; for future extensions.
  432. status-att-list = status-att-val *(SP status-att-val)
  433. ;; Redefines status-att-list from RFC 3501.
  434. Melnikov & Daboo Standards Track [Page 12]
  435. RFC 4466 Collected Extensions to IMAP4 ABNF April 2006
  436. ;; status-att-val is defined in RFC 3501 errata
  437. status-att-val = ("MESSAGES" SP number) /
  438. ("RECENT" SP number) /
  439. ("UIDNEXT" SP nz-number) /
  440. ("UIDVALIDITY" SP nz-number) /
  441. ("UNSEEN" SP number)
  442. ;; Extensions to the STATUS responses
  443. ;; should extend this production.
  444. ;; Extensions should use the generic
  445. ;; syntax defined by tagged-ext.
  446. store = "STORE" SP sequence-set [store-modifiers]
  447. SP store-att-flags
  448. ;; extend [IMAP4] STORE command syntax
  449. ;; to allow for optional store-modifiers
  450. store-modifiers = SP "(" store-modifier *(SP store-modifier)
  451. ")"
  452. store-modifier = store-modifier-name [SP store-modif-params]
  453. store-modif-params = tagged-ext-val
  454. ;; This non-terminal shows recommended syntax
  455. ;; for future extensions.
  456. store-modifier-name = tagged-ext-label
  457. tag-string = string
  458. ;; tag of the command that caused
  459. ;; the ESEARCH response, sent as
  460. ;; a string.
  461. tagged-ext = tagged-ext-label SP tagged-ext-val
  462. ;; recommended overarching syntax for
  463. ;; extensions
  464. tagged-ext-label = tagged-label-fchar *tagged-label-char
  465. ;; Is a valid RFC 3501 "atom".
  466. tagged-label-fchar = ALPHA / "-" / "_" / "."
  467. tagged-label-char = tagged-label-fchar / DIGIT / ":"
  468. Melnikov & Daboo Standards Track [Page 13]
  469. RFC 4466 Collected Extensions to IMAP4 ABNF April 2006
  470. tagged-ext-comp = astring /
  471. tagged-ext-comp *(SP tagged-ext-comp) /
  472. "(" tagged-ext-comp ")"
  473. ;; Extensions that follow this general
  474. ;; syntax should use nstring instead of
  475. ;; astring when appropriate in the context
  476. ;; of the extension.
  477. ;; Note that a message set or a "number"
  478. ;; can always be represented as an "atom".
  479. ;; An URL should be represented as
  480. ;; a "quoted" string.
  481. tagged-ext-simple = sequence-set / number
  482. tagged-ext-val = tagged-ext-simple /
  483. "(" [tagged-ext-comp] ")"
  484. 4. Security Considerations
  485. This document updates ABNF in RFCs 2088, 2342, 3501, 3502, and 3516.
  486. The updated documents must be consulted for security considerations
  487. for the extensions that they define.
  488. As a protocol gets more complex, parser bugs become more common
  489. including buffer overflow, denial of service, and other common
  490. security coding errors. To the extent that this document makes the
  491. parser more complex, it makes this situation worse. To the extent
  492. that this document makes the parser more consistent and thus simpler,
  493. the situation is improved. The impact will depend on how many
  494. deployed IMAP extensions are consistent with this document.
  495. Implementers are encouraged to take care of these issues when
  496. extending existing implementations. Future IMAP extensions should
  497. strive for consistency and simplicity to the greatest extent
  498. possible.
  499. Extensions to IMAP commands that are permitted in NOT AUTHENTICATED
  500. state are more sensitive to these security issues due to the larger
  501. possible attacker community prior to authentication, and the fact
  502. that some IMAP servers run with elevated privileges in that state.
  503. This document does not extend any commands permitted in NOT
  504. AUTHENTICATED state. Future IMAP extensions to commands permitted in
  505. NOT AUTHENTICATED state should favor simplicity over consistency or
  506. extensibility.
  507. Melnikov & Daboo Standards Track [Page 14]
  508. RFC 4466 Collected Extensions to IMAP4 ABNF April 2006
  509. 5. Normative References
  510. [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate
  511. Requirement Levels", BCP 14, RFC 2119, March 1997.
  512. [IMAP4] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL -
  513. VERSION 4rev1", RFC 3501, March 2003.
  514. [ABNF] Crocker, D., Ed., and P. Overell, "Augmented BNF for
  515. Syntax Specifications: ABNF", RFC 4234, October 2005.
  516. [CHARSET] Freed, N. and J. Postel, "IANA Charset Registration
  517. Procedures", BCP 19, RFC 2978, October 2000.
  518. [MULTIAPPEND] Crispin, M., "Internet Message Access Protocol (IMAP) -
  519. MULTIAPPEND Extension", RFC 3502, March 2003.
  520. [NAMESPACE] Gahrns, M. and C. Newman, "IMAP4 Namespace", RFC 2342,
  521. May 1998.
  522. [LITERAL+] Myers, J., "IMAP4 non-synchronizing literals", RFC
  523. 2088, January 1997.
  524. [BINARY] Nerenberg, L., "IMAP4 Binary Content Extension", RFC
  525. 3516, April 2003.
  526. 6. Acknowledgements
  527. This documents is based on ideas proposed by Pete Resnick, Mark
  528. Crispin, Ken Murchison, Philip Guenther, Randall Gellens, and Lyndon
  529. Nerenberg.
  530. However, all errors and omissions must be attributed to the authors
  531. of the document.
  532. Thanks to Philip Guenther, Dave Cridland, Mark Crispin, Chris Newman,
  533. Elwyn Davies, and Barry Leiba for comments and corrections.
  534. literal8 syntax was taken from RFC 3516.
  535. Melnikov & Daboo Standards Track [Page 15]
  536. RFC 4466 Collected Extensions to IMAP4 ABNF April 2006
  537. Authors' Addresses
  538. Alexey Melnikov
  539. Isode Limited
  540. 5 Castle Business Village
  541. 36 Station Road
  542. Hampton, Middlesex, TW12 2BX
  543. UK
  544. EMail: Alexey.Melnikov@isode.com
  545. Cyrus Daboo
  546. EMail: cyrus@daboo.name
  547. Melnikov & Daboo Standards Track [Page 16]
  548. RFC 4466 Collected Extensions to IMAP4 ABNF April 2006
  549. Full Copyright Statement
  550. Copyright (C) The Internet Society (2006).
  551. This document is subject to the rights, licenses and restrictions
  552. contained in BCP 78, and except as set forth therein, the authors
  553. retain all their rights.
  554. This document and the information contained herein are provided on an
  555. "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
  556. OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
  557. ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
  558. INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
  559. INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
  560. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  561. Intellectual Property
  562. The IETF takes no position regarding the validity or scope of any
  563. Intellectual Property Rights or other rights that might be claimed to
  564. pertain to the implementation or use of the technology described in
  565. this document or the extent to which any license under such rights
  566. might or might not be available; nor does it represent that it has
  567. made any independent effort to identify any such rights. Information
  568. on the procedures with respect to rights in RFC documents can be
  569. found in BCP 78 and BCP 79.
  570. Copies of IPR disclosures made to the IETF Secretariat and any
  571. assurances of licenses to be made available, or the result of an
  572. attempt made to obtain a general license or permission for the use of
  573. such proprietary rights by implementers or users of this
  574. specification can be obtained from the IETF on-line IPR repository at
  575. http://www.ietf.org/ipr.
  576. The IETF invites any interested party to bring to its attention any
  577. copyrights, patents or patent applications, or other proprietary
  578. rights that may cover technology that may be required to implement
  579. this standard. Please address the information to the IETF at
  580. ietf-ipr@ietf.org.
  581. Acknowledgement
  582. Funding for the RFC Editor function is provided by the IETF
  583. Administrative Support Activity (IASA).
  584. Melnikov & Daboo Standards Track [Page 17]