summaryrefslogtreecommitdiff
path: root/imap/docs/rfc/rfc5257.txt
blob: 1d088e59c24ed2989bc205875a51171eae315a6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
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
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739






Network Working Group                                           C. Daboo
Request for Comments: 5257                                    Apple Inc.
Category: Experimental                                        R. Gellens
                                                   QUALCOMM Incorporated
                                                               June 2008


         Internet Message Access Protocol - ANNOTATE Extension

Status of This Memo

   This memo defines an Experimental Protocol for the Internet
   community.  It does not specify an Internet standard of any kind.
   Discussion and suggestions for improvement are requested.
   Distribution of this memo is unlimited.

Abstract

   The ANNOTATE extension to the Internet Message Access Protocol
   permits clients and servers to maintain "meta data" for messages, or
   individual message parts, stored in a mailbox on the server.  For
   example, this can be used to attach comments and other useful
   information to a message.  It is also possible to attach annotations
   to specific parts of a message, so that, for example, they could be
   marked as seen, or important, or a comment added.

   Note that this document was the product of a WG that had good
   consensus on how to approach the problem.  Nevertheless, the WG felt
   it did not have enough information on implementation and deployment
   hurdles to meet all of the requirements of a Proposed Standard.  The
   IETF solicits implementations and implementation reports in order to
   make further progress.

   Implementers should be aware that this specification may change in an
   incompatible manner when going to Proposed Standard status.  However,
   any incompatible changes will result in a new capability name being
   used to prevent problems with any deployments of the experimental
   extension.













Daboo & Gellens               Experimental                      [Page 1]

RFC 5257                IMAP ANNOTATE Extension                June 2008


Table of Contents

   1. Introduction and Overview .......................................3
   2. Conventions Used in This Document ...............................4
   3. Data Model ......................................................4
      3.1. Overview ...................................................4
      3.2. Namespace of Entries and Attributes ........................4
           3.2.1. Entry Names .........................................5
           3.2.2. Attribute Names .....................................7
      3.3. Private Versus Shared ......................................7
      3.4. Access Control .............................................8
      3.5. Access to Standard IMAP Flags and Keywords ................11
   4. IMAP Protocol Changes ..........................................11
      4.1. General Considerations ....................................11
      4.2. ANNOTATE Parameter with the SELECT/EXAMINE Commands .......12
      4.3. ANNOTATION Message Data Item in FETCH Command .............12
      4.4. ANNOTATION Message Data Item in FETCH Response ............14
      4.5. ANNOTATION Message Data Item in STORE .....................16
      4.6. ANNOTATION Interaction with COPY ..........................18
      4.7. ANNOTATION Message Data Item in APPEND ....................18
      4.8. ANNOTATION Criterion in SEARCH ............................19
      4.9. ANNOTATION Key in SORT ....................................20
      4.10. New ACL Rights ...........................................21
   5. Formal Syntax ..................................................21
   6. IANA Considerations ............................................23
      6.1. Entry and Attribute Registration Template .................23
      6.2. Entry Registrations .......................................24
           6.2.1. /comment ...........................................24
           6.2.2. /flags .............................................24
           6.2.3. /altsubject ........................................25
           6.2.4. /<section-part>/comment ............................25
           6.2.5. /<section-part>/flags/seen .........................26
           6.2.6. /<section-part>/flags/answered .....................26
           6.2.7. /<section-part>/flags/flagged ......................27
           6.2.8. /<section-part>/flags/forwarded ....................27
      6.3. Attribute Registrations ...................................28
           6.3.1. value ..............................................28
           6.3.2. size ...............................................28
      6.4. Capability Registration ...................................28
   7. Internationalization Considerations ............................29
   8. Security Considerations ........................................29
   9. References .....................................................29
      9.1. Normative References ......................................29
      9.2. Informative References ....................................30
   10. Acknowledgments ...............................................30






Daboo & Gellens               Experimental                      [Page 2]

RFC 5257                IMAP ANNOTATE Extension                June 2008


1.  Introduction and Overview

   The ANNOTATE extension is present in any IMAP [RFC3501]
   implementation that returns "ANNOTATE-EXPERIMENT-1" as one of the
   supported capabilities in the CAPABILITY response.

   This extension makes the following changes to the IMAP protocol:

     a.  adds a new ANNOTATION message data item for use in FETCH.

     b.  adds a new ANNOTATION message data item for use in STORE.

     c.  adds a new ANNOTATION search criterion for use in SEARCH.

     d.  adds a new ANNOTATION sort key for use in the SORT extension.

     e.  adds a new ANNOTATION data item for use in APPEND.

     f.  adds a new requirement on the COPY command.

     g.  adds a new ANNOTATE parameter for use with the SELECT/EXAMINE
         commands.

     h.  adds two new response codes to indicate store failures of
         annotations.

     i.  adds a new untagged response code for the SELECT or EXAMINE
         commands to indicate the maximum sized annotation that can be
         stored.

     j.  adds a new Access Control List (ACL) "bit" for use with the ACL
         extensions [RFC2086] and [RFC4314].

   The data model used for the storage of annotations is based on the
   Application Configuration Access Protocol [RFC2244].  Note that there
   is no inheritance in annotations.

   If a server supports annotations, then it MUST store all annotation
   data permanently, i.e., there is no concept of "session only"
   annotations that would correspond to the behavior of "session" flags
   as defined in the IMAP base specification.

   In order to provide optimum support for a disconnected client (one
   that needs to synchronize annotations for use when offline), servers
   SHOULD also support the Conditional STORE [RFC4551] extension.

   The rest of this document describes the data model and protocol
   changes more rigorously.



Daboo & Gellens               Experimental                      [Page 3]

RFC 5257                IMAP ANNOTATE Extension                June 2008


2.  Conventions Used in This Document

   The examples in this document use "C:" and "S:" to indicate lines
   sent by the client and server, respectively.

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [RFC2119].

3.  Data Model

