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 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045
|
<pre>Internet Engineering Task Force (IETF) N. Jenkins
Request for Comments: 8621 Fastmail
Updates: <a href="./rfc5788">5788</a> C. Newman
Category: Standards Track Oracle
ISSN: 2070-1721 August 2019
<span class="h1">The JSON Meta Application Protocol (JMAP) for Mail</span>
Abstract
This document specifies a data model for synchronising email data
with a server using the JSON Meta Application Protocol (JMAP).
Clients can use this to efficiently search, access, organise, and
send messages, and to get push notifications for fast
resynchronisation when new messages are delivered or a change is made
in another client.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in <a href="./rfc7841#section-2">Section 2 of RFC 7841</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="https://www.rfc-editor.org/info/rfc8621">https://www.rfc-editor.org/info/rfc8621</a>.
Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="https://trustee.ietf.org/license-info">https://trustee.ietf.org/license-info</a>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
<span class="grey">Jenkins & Newman Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-1.1">1.1</a>. Notational Conventions . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-1.2">1.2</a>. Terminology . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-1.3">1.3</a>. Additions to the Capabilities Object . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-1.3.1">1.3.1</a>. urn:ietf:params:jmap:mail . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-1.3.2">1.3.2</a>. urn:ietf:params:jmap:submission . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-1.3.3">1.3.3</a>. urn:ietf:params:jmap:vacationresponse . . . . . . . . <a href="#page-8">8</a>
<a href="#section-1.4">1.4</a>. Data Type Support in Different Accounts . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-1.5">1.5</a>. Push . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-1.5.1">1.5.1</a>. Example . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-1.6">1.6</a>. Ids . . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-2">2</a>. Mailboxes . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-2.1">2.1</a>. Mailbox/get . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-14">14</a>
<a href="#section-2.2">2.2</a>. Mailbox/changes . . . . . . . . . . . . . . . . . . . . . <a href="#page-14">14</a>
<a href="#section-2.3">2.3</a>. Mailbox/query . . . . . . . . . . . . . . . . . . . . . . <a href="#page-14">14</a>
<a href="#section-2.4">2.4</a>. Mailbox/queryChanges . . . . . . . . . . . . . . . . . . <a href="#page-15">15</a>
<a href="#section-2.5">2.5</a>. Mailbox/set . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-16">16</a>
<a href="#section-2.6">2.6</a>. Example . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-17">17</a>
<a href="#section-3">3</a>. Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-20">20</a>
<a href="#section-3.1">3.1</a>. Thread/get . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-22">22</a>
<a href="#section-3.1.1">3.1.1</a>. Example . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-22">22</a>
<a href="#section-3.2">3.2</a>. Thread/changes . . . . . . . . . . . . . . . . . . . . . <a href="#page-22">22</a>
<a href="#section-4">4</a>. Emails . . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-22">22</a>
<a href="#section-4.1">4.1</a>. Properties of the Email Object . . . . . . . . . . . . . <a href="#page-23">23</a>
<a href="#section-4.1.1">4.1.1</a>. Metadata . . . . . . . . . . . . . . . . . . . . . . <a href="#page-24">24</a>
<a href="#section-4.1.2">4.1.2</a>. Header Fields Parsed Forms . . . . . . . . . . . . . <a href="#page-26">26</a>
<a href="#section-4.1.3">4.1.3</a>. Header Fields Properties . . . . . . . . . . . . . . <a href="#page-32">32</a>
<a href="#section-4.1.4">4.1.4</a>. Body Parts . . . . . . . . . . . . . . . . . . . . . <a href="#page-35">35</a>
<a href="#section-4.2">4.2</a>. Email/get . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-42">42</a>
<a href="#section-4.2.1">4.2.1</a>. Example . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-44">44</a>
<a href="#section-4.3">4.3</a>. Email/changes . . . . . . . . . . . . . . . . . . . . . . <a href="#page-45">45</a>
<a href="#section-4.4">4.4</a>. Email/query . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-45">45</a>
<a href="#section-4.4.1">4.4.1</a>. Filtering . . . . . . . . . . . . . . . . . . . . . . <a href="#page-46">46</a>
<a href="#section-4.4.2">4.4.2</a>. Sorting . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-49">49</a>
<a href="#section-4.4.3">4.4.3</a>. Thread Collapsing . . . . . . . . . . . . . . . . . . <a href="#page-50">50</a>
<a href="#section-4.5">4.5</a>. Email/queryChanges . . . . . . . . . . . . . . . . . . . <a href="#page-51">51</a>
<a href="#section-4.6">4.6</a>. Email/set . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-51">51</a>
<a href="#section-4.7">4.7</a>. Email/copy . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-53">53</a>
<a href="#section-4.8">4.8</a>. Email/import . . . . . . . . . . . . . . . . . . . . . . <a href="#page-54">54</a>
<a href="#section-4.9">4.9</a>. Email/parse . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-56">56</a>
<a href="#section-4.10">4.10</a>. Examples . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-58">58</a>
<a href="#section-5">5</a>. Search Snippets . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-68">68</a>
<a href="#section-5.1">5.1</a>. SearchSnippet/get . . . . . . . . . . . . . . . . . . . . <a href="#page-69">69</a>
<a href="#section-5.2">5.2</a>. Example . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-71">71</a>
<span class="grey">Jenkins & Newman Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<a href="#section-6">6</a>. Identities . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-72">72</a>
<a href="#section-6.1">6.1</a>. Identity/get . . . . . . . . . . . . . . . . . . . . . . <a href="#page-73">73</a>
<a href="#section-6.2">6.2</a>. Identity/changes . . . . . . . . . . . . . . . . . . . . <a href="#page-73">73</a>
<a href="#section-6.3">6.3</a>. Identity/set . . . . . . . . . . . . . . . . . . . . . . <a href="#page-73">73</a>
<a href="#section-6.4">6.4</a>. Example . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-73">73</a>
<a href="#section-7">7</a>. Email Submission . . . . . . . . . . . . . . . . . . . . . . <a href="#page-74">74</a>
<a href="#section-7.1">7.1</a>. EmailSubmission/get . . . . . . . . . . . . . . . . . . . <a href="#page-80">80</a>
<a href="#section-7.2">7.2</a>. EmailSubmission/changes . . . . . . . . . . . . . . . . . <a href="#page-80">80</a>
<a href="#section-7.3">7.3</a>. EmailSubmission/query . . . . . . . . . . . . . . . . . . <a href="#page-80">80</a>
<a href="#section-7.4">7.4</a>. EmailSubmission/queryChanges . . . . . . . . . . . . . . <a href="#page-81">81</a>
<a href="#section-7.5">7.5</a>. EmailSubmission/set . . . . . . . . . . . . . . . . . . . <a href="#page-81">81</a>
<a href="#section-7.5.1">7.5.1</a>. Example . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-84">84</a>
<a href="#section-8">8</a>. Vacation Response . . . . . . . . . . . . . . . . . . . . . . <a href="#page-86">86</a>
<a href="#section-8.1">8.1</a>. VacationResponse/get . . . . . . . . . . . . . . . . . . <a href="#page-87">87</a>
<a href="#section-8.2">8.2</a>. VacationResponse/set . . . . . . . . . . . . . . . . . . <a href="#page-88">88</a>
<a href="#section-9">9</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-88">88</a>
<a href="#section-9.1">9.1</a>. EmailBodyPart Value . . . . . . . . . . . . . . . . . . . <a href="#page-88">88</a>
<a href="#section-9.2">9.2</a>. HTML Email Display . . . . . . . . . . . . . . . . . . . <a href="#page-88">88</a>
<a href="#section-9.3">9.3</a>. Multiple Part Display . . . . . . . . . . . . . . . . . . <a href="#page-91">91</a>
<a href="#section-9.4">9.4</a>. Email Submission . . . . . . . . . . . . . . . . . . . . <a href="#page-91">91</a>
<a href="#section-9.5">9.5</a>. Partial Account Access . . . . . . . . . . . . . . . . . <a href="#page-92">92</a>
<a href="#section-9.6">9.6</a>. Permission to Send from an Address . . . . . . . . . . . <a href="#page-92">92</a>
<a href="#section-10">10</a>. IANA Considerations . . . . . . . . . . . . . . . . . . . . . <a href="#page-93">93</a>
<a href="#section-10.1">10.1</a>. JMAP Capability Registration for "mail" . . . . . . . . <a href="#page-93">93</a>
<a href="#section-10.2">10.2</a>. JMAP Capability Registration for "submission" . . . . . <a href="#page-93">93</a>
<a href="#section-10.3">10.3</a>. JMAP Capability Registration for "vacationresponse" . . <a href="#page-94">94</a>
<a href="#section-10.4">10.4</a>. IMAP and JMAP Keywords Registry . . . . . . . . . . . . <a href="#page-94">94</a>
<a href="#section-10.4.1">10.4.1</a>. Registration of JMAP Keyword "$draft" . . . . . . . <a href="#page-95">95</a>
<a href="#section-10.4.2">10.4.2</a>. Registration of JMAP Keyword "$seen" . . . . . . . . <a href="#page-96">96</a>
<a href="#section-10.4.3">10.4.3</a>. Registration of JMAP Keyword "$flagged" . . . . . . <a href="#page-97">97</a>
<a href="#section-10.4.4">10.4.4</a>. Registration of JMAP Keyword "$answered" . . . . . . <a href="#page-98">98</a>
<a href="#section-10.4.5">10.4.5</a>. Registration of "$recent" Keyword . . . . . . . . . <a href="#page-99">99</a>
<a href="#section-10.5">10.5</a>. IMAP Mailbox Name Attributes Registry . . . . . . . . . <a href="#page-99">99</a>
<a href="#section-10.5.1">10.5.1</a>. Registration of "inbox" Role . . . . . . . . . . . . <a href="#page-99">99</a>
<a href="#section-10.6">10.6</a>. JMAP Error Codes Registry . . . . . . . . . . . . . . . <a href="#page-100">100</a>
<a href="#section-10.6.1">10.6.1</a>. mailboxHasChild . . . . . . . . . . . . . . . . . . <a href="#page-100">100</a>
<a href="#section-10.6.2">10.6.2</a>. mailboxHasEmail . . . . . . . . . . . . . . . . . . <a href="#page-100">100</a>
<a href="#section-10.6.3">10.6.3</a>. blobNotFound . . . . . . . . . . . . . . . . . . . . <a href="#page-100">100</a>
<a href="#section-10.6.4">10.6.4</a>. tooManyKeywords . . . . . . . . . . . . . . . . . . <a href="#page-101">101</a>
<a href="#section-10.6.5">10.6.5</a>. tooManyMailboxes . . . . . . . . . . . . . . . . . . <a href="#page-101">101</a>
<a href="#section-10.6.6">10.6.6</a>. invalidEmail . . . . . . . . . . . . . . . . . . . . <a href="#page-101">101</a>
<a href="#section-10.6.7">10.6.7</a>. tooManyRecipients . . . . . . . . . . . . . . . . . <a href="#page-102">102</a>
<a href="#section-10.6.8">10.6.8</a>. noRecipients . . . . . . . . . . . . . . . . . . . . <a href="#page-102">102</a>
<a href="#section-10.6.9">10.6.9</a>. invalidRecipients . . . . . . . . . . . . . . . . . <a href="#page-102">102</a>
<a href="#section-10.6.10">10.6.10</a>. forbiddenMailFrom . . . . . . . . . . . . . . . . . <a href="#page-103">103</a>
<a href="#section-10.6.11">10.6.11</a>. forbiddenFrom . . . . . . . . . . . . . . . . . . . <a href="#page-103">103</a>
<a href="#section-10.6.12">10.6.12</a>. forbiddenToSend . . . . . . . . . . . . . . . . . . <a href="#page-103">103</a>
<span class="grey">Jenkins & Newman Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<a href="#section-11">11</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-104">104</a>
<a href="#section-11.1">11.1</a>. Normative References . . . . . . . . . . . . . . . . . . <a href="#page-104">104</a>
<a href="#section-11.2">11.2</a>. Informative References . . . . . . . . . . . . . . . . . <a href="#page-107">107</a>
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-108">108</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
The JSON Meta Application Protocol (JMAP) [<a href="./rfc8620" title=""The JSON Meta Application Protocol"">RFC8620</a>] is a generic
protocol for synchronising data, such as mail, calendars, or contacts
between a client and a server. It is optimised for mobile and web
environments and aims to provide a consistent interface to different
data types.
This specification defines a data model for accessing a mail store
over JMAP, allowing you to query, read, organise, and submit mail for
sending.
The data model is designed to allow a server to provide consistent
access to the same data via IMAP [<a href="./rfc3501" title=""INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1"">RFC3501</a>] as well as JMAP. As in
IMAP, a message must belong to a mailbox; however, in JMAP, its id
does not change if you move it between mailboxes, and the server may
allow it to belong to multiple mailboxes simultaneously (often
exposed in a user agent as labels rather than folders).
As in IMAP, messages may also be assigned zero or more keywords:
short arbitrary strings. These are primarily intended to store
metadata to inform client display, such as unread status or whether a
message has been replied to. An IANA registry allows common
semantics to be shared between clients and extended easily in the
future.
A message and its replies are linked on the server by a common Thread
id. Clients may fetch the list of messages with a particular Thread
id to more easily present a threaded or conversational interface.
Permissions for message access happen on a per-mailbox basis.
Servers may give the user restricted permissions for certain
mailboxes, for example, if another user's inbox has been shared as
read-only with them.
<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. Notational Conventions</span>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
<a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a> [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>] [<a href="./rfc8174" title=""Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words"">RFC8174</a>] when, and only when, they appear in all
capitals, as shown here.
<span class="grey">Jenkins & Newman Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
Type signatures, examples, and property descriptions in this document
follow the conventions established in <a href="./rfc8620#section-1.1">Section 1.1 of [RFC8620]</a>. Data
types defined in the core specification are also used in this
document.
Servers MUST support all properties specified for the new data types
defined in this document.
<span class="h3"><a class="selflink" id="section-1.2" href="#section-1.2">1.2</a>. Terminology</span>
This document uses the same terminology as in the core JMAP
specification.
The terms Mailbox, Thread, Email, SearchSnippet, EmailSubmission and
VacationResponse (with that specific capitalisation) are used to
refer to the data types defined in this document and instances of
those data types.
The term message refers to a document in Internet Message Format, as
described in [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>]. The Email data type represents messages in
the mail store and associated metadata.
<span class="h3"><a class="selflink" id="section-1.3" href="#section-1.3">1.3</a>. Additions to the Capabilities Object</span>
The capabilities object is returned as part of the JMAP Session
object; see <a href="./rfc8620#section-2">[RFC8620], Section 2</a>.
This document defines three additional capability URIs.
<span class="h4"><a class="selflink" id="section-1.3.1" href="#section-1.3.1">1.3.1</a>. urn:ietf:params:jmap:mail</span>
This represents support for the Mailbox, Thread, Email, and
SearchSnippet data types and associated API methods. The value of
this property in the JMAP session "capabilities" property is an empty
object.
The value of this property in an account's "accountCapabilities"
property is an object that MUST contain the following information on
server capabilities and permissions for that account:
o maxMailboxesPerEmail: "UnsignedInt|null"
The maximum number of Mailboxes (see <a href="#section-2">Section 2</a>) that can be can
assigned to a single Email object (see <a href="#section-4">Section 4</a>). This MUST be
an integer >= 1, or null for no limit (or rather, the limit is
always the number of Mailboxes in the account).
<span class="grey">Jenkins & Newman Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o maxMailboxDepth: "UnsignedInt|null"
The maximum depth of the Mailbox hierarchy (i.e., one more than
the maximum number of ancestors a Mailbox may have), or null for
no limit.
o maxSizeMailboxName: "UnsignedInt"
The maximum length, in (UTF-8) octets, allowed for the name of a
Mailbox. This MUST be at least 100, although it is recommended
servers allow more.
o maxSizeAttachmentsPerEmail: "UnsignedInt"
The maximum total size of attachments, in octets, allowed for a
single Email object. A server MAY still reject the import or
creation of an Email with a lower attachment size total (for
example, if the body includes several megabytes of text, causing
the size of the encoded MIME structure to be over some server-
defined limit).
Note that this limit is for the sum of unencoded attachment sizes.
Users are generally not knowledgeable about encoding overhead,
etc., nor should they need to be, so marketing and help materials
normally tell them the "max size attachments". This is the
unencoded size they see on their hard drive, so this capability
matches that and allows the client to consistently enforce what
the user understands as the limit.
The server may separately have a limit for the total size of the
message [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>], created by combining the attachments (often
base64 encoded) with the message headers and bodies. For example,
suppose the server advertises "maxSizeAttachmentsPerEmail:
50000000" (50 MB). The enforced server limit may be for a message
size of 70000000 octets. Even with base64 encoding and a 2 MB
HTML body, 50 MB attachments would fit under this limit.
o emailQuerySortOptions: "String[]"
A list of all the values the server supports for the "property"
field of the Comparator object in an "Email/query" sort (see
<a href="#section-4.4.2">Section 4.4.2</a>). This MAY include properties the client does not
recognise (for example, custom properties specified in a vendor
extension). Clients MUST ignore any unknown properties in the
list.
<span class="grey">Jenkins & Newman Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o mayCreateTopLevelMailbox: "Boolean"
If true, the user may create a Mailbox (see <a href="#section-2">Section 2</a>) in this
account with a null parentId. (Permission for creating a child of
an existing Mailbox is given by the "myRights" property on that
Mailbox.)
<span class="h4"><a class="selflink" id="section-1.3.2" href="#section-1.3.2">1.3.2</a>. urn:ietf:params:jmap:submission</span>
This represents support for the Identity and EmailSubmission data
types and associated API methods. The value of this property in the
JMAP session "capabilities" property is an empty object.
The value of this property in an account's "accountCapabilities"
property is an object that MUST contain the following information on
server capabilities and permissions for that account:
o maxDelayedSend: "UnsignedInt"
The number in seconds of the maximum delay the server supports in
sending (see the EmailSubmission object description). This is 0
if the server does not support delayed send.
o submissionExtensions: "String[String[]]"
The set of SMTP submission extensions supported by the server,
which the client may use when creating an EmailSubmission object
(see <a href="#section-7">Section 7</a>). Each key in the object is the "ehlo-name", and
the value is a list of "ehlo-args".
A JMAP implementation that talks to a submission server [<a href="./rfc6409" title=""Message Submission for Mail"">RFC6409</a>]
SHOULD have a configuration setting that allows an administrator
to modify the set of submission EHLO capabilities it may expose on
this property. This allows a JMAP server to easily add access to
a new submission extension without code changes. By default, the
JMAP server should hide EHLO capabilities that have to do with the
transport mechanism and thus are only relevant to the JMAP server
(for example, PIPELINING, CHUNKING, or STARTTLS).
Examples of Submission extensions to include:
* FUTURERELEASE [<a href="./rfc4865" title=""SMTP Submission Service Extension for Future Message Release"">RFC4865</a>]
* SIZE [<a href="./rfc1870" title=""SMTP Service Extension for Message Size Declaration"">RFC1870</a>]
* DSN [<a href="./rfc3461" title=""Simple Mail Transfer Protocol (SMTP) Service Extension for Delivery Status Notifications (DSNs)"">RFC3461</a>]
* DELIVERYBY [<a href="./rfc2852" title=""Deliver By SMTP Service Extension"">RFC2852</a>]
<span class="grey">Jenkins & Newman Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
* MT-PRIORITY [<a href="./rfc6710" title=""Simple Mail Transfer Protocol Extension for Message Transfer Priorities"">RFC6710</a>]
A JMAP server MAY advertise an extension and implement the
semantics of that extension locally on the JMAP server even if a
submission server used by JMAP doesn't implement it.
The full IANA registry of submission extensions can be found at
<<a href="https://www.iana.org/assignments/mail-parameters">https://www.iana.org/assignments/mail-parameters</a>>.
<span class="h4"><a class="selflink" id="section-1.3.3" href="#section-1.3.3">1.3.3</a>. urn:ietf:params:jmap:vacationresponse</span>
This represents support for the VacationResponse data type and
associated API methods. The value of this property is an empty
object in both the JMAP session "capabilities" property and an
account's "accountCapabilities" property.
<span class="h3"><a class="selflink" id="section-1.4" href="#section-1.4">1.4</a>. Data Type Support in Different Accounts</span>
The server MUST include the appropriate capability strings as keys in
the "accountCapabilities" property of any account with which the user
may use the data types represented by that URI. Supported data types
may differ between accounts the user has access to. For example, in
the user's personal account, they may have access to all three sets
of data, but in a shared account, they may only have data for
"urn:ietf:params:jmap:mail". This means they can access
Mailbox/Thread/Email data in the shared account but are not allowed
to send as that account (and so do not have access to Identity/
EmailSubmission objects) or view/set its VacationResponse.
<span class="h3"><a class="selflink" id="section-1.5" href="#section-1.5">1.5</a>. Push</span>
Servers MUST support the JMAP push mechanisms, as specified in
<a href="./rfc8620#section-7">[RFC8620], Section 7</a>, to receive notifications when the state changes
for any of the types defined in this specification.
In addition, servers that implement the "urn:ietf:params:jmap:mail"
capability MUST support pushing state changes for a type called
"EmailDelivery". There are no methods to act on this type; it only
exists as part of the push mechanism. The state string for this MUST
change whenever a new Email is added to the store, but it SHOULD NOT
change upon any other change to the Email objects, for example, if
one is marked as read or deleted.
Clients in battery-constrained environments may wish to delay
fetching changes initiated by the user but fetch new Emails
immediately so they can notify the user. To do this, they can
register for pushes for the EmailDelivery type rather than the Email
type (as defined in <a href="#section-4">Section 4</a>).
<span class="grey">Jenkins & Newman Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h4"><a class="selflink" id="section-1.5.1" href="#section-1.5.1">1.5.1</a>. Example</span>
The client has registered for push notifications (see [<a href="./rfc8620" title=""The JSON Meta Application Protocol"">RFC8620</a>]) just
for the EmailDelivery type. The user marks an Email as read on
another device, causing the state string for the Email type to
change; however, as nothing new was added to the store, the
EmailDelivery state does not change and nothing is pushed to the
client. A new message arrives in the user's inbox, again causing the
Email state to change. This time, the EmailDelivery state also
changes, and a StateChange object is pushed to the client with the
new state string. The client may then resync to fetch the new Email
immediately.
<span class="h3"><a class="selflink" id="section-1.6" href="#section-1.6">1.6</a>. Ids</span>
If a JMAP Mail server also provides an IMAP interface to the data and
supports IMAP Extension for Object Identifiers [<a href="./rfc8474" title=""IMAP Extension for Object Identifiers"">RFC8474</a>], the ids
SHOULD be the same for Mailbox, Thread, and Email objects in JMAP.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Mailboxes</span>
A Mailbox represents a named set of Email objects. This is the
primary mechanism for organising messages within an account. It is
analogous to a folder or a label in other systems. A Mailbox may
perform a certain role in the system; see below for more details.
For compatibility with IMAP, an Email MUST belong to one or more
Mailboxes. The Email id does not change if the Email changes
Mailboxes.
A *Mailbox* object has the following properties:
o id: "Id" (immutable; server-set)
The id of the Mailbox.
o name: "String"
User-visible name for the Mailbox, e.g., "Inbox". This MUST be a
Net-Unicode string [<a href="./rfc5198" title=""Unicode Format for Network Interchange"">RFC5198</a>] of at least 1 character in length,
subject to the maximum size given in the capability object. There
MUST NOT be two sibling Mailboxes with both the same parent and
the same name. Servers MAY reject names that violate server
policy (e.g., names containing a slash (/) or control characters).
<span class="grey">Jenkins & Newman Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o parentId: "Id|null" (default: null)
The Mailbox id for the parent of this Mailbox, or null if this
Mailbox is at the top level. Mailboxes form acyclic graphs
(forests) directed by the child-to-parent relationship. There
MUST NOT be a loop.
o role: "String|null" (default: null)
Identifies Mailboxes that have a particular common purpose (e.g.,
the "inbox"), regardless of the "name" property (which may be
localised).
This value is shared with IMAP (exposed in IMAP via the SPECIAL-
USE extension [<a href="./rfc6154" title=""IMAP LIST Extension for Special-Use Mailboxes"">RFC6154</a>]). However, unlike in IMAP, a Mailbox MUST
only have a single role, and there MUST NOT be two Mailboxes in
the same account with the same role. Servers providing IMAP
access to the same data are encouraged to enforce these extra
restrictions in IMAP as well. Otherwise, modifying the IMAP
attributes to ensure compliance when exposing the data over JMAP
is implementation dependent.
The value MUST be one of the Mailbox attribute names listed in the
IANA "IMAP Mailbox Name Attributes" registry at
<<a href="https://www.iana.org/assignments/imap-mailbox-name-attributes/">https://www.iana.org/assignments/imap-mailbox-name-attributes/</a>>,
as established in [<a href="./rfc8457" title=""IMAP "">RFC8457</a>], converted to lowercase. New roles
may be established here in the future.
An account is not required to have Mailboxes with any particular
roles.
o sortOrder: "UnsignedInt" (default: 0)
Defines the sort order of Mailboxes when presented in the client's
UI, so it is consistent between devices. The number MUST be an
integer in the range 0 <= sortOrder < 2^31.
A Mailbox with a lower order should be displayed before a Mailbox
with a higher order (that has the same parent) in any Mailbox
listing in the client's UI. Mailboxes with equal order SHOULD be
sorted in alphabetical order by name. The sorting should take
into account locale-specific character order convention.
o totalEmails: "UnsignedInt" (server-set)
The number of Emails in this Mailbox.
<span class="grey">Jenkins & Newman Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o unreadEmails: "UnsignedInt" (server-set)
The number of Emails in this Mailbox that have neither the "$seen"
keyword nor the "$draft" keyword.
o totalThreads: "UnsignedInt" (server-set)
The number of Threads where at least one Email in the Thread is in
this Mailbox.
o unreadThreads: "UnsignedInt" (server-set)
An indication of the number of "unread" Threads in the Mailbox.
For compatibility with existing implementations, the way "unread
Threads" is determined is not mandated in this document. The
simplest solution to implement is simply the number of Threads
where at least one Email in the Thread is both in this Mailbox and
has neither the "$seen" nor "$draft" keywords.
However, a quality implementation will return the number of unread
items the user would see if they opened that Mailbox. A Thread is
shown as unread if it contains any unread Emails that will be
displayed when the Thread is opened. Therefore, "unreadThreads"
should be the number of Threads where at least one Email in the
Thread has neither the "$seen" nor the "$draft" keyword AND at
least one Email in the Thread is in this Mailbox. Note that the
unread Email does not need to be the one in this Mailbox. In
addition, the trash Mailbox (that is, a Mailbox whose "role" is
"trash") requires special treatment:
1. Emails that are *only* in the trash (and no other Mailbox) are
ignored when calculating the "unreadThreads" count of other
Mailboxes.
2. Emails that are *not* in the trash are ignored when
calculating the "unreadThreads" count for the trash Mailbox.
The result of this is that Emails in the trash are treated as
though they are in a separate Thread for the purposes of unread
counts. It is expected that clients will hide Emails in the trash
when viewing a Thread in another Mailbox, and vice versa. This
allows you to delete a single Email to the trash out of a Thread.
For example, suppose you have an account where the entire contents
is a single Thread with 2 Emails: an unread Email in the trash and
a read Email in the inbox. The "unreadThreads" count would be 1
for the trash and 0 for the inbox.
<span class="grey">Jenkins & Newman Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o myRights: "MailboxRights" (server-set)
The set of rights (Access Control Lists (ACLs)) the user has in
relation to this Mailbox. These are backwards compatible with
IMAP ACLs, as defined in [<a href="./rfc4314" title=""IMAP4 Access Control List (ACL) Extension"">RFC4314</a>]. A *MailboxRights* object has
the following properties:
* mayReadItems: "Boolean"
If true, the user may use this Mailbox as part of a filter in
an "Email/query" call, and the Mailbox may be included in the
"mailboxIds" property of Email objects. Email objects may be
fetched if they are in *at least one* Mailbox with this
permission. If a sub-Mailbox is shared but not the parent
Mailbox, this may be false. Corresponds to IMAP ACLs "lr" (if
mapping from IMAP, both are required for this to be true).
* mayAddItems: "Boolean"
The user may add mail to this Mailbox (by either creating a new
Email or moving an existing one). Corresponds to IMAP ACL "i".
* mayRemoveItems: "Boolean"
The user may remove mail from this Mailbox (by either changing
the Mailboxes of an Email or destroying the Email).
Corresponds to IMAP ACLs "te" (if mapping from IMAP, both are
required for this to be true).
* maySetSeen: "Boolean"
The user may add or remove the "$seen" keyword to/from an
Email. If an Email belongs to multiple Mailboxes, the user may
only modify "$seen" if they have this permission for *all* of
the Mailboxes. Corresponds to IMAP ACL "s".
* maySetKeywords: "Boolean"
The user may add or remove any keyword other than "$seen" to/
from an Email. If an Email belongs to multiple Mailboxes, the
user may only modify keywords if they have this permission for
*all* of the Mailboxes. Corresponds to IMAP ACL "w".
* mayCreateChild: "Boolean"
The user may create a Mailbox with this Mailbox as its parent.
Corresponds to IMAP ACL "k".
<span class="grey">Jenkins & Newman Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
* mayRename: "Boolean"
The user may rename the Mailbox or make it a child of another
Mailbox. Corresponds to IMAP ACL "x" (although this covers
both rename and delete permissions).
* mayDelete: "Boolean"
The user may delete the Mailbox itself. Corresponds to IMAP
ACL "x" (although this covers both rename and delete
permissions).
* maySubmit: "Boolean"
Messages may be submitted directly to this Mailbox.
Corresponds to IMAP ACL "p".
o isSubscribed: "Boolean"
Has the user indicated they wish to see this Mailbox in their
client? This SHOULD default to false for Mailboxes in shared
accounts the user has access to and true for any new Mailboxes
created by the user themself. This MUST be stored separately per
user where multiple users have access to a shared Mailbox.
A user may have permission to access a large number of shared
accounts, or a shared account with a very large set of Mailboxes,
but only be interested in the contents of a few of these. Clients
may choose to only display Mailboxes where the "isSubscribed"
property is set to true, and offer a separate UI to allow the user
to see and subscribe/unsubscribe from the full set of Mailboxes.
However, clients MAY choose to ignore this property, either
entirely for ease of implementation or just for an account where
"isPersonal" is true (indicating it is the user's own rather than
a shared account).
This property corresponds to IMAP [<a href="./rfc3501" title=""INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1"">RFC3501</a>] mailbox subscriptions.
For IMAP compatibility, an Email in both the trash and another
Mailbox SHOULD be treated by the client as existing in both places
(i.e., when emptying the trash, the client should just remove it from
the trash Mailbox and leave it in the other Mailbox).
The following JMAP methods are supported.
<span class="grey">Jenkins & Newman Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. Mailbox/get</span>
This is a standard "/get" method as described in <a href="./rfc8620#section-5.1">[RFC8620],
Section 5.1</a>. The "ids" argument may be "null" to fetch all at once.
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>. Mailbox/changes</span>
This is a standard "/changes" method as described in <a href="./rfc8620#section-5.2">[RFC8620],
Section 5.2</a> but with one extra argument to the response:
o updatedProperties: "String[]|null"
If only the "totalEmails", "unreadEmails", "totalThreads", and/or
"unreadThreads" Mailbox properties have changed since the old
state, this will be the list of properties that may have changed.
If the server is unable to tell if only counts have changed, it
MUST just be null.
Since counts frequently change but other properties are generally
only changed rarely, the server can help the client optimise data
transfer by keeping track of changes to Email/Thread counts separate
from other state changes. The "updatedProperties" array may be used
directly via a back-reference in a subsequent "Mailbox/get" call in
the same request, so only these properties are returned if nothing
else has changed.
<span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a>. Mailbox/query</span>
This is a standard "/query" method as described in <a href="./rfc8620#section-5.5">[RFC8620],
Section 5.5</a> but with the following additional request argument:
o sortAsTree: "Boolean" (default: false)
If true, when sorting the query results and comparing Mailboxes A
and B:
* If A is an ancestor of B, it always comes first regardless of
the sort comparators. Similarly, if A is descendant of B, then
B always comes first.
* Otherwise, if A and B do not share a "parentId", find the
nearest ancestors of each that do have the same "parentId" and
compare the sort properties on those Mailboxes instead.
The result of this is that the Mailboxes are sorted as a tree
according to the parentId properties, with each set of children
with a common parent sorted according to the standard sort
comparators.
<span class="grey">Jenkins & Newman Standards Track [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o filterAsTree: "Boolean" (default: false)
If true, a Mailbox is only included in the query if all its
ancestors are also included in the query according to the filter.
A *FilterCondition* object has the following properties, any of which
may be omitted:
o parentId: "Id|null"
The Mailbox "parentId" property must match the given value
exactly.
o name: "String"
The Mailbox "name" property contains the given string.
o role: "String|null"
The Mailbox "role" property must match the given value exactly.
o hasAnyRole: "Boolean"
If true, a Mailbox matches if it has any non-null value for its
"role" property.
o isSubscribed: "Boolean"
The "isSubscribed" property of the Mailbox must be identical to
the value given to match the condition.
A Mailbox object matches the FilterCondition if and only if all of
the given conditions match. If zero properties are specified, it is
automatically true for all objects.
The following Mailbox properties MUST be supported for sorting:
o "sortOrder"
o "name"
<span class="h3"><a class="selflink" id="section-2.4" href="#section-2.4">2.4</a>. Mailbox/queryChanges</span>
This is a standard "/queryChanges" method as described in <a href="./rfc8620#section-5.6">[RFC8620],
Section 5.6</a>.
<span class="grey">Jenkins & Newman Standards Track [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h3"><a class="selflink" id="section-2.5" href="#section-2.5">2.5</a>. Mailbox/set</span>
This is a standard "/set" method as described in <a href="./rfc8620#section-5.3">[RFC8620],
Section 5.3</a> but with the following additional request argument:
o onDestroyRemoveEmails: "Boolean" (default: false)
If false, any attempt to destroy a Mailbox that still has Emails
in it will be rejected with a "mailboxHasEmail" SetError. If
true, any Emails that were in the Mailbox will be removed from it,
and if in no other Mailboxes, they will be destroyed when the
Mailbox is destroyed.
The following extra SetError types are defined:
For "destroy":
o "mailboxHasChild": The Mailbox still has at least one child
Mailbox. The client MUST remove these before it can delete the
parent Mailbox.
o "mailboxHasEmail": The Mailbox has at least one Email assigned to
it, and the "onDestroyRemoveEmails" argument was false.
<span class="grey">Jenkins & Newman Standards Track [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h3"><a class="selflink" id="section-2.6" href="#section-2.6">2.6</a>. Example</span>
Fetching all Mailboxes in an account:
[[ "Mailbox/get", {
"accountId": "u33084183",
"ids": null
}, "0" ]]
And the response:
[[ "Mailbox/get", {
"accountId": "u33084183",
"state": "78540",
"list": [{
"id": "MB23cfa8094c0f41e6",
"name": "Inbox",
"parentId": null,
"role": "inbox",
"sortOrder": 10,
"totalEmails": 16307,
"unreadEmails": 13905,
"totalThreads": 5833,
"unreadThreads": 5128,
"myRights": {
"mayAddItems": true,
"mayRename": false,
"maySubmit": true,
"mayDelete": false,
"maySetKeywords": true,
"mayRemoveItems": true,
"mayCreateChild": true,
"maySetSeen": true,
"mayReadItems": true
},
"isSubscribed": true
}, {
"id": "MB674cc24095db49ce",
"name": "Important mail",
...
}, ... ],
"notFound": []
}, "0" ]]
<span class="grey">Jenkins & Newman Standards Track [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
Now suppose an Email is marked read, and we get a push update that
the Mailbox state has changed. You might fetch the updates like
this:
[[ "Mailbox/changes", {
"accountId": "u33084183",
"sinceState": "78540"
}, "0" ],
[ "Mailbox/get", {
"accountId": "u33084183",
"#ids": {
"resultOf": "0",
"name": "Mailbox/changes",
"path": "/created"
}
}, "1" ],
[ "Mailbox/get", {
"accountId": "u33084183",
"#ids": {
"resultOf": "0",
"name": "Mailbox/changes",
"path": "/updated"
},
"#properties": {
"resultOf": "0",
"name": "Mailbox/changes",
"path": "/updatedProperties"
}
}, "2" ]]
<span class="grey">Jenkins & Newman Standards Track [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
This fetches the list of ids for created/updated/destroyed Mailboxes,
then using back-references, it fetches the data for just the created/
updated Mailboxes in the same request. The response may look
something like this:
[[ "Mailbox/changes", {
"accountId": "u33084183",
"oldState": "78541",
"newState": "78542",
"hasMoreChanges": false,
"updatedProperties": [
"totalEmails", "unreadEmails",
"totalThreads", "unreadThreads"
],
"created": [],
"updated": ["MB23cfa8094c0f41e6"],
"destroyed": []
}, "0" ],
[ "Mailbox/get", {
"accountId": "u33084183",
"state": "78542",
"list": [],
"notFound": []
}, "1" ],
[ "Mailbox/get", {
"accountId": "u33084183",
"state": "78542",
"list": [{
"id": "MB23cfa8094c0f41e6",
"totalEmails": 16307,
"unreadEmails": 13903,
"totalThreads": 5833,
"unreadThreads": 5127
}],
"notFound": []
}, "2" ]]
<span class="grey">Jenkins & Newman Standards Track [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
Here's an example where we try to rename one Mailbox and destroy
another:
[[ "Mailbox/set", {
"accountId": "u33084183",
"ifInState": "78542",
"update": {
"MB674cc24095db49ce": {
"name": "Maybe important mail"
}
},
"destroy": [ "MB23cfa8094c0f41e6" ]
}, "0" ]]
Suppose the rename succeeds, but we don't have permission to destroy
the Mailbox we tried to destroy; we might get back:
[[ "Mailbox/set", {
"accountId": "u33084183",
"oldState": "78542",
"newState": "78549",
"updated": {
"MB674cc24095db49ce": null
},
"notDestroyed": {
"MB23cfa8094c0f41e6": {
"type": "forbidden"
}
}
}, "0" ]]
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Threads</span>
Replies are grouped together with the original message to form a
Thread. In JMAP, a Thread is simply a flat list of Emails, ordered
by date. Every Email MUST belong to a Thread, even if it is the only
Email in the Thread.
The exact algorithm for determining whether two Emails belong to the
same Thread is not mandated in this spec to allow for compatibility
with different existing systems. For new implementations, it is
suggested that two messages belong in the same Thread if both of the
following conditions apply:
1. An identical message id [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>] appears in both messages in any
of the Message-Id, In-Reply-To, and References header fields.
<span class="grey">Jenkins & Newman Standards Track [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
2. After stripping automatically added prefixes such as "Fwd:",
"Re:", "[List-Tag]", etc., and ignoring white space, the subjects
are the same. This avoids the situation where a person replies
to an old message as a convenient way of finding the right
recipient to send to but changes the subject and starts a new
conversation.
If messages are delivered out of order for some reason, a user may
have two Emails in the same Thread but without headers that associate
them with each other. The arrival of a third Email may provide the
missing references to join them all together into a single Thread.
Since the "threadId" of an Email is immutable, if the server wishes
to merge the Threads, it MUST handle this by deleting and reinserting
(with a new Email id) the Emails that change "threadId".
A *Thread* object has the following properties:
o id: "Id" (immutable; server-set)
The id of the Thread.
o emailIds: "Id[]" (server-set)
The ids of the Emails in the Thread, sorted by the "receivedAt"
date of the Email, oldest first. If two Emails have an identical
date, the sort is server dependent but MUST be stable (sorting by
id is recommended).
The following JMAP methods are supported.
<span class="grey">Jenkins & Newman Standards Track [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. Thread/get</span>
This is a standard "/get" method as described in <a href="./rfc8620#section-5.1">[RFC8620],
Section 5.1</a>.
<span class="h4"><a class="selflink" id="section-3.1.1" href="#section-3.1.1">3.1.1</a>. Example</span>
Request:
[[ "Thread/get", {
"accountId": "acme",
"ids": ["f123u4", "f41u44"]
}, "#1" ]]
with response:
[[ "Thread/get", {
"accountId": "acme",
"state": "f6a7e214",
"list": [
{
"id": "f123u4",
"emailIds": [ "eaa623", "f782cbb"]
},
{
"id": "f41u44",
"emailIds": [ "82cf7bb" ]
}
],
"notFound": []
}, "#1" ]]
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Thread/changes</span>
This is a standard "/changes" method as described in <a href="./rfc8620#section-5.2">[RFC8620],
Section 5.2</a>.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Emails</span>
An *Email* object is a representation of a message [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>], which
allows clients to avoid the complexities of MIME parsing, transfer
encoding, and character encoding.
<span class="grey">Jenkins & Newman Standards Track [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Properties of the Email Object</span>
Broadly, a message consists of two parts: a list of header fields and
then a body. The Email data type provides a way to access the full
structure or to use simplified properties and avoid some complexity
if this is sufficient for the client application.
While raw headers can be fetched and set, the vast majority of
clients should use an appropriate parsed form for each of the header
fields it wants to process, as this allows it to avoid the
complexities of various encodings that are required in a valid
message per <a href="./rfc5322">RFC 5322</a>.
The body of a message is normally a MIME-encoded set of documents in
a tree structure. This may be arbitrarily nested, but the majority
of email clients present a flat model of a message body (normally
plaintext or HTML) with a set of attachments. Flattening the MIME
structure to form this model can be difficult and causes
inconsistency between clients. Therefore, in addition to the
"bodyStructure" property, which gives the full tree, the Email object
contains 3 alternate properties with flat lists of body parts:
o "textBody"/"htmlBody": These provide a list of parts that should
be rendered sequentially as the "body" of the message. This is a
list rather than a single part as messages may have headers and/or
footers appended/prepended as separate parts when they are
transmitted, and some clients send text and images intended to be
displayed inline in the body (or even videos and sound clips) as
multiple parts rather than a single HTML part with referenced
images.
Because MIME allows for multiple representations of the same data
(using "multipart/alternative"), there is a "textBody" property
(which prefers a plaintext representation) and an "htmlBody"
property (which prefers an HTML representation) to accommodate the
two most common client requirements. The same part may appear in
both lists where there is no alternative between the two.
o "attachments": This provides a list of parts that should be
presented as "attachments" to the message. Some images may be
solely there for embedding within an HTML body part; clients may
wish to not present these as attachments in the user interface if
they are displaying the HTML with the embedded images directly.
Some parts may also be in htmlBody/textBody; again, clients may
wish to not present these as attachments in the user interface if
rendered as part of the body.
<span class="grey">Jenkins & Newman Standards Track [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
The "bodyValues" property allows for clients to fetch the value of
text parts directly without having to do a second request for the
blob and to have the server handle decoding the charset into unicode.
This data is in a separate property rather than on the EmailBodyPart
object to avoid duplication of large amounts of data, as the same
part may be included twice if the client fetches more than one of
bodyStructure, textBody, and htmlBody.
In the following subsections, the common notational convention for
wildcards has been adopted for content types, so "foo/*" means any
content type that starts with "foo/".
Due to the number of properties involved, the set of Email properties
is specified over the following four subsections. This is purely for
readability; all properties are top-level peers.
<span class="h4"><a class="selflink" id="section-4.1.1" href="#section-4.1.1">4.1.1</a>. Metadata</span>
These properties represent metadata about the message in the mail
store and are not derived from parsing the message itself.
o id: "Id" (immutable; server-set)
The id of the Email object. Note that this is the JMAP object id,
NOT the Message-ID header field value of the message [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>].
o blobId: "Id" (immutable; server-set)
The id representing the raw octets of the message [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>] for
this Email. This may be used to download the raw original message
or to attach it directly to another Email, etc.
o threadId: "Id" (immutable; server-set)
The id of the Thread to which this Email belongs.
o mailboxIds: "Id[Boolean]"
The set of Mailbox ids this Email belongs to. An Email in the
mail store MUST belong to one or more Mailboxes at all times
(until it is destroyed). The set is represented as an object,
with each key being a Mailbox id. The value for each key in the
object MUST be true.
<span class="grey">Jenkins & Newman Standards Track [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o keywords: "String[Boolean]" (default: {})
A set of keywords that apply to the Email. The set is represented
as an object, with the keys being the keywords. The value for
each key in the object MUST be true.
Keywords are shared with IMAP. The six system keywords from IMAP
get special treatment. The following four keywords have their
first character changed from "\" in IMAP to "$" in JMAP and have
particular semantic meaning:
* "$draft": The Email is a draft the user is composing.
* "$seen": The Email has been read.
* "$flagged": The Email has been flagged for urgent/special
attention.
* "$answered": The Email has been replied to.
The IMAP "\Recent" keyword is not exposed via JMAP. The IMAP
"\Deleted" keyword is also not present: IMAP uses a delete+expunge
model, which JMAP does not. Any message with the "\Deleted"
keyword MUST NOT be visible via JMAP (and so are not counted in
the "totalEmails", "unreadEmails", "totalThreads", and
"unreadThreads" Mailbox properties).
Users may add arbitrary keywords to an Email. For compatibility
with IMAP, a keyword is a case-insensitive string of 1-255
characters in the ASCII subset %x21-%x7e (excludes control chars
and space), and it MUST NOT include any of these characters:
( ) { ] % * " \
Because JSON is case sensitive, servers MUST return keywords in
lowercase.
The IANA "IMAP and JMAP Keywords" registry at
<<a href="https://www.iana.org/assignments/imap-jmap-keywords/">https://www.iana.org/assignments/imap-jmap-keywords/</a>> as
established in [<a href="./rfc5788" title=""IMAP4 Keyword Registry"">RFC5788</a>] assigns semantic meaning to some other
keywords in common use. New keywords may be established here in
the future. In particular, note:
* "$forwarded": The Email has been forwarded.
* "$phishing": The Email is highly likely to be phishing.
Clients SHOULD warn users to take care when viewing this Email
and disable links and attachments.
<span class="grey">Jenkins & Newman Standards Track [Page 25]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
* "$junk": The Email is definitely spam. Clients SHOULD set this
flag when users report spam to help train automated spam-
detection systems.
* "$notjunk": The Email is definitely not spam. Clients SHOULD
set this flag when users indicate an Email is legitimate, to
help train automated spam-detection systems.
o size: "UnsignedInt" (immutable; server-set)
The size, in octets, of the raw data for the message [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>] (as
referenced by the "blobId", i.e., the number of octets in the file
the user would download).
o receivedAt: "UTCDate" (immutable; default: time of creation on
server)
The date the Email was received by the message store. This is the
"internal date" in IMAP [<a href="./rfc3501" title=""INTERNET MESSAGE ACCESS PROTOCOL - VERSION 4rev1"">RFC3501</a>].
<span class="h4"><a class="selflink" id="section-4.1.2" href="#section-4.1.2">4.1.2</a>. Header Fields Parsed Forms</span>
Header field properties are derived from the message header fields
[<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>] [<a href="./rfc6532" title=""Internationalized Email Headers"">RFC6532</a>]. All header fields may be fetched in a raw form.
Some header fields may also be fetched in a parsed form. The
structured form that may be fetched depends on the header. The forms
are defined in the subsections that follow.
<span class="h5"><a class="selflink" id="section-4.1.2.1" href="#section-4.1.2.1">4.1.2.1</a>. Raw</span>
Type: "String"
The raw octets of the header field value from the first octet
following the header field name terminating colon, up to but
excluding the header field terminating CRLF. Any standards-compliant
message MUST be either ASCII (<a href="./rfc5322">RFC 5322</a>) or UTF-8 (<a href="./rfc6532">RFC 6532</a>); however,
other encodings exist in the wild. A server SHOULD replace any octet
or octet run with the high bit set that violates UTF-8 syntax with
the unicode replacement character (U+FFFD). Any NUL octet MUST be
dropped.
This form will typically have a leading space, as most generated
messages insert a space after the colon that terminates the header
field name.
<span class="grey">Jenkins & Newman Standards Track [Page 26]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h5"><a class="selflink" id="section-4.1.2.2" href="#section-4.1.2.2">4.1.2.2</a>. Text</span>
Type: "String"
The header field value with:
1. White space unfolded (as defined in <a href="./rfc5322#section-2.2.3">[RFC5322], Section 2.2.3</a>).
2. The terminating CRLF at the end of the value removed.
3. Any SP characters at the beginning of the value removed.
4. Any syntactically correct encoded sections [<a href="./rfc2047" title=""MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text"">RFC2047</a>] with a known
character set decoded. Any NUL octets or control characters
encoded per [<a href="./rfc2047" title=""MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text"">RFC2047</a>] are dropped from the decoded value. Any
text that looks like syntax per [<a href="./rfc2047" title=""MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text"">RFC2047</a>] but violates placement
or white space rules per [<a href="./rfc2047" title=""MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text"">RFC2047</a>] MUST NOT be decoded.
5. The resulting unicode converted to Normalization Form C (NFC)
form.
If any decodings fail, the parser SHOULD insert a unicode replacement
character (U+FFFD) and attempt to continue as much as possible.
To prevent obviously nonsense behaviour, which can lead to
interoperability issues, this form may only be fetched or set for the
following header fields:
o Subject
o Comments
o Keywords
o List-Id
o Any header field not defined in [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>] or [<a href="./rfc2369" title=""The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields"">RFC2369</a>]
<span class="h5"><a class="selflink" id="section-4.1.2.3" href="#section-4.1.2.3">4.1.2.3</a>. Addresses</span>
Type: "EmailAddress[]"
The header field is parsed as an "address-list" value, as specified
in <a href="./rfc5322#section-3.4">[RFC5322], Section 3.4</a>, into the "EmailAddress[]" type. There is
an EmailAddress item for each "mailbox" parsed from the "address-
list". Group and comment information is discarded.
<span class="grey">Jenkins & Newman Standards Track [Page 27]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
An *EmailAddress* object has the following properties:
o name: "String|null"
The "display-name" of the "mailbox" [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>]. If this is a
"quoted-string":
1. The surrounding DQUOTE characters are removed.
2. Any "quoted-pair" is decoded.
3. White space is unfolded, and then any leading and trailing
white space is removed.
If there is no "display-name" but there is a "comment" immediately
following the "addr-spec", the value of this SHOULD be used
instead. Otherwise, this property is null.
o email: "String"
The "addr-spec" of the "mailbox" [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>].
Any syntactically correct encoded sections [<a href="./rfc2047" title=""MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text"">RFC2047</a>] with a known
encoding MUST be decoded, following the same rules as for the Text
form (see <a href="#section-4.1.2.2">Section 4.1.2.2</a>).
Parsing SHOULD be best effort in the face of invalid structure to
accommodate invalid messages and semi-complete drafts. EmailAddress
objects MAY have an "email" property that does not conform to the
"addr-spec" form (for example, may not contain an @ symbol).
For example, the following "address-list" string:
" James Smythe" <james@example.com>, Friends:
jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?=
<john@example.com>;
would be parsed as:
[
{ "name": "James Smythe", "email": "james@example.com" },
{ "name": null, "email": "jane@example.com" },
{ "name": "John Smith", "email": "john@example.com" }
]
<span class="grey">Jenkins & Newman Standards Track [Page 28]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
To prevent obviously nonsense behaviour, which can lead to
interoperability issues, this form may only be fetched or set for the
following header fields:
o From
o Sender
o Reply-To
o To
o Cc
o Bcc
o Resent-From
o Resent-Sender
o Resent-Reply-To
o Resent-To
o Resent-Cc
o Resent-Bcc
o Any header field not defined in [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>] or [<a href="./rfc2369" title=""The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields"">RFC2369</a>]
<span class="h5"><a class="selflink" id="section-4.1.2.4" href="#section-4.1.2.4">4.1.2.4</a>. GroupedAddresses</span>
Type: "EmailAddressGroup[]"
This is similar to the Addresses form but preserves group
information. The header field is parsed as an "address-list" value,
as specified in <a href="./rfc5322#section-3.4">[RFC5322], Section 3.4</a>, into the "GroupedAddresses[]"
type. Consecutive "mailbox" values that are not part of a group are
still collected under an EmailAddressGroup object to provide a
uniform type.
<span class="grey">Jenkins & Newman Standards Track [Page 29]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
An *EmailAddressGroup* object has the following properties:
o name: "String|null"
The "display-name" of the "group" [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>], or null if the
addresses are not part of a group. If this is a "quoted-string",
it is processed the same as the "name" in the EmailAddress type.
o addresses: "EmailAddress[]"
The "mailbox" values that belong to this group, represented as
EmailAddress objects.
Any syntactically correct encoded sections [<a href="./rfc2047" title=""MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text"">RFC2047</a>] with a known
encoding MUST be decoded, following the same rules as for the Text
form (see <a href="#section-4.1.2.2">Section 4.1.2.2</a>).
Parsing SHOULD be best effort in the face of invalid structure to
accommodate invalid messages and semi-complete drafts.
For example, the following "address-list" string:
" James Smythe" <james@example.com>, Friends:
jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?=
<john@example.com>;
would be parsed as:
[
{ "name": null, "addresses": [
{ "name": "James Smythe", "email": "james@example.com" }
]},
{ "name": "Friends", "addresses": [
{ "name": null, "email": "jane@example.com" },
{ "name": "John Smith", "email": "john@example.com" }
]}
]
To prevent obviously nonsense behaviour, which can lead to
interoperability issues, this form may only be fetched or set for the
same header fields as the Addresses form (see <a href="#section-4.1.2.3">Section 4.1.2.3</a>).
<span class="grey">Jenkins & Newman Standards Track [Page 30]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h5"><a class="selflink" id="section-4.1.2.5" href="#section-4.1.2.5">4.1.2.5</a>. MessageIds</span>
Type: "String[]|null"
The header field is parsed as a list of "msg-id" values, as specified
in <a href="./rfc5322#section-3.6.4">[RFC5322], Section 3.6.4</a>, into the "String[]" type. Comments and/
or folding white space (CFWS) and surrounding angle brackets ("<>")
are removed. If parsing fails, the value is null.
To prevent obviously nonsense behaviour, which can lead to
interoperability issues, this form may only be fetched or set for the
following header fields:
o Message-ID
o In-Reply-To
o References
o Resent-Message-ID
o Any header field not defined in [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>] or [<a href="./rfc2369" title=""The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields"">RFC2369</a>]
<span class="h5"><a class="selflink" id="section-4.1.2.6" href="#section-4.1.2.6">4.1.2.6</a>. Date</span>
Type: "Date|null"
The header field is parsed as a "date-time" value, as specified in
<a href="./rfc5322#section-3.3">[RFC5322], Section 3.3</a>, into the "Date" type. If parsing fails, the
value is null.
To prevent obviously nonsense behaviour, which can lead to
interoperability issues, this form may only be fetched or set for the
following header fields:
o Date
o Resent-Date
o Any header field not defined in [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>] or [<a href="./rfc2369" title=""The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields"">RFC2369</a>]
<span class="grey">Jenkins & Newman Standards Track [Page 31]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h5"><a class="selflink" id="section-4.1.2.7" href="#section-4.1.2.7">4.1.2.7</a>. URLs</span>
Type: "String[]|null"
The header field is parsed as a list of URLs, as described in
[<a href="./rfc2369" title=""The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields"">RFC2369</a>], into the "String[]" type. Values do not include the
surrounding angle brackets or any comments in the header field with
the URLs. If parsing fails, the value is null.
To prevent obviously nonsense behaviour, which can lead to
interoperability issues, this form may only be fetched or set for the
following header fields:
o List-Help
o List-Unsubscribe
o List-Subscribe
o List-Post
o List-Owner
o List-Archive
o Any header field not defined in [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>] or [<a href="./rfc2369" title=""The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields"">RFC2369</a>]
<span class="h4"><a class="selflink" id="section-4.1.3" href="#section-4.1.3">4.1.3</a>. Header Fields Properties</span>
The following low-level Email property is specified for complete
access to the header data of the message:
o headers: "EmailHeader[]" (immutable)
This is a list of all header fields [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>], in the same order
they appear in the message. An *EmailHeader* object has the
following properties:
* name: "String"
The header "field name" as defined in [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>], with the same
capitalization that it has in the message.
* value: "String"
The header "field value" as defined in [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>], in Raw form.
<span class="grey">Jenkins & Newman Standards Track [Page 32]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
In addition, the client may request/send properties representing
individual header fields of the form:
header:{header-field-name}
Where "{header-field-name}" means any series of one or more printable
ASCII characters (i.e., characters that have values between 33 and
126, inclusive), except for colon (:). The property may also have
the following suffixes:
o :as{header-form}
This means the value is in a parsed form, where "{header-form}" is
one of the parsed-form names specified above. If not given, the
value is in Raw form.
o :all
This means the value is an array, with the items corresponding to
each instance of the header field, in the order they appear in the
message. If this suffix is not used, the result is the value of
the *last* instance of the header field (i.e., identical to the
last item in the array if :all is used), or null if none.
If both suffixes are used, they MUST be specified in the order above.
Header field names are matched case insensitively. The value is
typed according to the requested form or to an array of that type if
:all is used. If no header fields exist in the message with the
requested name, the value is null if fetching a single instance or an
empty array if requesting :all.
As a simple example, if the client requests a property called
"header:subject", this means find the *last* header field in the
message named "subject" (matched case insensitively) and return the
value in Raw form, or null if no header field of this name is found.
For a more complex example, consider the client requesting a property
called "header:Resent-To:asAddresses:all". This means:
1. Find *all* header fields named Resent-To (matched case
insensitively).
2. For each instance, parse the header field value in the Addresses
form.
3. The result is of type "EmailAddress[][]" -- each item in the
array corresponds to the parsed value (which is itself an array)
of the Resent-To header field instance.
<span class="grey">Jenkins & Newman Standards Track [Page 33]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-34" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
The following convenience properties are also specified for the Email
object:
o messageId: "String[]|null" (immutable)
The value is identical to the value of "header:Message-
ID:asMessageIds". For messages conforming to <a href="./rfc5322">RFC 5322</a>, this will
be an array with a single entry.
o inReplyTo: "String[]|null" (immutable)
The value is identical to the value of "header:In-Reply-
To:asMessageIds".
o references: "String[]|null" (immutable)
The value is identical to the value of
"header:References:asMessageIds".
o sender: "EmailAddress[]|null" (immutable)
The value is identical to the value of
"header:Sender:asAddresses".
o from: "EmailAddress[]|null" (immutable)
The value is identical to the value of "header:From:asAddresses".
o to: "EmailAddress[]|null" (immutable)
The value is identical to the value of "header:To:asAddresses".
o cc: "EmailAddress[]|null" (immutable)
The value is identical to the value of "header:Cc:asAddresses".
o bcc: "EmailAddress[]|null" (immutable)
The value is identical to the value of "header:Bcc:asAddresses".
o replyTo: "EmailAddress[]|null" (immutable)
The value is identical to the value of "header:Reply-
To:asAddresses".
o subject: "String|null" (immutable)
The value is identical to the value of "header:Subject:asText".
<span class="grey">Jenkins & Newman Standards Track [Page 34]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-35" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o sentAt: "Date|null" (immutable; default on creation: current
server time)
The value is identical to the value of "header:Date:asDate".
<span class="h4"><a class="selflink" id="section-4.1.4" href="#section-4.1.4">4.1.4</a>. Body Parts</span>
These properties are derived from the message body [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>] and its
MIME entities [<a href="./rfc2045" title=""Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies"">RFC2045</a>].
An *EmailBodyPart* object has the following properties:
o partId: "String|null"
Identifies this part uniquely within the Email. This is scoped to
the "emailId" and has no meaning outside of the JMAP Email object
representation. This is null if, and only if, the part is of type
"multipart/*".
o blobId: "Id|null"
The id representing the raw octets of the contents of the part,
after decoding any known Content-Transfer-Encoding (as defined in
[<a href="./rfc2045" title=""Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies"">RFC2045</a>]), or null if, and only if, the part is of type
"multipart/*". Note that two parts may be transfer-encoded
differently but have the same blob id if their decoded octets are
identical and the server is using a secure hash of the data for
the blob id. If the transfer encoding is unknown, it is treated
as though it had no transfer encoding.
o size: "UnsignedInt"
The size, in octets, of the raw data after content transfer
decoding (as referenced by the "blobId", i.e., the number of
octets in the file the user would download).
o headers: "EmailHeader[]"
This is a list of all header fields in the part, in the order they
appear in the message. The values are in Raw form.
o name: "String|null"
This is the decoded "filename" parameter of the Content-
Disposition header field per [<a href="./rfc2231" title=""MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations"">RFC2231</a>], or (for compatibility with
existing systems) if not present, then it's the decoded "name"
parameter of the Content-Type header field per [<a href="./rfc2047" title=""MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text"">RFC2047</a>].
<span class="grey">Jenkins & Newman Standards Track [Page 35]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-36" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o type: "String"
The value of the Content-Type header field of the part, if
present; otherwise, the implicit type as per the MIME standard
("text/plain" or "message/rfc822" if inside a "multipart/digest").
CFWS is removed and any parameters are stripped.
o charset: "String|null"
The value of the charset parameter of the Content-Type header
field, if present, or null if the header field is present but not
of type "text/*". If there is no Content-Type header field, or it
exists and is of type "text/*" but has no charset parameter, this
is the implicit charset as per the MIME standard: "us-ascii".
o disposition: "String|null"
The value of the Content-Disposition header field of the part, if
present; otherwise, it's null. CFWS is removed and any parameters
are stripped.
o cid: "String|null"
The value of the Content-Id header field of the part, if present;
otherwise, it's null. CFWS and surrounding angle brackets ("<>")
are removed. This may be used to reference the content from
within a "text/html" body part [<a href="#ref-HTML" title=""HTML 5.2"">HTML</a>] using the "cid:" protocol,
as defined in [<a href="./rfc2392" title=""Content-ID and Message-ID Uniform Resource Locators"">RFC2392</a>].
o language: "String[]|null"
The list of language tags, as defined in [<a href="./rfc3282" title=""Content Language Headers"">RFC3282</a>], in the
Content-Language header field of the part, if present.
o location: "String|null"
The URI, as defined in [<a href="./rfc2557" title=""MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)"">RFC2557</a>], in the Content-Location header
field of the part, if present.
o subParts: "EmailBodyPart[]|null"
If the type is "multipart/*", this contains the body parts of each
child.
In addition, the client may request/send EmailBodyPart properties
representing individual header fields, following the same syntax and
semantics as for the Email object, e.g., "header:Content-Type".
<span class="grey">Jenkins & Newman Standards Track [Page 36]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-37" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
The following Email properties are specified for access to the body
data of the message:
o bodyStructure: "EmailBodyPart" (immutable)
This is the full MIME structure of the message body, without
recursing into "message/rfc822" or "message/global" parts. Note
that EmailBodyParts may have subParts if they are of type
"multipart/*".
o bodyValues: "String[EmailBodyValue]" (immutable)
This is a map of "partId" to an EmailBodyValue object for none,
some, or all "text/*" parts. Which parts are included and whether
the value is truncated is determined by various arguments to
"Email/get" and "Email/parse". An *EmailBodyValue* object has the
following properties:
* value: "String"
The value of the body part after decoding Content-Transfer-
Encoding and the Content-Type charset, if both known to the
server, and with any CRLF replaced with a single LF. The
server MAY use heuristics to determine the charset to use for
decoding if the charset is unknown, no charset is given, or it
believes the charset given is incorrect. Decoding is best
effort; the server SHOULD insert the unicode replacement
character (U+FFFD) and continue when a malformed section is
encountered.
Note that due to the charset decoding and line ending
normalisation, the length of this string will probably not be
exactly the same as the "size" property on the corresponding
EmailBodyPart.
* isEncodingProblem: "Boolean" (default: false)
This is true if malformed sections were found while decoding
the charset, the charset was unknown, or the content-transfer-
encoding was unknown.
* isTruncated: "Boolean" (default: false)
This is true if the "value" has been truncated.
See the Security Considerations section for issues related to
truncation and heuristic determination of the content-type and
charset.
<span class="grey">Jenkins & Newman Standards Track [Page 37]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-38" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o textBody: "EmailBodyPart[]" (immutable)
A list of "text/plain", "text/html", "image/*", "audio/*", and/or
"video/*" parts to display (sequentially) as the message body,
with a preference for "text/plain" when alternative versions are
available.
o htmlBody: "EmailBodyPart[]" (immutable)
A list of "text/plain", "text/html", "image/*", "audio/*", and/or
"video/*" parts to display (sequentially) as the message body,
with a preference for "text/html" when alternative versions are
available.
o attachments: "EmailBodyPart[]" (immutable)
A list, traversing depth-first, of all parts in "bodyStructure"
that satisfy either of the following conditions:
* not of type "multipart/*" and not included in "textBody" or
"htmlBody"
* of type "image/*", "audio/*", or "video/*" and not in both
"textBody" and "htmlBody"
None of these parts include subParts, including "message/*" types.
Attached messages may be fetched using the "Email/parse" method
and the "blobId".
Note that a "text/html" body part [<a href="#ref-HTML" title=""HTML 5.2"">HTML</a>] may reference image parts
in attachments by using "cid:" links to reference the Content-Id,
as defined in [<a href="./rfc2392" title=""Content-ID and Message-ID Uniform Resource Locators"">RFC2392</a>], or by referencing the Content-Location.
o hasAttachment: "Boolean" (immutable; server-set)
This is true if there are one or more parts in the message that a
client UI should offer as downloadable. A server SHOULD set
hasAttachment to true if the "attachments" list contains at least
one item that does not have "Content-Disposition: inline". The
server MAY ignore parts in this list that are processed
automatically in some way or are referenced as embedded images in
one of the "text/html" parts of the message.
The server MAY set hasAttachment based on implementation-defined
or site-configurable heuristics.
<span class="grey">Jenkins & Newman Standards Track [Page 38]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-39" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o preview: "String" (immutable; server-set)
A plaintext fragment of the message body. This is intended to be
shown as a preview line when listing messages in the mail store
and may be truncated when shown. The server may choose which part
of the message to include in the preview; skipping quoted sections
and salutations and collapsing white space can result in a more
useful preview.
This MUST NOT be more than 256 characters in length.
As this is derived from the message content by the server, and the
algorithm for doing so could change over time, fetching this for
an Email a second time MAY return a different result. However,
the previous value is not considered incorrect, and the change
SHOULD NOT cause the Email object to be considered as changed by
the server.
The exact algorithm for decomposing bodyStructure into textBody,
htmlBody, and attachments part lists is not mandated, as this is a
quality-of-service implementation issue and likely to require
workarounds for malformed content discovered over time. However, the
following algorithm (expressed here in JavaScript) is suggested as a
starting point, based on real-world experience:
function isInlineMediaType ( type ) {
return type.startsWith( 'image/' ) ||
type.startsWith( 'audio/' ) ||
type.startsWith( 'video/' );
}
function parseStructure ( parts, multipartType, inAlternative,
htmlBody, textBody, attachments ) {
// For multipartType == alternative
let textLength = textBody ? textBody.length : -1;
let htmlLength = htmlBody ? htmlBody.length : -1;
for ( let i = 0; i < parts.length; i += 1 ) {
let part = parts[i];
let isMultipart = part.type.startsWith( 'multipart/' );
// Is this a body part rather than an attachment
let isInline = part.disposition != "attachment" &&
// Must be one of the allowed body types
( part.type == "text/plain" ||
part.type == "text/html" ||
isInlineMediaType( part.type ) ) &&
<span class="grey">Jenkins & Newman Standards Track [Page 39]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-40" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
// If multipart/related, only the first part can be inline
// If a text part with a filename, and not the first item
// in the multipart, assume it is an attachment
( i === 0 ||
( multipartType != "related" &&
( isInlineMediaType( part.type ) || !part.name ) ) );
if ( isMultipart ) {
let subMultiType = part.type.split( '/' )[1];
parseStructure( part.subParts, subMultiType,
inAlternative || ( subMultiType == 'alternative' ),
htmlBody, textBody, attachments );
} else if ( isInline ) {
if ( multipartType == 'alternative' ) {
switch ( part.type ) {
case 'text/plain':
textBody.push( part );
break;
case 'text/html':
htmlBody.push( part );
break;
default:
attachments.push( part );
break;
}
continue;
} else if ( inAlternative ) {
if ( part.type == 'text/plain' ) {
htmlBody = null;
}
if ( part.type == 'text/html' ) {
textBody = null;
}
}
if ( textBody ) {
textBody.push( part );
}
if ( htmlBody ) {
htmlBody.push( part );
}
if ( ( !textBody || !htmlBody ) &&
isInlineMediaType( part.type ) ) {
attachments.push( part );
}
} else {
attachments.push( part );
}
}
<span class="grey">Jenkins & Newman Standards Track [Page 40]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-41" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
if ( multipartType == 'alternative' && textBody && htmlBody ) {
// Found HTML part only
if ( textLength == textBody.length &&
htmlLength != htmlBody.length ) {
for ( let i = htmlLength; i < htmlBody.length; i += 1 ) {
textBody.push( htmlBody[i] );
}
}
// Found plaintext part only
if ( htmlLength == htmlBody.length &&
textLength != textBody.length ) {
for ( let i = textLength; i < textBody.length; i += 1 ) {
htmlBody.push( textBody[i] );
}
}
}
}
// Usage:
let htmlBody = [];
let textBody = [];
let attachments = [];
parseStructure( [ bodyStructure ], 'mixed', false,
htmlBody, textBody, attachments );
For instance, consider a message with both text and HTML versions
that has gone through a list software manager that attaches a header
and footer. It might have a MIME structure something like:
multipart/mixed
text/plain, content-disposition=inline - A
multipart/mixed
multipart/alternative
multipart/mixed
text/plain, content-disposition=inline - B
image/jpeg, content-disposition=inline - C
text/plain, content-disposition=inline - D
multipart/related
text/html - E
image/jpeg - F
image/jpeg, content-disposition=attachment - G
application/x-excel - H
message/rfc822 - J
text/plain, content-disposition=inline - K
<span class="grey">Jenkins & Newman Standards Track [Page 41]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-42" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
In this case, the above algorithm would decompose this to:
textBody => [ A, B, C, D, K ]
htmlBody => [ A, E, K ]
attachments => [ C, F, G, H, J ]
<span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. Email/get</span>
This is a standard "/get" method as described in <a href="./rfc8620#section-5.1">[RFC8620],
Section 5.1</a> with the following additional request arguments:
o bodyProperties: "String[]"
A list of properties to fetch for each EmailBodyPart returned. If
omitted, this defaults to:
[ "partId", "blobId", "size", "name", "type", "charset",
"disposition", "cid", "language", "location" ]
o fetchTextBodyValues: "Boolean" (default: false)
If true, the "bodyValues" property includes any "text/*" part in
the "textBody" property.
o fetchHTMLBodyValues: "Boolean" (default: false)
If true, the "bodyValues" property includes any "text/*" part in
the "htmlBody" property.
o fetchAllBodyValues: "Boolean" (default: false)
If true, the "bodyValues" property includes any "text/*" part in
the "bodyStructure" property.
o maxBodyValueBytes: "UnsignedInt" (default: 0)
If greater than zero, the "value" property of any EmailBodyValue
object returned in "bodyValues" MUST be truncated if necessary so
it does not exceed this number of octets in size. If 0 (the
default), no truncation occurs.
The server MUST ensure the truncation results in valid UTF-8 and
does not occur mid-codepoint. If the part is of type "text/html",
the server SHOULD NOT truncate inside an HTML tag, e.g., in the
middle of "<a href="https://example.com">". There is no
requirement for the truncated form to be a balanced tree or valid
HTML (indeed, the original source may well be neither of these
things).
<span class="grey">Jenkins & Newman Standards Track [Page 42]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-43" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
If the standard "properties" argument is omitted or null, the
following default MUST be used instead of "all" properties:
[ "id", "blobId", "threadId", "mailboxIds", "keywords", "size",
"receivedAt", "messageId", "inReplyTo", "references", "sender", "from",
"to", "cc", "bcc", "replyTo", "subject", "sentAt", "hasAttachment",
"preview", "bodyValues", "textBody", "htmlBody", "attachments" ]
The following properties are expected to be fast to fetch in a
quality implementation:
o id
o blobId
o threadId
o mailboxIds
o keywords
o size
o receivedAt
o messageId
o inReplyTo
o sender
o from
o to
o cc
o bcc
o replyTo
o subject
o sentAt
o hasAttachment
o preview
<span class="grey">Jenkins & Newman Standards Track [Page 43]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-44" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
Clients SHOULD take care when fetching any other properties, as there
may be significantly longer latency in fetching and returning the
data.
As specified above, parsed forms of headers may only be used on
appropriate header fields. Attempting to fetch a form that is
forbidden (e.g., "header:From:asDate") MUST result in the method call
being rejected with an "invalidArguments" error.
Where a specific header field is requested as a property, the
capitalization of the property name in the response MUST be identical
to that used in the request.
<span class="h4"><a class="selflink" id="section-4.2.1" href="#section-4.2.1">4.2.1</a>. Example</span>
Request:
[[ "Email/get", {
"ids": [ "f123u456", "f123u457" ],
"properties": [ "threadId", "mailboxIds", "from", "subject",
"receivedAt", "header:List-POST:asURLs",
"htmlBody", "bodyValues" ],
"bodyProperties": [ "partId", "blobId", "size", "type" ],
"fetchHTMLBodyValues": true,
"maxBodyValueBytes": 256
}, "#1" ]]
and response:
[[ "Email/get", {
"accountId": "abc",
"state": "41234123231",
"list": [
{
"id": "f123u457",
"threadId": "ef1314a",
"mailboxIds": { "f123": true },
"from": [{ "name": "Joe Bloggs", "email": "joe@example.com" }],
"subject": "Dinner on Thursday?",
"receivedAt": "2013-10-13T14:12:00Z",
"header:List-POST:asURLs": [
"mailto:partytime@lists.example.com"
],
"htmlBody": [{
"partId": "1",
"blobId": "B841623871",
"size": 283331,
"type": "text/html"
<span class="grey">Jenkins & Newman Standards Track [Page 44]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-45" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
}, {
"partId": "2",
"blobId": "B319437193",
"size": 10343,
"type": "text/plain"
}],
"bodyValues": {
"1": {
"isEncodingProblem": false,
"isTruncated": true,
"value": "<html><body><p>Hello ..."
},
"2": {
"isEncodingProblem": false,
"isTruncated": false,
"value": "-- Sent by your friendly mailing list ..."
}
}
}
],
"notFound": [ "f123u456" ]
}, "#1" ]]
<span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a>. Email/changes</span>
This is a standard "/changes" method as described in <a href="./rfc8620#section-5.2">[RFC8620],
Section 5.2</a>. If generating intermediate states for a large set of
changes, it is recommended that newer changes be returned first, as
these are generally of more interest to users.
<span class="h3"><a class="selflink" id="section-4.4" href="#section-4.4">4.4</a>. Email/query</span>
This is a standard "/query" method as described in <a href="./rfc8620#section-5.5">[RFC8620],
Section 5.5</a> but with the following additional request arguments:
o collapseThreads: "Boolean" (default: false)
If true, Emails in the same Thread as a previous Email in the list
(given the filter and sort order) will be removed from the list.
This means only one Email at most will be included in the list for
any given Thread.
In quality implementations, the query "total" property is expected to
be fast to calculate when the filter consists solely of a single
"inMailbox" property, as it is the same as the totalEmails or
totalThreads properties (depending on whether collapseThreads is
true) of the associated Mailbox object.
<span class="grey">Jenkins & Newman Standards Track [Page 45]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-46" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h4"><a class="selflink" id="section-4.4.1" href="#section-4.4.1">4.4.1</a>. Filtering</span>
A *FilterCondition* object has the following properties, any of which
may be omitted:
o inMailbox: "Id"
A Mailbox id. An Email must be in this Mailbox to match the
condition.
o inMailboxOtherThan: "Id[]"
A list of Mailbox ids. An Email must be in at least one Mailbox
not in this list to match the condition. This is to allow
messages solely in trash/spam to be easily excluded from a search.
o before: "UTCDate"
The "receivedAt" date-time of the Email must be before this date-
time to match the condition.
o after: "UTCDate"
The "receivedAt" date-time of the Email must be the same or after
this date-time to match the condition.
o minSize: "UnsignedInt"
The "size" property of the Email must be equal to or greater than
this number to match the condition.
o maxSize: "UnsignedInt"
The "size" property of the Email must be less than this number to
match the condition.
o allInThreadHaveKeyword: "String"
All Emails (including this one) in the same Thread as this Email
must have the given keyword to match the condition.
o someInThreadHaveKeyword: "String"
At least one Email (possibly this one) in the same Thread as this
Email must have the given keyword to match the condition.
<span class="grey">Jenkins & Newman Standards Track [Page 46]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-47" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o noneInThreadHaveKeyword: "String"
All Emails (including this one) in the same Thread as this Email
must *not* have the given keyword to match the condition.
o hasKeyword: "String"
This Email must have the given keyword to match the condition.
o notKeyword: "String"
This Email must not have the given keyword to match the condition.
o hasAttachment: "Boolean"
The "hasAttachment" property of the Email must be identical to the
value given to match the condition.
o text: "String"
Looks for the text in Emails. The server MUST look up text in the
From, To, Cc, Bcc, and Subject header fields of the message and
SHOULD look inside any "text/*" or other body parts that may be
converted to text by the server. The server MAY extend the search
to any additional textual property.
o from: "String"
Looks for the text in the From header field of the message.
o to: "String"
Looks for the text in the To header field of the message.
o cc: "String"
Looks for the text in the Cc header field of the message.
o bcc: "String"
Looks for the text in the Bcc header field of the message.
o subject: "String"
Looks for the text in the Subject header field of the message.
<span class="grey">Jenkins & Newman Standards Track [Page 47]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-48" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o body: "String"
Looks for the text in one of the body parts of the message. The
server MAY exclude MIME body parts with content media types other
than "text/*" and "message/*" from consideration in search
matching. Care should be taken to match based on the text content
actually presented to an end user by viewers for that media type
or otherwise identified as appropriate for search indexing.
Matching document metadata uninteresting to an end user (e.g.,
markup tag and attribute names) is undesirable.
o header: "String[]"
The array MUST contain either one or two elements. The first
element is the name of the header field to match against. The
second (optional) element is the text to look for in the header
field value. If not supplied, the message matches simply if it
has a header field of the given name.
If zero properties are specified on the FilterCondition, the
condition MUST always evaluate to true. If multiple properties are
specified, ALL must apply for the condition to be true (it is
equivalent to splitting the object into one-property conditions and
making them all the child of an AND filter operator).
The exact semantics for matching "String" fields is *deliberately not
defined* to allow for flexibility in indexing implementation, subject
to the following:
o Any syntactically correct encoded sections [<a href="./rfc2047" title=""MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text"">RFC2047</a>] of header
fields with a known encoding SHOULD be decoded before attempting
to match text.
o When searching inside a "text/html" body part, any text considered
markup rather than content SHOULD be ignored, including HTML tags
and most attributes, anything inside the "<head>" tag, Cascading
Style Sheets (CSS), and JavaScript. Attribute content intended
for presentation to the user such as "alt" and "title" SHOULD be
considered in the search.
o Text SHOULD be matched in a case-insensitive manner.
o Text contained in either (but matched) single (') or double (")
quotes SHOULD be treated as a *phrase search*; that is, a match is
required for that exact word or sequence of words, excluding the
surrounding quotation marks.
<span class="grey">Jenkins & Newman Standards Track [Page 48]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-49" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
Within a phrase, to match one of the following characters you MUST
escape it by prefixing it with a backslash (\):
' " \
o Outside of a phrase, white space SHOULD be treated as dividing
separate tokens that may be searched for separately but MUST all
be present for the Email to match the filter.
o Tokens (not part of a phrase) MAY be matched on a whole-word basis
using stemming (for example, a text search for "bus" would match
"buses" but not "business").
<span class="h4"><a class="selflink" id="section-4.4.2" href="#section-4.4.2">4.4.2</a>. Sorting</span>
The following value for the "property" field on the Comparator object
MUST be supported for sorting:
o "receivedAt" - The "receivedAt" date as returned in the Email
object.
The following values for the "property" field on the Comparator
object SHOULD be supported for sorting. When specifying a
"hasKeyword", "allInThreadHaveKeyword", or "someInThreadHaveKeyword"
sort, the Comparator object MUST also have a "keyword" property.
o "size" - The "size" as returned in the Email object.
o "from" - This is taken to be either the "name" property or if
null/empty, the "email" property of the *first* EmailAddress
object in the Email's "from" property. If still none, consider
the value to be the empty string.
o "to" - This is taken to be either the "name" property or if null/
empty, the "email" property of the *first* EmailAddress object in
the Email's "to" property. If still none, consider the value to
be the empty string.
o "subject" - This is taken to be the base subject of the message,
as defined in <a href="./rfc5256#section-2.1">Section 2.1 of [RFC5256]</a>.
o "sentAt" - The "sentAt" property on the Email object.
o "hasKeyword" - This value MUST be considered true if the Email has
the keyword given as an additional "keyword" property on the
Comparator object, or false otherwise.
<span class="grey">Jenkins & Newman Standards Track [Page 49]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-50" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o "allInThreadHaveKeyword" - This value MUST be considered true for
the Email if *all* of the Emails in the same Thread have the
keyword given as an additional "keyword" property on the
Comparator object.
o "someInThreadHaveKeyword" - This value MUST be considered true for
the Email if *any* of the Emails in the same Thread have the
keyword given as an additional "keyword" property on the
Comparator object.
The server MAY support sorting based on other properties as well. A
client can discover which properties are supported by inspecting the
account's "capabilities" object (see <a href="#section-1.3">Section 1.3</a>).
Example sort:
[{
"property": "someInThreadHaveKeyword",
"keyword": "$flagged",
"isAscending": false
}, {
"property": "subject",
"collation": "i;ascii-casemap"
}, {
"property": "receivedAt",
"isAscending": false
}]
This would sort Emails in flagged Threads first (the Thread is
considered flagged if any Email within it is flagged), in subject
order second, and then from newest first for messages with the same
subject. If two Emails have identical values for all three
properties, then the order is server dependent but must be stable.
<span class="h4"><a class="selflink" id="section-4.4.3" href="#section-4.4.3">4.4.3</a>. Thread Collapsing</span>
When "collapseThreads" is true, then after filtering and sorting the
Email list, the list is further winnowed by removing any Emails for a
Thread id that has already been seen (when passing through the list
sequentially). A Thread will therefore only appear *once* in the
result, at the position of the first Email in the list that belongs
to the Thread (given the current sort/filter).
<span class="grey">Jenkins & Newman Standards Track [Page 50]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-51" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h3"><a class="selflink" id="section-4.5" href="#section-4.5">4.5</a>. Email/queryChanges</span>
This is a standard "/queryChanges" method as described in <a href="./rfc8620#section-5.6">[RFC8620],
Section 5.6</a> with the following additional request argument:
o collapseThreads: "Boolean" (default: false)
The "collapseThreads" argument that was used with "Email/query".
<span class="h3"><a class="selflink" id="section-4.6" href="#section-4.6">4.6</a>. Email/set</span>
This is a standard "/set" method as described in <a href="./rfc8620#section-5.3">[RFC8620],
Section 5.3</a>. The "Email/set" method encompasses:
o Creating a draft
o Changing the keywords of an Email (e.g., unread/flagged status)
o Adding/removing an Email to/from Mailboxes (moving a message)
o Deleting Emails
The format of the "keywords"/"mailboxIds" properties means that when
updating an Email, you can either replace the entire set of keywords/
Mailboxes (by setting the full value of the property) or add/remove
individual ones using the JMAP patch syntax (see <a href="./rfc8620#section-5.3">[RFC8620],
Section 5.3</a> for the specification and <a href="#section-5.7">Section 5.7</a> for an example).
Due to the format of the Email object, when creating an Email, there
are a number of ways to specify the same information. To ensure that
the message [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>] to create is unambiguous, the following
constraints apply to Email objects submitted for creation:
o The "headers" property MUST NOT be given on either the top-level
Email or an EmailBodyPart -- the client must set each header field
as an individual property.
o There MUST NOT be two properties that represent the same header
field (e.g., "header:from" and "from") within the Email or
particular EmailBodyPart.
o Header fields MUST NOT be specified in parsed forms that are
forbidden for that particular field.
o Header fields beginning with "Content-" MUST NOT be specified on
the Email object, only on EmailBodyPart objects.
<span class="grey">Jenkins & Newman Standards Track [Page 51]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-52" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o If a "bodyStructure" property is given, there MUST NOT be
"textBody", "htmlBody", or "attachments" properties.
o If given, the "bodyStructure" EmailBodyPart MUST NOT contain a
property representing a header field that is already defined on
the top-level Email object.
o If given, textBody MUST contain exactly one body part and it MUST
be of type "text/plain".
o If given, htmlBody MUST contain exactly one body part and it MUST
be of type "text/html".
o Within an EmailBodyPart:
* The client may specify a partId OR a blobId, but not both. If
a partId is given, this partId MUST be present in the
"bodyValues" property.
* The "charset" property MUST be omitted if a partId is given
(the part's content is included in bodyValues, and the server
may choose any appropriate encoding).
* The "size" property MUST be omitted if a partId is given. If a
blobId is given, it may be included but is ignored by the
server (the size is actually calculated from the blob content
itself).
* A Content-Transfer-Encoding header field MUST NOT be given.
o Within an EmailBodyValue object, isEncodingProblem and isTruncated
MUST be either false or omitted.
Creation attempts that violate any of this SHOULD be rejected with an
"invalidProperties" error; however, a server MAY choose to modify the
Email (e.g., choose between conflicting headers, use a different
content-encoding, etc.) to comply with its requirements instead.
The server MAY also choose to set additional headers. If not
included, the server MUST generate and set a Message-ID header field
in conformance with <a href="./rfc5322#section-3.6.4">[RFC5322], Section 3.6.4</a> and a Date header field
in conformance with <a href="#section-3.6.1">Section 3.6.1</a>.
The final message generated may be invalid per <a href="./rfc5322">RFC 5322</a>. For
example, if it is a half-finished draft, the To header field may have
a value that does not conform to the required syntax for this header.
The message will be checked for strict conformance when submitted for
sending (see the EmailSubmission object description).
<span class="grey">Jenkins & Newman Standards Track [Page 52]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-53" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
Destroying an Email removes it from all Mailboxes to which it
belonged. To just delete an Email to trash, simply change the
"mailboxIds" property, so it is now in the Mailbox with a "role"
property equal to "trash", and remove all other Mailbox ids.
When emptying the trash, clients SHOULD NOT destroy Emails that are
also in a Mailbox other than trash. For those Emails, they SHOULD
just remove the trash Mailbox from the Email.
For successfully created Email objects, the "created" response
contains the "id", "blobId", "threadId", and "size" properties of the
object.
The following extra SetError types are defined:
For "create":
o "blobNotFound": At least one blob id given for an EmailBodyPart
doesn't exist. An extra "notFound" property of type "Id[]" MUST
be included in the SetError object containing every "blobId"
referenced by an EmailBodyPart that could not be found on the
server.
For "create" and "update":
o "tooManyKeywords": The change to the Email's keywords would exceed
a server-defined maximum.
o "tooManyMailboxes": The change to the set of Mailboxes that this
Email is in would exceed a server-defined maximum.
<span class="h3"><a class="selflink" id="section-4.7" href="#section-4.7">4.7</a>. Email/copy</span>
This is a standard "/copy" method as described in <a href="./rfc8620#section-5.4">[RFC8620],
Section 5.4</a>, except only the "mailboxIds", "keywords", and
"receivedAt" properties may be set during the copy. This method
cannot modify the message represented by the Email.
The server MAY forbid two Email objects with identical message
content [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>], or even just with the same Message-ID [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>],
to coexist within an account; if the target account already has the
Email, the copy will be rejected with a standard "alreadyExists"
error.
For successfully copied Email objects, the "created" response
contains the "id", "blobId", "threadId", and "size" properties of the
new object.
<span class="grey">Jenkins & Newman Standards Track [Page 53]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-54" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h3"><a class="selflink" id="section-4.8" href="#section-4.8">4.8</a>. Email/import</span>
The "Email/import" method adds messages [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>] to the set of
Emails in an account. The server MUST support messages with Email
Address Internationalization (EAI) headers [<a href="./rfc6532" title=""Internationalized Email Headers"">RFC6532</a>]. The messages
must first be uploaded as blobs using the standard upload mechanism.
The method takes the following arguments:
o accountId: "Id"
The id of the account to use.
o ifInState: "String|null"
This is a state string as returned by the "Email/get" method. If
supplied, the string must match the current state of the account
referenced by the accountId; otherwise, the method will be aborted
and a "stateMismatch" error returned. If null, any changes will
be applied to the current state.
o emails: "Id[EmailImport]"
A map of creation id (client specified) to EmailImport objects.
An *EmailImport* object has the following properties:
o blobId: "Id"
The id of the blob containing the raw message [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>].
o mailboxIds: "Id[Boolean]"
The ids of the Mailboxes to assign this Email to. At least one
Mailbox MUST be given.
o keywords: "String[Boolean]" (default: {})
The keywords to apply to the Email.
o receivedAt: "UTCDate" (default: time of most recent Received
header, or time of import on server if none)
The "receivedAt" date to set on the Email.
Each Email to import is considered an atomic unit that may succeed or
fail individually. Importing successfully creates a new Email object
from the data referenced by the blobId and applies the given
Mailboxes, keywords, and receivedAt date.
<span class="grey">Jenkins & Newman Standards Track [Page 54]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-55" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
The server MAY forbid two Email objects with the same exact content
[<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>], or even just with the same Message-ID [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>], to
coexist within an account. In this case, it MUST reject attempts to
import an Email considered to be a duplicate with an "alreadyExists"
SetError. An "existingId" property of type "Id" MUST be included on
the SetError object with the id of the existing Email. If duplicates
are allowed, the newly created Email object MUST have a separate id
and independent mutable properties to the existing object.
If the "blobId", "mailboxIds", or "keywords" properties are invalid
(e.g., missing, wrong type, id not found), the server MUST reject the
import with an "invalidProperties" SetError.
If the Email cannot be imported because it would take the account
over quota, the import should be rejected with an "overQuota"
SetError.
If the blob referenced is not a valid message [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>], the server
MAY modify the message to fix errors (such as removing NUL octets or
fixing invalid headers). If it does this, the "blobId" on the
response MUST represent the new representation and therefore be
different to the "blobId" on the EmailImport object. Alternatively,
the server MAY reject the import with an "invalidEmail" SetError.
The response has the following arguments:
o accountId: "Id"
The id of the account used for this call.
o oldState: "String|null"
The state string that would have been returned by "Email/get" on
this account before making the requested changes, or null if the
server doesn't know what the previous state string was.
o newState: "String"
The state string that will now be returned by "Email/get" on this
account.
o created: "Id[Email]|null"
A map of the creation id to an object containing the "id",
"blobId", "threadId", and "size" properties for each successfully
imported Email, or null if none.
<span class="grey">Jenkins & Newman Standards Track [Page 55]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-56" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o notCreated: "Id[SetError]|null"
A map of the creation id to a SetError object for each Email that
failed to be created, or null if all successful. The possible
errors are defined above.
The following additional errors may be returned instead of the
"Email/import" response:
"stateMismatch": An "ifInState" argument was supplied, and it does
not match the current state.
<span class="h3"><a class="selflink" id="section-4.9" href="#section-4.9">4.9</a>. Email/parse</span>
This method allows you to parse blobs as messages [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>] to get
Email objects. The server MUST support messages with EAI headers
[<a href="./rfc6532" title=""Internationalized Email Headers"">RFC6532</a>]. This can be used to parse and display attached messages
without having to import them as top-level Email objects in the mail
store in their own right.
The following metadata properties on the Email objects will be null
if requested:
o id
o mailboxIds
o keywords
o receivedAt
The "threadId" property of the Email MAY be present if the server can
calculate which Thread the Email would be assigned to were it to be
imported. Otherwise, this too is null if fetched.
The "Email/parse" method takes the following arguments:
o accountId: "Id"
The id of the account to use.
o blobIds: "Id[]"
The ids of the blobs to parse.
<span class="grey">Jenkins & Newman Standards Track [Page 56]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-57" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o properties: "String[]"
If supplied, only the properties listed in the array are returned
for each Email object. If omitted, defaults to:
[ "messageId", "inReplyTo", "references", "sender", "from", "to",
"cc", "bcc", "replyTo", "subject", "sentAt", "hasAttachment",
"preview", "bodyValues", "textBody", "htmlBody", "attachments" ]
o bodyProperties: "String[]"
A list of properties to fetch for each EmailBodyPart returned. If
omitted, defaults to the same value as the "Email/get"
"bodyProperties" default argument.
o fetchTextBodyValues: "Boolean" (default: false)
If true, the "bodyValues" property includes any "text/*" part in
the "textBody" property.
o fetchHTMLBodyValues: "Boolean" (default: false)
If true, the "bodyValues" property includes any "text/*" part in
the "htmlBody" property.
o fetchAllBodyValues: "Boolean" (default: false)
If true, the "bodyValues" property includes any "text/*" part in
the "bodyStructure" property.
o maxBodyValueBytes: "UnsignedInt" (default: 0)
If greater than zero, the "value" property of any EmailBodyValue
object returned in "bodyValues" MUST be truncated if necessary so
it does not exceed this number of octets in size. If 0 (the
default), no truncation occurs.
The server MUST ensure the truncation results in valid UTF-8 and
does not occur mid-codepoint. If the part is of type "text/html",
the server SHOULD NOT truncate inside an HTML tag, e.g., in the
middle of "<a href="https://example.com">". There is no
requirement for the truncated form to be a balanced tree or valid
HTML (indeed, the original source may well be neither of these
things).
<span class="grey">Jenkins & Newman Standards Track [Page 57]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-58" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
The response has the following arguments:
o accountId: "Id"
The id of the account used for the call.
o parsed: "Id[Email]|null"
A map of blob id to parsed Email representation for each
successfully parsed blob, or null if none.
o notParsable: "Id[]|null"
A list of ids given that corresponded to blobs that could not be
parsed as Emails, or null if none.
o notFound: "Id[]|null"
A list of blob ids given that could not be found, or null if none.
As specified above, parsed forms of headers may only be used on
appropriate header fields. Attempting to fetch a form that is
forbidden (e.g., "header:From:asDate") MUST result in the method call
being rejected with an "invalidArguments" error.
Where a specific header field is requested as a property, the
capitalization of the property name in the response MUST be identical
to that used in the request.
<span class="h3"><a class="selflink" id="section-4.10" href="#section-4.10">4.10</a>. Examples</span>
A client logs in for the first time. It first fetches the set of
Mailboxes. Now it will display the inbox to the user, which we will
presume has Mailbox id "fb666a55". The inbox may be (very!) large,
but the user's screen is only so big, so the client can just load the
Threads it needs to fill the screen and then load in more only when
the user scrolls. The client sends this request:
[[ "Email/query",{
"accountId": "ue150411c",
"filter": {
"inMailbox": "fb666a55"
},
"sort": [{
"isAscending": false,
"property": "receivedAt"
}],
"collapseThreads": true,
<span class="grey">Jenkins & Newman Standards Track [Page 58]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-59" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
"position": 0,
"limit": 30,
"calculateTotal": true
}, "0" ],
[ "Email/get", {
"accountId": "ue150411c",
"#ids": {
"resultOf": "0",
"name": "Email/query",
"path": "/ids"
},
"properties": [
"threadId"
]
}, "1" ],
[ "Thread/get", {
"accountId": "ue150411c",
"#ids": {
"resultOf": "1",
"name": "Email/get",
"path": "/list/*/threadId"
}
}, "2" ],
[ "Email/get", {
"accountId": "ue150411c",
"#ids": {
"resultOf": "2",
"name": "Thread/get",
"path": "/list/*/emailIds"
},
"properties": [
"threadId",
"mailboxIds",
"keywords",
"hasAttachment",
"from",
"subject",
"receivedAt",
"size",
"preview"
]
}, "3" ]]
<span class="grey">Jenkins & Newman Standards Track [Page 59]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-60" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
Let's break down the 4 method calls to see what they're doing:
"0": This asks the server for the ids of the first 30 Email objects
in the inbox, sorted newest first, ignoring Emails from the same
Thread as a newer Email in the Mailbox (i.e., it is the first 30
unique Threads).
"1": Now we use a back-reference to fetch the Thread ids for each of
these Email ids.
"2": Another back-reference fetches the Thread object for each of
these Thread ids.
"3": Finally, we fetch the information we need to display the Mailbox
listing (but no more!) for every Email in each of these 30 Threads.
The client may aggregate this data for display, for example, by
showing the Thread as "flagged" if any of the Emails in it has the
"$flagged" keyword.
The response from the server may look something like this:
[[ "Email/query", {
"accountId": "ue150411c",
"queryState": "09aa9a075588-780599:0",
"canCalculateChanges": true,
"position": 0,
"total": 115,
"ids": [ "Ma783e5cdf5f2deffbc97930a",
"M9bd17497e2a99cb345fc1d0a", ... ]
}, "0" ],
[ "Email/get", {
"accountId": "ue150411c",
"state": "780599",
"list": [{
"id": "Ma783e5cdf5f2deffbc97930a",
"threadId": "T36703c2cfe9bd5ed"
}, {
"id": "M9bd17497e2a99cb345fc1d0a",
"threadId": "T0a22ad76e9c097a1"
}, ... ],
"notFound": []
}, "1" ],
[ "Thread/get", {
"accountId": "ue150411c",
"state": "22a8728b",
"list": [{
"id": "T36703c2cfe9bd5ed",
"emailIds": [ "Ma783e5cdf5f2deffbc97930a" ]
<span class="grey">Jenkins & Newman Standards Track [Page 60]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-61" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
}, {
"id": "T0a22ad76e9c097a1",
"emailIds": [ "M3b568670a63e5d100f518fa5",
"M9bd17497e2a99cb345fc1d0a" ]
}, ... ],
"notFound": []
}, "2" ],
[ "Email/get", {
"accountId": "ue150411c",
"state": "780599",
"list": [{
"id": "Ma783e5cdf5f2deffbc97930a",
"threadId": "T36703c2cfe9bd5ed",
"mailboxIds": {
"fb666a55": true
},
"keywords": {
"$seen": true,
"$flagged": true
},
"hasAttachment": true,
"from": [{
"email": "jdoe@example.com",
"name": "Jane Doe"
}],
"subject": "The Big Reveal",
"receivedAt": "2018-06-27T00:20:35Z",
"size": 175047,
"preview": "As you may be aware, we are required to prepare a
presentation where we wow a panel of 5 random members of the
public, on or before 30 June each year. We have drafted..."
},
...
],
"notFound": []
}, "3" ]]
<span class="grey">Jenkins & Newman Standards Track [Page 61]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-62" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
Now, on another device, the user marks the first Email as unread,
sending this API request:
[[ "Email/set", {
"accountId": "ue150411c",
"update": {
"Ma783e5cdf5f2deffbc97930a": {
"keywords/$seen": null
}
}
}, "0" ]]
The server applies this and sends the success response:
[[ "Email/set", {
"accountId": "ue150411c",
"oldState": "780605",
"newState": "780606",
"updated": {
"Ma783e5cdf5f2deffbc97930a": null
},
...
}, "0" ]]
The user also deletes a few Emails, and then a new message arrives.
<span class="grey">Jenkins & Newman Standards Track [Page 62]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-63" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
Back on our original machine, we receive a push update that the state
string for Email is now "780800". As this does not match the
client's current state, it issues a request for the changes:
[[ "Email/changes", {
"accountId": "ue150411c",
"sinceState": "780605",
"maxChanges": 50
}, "3" ],
[ "Email/queryChanges", {
"accountId": "ue150411c",
"filter": {
"inMailbox": "fb666a55"
},
"sort": [{
"property": "receivedAt",
"isAscending": false
}],
"collapseThreads": true,
"sinceQueryState": "09aa9a075588-780599:0",
"upToId": "Mc2781d5e856a908d8a35a564",
"maxChanges": 25,
"calculateTotal": true
}, "11" ]]
The response:
[[ "Email/changes", {
"accountId": "ue150411c",
"oldState": "780605",
"newState": "780800",
"hasMoreChanges": false,
"created": [ "Me8de6c9f6de198239b982ea2" ],
"updated": [ "Ma783e5cdf5f2deffbc97930a" ],
"destroyed": [ "M9bd17497e2a99cb345fc1d0a", ... ]
}, "3" ],
[ "Email/queryChanges", {
"accountId": "ue150411c",
"oldQueryState": "09aa9a075588-780599:0",
"newQueryState": "e35e9facf117-780615:0",
"added": [{
"id": "Me8de6c9f6de198239b982ea2",
"index": 0
}],
"removed": [ "M9bd17497e2a99cb345fc1d0a" ],
"total": 115
}, "11" ]]
<span class="grey">Jenkins & Newman Standards Track [Page 63]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-64" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
The client can update its local cache of the query results by
removing "M9bd17497e2a99cb345fc1d0a" and then splicing in
"Me8de6c9f6de198239b982ea2" at position 0. As it does not have the
data for this new Email, it will then fetch it (it also could have
done this in the same request using back-references).
It knows something has changed about "Ma783e5cdf5f2deffbc97930a", so
it will refetch the Mailbox ids and keywords (the only mutable
properties) for this Email too.
The user starts composing a new Email. The email is plaintext and
the client knows the email in English so adds this metadata to the
body part. The user saves a draft while the composition is still in
progress. The client sends:
[[ "Email/set", {
"accountId": "ue150411c",
"create": {
"k192": {
"mailboxIds": {
"2ea1ca41b38e": true
},
"keywords": {
"$seen": true,
"$draft": true
},
"from": [{
"name": "Joe Bloggs",
"email": "joe@example.com"
}],
"subject": "World domination",
"receivedAt": "2018-07-10T01:03:11Z",
"sentAt": "2018-07-10T11:03:11+10:00",
"bodyStructure": {
"type": "text/plain",
"partId": "bd48",
"header:Content-Language": "en"
},
"bodyValues": {
"bd48": {
"value": "I have the most brilliant plan. Let me tell
you all about it. What we do is, we",
"isTruncated": false
}
}
}
}
}, "0" ]]
<span class="grey">Jenkins & Newman Standards Track [Page 64]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-65" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
The server creates the message and sends the success response:
[[ "Email/set", {
"accountId": "ue150411c",
"oldState": "780823",
"newState": "780839",
"created": {
"k192": {
"id": "Mf40b5f831efa7233b9eb1c7f",
"blobId": "Gf40b5f831efa7233b9eb1c7f8f97d84eeeee64f7",
"threadId": "Td957e72e89f516dc",
"size": 359
}
},
...
}, "0" ]]
The message created on the server looks something like this:
Message-Id: <bbce0ae9-58be-4b24-ac82-deb840d58016@sloti7d1t02>
User-Agent: Cyrus-JMAP/3.1.6-736-gdfb8e44
Mime-Version: 1.0
Date: Tue, 10 Jul 2018 11:03:11 +1000
From: "Joe Bloggs" <joe@example.com>
Subject: World domination
Content-Language: en
Content-Type: text/plain
I have the most brilliant plan. Let me tell you all about it. What we
do is, we
The user adds a recipient and converts the message to HTML so they
can add formatting, then saves an updated draft:
[[ "Email/set", {
"accountId": "ue150411c",
"create": {
"k1546": {
"mailboxIds": {
"2ea1ca41b38e": true
},
"keywords": {
"$seen": true,
"$draft": true
},
"from": [{
"name": "Joe Bloggs",
"email": "joe@example.com"
<span class="grey">Jenkins & Newman Standards Track [Page 65]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-66" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
}],
"to": [{
"name": "John",
"email": "john@example.com"
}],
"subject": "World domination",
"receivedAt": "2018-07-10T01:05:08Z",
"sentAt": "2018-07-10T11:05:08+10:00",
"bodyStructure": {
"type": "multipart/alternative",
"subParts": [{
"partId": "a49d",
"type": "text/html",
"header:Content-Language": "en"
}, {
"partId": "bd48",
"type": "text/plain",
"header:Content-Language": "en"
}]
},
"bodyValues": {
"bd48": {
"value": "I have the most brilliant plan. Let me tell
you all about it. What we do is, we",
"isTruncated": false
},
"a49d": {
"value": "<!DOCTYPE html><html><head><title></title>
<style type=\"text/css\">div{font-size:16px}</style></head>
<body><div>I have the most <b>brilliant</b> plan. Let me
tell you all about it. What we do is, we</div></body>
</html>",
"isTruncated": false
}
}
}
},
"destroy": [ "Mf40b5f831efa7233b9eb1c7f" ]
}, "0" ]]
<span class="grey">Jenkins & Newman Standards Track [Page 66]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-67" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
The server creates the new draft, deletes the old one, and sends the
success response:
[[ "Email/set", {
"accountId": "ue150411c",
"oldState": "780839",
"newState": "780842",
"created": {
"k1546": {
"id": "Md45b47b4877521042cec0938",
"blobId": "Ge8de6c9f6de198239b982ea214e0f3a704e4af74",
"threadId": "Td957e72e89f516dc",
"size": 11721
}
},
"destroyed": [ "Mf40b5f831efa7233b9eb1c7f" ],
...
}, "0" ]]
The client moves this draft to a different account. The only way to
do this is via the "Email/copy" method. It MUST set a new
"mailboxIds" property, since the current value will not be valid
Mailbox ids in the destination account:
[[ "Email/copy", {
"fromAccountId": "ue150411c",
"accountId": "u6c6c41ac",
"create": {
"k45": {
"id": "Md45b47b4877521042cec0938",
"mailboxIds": {
"75a4c956": true
}
}
},
"onSuccessDestroyOriginal": true
}, "0" ]]
<span class="grey">Jenkins & Newman Standards Track [Page 67]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-68" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
The server successfully copies the Email and deletes the original.
Due to the implicit call to "Email/set", there are two responses to
the single method call, both with the same method call id:
[[ "Email/copy", {
"fromAccountId": "ue150411c",
"accountId": "u6c6c41ac",
"oldState": "7ee7e9263a6d",
"newState": "5a0d2447ed26",
"created": {
"k45": {
"id": "M138f9954a5cd2423daeafa55",
"blobId": "G6b9fb047cba722c48c611e79233d057c6b0b74e8",
"threadId": "T2f242ea424a4079a",
"size": 11721
}
},
"notCreated": null
}, "0" ],
[ "Email/set", {
"accountId": "ue150411c",
"oldState": "780842",
"newState": "780871",
"destroyed": [ "Md45b47b4877521042cec0938" ],
...
}, "0" ]]
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Search Snippets</span>
When doing a search on a "String" property, the client may wish to
show the relevant section of the body that matches the search as a
preview and to highlight any matching terms in both this and the
subject of the Email. Search snippets represent this data.
A *SearchSnippet* object has the following properties:
o emailId: "Id"
The Email id the snippet applies to.
<span class="grey">Jenkins & Newman Standards Track [Page 68]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-69" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o subject: "String|null"
If text from the filter matches the subject, this is the subject
of the Email with the following transformations:
1. Any instance of the following three characters MUST be
replaced by an appropriate HTML entity: & (ampersand), <
(less-than sign), and > (greater-than sign) [<a href="#ref-HTML" title=""HTML 5.2"">HTML</a>]. Other
characters MAY also be replaced with an HTML entity form.
2. The matching words/phrases from the filter are wrapped in HTML
"<mark></mark>" tags.
If the subject does not match text from the filter, this property
is null.
o preview: "String|null"
If text from the filter matches the plaintext or HTML body, this
is the relevant section of the body (converted to plaintext if
originally HTML), with the same transformations as the "subject"
property. It MUST NOT be bigger than 255 octets in size. If the
body does not contain a match for the text from the filter, this
property is null.
What is a relevant section of the body for preview is server defined.
If the server is unable to determine search snippets, it MUST return
null for both the "subject" and "preview" properties.
Note that unlike most data types, a SearchSnippet DOES NOT have a
property called "id".
The following JMAP method is supported.
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. SearchSnippet/get</span>
To fetch search snippets, make a call to "SearchSnippet/get". It
takes the following arguments:
o accountId: "Id"
The id of the account to use.
o filter: "FilterOperator|FilterCondition|null"
The same filter as passed to "Email/query"; see the description of
this method in <a href="#section-4.4">Section 4.4</a> for details.
<span class="grey">Jenkins & Newman Standards Track [Page 69]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-70" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o emailIds: "Id[]"
The ids of the Emails to fetch snippets for.
The response has the following arguments:
o accountId: "Id"
The id of the account used for the call.
o list: "SearchSnippet[]"
An array of SearchSnippet objects for the requested Email ids.
This may not be in the same order as the ids that were in the
request.
o notFound: "Id[]|null"
An array of Email ids requested that could not be found, or null
if all ids were found.
As the search snippets are derived from the message content and the
algorithm for doing so could change over time, fetching the same
snippets a second time MAY return a different result. However, the
previous value is not considered incorrect, so there is no state
string or update mechanism needed.
The following additional errors may be returned instead of the
"SearchSnippet/get" response:
"requestTooLarge": The number of "emailIds" requested by the client
exceeds the maximum number the server is willing to process in a
single method call.
"unsupportedFilter": The server is unable to process the given
"filter" for any reason.
<span class="grey">Jenkins & Newman Standards Track [Page 70]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-71" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>. Example</span>
Here, we did an "Email/query" to search for any Email in the account
containing the word "foo"; now, we are fetching the search snippets
for some of the ids that were returned in the results:
[[ "SearchSnippet/get", {
"accountId": "ue150411c",
"filter": {
"text": "foo"
},
"emailIds": [
"M44200ec123de277c0c1ce69c",
"M7bcbcb0b58d7729686e83d99",
"M28d12783a0969584b6deaac0",
...
]
}, "0" ]]
Example response:
[[ "SearchSnippet/get", {
"accountId": "ue150411c",
"list": [{
"emailId": "M44200ec123de277c0c1ce69c",
"subject": null,
"preview": null
}, {
"emailId": "M7bcbcb0b58d7729686e83d99",
"subject": "The <mark>Foo</mark>sball competition",
"preview": "...year the <mark>foo</mark>sball competition will
be held in the Stadium de ..."
}, {
"emailId": "M28d12783a0969584b6deaac0",
"subject": null,
"preview": "...the <mark>Foo</mark>/bar method results often
returns &lt;1 widget rather than the complete..."
},
...
],
"notFound": null
}, "0" ]]
<span class="grey">Jenkins & Newman Standards Track [Page 71]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-72" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Identities</span>
An *Identity* object stores information about an email address or
domain the user may send from. It has the following properties:
o id: "Id" (immutable; server-set)
The id of the Identity.
o name: "String" (default: "")
The "From" name the client SHOULD use when creating a new Email
from this Identity.
o email: "String" (immutable)
The "From" email address the client MUST use when creating a new
Email from this Identity. If the "mailbox" part of the address
(the section before the "@") is the single character "*" (e.g.,
"*@example.com"), the client may use any valid address ending in
that domain (e.g., "foo@example.com").
o replyTo: "EmailAddress[]|null" (default: null)
The Reply-To value the client SHOULD set when creating a new Email
from this Identity.
o bcc: "EmailAddress[]|null" (default: null)
The Bcc value the client SHOULD set when creating a new Email from
this Identity.
o textSignature: "String" (default: "")
A signature the client SHOULD insert into new plaintext messages
that will be sent from this Identity. Clients MAY ignore this
and/or combine this with a client-specific signature preference.
o htmlSignature: "String" (default: "")
A signature the client SHOULD insert into new HTML messages that
will be sent from this Identity. This text MUST be an HTML
snippet to be inserted into the "<body></body>" section of the
HTML. Clients MAY ignore this and/or combine this with a client-
specific signature preference.
<span class="grey">Jenkins & Newman Standards Track [Page 72]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-73" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o mayDelete: "Boolean" (server-set)
Is the user allowed to delete this Identity? Servers may wish to
set this to false for the user's username or other default
address. Attempts to destroy an Identity with "mayDelete: false"
will be rejected with a standard "forbidden" SetError.
See the "Addresses" header form description in the Email object
(<a href="#section-4.1.2.3">Section 4.1.2.3</a>) for the definition of EmailAddress.
Multiple identities with the same email address MAY exist, to allow
for different settings the user wants to pick between (for example,
with different names/signatures).
The following JMAP methods are supported.
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. Identity/get</span>
This is a standard "/get" method as described in <a href="./rfc8620#section-5.1">[RFC8620],
Section 5.1</a>. The "ids" argument may be null to fetch all at once.
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. Identity/changes</span>
This is a standard "/changes" method as described in <a href="./rfc8620#section-5.2">[RFC8620],
Section 5.2</a>.
<span class="h3"><a class="selflink" id="section-6.3" href="#section-6.3">6.3</a>. Identity/set</span>
This is a standard "/set" method as described in <a href="./rfc8620#section-5.3">[RFC8620],
Section 5.3</a>. The following extra SetError types are defined:
For "create":
o "forbiddenFrom": The user is not allowed to send from the address
given as the "email" property of the Identity.
<span class="h3"><a class="selflink" id="section-6.4" href="#section-6.4">6.4</a>. Example</span>
Request:
[ "Identity/get", {
"accountId": "acme"
}, "0" ]
<span class="grey">Jenkins & Newman Standards Track [Page 73]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-74" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
with response:
[ "Identity/get", {
"accountId": "acme",
"state": "99401312ae-11-333",
"list": [
{
"id": "XD-3301-222-11_22AAz",
"name": "Joe Bloggs",
"email": "joe@example.com",
"replyTo": null,
"bcc": [{
"name": null,
"email": "joe+archive@example.com"
}],
"textSignature": "-- \nJoe Bloggs\nMaster of Email",
"htmlSignature": "<div><b>Joe Bloggs</b></div>
<div>Master of Email</div>",
"mayDelete": false
},
{
"id": "XD-9911312-11_22AAz",
"name": "Joe B",
"email": "*@example.com",
"replyTo": null,
"bcc": null,
"textSignature": "",
"htmlSignature": "",
"mayDelete": true
}
],
"notFound": []
}, "0" ]
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Email Submission</span>
An *EmailSubmission* object represents the submission of an Email for
delivery to one or more recipients. It has the following properties:
o id: "Id" (immutable; server-set)
The id of the EmailSubmission.
o identityId: "Id" (immutable)
The id of the Identity to associate with this submission.
<span class="grey">Jenkins & Newman Standards Track [Page 74]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-75" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o emailId: "Id" (immutable)
The id of the Email to send. The Email being sent does not have
to be a draft, for example, when "redirecting" an existing Email
to a different address.
o threadId: "Id" (immutable; server-set)
The Thread id of the Email to send. This is set by the server to
the "threadId" property of the Email referenced by the "emailId".
o envelope: "Envelope|null" (immutable)
Information for use when sending via SMTP. An *Envelope* object
has the following properties:
* mailFrom: "Address"
The email address to use as the return address in the SMTP
submission, plus any parameters to pass with the MAIL FROM
address. The JMAP server MAY allow the address to be the empty
string.
When a JMAP server performs an SMTP message submission, it MAY
use the same id string for the ENVID parameter [<a href="./rfc3461" title=""Simple Mail Transfer Protocol (SMTP) Service Extension for Delivery Status Notifications (DSNs)"">RFC3461</a>] and
the EmailSubmission object id. Servers that do this MAY
replace a client-provided value for ENVID with a server-
provided value.
* rcptTo: "Address[]"
The email addresses to send the message to, and any RCPT TO
parameters to pass with the recipient.
An *Address* object has the following properties:
* email: "String"
The email address being represented by the object. This is a
"Mailbox" as used in the Reverse-path or Forward-path of the
MAIL FROM or RCPT TO command in [<a href="./rfc5321" title=""Simple Mail Transfer Protocol"">RFC5321</a>].
* parameters: "Object|null"
Any parameters to send with the email address (either mail-
parameter or rcpt-parameter as appropriate, as specified in
[<a href="./rfc5321" title=""Simple Mail Transfer Protocol"">RFC5321</a>]). If supplied, each key in the object is a parameter
name, and the value is either the parameter value (type
<span class="grey">Jenkins & Newman Standards Track [Page 75]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-76" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
"String") or null if the parameter does not take a value. For
both name and value, any xtext or unitext encodings are removed
(see [<a href="./rfc3461" title=""Simple Mail Transfer Protocol (SMTP) Service Extension for Delivery Status Notifications (DSNs)"">RFC3461</a>] and [<a href="./rfc6533" title=""Internationalized Delivery Status and Disposition Notifications"">RFC6533</a>]) and JSON string encoding is
applied.
If the "envelope" property is null or omitted on creation, the
server MUST generate this from the referenced Email as follows:
* "mailFrom": The email address in the Sender header field, if
present; otherwise, it's the email address in the From header
field, if present. In either case, no parameters are added.
If multiple addresses are present in one of these header
fields, or there is more than one Sender/From header field, the
server SHOULD reject the EmailSubmission as invalid; otherwise,
it MUST take the first address in the last Sender/From header
field.
If the address found from this is not allowed by the Identity
associated with this submission, the "email" property from the
Identity MUST be used instead.
* "rcptTo": The deduplicated set of email addresses from the To,
Cc, and Bcc header fields, if present, with no parameters for
any of them.
o sendAt: "UTCDate" (immutable; server-set)
The date the submission was/will be released for delivery. If the
client successfully used FUTURERELEASE [<a href="./rfc4865" title=""SMTP Submission Service Extension for Future Message Release"">RFC4865</a>] with the
submission, this MUST be the time when the server will release the
message; otherwise, it MUST be the time the EmailSubmission was
created.
o undoStatus: "String"
This represents whether the submission may be canceled. This is
server set on create and MUST be one of the following values:
* "pending": It may be possible to cancel this submission.
* "final": The message has been relayed to at least one recipient
in a manner that cannot be recalled. It is no longer possible
to cancel this submission.
* "canceled": The submission was canceled and will not be
delivered to any recipient.
<span class="grey">Jenkins & Newman Standards Track [Page 76]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-77" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
On systems that do not support unsending, the value of this
property will always be "final". On systems that do support
canceling submission, it will start as "pending" and MAY
transition to "final" when the server knows it definitely cannot
recall the message, but it MAY just remain "pending". If in
pending state, a client can attempt to cancel the submission by
setting this property to "canceled"; if the update succeeds, the
submission was successfully canceled, and the message has not been
delivered to any of the original recipients.
o deliveryStatus: "String[DeliveryStatus]|null" (server-set)
This represents the delivery status for each of the submission's
recipients, if known. This property MAY not be supported by all
servers, in which case it will remain null. Servers that support
it SHOULD update the EmailSubmission object each time the status
of any of the recipients changes, even if some recipients are
still being retried.
This value is a map from the email address of each recipient to a
DeliveryStatus object.
A *DeliveryStatus* object has the following properties:
* smtpReply: "String"
The SMTP reply string returned for this recipient when the
server last tried to relay the message, or in a later Delivery
Status Notification (DSN, as defined in [<a href="./rfc3464" title=""An Extensible Message Format for Delivery Status Notifications"">RFC3464</a>]) response for
the message. This SHOULD be the response to the RCPT TO stage,
unless this was accepted and the message as a whole was
rejected at the end of the DATA stage, in which case the DATA
stage reply SHOULD be used instead.
Multi-line SMTP responses should be concatenated to a single
string as follows:
+ The hyphen following the SMTP code on all but the last line
is replaced with a space.
+ Any prefix in common with the first line is stripped from
lines after the first.
+ CRLF is replaced by a space.
<span class="grey">Jenkins & Newman Standards Track [Page 77]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-78" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
For example:
550-5.7.1 Our system has detected that this message is
550 5.7.1 likely spam.
would become:
550 5.7.1 Our system has detected that this message is likely spam.
For messages relayed via an alternative to SMTP, the server MAY
generate a synthetic string representing the status instead.
If it does this, the string MUST be of the following form:
+ A 3-digit SMTP reply code, as defined in <a href="./rfc5321#section-4.2.3">[RFC5321],
Section 4.2.3</a>.
+ Then a single space character.
+ Then an SMTP Enhanced Mail System Status Code as defined in
[<a href="./rfc3463" title=""Enhanced Mail System Status Codes"">RFC3463</a>], with a registry defined in [<a href="./rfc5248" title=""A Registry for SMTP Enhanced Mail System Status Codes"">RFC5248</a>].
+ Then a single space character.
+ Then an implementation-specific information string with a
human-readable explanation of the response.
* delivered: "String"
Represents whether the message has been successfully delivered
to the recipient. This MUST be one of the following values:
+ "queued": The message is in a local mail queue and the
status will change once it exits the local mail queues. The
"smtpReply" property may still change.
+ "yes": The message was successfully delivered to the mail
store of the recipient. The "smtpReply" property is final.
+ "no": Delivery to the recipient permanently failed. The
"smtpReply" property is final.
+ "unknown": The final delivery status is unknown, (e.g., it
was relayed to an external machine and no further
information is available). The "smtpReply" property may
still change if a DSN arrives.
<span class="grey">Jenkins & Newman Standards Track [Page 78]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-79" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
Note that successful relaying to an external SMTP server SHOULD
NOT be taken as an indication that the message has successfully
reached the final mail store. In this case though, the server
may receive a DSN response, if requested.
If a DSN is received for the recipient with Action equal to
"delivered", as per <a href="./rfc3464#section-2.3.3">[RFC3464], Section 2.3.3</a>, then the
"delivered" property SHOULD be set to "yes"; if the Action
equals "failed", the property SHOULD be set to "no". Receipt
of any other DSN SHOULD NOT affect this property.
The server MAY also set this property based on other feedback
channels.
* displayed: "String"
Represents whether the message has been displayed to the
recipient. This MUST be one of the following values:
+ "unknown": The display status is unknown. This is the
initial value.
+ "yes": The recipient's system claims the message content has
been displayed to the recipient. Note that there is no
guarantee that the recipient has noticed, read, or
understood the content.
If a Message Disposition Notification (MDN) is received for
this recipient with Disposition-Type (as per <a href="./rfc8098#section-3.2.6.2">[RFC8098],
Section 3.2.6.2</a>) equal to "displayed", this property SHOULD be
set to "yes".
The server MAY also set this property based on other feedback
channels.
o dsnBlobIds: "Id[]" (server-set)
A list of blob ids for DSNs [<a href="./rfc3464" title=""An Extensible Message Format for Delivery Status Notifications"">RFC3464</a>] received for this
submission, in order of receipt, oldest first. The blob is the
whole MIME message (with a top-level content-type of "multipart/
report"), as received.
o mdnBlobIds: "Id[]" (server-set)
A list of blob ids for MDNs [<a href="./rfc8098" title=""Message Disposition Notification"">RFC8098</a>] received for this
submission, in order of receipt, oldest first. The blob is the
whole MIME message (with a top-level content-type of "multipart/
report"), as received.
<span class="grey">Jenkins & Newman Standards Track [Page 79]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-80" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
JMAP servers MAY choose not to expose DSN and MDN responses as Email
objects if they correlate to an EmailSubmission object. It SHOULD
only do this if it exposes them in the "dsnBlobIds" and "mdnblobIds"
fields instead, and it expects the user to be using clients capable
of fetching and displaying delivery status via the EmailSubmission
object.
For efficiency, a server MAY destroy EmailSubmission objects at any
time after the message is successfully sent or after it has finished
retrying to send the message. For very basic SMTP proxies, this MAY
be immediately after creation, as it has no way to assign a real id
and return the information again if fetched later.
The following JMAP methods are supported.
<span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a>. EmailSubmission/get</span>
This is a standard "/get" method as described in <a href="./rfc8620#section-5.1">[RFC8620],
Section 5.1</a>.
<span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a>. EmailSubmission/changes</span>
This is a standard "/changes" method as described in <a href="./rfc8620#section-5.2">[RFC8620],
Section 5.2</a>.
<span class="h3"><a class="selflink" id="section-7.3" href="#section-7.3">7.3</a>. EmailSubmission/query</span>
This is a standard "/query" method as described in <a href="./rfc8620#section-5.5">[RFC8620],
Section 5.5</a>.
A *FilterCondition* object has the following properties, any of which
may be omitted:
o identityIds: "Id[]"
The EmailSubmission "identityId" property must be in this list to
match the condition.
o emailIds: "Id[]"
The EmailSubmission "emailId" property must be in this list to
match the condition.
o threadIds: "Id[]"
The EmailSubmission "threadId" property must be in this list to
match the condition.
<span class="grey">Jenkins & Newman Standards Track [Page 80]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-81" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o undoStatus: "String"
The EmailSubmission "undoStatus" property must be identical to the
value given to match the condition.
o before: "UTCDate"
The "sendAt" property of the EmailSubmission object must be before
this date-time to match the condition.
o after: "UTCDate"
The "sendAt" property of the EmailSubmission object must be the
same as or after this date-time to match the condition.
An EmailSubmission object matches the FilterCondition if and only if
all of the given conditions match. If zero properties are specified,
it is automatically true for all objects.
The following EmailSubmission properties MUST be supported for
sorting:
o "emailId"
o "threadId"
o "sentAt"
<span class="h3"><a class="selflink" id="section-7.4" href="#section-7.4">7.4</a>. EmailSubmission/queryChanges</span>
This is a standard "/queryChanges" method as described in <a href="./rfc8620#section-5.6">[RFC8620],
Section 5.6</a>.
<span class="h3"><a class="selflink" id="section-7.5" href="#section-7.5">7.5</a>. EmailSubmission/set</span>
This is a standard "/set" method as described in <a href="./rfc8620#section-5.3">[RFC8620],
Section 5.3</a> with the following two additional request arguments:
o onSuccessUpdateEmail: "Id[PatchObject]|null"
A map of EmailSubmission id to an object containing properties to
update on the Email object referenced by the EmailSubmission if
the create/update/destroy succeeds. (For references to
EmailSubmissions created in the same "/set" invocation, this is
equivalent to a creation-reference, so the id will be the creation
id prefixed with a "#".)
<span class="grey">Jenkins & Newman Standards Track [Page 81]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-82" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o onSuccessDestroyEmail: "Id[]|null"
A list of EmailSubmission ids for which the Email with the
corresponding "emailId" should be destroyed if the create/update/
destroy succeeds. (For references to EmailSubmission creations,
this is equivalent to a creation-reference, so the id will be the
creation id prefixed with a "#".)
After all create/update/destroy items in the "EmailSubmission/set"
invocation have been processed, a single implicit "Email/set" call
MUST be made to perform any changes requested in these two arguments.
The response to this MUST be returned after the "EmailSubmission/set"
response.
An Email is sent by creating an EmailSubmission object. When
processing each create, the server must check that the message is
valid, and the user has sufficient authorisation to send it. If the
creation succeeds, the message will be sent to the recipients given
in the envelope "rcptTo" parameter. The server MUST remove any Bcc
header field present on the message during delivery. The server MAY
add or remove other header fields from the submitted message or make
further alterations in accordance with the server's policy during
delivery.
If the referenced Email is destroyed at any point after the
EmailSubmission object is created, this MUST NOT change the behaviour
of the submission (i.e., it does not cancel a future send). The
"emailId" and "threadId" properties of the EmailSubmission object
remain, but trying to fetch them (with a standard "Email/get" call)
will return a "notFound" error if the corresponding objects have been
destroyed.
Similarly, destroying an EmailSubmission object MUST NOT affect the
deliveries it represents. It purely removes the record of the
submission. The server MAY automatically destroy EmailSubmission
objects after some time or in response to other triggers, and MAY
forbid the client from manually destroying EmailSubmission objects.
If the message to be sent is larger than the server supports sending,
a standard "tooLarge" SetError MUST be returned. A "maxSize"
"UnsignedInt" property MUST be present on the SetError specifying the
maximum size of a message that may be sent, in octets.
If the Email or Identity id given cannot be found, the submission
creation is rejected with a standard "invalidProperties" SetError.
<span class="grey">Jenkins & Newman Standards Track [Page 82]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-83" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
The following extra SetError types are defined:
For "create":
o "invalidEmail" - The Email to be sent is invalid in some way. The
SetError SHOULD contain a property called "properties" of type
"String[]" that lists *all* the properties of the Email that were
invalid.
o "tooManyRecipients" - The envelope (supplied or generated) has
more recipients than the server allows. A "maxRecipients"
"UnsignedInt" property MUST also be present on the SetError
specifying the maximum number of allowed recipients.
o "noRecipients" - The envelope (supplied or generated) does not
have any rcptTo email addresses.
o "invalidRecipients" - The "rcptTo" property of the envelope
(supplied or generated) contains at least one rcptTo value, which
is not a valid email address for sending to. An
"invalidRecipients" "String[]" property MUST also be present on
the SetError, which is a list of the invalid addresses.
o "forbiddenMailFrom" - The server does not permit the user to send
a message with the envelope From address [<a href="./rfc5321" title=""Simple Mail Transfer Protocol"">RFC5321</a>].
o "forbiddenFrom" - The server does not permit the user to send a
message with the From header field [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>] of the message to be
sent.
o "forbiddenToSend" - The user does not have permission to send at
all right now for some reason. A "description" "String" property
MAY be present on the SetError object to display to the user why
they are not permitted.
For "update":
o "cannotUnsend" - The client attempted to update the "undoStatus"
of a valid EmailSubmission object from "pending" to "canceled",
but the message cannot be unsent.
<span class="grey">Jenkins & Newman Standards Track [Page 83]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-84" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h4"><a class="selflink" id="section-7.5.1" href="#section-7.5.1">7.5.1</a>. Example</span>
The following example presumes a draft of the Email to be sent has
already been saved, and its Email id is "M7f6ed5bcfd7e2604d1753f6c".
This call then sends the Email immediately, and if successful,
removes the "$draft" flag and moves it from the drafts folder (which
has Mailbox id "7cb4e8ee-df87-4757-b9c4-2ea1ca41b38e") to the sent
folder (which we presume has Mailbox id "73dbcb4b-bffc-48bd-8c2a-
a2e91ca672f6").
[[ "EmailSubmission/set", {
"accountId": "ue411d190",
"create": {
"k1490": {
"identityId": "I64588216",
"emailId": "M7f6ed5bcfd7e2604d1753f6c",
"envelope": {
"mailFrom": {
"email": "john@example.com",
"parameters": null
},
"rcptTo": [{
"email": "jane@example.com",
"parameters": null
},
...
]
}
}
},
"onSuccessUpdateEmail": {
"#k1490": {
"mailboxIds/7cb4e8ee-df87-4757-b9c4-2ea1ca41b38e": null,
"mailboxIds/73dbcb4b-bffc-48bd-8c2a-a2e91ca672f6": true,
"keywords/$draft": null
}
}
}, "0" ]]
<span class="grey">Jenkins & Newman Standards Track [Page 84]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-85" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
A successful response might look like this. Note that there are two
responses due to the implicit "Email/set" call, but both have the
same method call id as they are due to the same call in the request:
[[ "EmailSubmission/set", {
"accountId": "ue411d190",
"oldState": "012421s6-8nrq-4ps4-n0p4-9330r951ns21",
"newState": "355421f6-8aed-4cf4-a0c4-7377e951af36",
"created": {
"k1490": {
"id": "ES-3bab7f9a-623e-4acf-99a5-2e67facb02a0"
}
}
}, "0" ],
[ "Email/set", {
"accountId": "ue411d190",
"oldState": "778193",
"newState": "778197",
"updated": {
"M7f6ed5bcfd7e2604d1753f6c": null
}
}, "0" ]]
Suppose instead an admin has removed sending rights for the user, so
the submission is rejected with a "forbiddenToSend" error. The
description argument of the error is intended for display to the
user, so it should be localised appropriately. Let's suppose the
request was sent with an Accept-Language header like this:
Accept-Language: de;q=0.9,en;q=0.8
<span class="grey">Jenkins & Newman Standards Track [Page 85]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-86" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
The server should attempt to choose the best localisation from those
it has available based on the Accept-Language header, as described in
<a href="./rfc8620#section-3.8">[RFC8620], Section 3.8</a>. If the server has English, French, and
German translations, it would choose German as the preferred language
and return a response like this:
[[ "EmailSubmission/set", {
"accountId": "ue411d190",
"oldState": "012421s6-8nrq-4ps4-n0p4-9330r951ns21",
"newState": "012421s6-8nrq-4ps4-n0p4-9330r951ns21",
"notCreated": {
"k1490": {
"type": "forbiddenToSend",
"description": "Verzeihung, wegen verdaechtiger Aktivitaeten Ihres
Benutzerkontos haben wir den Versand von Nachrichten gesperrt.
Bitte wenden Sie sich fuer Hilfe an unser Support Team."
}
}
}, "0" ]]
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Vacation Response</span>
A vacation response sends an automatic reply when a message is
delivered to the mail store, informing the original sender that their
message may not be read for some time.
Automated message sending can produce undesirable behaviour. To
avoid this, implementors MUST follow the recommendations set forth in
[<a href="./rfc3834" title=""Recommendations for Automatic Responses to Electronic Mail"">RFC3834</a>].
The *VacationResponse* object represents the state of vacation-
response-related settings for an account. It has the following
properties:
o id: "Id" (immutable; server-set)
The id of the object. There is only ever one VacationResponse
object, and its id is "singleton".
o isEnabled: "Boolean"
Should a vacation response be sent if a message arrives between
the "fromDate" and "toDate"?
<span class="grey">Jenkins & Newman Standards Track [Page 86]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-87" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o fromDate: "UTCDate|null"
If "isEnabled" is true, messages that arrive on or after this
date-time (but before the "toDate" if defined) should receive the
user's vacation response. If null, the vacation response is
effective immediately.
o toDate: "UTCDate|null"
If "isEnabled" is true, messages that arrive before this date-time
(but on or after the "fromDate" if defined) should receive the
user's vacation response. If null, the vacation response is
effective indefinitely.
o subject: "String|null"
The subject that will be used by the message sent in response to
messages when the vacation response is enabled. If null, an
appropriate subject SHOULD be set by the server.
o textBody: "String|null"
The plaintext body to send in response to messages when the
vacation response is enabled. If this is null, the server SHOULD
generate a plaintext body part from the "htmlBody" when sending
vacation responses but MAY choose to send the response as HTML
only. If both "textBody" and "htmlBody" are null, an appropriate
default body SHOULD be generated for responses by the server.
o htmlBody: "String|null"
The HTML body to send in response to messages when the vacation
response is enabled. If this is null, the server MAY choose to
generate an HTML body part from the "textBody" when sending
vacation responses or MAY choose to send the response as plaintext
only.
The following JMAP methods are supported.
<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a>. VacationResponse/get</span>
This is a standard "/get" method as described in <a href="./rfc8620#section-5.1">[RFC8620],
Section 5.1</a>.
There MUST only be exactly one VacationResponse object in an account.
It MUST have the id "singleton".
<span class="grey">Jenkins & Newman Standards Track [Page 87]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-88" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a>. VacationResponse/set</span>
This is a standard "/set" method as described in <a href="./rfc8620#section-5.3">[RFC8620],
Section 5.3</a>.
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Security Considerations</span>
All security considerations of JMAP [<a href="./rfc8620" title=""The JSON Meta Application Protocol"">RFC8620</a>] apply to this
specification. Additional considerations specific to the data types
and functionality introduced by this document are described in the
following subsections.
<span class="h3"><a class="selflink" id="section-9.1" href="#section-9.1">9.1</a>. EmailBodyPart Value</span>
Service providers typically perform security filtering on incoming
messages, and it's important that the detection of content-type and
charset for the security filter aligns with the heuristics performed
by JMAP servers. Servers that apply heuristics to determine the
content-type or charset for an EmailBodyValue SHOULD document the
heuristics and provide a mechanism to turn them off in the event they
are misaligned with the security filter used at a particular mail
host.
Automatic conversion of charsets that allow hidden channels for ASCII
text, such as UTF-7, have been problematic for security filters in
the past, so server implementations can mitigate this risk by having
such conversions off-by-default and/or separately configurable.
To allow the client to restrict the volume of data it can receive in
response to a request, a maximum length may be requested for the data
returned for a textual body part. However, truncating the data may
change the semantic meaning, for example, truncating a URL changes
its location. Servers that scan for links to malicious sites should
take care to either ensure truncation is not at a semantically
significant point or rescan the truncated value for malicious content
before returning it.
<span class="h3"><a class="selflink" id="section-9.2" href="#section-9.2">9.2</a>. HTML Email Display</span>
HTML message bodies provide richer formatting for messages but
present a number of security challenges, especially when embedded in
a webmail context in combination with interface HTML. Clients that
render HTML messages should carefully consider the potential risks,
including:
<span class="grey">Jenkins & Newman Standards Track [Page 88]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-89" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
o Embedded JavaScript can rewrite the message to change its content
on subsequent opening, allowing users to be mislead. In webmail
systems, if run in the same origin as the interface, it can access
and exfiltrate all private data accessible to the user, including
all other messages and potentially contacts, calendar events,
settings, and credentials. It can also rewrite the interface to
undetectably phish passwords. A compromise is likely to be
persistent, not just for the duration of page load, due to
exfiltration of session credentials or installation of a service
worker that can intercept all subsequent network requests
(however, this would only be possible if blob downloads are also
available on the same origin, and the service worker script is
attached to the message).
o HTML documents may load content directly from the Internet rather
than just referencing attached resources. For example, you may
have an "<img>" tag with an external "src" attribute. This may
leak to the sender when a message is opened, as well as the IP
address of the recipient. Cookies may also be sent and set by the
server, allowing tracking between different messages and even
website visits and advertising profiles.
o In webmail systems, CSS can break the layout or create phishing
vulnerabilities. For example, the use of "position:fixed" can
allow a message to draw content outside of its normal bounds,
potentially clickjacking a real interface element.
o If in a webmail context and not inside a separate frame, any
styles defined in CSS rules will apply to interface elements as
well if the selector matches, allowing the interface to be
modified. Similarly, any interface styles that match elements in
the message will alter their appearance, potentially breaking the
layout of the message.
o The link text in HTML has no necessary correlation with the actual
target of the link, which can be used to make phishing attacks
more convincing.
o Links opened from a message or embedded external content may leak
private info in the Referer header sent by default in most
systems.
o Forms can be used to mimic login boxes, providing a potent
phishing vector if allowed to submit directly from the message
display.
<span class="grey">Jenkins & Newman Standards Track [Page 89]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-90" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
There are a number of ways clients can mitigate these issues, and a
defence-in-depth approach that uses a combination of techniques will
provide the strongest security.
o HTML can be filtered before rendering, stripping potentially
malicious content. Sanitising HTML correctly is tricky, and
implementors are strongly recommended to use a well-tested library
with a carefully vetted whitelist-only approach. New features
with unexpected security characteristics may be added to HTML
rendering engines in the future; a blacklist approach is likely to
result in security issues.
Subtle differences in parsing of HTML can introduce security
flaws: to filter with 100% accuracy, you need to use the same
parser that the HTML rendering engine will use.
o Encapsulating the message in an "<iframe sandbox>", as defined in
[<a href="#ref-HTML" title=""HTML 5.2"">HTML</a>], Section 4.7.6, can help mitigate a number of risks. This
will:
* Disable JavaScript.
* Disable form submission.
* Prevent drawing outside of its bounds or conflicts between
message CSS and interface CSS.
* Establish a unique anonymous origin, separate to the containing
origin.
o A strong Content Security Policy (see <<a href="https://www.w3.org/TR/CSP3/">https://www.w3.org/TR/</a>
<a href="https://www.w3.org/TR/CSP3/">CSP3/</a>>) can, among other things, block JavaScript and the loading
of external content should it manage to evade the filter.
o The leakage of information in the Referer header can be mitigated
with the use of a referrer policy (see <<a href="https://www.w3.org/TR/referrer-policy/">https://www.w3.org/TR/</a>
<a href="https://www.w3.org/TR/referrer-policy/">referrer-policy/</a>>).
o A "crossorigin=anonymous" attribute on tags that load remote
content can prevent cookies from being sent.
o If adding "target=_blank" to open links in new tabs, also add
"rel=noopener" to ensure the page that opens cannot change the URL
in the original tab to redirect the user to a phishing site.
As highly complex software components, HTML rendering engines
increase the attack surface of a client considerably, especially when
being used to process untrusted, potentially malicious content.
<span class="grey">Jenkins & Newman Standards Track [Page 90]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-91" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
Serious bugs have been found in image decoders, JavaScript engines,
and HTML parsers in the past, which could lead to full system
compromise. Clients using an engine should ensure they get the
latest version and continue to incorporate any security patches
released by the vendor.
<span class="h3"><a class="selflink" id="section-9.3" href="#section-9.3">9.3</a>. Multiple Part Display</span>
Messages may consist of multiple parts to be displayed sequentially
as a body. Clients MUST render each part in isolation and MUST NOT
concatenate the raw text values to render. Doing so may change the
overall semantics of the message. If the client or server is
decrypting a Pretty Good Privacy (PGP) or S/MIME encrypted part,
concatenating with other parts may leak the decrypted text to an
attacker, as described in [<a href="#ref-EFAIL" title=""Efail: Breaking S/MIME and OpenPGP Email Encryption using Exfiltration Channels"">EFAIL</a>].
<span class="h3"><a class="selflink" id="section-9.4" href="#section-9.4">9.4</a>. Email Submission</span>
SMTP submission servers [<a href="./rfc6409" title=""Message Submission for Mail"">RFC6409</a>] use a number of mechanisms to
mitigate damage caused by compromised user accounts and end-user
systems including rate limiting, anti-virus/anti-spam milters (mail
filters), and other technologies. The technologies work better when
they have more information about the client connection. If JMAP
email submission is implemented as a proxy to an SMTP submission
server, it is useful to communicate this information from the JMAP
proxy to the submission server. The de facto XCLIENT extension to
SMTP [<a href="#ref-XCLIENT" title=""Postfix XCLIENT Howto"">XCLIENT</a>] can be used to do this, but use of an authenticated
channel is recommended to limit use of that extension to explicitly
authorised proxies.
JMAP servers that proxy to an SMTP submission server SHOULD allow use
of the submissions port [<a href="./rfc8314" title=""Cleartext Considered Obsolete: Use of Transport Layer Security (TLS) for Email Submission and Access"">RFC8314</a>]. Implementation of a mechanism
similar to SMTP XCLIENT is strongly encouraged. While Simple
Authentication and Security Layer (SASL) PLAIN over TLS [<a href="./rfc4616" title=""The PLAIN Simple Authentication and Security Layer (SASL) Mechanism"">RFC4616</a>] is
presently the mandatory-to-implement mechanism for interoperability
with SMTP submission servers [<a href="./rfc4954" title=""SMTP Service Extension for Authentication"">RFC4954</a>], a JMAP submission proxy
SHOULD implement and prefer a stronger mechanism for this use case
such as TLS client certificate authentication with SASL EXTERNAL
(<a href="./rfc4422#appendix-A">[RFC4422], Appendix A</a>) or Salted Challenge Response Authentication
Mechanism (SCRAM) [<a href="./rfc7677" title=""SCRAM-SHA-256 and SCRAM-SHA-256-PLUS Simple Authentication and Security Layer (SASL) Mechanisms"">RFC7677</a>].
In the event the JMAP server directly relays mail to SMTP servers in
other administrative domains, implementation of the de facto [<a href="#ref-milter" title=""Postfix before-queue Milter support"">milter</a>]
protocol is strongly encouraged to integrate with third-party
products that address security issues including anti-virus/anti-spam,
reputation protection, compliance archiving, and data loss
prevention. Proxying to a local SMTP submission server may be a
simpler way to provide such security services.
<span class="grey">Jenkins & Newman Standards Track [Page 91]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-92" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h3"><a class="selflink" id="section-9.5" href="#section-9.5">9.5</a>. Partial Account Access</span>
A user may only have permission to access a subset of the data that
exists in an account. To avoid leaking unauthorised information, in
such a situation, the server MUST treat any data the user does not
have permission to access the same as if it did not exist.
For example, suppose user A has an account with two Mailboxes, inbox
and sent, but only shares the inbox with user B. In this case, when
user B fetches Mailboxes for this account, the server MUST behave as
though the sent Mailbox did not exist. Similarly, when querying or
fetching Email objects, it MUST treat any messages that just belong
to the sent Mailbox as though they did not exist. Fetching Thread
objects MUST only return ids for Email objects the user has
permission to access; if none, the Thread again MUST be treated the
same as if it did not exist.
If the server forbids a single account from having two identical
messages, or two messages with the same Message-Id header field, a
user with write access can use the error returned by trying to
create/import such a message to detect whether it already exists in
an inaccessible portion of the account.
<span class="h3"><a class="selflink" id="section-9.6" href="#section-9.6">9.6</a>. Permission to Send from an Address</span>
In recent years, the email ecosystem has moved towards associating
trust with the From address in the message [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>], particularly
with schemes such as Domain-based Message Authentication, Reporting,
and Conformance (DMARC) [<a href="./rfc7489" title=""Domain-based Message Authentication, Reporting, and Conformance (DMARC)"">RFC7489</a>].
The set of Identity objects (see <a href="#section-6">Section 6</a>) in an account lets the
client know which email addresses the user has permission to send
from. Each email submission is associated with an Identity, and
servers SHOULD reject submissions where the From header field of the
message does not correspond to the associated Identity.
The server MAY allow an exception to send an exact copy of an
existing message received into the mail store to another address
(otherwise known as "redirecting" or "bouncing"), although it is
RECOMMENDED the server limit this to destinations the user has
verified they also control.
If the user attempts to create a new Identity object, the server MUST
reject it with the appropriate error if the user does not have
permission to use that email address to send from.
<span class="grey">Jenkins & Newman Standards Track [Page 92]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-93" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
The SMTP MAIL FROM address [<a href="./rfc5321" title=""Simple Mail Transfer Protocol"">RFC5321</a>] is often confused with the From
message header field [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>]. The user generally only ever sees
the address in the message header field, and this is the primary one
to enforce. However, the server MUST also enforce appropriate
restrictions on the MAIL FROM address [<a href="./rfc5321" title=""Simple Mail Transfer Protocol"">RFC5321</a>] to stop the user from
flooding a third-party address with bounces and non-delivery notices.
The JMAP submission model provides separate errors for impermissible
addresses in either context.
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. IANA Considerations</span>
<span class="h3"><a class="selflink" id="section-10.1" href="#section-10.1">10.1</a>. JMAP Capability Registration for "mail"</span>
IANA has registered the "mail" JMAP Capability as follows:
Capability Name: urn:ietf:params:jmap:mail
Specification document: this document
Intended use: common
Change Controller: IETF
Security and privacy considerations: this document, <a href="#section-9">Section 9</a>
<span class="h3"><a class="selflink" id="section-10.2" href="#section-10.2">10.2</a>. JMAP Capability Registration for "submission"</span>
IANA has registered the "submission" JMAP Capability as follows:
Capability Name: urn:ietf:params:jmap:submission
Specification document: this document
Intended use: common
Change Controller: IETF
Security and privacy considerations: this document, <a href="#section-9">Section 9</a>
<span class="grey">Jenkins & Newman Standards Track [Page 93]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-94" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h3"><a class="selflink" id="section-10.3" href="#section-10.3">10.3</a>. JMAP Capability Registration for "vacationresponse"</span>
IANA has registered the "vacationresponse" JMAP Capability as
follows:
Capability Name: urn:ietf:params:jmap:vacationresponse
Specification document: this document
Intended use: common
Change Controller: IETF
Security and privacy considerations: this document, <a href="#section-9">Section 9</a>
<span class="h3"><a class="selflink" id="section-10.4" href="#section-10.4">10.4</a>. IMAP and JMAP Keywords Registry</span>
This document makes two changes to the IMAP keywords registry as
defined in [<a href="./rfc5788" title=""IMAP4 Keyword Registry"">RFC5788</a>].
First, the name of the registry is changed to the "IMAP and JMAP
Keywords" registry.
Second, a scope column is added to the template and registry
indicating whether a keyword applies to "IMAP-only", "JMAP-only",
"both", or "reserved". All keywords already in the IMAP keyword
registry have been marked with a scope of "both". The "reserved"
status can be used to prevent future registration of a name that
would be confusing if registered. Registration of keywords with
scope "reserved" omit most fields in the registration template (see
registration of "$recent" below for an example); such registrations
are intended to be infrequent.
IMAP clients MAY silently ignore any keywords marked "JMAP-only" or
"reserved" in the event they appear in protocol. JMAP clients MAY
silently ignore any keywords marked "IMAP-only" or "reserved" in the
event they appear in protocol.
New "JMAP-only" keywords are registered in the following subsections.
These keywords correspond to IMAP system keywords and are thus not
appropriate for use in IMAP. These keywords cannot be subsequently
registered for use in IMAP except via standards action.
<span class="grey">Jenkins & Newman Standards Track [Page 94]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-95" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h4"><a class="selflink" id="section-10.4.1" href="#section-10.4.1">10.4.1</a>. Registration of JMAP Keyword "$draft"</span>
This registers the "JMAP-only" keyword "$draft" in the "IMAP and JMAP
Keywords" registry.
Keyword name: $draft
Scope: JMAP-only
Purpose (description): This is set when the user wants to treat the
message as a draft the user is composing. This is the JMAP
equivalent of the IMAP \Draft flag.
Private or Shared on a server: BOTH
Is it an advisory keyword or may it cause an automatic action:
Automatic. If the account has an IMAP mailbox marked with the
\Drafts special use attribute [<a href="./rfc6154" title=""IMAP LIST Extension for Special-Use Mailboxes"">RFC6154</a>], setting this flag MAY cause
the message to appear in that mailbox automatically. Certain JMAP
computed values such as "unreadEmails" will change as a result of
changing this flag. In addition, mail clients will typically present
draft messages in a composer window rather than a viewer window.
When/by whom the keyword is set/cleared: This is typically set by a
JMAP client when referring to a draft message. One model for draft
Emails would result in clearing this flag in an "EmailSubmission/set"
operation with an "onSuccessUpdateEmail" argument. In a mail store
shared by JMAP and IMAP, this is also set and cleared as necessary so
it matches the IMAP \Draft flag.
Related keywords: None
Related IMAP/JMAP Capabilities: SPECIAL-USE [<a href="./rfc6154" title=""IMAP LIST Extension for Special-Use Mailboxes"">RFC6154</a>]
Security Considerations: A server implementing this keyword as a
shared keyword may disclose that a user considers the message a draft
message. This information would be exposed to other users with read
permission for the Mailbox keywords.
Published specification: this document
Person & email address to contact for further information:
JMAP mailing list <jmap@ietf.org>
Intended usage: COMMON
Owner/Change controller: IESG
<span class="grey">Jenkins & Newman Standards Track [Page 95]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-96" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h4"><a class="selflink" id="section-10.4.2" href="#section-10.4.2">10.4.2</a>. Registration of JMAP Keyword "$seen"</span>
This registers the "JMAP-only" keyword "$seen" in the "IMAP and JMAP
Keywords" registry.
Keyword name: $seen
Scope: JMAP-only
Purpose (description): This is set when the user wants to treat the
message as read. This is the JMAP equivalent of the IMAP \Seen flag.
Private or Shared on a server: BOTH
Is it an advisory keyword or may it cause an automatic action:
Advisory. However, certain JMAP computed values such as
"unreadEmails" will change as a result of changing this flag.
When/by whom the keyword is set/cleared: This is set by a JMAP client
when it presents the message content to the user; clients often offer
an option to clear this flag. In a mail store shared by JMAP and
IMAP, this is also set and cleared as necessary so it matches the
IMAP \Seen flag.
Related keywords: None
Related IMAP/JMAP Capabilities: None
Security Considerations: A server implementing this keyword as a
shared keyword may disclose that a user considers the message to have
been read. This information would be exposed to other users with
read permission for the Mailbox keywords.
Published specification: this document
Person & email address to contact for further information:
JMAP mailing list <jmap@ietf.org>
Intended usage: COMMON
Owner/Change controller: IESG
<span class="grey">Jenkins & Newman Standards Track [Page 96]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-97" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h4"><a class="selflink" id="section-10.4.3" href="#section-10.4.3">10.4.3</a>. Registration of JMAP Keyword "$flagged"</span>
This registers the "JMAP-only" keyword "$flagged" in the "IMAP and
JMAP Keywords" registry.
Keyword name: $flagged
Scope: JMAP-only
Purpose (description): This is set when the user wants to treat the
message as flagged for urgent/special attention. This is the JMAP
equivalent of the IMAP \Flagged flag.
Private or Shared on a server: BOTH
Is it an advisory keyword or may it cause an automatic action:
Automatic. If the account has an IMAP mailbox marked with the
\Flagged special use attribute [<a href="./rfc6154" title=""IMAP LIST Extension for Special-Use Mailboxes"">RFC6154</a>], setting this flag MAY cause
the message to appear in that mailbox automatically.
When/by whom the keyword is set/cleared: JMAP clients typically allow
a user to set/clear this flag as desired. In a mail store shared by
JMAP and IMAP, this is also set and cleared as necessary so it
matches the IMAP \Flagged flag.
Related keywords: None
Related IMAP/JMAP Capabilities: SPECIAL-USE [<a href="./rfc6154" title=""IMAP LIST Extension for Special-Use Mailboxes"">RFC6154</a>]
Security Considerations: A server implementing this keyword as a
shared keyword may disclose that a user considers the message as
flagged for urgent/special attention. This information would be
exposed to other users with read permission for the Mailbox keywords.
Published specification: this document
Person & email address to contact for further information:
JMAP mailing list <jmap@ietf.org>
Intended usage: COMMON
Owner/Change controller: IESG
<span class="grey">Jenkins & Newman Standards Track [Page 97]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-98" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h4"><a class="selflink" id="section-10.4.4" href="#section-10.4.4">10.4.4</a>. Registration of JMAP Keyword "$answered"</span>
This registers the "JMAP-only" keyword "$answered" in the "IMAP and
JMAP Keywords" registry.
Keyword name: $answered
Scope: JMAP-only
Purpose (description): This is set when the message has been
answered.
Private or Shared on a server: BOTH
Is it an advisory keyword or may it cause an automatic action:
Advisory.
When/by whom the keyword is set/cleared: JMAP clients typically set
this when submitting a reply or answer to the message. It may be set
by the "EmailSubmission/set" operation with an "onSuccessUpdateEmail"
argument. In a mail store shared by JMAP and IMAP, this is also set
and cleared as necessary so it matches the IMAP \Answered flag.
Related keywords: None
Related IMAP/JMAP Capabilities: None
Security Considerations: A server implementing this keyword as a
shared keyword may disclose that a user has replied to a message.
This information would be exposed to other users with read permission
for the Mailbox keywords.
Published specification: this document
Person & email address to contact for further information:
JMAP mailing list <jmap@ietf.org>
Intended usage: COMMON
Owner/Change controller: IESG
<span class="grey">Jenkins & Newman Standards Track [Page 98]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-99" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h4"><a class="selflink" id="section-10.4.5" href="#section-10.4.5">10.4.5</a>. Registration of "$recent" Keyword</span>
This registers the keyword "$recent" in the "IMAP and JMAP Keywords"
registry.
Keyword name: $recent
Scope: reserved
Purpose (description): This keyword is not used to avoid confusion
with the IMAP \Recent system flag.
Published specification: this document
Person & email address to contact for further information:
JMAP mailing list <jmap@ietf.org>
Owner/Change controller: IESG
<span class="h3"><a class="selflink" id="section-10.5" href="#section-10.5">10.5</a>. IMAP Mailbox Name Attributes Registry</span>
<span class="h4"><a class="selflink" id="section-10.5.1" href="#section-10.5.1">10.5.1</a>. Registration of "inbox" Role</span>
This registers the "JMAP-only" "inbox" attribute in the "IMAP Mailbox
Name Attributes" registry, as established in [<a href="./rfc8457" title=""IMAP "">RFC8457</a>].
Attribute Name: Inbox
Description: New mail is delivered here by default.
Reference: This document, <a href="#section-10.5.1">Section 10.5.1</a>
Usage Notes: JMAP only
<span class="grey">Jenkins & Newman Standards Track [Page 99]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-100" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h3"><a class="selflink" id="section-10.6" href="#section-10.6">10.6</a>. JMAP Error Codes Registry</span>
The following subsections register several new error codes in the
"JMAP Error Codes" registry, as defined in [<a href="./rfc8620" title=""The JSON Meta Application Protocol"">RFC8620</a>].
<span class="h4"><a class="selflink" id="section-10.6.1" href="#section-10.6.1">10.6.1</a>. mailboxHasChild</span>
JMAP Error Code: mailboxHasChild
Intended use: common
Change controller: IETF
Reference: This document, <a href="#section-2.5">Section 2.5</a>
Description: The Mailbox still has at least one child Mailbox. The
client MUST remove these before it can delete the parent Mailbox.
<span class="h4"><a class="selflink" id="section-10.6.2" href="#section-10.6.2">10.6.2</a>. mailboxHasEmail</span>
JMAP Error Code: mailboxHasEmail
Intended use: common
Change controller: IETF
Reference: This document, <a href="#section-2.5">Section 2.5</a>
Description: The Mailbox has at least one message assigned to it, and
the onDestroyRemoveEmails argument was false.
<span class="h4"><a class="selflink" id="section-10.6.3" href="#section-10.6.3">10.6.3</a>. blobNotFound</span>
JMAP Error Code: blobNotFound
Intended use: common
Change controller: IETF
Reference: This document, <a href="#section-4.6">Section 4.6</a>
Description: At least one blob id referenced in the object doesn't
exist.
<span class="grey">Jenkins & Newman Standards Track [Page 100]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-101" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h4"><a class="selflink" id="section-10.6.4" href="#section-10.6.4">10.6.4</a>. tooManyKeywords</span>
JMAP Error Code: tooManyKeywords
Intended use: common
Change controller: IETF
Reference: This document, <a href="#section-4.6">Section 4.6</a>
Description: The change to the Email's keywords would exceed a
server-defined maximum.
<span class="h4"><a class="selflink" id="section-10.6.5" href="#section-10.6.5">10.6.5</a>. tooManyMailboxes</span>
JMAP Error Code: tooManyMailboxes
Intended use: common
Change controller: IETF
Reference: This document, <a href="#section-4.6">Section 4.6</a>
Description: The change to the set of Mailboxes that this Email is in
would exceed a server-defined maximum.
<span class="h4"><a class="selflink" id="section-10.6.6" href="#section-10.6.6">10.6.6</a>. invalidEmail</span>
JMAP Error Code: invalidEmail
Intended use: common
Change controller: IETF
Reference: This document, <a href="#section-7.5">Section 7.5</a>
Description: The Email to be sent is invalid in some way.
<span class="grey">Jenkins & Newman Standards Track [Page 101]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-102" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h4"><a class="selflink" id="section-10.6.7" href="#section-10.6.7">10.6.7</a>. tooManyRecipients</span>
JMAP Error Code: tooManyRecipients
Intended use: common
Change controller: IETF
Reference: This document, <a href="#section-7.5">Section 7.5</a>
Description: The envelope [<a href="./rfc5321" title=""Simple Mail Transfer Protocol"">RFC5321</a>] (supplied or generated) has more
recipients than the server allows.
<span class="h4"><a class="selflink" id="section-10.6.8" href="#section-10.6.8">10.6.8</a>. noRecipients</span>
JMAP Error Code: noRecipients
Intended use: common
Change controller: IETF
Reference: This document, <a href="#section-7.5">Section 7.5</a>
Description: The envelope [<a href="./rfc5321" title=""Simple Mail Transfer Protocol"">RFC5321</a>] (supplied or generated) does not
have any rcptTo email addresses.
<span class="h4"><a class="selflink" id="section-10.6.9" href="#section-10.6.9">10.6.9</a>. invalidRecipients</span>
JMAP Error Code: invalidRecipients
Intended use: common
Change controller: IETF
Reference: This document, <a href="#section-7.5">Section 7.5</a>
Description: The rcptTo property of the envelope [<a href="./rfc5321" title=""Simple Mail Transfer Protocol"">RFC5321</a>] (supplied
or generated) contains at least one rcptTo value that is not a valid
email address for sending to.
<span class="grey">Jenkins & Newman Standards Track [Page 102]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-103" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h4"><a class="selflink" id="section-10.6.10" href="#section-10.6.10">10.6.10</a>. forbiddenMailFrom</span>
JMAP Error Code: forbiddenMailFrom
Intended use: common
Change controller: IETF
Reference: This document, <a href="#section-7.5">Section 7.5</a>
Description: The server does not permit the user to send a message
with this envelope From address [<a href="./rfc5321" title=""Simple Mail Transfer Protocol"">RFC5321</a>].
<span class="h4"><a class="selflink" id="section-10.6.11" href="#section-10.6.11">10.6.11</a>. forbiddenFrom</span>
JMAP Error Code: forbiddenFrom
Intended use: common
Change controller: IETF
Reference: This document, Sections <a href="#section-6.3">6.3</a> and <a href="#section-7.5">7.5</a>
Description: The server does not permit the user to send a message
with the From header field [<a href="./rfc5322" title=""Internet Message Format"">RFC5322</a>] of the message to be sent.
<span class="h4"><a class="selflink" id="section-10.6.12" href="#section-10.6.12">10.6.12</a>. forbiddenToSend</span>
JMAP Error Code: forbiddenToSend
Intended use: common
Change controller: IETF
Reference: This document, <a href="#section-7.5">Section 7.5</a>
Description: The user does not have permission to send at all right
now.
<span class="grey">Jenkins & Newman Standards Track [Page 103]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-104" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
<span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. References</span>
<span class="h3"><a class="selflink" id="section-11.1" href="#section-11.1">11.1</a>. Normative References</span>
[<a id="ref-HTML">HTML</a>] Faulkner, S., Eicholz, A., Leithead, T., Danilo, A., and
S. Moon, "HTML 5.2", World Wide Web Consortium
Recommendation REC-html52-20171214, December 2017,
<<a href="https://www.w3.org/TR/html52/">https://www.w3.org/TR/html52/</a>>.
[<a id="ref-RFC1870">RFC1870</a>] Klensin, J., Freed, N., and K. Moore, "SMTP Service
Extension for Message Size Declaration", STD 10, <a href="./rfc1870">RFC 1870</a>,
DOI 10.17487/RFC1870, November 1995,
<<a href="https://www.rfc-editor.org/info/rfc1870">https://www.rfc-editor.org/info/rfc1870</a>>.
[<a id="ref-RFC2045">RFC2045</a>] Freed, N. and N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part One: Format of Internet Message
Bodies", <a href="./rfc2045">RFC 2045</a>, DOI 10.17487/RFC2045, November 1996,
<<a href="https://www.rfc-editor.org/info/rfc2045">https://www.rfc-editor.org/info/rfc2045</a>>.
[<a id="ref-RFC2047">RFC2047</a>] Moore, K., "MIME (Multipurpose Internet Mail Extensions)
Part Three: Message Header Extensions for Non-ASCII Text",
<a href="./rfc2047">RFC 2047</a>, DOI 10.17487/RFC2047, November 1996,
<<a href="https://www.rfc-editor.org/info/rfc2047">https://www.rfc-editor.org/info/rfc2047</a>>.
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>,
DOI 10.17487/RFC2119, March 1997,
<<a href="https://www.rfc-editor.org/info/rfc2119">https://www.rfc-editor.org/info/rfc2119</a>>.
[<a id="ref-RFC2231">RFC2231</a>] Freed, N. and K. Moore, "MIME Parameter Value and Encoded
Word Extensions: Character Sets, Languages, and
Continuations", <a href="./rfc2231">RFC 2231</a>, DOI 10.17487/RFC2231, November
1997, <<a href="https://www.rfc-editor.org/info/rfc2231">https://www.rfc-editor.org/info/rfc2231</a>>.
[<a id="ref-RFC2369">RFC2369</a>] Neufeld, G. and J. Baer, "The Use of URLs as Meta-Syntax
for Core Mail List Commands and their Transport through
Message Header Fields", <a href="./rfc2369">RFC 2369</a>, DOI 10.17487/RFC2369,
July 1998, <<a href="https://www.rfc-editor.org/info/rfc2369">https://www.rfc-editor.org/info/rfc2369</a>>.
[<a id="ref-RFC2392">RFC2392</a>] Levinson, E., "Content-ID and Message-ID Uniform Resource
Locators", <a href="./rfc2392">RFC 2392</a>, DOI 10.17487/RFC2392, August 1998,
<<a href="https://www.rfc-editor.org/info/rfc2392">https://www.rfc-editor.org/info/rfc2392</a>>.
[<a id="ref-RFC2557">RFC2557</a>] Palme, J., Hopmann, A., and N. Shelness, "MIME
Encapsulation of Aggregate Documents, such as HTML
(MHTML)", <a href="./rfc2557">RFC 2557</a>, DOI 10.17487/RFC2557, March 1999,
<<a href="https://www.rfc-editor.org/info/rfc2557">https://www.rfc-editor.org/info/rfc2557</a>>.
<span class="grey">Jenkins & Newman Standards Track [Page 104]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-105" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
[<a id="ref-RFC2852">RFC2852</a>] Newman, D., "Deliver By SMTP Service Extension", <a href="./rfc2852">RFC 2852</a>,
DOI 10.17487/RFC2852, June 2000,
<<a href="https://www.rfc-editor.org/info/rfc2852">https://www.rfc-editor.org/info/rfc2852</a>>.
[<a id="ref-RFC3282">RFC3282</a>] Alvestrand, H., "Content Language Headers", <a href="./rfc3282">RFC 3282</a>,
DOI 10.17487/RFC3282, May 2002,
<<a href="https://www.rfc-editor.org/info/rfc3282">https://www.rfc-editor.org/info/rfc3282</a>>.
[<a id="ref-RFC3461">RFC3461</a>] Moore, K., "Simple Mail Transfer Protocol (SMTP) Service
Extension for Delivery Status Notifications (DSNs)",
<a href="./rfc3461">RFC 3461</a>, DOI 10.17487/RFC3461, January 2003,
<<a href="https://www.rfc-editor.org/info/rfc3461">https://www.rfc-editor.org/info/rfc3461</a>>.
[<a id="ref-RFC3463">RFC3463</a>] Vaudreuil, G., "Enhanced Mail System Status Codes",
<a href="./rfc3463">RFC 3463</a>, DOI 10.17487/RFC3463, January 2003,
<<a href="https://www.rfc-editor.org/info/rfc3463">https://www.rfc-editor.org/info/rfc3463</a>>.
[<a id="ref-RFC3464">RFC3464</a>] Moore, K. and G. Vaudreuil, "An Extensible Message Format
for Delivery Status Notifications", <a href="./rfc3464">RFC 3464</a>,
DOI 10.17487/RFC3464, January 2003,
<<a href="https://www.rfc-editor.org/info/rfc3464">https://www.rfc-editor.org/info/rfc3464</a>>.
[<a id="ref-RFC3834">RFC3834</a>] Moore, K., "Recommendations for Automatic Responses to
Electronic Mail", <a href="./rfc3834">RFC 3834</a>, DOI 10.17487/RFC3834, August
2004, <<a href="https://www.rfc-editor.org/info/rfc3834">https://www.rfc-editor.org/info/rfc3834</a>>.
[<a id="ref-RFC4314">RFC4314</a>] Melnikov, A., "IMAP4 Access Control List (ACL) Extension",
<a href="./rfc4314">RFC 4314</a>, DOI 10.17487/RFC4314, December 2005,
<<a href="https://www.rfc-editor.org/info/rfc4314">https://www.rfc-editor.org/info/rfc4314</a>>.
[<a id="ref-RFC4422">RFC4422</a>] Melnikov, A., Ed. and K. Zeilenga, Ed., "Simple
Authentication and Security Layer (SASL)", <a href="./rfc4422">RFC 4422</a>,
DOI 10.17487/RFC4422, June 2006,
<<a href="https://www.rfc-editor.org/info/rfc4422">https://www.rfc-editor.org/info/rfc4422</a>>.
[<a id="ref-RFC4616">RFC4616</a>] Zeilenga, K., Ed., "The PLAIN Simple Authentication and
Security Layer (SASL) Mechanism", <a href="./rfc4616">RFC 4616</a>,
DOI 10.17487/RFC4616, August 2006,
<<a href="https://www.rfc-editor.org/info/rfc4616">https://www.rfc-editor.org/info/rfc4616</a>>.
[<a id="ref-RFC4865">RFC4865</a>] White, G. and G. Vaudreuil, "SMTP Submission Service
Extension for Future Message Release", <a href="./rfc4865">RFC 4865</a>,
DOI 10.17487/RFC4865, May 2007,
<<a href="https://www.rfc-editor.org/info/rfc4865">https://www.rfc-editor.org/info/rfc4865</a>>.
<span class="grey">Jenkins & Newman Standards Track [Page 105]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-106" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
[<a id="ref-RFC4954">RFC4954</a>] Siemborski, R., Ed. and A. Melnikov, Ed., "SMTP Service
Extension for Authentication", <a href="./rfc4954">RFC 4954</a>,
DOI 10.17487/RFC4954, July 2007,
<<a href="https://www.rfc-editor.org/info/rfc4954">https://www.rfc-editor.org/info/rfc4954</a>>.
[<a id="ref-RFC5198">RFC5198</a>] Klensin, J. and M. Padlipsky, "Unicode Format for Network
Interchange", <a href="./rfc5198">RFC 5198</a>, DOI 10.17487/RFC5198, March 2008,
<<a href="https://www.rfc-editor.org/info/rfc5198">https://www.rfc-editor.org/info/rfc5198</a>>.
[<a id="ref-RFC5248">RFC5248</a>] Hansen, T. and J. Klensin, "A Registry for SMTP Enhanced
Mail System Status Codes", <a href="https://www.rfc-editor.org/bcp/bcp138">BCP 138</a>, <a href="./rfc5248">RFC 5248</a>,
DOI 10.17487/RFC5248, June 2008,
<<a href="https://www.rfc-editor.org/info/rfc5248">https://www.rfc-editor.org/info/rfc5248</a>>.
[<a id="ref-RFC5256">RFC5256</a>] Crispin, M. and K. Murchison, "Internet Message Access
Protocol - SORT and THREAD Extensions", <a href="./rfc5256">RFC 5256</a>,
DOI 10.17487/RFC5256, June 2008,
<<a href="https://www.rfc-editor.org/info/rfc5256">https://www.rfc-editor.org/info/rfc5256</a>>.
[<a id="ref-RFC5321">RFC5321</a>] Klensin, J., "Simple Mail Transfer Protocol", <a href="./rfc5321">RFC 5321</a>,
DOI 10.17487/RFC5321, October 2008,
<<a href="https://www.rfc-editor.org/info/rfc5321">https://www.rfc-editor.org/info/rfc5321</a>>.
[<a id="ref-RFC5322">RFC5322</a>] Resnick, P., Ed., "Internet Message Format", <a href="./rfc5322">RFC 5322</a>,
DOI 10.17487/RFC5322, October 2008,
<<a href="https://www.rfc-editor.org/info/rfc5322">https://www.rfc-editor.org/info/rfc5322</a>>.
[<a id="ref-RFC5788">RFC5788</a>] Melnikov, A. and D. Cridland, "IMAP4 Keyword Registry",
<a href="./rfc5788">RFC 5788</a>, DOI 10.17487/RFC5788, March 2010,
<<a href="https://www.rfc-editor.org/info/rfc5788">https://www.rfc-editor.org/info/rfc5788</a>>.
[<a id="ref-RFC6154">RFC6154</a>] Leiba, B. and J. Nicolson, "IMAP LIST Extension for
Special-Use Mailboxes", <a href="./rfc6154">RFC 6154</a>, DOI 10.17487/RFC6154,
March 2011, <<a href="https://www.rfc-editor.org/info/rfc6154">https://www.rfc-editor.org/info/rfc6154</a>>.
[<a id="ref-RFC6409">RFC6409</a>] Gellens, R. and J. Klensin, "Message Submission for Mail",
STD 72, <a href="./rfc6409">RFC 6409</a>, DOI 10.17487/RFC6409, November 2011,
<<a href="https://www.rfc-editor.org/info/rfc6409">https://www.rfc-editor.org/info/rfc6409</a>>.
[<a id="ref-RFC6532">RFC6532</a>] Yang, A., Steele, S., and N. Freed, "Internationalized
Email Headers", <a href="./rfc6532">RFC 6532</a>, DOI 10.17487/RFC6532, February
2012, <<a href="https://www.rfc-editor.org/info/rfc6532">https://www.rfc-editor.org/info/rfc6532</a>>.
[<a id="ref-RFC6533">RFC6533</a>] Hansen, T., Ed., Newman, C., and A. Melnikov,
"Internationalized Delivery Status and Disposition
Notifications", <a href="./rfc6533">RFC 6533</a>, DOI 10.17487/RFC6533, February
2012, <<a href="https://www.rfc-editor.org/info/rfc6533">https://www.rfc-editor.org/info/rfc6533</a>>.
<span class="grey">Jenkins & Newman Standards Track [Page 106]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-107" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
[<a id="ref-RFC6710">RFC6710</a>] Melnikov, A. and K. Carlberg, "Simple Mail Transfer
Protocol Extension for Message Transfer Priorities",
<a href="./rfc6710">RFC 6710</a>, DOI 10.17487/RFC6710, August 2012,
<<a href="https://www.rfc-editor.org/info/rfc6710">https://www.rfc-editor.org/info/rfc6710</a>>.
[<a id="ref-RFC7677">RFC7677</a>] Hansen, T., "SCRAM-SHA-256 and SCRAM-SHA-256-PLUS Simple
Authentication and Security Layer (SASL) Mechanisms",
<a href="./rfc7677">RFC 7677</a>, DOI 10.17487/RFC7677, November 2015,
<<a href="https://www.rfc-editor.org/info/rfc7677">https://www.rfc-editor.org/info/rfc7677</a>>.
[<a id="ref-RFC8098">RFC8098</a>] Hansen, T., Ed. and A. Melnikov, Ed., "Message Disposition
Notification", STD 85, <a href="./rfc8098">RFC 8098</a>, DOI 10.17487/RFC8098,
February 2017, <<a href="https://www.rfc-editor.org/info/rfc8098">https://www.rfc-editor.org/info/rfc8098</a>>.
[<a id="ref-RFC8174">RFC8174</a>] Leiba, B., "Ambiguity of Uppercase vs Lowercase in <a href="./rfc2119">RFC</a>
<a href="./rfc2119">2119</a> Key Words", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc8174">RFC 8174</a>, DOI 10.17487/RFC8174,
May 2017, <<a href="https://www.rfc-editor.org/info/rfc8174">https://www.rfc-editor.org/info/rfc8174</a>>.
[<a id="ref-RFC8314">RFC8314</a>] Moore, K. and C. Newman, "Cleartext Considered Obsolete:
Use of Transport Layer Security (TLS) for Email Submission
and Access", <a href="./rfc8314">RFC 8314</a>, DOI 10.17487/RFC8314, January 2018,
<<a href="https://www.rfc-editor.org/info/rfc8314">https://www.rfc-editor.org/info/rfc8314</a>>.
[<a id="ref-RFC8457">RFC8457</a>] Leiba, B., Ed., "IMAP "$Important" Keyword and
"\Important" Special-Use Attribute", <a href="./rfc8457">RFC 8457</a>,
DOI 10.17487/RFC8457, September 2018,
<<a href="https://www.rfc-editor.org/info/rfc8457">https://www.rfc-editor.org/info/rfc8457</a>>.
[<a id="ref-RFC8474">RFC8474</a>] Gondwana, B., Ed., "IMAP Extension for Object
Identifiers", <a href="./rfc8474">RFC 8474</a>, DOI 10.17487/RFC8474, September
2018, <<a href="https://www.rfc-editor.org/info/rfc8474">https://www.rfc-editor.org/info/rfc8474</a>>.
[<a id="ref-RFC8620">RFC8620</a>] Jenkins, N. and C. Newman, "The JSON Meta Application
Protocol", <a href="./rfc8620">RFC 8620</a>, DOI 10.17487/RFC8620, June 2019,
<<a href="https://www.rfc-editor.org/info/rfc8620">https://www.rfc-editor.org/info/rfc8620</a>>.
<span class="h3"><a class="selflink" id="section-11.2" href="#section-11.2">11.2</a>. Informative References</span>
[<a id="ref-EFAIL">EFAIL</a>] Poddebniak, D., Dresen, C., Mueller, J., Ising, F.,
Schinzel, S., Friedberger, S., Somorovsky, J., and J.
Schwenk, "Efail: Breaking S/MIME and OpenPGP Email
Encryption using Exfiltration Channels", August 2018,
<<a href="https://www.usenix.org/system/files/conference/usenixsecurity18/sec18-poddebniak.pdf">https://www.usenix.org/system/files/conference/</a>
<a href="https://www.usenix.org/system/files/conference/usenixsecurity18/sec18-poddebniak.pdf">usenixsecurity18/sec18-poddebniak.pdf</a>>.
[<a id="ref-milter">milter</a>] Postfix, "Postfix before-queue Milter support", 2019,
<<a href="http://www.postfix.org/MILTER_README.html">http://www.postfix.org/MILTER_README.html</a>>.
<span class="grey">Jenkins & Newman Standards Track [Page 107]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-108" ></span>
<span class="grey"><a href="./rfc8621">RFC 8621</a> JMAP Mail August 2019</span>
[<a id="ref-RFC3501">RFC3501</a>] Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL - VERSION
4rev1", <a href="./rfc3501">RFC 3501</a>, DOI 10.17487/RFC3501, March 2003,
<<a href="https://www.rfc-editor.org/info/rfc3501">https://www.rfc-editor.org/info/rfc3501</a>>.
[<a id="ref-RFC7489">RFC7489</a>] Kucherawy, M., Ed. and E. Zwicky, Ed., "Domain-based
Message Authentication, Reporting, and Conformance
(DMARC)", <a href="./rfc7489">RFC 7489</a>, DOI 10.17487/RFC7489, March 2015,
<<a href="https://www.rfc-editor.org/info/rfc7489">https://www.rfc-editor.org/info/rfc7489</a>>.
[<a id="ref-XCLIENT">XCLIENT</a>] Postfix, "Postfix XCLIENT Howto", 2019,
<<a href="http://www.postfix.org/XCLIENT_README.html">http://www.postfix.org/XCLIENT_README.html</a>>.
Authors' Addresses
Neil Jenkins
Fastmail
PO Box 234, Collins St. West
Melbourne, VIC 8007
Australia
Email: neilj@fastmailteam.com
URI: <a href="https://www.fastmail.com">https://www.fastmail.com</a>
Chris Newman
Oracle
440 E. Huntington Dr., Suite 400
Arcadia, CA 91006
United States of America
Email: chris.newman@oracle.com
Jenkins & Newman Standards Track [Page 108]
</pre>
|