idnits 2.17.1 draft-ietf-imapext-annotate-06.txt: ** The Abstract section seems to be numbered Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** The document seems to lack a 1id_guidelines paragraph about the list of Shadow Directories. == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Introduction section. ** There are 7 instances of too long lines in the document, the longest one being 8 characters in excess of 72. ** The abstract seems to contain references ([IMAP4]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (March 2003) is 7712 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'MIME' is mentioned on line 391, but not defined == Unused Reference: 'SMTP-DSN' is defined on line 922, but no explicit reference was found in the text ** Obsolete normative reference: RFC 2234 (ref. 'ABNF') (Obsoleted by RFC 4234) ** Obsolete normative reference: RFC 2060 (ref. 'IMAP4') (Obsoleted by RFC 3501) -- Possible downref: Non-RFC (?) normative reference: ref. 'MDNSENT' ** Obsolete normative reference: RFC 1891 (ref. 'SMTP-DSN') (Obsoleted by RFC 3461) -- Possible downref: Non-RFC (?) normative reference: ref. 'SORT-EXT' -- Obsolete informational reference (is this intentional?): RFC 2086 (ref. 'ACL-EXT') (Obsoleted by RFC 4314) Summary: 9 errors (**), 0 flaws (~~), 4 warnings (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 IMAP Extensions Working Group R. Gellens 2 Internet Draft: IMAP ANNOTATE Extension C. Daboo 3 Document: draft-ietf-imapext-annotate-06.txt March 2003 5 IMAP ANNOTATE Extension 7 Status of this Memo 9 This document is an Internet-Draft and is in full conformance with 10 all provisions of Section 10 of RFC2026. 12 Internet-Drafts are working documents of the Internet Engineering 13 Task Force (IETF), its areas, and its working groups. Note that 14 other groups may also distribute working documents as 15 Internet-Drafts. 17 Internet-Drafts are draft documents valid for a maximum of six 18 months and may be updated, replaced, or obsoleted by other documents 19 at any time. It is inappropriate to use Internet-Drafts as 20 reference material or to cite them other than as "work in progress." 22 The list of current Internet-Drafts can be accessed at 23 http://www.ietf.org/ietf/1id-abstracts.txt. 25 The list of Internet- Draft Shadow Directories can be accessed at 26 http://www.ietf.org/shadow.html. 28 Copyright Notice 30 Copyright (C) The Internet Society 2003. All Rights Reserved. 32 Table of Contents 33 1 Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . 2 34 2 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . 2 35 3 Conventions Used in This Document . . . . . . . . . . . . . . 2 36 4 Open Issues . . . . . . . . . . . . . . . . . . . . . . . . 3 37 5 Change History . . . . . . . . . . . . . . . . . . . . . . . 3 38 6 Introduction and Overview . . . . . . . . . . . . . . . . . 4 39 7 Data Model . . . . . . . . . . . . . . . . . . . . . . . . . 5 40 7.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . 5 41 7.2 Namespace of Entries and Attributes . . . . . . . . . . . 6 42 7.2.1 Entry Names . . . . . . . . . . . . . . . . . . . . 6 43 7.2.2 Attribute Names . . . . . . . . . . . . . . . . . . . 8 44 8 Private versus Shared and Access Control . . . . . . . . . . 9 45 9 IMAP Protocol Changes . . . . . . . . . . . . . . . . . . . . 10 46 9.1 Optional parameters with the SELECT/EXAMINE commands . . 10 47 9.2 ANNOTATION Message Data Item in FETCH Command . . . . . . 11 48 9.3 ANNOTATION Message Data Item in FETCH Response . . . . . 12 49 9.4 ANNOTATION Message Data Item in STORE . . . . . . . . . . 13 50 9.5 ANNOTATION interaction with COPY . . . . . . . . . . . . 15 51 9.6 ANNOTATION Message Data Item in APPEND . . . . . . . . . 15 52 9.7 ANNOTATION Criterion in SEARCH . . . . . . . . . . . . . 15 53 9.8 ANNOTATION Key in SORT . . . . . . . . . . . . . . . . . 16 54 10 Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . 16 55 11 IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 56 11.1 Entry and Attribute Registration Template . . . . . . . 18 57 12 Security Considerations . . . . . . . . . . . . . . . . . . . 18 58 13 Normative References . . . . . . . . . . . . . . . . . . . . 19 59 14 Informative References . . . . . . . . . . . . . . . . . . . 19 60 15 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . 19 61 16 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 19 62 17 Full Copyright Statement . . . . . . . . . . . . . . . . . . 20 64 1 Abstract 66 The ANNOTATE extension to the Internet Message Access Protocol 67 [IMAP4] permits clients and servers to maintain "metadata" for 68 messages stored in an IMAP4 mailbox. 70 2 Discussion 72 Public comments can be sent to the IETF IMAP Extensions mailing 73 list, . To subscribe, send a message to 74 with the word SUBSCRIBE as the body. 75 Private comments should be sent to the authors. 77 3 Conventions Used in This Document 79 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 80 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 81 document are to be interpreted as described in RFC 2119 [KEYWORDS]. 83 Formal syntax is defined using ABNF [ABNF] as modified by [IMAP4]. 85 In examples, "C:" and "S:" indicate lines sent by the client and 86 server respectively. Line breaks not preceded by a "C:" or "S:" are 87 for editorial clarity only. 89 4 Open Issues 91 1. Use of utf8 for entry/attributes and values? 93 5 Change History 95 Changes from -05 to -06: 96 1. Split references into Normative and Informative. 97 2. Reworked flags to allow IMAP4 flag prefix to appear in annotation name. 98 3. Removed smtp-envelope annotation - a future extension can add this. 99 4. Changed subject to altsubject. 100 5. Added $MDNSent flag and reference to document. 101 6. Cleaned up formal syntax to use IMAP string type for entry 102 and attributes, with requirements on how the string is formatted. 103 7. Use of ACAP vendor subtree registry for vendor tokens. 104 8. Fixed STORE syntax. 106 Changes from -04 to -05: 107 1. Fixed examples to match formal syntax for FETCH responses where 108 parenthesis do not appear around entry-att items. 110 Changes from -03 to -04: 111 1. Fixed attrib/attrib-match grammar to use "." instead of "/". 112 2. Add text for server to reject unknown . 113 3. Do not allow empty part-specifier. 114 4. Store NIL to value to delete. 115 5. Comment on COPY interaction with ANNOTATE. 116 6. Added comment that IMAP flags are mapped one-to-one with their 117 corresponding FLAGS items. 118 7. Added comment that the recent flag annotation is read-only. 120 Changes from -02 to -03: 121 1. Removed reference to status modtime item. 122 2. Added missing 'notify' and 'ret' dsn annotations for 123 /message/smtp-envelope. 124 3. Added requirement to store data permanently - no 125 'session only' annotations. 126 4. Removed Access Control section. Replaced with comments 127 on read-only/read-write mailboxes and storing private or 128 shared annotations. 129 5. Removed STORE to default .priv or .shared. 130 6. Added section on optional select parameters. 132 Changes from -01 to -02: 133 1. Now require .priv or .shared on store operations. 135 Changes from -00 to -01: 136 1. MODTIME moved to its own draft, which this draft now 137 depends on. Thus, Conditional Annotation STORE and 138 related items deleted from this draft. 139 2. Private versus Shared Annotations: both are possible 140 (separately addressable using ".priv" and ".shared" 141 suffixes). There is a per-mailbox setting for the 142 default. It is an open issue how this is viewed or 143 changed by the client. 144 3. In ACLs, the "w" right is needed to updated shared state; 145 the "s" right is needed to update private state. 146 4. Various clarifications and text modifications. 147 5. Added 'forwarded' flag for message parts. 149 Changes from pre-imapext to -00: 150 1. Clarified text describing attributions, entries, and 151 attributes. 152 2. Changed 'modifiedsince' to 'modtime'; referenced ACAP spec. 153 3. Deleted 'queued' flag. 154 4. Expanded and explained smtp-envelope entry. 155 5. Restricted including ANNOTATION data in unsolicited responses 156 until the client uses it first. (Open issue as to if needed). 157 6. Examples now only use valid entries and attributes. 158 7. Updated Security Considerations. 159 8. Content-Type now defaults to text/plain. 160 9. Open Issue: Shared vs. private annotations. 161 10. Open issue: Annotation Modtime untagged response or VALIDTIME 162 FETCH data. 163 11. Open issue: Conditional annotation STORE. 164 12. ANNOTATION criterion available if both "ANNOTATE" and "SORT" 165 in CAPABILITY command response. 166 13. Prohibition on annotations in lieu of base spec functionality. 167 14. Specified required ACL rights. 168 15. ANNOTATION message data item in APPEND. 169 16. ANNOTATION-MODTIME message data item in STATUS. 170 17. Replaced ATOM_CHAR with utf8-char. 171 18. Updated other ABNF entries. 173 6 Introduction and Overview 175 The ANNOTATE extension is present in any IMAP4 implementation which 176 returns "ANNOTATE" as one of the supported capabilities in the 177 CAPABILITY response. 179 The ANNOTATE extension adds a new message data item to the FETCH and 180 STORE commands, as well as adding SEARCH and SORT keys and an APPEND 181 modifier. 183 This extension makes the following changes to the IMAP4 protocol: 185 a) adds a new ANNOTATION message data item for use in FETCH 186 b) adds a new ANNOTATION message data item for use in STORE 187 c) adds a new ANNOTATION search criterion for use in SEARCH 188 d) adds a new ANNOTATION sort key for use in SORT extension 189 e) adds a new ANNOTATION data item for use in APPEND 190 f) adds a new requirement on the COPY command 191 g) adds a extension mechanism for adding parameters to the 192 SELECT/EXAMINE commands and defines the ANNOTATE parameter 194 The data model used for the storage of annotations is based on that 195 of the Application Configuration Access Protocol [ACAP]. Note that 196 there is no inheritance in annotations. 198 Clients MUST NOT use annotations in lieu of equivalent IMAP base 199 specification facilities. For example, use of a "seen" flag in the 200 vendor namespace together with ".PEEK" in fetches. Such behaviour 201 would significantly reduce IMAP interoperability. 203 If a server supports annotations, then it MUST store all annotation 204 data permanently, i.e. there is no concept of 'session only' 205 annotations that would correspond to the behaviour of 'session' 206 flags as defined in the IMAP base specification. The exception to 207 this is IMAP flags (which are accessible directly through 208 annotations) which may be 'session only' as determined by the FLAGS 209 and PERMANENTFLAGS responses to a SELECT or EXAMINE command. 211 This extension also introduces a generalised mechanism for adding 212 parameters to the SELECT or EXAMINE commands. It is anticipated 213 that other extensions may want to utilise this, so it is not 214 strictly dependent on the ANNOTATE extension being present. 216 The rest of this document describes the data model and protocol 217 changes more rigorously. 219 7 Data Model 221 7.1 Overview 223 The data model used in ANNOTATE is that of a uniquely named entry 224 which contains a set of standard attributes. A single coherent unit 225 of "metadata" for a message is stored as a single entry, made up of 226 several attributes. 228 For example, a comment added to a message has an entry name of 229 "/message/comment". This entry is composed of several attributes 230 such as "value", "size", etc. which contain the properties and data 231 of the entry. 233 The protocol changes to IMAP described below allow a client to 234 access or change the values of any attributes in any entries in a 235 message annotation, assuming it has sufficient access rights to do 236 so (see Section 8 for specifics). 238 7.2 Namespace of Entries and Attributes 240 Each message annotation is made up of a set of entries. Each entry 241 has a hierarchical name in UTF-8, with each component of the name 242 separated by a slash ("/"). 244 Each entry is made up of a set of attributes. Each attribute has a 245 hierarchical name in UTF-8, with each component of the name 246 separated by a period ("."). 248 The value of an attribute is NIL (has no value), or is a string of 249 zero or more octets. 251 Entry and attribute names MUST NOT contain asterisk ("*") or percent 252 ("%") characters and MUST be valid UTF-8 strings which do not 253 contain the NULL octet. Invalid entry or attribute names result in 254 a BAD response in any IMAP commands where they are used. 256 Use of non-visible UTF-8 characters in entry and attribute names is 257 strongly discouraged. 259 This specification defines an initial set of entry and attribute 260 names available for use in message annotations. In addition, an 261 extension mechanism is described to allow additional names to be 262 added for extensibility. 264 7.2.1 Entry Names 266 Entry names MUST be specified in a standards track or IESG approved 267 experimental RFC, or fall under the vendor namespace. See Section 268 11.1 for the registration template. 270 /message 271 Defines the top-level of entries associated with an entire 272 message. This entry itself does not contain any attributes. 274 /message/comment 275 Defines a comment or note associated with an entire message. 277 /message/flags 278 Defines the top-level of entries for flags associated with an 279 entire message. The "value" attribute of each of the entries 280 described below must be either "1", "0" or NIL. "1" corresponds 281 to the flag being set. 283 Standard [IMAP4] flags always have a '\' prefix character. 284 Other standard flags have a '$' prefix. The annotation names 285 used for all flags uses the complete name for that flag, 286 including the prefix character. 288 The set of standard IMAP flags annotations are: 290 /message/flags/\answered 291 /message/flags/\flagged 292 /message/flags/\deleted 293 /message/flags/\seen 294 /message/flags/\draft 295 /message/flags/\recent 297 Changes to these annotations are reflected in the standard IMAP 298 flags. The \recent attribute is read only, clients MUST NOT 299 attempt to change it. 301 Note that entry names are sent as [IMAP4] string elements which 302 requires that '\' characters be escaped in the string. 304 Additional standard flags are: 306 /message/flags/$mdnsent 307 /message/flags/$redirected 308 /message/flags/$forwarded 310 The '$mdnsent' flag is used to indicate message disposition 311 notification processing state [MDNSENT]. 313 The '$redirected' flag indicates that a message has been handed 314 off to someone else, by resending the message with minimal 315 alterations, and in such a way that a reply by the new recipient 316 is addressed to the original author, not the user who performed 317 the redirection. 319 The '$forwarded' flag indicates the message was resent to 320 another user, embedded within or attached to a new message. 322 /message/altsubject 323 Contains text supplied by the message recipient, to be used by 324 the client instead of the original message Subject. 326 /message/vendor/ 327 Defines the top-level of entries associated with an entire 328 message as created by a particular product of some vendor. 329 These sub-entries can be used by vendors to provide 330 client-specific attributes. The vendor-token MUST be registered 331 with IANA, using the [ACAP] vendor subtree registry. 333 /body/ 334 Defines the top-level of entries associated with a specific body 335 part of a message. This entry itself does not contain any 336 attributes. The part-specifier uses the same part specifier 337 syntax as the BODY message data item in the FETCH command 339 [IMAP4]. The server MUST return a BAD response if the client 340 uses an incorrect part specifier (either incorrect syntax or a 341 specifier referring to a non-existent part). The server MUST 342 return a BAD response if the client uses an empty part specifier 343 (which is used in [IMAP4] to represent the entire message). 345 /body//comment 346 Defines a comment or note associated with a specific body part 347 of a message. 349 /body//flags 350 Defines the top-level of entries associated with flag state for 351 a specific body part of a message. All sub-entries are 352 maintained entirely by the client. There is no implicit change 353 to any flag by the server. 355 /body//flags/seen 356 /body//flags/answered 357 /body//flags/flagged 358 /body//flags/forwarded 359 Defines flags for a specific body part of a message. The 360 "value" attribute of these entries must be either "1", "0" or 361 NIL. 363 /body//vendor/ 364 Defines the top-level of entries associated with a specific body 365 part of a message as created by a particular product of some 366 vendor. This entry can be used by vendors to provide client 367 specific attributes. The vendor-token MUST be registered with 368 IANA. 370 7.2.2 Attribute Names 372 Attribute names MUST be specified in a standards track or IESG 373 approved experimental RFC, or fall under the vendor namespace. See 374 Section 11.1 for the registration template. 376 All attribute names implicitly have a ".priv" and a ".shared" suffix 377 which maps to private and shared versions of the entry. Searching 378 or fetching without using either suffix includes both. The client 379 MUST specify either a ".priv" or ".shared" suffix when storing an 380 annotation. 382 value 383 A UTF8 string representing the data value of the attribute. To 384 delete an annotation, the client can store NIL into the value. 386 size 387 The size of the value, in octets. Set automatically by the 388 server, read-only to clients. 390 content-type 391 A MIME [MIME] content type and subtype that describes the nature 392 of the content of the "value" attribute. If not present, a 393 value of "text/plain; charset=utf8" is assumed. 395 vendor. 396 Defines an attribute associated with a particular product of 397 some vendor. This attribute can be used by vendors to provide 398 client specific attributes. The vendor-token MUST be registered 399 with IANA, using the [ACAP] vendor subtree registry. 401 8 Private versus Shared and Access Control 403 Some IMAP mailboxes are private, accessible only to the owning user. 404 Other mailboxes are not, either because the owner has set an ACL 405 [ACL-EXT] which permits access by other users, or because it is a 406 shared mailbox. 408 This raises the issue of shared versus private annotations. 410 If all annotations are private, it is impossible to set annotations 411 in a shared or otherwise non-private mailbox that are visible to 412 other users. This eliminates what could be a useful aspect of 413 annotations in a shared environment. An example of such use is a 414 shared IMAP folder containing bug reports. Engineers may want to 415 use annotations to add information to existing messages, indicate 416 assignments, status, etc. This use requires shared annotations. 418 If all annotations are shared, it is impossible to use annotations 419 for private notes on messages in shared mailboxes. Also, modifying 420 an ACL to permit access to a mailbox by other users may 421 unintentionally expose private information. 423 There are also situations in which both shared and private 424 annotations are useful. For example, an administrator may want to 425 set shared annotations on messages in a shared folder, which 426 individual users may wish to supplement with additional notes. 428 If shared and private annotations are to coexist, we need a clear 429 way to differentiate them. Also, it should be as easy as possible 430 for a client to access both and not overlook either. There is also 431 a danger in allowing a client to store an annotation without knowing 432 if it is shared or private. 434 This document proposes two standard suffixes for all attributes: 435 ".shared" and ".priv". A search, fetch, or sort which specifies 436 neither uses both. Store operations MUST explicitly use .priv or 437 .shared suffixes. 439 A user can only store and fetch private annotations on messages in 440 any mailbox which they can SELECT or EXAMINE, including ones which 441 only open READ-ONLY. A user can only store and fetch shared 442 annotations on messages in any mailbox that they can SELECT and 443 which opens READ-WRITE. If a client attempts to store or fetch a 444 shared annotation on a READ-ONLY mailbox, the server MUST respond 445 with a NO response. 447 9 IMAP Protocol Changes 449 9.1 Optional parameters with the SELECT/EXAMINE commands 451 This extension adds the ability to include one or more parameters 452 with the IMAP SELECT or EXAMINE commands, to turn on or off certain 453 standard behaviour, or to add new optional behaviours required for a 454 particular extension. It is anticipated that other extensions may 455 want to use this facility, so a generalised approach is given here. 456 This facility is not dependent on the presence of the ANNOTATE 457 extension - other extensions can use it with a server that does not 458 implement ANNOTATE. 460 Optional parameters to the SELECT or EXAMINE commands are added as a 461 parenthesised list of atoms or strings, and appear after the mailbox 462 name in the standard SELECT or EXAMINE command. The order of 463 individual parameters is arbitrary. Individual parameters may 464 consist of one or more atoms or strings in a specific order. If a 465 parameter consists of more than one atom or string, it MUST appear 466 in its own parenthesised list. Any parameter not defined by 467 extensions that the server supports MUST be rejected with a NO 468 response. 470 Example: 471 C: a SELECT INBOX (ANNOTATE) 472 S: ... 473 S: a OK SELECT complete 475 In the above example, a single parameter is used with the 476 SELECT command. 478 C: a EXAMINE INBOX (ANNOTATE (RESPONSES "UID Responses") MODTIME) 479 S: ... 480 S: a OK EXAMINE complete 482 In the above example, three parameters are used with the 483 EXAMINE command. The second parameter consists of two 484 items: an atom followed by a quoted string. 486 C: a SELECT INBOX (BLURDYBLOOP) 487 S: a NO Unknown parameter in SELECT command 489 In the above example, a parameter not supported by the 490 server is incorrectly used. 492 The ANNOTATE extension defines a single optional select parameter 493 "ANNOTATE", which is used to turn on unsolicited responses for 494 annotations as described in Section 9.3. 496 9.2 ANNOTATION Message Data Item in FETCH Command 498 This extension adds an ANNOTATION message data item to the FETCH 499 command. This allows clients to retrieve annotations for a range of 500 messages in the currently selected mailbox. 502 ANNOTATION 503 The ANNOTATION message data item, when used by the client in the 504 FETCH command, takes an entry specifier and an attribute 505 specifier. 507 Example: 508 C: a FETCH 1 (ANNOTATION ("/message/comment" "value")) 509 S: * 1 FETCH (ANNOTATION ("/message/comment" 510 ("value.priv" "My comment" 511 "value.shared" "Group note"))) 512 S: a OK Fetch complete 514 In the above example, the content of the "value" attribute 515 for the "/message/comment" entry is requested by the client 516 and returned by the server. Since neither ".shared" nor 517 ".priv" was specified, both are returned. 519 "*" and "%" wildcard characters can be used in either specifier to 520 match one or more characters at that position, with the exception 521 that "%" does not match the hierarchy delimiter for the specifier it 522 appears in (that is, "/" for an entry specifier or "." for an 523 attribute specifier). Thus an entry specifier of "/message/%" 524 matches entries such as "/message/comment" and "/message/subject", 525 but not "/message/flags/$redirected". 527 Examples: 528 C: a FETCH 1 (ANNOTATION ("/message/*" ("value.priv" 529 "size.priv"))) 530 S: * 1 FETCH (ANNOTATION 531 ("/message/comment" ("value.priv" "My comment" 532 "size.priv" "10") 533 "/message/subject" ("value.priv" "Rhinoceroses!" 534 "size.priv" "13") 535 "/message/vendor/foobar/label.priv" 536 ("value.priv" "label43" 537 "size.priv" "7") 538 "/message/vendor/foobar/personality" 539 ("value.priv" "Tallulah Bankhead" 540 "size.priv" "17"))) 541 S: a OK Fetch complete 542 In the above example, the contents of the private "value" and "size" 543 attributes for any entries in the "/message" hierarchy are requested 544 by the client and returned by the server. 546 C: a FETCH 1 (ANNOTATION ("/message/%" "value.shared")) 547 S: * 1 FETCH (ANNOTATION 548 ("/message/comment" ("value.shared" "Patch Mangler") 549 "/message/subject" ("value.shared" "Patches? We don't 550 need no steenkin patches!"))) 551 S: a OK Fetch complete 553 In the above example, the contents of the shared "value" 554 attributes for entries at the top level only of the 555 "/message" hierarchy are requested by the client and 556 returned by the server. 558 Entry and attribute specifiers can be lists of atomic specifiers, so 559 that multiple items of each type may be returned in a single FETCH 560 command. 562 Examples: 563 C: a FETCH 1 (ANNOTATION 564 (("/message/comment" "/message/subject") "value.priv")) 565 S: * 1 FETCH (ANNOTATION 566 ("/message/comment" ("value.priv" "What a chowder-head") 567 "/message/subject" ("value.priv" "How to crush beer cans"))) 568 S: a OK Fetch complete 570 In the above example, the contents of the private "value" attributes 571 for the two entries "/message/comment" and "/message/subject" are 572 requested by the client and returned by the server. 574 9.3 ANNOTATION Message Data Item in FETCH Response 576 The ANNOTATION message data item in the FETCH response displays 577 information about annotations in a message. 579 ANNOTATION parenthesised list 581 The response consists of a list of entries, each of which has a 582 list of attribute-value pairs. 584 Examples: 585 C: a FETCH 1 (ANNOTATION ("/message/comment" "value")) 586 S: * 1 FETCH (ANNOTATION ("/message/comment" 587 ("value.priv" "My comment" 588 "value.shared" NIL))) 589 S: a OK Fetch complete 591 In the above example, a single entry with a single attribute-value 592 pair is returned by the server. Since the client did not specify a 593 ".shared" or ".priv" suffix, both are returned. Only the private 594 attribute has a value (the shared value is NIL). 596 C: a FETCH 1 (ANNOTATION 597 (("/message/comment" "/message/subject") "value")) 598 S: * 1 FETCH (ANNOTATION 599 ("/message/comment" ("value.priv" "My comment" 600 "value.shared" NIL) 601 "/message/subject" ("value.priv" "My subject" 602 "value.shared" NIL))) 603 S: a OK Fetch complete 605 In the above example, two entries each with a single attribute-value 606 pair are returned by the server. Since the client did not specify a 607 ".shared" or ".priv" suffix, both are returned. Only the private 608 attributes have values; the shared attributes are NIL. 610 C: a FETCH 1 (ANNOTATION 611 ("/message/comment" ("value" "size"))) 612 S: * 1 FETCH (ANNOTATION 613 ("/message/comment" 614 ("value.priv" "My comment" 615 "value.shared" NIL 616 "size.priv" "10" 617 "size.shared" "0"))) 618 S: a OK Fetch complete 620 In the above example, a single entry with two attribute-value pairs 621 is returned by the server. Since the client did not specify a 622 ".shared" or ".priv" suffix, both are returned. Only the private 623 attributes have values; the shared attributes are NIL. 625 Servers MUST NOT include ANNOTATION data in unsolicited responses 626 unless the client used the ANNOTATE select parameter when it issued 627 the last SELECT or EXAMINE command. This restriction avoids sending 628 ANNOTATION data to a client unless the client explicitly asks for 629 it. 631 Servers SHOULD send ANNOTATION message data items in unsolicited 632 FETCH responses if an annotation entry is changed by a third-party, 633 and the ANNOTATE select parameter was used. This allows servers to 634 keep clients updated with changes to annotations by other clients. 636 9.4 ANNOTATION Message Data Item in STORE 638 ANNOTATION 639 Sets the specified list of entries by adding or replacing the 640 specified attributes with the values provided. Clients can use 641 NIL for values of attributes it wants to remove from entries. 643 The ANNOTATION message data item used with the STORE command has an 644 implicit ".SILENT" behaviour. This means the server does not 645 generate an untagged FETCH in response to the STORE command and 646 assumes that the client updates its own cache if the command 647 succeeds. 649 Examples: 650 C: a STORE 1 ANNOTATION ("/message/comment" 651 ("value.priv" "My new comment")) 652 S: a OK Store complete 654 In the above example, the entry "/message/comment" is created (if 655 not already present) and the private attribute "value" with data set 656 to "My new comment" is created if not already present, or replaced 657 if it exists. 659 C: a STORE 1 ANNOTATION ("/message/comment" 660 ("value.shared" NIL)) 661 S: a OK Store complete 663 In the above example, the shared "value" attribute of the entry 664 "/message/comment" is removed by storing NIL into the attribute. 666 Multiple entries can be set in a single STORE command by listing 667 entry-attribute-value pairs in the list. 669 Example: 670 C: a STORE 1 ANNOTATION ("/message/comment" 671 ("value.priv" "Get tix Tuesday") 672 "/message/subject" 673 ("value.priv" "Wots On")) 674 S: a OK Store complete 676 In the above example, the entries "/message/comment" and 677 "/message/subject" are created (if not already present) and the 678 private attribute "value" is created for each entry if not already 679 present, or replaced if they exist. 681 Multiple attributes can be set in a single STORE command by listing 682 multiple attribute-value pairs in the entry list. 684 Example: 685 C: a STORE 1 ANNOTATION ("/message/comment" 686 ("value.priv" "My new comment" 687 "vendor.foobar.priv" "foo's bar")) 688 S: a OK Store complete 690 In the above example, the entry "/message/comment" is created (if 691 not already present) and the private attributes "value" and 692 "vendor.foobar" are created if not already present, or replaced if 693 they exist. 695 9.5 ANNOTATION interaction with COPY 697 The COPY command can be used to move messages from one mailbox to 698 another on the same server. Servers that support the ANNOTATION 699 extension MUST copy all the annotation data associated with any 700 messages being copied via the COPY command. The only exception to 701 this is if the destination mailbox permissions are such that either 702 the '.priv' or '.shared' annotations are not allowed. 704 9.6 ANNOTATION Message Data Item in APPEND 706 ANNOTATION 707 Sets the specified list of entries and attributes in the 708 resulting message. 710 Example: 711 C: a APPEND drafts ANNOTATION ("/message/comment" 712 ("value.priv" "Don't send until we hear from Sally")) {310} 713 S: + Ready for literal data 714 C: MIME-Version: 1.0 715 ... 716 C: 717 S: a OK APPEND completed 719 In the above example, a comment with a private value is added to a 720 new message appended to the mailbox. The ellipsis represents the 721 bulk of the message. 723 9.7 ANNOTATION Criterion in SEARCH 725 The ANNOTATION criterion for the SEARCH command allows a client to 726 search for a specified string in the value of an annotation entry of 727 a message. 728 ANNOTATION 730 Messages that have annotations with entries matching 731 and attributes matching and the specified string 732 in their values are returned in the SEARCH results. The "*" 733 character can be used in the entry or attribute name fields to match 734 any content in those items. The "%" character can be used in the 735 entry or attribute name fields to match a single level of hierarchy 736 only. 738 Examples: 739 C: a SEARCH ANNOTATION "/message/comment" "value" "IMAP4" 740 S: * SEARCH 2 3 5 7 11 13 17 19 23 741 S: a OK Search complete 743 In the above example, the message numbers of any messages containing 744 the string "IMAP4" in the shared or private "value" attribute of the 745 "/message/comment" entry are returned in the search results. 747 C: a SEARCH ANNOTATION "*" "*" "IMAP4" 748 S: * SEARCH 1 2 3 5 8 13 21 34 749 S: a OK Search complete 751 In the above example, the message numbers of any messages containing 752 the string "IMAP4" in any attribute (public or private) of any entry 753 are returned in the search results. 755 9.8 ANNOTATION Key in SORT 757 The ANNOTATION criterion for the SORT command [SORT-EXT] instructs 758 the server to return the message numbers or UIDs of a mailbox, 759 sorted using the values of the specified annotations. The 760 ANNOTATION criterion is available if the server returns both 761 "ANNOTATE" and "SORT" as supported capabilities in the CAPABILITY 762 command response. 763 ANNOTATION 765 Messages are sorted using the values of the 766 attributes in the entries. (The charset argument 767 determines sort order, as specified in the SORT extension 768 description.) 770 Examples: 771 C: a SORT (ANNOTATION "/message/subject" "value.shared") UTF-8 772 ALL 773 S: * SORT 2 3 4 5 1 11 10 6 7 9 8 774 S: a OK Sort complete 776 In the above example, the message numbers of all messages are 777 returned, sorted according to the shared "value" attribute of the 778 "/message/subject" entry. 780 Note that the ANNOTATION sort key must include a fully specified 781 entry and attribute -- wildcards are not allowed. 783 10 Formal Syntax 785 The following syntax specification uses the Augmented Backus-Naur 786 Form (ABNF) notation as specified in [ABNF]. 788 Non-terminals referenced but not defined below are as defined by 789 [IMAP4]. 791 Except as noted otherwise, all alphabetic characters are case- 792 insensitive. The use of upper or lower case characters to define 793 token strings is for editorial clarity only. Implementations MUST 794 accept these strings in a case-insensitive fashion. 796 append = "APPEND" SP mailbox [SP flag-list] [SP date-time] 798 [SP "ANNOTATION" SP att-annotate] 799 SP literal 800 ; modifies original IMAP4 APPEND command 802 att-annotate = "ANNOTATION" SP "(" entry-att *(SP entry-att) ")" 804 fetch-att =/ fetch-annotate 805 ; modifies original IMAP4 fetch-att 807 fetch-annotate = "ANNOTATION" SP "(" entries SP attribs ")" 808 fetch-ann-resp = "ANNOTATION" SP "(" entry-att *(SP entry-att) ")" 810 store-att-flags =/ att-annotate 811 ; modifies original IMAP4 STORE command 813 search-key =/ search-annotate 814 ; modifies original IMAP4 search-key 816 search-annotate = "ANNOTATION" SP entry-match SP attrib-match 817 SP value 819 sort-key =/ sort-annotate 820 ; modifies original 821 ; draft-crispin-imapext-sort-xx.txt sort-key 823 sort-annotate = "ANNOTATION" SP entry SP attrib 825 entries = entry-match / 826 "(" entry-match *(SP entry-match) ")" 827 attribs = attrib-match / 828 "(" attrib-match *(SP attrib-match) ")" 829 entry-att = entry SP "(" att-value *(SP att-value) ")" 830 att-value = attrib SP value 832 entry = string 833 ; slash-separated path to entry 834 ; MUST NOT contain "*" or "%" 835 entry-match = string 836 ; slash-separated path to entry 837 ; MAY contain "*" or "%" for use as wildcards 839 attrib = string 840 ; dot-separated attribute name 841 ; MUST NOT contain "*" or "%" 842 attrib-match = string 843 ; dot-separated attribute name 844 ; MAY contain "*" or "%" for use as wildcards 846 value = nstring 848 select =/ *(SP "(" select-param *(SP select-param) ")" 849 ; modifies the original IMAP4 select command to 850 ; accept optional parameters 852 examine =/ *(SP "(" select-param *(SP select-param) ")" 853 ; modifies the original IMAP4 examine command to 854 ; accept optional parameters 856 select-param = astring / "(" astring SP astring *(SP astring) ")" 857 ; parameters to SELECT may contain one or 858 ; more atoms or strings - multiple items 859 ; are always parenthesised 861 annotate-param = "ANNOTATE" 862 ; defines the select parameter used with 863 ; ANNOTATE extension 865 11 IANA Considerations 867 Both entry names and attribute names MUST be specified in a 868 standards track or IESG approved experimental RFC, or fall under the 869 vendor namespace. Vendor names MUST be registered. 871 11.1 Entry and Attribute Registration Template 873 To: iana@iana.org 874 Subject: IMAP Annotate Registration 876 Please register the following IMAP Annotate item: 878 [] Entry [] Attribute 880 Name: ______________________________ 882 Description: _______________________ 884 ____________________________________ 886 ____________________________________ 888 Contact person: ____________________ 890 email: ____________________ 892 12 Security Considerations 894 The ANNOTATE extension does not raise any security considerations 895 that are not present in the base [IMAP4] protocol, and these issues 896 are discussed in [IMAP4]. 898 Care must be taken to ensure that annotations whose values are 899 intended to remain private are not stored in mailboxes which are 900 accessible to other users. This includes mailboxes owned by the 901 user by whose ACLs permit access by others as well as any shared 902 mailboxes. 904 13 Normative References 906 [ABNF] Crocker, Overell, "Augmented BNF for Syntax Specifications: 907 ABNF", RFC 2234, Internet Mail Consortium, Demon Internet Ltd, 908 November 1997. 910 [ACAP] Newman, Myers, "ACAP -- Application Configuration Access 911 Protocol", RFC 2244, Innosoft, Netscape, November 1997. 913 [IMAP4] Crispin, "Internet Message Access Protocol - Version 4rev1", 914 RFC 2060, University of Washington, December 1996. 916 [KEYWORDS] Bradner, "Key words for use in RFCs to Indicate 917 Requirement Levels", RFC 2119, Harvard University, March 1997. 919 [MDNSENT] Melnikov, "MDN profile for IMAP", work in progress. 920 . 922 [SMTP-DSN] Moore, "SMTP Service Extension for Delivery Status 923 Notifications", RFC 1891, University of Tennessee, January 1996. 925 [SORT-EXT] Crispin, "Internet Message Access Protocol -- SORT 926 Extension", work in progress. 927 929 14 Informative References 931 [ACL-EXT] Myers, "IMAP4 ACL extension", RFC 2086, Carnegie Mellon, 932 January 1997. 934 15 Acknowledgments 936 Many thanks to Chris Newman for his detailed comments on the first 937 draft of this document, and to the participants at the ACAP working 938 dinner in Pittsburgh. 940 16 Authors' Addresses 942 Randall Gellens 943 QUALCOMM Incorporated 944 5775 Morehouse Dr. 945 San Diego, CA 92121-2779 946 U.S.A. 948 Email: randy@qualcomm.com 949 Cyrus Daboo 950 Cyrusoft International, Inc. 951 Suite 780, 5001 Baum Blvd. 952 Pittsburgh, PA 15213 953 U.S.A. 955 Email: daboo@cyrusoft.com 957 17 Full Copyright Statement 959 Copyright (C) The Internet Society 2003. All Rights Reserved. 961 This document and translations of it may be copied and furnished to 962 others, and derivative works that comment on or otherwise explain it 963 or assist in its implementation may be prepared, copied, published 964 and distributed, in whole or in part, without restriction of any 965 kind, provided that the above copyright notice and this paragraph 966 are included on all such copies and derivative works. However, this 967 document itself may not be modified in any way, such as by removing 968 the copyright notice or references to the Internet Society or other 969 Internet organizations, except as needed for the purpose of 970 developing Internet standards in which case the procedures for 971 copyrights defined in the Internet Standards process must be 972 followed, or as required to translate it into languages other than 973 English. 975 The limited permissions granted above are perpetual and will not be 976 revoked by the Internet Society or its successors or assigns. 978 This document and the information contained herein is provided on an 979 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 980 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 981 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 982 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 983 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.