3.1.  Overview

   The data model for annotations in ANNOTATE uses a uniquely named
   entry that contains a set of standard attributes.  Thus, a single
   coherent unit of "meta data" for a message is stored as a single
   entry, made up of several attributes.

   For example, a comment annotation added to a message has an entry
   name of "/comment".  This entry is composed of several attributes
   such as "value", "size", etc., that contain the properties and data
   of the entry.

   The protocol changes to IMAP, described below, allow a client to
   access or change the values of any attribute in any entry in a
   message annotation, assuming it has sufficient access rights to do so
   (see Section 3.4 for specifics).

3.2.  Namespace of Entries and Attributes

   A message may contain zero or more annotations, each of which is a
   single uniquely named entry.  Each entry has a hierarchical name,
   with each component of the name separated by a slash ("/").  An entry
   name MUST NOT contain two consecutive "/" characters and MUST NOT end
   with a "/" character.

   Each entry is made up of a set of attributes.  Each attribute has a
   hierarchical name, with each component of the name separated by a
   period (".").  An attribute name MUST NOT contain two consecutive "."
   characters and MUST NOT end with a "." character.

   The value of an attribute is "NIL" (has no value), or is a string of
   zero or more octets.

   Entry and attribute names MUST NOT contain asterisk ("*") or percent
   ("%") characters, and MUST NOT contain non-ASCII characters or the
   NULL octet.  Invalid entry or attribute names result in a BAD
   response in any IMAP commands where they are used.



Daboo & Gellens               Experimental                      [Page 4]

RFC 5257                IMAP ANNOTATE Extension                June 2008


   Attribute names MUST NOT contain any hierarchical components with the
   names "priv" or "shared", as those have special meaning (see Section
   3.3).

   Entry and attribute names are case-sensitive.

   Use of control or punctuation characters in entry and attribute names
   is strongly discouraged.

   This specification defines an initial set of entry and attribute
   names available for use in message annotations.  In addition, an
   extension mechanism is described to allow additional names to be
   added as needed.

3.2.1.  Entry Names

   Entry names MUST be specified in a standards track or IESG approved
   experimental RFC, or fall under the vendor namespace.  See Section
   6.1 for the registration template.

   /
      Defines the top-level of entries associated with an entire
      message.  This entry itself does not contain any attributes.  All
      entries that start with a numeric character ("0" - "9") refer to
      an annotation on a specific body part.  All other entries are for
      annotations on the entire message.

   /comment
      Defines a comment or note associated with an entire message.

   /flags
      This entry hierarchy is reserved for future use.

   /altsubject
      Contains text supplied by the message recipient to be used by the
      client, instead of the original message Subject.

   /vendor/<vendor-token>
      Defines the top-level of entries associated with an entire message
      as created by a particular product of some vendor.  These sub-
      entries can be used by vendors to provide client-specific
      annotations.  The vendor-token MUST be registered with IANA, using
      the [RFC2244] vendor subtree registry.

   /<section-part>
      Defines the top-level of entries associated with a specific body
      part of a message.  This entry itself does not contain any
      attributes.  The section-part is a numeric part specifier.  Its



Daboo & Gellens               Experimental                      [Page 5]

RFC 5257                IMAP ANNOTATE Extension                June 2008


      syntax is the same as the section-part ABNF element defined in
      [RFC3501].  The server MUST return a BAD response if the client
      uses an incorrect part specifier (either incorrect syntax or a
      specifier referring to a non-existent part).  The server MUST
      return a BAD response if the client uses an empty part specifier
      (which is used in IMAP to represent the entire message).

   /<section-part>/comment
      Defines a comment or note associated with a specific body part of
      a message.

   /<section-part>/flags
      Defines the top-level of entries associated with the flag state
      for a specific body part of a message.  All sub-entries are
      maintained entirely by the client.  There is no implicit change to
      any flag by the server.

          /<section-part>/flags/seen
             This is similar to the IMAP \Seen flag, except it applies
             to only the body part referenced by the entry.

          /<section-part>/flags/answered
             This is similar to the IMAP \Answered flag, except it
             applies to only the body part referenced by the entry.

          /<section-part>/flags/flagged
             This is similar to the IMAP \Flagged flag, except it
             applies to only the body part referenced by the entry.

          /<section-part>/flags/forwarded
             This is similar to the IMAP $Forwarded keyword, except it
             applies to only the body part referenced by the entry.

      Defines flags for a specific body part of a message.  The "value"
      attribute of each of the entries described above must be either
      "1", "0", or "NIL".  "1" corresponds to the flag being set.

   /<section-part>/vendor/<vendor-token>
      Defines the top-level of entries associated with a specific body
      part of a message as created by a particular product of some
      vendor.  This entry can be used by vendors to provide client
      specific annotations.  The vendor-token MUST be registered with
      IANA.








Daboo & Gellens               Experimental                      [Page 6]

RFC 5257                IMAP ANNOTATE Extension                June 2008


3.2.2.  Attribute Names

   Attribute names MUST be specified in a standards track or IESG
   approved experimental RFC.  See Section 6.1 for the registration
   template.

   All attribute names implicitly have a ".priv" and a ".shared" suffix
   that maps to private and shared versions of the entry.  Searching or
   fetching without using either suffix will include both.  The client
   MUST specify either a ".priv" or ".shared" suffix when storing an
   annotation or sorting on annotations.

   value
      A string or binary data representing the value of the annotation.
      To delete an annotation, the client can store "NIL" into the
      value.  If the client requests the value attribute for a non-
      existent entry, then the server MUST return "NIL" for the value.
      The content represented by the string is determined by the
      content-type used to register the entry (see Section 6.1 for entry
      registration templates).  Where applicable, the registered
      content-type MUST include a charset parameter.  Text values SHOULD
      use the utf-8 [RFC3629] character set.  Note that binary data
      (data which may contain the NULL octet) is allowed (e.g., for
      storing images), and this extension uses the "literal8" syntax
      element [RFC4466] to allow such data to be written to or read from
      the server.

   size
      The size of the value, in octets.  Set automatically by the
      server, read-only to clients.  If the client requests the size
      attribute for a non-existent entry, then the server MUST return
      "0" (zero) for the size.

