1
2
3
4Network Working Group C. Daboo
5Request for Comments: 5464 Apple, Inc.
6Category: Standards Track February 2009
7
8
9 The IMAP METADATA Extension
10
11Status of This Memo
12
13 This document specifies an Internet standards track protocol for the
14 Internet community, and requests discussion and suggestions for
15 improvements. Please refer to the current edition of the "Internet
16 Official Protocol Standards" (STD 1) for the standardization state
17 and status of this protocol. Distribution of this memo is unlimited.
18
19Abstract
20
21 The METADATA extension to the Internet Message Access Protocol
22 permits clients and servers to maintain "annotations" or "metadata"
23 on IMAP servers. It is possible to have annotations on a per-mailbox
24 basis or on the server as a whole. For example, this would allow
25 comments about the purpose of a particular mailbox to be "attached"
26 to that mailbox, or a "message of the day" containing server status
27 information to be made available to anyone logging in to the server.
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55Daboo Standards Track [Page 1]
56
57RFC 5464 The IMAP METADATA Extension February 2009
58
59
60Table of Contents
61
62 1. Introduction and Overview . . . . . . . . . . . . . . . . . . 3
63 2. Conventions Used in This Document . . . . . . . . . . . . . . 3
64 3. Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . 4
65 3.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 4
66 3.2. Namespace of Entries . . . . . . . . . . . . . . . . . . . 4
67 3.2.1. Entry Names . . . . . . . . . . . . . . . . . . . . . 5
68 3.3. Private versus Shared and Access Control . . . . . . . . . 6
69 4. IMAP Protocol Changes . . . . . . . . . . . . . . . . . . . . 7
70 4.1. General Considerations . . . . . . . . . . . . . . . . . . 7
71 4.2. GETMETADATA Command . . . . . . . . . . . . . . . . . . . 8
72 4.2.1. MAXSIZE GETMETADATA Command Option . . . . . . . . . . 9
73 4.2.2. DEPTH GETMETADATA Command Option . . . . . . . . . . . 10
74 4.3. SETMETADATA Command . . . . . . . . . . . . . . . . . . . 10
75 4.4. METADATA Response . . . . . . . . . . . . . . . . . . . . 12
76 4.4.1. METADATA Response with Values . . . . . . . . . . . . 13
77 4.4.2. Unsolicited METADATA Response without Values . . . . . 13
78 5. Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . 14
79 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16
80 6.1. Entry and Attribute Registration Template . . . . . . . . 16
81 6.2. Server Entry Registrations . . . . . . . . . . . . . . . . 16
82 6.2.1. /shared/comment . . . . . . . . . . . . . . . . . . . 17
83 6.2.2. /shared/admin . . . . . . . . . . . . . . . . . . . . 17
84 6.3. Mailbox Entry Registrations . . . . . . . . . . . . . . . 17
85 6.3.1. /shared/comment . . . . . . . . . . . . . . . . . . . 18
86 6.3.2. /private/comment . . . . . . . . . . . . . . . . . . . 18
87 7. Security Considerations . . . . . . . . . . . . . . . . . . . 18
88 8. Normative References . . . . . . . . . . . . . . . . . . . . . 19
89 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 19
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111Daboo Standards Track [Page 2]
112
113RFC 5464 The IMAP METADATA Extension February 2009
114
115
1161. Introduction and Overview
117
118 The goal of the METADATA extension is to provide a means for clients
119 to set and retrieve "annotations" or "metadata" on an IMAP server.
120 The annotations can be associated with specific mailboxes or the
121 server as a whole. The server can choose to support only server
122 annotations or both server and mailbox annotations.
123
124 A server that supports both server and mailbox annotations indicates
125 the presence of this extension by returning "METADATA" as one of the
126 supported capabilities in the CAPABILITY command response.
127
128 A server that supports only server annotations indicates the presence
129 of this extension by returning "METADATA-SERVER" as one of the
130 supported capabilities in the CAPABILITY command response.
131
132 A server that supports unsolicited annotation change responses MUST
133 support the "ENABLE" [RFC5161] extension to allow clients to turn
134 that feature on.
135
136 The METADATA extension adds two new commands and one new untagged
137 response to the IMAP base protocol.
138
139 This extension makes the following changes to the IMAP protocol:
140
141 o adds a new SETMETADATA command
142
143 o adds a new GETMETADATA command
144
145 o adds a new METADATA untagged response
146
147 o adds a new METADATA response code
148
149 The rest of this document describes the data model and protocol
150 changes more rigorously.
151
1522. Conventions Used in This Document
153
154 In examples, "C:" and "S:" indicate lines sent by the client and
155 server, respectively.
156
157 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
158 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
159 document are to be interpreted as described in [RFC2119].
160
161 Whitespace and line breaks have been added to the examples in this
162 document to promote readability.
163
164
165
166
167Daboo Standards Track [Page 3]
168
169RFC 5464 The IMAP METADATA Extension February 2009
170
171
1723. Data Model
173
1743.1. Overview
175
176 Mailboxes or the server as a whole may have zero or more annotations
177 associated with them. An annotation contains a uniquely named entry,
178 which has a value. Annotations can be added to mailboxes when a
179 mailbox name is provided as the first argument to the SETMETADATA
180 command, or to the server as a whole when the empty string is
181 provided as the first argument to the command.
182
183 For example, a general comment being added to a mailbox may have an
184 entry name of "/comment" and a value of "Really useful mailbox".
185
186 The protocol changes to IMAP described below allow a client to access
187 or change the values of any annotation entry, assuming it has
188 sufficient access rights to do so.
189
1903.2. Namespace of Entries
191
192 Each annotation is an entry that has a hierarchical name, with each
193 component of the name separated by a slash ("/"). An entry name MUST
194 NOT contain two consecutive "/" characters and MUST NOT end with a
195 "/" character.
196
197 The value of an entry is NIL (has no value), or a string or binary
198 data of zero or more octets. A string MAY contain multiple lines of
199 text. Clients MUST use the CRLF (0x0D 0x0A) character octet sequence
200 to represent line ends in a multi-line string value.
201
202 Entry names MUST NOT contain asterisk ("*") or percent ("%")
203 characters and MUST NOT contain non-ASCII characters or characters
204 with octet values in the range 0x00 to 0x19. Invalid entry names
205 result in a BAD response in any IMAP command in which they are used.
206
207 Entry names are case-insensitive.
208
209 Use of control or punctuation characters in entry names is strongly
210 discouraged.
211
212 This specification defines an initial set of entry names available
213 for use with mailbox and server annotations. In addition, an
214 extension mechanism is described to allow additional names to be
215 added for extensibility.
216
217 The first component in entry names defines the scope of the
218 annotation. Currently, only the prefixes "/private" or "/shared" are
219 defined. These prefixes are used to indicate whether an annotation
220
221
222
223Daboo Standards Track [Page 4]
224
225RFC 5464 The IMAP METADATA Extension February 2009
226
227
228 is stored on a per-user basis ("/private") and not visible to other
229 users, or whether an annotation is shared between authorized users
230 ("/shared") with a single value that can be read and changed by
231 authorized users with appropriate access. See Section 3.3 for
232 details.
233
234 Entry names can have any number of components starting at 2, unless
235 they fall under the vendor namespaces (i.e., have a /shared/vendor/
236 <vendor-token> or /private/vendor/<vendor-token> prefix as described
237 below), in which case they have at least 4 components.
238
2393.2.1. Entry Names
240
241 Entry names MUST be specified in a Standards Track or IESG-approved
242 Experimental RFC, or fall under the vendor namespace. See
243 Section 6.1 for the registration template.
244
2453.2.1.1. Server Entries
246
247 These entries are set or retrieved when the mailbox name argument to
248 the new SETMETADATA or GETMETADATA command is the empty string.
249
250 /shared/comment
251
252 Defines a comment or note that is associated with the server and
253 that is shared with authorized users of the server.
254
255 /shared/admin
256
257 Indicates a method for contacting the server administrator. The
258 value MUST be a URI (e.g., a mailto: or tel: URL). This entry is
259 always read-only -- clients cannot change it. It is visible to
260 authorized users of the system.
261
262 /shared/vendor/<vendor-token>
263
264 Defines the top level of shared entries associated with the
265 server, as created by a particular product of some vendor. This
266 entry can be used by vendors to provide server- or client-specific
267 annotations. The vendor-token MUST be registered with IANA, using
268 the Application Configuration Access Protocol (ACAP) [RFC2244]
269 vendor subtree registry.
270
271 /private/vendor/<vendor-token>
272
273 Defines the top level of private entries associated with the
274 server, as created by a particular product of some vendor. This
275 entry can be used by vendors to provide server- or client-specific
276
277
278
279Daboo Standards Track [Page 5]
280
281RFC 5464 The IMAP METADATA Extension February 2009
282
283
284 annotations. The vendor-token MUST be registered with IANA, using
285 the ACAP [RFC2244] vendor subtree registry.
286
2873.2.1.2. Mailbox Entries
288
289 These entries are set or retrieved when the mailbox name argument to
290 the new SETMETADATA or GETMETADATA command is not the empty string.
291
292 /shared/comment
293
294 Defines a shared comment or note associated with a mailbox.
295
296 /private/comment
297
298 Defines a private (per-user) comment or note associated with a
299 mailbox.
300
301 /shared/vendor/<vendor-token>
302
303 Defines the top level of shared entries associated with a specific
304 mailbox, as created by a particular product of some vendor. This
305 entry can be used by vendors to provide client-specific
306 annotations. The vendor-token MUST be registered with IANA, using
307 the ACAP [RFC2244] vendor subtree registry.
308
309 /private/vendor/<vendor-token>
310
311 Defines the top level of private entries associated with a
312 specific mailbox, as created by a particular product of some
313 vendor. This entry can be used by vendors to provide client-
314 specific annotations. The vendor-token MUST be registered with
315 IANA, using the ACAP [RFC2244] vendor subtree registry.
316
3173.3. Private versus Shared and Access Control
318
319 In the absence of the ACL (Access Control List) extension [RFC4314],
320 users can only set and retrieve private or shared mailbox annotations
321 on a mailbox that exists and is returned to them via a LIST or LSUB
322 command, and on which they have either read or write access to the
323 actual message content of the mailbox (as determined by the READ-ONLY
324 and READ-WRITE response codes as described in Section 5.2 of
325 [RFC4314]).
326
327 When the ACL extension [RFC4314] is present, users can only set and
328 retrieve private or shared mailbox annotations on a mailbox on which
329 they have the "l" right and any one of the "r", "s", "w", "i", or "p"
330 rights.
331
332
333
334
335Daboo Standards Track [Page 6]
336
337RFC 5464 The IMAP METADATA Extension February 2009
338
339
340 If a client attempts to set or retrieve annotations on mailboxes that
341 do not satisfy the conditions above, the server MUST respond with a
342 NO response.
343
344 Users can always retrieve private or shared server annotations if
345 they exist. Servers MAY restrict the creation of private or shared
346 server annotations as appropriate. When restricted, the server MUST
347 return a NO response when the SETMETADATA command is used to try to
348 create a server annotation.
349
350 If the METADATA extension is present, support for shared annotations
351 is REQUIRED, whilst support for private annotations is OPTIONAL.
352 This recognizes the fact that support for private annotations may
353 introduce significantly more complexity to a server in terms of
354 tracking ownership of the annotations, how quota is determined for
355 users based on their own annotations, etc.
356
3574. IMAP Protocol Changes
358
3594.1. General Considerations
360
361 The new SETMETADATA command and the METADATA response each have a
362 mailbox name argument. An empty string is used for the mailbox name
363 to signify server annotations. A non-empty string is used to signify
364 mailbox annotations attached to the corresponding mailbox.
365
366 Servers SHOULD ensure that mailbox annotations are automatically
367 moved when the mailbox they refer to is renamed, i.e., the
368 annotations follow the mailbox. This applies to a rename of the
369 INBOX, with the additional behavior that the annotations are copied
370 from the original INBOX to the renamed mailbox, i.e., mailbox
371 annotations are preserved on the INBOX when it is renamed.
372
373 Servers SHOULD delete annotations for a mailbox when the mailbox is
374 deleted, so that a mailbox created with the same name as a previously
375 existing mailbox does not inherit the old mailbox annotations.
376
377 Servers SHOULD allow annotations on all 'types' of mailboxes,
378 including ones reporting \Noselect for their LIST response. Servers
379 can implicitly remove \Noselect mailboxes when all child mailboxes
380 are removed, and, at that time any annotations associated with the
381 \Noselect mailbox SHOULD be removed.
382
383 The server is allowed to impose limitations on the size of any one
384 annotation or the total number of annotations for a single mailbox or
385 for the server as a whole. However, the server MUST accept an
386 annotation data size of at least 1024 bytes, and an annotation count
387 per server or mailbox of at least 10.
388
389
390
391Daboo Standards Track [Page 7]
392
393RFC 5464 The IMAP METADATA Extension February 2009
394
395
396 Some annotations may be "read-only" -- i.e., they are set by the
397 server and cannot be changed by the client. Also, such annotations
398 may be "computed" -- i.e., the value changes based on underlying
399 properties of the mailbox or server. For example, an annotation
400 reporting the total size of all messages in the mailbox would change
401 as messages are added or removed. Or, an annotation containing an
402 IMAP URL for the mailbox would change if the mailbox was renamed.
403
404 Servers MAY support sending unsolicited responses for use when
405 annotations are changed by some "third-party" (see Section 4.4). In
406 order to do so, servers MUST support the ENABLE command [RFC5161] and
407 MUST only send unsolicited responses if the client used the ENABLE
408 command [RFC5161] extension with the capability string "METADATA" or
409 "METADATA-SERVER" earlier in the session, depending on which of those
410 capabilities is supported by the server.
411
4124.2. GETMETADATA Command
413
414 This extension adds the GETMETADATA command. This allows clients to
415 retrieve server or mailbox annotations.
416
417 This command is only available in authenticated or selected state
418 [RFC3501].
419
420 Arguments: mailbox-name
421 options
422 entry-specifier
423
424 Responses: required METADATA response
425
426 Result: OK - command completed
427 NO - command failure: can't access annotations on
428 the server
429 BAD - command unknown or arguments invalid
430
431 When the mailbox name is the empty string, this command retrieves
432 server annotations. When the mailbox name is not empty, this command
433 retrieves annotations on the specified mailbox.
434
435 Options MAY be included with this command and are defined below.
436
437 Example:
438
439 C: a GETMETADATA "" /shared/comment
440 S: * METADATA "" (/shared/comment "Shared comment")
441 S: a OK GETMETADATA complete
442
443
444
445
446
447Daboo Standards Track [Page 8]
448
449RFC 5464 The IMAP METADATA Extension February 2009
450
451
452 In the above example, the contents of the value of the "/shared/
453 comment" server entry is requested by the client and returned by
454 the server.
455
456 Example:
457
458 C: a GETMETADATA "INBOX" /private/comment
459 S: * METADATA "INBOX" (/private/comment "My own comment")
460 S: a OK GETMETADATA complete
461
462 In the above example, the contents of the value of the "/private/
463 comment" mailbox entry for the mailbox "INBOX" is requested by the
464 client and returned by the server.
465
466 Entry specifiers can be lists of atomic specifiers, so that multiple
467 annotations may be returned in a single GETMETADATA command.
468
469 Example:
470
471 C: a GETMETADATA "INBOX" (/shared/comment /private/comment)
472 S: * METADATA "INBOX" (/shared/comment "Shared comment"
473 /private/comment "My own comment")
474 S: a OK GETMETADATA complete
475
476 In the above example, the values of the two server entries
477 "/shared/comment" and "/private/comment" on the mailbox "INBOX"
478 are requested by the client and returned by the server.
479
4804.2.1. MAXSIZE GETMETADATA Command Option
481
482 When the MAXSIZE option is specified with the GETMETADATA command, it
483 restricts which entry values are returned by the server. Only entry
484 values that are less than or equal in octet size to the specified
485 MAXSIZE limit are returned. If there are any entries with values
486 larger than the MAXSIZE limit, the server MUST include the METADATA
487 LONGENTRIES response code in the tagged OK response for the
488 GETMETADATA command. The METADATA LONGENTRIES response code returns
489 the size of the biggest entry value requested by the client that
490 exceeded the MAXSIZE limit.
491
492 Example:
493
494 C: a GETMETADATA "INBOX" (MAXSIZE 1024)
495 (/shared/comment /private/comment)
496 S: * METADATA "INBOX" (/private/comment "My own comment")
497 S: a OK [METADATA LONGENTRIES 2199] GETMETADATA complete
498
499
500
501
502
503Daboo Standards Track [Page 9]
504
505RFC 5464 The IMAP METADATA Extension February 2009
506
507
508 In the above example, the values of the two server entries
509 "/shared/comment" and "/private/comment" on the mailbox "INBOX"
510 are requested by the client, which wants to restrict the size of
511 returned values to 1024 octets. In this case, the "/shared/
512 comment" entry value is 2199 octets and is not returned.
513
5144.2.2. DEPTH GETMETADATA Command Option
515
516 When the DEPTH option is specified with the GETMETADATA command, it
517 extends the list of entry values returned by the server. For each
518 entry name specified in the GETMETADATA command, the server returns
519 the value of the specified entry name (if it exists), plus all
520 entries below the entry name up to the specified DEPTH. Three values
521 are allowed for DEPTH:
522
523 "0" - no entries below the specified entry are returned
524 "1" - only entries immediately below the specified entry are returned
525 "infinity" - all entries below the specified entry are returned
526
527 Thus, "depth 1" for an entry "/a" will match "/a" as well as its
528 children entries (e.g., "/a/b"), but will not match grandchildren
529 entries (e.g., "/a/b/c").
530
531 If the DEPTH option is not specified, this is the same as specifying
532 "DEPTH 0".
533
534 Example:
535
536 C: a GETMETADATA "INBOX" (DEPTH 1)
537 (/private/filters/values)
538 S: * METADATA "INBOX" (/private/filters/values/small
539 "SMALLER 5000" /private/filters/values/boss
540 "FROM \"boss@example.com\"")
541 S: a OK GETMETADATA complete
542
543 In the above example, 2 entries below the /private/filters/values
544 entry exist on the mailbox "INBOX": "/private/filters/values/
545 small" and "/private/filters/values/boss".
546
5474.3. SETMETADATA Command
548
549 This extension adds the SETMETADATA command. This allows clients to
550 set annotations.
551
552 This command is only available in authenticated or selected state
553 [RFC3501].
554
555
556
557
558
559Daboo Standards Track [Page 10]
560
561RFC 5464 The IMAP METADATA Extension February 2009
562
563
564 Arguments: mailbox-name
565 entry
566 value
567 list of entry, values
568
569 Responses: no specific responses for this command
570
571 Result: OK - command completed
572 NO - command failure: can't set annotations,
573 or annotation too big or too many
574 BAD - command unknown or arguments invalid
575
576 This command sets the specified list of entries by adding or
577 replacing the specified values provided, on the specified existing
578 mailboxes or on the server (if the mailbox argument is the empty
579 string). Clients can use NIL for the value of entries it wants to
580 remove. The server SHOULD NOT return a METADATA response containing
581 the updated annotation data. Clients MUST NOT assume that a METADATA
582 response will be sent, and MUST assume that if the command succeeds,
583 then the annotation has been changed.
584
585 If the server is unable to set an annotation because the size of its
586 value is too large, the server MUST return a tagged NO response with
587 a "[METADATA MAXSIZE NNN]" response code when NNN is the maximum
588 octet count that it is willing to accept.
589
590 If the server is unable to set a new annotation because the maximum
591 number of allowed annotations has already been reached, the server
592 MUST return a tagged NO response with a "[METADATA TOOMANY]" response
593 code.
594
595 If the server is unable to set a new annotation because it does not
596 support private annotations on one of the specified mailboxes, the
597 server MUST return a tagged NO response with a "[METADATA NOPRIVATE]"
598 response code.
599
600 When any one annotation fails to be set, resulting in a tagged NO
601 response from the server, then the server MUST NOT change the values
602 for other annotations specified in the SETMETADATA command.
603
604 Example:
605
606 C: a SETMETADATA INBOX (/private/comment {33}
607 S: + ready for data
608 My new comment across
609 two lines.
610 )
611 S: a OK SETMETADATA complete
612
613
614
615Daboo Standards Track [Page 11]
616
617RFC 5464 The IMAP METADATA Extension February 2009
618
619
620 In the above example, the entry "/private/comment" for the mailbox
621 "INBOX" is created (if not already present) and the value set to a
622 multi-line string.
623
624 Example:
625
626 C: a SETMETADATA INBOX (/private/comment NIL)
627 S: a OK SETMETADATA complete
628
629 In the above example, the entry "/private/comment" is removed from
630 the mailbox "INBOX".
631
632 Multiple entries can be set in a single SETMETADATA command by
633 listing entry-value pairs in the list.
634
635 Example:
636
637 C: a SETMETADATA INBOX (/private/comment "My new comment"
638 /shared/comment "This one is for you!")
639 S: a OK SETMETADATA complete
640
641 In the above example, the entries "/private/comment" and "/shared/
642 comment" for the mailbox "INBOX" are created (if not already
643 present) and the values set as specified.
644
645 Example:
646
647 C: a SETMETADATA INBOX (/private/comment "My new comment")
648 S: a NO [METADATA TOOMANY] SETMETADATA failed
649
650 In the above example, the server is unable to set the requested
651 (new) annotation as it has reached the limit on the number of
652 annotations it can support on the specified mailbox.
653
6544.4. METADATA Response
655
656 The METADATA response displays results of a GETMETADATA command, or
657 can be returned as an unsolicited response at any time by the server
658 in response to a change in a server or mailbox annotation.
659
660 When unsolicited responses are activated by the ENABLE [RFC5161]
661 command for this extension, servers MUST send unsolicited METADATA
662 responses if server or mailbox annotations are changed by a third-
663 party, allowing servers to keep clients updated with changes.
664
665 Unsolicited METADATA responses MUST only contain entry names, not the
666 values. If the client wants to update any cached values, it must
667 explicitly retrieve those using a GETMETADATA command.
668
669
670
671Daboo Standards Track [Page 12]
672
673RFC 5464 The IMAP METADATA Extension February 2009
674
675
676 The METADATA response can contain multiple entries in a single
677 response, but the server is free to return multiple responses for
678 each entry or group of entries, if it desires.
679
680 This response is only available in authenticated or selected state
681 [RFC3501].
682
6834.4.1. METADATA Response with Values
684
685 The response consists of a list of entry-value pairs.
686
687 Example:
688
689 C: a GETMETADATA "" /shared/comment
690 S: * METADATA "" (/shared/comment "My comment")
691 S: a OK GETMETADATA complete
692
693 In the above example, a single entry with its value is returned by
694 the server.
695
696 Example:
697
698 C: a GETMETADATA "INBOX" /private/comment /shared/comment
699 S: * METADATA "INBOX" (/private/comment "My comment"
700 /shared/comment "Its sunny outside!")
701 S: a OK GETMETADATA complete
702
703 In the above example, two entries and their values are returned by
704 the server.
705
706 Example:
707
708 C: a GETMETADATA "INBOX" /private/comment /shared/comment
709 S: * METADATA "INBOX" (/private/comment "My comment")
710 S: * METADATA "INBOX" (/shared/comment "Its sunny outside!")
711 S: a OK GETMETADATA complete
712
713 In the above example, the server returns two separate responses
714 for each of the two entries requested.
715
7164.4.2. Unsolicited METADATA Response without Values
717
718 The response consists of a list of entries, each of which have
719 changed on the server or mailbox.
720
721 Example:
722
723
724
725
726
727Daboo Standards Track [Page 13]
728
729RFC 5464 The IMAP METADATA Extension February 2009
730
731
732 C: a NOOP
733 S: * METADATA "" /shared/comment
734 S: a OK NOOP complete
735
736 In the above example, the server indicates that the "/shared/
737 comment" server entry has been changed.
738
739 Example:
740
741 C: a NOOP
742 S: * METADATA "INBOX" /shared/comment /private/comment
743 S: a OK NOOP complete
744
745 In the above example, the server indicates a change to two mailbox
746 entries.
747
7485. Formal Syntax
749
750 The following syntax specification uses the Augmented Backus-Naur
751 Form (ABNF) notation as specified in [RFC5234].
752
753 Non-terminals referenced but not defined below are as defined by
754 [RFC3501], with the new definitions in [RFC4466] superseding those in
755 [RFC3501].
756
757 Except as noted otherwise, all alphabetic characters are case-
758 insensitive. The use of upper or lower case characters to define
759 token strings is for editorial clarity only. Implementations MUST
760 accept these strings in a case-insensitive fashion.
761
762 capability =/ "METADATA" / "METADATA-SERVER"
763 ; defines the capabilities for this extension.
764
765 command-auth =/ setmetadata / getmetadata
766 ; adds to original IMAP command
767
768 entries = entry /
769 "(" entry *(SP entry) ")"
770 ; entry specifiers
771
772 entry = astring
773 ; slash-separated path to entry
774 ; MUST NOT contain "*" or "%"
775
776 entry-value = entry SP value
777
778 entry-values = "(" entry-value *(SP entry-value) ")"
779
780
781
782
783Daboo Standards Track [Page 14]
784
785RFC 5464 The IMAP METADATA Extension February 2009
786
787
788 entry-list = entry *(SP entry)
789 ; list of entries used in unsolicited
790 ; METADATA response
791
792 getmetadata = "GETMETADATA" [SP getmetadata-options]
793 SP mailbox SP entries
794 ; empty string for mailbox implies
795 ; server annotation.
796
797 getmetadata-options = "(" getmetadata-option
798 *(SP getmetadata-option) ")"
799
800 getmetadata-option = tagged-ext-label [SP tagged-ext-val]
801 ; tagged-ext-label and tagged-ext-val
802 ; are defined in [RFC4466].
803
804 maxsize-opt = "MAXSIZE" SP number
805 ; Used as a getmetadata-option
806
807 metadata-resp = "METADATA" SP mailbox SP
808 (entry-values / entry-list)
809 ; empty string for mailbox implies
810 ; server annotation.
811
812 response-payload =/ metadata-resp
813 ; adds to original IMAP data responses
814
815 resp-text-code =/ "METADATA" SP "LONGENTRIES" SP number
816 ; new response codes for GETMETADATA
817
818 resp-text-code =/ "METADATA" SP ("MAXSIZE" SP number /
819 "TOOMANY" / "NOPRIVATE")
820 ; new response codes for SETMETADATA
821 ; failures
822
823 scope-opt = "DEPTH" SP ("0" / "1" / "infinity")
824 ; Used as a getmetadata-option
825
826 setmetadata = "SETMETADATA" SP mailbox
827 SP entry-values
828 ; empty string for mailbox implies
829 ; server annotation.
830
831 value = nstring / literal8
832
833
834
835
836
837
838
839Daboo Standards Track [Page 15]
840
841RFC 5464 The IMAP METADATA Extension February 2009
842
843
8446. IANA Considerations
845
846 All entries MUST have either "/shared" or "/private" as a prefix.
847 Entry names MUST be specified in a Standards Track or IESG-approved
848 Experimental RFC, or fall under the vendor namespace (i.e., use
849 /shared/vendor/<vendor-token> or /private/vendor/<vendor-token> as
850 the prefix).
851
852 Each entry registration MUST include a content-type that is used to
853 indicate the nature of the annotation value. Where applicable, a
854 charset parameter MUST be included with the content-type.
855
8566.1. Entry and Attribute Registration Template
857
858 To: iana@iana.org
859 Subject: IMAP METADATA Entry Registration
860
861 Type: [Either "Mailbox" or "Server"]
862
863 Name: [the name of the entry]
864
865 Description: [a description of what the entry is for]
866
867 Content-type: [MIME Content-Type and charset for the entry value]
868
869 RFC Number: [for entries published as RFCs]
870
871 Contact: [email and/or physical address to contact for
872 additional information]
873
8746.2. Server Entry Registrations
875
876 The following templates specify the IANA registrations of annotation
877 entries specified in this document.
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895Daboo Standards Track [Page 16]
896
897RFC 5464 The IMAP METADATA Extension February 2009
898
899
9006.2.1. /shared/comment
901
902 To: iana@iana.org
903 Subject: IMAP METADATA Entry Registration
904
905 Type: Server
906
907 Name: /shared/comment
908
909 Description: Defines a comment or note that is associated
910 with the server and that is shared with
911 authorized users of the server.
912
913 Content-type: text/plain; charset=utf-8
914
915 RFC Number: RFC 5464
916
917 Contact: IMAP Extensions mailto:ietf-imapext@imc.org
918
9196.2.2. /shared/admin
920
921 To: iana@iana.org
922 Subject: IMAP METADATA Entry Registration
923
924 Type: Server
925
926 Name: /shared/admin
927
928 Description: Indicates a method for contacting the server
929 administrator. The value MUST be a URI (e.g., a
930 mailto: or tel: URL). This entry is always
931 read-only -- clients cannot change it. It is visible
932 to authorized users of the system.
933
934 Content-type: text/plain; charset=utf-8
935
936 RFC Number: RFC 5464
937
938 Contact: IMAP Extensions mailto:ietf-imapext@imc.org
939
9406.3. Mailbox Entry Registrations
941
942 The following templates specify the IANA registrations of annotation
943 entries specified in this document.
944
945
946
947
948
949
950
951Daboo Standards Track [Page 17]
952
953RFC 5464 The IMAP METADATA Extension February 2009
954
955
9566.3.1. /shared/comment
957
958 To: iana@iana.org
959 Subject: IMAP METADATA Entry Registration
960
961 Type: Mailbox
962
963 Name: /shared/comment
964
965 Description: Defines a shared comment or note associated with a
966 mailbox.
967
968 Content-type: text/plain; charset=utf-8
969
970 RFC Number: RFC 5464
971
972 Contact: IMAP Extensions mailto:ietf-imapext@imc.org
973
9746.3.2. /private/comment
975
976 To: iana@iana.org
977 Subject: IMAP METADATA Entry Registration
978
979 Type: Mailbox
980
981 Name: /private/comment
982
983 Description: Defines a private comment or note associated with a
984 mailbox.
985
986 Content-type: text/plain; charset=utf-8
987
988 RFC Number: RFC 5464
989
990 Contact: IMAP Extensions mailto:ietf-imapext@imc.org
991
9927. Security Considerations
993
994 The security considerations in Section 11 of [RFC3501] apply here
995 with respect to protecting annotations from snooping. Servers MAY
996 choose to only support the METADATA and/or METADATA-SERVER extensions
997 after a privacy layer has been negotiated by the client.
998
999 Annotations can contain arbitrary data of varying size. As such,
1000 servers MUST ensure that size limits are enforced to prevent a user
1001 from using up all available space on a server and preventing use by
1002 others. Clients MUST treat annotation data values as an "untrusted"
1003 source of data as it is possible for it to contain malicious content.
1004
1005
1006
1007Daboo Standards Track [Page 18]
1008
1009RFC 5464 The IMAP METADATA Extension February 2009
1010
1011
1012 Annotations whose values are intended to remain private MUST be
1013 stored only in entries that have the "/private" prefix on the entry
1014 name.
1015
1016 Excluding the above issues, the METADATA extension does not raise any
1017 security considerations that are not present in the base IMAP
1018 protocol, and these issues are discussed in [RFC3501].
1019
10208. Normative References
1021
1022 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
1023 Requirement Levels", BCP 14, RFC 2119, March 1997.
1024
1025 [RFC2244] Newman, C. and J. Myers, "ACAP -- Application
1026 Configuration Access Protocol", RFC 2244, November 1997.
1027
1028 [RFC3501] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
1029 4rev1", RFC 3501, March 2003.
1030
1031 [RFC4314] Melnikov, A., "IMAP4 Access Control List (ACL) Extension",
1032 RFC 4314, December 2005.
1033
1034 [RFC4466] Melnikov, A. and C. Daboo, "Collected Extensions to IMAP4
1035 ABNF", RFC 4466, April 2006.
1036
1037 [RFC5161] Gulbrandsen, A. and A. Melnikov, "The IMAP ENABLE
1038 Extension", RFC 5161, March 2008.
1039
1040 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax
1041 Specifications: ABNF", STD 68, RFC 5234, January 2008.
1042
1043Appendix A. Acknowledgments
1044
1045 The ideas expressed in this document are based on the message
1046 annotation document that was co-authored by Randall Gellens. The
1047 author would like to thank the following individuals for contributing
1048 their ideas and support for writing this specification: Dave
1049 Cridland, Arnt Gulbrandsen, Dan Karp, Alexey Melnikov, Ken Murchison,
1050 Chris Newman, and Michael Wener.
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063Daboo Standards Track [Page 19]
1064
1065RFC 5464 The IMAP METADATA Extension February 2009
1066
1067
1068Author's Address
1069
1070 Cyrus Daboo
1071 Apple Inc.
1072 1 Infinite Loop
1073 Cupertino, CA 95014
1074 USA
1075
1076 EMail: cyrus@daboo.name
1077 URI: http://www.apple.com/
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119Daboo Standards Track [Page 20]
1120
1121RFC 5464 The IMAP METADATA Extension February 2009
1122
1123
1124Full Copyright Statement
1125
1126 Copyright (C) The IETF Trust (2009).
1127
1128 This document is subject to the rights, licenses and restrictions
1129 contained in BCP 78, and except as set forth therein, the authors
1130 retain all their rights.
1131
1132 This document and the information contained herein are provided on an
1133 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
1134 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
1135 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
1136 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
1137 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
1138 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
1139
1140Intellectual Property
1141
1142 The IETF takes no position regarding the validity or scope of any
1143 Intellectual Property Rights or other rights that might be claimed to
1144 pertain to the implementation or use of the technology described in
1145 this document or the extent to which any license under such rights
1146 might or might not be available; nor does it represent that it has
1147 made any independent effort to identify any such rights. Information
1148 on the procedures with respect to rights in RFC documents can be
1149 found in BCP 78 and BCP 79.
1150
1151 Copies of IPR disclosures made to the IETF Secretariat and any
1152 assurances of licenses to be made available, or the result of an
1153 attempt made to obtain a general license or permission for the use of
1154 such proprietary rights by implementers or users of this
1155 specification can be obtained from the IETF on-line IPR repository at
1156 http://www.ietf.org/ipr.
1157
1158 The IETF invites any interested party to bring to its attention any
1159 copyrights, patents or patent applications, or other proprietary
1160 rights that may cover technology that may be required to implement
1161 this standard. Please address the information to the IETF at
1162 ietf-ipr@ietf.org.
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175Daboo Standards Track [Page 21]
1176
1177
1178