3.3.  Private Versus Shared

   Some IMAP mailboxes are private, accessible only to the owning user.
   Other mailboxes are not, either because the owner has set an ACL
   [RFC4314] that permits access by other users, or because it is a
   shared mailbox.

   This raises the issue of shared versus private annotations.

   If all annotations are private, it is then impossible to have
   annotations in a shared or otherwise non-private mailbox be visible
   to other users.  This eliminates what could be a useful aspect of
   annotations in a shared environment.  An example of such use is a
   shared IMAP folder containing bug reports.  Engineers may want to use




Daboo & Gellens               Experimental                      [Page 7]

RFC 5257                IMAP ANNOTATE Extension                June 2008


   annotations to add information to existing messages, indicate
   assignments, status, etc.  This use requires shared annotations.

   If all annotations are shared, it is impossible to use annotations
   for private notes on messages in shared mailboxes.  Also, modifying
   an ACL to permit access to a mailbox by other users may
   unintentionally expose private information.

   There are also situations in which both shared and private
   annotations are useful.  For example, an administrator may want to
   set shared annotations on messages in a shared folder, which
   individual users may wish to supplement with additional notes.

   If shared and private annotations are to coexist, we need a clear way
   to differentiate them.  Also, it should be as easy as possible for a
   client to access both and not overlook either.  There is also a
   danger in allowing a client to store an annotation without knowing if
   it is shared or private.

   This document proposes two standard suffixes for all attributes:
   ".shared" and ".priv".  A SEARCH or FETCH command that specifies
   neither, uses both.  STORE, APPEND, and SORT commands MUST explicitly
   use ".priv" or ".shared" suffixes.

   If the ANNOTATE extension is present, support for shared annotations
   in servers is REQUIRED, while support for private annotations in
   servers is OPTIONAL.  This recognizes the fact that support for
   private annotations may introduce a significant increase in
   complexity to a server in terms of tracking ownership of the
   annotations, how quota is determined for users based on their own
   annotations, etc.  Clients that support the ANNOTATE extension MUST
   handle both shared and private annotations.

3.4.  Access Control

   A user needs to have appropriate rights in order to read or write
   ".priv" or ".shared" annotation values.  How those rights are
   calculated depends on whether or not the ACL [RFC2086] extension or
   its update [RFC4314] is present.  If a client attempts to store or
   fetch an annotation to which they do not have the appropriate rights,
   the server MUST respond with a NO response.

   When the ACL extension is not present, access to annotation values is
   governed by the nature of the selected state, in particular whether
   the mailbox was SELECTED or EXAMINED in READ-ONLY or READ-WRITE mode.






Daboo & Gellens               Experimental                      [Page 8]

RFC 5257                IMAP ANNOTATE Extension                June 2008


   When the ACL extension is present, the server MUST recognize the new
   ACL "n" right, in addition to the ones defined by the ACL extension
   itself.

   For ".priv" annotation values, the "r" right controls both read and
   write access.  When it is on, access to ".priv" annotations is
   allowed; when it is off, access to ".priv" annotations is disallowed.

   For ".shared" annotation values, the "r" right controls read access.
   When it is on, ".shared" annotations can be read; when it is off,
   ".shared" annotations cannot be read.

   For ".shared" annotation values, the "n" right controls write access.
   When it is on, ".shared" annotations can be changed or created
   through either a STORE or APPEND command; when it is off, ".shared"
   annotations cannot be changed or created.  The "n" right constitutes
   a "shared flag right" as defined in Section 6.2 of [RFC4314].


































Daboo & Gellens               Experimental                      [Page 9]

RFC 5257                IMAP ANNOTATE Extension                June 2008


   A summary of all the access control restrictions is tabulated below

   +---------------+---------------+-----------------------------------+
   |  Server Type  | Action on     | Type of mailbox                   |
   |               | annotation    |                                   |
   +===============+===============+===================================+
   |               |               |                                   |
   |               | read .priv    | Any mailbox that can be SELECTED  |
   |               | values        | or EXAMINED.                      |
   |               |               |                                   |
   |               +---------------+-----------------------------------+
   |               |               |                                   |
   |               | write .priv   | Any SELECTED [READ-WRITE] mailbox.|
   |               | values        | SELECTED [READ-ONLY] mailboxes MAY|
   | Server        |               | also permit writes.               |
   | without       |               |                                   |
   | ACL Extension +---------------+-----------------------------------+
   |               |               |                                   |
   |               | read .shared  | Any mailbox that can be SELECTED  |
   |               | values        | or EXAMINED.                      |
   |               |               |                                   |
   |               +---------------+-----------------------------------+
   |               |               |                                   |
   |               | write .shared | Any mailbox that can be SELECTED  |
   |               | values        | or EXAMINED and is [READ-WRITE].  |
   |               |               |                                   |
   +---------------+---------------+-----------------------------------+
   |               |               |                                   |
   |               | read .priv    | Any mailbox with the "r"          |
   |               | values        | ACL right.                        |
   |               |               |                                   |
   |               +---------------+-----------------------------------+
   |               |               |                                   |
   |               | write .priv   | Any mailbox with the "r"          |
   | Server        | values        | ACL right.                        |
   | with          |               |                                   |
   | ACL Extension +---------------+-----------------------------------+
   |               |               |                                   |
   |               | read .shared  | Any mailbox with the "r"          |
   |               | values        | ACL right.                        |
   |               |               |                                   |
   |               +---------------+-----------------------------------+
   |               |               |                                   |
   |               | write .shared | Any mailbox with the "n"          |
   |               | values        | ACL right.                        |
   |               |               |                                   |
   +---------------+---------------+-----------------------------------+




Daboo & Gellens               Experimental                     [Page 10]

RFC 5257                IMAP ANNOTATE Extension                June 2008


3.5.  Access to Standard IMAP Flags and Keywords

   Due to the ambiguity of how private and shared values would map to
   the base IMAP flag and keyword values, the ANNOTATE extension does
   not expose IMAP flags or keywords as entries.  However, the /flags
   annotation entry is reserved for future use and MUST NOT be used by
   clients or servers supporting this extension.

   Clients that need to implement shared and private "flags" can create
   their own annotation entries for those, completely bypassing the base
   IMAP flag/keyword behavior.

4.  IMAP Protocol Changes

4.1.  General Considerations

   Servers may be able to offer only a limited level of support for
   annotations in mailboxes, and it is useful for clients to be able to
   know what level of support is available.  Servers MUST return an
   ANNOTATIONS response code during the SELECT or EXAMINE command for a
   mailbox to indicate the level of support.  Possible data items used
   with the ANNOTATIONS response code are:

      "NONE" - this indicates that the mailbox being selected does not
      support annotations at all.  Clients MUST NOT attempt to use
      annotation extensions in commands for this mailbox.

      "READ-ONLY" - this indicates that the annotations supported by the
      mailbox cannot be changed by the client.  Clients MUST NOT attempt
      to store annotations on any messages in a mailbox with this
      response code.

      "NOPRIVATE" - this indicates that the server does not support
      private annotations on the mailbox.  Only shared annotations are
      supported.  Clients SHOULD only attempt to read or store
      annotations attributes with the ".shared" suffix.  If a client
      uses an attribute with the ".priv" suffix in a FETCH command, then
      servers should return the attribute value in the FETCH response as
      "NIL".  If a client uses an attribute with the ".priv" suffix in a
      STORE command (or an APPEND command targeted at the mailbox), then
      the server MUST return a NO response.

      numeric values - if servers support writable annotations, then the
      server MUST indicate the maximum size in octets for an annotation
      value by providing the maximum size value in the response code.
      Clients MUST NOT store annotation values of a size greater than
      the amount indicated by the server.  Servers MUST accept a minimum




Daboo & Gellens               Experimental                     [Page 11]

RFC 5257                IMAP ANNOTATE Extension                June 2008


      annotation data size of at least 1024 octets if annotations can be
      written.

   In addition, the server MAY limit the total number of annotations for
   a single message.  However, the server MUST provide a minimum
   annotation count per message of at least 10.

4.2.  ANNOTATE Parameter with the SELECT/EXAMINE Commands

   The ANNOTATE extension defines a single optional SELECT parameter
   [RFC4466] "ANNOTATE", which is used to turn on unsolicited responses
   for annotations as described in Section 4.4.  This optional parameter
   results in a per-mailbox state change, i.e., it must be used in each
   SELECT/EXAMINE command in order to be effective, irrespective of
   whether it was used in a previous SELECT/EXAMINE during the same
   session.

   Example:

         C: a SELECT INBOX (ANNOTATE)
         S: * FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
         S: * OK [PERMANENTFLAGS (\Answered \Flagged \Draft
                                           \Deleted \Seen \*)]
         S: * 10268 EXISTS
         S: * 1 RECENT
         S: * OK [UNSEEN 10268]
         S: * OK [UIDVALIDITY 890061587]
         S: * OK [UIDNEXT 34643]
         S: * OK [ANNOTATIONS 20480 NOPRIVATE]
         S: a OK [READ-WRITE] Completed

      In the above example, a SELECT command with the ANNOTATE parameter
      is issued.  The response from the server includes the required
      ANNOTATIONS response that indicates that the server supports
      annotations up to a maximum size of 20480 octets, and does not
      support private annotations (only shared).

4.3.  ANNOTATION Message Data Item in FETCH Command

   This extension adds an ANNOTATION message data item to the FETCH
   command.  This allows clients to retrieve annotations for a range of
   messages in the currently selected mailbox.

   ANNOTATION <entry-specifier> <attribute-specifier>

      The ANNOTATION message data item, when used by the client in the
      FETCH command, takes an entry specifier and an attribute
      specifier.



Daboo & Gellens               Experimental                     [Page 12]

RFC 5257                IMAP ANNOTATE Extension                June 2008


   Example:

           C: a FETCH 1 (ANNOTATION (/comment value))
           S: * 1 FETCH (ANNOTATION (/comment
                                       (value.priv "My comment"
                                        value.shared "Group note")))
           S: a OK Fetch complete

      In the above example, the content of the "value" attribute for the
      "/comment" entry is requested by the client and returned by the
      server.  Since neither ".shared" nor ".priv" was specified, both
      are returned.

   "*" and "%" wild card characters can be used in entry specifiers to
   match one or more characters at that position, with the exception
   that "%" does not match the "/" hierarchy delimiter.  Thus, an entry
   specifier of "/%" matches entries such as "/comment" and
   "/altsubject", but not "/1/comment".

   Example:

           C: a UID FETCH 1123 (UID ANNOTATION
                                (/* (value.priv size.priv)))
           S: * 12 FETCH (UID 1123 ANNOTATION
                  (/comment (value.priv "My comment"
                                       size.priv "10")
                   /altsubject (value.priv "Rhinoceroses!"
                                       size.priv "13")
                   /vendor/foobar/label.priv
                                       (value.priv "label43"
                                        size.priv "7")
                   /vendor/foobar/personality
                                       (value.priv "Tallulah Bankhead"
                                        size.priv "17")))
           S: a OK Fetch complete

      In the above example, the contents of the private "value" and
      "size" attributes for any entries in the "/" hierarchy are
      requested by the client and returned by the server.












Daboo & Gellens               Experimental                     [Page 13]

RFC 5257                IMAP ANNOTATE Extension                June 2008


   Example:

           C: a FETCH 1 (ANNOTATION (/% value.shared))
           S: * 1 FETCH (ANNOTATION
              (/comment (value.shared "Patch Mangler")
               /altsubject (value.shared "Patches?  We don't
               need no steenkin patches!")))
           S: a OK Fetch complete

      In the above example, the contents of the shared "value"
      attributes for entries at the top level only of the "/" hierarchy
      are requested by the client and returned by the server.

   Entry and attribute specifiers can be lists of atomic specifiers, so
   that multiple items of each type may be returned in a single FETCH
   command.

   Example:

           C: a FETCH 1 (ANNOTATION
                ((/comment /altsubject) value.priv))
           S: * 1 FETCH (ANNOTATION
                (/comment (value.priv "What a chowder-head")
                 /altsubject (value.priv "How to crush beer cans")))
           S: a OK Fetch complete

      In the above example, the contents of the private "value"
      attributes for the two entries "/comment" and "/altsubject" are
      requested by the client and returned by the server.

4.4.  ANNOTATION Message Data Item in FETCH Response

   The ANNOTATION message data item in the FETCH response displays
   information about annotations in a message.

   ANNOTATION parenthesized list

      The response consists of a list of entries, each of which have a
      list of attribute-value pairs.












Daboo & Gellens               Experimental                     [Page 14]

RFC 5257                IMAP ANNOTATE Extension                June 2008


   Example:

           C: a FETCH 1 (ANNOTATION (/comment value))
           S: * 1 FETCH (ANNOTATION (/comment
                                      (value.priv "My comment"
                                       value.shared NIL)))
           S: a OK Fetch complete

      In the above example, a single entry with a single attribute-value
      pair is returned by the server.  Since the client did not specify
      a ".shared" or ".priv" suffix, both are returned.  Only the
      private attribute has a value (the shared value is "NIL").

   Example:

           C: a FETCH 1 (ANNOTATION
                ((/comment /altsubject) value))
           S: * 1 FETCH (ANNOTATION
                (/comment (value.priv "My comment"
                                     value.shared NIL)
                 /altsubject (value.priv "My subject"
                                     value.shared NIL)))
           S: a OK Fetch complete

      In the above example, two entries, each with a single attribute-
      value pair, are returned by the server.  Since the client did not
      specify a ".shared" or ".priv" suffix, both are returned.  Only
      the private attributes have values; the shared attributes are
      "NIL".

   Example:

           C: a FETCH 1 (ANNOTATION
                           (/comment (value size)))
           S: * 1 FETCH (ANNOTATION
                           (/comment
                               (value.priv "My comment"
                                value.shared NIL
                                size.priv "10"
                                size.shared "0")))
           S: a OK Fetch complete

      In the above example, a single entry with two attribute-value
      pairs is returned by the server.  Since the client did not specify
      a ".shared" or ".priv" suffix, both are returned.  Only the
      private attributes have values; the shared attributes are "NIL".





Daboo & Gellens               Experimental                     [Page 15]

RFC 5257                IMAP ANNOTATE Extension                June 2008


   Servers SHOULD send ANNOTATION message data items in unsolicited
   FETCH responses if an annotation entry is changed by a third-party,
   and the ANNOTATE select parameter was used.  This allows servers to
   keep clients updated with changes to annotations by other clients.

   Unsolicited ANNOTATION responses MUST NOT include ANNOTATION data
   values -- only the entry name of the ANNOTATION that has changed.
   This restriction avoids sending ANNOTATION data values (which may be
   large) to a client unless the client explicitly asks for the value.

   Example:

           C: a STORE 1 +FLAGS (\Seen)
           S: * 1 FETCH (FLAGS (\Seen))
                         ANNOTATION (/comment))
           S: a OK STORE complete

      In the above example, an unsolicited ANNOTATION response is
      returned during a STORE command.  The unsolicited response
      contains only the entry name of the annotation that changed, and
      not its value.

4.5.  ANNOTATION Message Data Item in STORE

   ANNOTATION <parenthesized entry-attribute-value list>

      Sets the specified list of entries by adding or replacing the
      specified attributes with the values provided.  Clients can use
      "NIL" for values of attributes it wants to remove from entries.

   The ANNOTATION message data item used with the STORE command has an
   implicit ".SILENT" behavior.  This means the server does not generate
   an untagged FETCH in response to the STORE command and assumes that
   the client updates its own cache if the command succeeds.  Though
   note, that if the Conditional STORE extension [RFC4551] is present,
   then an untagged FETCH response with a MODSEQ data item will be
   returned by the server as required by [RFC4551].

   If the server is unable to store an annotation because the size of
   its value is too large, the server MUST return a tagged NO response
   with a "[ANNOTATE TOOBIG]" response code.

   If the server is unable to store a new annotation because the maximum
   number of allowed annotations has already been reached, the server
   MUST return a tagged NO response with a "[ANNOTATE TOOMANY]" response
   code.





Daboo & Gellens               Experimental                     [Page 16]

RFC 5257                IMAP ANNOTATE Extension                June 2008


   Example:

           C: a STORE 1 ANNOTATION (/comment
                                    (value.priv "My new comment"))
           S: a OK Store complete

      In the above example, the entry "/comment" is created (if not
      already present).  Its private attribute "value" is created if not
      already present, or replaced if it exists.  "value.priv" is set to
      "My new comment".

   Example:

           C: a STORE 1 ANNOTATION (/comment
                                    (value.shared NIL))
           S: a OK Store complete

      In the above example, the shared "value" attribute of the entry
      "/comment" is removed by storing "NIL" into the attribute.

   Multiple entries can be set in a single STORE command by listing
   entry-attribute-value pairs in the list.

   Example:

           C: a STORE 1 ANNOTATION (/comment
                                    (value.priv "Get tix Tuesday")
                                    /altsubject
                                    (value.priv "Wots On"))
           S: a OK Store complete

      In the above example, the entries "/comment" and "/altsubject" are
      created (if not already present) and the private attribute "value"
      is created or replaced for each entry.

   Multiple attributes can be set in a single STORE command by listing
   multiple attribute-value pairs in the entry list.














Daboo & Gellens               Experimental                     [Page 17]

RFC 5257                IMAP ANNOTATE Extension                June 2008


   Example:

           C: a STORE 1 ANNOTATION (/comment
                                    (value.priv "My new comment"
                                     value.shared "foo's bar"))
           S: a OK Store complete

      In the above example, the entry "/comment" is created (if not
      already present) and the private and shared "value" attributes are
      created if not already present, or replaced if they exist.

4.6.  ANNOTATION Interaction with COPY

   The COPY command can be used to move messages from one mailbox to
   another on the same server.  Servers that support the ANNOTATION
   extension MUST, for each message being copied, copy all ".priv"
   annotation data for the current user only, and all ".shared"
   annotation data along with the message to the new mailbox.  The only
   exceptions to this are if the destination mailbox permissions are
   such that either the ".priv" or ".shared" annotations are not
   allowed, or if the destination mailbox is of a type that does not
   support annotations or does not support storing of annotations (a
   mailbox that returns a "NONE" or "READ-ONLY" response code in its
   ANNOTATIONS response), or if the destination mailbox cannot support
   the size of an annotation because it exceeds the ANNOTATIONS value.
   Servers MUST NOT copy ".priv" annotation data for users other than
   the current user.

4.7.  ANNOTATION Message Data Item in APPEND

   ANNOTATION <parenthesized entry-attribute-value list>

      Sets the specified list of entries and attributes in the resulting
      message.

   The APPEND command can include annotations for the message being
   appended via the addition of a new append data item [RFC4466].  The
   new data item can also be used with the multi-append [RFC3502]
   extension that allows multiple messages to be appended via a single
   APPEND command.











Daboo & Gellens               Experimental                     [Page 18]

RFC 5257                IMAP ANNOTATE Extension                June 2008


   Example:

           C: a APPEND drafts ANNOTATION (/comment
                (value.priv "Don't send until I say so")) {310}
           S: + Ready for literal data
           C: MIME-Version: 1.0
           ...
           C:
           S: a OK APPEND completed

      In the above example, a comment with a private value is added to a
      new message appended to the mailbox.  The ellipsis represents the
      bulk of the message.

4.8.  ANNOTATION Criterion in SEARCH

   ANNOTATION <entry-name> <attribute-name> <value>

   The ANNOTATION criterion for the SEARCH command allows a client to
   search for a specified string in the value of an annotation entry of
   a message.

   Messages that have annotations with entries matching <entry-name>,
   attributes matching <attribute-name>, and the specified string
   <value> in their values are returned in the SEARCH results.  The "*"
   character can be used in the entry name field to match any content in
   those items.  The "%" character can be used in the entry name field
   to match a single level of hierarchy only.

   Only the "value", "value.priv", and "value.shared" attributes can be
   searched.  Clients MUST NOT specify an attribute other than either
   "value", "value.priv", or "value.shared".  Servers MUST return a BAD
   response if the client tries to search any other attribute.

   Example:

           C: a SEARCH ANNOTATION /comment value "IMAP4"
           S: * SEARCH 2 3 5 7 11 13 17 19 23
           S: a OK Search complete

      In the above example, the message numbers of any messages
      containing the string "IMAP4" in the shared or private "value"
      attribute of the "/comment" entry are returned in the search
      results.







Daboo & Gellens               Experimental                     [Page 19]

RFC 5257                IMAP ANNOTATE Extension                June 2008


   Example:

           C: a SEARCH ANNOTATION * value.priv "IMAP4"
           S: * SEARCH 1 2 3 5 8 13 21 34
           S: a OK Search complete

      In the above example, the message numbers of any messages
      containing the string "IMAP4" in the private "value" attribute of
      any entry are returned in the search results.

4.9.  ANNOTATION Key in SORT

   ANNOTATION <entry-name> <attribute-name>

   The ANNOTATION criterion for the SORT command [RFC5256] instructs the
   server to return the sequence numbers or Unique Identifiers (UIDs) of
   messages in a mailbox, sorted using the values of the specified
   annotations.  The ANNOTATION criterion is available if the server
   returns both ANNOTATE-EXPERIMENT-1 and SORT as supported capabilities
   in the CAPABILITY command response.

   Messages are sorted using the values of the <attribute-name>
   attributes in the <entry-name> entries.

   Clients MUST provide either the ".priv" or ".shared" suffix to the
   attribute name to ensure that the server knows which specific value
   to sort on.

   Only the "value.priv" and "value.shared" attributes can be used for
   sorting.  Clients MUST NOT specify an attribute other than either
   "value.priv" or "value.shared".  Servers MUST return a BAD response
   if the client tries to sort on any other attribute.

   When either "value.priv" or "value.shared" is being sorted, the
   server MUST use the character set value specified in the SORT command
   to determine the appropriate sort order.

   Example:

           C: a SORT (ANNOTATION /altsubject value.shared) UTF-8 ALL
           S: * SORT 2 3 4 5 1 11 10 6 7 9 8
           S: a OK Sort complete

      In the above example, the message numbers of all messages are
      returned, sorted according to the shared "value" attribute of the
      "/altsubject" entry.





Daboo & Gellens               Experimental                     [Page 20]

RFC 5257                IMAP ANNOTATE Extension                June 2008


   Note that the ANNOTATION sort key must include a fully specified
   entry -- wild cards are not allowed.

4.10.  New ACL Rights

   As discussed in Section 3.4, this extension adds a new "n" right to
   the list of rights provided by the ACL extensions [RFC2086] and
   [RFC4314].

5.  Formal Syntax

   The following syntax specification uses the Augmented Backus-Naur
   Form (ABNF) notation as specified in [RFC5234].

   Non-terminals referenced but not defined below are as defined by
   [RFC3501] with the new definitions in [RFC4466] superseding those in
   [RFC3501].

   Except as noted otherwise, all alphabetic characters are case-
   insensitive.  The use of upper or lower case characters to define
   token strings is for editorial clarity only.  Implementations MUST
   accept these strings in a case-insensitive fashion.

      ann-size          = "NONE" /
                           (("READ-ONLY" / nz-number)
                            [SP "NOPRIVATE"])
                           ; response codes indicating the level of
                           ; support for annotations in a mailbox

      append-ext        =/ att-annotate
                          ; modifies [RFC3501] extension behaviour

      att-annotate      = "ANNOTATION" SP
                               "(" entry-att *(SP entry-att) ")"

      att-search        = "value" / "value.priv" / "value.shared"
                          ; the only attributes that can be searched

      att-sort          = "value.priv" / "value.shared"
                          ; the only attributes that can be sorted

      att-value         = attrib SP value

      attrib            = astring
                          ; dot-separated attribute name
                          ; MUST NOT contain "*" or "%"





Daboo & Gellens               Experimental                     [Page 21]

RFC 5257                IMAP ANNOTATE Extension                June 2008


      attribs           = attrib / "(" attrib *(SP attrib) ")"
                          ; one or more attribute specifiers

      capability        =/ "ANNOTATE-EXPERIMENT-1"
                          ; defines the capability for this extension

      entries           = entry-match /
                          "(" entry-match *(SP entry-match) ")"

      entry             = astring
                          ; slash-separated path to entry
                          ; MUST NOT contain "*" or "%"

      entry-att         = entry SP "(" att-value *(SP att-value) ")"

      entry-match       = list-mailbox
                          ; slash-separated path to entry
                          ; MAY contain "*" or "%" for use as wild cards

      fetch-att         =/ "ANNOTATION" SP "(" entries SP attribs ")"
                          ; modifies original IMAP fetch-att

      msg-att-dynamic   =/ "ANNOTATION" SP
                             ( "(" entry-att *(SP entry-att) ")" /
                               "(" entry *(SP entry) ")" )
                          ; extends FETCH response with annotation data

      resp-text-code    =/ "ANNOTATE" SP "TOOBIG" /
                           "ANNOTATE" SP "TOOMANY" /
                           "ANNOTATIONS" SP ann-size
                          ; new response codes

      search-key        =/ "ANNOTATION" SP entry-match SP att-search
                           SP value
                          ; modifies original IMAP search-key

      select-param      =/ "ANNOTATE"
                          ; defines the select parameter used with
                          ; ANNOTATE extension

      sort-key          =/ "ANNOTATION" SP entry SP att-sort
                          ; modifies original sort-key

      store-att-flags   =/ att-annotate
                          ; modifies original IMAP STORE command

      value             = nstring / literal8




Daboo & Gellens               Experimental                     [Page 22]

RFC 5257                IMAP ANNOTATE Extension                June 2008


6.  IANA Considerations

   Entry names MUST be specified in a standards track or IESG approved
   experimental RFC, or fall under the vendor namespace.  Vendor names
   MUST be registered.

   Attribute names MUST be specified in a standards track or IESG
   approved experimental RFC.

   Each entry registration MUST include a content-type that is used to
   indicate the nature of the annotation value.  Where applicable, a
   charset parameter MUST be included with the content-type.

6.1.  Entry and Attribute Registration Template

   To: iana@iana.org
   Subject: IMAP Annotate Registration

   Please register the following IMAP Annotate item:

   [] Entry        [] Attribute

   Name: ______________________________

   Description: _______________________

   ____________________________________

   ____________________________________

   Content-Type:_______________________

   Contact person: ____________________

           email:  ____________________
















Daboo & Gellens               Experimental                     [Page 23]

RFC 5257                IMAP ANNOTATE Extension                June 2008


6.2.  Entry Registrations

   The following templates specify the IANA registrations of annotation
   entries specified in this document.

6.2.1.  /comment

   To: iana@iana.org
   Subject: IMAP Annotate Registration

   Please register the following IMAP Annotate item:

   [X] Entry        [] Attribute

   Name: /comment

   Description: Defined in IMAP ANNOTATE extension document.

   Content-Type: text/plain; charset=utf-8

   Contact person: Cyrus Daboo

           email:  cyrus@daboo.name

6.2.2.  /flags

   To: iana@iana.org
   Subject: IMAP Annotate Registration

   Please register the following IMAP Annotate item:

   [X] Entry        [] Attribute

   Name: /flags

   Description: Reserved entry hierarchy.

   Content-Type: -

   Contact person: Cyrus Daboo

           email:  cyrus@daboo.name









Daboo & Gellens               Experimental                     [Page 24]

RFC 5257                IMAP ANNOTATE Extension                June 2008


6.2.3.  /altsubject

   To: iana@iana.org
   Subject: IMAP Annotate Registration

   Please register the following IMAP Annotate item:

   [X] Entry        [] Attribute

   Name: /altsubject

   Description: Defined in IMAP ANNOTATE extension document.

   Content-Type: text/plain; charset=utf-8

   Contact person: Cyrus Daboo

           email:  cyrus@daboo.name

6.2.4.  /<section-part>/comment

   To: iana@iana.org
   Subject: IMAP Annotate Registration

   Please register the following IMAP Annotate item:

   [X] Entry        [] Attribute

   Name: /<section-part>/comment

   Description: Defined in IMAP ANNOTATE extension document.

   Content-Type: text/plain; charset=utf-8

   Contact person: Cyrus Daboo

           email:  cyrus@daboo.name














Daboo & Gellens               Experimental                     [Page 25]

RFC 5257                IMAP ANNOTATE Extension                June 2008


6.2.5.  /<section-part>/flags/seen

   To: iana@iana.org
   Subject: IMAP Annotate Registration

   Please register the following IMAP Annotate item:

   [X] Entry        [] Attribute

   Name: /<section-part>/flags/seen

   Description: Defined in IMAP ANNOTATE extension document.

   Content-Type: text/plain; charset=utf-8

   Contact person: Cyrus Daboo

           email:  cyrus@daboo.name

6.2.6.  /<section-part>/flags/answered

   To: iana@iana.org
   Subject: IMAP Annotate Registration

   Please register the following IMAP Annotate item:

   [X] Entry        [] Attribute

   Name: /<section-part>/flags/answered

   Description: Defined in IMAP ANNOTATE extension document.

   Content-Type: text/plain; charset=utf-8

   Contact person: Cyrus Daboo

           email:  cyrus@daboo.name














Daboo & Gellens               Experimental                     [Page 26]

RFC 5257                IMAP ANNOTATE Extension                June 2008


6.2.7.  /<section-part>/flags/flagged

   To: iana@iana.org
   Subject: IMAP Annotate Registration

   Please register the following IMAP Annotate item:

   [X] Entry        [] Attribute

   Name: /<section-part>/flags/flagged

   Description: Defined in IMAP ANNOTATE extension document.

   Content-Type: text/plain; charset=utf-8

   Contact person: Cyrus Daboo

           email:  cyrus@daboo.name

6.2.8.  /<section-part>/flags/forwarded

   To: iana@iana.org
   Subject: IMAP Annotate Registration

   Please register the following IMAP Annotate item:

   [X] Entry        [] Attribute

   Name: /<section-part>/flags/forwarded

   Description: Defined in IMAP ANNOTATE extension document.

   Content-Type: text/plain; charset=utf-8

   Contact person: Cyrus Daboo

           email:  cyrus@daboo.name














Daboo & Gellens               Experimental                     [Page 27]

RFC 5257                IMAP ANNOTATE Extension                June 2008


6.3.  Attribute Registrations

   The following templates specify the IANA registrations of annotation
   attributes specified in this document.

6.3.1.  value

   To: iana@iana.org
   Subject: IMAP Annotate Registration

   Please register the following IMAP Annotate item:

   [] Entry        [X] Attribute

   Name: value

   Description: Defined in IMAP ANNOTATE extension document.

   Contact person: Cyrus Daboo

           email:  cyrus@daboo.name

6.3.2.  size

   To: iana@iana.org
   Subject: IMAP Annotate Registration

   Please register the following IMAP Annotate item:

   [] Entry        [X] Attribute

   Name: size

   Description: Defined in IMAP ANNOTATE extension document.

   Contact person: Cyrus Daboo

           email:  cyrus@daboo.name

6.4.  Capability Registration

   This document registers "ANNOTATE-EXPERIMENT-1" as an IMAPEXT
   capability.








Daboo & Gellens               Experimental                     [Page 28]

RFC 5257                IMAP ANNOTATE Extension                June 2008


7.  Internationalization Considerations

   Annotations may contain values that include text strings, and both
   searching and sorting are possible with annotations.  Servers MUST
   follow standard IMAP text normalization, character set conversion,
   and collation rules when such operations are carried out, as would be
   done for other textual fields being searched or sorted on.

8.  Security Considerations

   Annotations whose values are intended to remain private MUST be
   stored in ".priv" values instead of ".shared" values, which may be
   accessible to other users.

   Excluding the above issues, the ANNOTATE extension does not raise any
   security considerations that are not present in the base IMAP
   protocol; these issues are discussed in [RFC3501].

9.  References

9.1.  Normative References

   [RFC2086]  Myers, J., "IMAP4 ACL extension", RFC 2086, January 1997.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC2244]  Newman, C. and J. Myers, "ACAP -- Application
              Configuration Access Protocol", RFC 2244, November 1997.

   [RFC3501]  Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
              4rev1", RFC 3501, March 2003.

   [RFC3502]  Crispin, M., "Internet Message Access Protocol (IMAP) -
              MULTIAPPEND Extension", RFC 3502, March 2003.

   [RFC3629]  Yergeau, F., "UTF-8, a transformation format of ISO
              10646", STD 63, RFC 3629, November 2003.

   [RFC4314]  Melnikov, A., "IMAP4 Access Control List (ACL) Extension",
              RFC 4314, December 2005.

   [RFC4466]  Melnikov, A. and C. Daboo, "Collected Extensions to IMAP4
              ABNF", RFC 4466, April 2006.

   [RFC5234]  Crocker, D., Ed., and P. Overell, "Augmented BNF for
              Syntax Specifications: ABNF", STD 68, RFC 5234, January
              2008.



Daboo & Gellens               Experimental                     [Page 29]

RFC 5257                IMAP ANNOTATE Extension                June 2008


   [RFC5256]  Crispin, M. and K. Murchison, "Internet Message Access
              Protocol - SORT and THREAD Extensions", RFC 5256, June
              2008.

9.2.  Informative References

   [RFC4551]  Melnikov, A. and S. Hole, "IMAP Extension for Conditional
              STORE Operation or Quick Flag Changes Resynchronization",
              RFC 4551, June 2006.

10.  Acknowledgments

   Many thanks to Chris Newman for his detailed comments on the first
   draft of this document, and to the participants at the ACAP working
   dinner in Pittsburgh.  The participants of the IMAPext working group
   made significant contributions to this work.

Authors' Addresses

   Cyrus Daboo
   Apple Inc.
   1 Infinite Loop
   Cupertino, CA  95014
   USA

   EMail: cyrus@daboo.name
   URI:   http://www.apple.com/


   Randall Gellens
   QUALCOMM Incorporated
   5775 Morehouse Dr.
   San Diego, CA  92121-2779
   USA

   EMail: randy@qualcomm.com















Daboo & Gellens               Experimental                     [Page 30]

RFC 5257                IMAP ANNOTATE Extension                June 2008


Full Copyright Statement

   Copyright (C) The IETF Trust (2008).

   This document is subject to the rights, licenses and restrictions
   contained in BCP 78, and except as set forth therein, the authors
   retain all their rights.

   This document and the information contained herein are provided on an
   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
   THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
   OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
   THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Intellectual Property

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed to
   pertain to the implementation or use of the technology described in
   this document or the extent to which any license under such rights
   might or might not be available; nor does it represent that it has
   made any independent effort to identify any such rights.  Information
   on the procedures with respect to rights in RFC documents can be
   found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use of
   such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository at
   http://www.ietf.org/ipr.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at
   ietf-ipr@ietf.org.












Daboo & Gellens               Experimental                     [Page 31]