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
|
IEN: 113
RFC: 759
INTERNET MESSAGE PROTOCOL
Jonathan B. Postel
August 1980
Information Sciences Institute
University of Southern California
4676 Admiralty Way
Marina del Rey, California 90291
(213) 822-1511
^L
^L
August 1980
Internet Message Protocol
TABLE OF CONTENTS
PREFACE ........................................................ iii
1. INTRODUCTION ..................................................... 1
1.1. Motivation ................................................... 1
1.2. Scope ........................................................ 1
1.3. The Internetwork Environment ................................. 2
1.4. Model of Operation ........................................... 2
1.5. Interfaces ................................................... 4
2. FUNCTIONAL DESCRIPTION ........................................... 5
2.1. Terminology .................................................. 5
2.2. Assumptions ................................................. 5
2.3. General Specification ........................................ 6
2.4. Mechanisms ................................................... 7
2.5. Relation to Other Protocols ................................. 10
3. DETAILED SPECIFICATION .......................................... 13
3.1. Overview of Message Structure ............................... 13
3.2. Message Structure ........................................... 14
3.3. Identification .............................................. 15
3.4. Command ..................................................... 15
3.5. Document .................................................... 19
3.6. Message Objects ............................................. 20
3.7. Data Elements ............................................... 27
4. OTHER ISSUES .................................................... 35
4.1. Accounting and Billing ...................................... 35
4.2. Addressing and Routing ...................................... 36
4.3. Encryption .................................................. 37
5. The MPM: A Possible Architecture ............................... 39
5.1. Interfaces .................................................. 39
5.2. MPM Organization ............................................ 40
6. EXAMPLES & SCENARIOS ............................................ 45
Example 1: Message Format ........................................ 45
Example 2: Delivery and Acknowledgment ........................... 47
Postel [Page i]
^L
August 1980
Internet Message Protocol
Table Of Contents
7. SPECIFICATION SUMMARY ........................................... 55
7.1. Message Fields .............................................. 55
7.2. Deliver Message ............................................. 58
7.3. Acknowledge Message ......................................... 59
7.4. Probe Message ............................................... 61
7.5. Response Message ............................................ 62
7.6. Cancel Message .............................................. 64
7.7. Canceled Message ............................................ 66
7.8. Data Element Summary ........................................ 68
REFERENCES .......................................................... 69
[Page ii] Postel
^L
August 1980
Internet Message Protocol
PREFACE
This is the second edition of this specification and should be treated
as a request for comments, advice, and suggestions. A great deal of
prior work has been done on computer aided message systems and some of
this is listed in the reference section. This specification was shaped
by many discussions with members of the ARPA research community, and
others interested in the development of computer aided message systems.
This document was prepared as part of the ARPA sponsored Internetwork
Concepts Research Project at ISI, with the assistance of Greg Finn,
Suzanne Sluizer, Alan Katz, Paul Mockapetris, and Linda Sato.
Jon Postel
Postel [Page iii]
^L
^L
IEN: 113 J. Postel
RFC: 759 USC-ISI
August 1980
INTERNET MESSAGE PROTOCOL
1. INTRODUCTION
This document describes an internetwork message system. The system is
designed to transmit messages between message processing modules
according to formats and procedures specified in this document. The
message processing modules are processes in host computers. Message
processing modules are located in different networks and together
constitute an internetwork message delivery system.
This document is intended to provide all the information necessary to
implement a compatible cooperating module of this internetwork message
delivery system.
1.1. Motivation
As computer supported message processing activities grow on individual
host computers and in networks of computers, there is a natural desire
to provide for the interconnection and interworking of such systems.
This specification describes the formats and procedures of a general
purpose internetwork message system, which can be used as a standard
for the interconnection of individual message systems, or as a message
delivery system in its own right.
This system also provides for the communication of data items beyond
the scope of contemporary message systems. Messages can include data
objects which could represent drawings, or facsimile images, or
digitized speech. One can imagine message stations equipped with
speakers and microphones (or telephone hand sets) where the body of a
message or a portion of it is recorded digitized speech. The output
terminal could include a graphics display, and the message might
present a drawing on the display, and verbally (via the speaker)
describe certain features of the drawing. This specification provides
for the composition of complex data objects and their encoding in
machine independent basic data elements.
1.2. Scope
The Internet Message Protocol is intended to be used for the
transmission of messages between networks. It may also be used for
the local message system of a network or host. This specification was
Postel [Page 1]
^L
August 1980
Internet Message Protocol
Introduction
developed in the context of the ARPA work on the interconnection of
networks, but it is thought that it has a more general scope.
The focus here is on the internal mechanisms to transmit messages,
rather than the external interface to users. It is assumed that a
number of user interface programs will exist. These will be both new
programs designed to work with this system and old programs designed
to work with earlier systems.
1.3. The Internetwork Environment
The internetwork message environment consists of processes which run
in hosts which are connected to networks which are interconnected by
gateways. Each network consists of many different hosts. The
networks are tied together through gateways. The gateways are
essentially hosts on two (or more) networks and are not assumed to
have much storage capacity or to "know" which hosts are on the
networks to which they are attached [1,2].
1.4. Model of Operation
This protocol is implemented in a process called a Message Processing
Module or MPM. The MPMs exchange messages by establishing full duplex
communication and sending the messages in a fixed format described in
this document. The MPM may also communicate other information by
means of commands described here.
A message is formed by a user interacting with a User Interface
Program or UIP. The user may utilize several commands to create
various fields of the message and may invoke an editor program to
correct or format some or all of the message. Once the user is
satisfied with the message it is submitted for transmission by placing
it in a data structure read by the MPM.
The MPM discovers the unprocessed input data (either by a specific
request or by a general background search), examines it, and, using
routing tables (or some other method), determines which outgoing link
to use. The destination may be another user on the same host, one on
another host on a network in common with the same host, or a user in
another network.
In the first case, another user on this host, the MPM places the
message in a data structure read by the destination user, where that
user's UIP will look for incoming messages.
In the second case, the user on another host in this network, the MPM
transmits the message to the MPM on that host. That MPM then repeats
[Page 2] Postel
^L
August 1980
Internet Message Protocol
Introduction
the routing decision, and discovering the destination is local to it,
places the message in the data structure shared with the destination
user.
In the third case, the user on a host in another network, the MPM
transmits the messages to an MPM in that network if it knows how to
establish a connection directly to it; otherwise, the MPM transmits
the message to an MPM that is "closer" to the destination. An MPM
might not know of direct connections to MPMs in all other networks,
but it must be able to select a next MPM to handle the message for
each possible destination network.
An MPM might know a way to establish direct connections to each of a
few MPMs in other nearby networks, and send all other messages to a
particular big brother MPM that has a wider knowledge of the internet
environment.
An individual network's message system may be quite different from the
internet message system. In this case, intranet messages will be
delivered using the network's own message system. If a message is
addressed outside the network, it is given to an MPM which then sends
it through the appropriate gateways to (or towards) the MPM in the
destination network. Eventually, the message gets to an MPM on the
network of the recipient of the message. The message is then sent via
the local message system to that host.
When local message protocols are used, special conversion programs are
required to transform local messages to internet format when they are
going out, and to transform internet messages to local format when
they come into the local environment. Such transformations
potentially lead to information loss. The internet message format
attempts to provide features to capture all the information any local
message system might use. However, a particular local message system
is unlikely to have features equivalent to all the possible features
of the internet message system. Thus, in some cases the
transformation of an internet message to a local message discards some
of the information. For example, if an internet message carrying
mixed text and speech data in the body is to be delivered in a local
system which only carries text, the speech data may be replaced by the
text string "There was some speech here". Such discarding of
information is to be avoided when at all possible, and to be deferred
as long as possible; still, the possibility remains that in some cases
it is the only reasonable thing to do.
Postel [Page 3]
^L
August 1980
Internet Message Protocol
Introduction
1.5. Interfaces
The MPM calls on a reliable communication procedure to communicate
with other MPMs. This is a Transport Level protocol such as the
Transmission Control Protocol (TCP) [3]. The interface to such a
procedure conventionally provides calls to open and close connections,
send and receive data on a connection, and some means to signal and be
notified of special conditions (i.e., interrupts).
The MPM receives input and produces output through data structures
that are produced and consumed respectively by user interface (or
other) programs.
[Page 4] Postel
^L
August 1980
Internet Message Protocol
2. FUNCTIONAL DESCRIPTION
This section gives an overview of the Internet Message System and its
environment.
2.1. Terminology
The messages are routed by a process called the Message Processing
Module or MPM. Messages are created and consumed by User Interface
Programs (UIPs) in conjunction with users.
The basic unit transferred between MPMs is called a message. A
message is made up of a transaction identifier (which uniquely
identifies the message), a command (which contains the necessary
information for delivery), and document. The document may have a
header and a body.
For a personal letter the document body corresponds to the contents of
the letter; the document header corresponds to the date line,
greeting, and signature.
For an inter-office memo the document body corresponds to the text;
the document header corresponds to the header of the memo.
The commands correspond to the information used by the Post Office or
the mail room to route the letter or memo. Some of the information in
the command is supplied by the UIP.
2.2. Assumptions
The following assumptions are made about the internetwork environment:
In general, it is not known what format intranet addresses will
assume. Since no standard addressing scheme would suit all networks,
it is safe to assume there will be several and that they will change
with time. Thus, frequent software modification throughout all
internet MPMs would be required if such MPMs were to know about the
formats on many networks. Therefore, each MPM which handles internet
messages is required to know only the minimum necessary to deliver
them.
Each MPM is required to know completely only the addressing format of
its own network(s). In addition, the MPM must be able to select an
output link for each message addressed to another network or host.
This does not preclude more intelligent behavior on the part of a
given MPM, but at least this minimum is necessary. Each network has a
unique name and numeric address. Such names and addresses are
Postel [Page 5]
^L
August 1980
Internet Message Protocol
Functional Description
registered with a naming authority and may be listed in documents such
as Assigned Numbers [4].
Each MPM will have a unique internet address. This feature will
enable every MPM to place a unique "handling-stamp" on a message which
passes through the MPM enroute to delivery.
2.3. General Specification
There are several aspects to a distributed service to be specified.
First, there is the service to be provided; that is, the
characteristics of the service as seen by its users. Second, there is
the service it uses; that is, the characteristics it assumes to be
provided by some lower level service. And third, there is the
protocol used between the modules of the distributed service.
User User
\ /
UIP UIP
\ /
--+----------------------------------------+-- Service
| \ / | Interface
| +--------+ +--------+ |
| | Module | <--Protocol--> | Module | |
| +--------+ +--------+ |
| \ / |
| +-----------------------+ |
| | Communication Service | |
| +-----------------------+ |
| |
+----------------------------------------+
Message Service
Figure 1.
The User/Message Service Interface
The service the message delivery system provides is to accept
messages conforming to a specified format, to attempt to deliver
those messages, and to report on the success or failure of the
delivery attempt. This service is provided in the context of an
interconnected system of networks and may involve relaying a message
through several intermediate MPMs via different communication
services.
[Page 6] Postel
^L
August 1980
Internet Message Protocol
Functional Description
The Message/Communication Service Interface
The message delivery system calls on a communication service to
transfer information from one MPM to another. There may be
different communication services used between different pairs of
MPMs, though all communication services must meet the service
characteristics described below.
It is assumed that the communication service provides a reliable
two-way data stream. Such a data stream can usually be obtained in
computer networks from the transport level protocol, for example,
the Transmission Control Protocol (TCP) [3]. In any case, the
properties the communication service must provide are:
o Logical connections for two way simultaneous data flow of
arbitrary data (i.e., no forbidden codes). All data sent is
delivered in order.
o Simple commands to open and close the connections, and to send
and receive data on the connections.
o Controlled flow of data so that data is not transmitted faster
that the receiver chooses to consume it (on the average).
o Transmission errors are corrected without user notification or
involvement of the sender or receiver. Complete breakdown on
communication is reported to the sender or receiver.
The Message-Message Protocol
The protocol used between the distributed modules of the message
delivery system, that is, the MPMs, is a small set of commands which
convey requests and replies. These commands are encoded in a highly
structured and rigidly specified format.
2.4. Mechanisms
MPMs are processes which use some communication service. A pair of
MPMs which can communicate reside in a common interprocess
communication environment. An MPM might exist in two (or more)
interprocess communication environments, and such an MPM might act to
relay messages between MPMs. Messages may be held for a time in an
MPM; the total path required for delivery need not be available
simultaneously.
From the time a message is accepted from a UIP by an MPM until it is
delivered to a UIP by an MPM and an acknowledgment is returned to the
Postel [Page 7]
^L
August 1980
Internet Message Protocol
Functional Description
originating UIP, the message is considered to be active in the message
system.
User User
\ /
UIP UIP
\ /
+---------------------------------------------------------+
| \ / |
| +-----+ +-----+ +-----+ |
| | MPM | <--Protocol--> | MPM | <--Protocol--> | MPM | |
| +-----+ +-----+ +-----+ |
| | / \ | |
| +-----------------------+ +-----------------------+ |
| |Communication Service A| |Communication Service B| |
| +-----------------------+ +-----------------------+ |
| |
+---------------------------------------------------------+
Message Service with Internal Relaying
Figure 2.
It should be clear that there are two roles an MPM can play, an
end-point MPM or a relay MPM. Most MPMs will play both roles. A
relay MPM acts to relay messages from one communication environment to
another. An end-point MPM acts as a source or destination of
messages.
The transfer of data between UIPs and MPMs is viewed as the exchange
of data structures which encode messages. The transfer of data
between MPMs is also in terms of the transmission of structured data.
[Page 8] Postel
^L
August 1980
Internet Message Protocol
Functional Description
+-----+ DATA +-----+
USER-->| UIP |-->STRUCTURES-->| MPM |-->other
+-----+ +-----+ +-----+ MPMs
| |
| +-----+
+--| |
| +-----+
+--| |
| |
+-----+
+-----+ DATA +-----+
other-->| MPM |-->STRUCTURES-->| UIP |-->USER
MPMs +-----+ +-----+ +-----+
| |
| +-----+
+--| |
| +-----+
+--| |
| |
+-----+
Message Flow
Figure 3.
In the following, a message will be described as a structured data
object represented in a particular kind of typed data elements. This
is how a message is presented when transmitted between MPMs or
exchanged between an MPM and a UIP. Internal to an MPM (or a UIP), a
message may be represented in any convenient form.
Postel [Page 9]
^L
August 1980
Internet Message Protocol
Functional Description
2.5. Relation to Other Protocols
This protocol the benefited from the earlier work on message protocols
in the ARPA Network [5,6,7,8,9], and the ideas of others about the
design of computer message systems
[10,11,12,13,14,15,16,17,18,19,20,21].
Figure 4 illustrates the place of the message protocol in the ARPA
internet protocol hierarchy:
+------+ +-----+ +-------+ +-----+ +-----+
|Telnet| | FTP | |Message| |Voice| ... | | Application Level
+------+ +-----+ +-------+ +-----+ +-----+
\ | / | |
+-----+ +-----+ +-----+
| TCP | | RTP | ... | | Host Level
+-----+ +-----+ +-----+
| | |
+-------------------------------+
| Internet Protocol | Gateway Level
+-------------------------------+
|
+---------------------------+
| Local Network Protocol | Network Level
+---------------------------+
|
Protocol Relationships
Figure 4.
Note that "local network" means an individual or specific network.
For example, the ARPANET is a local network.
The message protocol interfaces on one side to user interface programs
and on the other side to a reliable transport protocol such as TCP.
In this internet message system the MPMs communicate directly using
the lower level transport protocol. In the old ARPANET system,
message transmission was part of the file transfer protocol.
[Page 10] Postel
^L
August 1980
Internet Message Protocol
Functional Description
+------+ +-----+ +-------+
|Telnet| | FTP |---|Message| Application Level
+------+ +-----+ +-------+
\ /
+-----+ +-----+
|Voice|---| NCP | Host Level
+-----+ +-----+
|
|
| Gateway Level
|
|
+----------------+
| ARPA NET | Network Level
+----------------+
Old ARPANET Protocols
Figure 5.
Note that in the old ARPANET protocols one can't send messages (or
communicate in any way) to other networks since it has no gateway
level or internet protocol [5].
Postel [Page 11]
^L
August 1980
Internet Message Protocol
[Page 12] Postel
^L
August 1980
Internet Message Protocol
3. DETAILED SPECIFICATION
The presentation of the information in this section is difficult since
everything depends on everything, and since this is a linear medium it
has to come in some order. In this attempt, a brief overview of the
message structure is given, the detail of the message is presented in
terms of data objects, the various data objects are defined, and finally
the representation of the data elements is specified. Several aspects
of the message structure are based on the NSW Transaction Protocol [22],
and similar (but more general) proposals [23,24].
3.1. Overview of Message Structure
A message is normally composed of three parts: the identification,
the command, and the document. Each part is in turn composed of data
objects.
The identification part is composed of a transaction number assigned
by the originating MPM and the MPM identifier.
The command part is composed of an operation type, an operation code,
the arguments to the operation, error information, the destination
mailbox, and a trace. The trace is a list of the MPMs that have
handled this message.
The document part is a data structure. The message delivery system
does not depend on the contents of the document part. A standard for
the document part is defined in reference [25].
The following sections define the representation of a message as a
structured object composed of other objects. Objects in turn are
represented using a set of basic data elements.
The basic data elements are defined in section 3.7. In summary, these
are exact forms for representing integers, strings, booleans, et
cetera. There are also two elements for building data structures:
list and property list. Lists are simple lists of elements, including
lists. Property lists are lists of pairs of elements, where the first
element of each pair names the pair. That is, a property list is a
list of <name,value> pairs. In general, when an object is composed of
multiple instances of a simpler object it is represented as a list of
the simpler objects. When an object is composed of a variety of
simpler objects it is represented as a property list of the simpler
objects. In most uses of the property list representation, the
presence of <name,value> pairs in addition to those specifically
required is permitted.
Postel [Page 13]
^L
August 1980
Internet Message Protocol
Specification
3.2. Message Structure
An internet message is composed of two or three parts. The first is
the Identification which identifies the transaction; the second is the
Command; and the optional third part is the Document.
When shipped between two MPMs, a message will take the form of a
property list, with the <name,value> pairs in this order.
MESSAGE is:
( Identification, Command [, Document ] )
It is convenient to batch several messages together, shipping them
as a unit from one MPM to another. Such a group of messages is
called a message-bag.
A message-bag will be a list of Messages; each Message is of the
form described above.
MESSAGE-BAG is:
( Message, Message, ... )
The Identification
This is the transaction identifier. It is assigned by the
originating MPM. The identification is composed of the MPM
identifier, and a transaction number unique in that context for this
message.
The Command
The command is composed of a mailbox, an operation code, the
arguments to that operation, some error information, and a trace of
the route of this message. The command is implemented by a property
list which contains <name,value> pairs, where the names are used to
identify the associated argument values.
The Document
The document portion of an internet message is optional and when
present is a data structure as defined in [25].
[Page 14] Postel
^L
August 1980
Internet Message Protocol
Specification
3.3. Identification
Each message must have a unique identifier while it exists in the
message delivery system. This is provided by the combination of the
unique identifier of the MPM and a unique transaction number chosen
for the message by this MPM.
IDENTIFICATION is:
( mpm-identifier, transaction-number )
The mpm-identifier is based on the host address of the computer in
which the MPM resides. If there is more than one MPM in a host the
mpm-identifier must be extended to distinguish between the co-resident
MPMs.
3.4. Command
This section describes the commands MPMs use to communicate between
themselves. The commands come in pairs, with each request having a
corresponding reply.
COMMAND is:
( mailbox, operation, [arguments,]
[error-class, error-string,] trace )
The mailbox is the "To" specification of the message. Mailbox is a
property list of general information, some of which is the essential
information for delivery, and some of which could be extra information
which may be helpful for delivery. Mailbox is different from address
in that address is a very specific property list without extra
information. The mailbox includes a specification of the user, when
a command is addressed to the MPM itself (rather than a user it
serves) the special user name "*MPM*" is specified.
The operation is the name of the operation or procedure to be
performed.
The arguments to the operation vary from operation to operation.
The error information is composed of a error class code and a
character string, and indicates what, if any, error occurred. The
error information is normally present only in replies, and not present
in requests.
Postel [Page 15]
^L
August 1980
Internet Message Protocol
Specification
The trace is a list of the MPMs that have handled the message. Each
MPM must add its handling-stamp to the list.
[Page 16] Postel
^L
August 1980
Internet Message Protocol
Specification
3.4.1. Command: DELIVER
function: Sends a document to a mailbox.
reply: The reply is ACKNOWLEDGE.
arguments:
type-of-service: one or more of the following:
"REGULAR" regular delivery
"FORWARD" message forwarding
"GENDEL" general delivery
"PRIORITY" priority delivery
3.4.2. Command: ACKNOWLEDGE
function: Reply to DELIVER.
arguments:
reference: the identifier of the originating message.
address:
The address is the final mailbox the message was delivered to.
This would be different from the original mailbox if the message
was forwarded, and is limited to the essential information
needed for delivery.
type-of-service: one of the following:
"GENDEL" message was accepted for general delivery
"REGULAR" message was accepted for normal delivery
"PRIORITY" message was accepted for priority delivery
error-class:
error-string:
If the document was delivered successfully, the error
information has class 0 and string "ok". Otherwise, the error
information has a non-zero class and the string would be one of
"no such user", "no such host", "no such network", "address
ambiguous", or a similar response.
trail: the trace from the DELIVER command.
Postel [Page 17]
^L
August 1980
Internet Message Protocol
Specification
3.4.3. Command: PROBE
function: Finds out if specified mailbox (specified in mailbox of
the command) exists at a host.
reply: The reply is RESPONSE.
arguments: none.
3.4.4. Command: RESPONSE
function: Reply to PROBE.
arguments:
reference: the identification of the originating PROBE.
address: a specific address.
error-class:
error-string:
If the mailbox was found the error class is 0 and the error
string is "OK". If the mailbox has moved and a forwarding
address in known the error class is 1 and the error string is
"Mailbox moved, see address". Otherwise the error class is
greater than 1 and the error string may be one of the following:
"Mailbox doesn't exist", "Mailbox full", "Mailbox has moved, try
the new location indicated in the address".
trail: the trace which came from the originating PROBE.
[Page 18] Postel
^L
August 1980
Internet Message Protocol
Specification
3.4.5. Command: CANCEL
function: Abort request for specified transaction.
reply: The reply is CANCELED.
arguments:
reference: identification of transaction to be canceled.
3.4.6. Command: CANCELED
function: Reply to CANCEL.
arguments:
reference: identification of canceled transaction.
error-class:
error-string:
If the command was canceled the error class is 0 and the error
string is "OK". Otherwise the error class is positive and the
error string may be one of the following: "No such transaction",
or any error for an unreachable mailbox.
trail: the trace of the CANCEL command.
To summarize again, a command generally consists of a property list of
the following objects:
name value
---- -----
mailbox property list of address information
operation name of operation
arguments ---
error-class numeric class of the error
error-string text description of the error
trace list ( handling-stamp, ... )
3.5. Document
The actual document follows the command. The message delivery system
does not depend on the document, examine it, or use it in any way.
The standard for the contents of the document is reference [25]. The
document must be the last <name,value> pair in the message property
list.
Postel [Page 19]
^L
August 1980
Internet Message Protocol
Specification
3.6. Message Objects
In the composition of messages, we use a set of objects such as
mailbox or date. These objects are encoded in basic data elements.
Some objects are simple things like integers or character strings,
other objects are more complex things built up of lists or property
lists.
The following is a list of the objects used in messages. The object
descriptions are in alphabetical order.
Action
The type of handling action taken by the MPM when processing a
message. One of ORIGIN, RELAY, FORWARD, or DESTINATION.
Address
Address is intended to contain the minimum information necessary to
deliver a message, and no more (compare with mailbox).
An address is a property list. An address contains the following
<name,value> pairs:
name description
---- -----------
NET network name
HOST host name
USER user name
or:
name description
---- -----------
MPM mpm-identifier
USER user name
Answer
A yes (true) or no (false) answer to a question.
Arguments
Many operations require arguments, which differ from command to
command. This "object" is a place holder for the actual arguments
when commands are described in a general way.
[Page 20] Postel
^L
August 1980
Internet Message Protocol
Specification
City
The character string name of a city.
Command
(mailbox, operation [ ,arguments ]
[ ,error-class, error-string ], trace)
Country
The character string name of a country.
Date
The date and time are represented according to the International
Standards Organization (ISO) recommendations [26,27,28]. Taken
together the ISO recommendations 2014, 3307, and 4031 result in the
following representation of the date and time:
yyyy-mm-dd-hh:mm:ss,fff+hh:mm
Where yyyy is the four-digit year, mm is the two-digit month, dd is
the two-digit day, hh is the two-digit hour in 24 hour time, mm is
the two-digit minute, ss is the two-digit second, and fff is the
decimal fraction of the second. To this basic date and time is
appended the offset from Greenwich as plus or minus hh hours and mm
minutes.
The time is local time and the offset is the difference between
local time and Coordinated Universal Time (UTC). To convert from
local time to UTC algebraically subtract the offset from the local
time.
For example, when the time in
Los Angeles is 14:25:00-08:00
the UTC is 22:25:00
or when the time in
Paris is 11:43:00+01:00
the UTC is 10:43:00
Document
The document is the user's composition and is not used by the
message delivery system in any way.
Postel [Page 21]
^L
August 1980
Internet Message Protocol
Specification
Error-Class
A numeric code for the class of the error. The error classes are
coded as follows:
= 0: indicates success, no error.
This is the normal case.
= 1: failure, address changed.
This error is used when forwarding is possible, but not allowed
by the type of service specified.
= 2: failure, resources unavailable.
These errors are temporary and the command they respond to may
work if attempted at a later time.
= 3: failure, user error.
For example, unknown operation, or bad arguments.
= 4: failure, MPM error. Recoverable.
These errors are temporary and the command they respond to may
work if attempted at a later time.
= 5: failure, MPM error. Permanent.
These errors are permanent, there is no point in trying the same
command again.
= 6: Aborted as requested by user.
The response to a successfully canceled command.
[Page 22] Postel
^L
August 1980
Internet Message Protocol
Specification
Error-String
This is a character string describing the error. Possible errors:
error-string error-class
No errors 0
Ok 0
Mailbox Moved, see address 1
Mailbox Full, try again later 2
Syntax error, operation unrecognized 3
Syntax error, in arguments 3
No Such User 3
No Such Host 3
No Such Network 3
No Such Transaction 3
Mailbox Does Not Exist 3
Ambiguous Address 3
Server error, try again later 4
No service available 5
Command not implemented 5
Aborted as requested by user 6
Handling-Stamp
The handling-stamp indicates the MPM, the date (including the time)
that a message was processed by an MPM, and the type of handling
action taken.
( mpm-identifier, date, action )
Host
The character string name of a host.
Identification
This is the transaction identifier associated with a particular
message. It is the transaction number, and the MPM identifier of
the originating MPM.
( mpm-identifier, transaction-number )
Postel [Page 23]
^L
August 1980
Internet Message Protocol
Specification
Internet Address
This identifies a host in the ARPA internetwork environment. When
used as a part of identification, it identifies the originating host
of a message. The internet address is a 32 bit number, the higher
order 8 bits identify the network, and the lower order 24 bits
identify the host on that network [2]. For use in the MPMs the
internet address is divided into eight bit fields and the value of
each field is represented in decimal digits. For example, the
ARPANET address of ISIE is 167837748 and is represented as
10,1,0,52. Further, this representation may be extended to include
an address within a host, such as the TCP port of the MPM, for
example, 10,1,0,52,0,45.
Mailbox
This is the destination address of a user of the internetwork mail
system. Mailbox contains information such as network, host,
location, and local user indentifier of the recipient of the
message. Some information contained in mailbox may not be necessary
for delivery.
As an example, when one sends a message to someone for the first
time, he may include many items which are not necessary simply to
insure delivery. However, once he gets a reply to this message, the
reply will contain an Address (as opposed to Mailbox) which may be
used from then on.
A mailbox is a property list. A mailbox might contain the
following <name,value> pairs:
name description
---- -----------
MPM mpm-identifier
NET network name
HOST host name
PORT address of MPM within the host
USER user name
ORG organization name
CITY city
STATE state
COUNTRY country
ZIP zip code
PHONE phone number
The minimum mail box is an Address.
[Page 24] Postel
^L
August 1980
Internet Message Protocol
Specification
MPM-Identifier
The internetwork address of the MPM. This may be the ARPA Internet
Address or an X.121 Public Data Network Address [29]. The
mpm-identifier is a property list which has one <name,value> pair.
This unusual structure is used so that it will be easy to determine
the type of address used.
Network
This character string name of a network.
Operation
This names the operation or procedure to be performed. It is a
character string name.
Organization
This character string name of a organization.
Phone
This character string name representation of a phone number. For
example the phone number of ISI is 1 (international region) + 213
(area code) + 822 (central office) + 1511 (station number) =
12138221511.
Port
This names the port or subaddress within a host of the MPM. The
default port for the MPM is 45 (55 octal) [4].
Reference
The reference is an identification from an earlier message.
State
The character string name of a state.
Postel [Page 25]
^L
August 1980
Internet Message Protocol
Specification
Trace
Each MPM that handles the message must add its handling-stamp to
this list. This will allow detection of messages being sent in a
loop within the internet mail system, and aid in fault isolation.
Trail
When a message is sent through the internetwork environment, it
acquires this trace, a list of MPMs that have handled the message.
This list is then carried as the trail in a reply or acknowledgment
of that message. Requests and replies always have a trace and each
MPM adds its handling-stamp to this trace. Replies, in addition,
have a trail which is the complete trace of the original message.
Transaction Number
This is a number which is uniquely associated with this transaction
by the originating MPM. It identifies the transaction. (A
transaction is a message and acknowledgment.) A transaction number
must be unique during the time which the message (a request or
reply) containing it could be active in the network.
Type-of-Service
A service parameter for the delivery of a message, for instance a
message could be delivered (REGULAR), forwarded (FORWARD), turned
over to general delivery (GENDEL) (i.e., allow a person to decide
how to further attempt to deliver the message), or require priority
handling (PRIORITY).
User
The character string name of a user.
X121 Address
This identifies a host in the Public Data Network environment. When
used as a part of identifier, it identifies the originating host of
a message. The X121 address is a sequence of up to 14 digits [29].
For use in the MPMs the X121 address is represented in decimal
digits.
[Page 26] Postel
^L
August 1980
Internet Message Protocol
Specification
Zip Code
The character string representation of a postal zip code. The zip
code of ISI is 90291.
3.7. Data Elements
The data elements defined here are similar to the data structure and
encoding used in NSW [30].
Each of the diagrams which follow represent a sequence of octets.
Field boundaries are denoted by the "|" character, octet boundaries by
the "+" character. Each element begins with a one-octet code. The
order of the information in each element is left-to-right. In fields
with numeric values the high-order (or most significant) bit is the
left-most bit. For transmission purposes, the leftmost octet is
transmitted first. Cohen has described some of the difficulties in
mapping memory order to transmission order [31].
Code Type Representation
---- ---- --------------
+------+
0 No Operation | 0 |
+------+
+------+------+------+------+------
1 Padding | 1 | octet count | Data ...
+------+------+------+------+------
+------+------+
2 Boolean | 2 | 1/0 |
+------+------+
+------+------+------+
3 Index | 3 | Data |
+------+------+------+
+------+------+------+------+------+
4 Integer | 4 | Data |
+------+------+------+------+------+
Postel [Page 27]
^L
August 1980
Internet Message Protocol
Specification
Extended +------+------+------+------+------
5 Precision | 5 | octet count | Data ...
Integer +------+------+------+------+------
+------+------+------+------+------
6 Bit String | 6 | bit count | Data ...
+------+------+------+------+------
+------+------+------
7 Name String | 7 | count| Data ...
+------+------+------
+------+------+------+------+------
8 Text String | 8 | octet count | Data ...
+------+------+------+------+------
+------+------+------+------+-----
9 List | 9 | octet count | Data ...
+------+------+------+------+-----
+------+------+------+------+------
10 Proplist | 10 | octet count | Data ...
+------+------+------+------+------
+------+
11 End of List | 11 |
+------+
Element code 0 (NOP) is an empty data element used for padding when it
is necessary. It is ignored.
Element code 1 (PAD) is used to transmit large amounts of data with a
message for test or padding purposes. The type-octet is followed by a
three-octet count of the number of octets to follow. No action is
taken with this data but the count of dummy octets must be correct to
indicate the next element code.
Element code 2 (BOOLEAN) is a boolean data element. The octet
following the type-octet has the value 1 for True and 0 for False.
[Page 28] Postel
^L
August 1980
Internet Message Protocol
Specification
Element code 3 (INDEX) is a 16-bit unsigned integer datum. Element
code 3 occupies only 3 octets.
Element code 4 (INTEGER) is a signed 32-bit integer datum. This will
always occupy five octets. Representation is two's complement.
Element code 5 (EPI) is an extended precision integer. The type octet
is followed by a three-octet count of the number of data octets to
follow. Representation is two's complement.
Element code 6 (BITSTR) is a bit string element for binary data. The
bit string is padded on the right with zeros to fill out the last
octet if the bit string does not end on an octet boundary. This data
type must have the bit-count in the three-octet count field instead of
the number of octets.
Element code 7 (NAME) is used for the representation of character
string names (or other short strings). The type octet is followed by
a one-octet count of the number of characters (one per octet) to
follow. Seven bit ASCII characters are used, right justified in the
octet. The high order bit in the octet is zero.
Element code 8 (TEXT) is used for the representation of text. The
type octet is followed by a three-octet count of the number of
characters (one per octet) to follow. Seven bit ASCII characters are
used, right justified in the octet. The high order bit in the octet
is zero.
Element code 9 (LIST) can be used to create structures composed of
other elements. The three-octet octet count specifies the number of
octets in the whole list (i.e., the number of octets following this
count field to the end of the list, not including the ENDLIST octet).
The two-octet item count contains the number of elements which follow.
Any element may be used including list itself.
+------+------+------+------+------+------+
| 9 | octet count | item count |
+------+------+------+------+------+------+
+------+------/---+
repeated | element |
+------+------/---+
+-------+
|ENDLIST|
+-------+
In some situations it may not be possible to know the length of a list
Postel [Page 29]
^L
August 1980
Internet Message Protocol
Specification
until the head of it has been transmitted. To allow for this a
special ENDLIST element is defined. A list of undetermined length is
transmitted with the octet count cleared to zero, and the item count
cleared to zero. A null or empty List, one with no elements, has an
octet count of two (2) and an item count of zero (0). The ENDLIST
element always follows a LIST, even when the length is determined.
Element code 10 (PROPLIST) is the Property List element. It is a
special case of the list element, in which the elements are in pairs
and the first element of each pair is a name. It has the following
form:
+------+------+------+------+------+
| 10 | octet count | pair |
+------+------+------+------+------+
+------+------/---+------+------/---+
repeated | name element | value element |
+------+------/---+------+------/---+
+-------+
|ENDLIST|
+-------+
The Property List structure consists of a set of unordered
<name,value> pairs. The pairs are composed of a name which must be a
NAME element and a value which may be any kind of element. Following
the type code is a three-octet octet count of the following octets.
Following the octet count is a one-octet pair count of the number of
<name,value> pairs in the property list.
The name of a <name,value> pair is to be unique within the property
list, that is, there shall be at most one occurrence of any particular
name in one property list.
In some situations it may not be possible to know the length of a
property list until the head of it has been transmitted. To allow for
this the special ENDLIST element is defined. A property list of
undetermined length is transmitted with the octet count cleared to
zero, and the pair count cleared to zero. A null or empty property
list, one with no elements, has an octet count of one (1) and an pair
count of zero (0). The ENDLIST element always follows a property
list, even when the length is determined.
Element code 11 (ENDLIST) is the end of list element. It marks the
end of the corresponding list or property list.
[Page 30] Postel
^L
August 1980
Internet Message Protocol
Specification
Structure Sharing
When messages are batched in message-bags for transmission, it may
often be the case that the same document will be sent to more than
one recipient. Since the document portion can usually be expected
to be the major part of the message, much repeated data would be
sent if a copy of the document for each recipient were to be shipped
in the message-bag.
To avoid this redundancy, messages may be assembled in the
message-bag so that actual data appears on its first occurrence and
only references to it appear in later occurrences. When data is
shared, the first occurrence of the data will be tagged, and later
locations where the data should appear will only reference the
earlier tagged location. All references to copied data point to
earlier locations in the message-bag. The data to be retrieved is
indicated by the tag.
This is a very general sharing mechanism. PLEASE NOTE THAT THE MPM
WILL NOT SUPPORT THE FULL USE OF THIS MECHANISM. THE MPM WILL ONLY
SUPPORT SHARING OF WHOLE DOCUMENTS. No other level of sharing will
be supported by the MPMs.
This sharing mechanism may be used within a document as long as all
references refer to tags within the same document.
Sharing is implemented by placing a share-tag on the first
occurrence of the data to be shared, and placing a share-reference
at the locations where copies of that data should occur.
+------+------+------+
12 Share Tag | 12 | share-index |
+------+------+------+
+------+------+------+
13 Share Reference | 13 | share-index |
+------+------+------+
Element code 12 (S-TAG) is a share tag element. The two octets
following the type-octet specify the shared data identification code
for the following data element. Note that s-tag is not a DATA
element, in the sense that data elements encode higher level
objects.
Element code 13 (S-REF) is a share reference element. The two
Postel [Page 31]
^L
August 1980
Internet Message Protocol
Specification
octets following the type-octet specify the referenced shared data
identification code.
An example of using this mechanism is
( ( <a>, <b> ) ( <c>, <b> ) )
could be coded as follows to share <b>
( ( <a>, <s-tag-1><b> ) ( <c>, <s-ref-1> ) )
To facilitate working with structures which may contain shared data,
the two high-order bits of the list and property list element codes
are reserved for indicating if the structure contains data to be
shared or contains a reference to shared data. That is, if the
high-order bit of the list or property list element code octet is
set to one then the property list contains a share-reference to
shared data. Or, if the second high-order bit is set to one the
structure contains a share-tag for data to be shared.
The example above is now repeated in detail showing the use of the
high-order bits.
+------+------+------+------+------+------+------+------+
|11 - 9|01 - 9| <a> | 12 | 0 | 1 | <b> | 11 |
+------+------+------+------+------+------+------+------+
+------+------+------+------+------+------+------+
|10 - 9| <c> | 13 | 0 | 1 | 11 | 11 |
+------+------+------+------+------+------+------+
It is not considered an error for an element to be tagged but not
referenced.
A substructure with internal sharing may be created. If such a
substructure is closed with respect to sharing -- that is, all
references to its tagged elements are within the substructure --
then there is no need for the knowledge of the sharing to propagate
up the hierarchy of lists. For example, if the substructure is:
00-LIST ( a b c b )
which with sharing is:
11-LIST ( a T1:b c R1 )
When this substructure is included in a large structure the high
[Page 32] Postel
^L
August 1980
Internet Message Protocol
Specification
order bits can be reset since the substructure is closed with
respect to sharing. For example:
00-LIST ( x 11-LIST ( a T1:b c R1 ) y )
Note: While sharing adds transmission and memory efficiency, it is
costly in processing to separate shared elements. This is the main
reason for restricting the sharing supported by the MPM. At some
later time these restrictions may be eased.
It is possible to create loops, "strange loops" and "tangled
hierarchies" using this mechanism [32]. The MPM will not check for
such improper structures within documents, and will not deliver
messages involved in such structures between documents.
If an encryption scheme is used to ensure the privacy of
communication it is unlikely that any parts of the message can be
shared. This is due to the fact that in most case the encryption
keys will be specific between two individuals. There may be a few
cases where encrypted data may be shared. For example, all the
members of a committee may use a common key when acting on committee
business, or in a public key scheme a document may be "signed" using
the private key of the sender and inspected by anyone using the
public key of the sender.
Postel [Page 33]
^L
August 1980
Internet Message Protocol
[Page 34] Postel
^L
August 1980
Internet Message Protocol
4. OTHER ISSUES
This section discusses various other issues that need to be dealt with
in a computer message system.
4.1. Accounting and Billing
Accounting and billing must be performed by the MPM. The charge to
the user by the message delivery system must be predictable, and so
cannot depend on the actual cost of sending a particular message which
incurs random delays, handling and temporary storage charges. Rather,
these costs must be aggregated and charged back to the users on an
average cost basis. The user of the service may be charged based on
the destination or distance, the length of the message, type of
service, or other parameters selected as the message is entered into
the delivery system, but must not depend on essentially random
handling by the system of the particular message.
This means it is pointless to have each message carry an accumulated
charge (or list of charges). Rather, the MPM will keep a log of
messages handled and periodically bill the originators of those
messages.
It seems that the most reasonable scheme is to follow the practice of
the international telephone authorities. In such schemes the
authority where the message originates bills the user of the service
for the total charge. The authorities assist each other in providing
the international message transfer and the authorities periodically
settle any differences in accounts due to an imbalance in
international traffic.
Thus the MPMs will keep logs of messages handled and will periodically
charge their neighboring MPM for messages handled for them. This
settlement procedure is outside the message system and between the
administrators of the MPMs.
As traffic grows it will be impractical to log every message
individually. It will be necessary to establish categories of
messages (e.g., short, medium, large) and only count the number in
each category.
The MPM at the source of the message will have a local means of
identifying the user to charge for the message delivery service. The
relay and destination MPMs will know which neighbor MPMs to charge (or
settle with) for delivery of their messages.
Postel [Page 35]
^L
August 1980
Internet Message Protocol
Other Issues
4.2. Addressing and Routing
The mailbox provides for many types of address information. The MPMs
in the ARPA internet can most effectively use the internet address
[2]. The use of other address information is not yet very clear.
Some thoughts on addressing issues may be found in the references
[33,34,35].
An MPM sometimes must make a routing decision when it is acting as a
relay-MPM (or source MPM). It must be able to use the information
from the mailbox to determine to which of its neighbor MPMs to send
the message. One way this might be implemented is to have a table of
destination networks with corresponding neighbor MPM identifiers to
use for routing toward that network.
It is not expected that such routing tables would be very dynamic.
Changes would occur only when new MPMs came into existence or MPMs
went out of service for periods of days.
Even with relatively slowly changing routing information the MPMs need
an automatic mechanism for adjusting their routing tables. The
routing problem here is quite similar to the problem of routing in a
network of packet switches such as the ARPANET IMPs or a set of
internet gateways. A great deal of work has been done on such
problems and many simple schemes have been found faulty. There are
details of these procedures which may become troublesome when the
number of nodes grows beyond a certain point or the frequency of
update exchanges gets large.
A basic routing scheme is to have a table of <network-name,
mpm-identifier> pairs. The MPM could look up the network name found
in the mailbox of the message and determine the internet
mpm-identifier of the next MPM to which to route the message. To
permit automatic routing updates another column would be added to
indicate the distance to the destination. This could be measured in
several ways, for example, the number of relay MPM (or hops) to the
final destination. In this case each entry in the table is a triple
of <network-name, mpm-identifier, distance>.
To update the routing information when changes occur an MPM updates
its table. It then sends to each next MPM in its table a table of
pairs <network-name, distance>, which say in effect "I can get a
message to each of these networks with "cost" distance." An MPM which
receives such an update will add to all the distances the distance to
the MPM sending the update (e.g., one hop) and compare the information
with its own table.
[Page 36] Postel
^L
August 1980
Internet Message Protocol
Other Issues
If the update information shows that the distance to a destination
network is now smaller via the MPM which sent the update, the MPM
changes its own table to reflect the better route, and the new
distance. If the MPM has made changes in its table it sends update
information to all the MPMs listed as next-MPMs in its table.
One further feature is that when a new network comes into existence an
entry must be added to the table in each MPM. The MPMs should
therefore expect the case that update information may contain entries
which are new networks, and in such an event add these entries to
their own tables.
When a new MPM comes into existence it will have an initial table
indicating that it is a good route (short distance) to the network it
is in, and will have entries for a few neighbor networks. It will
send an initial "update" to those neighbor MPMs which will respond
with more complete tables, thus informing the new MPM of routes to
many networks.
This routing update mechanism is a simple minded scheme and may have
to be replaced as the system of MPMs grows. In addition it ignores
the opportunity for MPMs to use other information (besides destination
network name) for routing. MPMs may have tables that indicate
next-MPMs based on city, telephone number, organization, or other
categories of information.
4.3. Encryption
It is straightforward to add the capability to have the document
portion of messages either wholly or partially encrypted. An
additional basic data element is defined to carry encrypted data. The
data within this element may be composed of other elements, but that
could only be perceived after the data was decrypted.
+------+------+------+------+
14 Encrypt | 14 | octet count |
+------+------+------+------+
+------+------+------+-------
|alg id| key id | Data ...
+------+------+------+--------
Element code 14 (ENCRYPT) is used to encapsulate encrypted data. The
format is the one-octet type code, the three-octet octet count, a
one-octet algorithm identifier, a two-octet key identifier, and count
octets of data. Use of this element indicates that the data it
Postel [Page 37]
^L
August 1980
Internet Message Protocol
Other Issues
contains is encrypted. The encryption scheme is indicated by the
algorithm identifier, and the key used is indicated by the key
identifier (this is not the key itself). The NBS Data Encryption
Standard (DES) [36], public key encryption [37,38,39], or other
schemes may be used.
To process this data element, the user is asked for the appropriate
key and the data can then be decrypted. The data thus revealed will
be in the form of complete data element fields. Encryption cannot
occur over a partial field. The revealed data is then processed
normally.
Note that there is no reason why all fields of a document could not be
encrypted including all document header information such as From,
Date, etc.
[Page 38] Postel
^L
August 1980
Internet Message Protocol
5. THE MPM: A POSSIBLE ARCHITECTURE
The heart of the internet message system is the MPM which is responsible
for routing and delivering messages. Each network must have at least
one MPM. These MPMs are logically connected together, and internet mail
is always transferred along logical channels between them. The MPMs
interface with existing local message systems.
Since the local message system may be very different from the internet
system, special programs may be necessary to convert incoming internet
messages to the local format. Likewise, messages outgoing to other
networks may be converted to the internet format and sent via the MPMs.
5.1. Interfaces
User Interface
It is assumed that the interface between the MPM and the UIP
provides for passing data structures which represent the document
portion of the message. In addition, this interface must pass the
delivery address information (which becomes the information in the
mailbox field of the command). It is assumed that the information
is passed between the UIP and the MPM via shared files, but this is
not the only possible mechanism. These two processes may be more
strongly coupled (e.g., by sharing memory), or less strongly coupled
(e.g., by communicating via logical channels).
When a UIP passes a document and a destination address to the MPM,
the MPM assigns a transaction-number and forms a message to send.
The MPM must record the relationship between the transaction-number,
the document, and the UIP, so that it can inform the UIP about the
outcome of the delivery attempt for that document when the
acknowledgment message is received at some later time.
Assuming a file passing mode of communication between the UIP and
the MPM the sending and receiving of mail might involve the
following interactions:
A user has an interactive session with a UIP to compose a document
to send to a destination (or list of destinations). When the user
indicates to the UIP that the document is to be sent, the UIP
places the information into a file for the MPM. The UIP may then
turn to the next request of the user.
The MPM finds the file and extracts the the information. It
creates a message, assigning a transaction-number and forming a
deliver command. The MPM records the UIP associated with this
message. The MPM sends the message toward the destination.
Postel [Page 39]
^L
August 1980
Internet Message Protocol
MPM Architecture
When the MPM receives a deliver message from another MPM addressed
to a user in its domain, it extracts the document and puts it into
a file for the UIP associated with the destination user. The MPM
also sends an acknowledge message to the originating MPM.
When the MPM receives an acknowledgment for a message it sent, the
MPM creates a notification for the associated UIP and places it in
a file for that UIP.
The format of these files is up to each UIP/MPM interface pair.
One reasonable choice is to use the same data structures used in
the MPM-MPM communication.
Communication Interface
It is assumed here that the MPMs use an underlying communication
system, and TCP [3] has been taken as the model. In particular, the
MPM is assumed to be listening for a TCP connection on a TCP port,
i.e., it is a server process. The port is either given explicitly
in the mpm-identifier or takes the default vaule 45 (55 octal) [4].
Again, this is not intended to limit the implementation choices;
other forms of interprocess communication are allowed, and other
types of physical interconnection are permitted. One might even use
dial telephone calls to interconnect MPMs (using suitable protocols
to provide reliable communication) [12,19,20,21].
5.2. The MPM Organization
Messages in the internet mail system are transmitted in lists called
message-bags (or simply bags), each bag containing one or more
messages. Each MPM is expected to implement functions which will
allow it to deliver local messages it receives and to forward
non-local ones to other MPMs presumably closer to the message's
destination.
Loosely, each MPM can be separated into six components:
1--Acceptor
Receives incoming message-bags, from other MPMs, from UIPs, or
from conversion programs.
2--Message-Bag Processor
Splits a bag into these three portions:
[Page 40] Postel
^L
August 1980
Internet Message Protocol
a. Local Host Messages
b. Local Net Messages
c. Foreign Net Messages
3--Local Host Delivery
Delivers local host messages, may call on conversion program.
4--Local Net Delivery
Delivers local net messages, may call on conversion program.
5--Foreign Net Router
Forms message-bags for transmission to other MPMs and determines
the first step in the route.
6--Foreign Net Sender
Activates transmission channels to other MPMs and sends
message-bags to foreign MPMs.
If the local net message system uses the protocol of the MPMs, then
there need be no distinction between local net and foreign net
delivery procedures.
All of these components can be thought of as independent. The
function of the Acceptor is to await incoming message-bags and to
insert them into the Bag-Input Queue.
The Bag-Input queue is read by the message-bag Processor which will
separate and deliver suitable portions of the message-bags it
retrieves from the queue to one of three queues:
a. Local Host Queue
b. Local Net Queue
c. Foreign Net Queue
When an MPM has a message to send to another MPM, it must add its own
handling-stamp to the trace field of the command. The trace then
becomes a record of the route the message has taken. An MPM should
examine the trace field to see if the message is in a routing loop.
All commands require the return of the trace as a trail in the
matching reply command.
All of these queues have as elements complete message-bags created by
selecting messages from the input message-bags.
Postel [Page 41]
^L
August 1980
Internet Message Protocol
The Local Host queue serves as input to the Local Host Delivery
process. This component is responsible for delivering messages to its
local host. It may call on a conversion program to reformat the
messages into a form the local protocol will accept. This will
probably involve such things as copying shared information.
The Local Net queue serves as input to the Local Net Delivery process.
This component is responsible for delivering messages to other hosts
on its local net. It must be capable of handling whatever error
conditions the local net might return, and should include the ability
to retransmit. It may call on a conversion program to reformat the
messages into a form the local protocol will accept. This will
probably involve such things as copying shared information.
The other two processes are more closely coupled. The Foreign Net
Router takes its input bags from the Foreign Net Queue. From the
internal information it contains, it determines which of the MPMs to
which it is connected should receive the bag.
It then places the bag along with the routing information into the
Send Mail Queue. The Foreign Net Sender retrieves it from that queue
and transmits it across a channel to the intended foreign MPM. The
Sender aggregates messages to the same next MPM into a bag.
The Foreign Net Router should be capable of receiving external input
to its routing information table. This may come from the Foreign Net
Sender in the case of a channel going down, requiring a decision to
either postpone delivery or to determine a new route. The Router is
responsible for maintaining sufficient information to determine where
to send any incoming message-bag.
Forwarding
An MPM may have available information on the correct mailboxes of
users which are not at its location. This information, called a
forwarding data base, may be used to return the correct address in
response to a probe command, or to actually forward a deliver
command (if allowed by the type of service).
Because such forwarding may cause the route of a message to pass
through an MPM already on the trace of this message, only the
portion of the trace back to the most recent forward action should
be used for loop detection by a relay relaying MPM, and only the
forward action entries in the trace should be checked by a
forwarding MPM.
[Page 42] Postel
^L
August 1980
Internet Message Protocol
Implementation Recommendations
Transaction numbers can be assigned sequentially, with wrap around
when the highest value is reached. This should ensure that no
message with a particular transaction number from this source is in
the network when another instance of this transaction number is
chosen.
The processing to separate shared elements when the routes of the
shared elements diverge while still preserving the sharing possible
appears to be an O(N*M**2) operation where N is the number of
distinct objects in a message which may be shared across message
boundaries and M is the number of messages in the bag.
Also note that share-tags may be copied into separate message bags
which are not referenced. These could be removed with another pass
over the message bag.
Postel [Page 43]
^L
August 1980
Internet Message Protocol
[Page 44] Postel
^L
August 1980
Internet Message Protocol
6. EXAMPLES & SCENARIOS
Example 1: Message Format
Suppose we want to send the following message:
Date: 1979-03-29-11:46-08:00
From: Jon Postel <Postel@ISIE>
Subject: Meeting Thursday
To: Danny Cohen <Cohen@USC-ISIB>
CC: Linda
Danny:
Please mark your calendar for our meeting Thursday at 3 pm.
--jon.
It will be encoded in the structured format. The following will
present successive steps in the top down generation of this message.
The actual document above will not be shown in the coded form.
1. message
2. (identification, command, document)
3. (ID:(mpm-identifier, transaction-number),
CMD:(MAILBOX:mailbox, OPERATION:operation,
arguments, TRACE:trace),
DOC:<<document>>)
4. (ID:(mpm-identifier, transaction-number),
CMD:(MAILBOX:mailbox, OPERATION:operation,
TYPE-OF-SERVICE:regular, TRACE:trace),
DOC:<<document>>)
5. (ID:(MPM:(IA:12,1,0,52,0,45), TRANSACTION:37),
CMD:(MAILBOX:(MPM:(IA:12,3,0,52,0,45),
NET:ARPA,
HOST:ISIB,
PORT:45,
USER:Cohen),
OPERATION:DELIVER,
TYPE-OF-SERVICE:REGULAR,
TRACE:(MPM:(IA:12,1,0,52,0,45)
DATE:1979-03-29-11:46-08:00,
ACTION:ORIGIN)),
DOC:<<document>>)
Postel [Page 45]
^L
August 1980
Internet Message Protocol
Examples & Scenarios
6. PROPLIST:(
ID:PROPLIST:(
MPM:PROPLIST:(
IA:12,1,0,52,0,45),
ENDLIST
TRANSACTION:37)
ENDLIST,
CMD:PROPLIST(
MAILBOX:(PROPLIST:(
MPM:PROPLIST(
IA:12,3,0,52,0,45),
ENDLIST
NET:ARPA,
HOST:ISIB,
PORT:45,
USER:Cohen ),
ENDLIST
OPERATION:DELIVER,
TYPE-OF-SERVICE:REGULAR,
TRACE:(PROPLIST:MPM:
(PROPLIST:
IA:12,1,0,52,0,45)
ENDLIST
DATE:1979-03-29-11:46-08:00,
ACTION:ORIGIN)),
ENDLIST
ENDLIST
DOC:<<document>>)
ENDLIST
[Page 46] Postel
^L
August 1980
Internet Message Protocol
Examples & Scenarios
Example 2: Delivery and Acknowledgment
The following are four views of the message of example 1 during the
successive transmission from the origination MPM, through a relay MPM,
to the destination MPM, and the return of the acknowledgment, through
a relay MPM, to the originating MPM.
+-----------------------------------------------------------------+
| A B |
| sending --> originating --> relay --> destination --> receiving |
| user MPM MPM MPM user |
| |
| D C |
| originating <-- relay <-- destination |
| MPM MPM MPM |
+-----------------------------------------------------------------+
Transmission Path
Figure 6.
Postel [Page 47]
^L
August 1980
Internet Message Protocol
Examples & Scenarios
A. Between the originating MPM and the relay MPM.
PROPLIST:
NAME:"ID",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,1,0,52,0,45"
ENDLIST
NAME:"TRANSACTION", INTEGER:37
ENDLIST
NAME:"CMD",
PROPLIST:
NAME:"MAILBOX",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,3,0,52,0,45"
ENDLIST
NAME:"NET", NAME:"ARPA"
NAME:"HOST", NAME:"ISIB"
NAME:"PORT", NAME:"45"
NAME:"USER", NAME:"Cohen"
ENDLIST
NAME:"OPERATION", NAME:"DELIVER"
NAME:"TYPE-OF-SERVICE", NAME:"REGULAR"
NAME:"TRACE",
LIST:
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,1,0,52,0,45"
ENDLIST
NAME:"DATE", NAME:"1979-03-29-11:47.5-08:00"
NAME:"ACTION", NAME:"ORIGIN"
ENDLIST
ENDLIST
ENDLIST
NAME:"DOC", <<document>>
ENDLIST
[Page 48] Postel
^L
August 1980
Internet Message Protocol
Examples & Scenarios
B. Between the relay MPM and the destination MPM.
PROPLIST:
NAME:"ID",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,1,0,52,0,45"
ENDLIST
NAME:"TRANSACTION", INTEGER:37
ENDLIST
NAME:"CMD",
PROPLIST:
NAME:"MAILBOX",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,3,0,52,0,45"
ENDLIST
NAME:"NET", NAME:"ARPA"
NAME:"HOST", NAME:"ISIB"
NAME:"PORT", NAME:"45"
NAME:"USER", NAME:"Cohen"
ENDLIST
NAME:"OPERATION", NAME:"DELIVER"
NAME:"TYPE-OF-SERVICE", NAME:"REGULAR"
NAME:"TRACE",
LIST:
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,1,0,52,0,45"
ENDLIST
NAME:"DATE", NAME:"1979-03-29-11:47.5-08:00"
NAME:"ACTION", NAME:"ORIGIN"
ENDLIST
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,2,0,52,0,45"
ENDLIST
NAME:"DATE", NAME:"1979-03-29-11:48-08:00"
NAME:"ACTION", NAME:"RELAY"
ENDLIST
ENDLIST
ENDLIST
NAME:"DOC", <<document>>
Postel [Page 49]
^L
August 1980
Internet Message Protocol
Examples & Scenarios
ENDLIST
C. Between the destination MPM and the relay MPM.
PROPLIST:
NAME:"ID",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,3,0,52,0,45"
ENDLIST
NAME:"TRANSACTION", INTEGER:1993
ENDLIST
NAME:"CMD",
PROPLIST:
NAME:"MAILBOX",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:"10,1,0,52,0,45"
ENDLIST
NAME:"NET", NAME:"ARPA"
NAME:"HOST", NAME:"ISIE"
NAME:"PORT", NAME:"45"
NAME:"USER", NAME:"*MPM*"
ENDLIST
NAME:"OPERATION", NAME:"ACKNOWLEDGE"
NAME:"REFERENCE",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,1,0,52,0,45"
ENDLIST
NAME:"TRANSACTION", INTEGER:37
ENDLIST
NAME:"ADDRESS",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:"10,3,0,52,0,45"
ENDLIST
NAME:"USER", NAME:"Cohen"
ENDLIST
NAME:"TYPE-OF-SERVICE", NAME:"REGULAR"
NAME:"ERROR-CLASS", INDEX:0
NAME:"ERROR-STRING", NAME:"Ok"
NAME:"TRAIL",
[Page 50] Postel
^L
August 1980
Internet Message Protocol
Examples & Scenarios
LIST:
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,1,0,52,0,45"
ENDLIST
NAME:"DATE", NAME:"1979-03-29-11:47.5-08:00"
NAME:"ACTION", NAME:"ORIGIN"
ENDLIST
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,2,0,52,0,45"
ENDLIST
NAME:"DATE", NAME:"1979-03-29-11:48-08:00"
NAME:"ACTION", NAME:"RELAY"
ENDLIST
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,3,0,52,0,45"
ENDLIST
NAME:"DATE", NAME:"1979-03-29-11:51.567-08:00"
NAME:"ACTION", NAME:"DESTINATION"
ENDLIST
ENDLIST
NAME:"TRACE",
LIST:
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,3,0,52,0,45"
ENDLIST
NAME:"DATE", NAME:"1979-03-29-11:52-08:00"
NAME:"ACTION", NAME:"ORIGIN"
ENDLIST
ENDLIST
ENDLIST
ENDLIST
Postel [Page 51]
^L
August 1980
Internet Message Protocol
Examples & Scenarios
D. Between the relay MPM and the originating MPM.
PROPLIST:
NAME:"ID",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,3,0,52,0,45"
ENDLIST
NAME:"TRANSACTION", INTEGER:1993
ENDLIST
NAME:"CMD",
PROPLIST:
NAME:"MAILBOX",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:"10,1,0,52,0,45"
ENDLIST
NAME:"NET", NAME:"ARPA"
NAME:"HOST", NAME:"ISIE"
NAME:"PORT", NAME:"45"
NAME:"USER", NAME:"*MPM*"
ENDLIST
NAME:"OPERATION", NAME:"ACKNOWLEDGE"
NAME:"REFERENCE",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,1,0,52,0,45"
ENDLIST
NAME:"TRANSACTION", INTEGER:37
ENDLIST
NAME:"ADDRESS",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:"10,3,0,52,0,45"
ENDLIST
NAME:"USER", NAME:"Cohen"
ENDLIST
NAME:"TYPE-OF-SERVICE", NAME:"REGULAR"
NAME:"ERROR-CLASS", INDEX:0
NAME:"ERROR-STRING", NAME:"Ok"
NAME:"TRAIL",
LIST:
PROPLIST:
[Page 52] Postel
^L
August 1980
Internet Message Protocol
Examples & Scenarios
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,1,0,52,0,45"
ENDLIST
NAME:"DATE", NAME:"1979-03-29-11:47.5-08:00"
NAME:"ACTION", NAME:"ORIGIN"
ENDLIST
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,2,0,52,0,45"
ENDLIST
NAME:"DATE", NAME:"1979-03-29-11:48-08:00"
NAME:"ACTION", NAME:"RELAY"
ENDLIST
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,3,0,52,0,45"
ENDLIST
NAME:"DATE", NAME:"1979-03-29-11:51.567-08:00"
NAME:"ACTION", NAME:"DESTINATION"
ENDLIST
ENDLIST
NAME:"TRACE",
LIST:
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,3,0,52,0,45"
ENDLIST
NAME:"DATE", NAME:"1979-03-29-11:52-08:00"
NAME:"ACTION", NAME:"ORIGIN"
ENDLIST
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:"10,2,0,52,0,45"
ENDLIST
NAME:"DATE", NAME:"1979-03-29-11:52.345-08:00"
NAME:"ACTION", NAME:"RELAY"
ENDLIST
ENDLIST
ENDLIST
ENDLIST
Postel [Page 53]
^L
August 1980
Internet Message Protocol
[Page 54] Postel
^L
August 1980
Internet Message Protocol
7. SPECIFICATION SUMMARY
7.1. Message Fields
All keywords used in this protocol are to be recognized independent of
case.
action: NAME (one of)
"ORIGIN" | "RELAY" | "FORWARD" | "DESTINATION"
address: PROPLIST (one of)
NAME: "MPM", <mpm-identifier>
NAME: "USER", <user>
or
NAME: "NET", <net>
NAME: "HOST", <host>
NAME: "PORT", <port>
NAME: "USER", <user>
answer: BOOLEAN
city: NAME
command: PROPLIST
NAME: "MAILBOX", <mailbox>
NAME: "OPERATION", <operation>
<<arguments>>
NAME: "ERROR-CLASS", <error-class> (only in replies)
NAME: "ERROR-STRING", <error-string> (only in replies)
NAME: "TRACE", <trace>
country: NAME
document: <<document>>
error-class: INDEX
error-string: NAME
host: NAME
Postel [Page 55]
^L
August 1980
Internet Message Protocol
handling-stamp: PROPLIST
NAME: "MPM", <mpm-identifier>
NAME: "DATE", <date>
NAME: "ACTION", <action>
identification: LIST
NAME: "MPM", <mpm-identifier>
NAME: "TRANSACTION", <transaction-number>
internet-address: NAME
mailbox: PROPLIST (some of)
NAME: "MPM", <mpm-identifier>
NAME: "NET", <net>
NAME: "HOST", <host>
NAME: "PORT", <port>
NAME: "USER", <user>
NAME: "ORG", <organization>
NAME: "CITY", <city>
NAME: "STATE", <state>
NAME: "COUNTRY", <country>
NAME: "ZIP", <zip-code>
NAME: "PHONE", <phone-number>
<<other-items>>
message: PROPLIST
NAME: "ID", <identification>
NAME: "CMD", <command>
NAME: "DOC", <document> (only in deliver)
mpm-identifier: PROPLIST (one of)
NAME: "IA", <internet-address>
or
NAME: "X121", <x121-address>
net: NAME
operation: NAME (one of)
"DELIVER" | "ACKNOWLEDGE
| "PROBE" | "RESPONSE
| "CANCEL" | "CANCELED"
organization: NAME
phone-number: NAME
[Page 56] Postel
^L
August 1980
Internet Message Protocol
port: NAME
state: NAME
trace: LIST
<handling-stamp>
...
trail: LIST
<handling-stamp>
...
transaction-number: INTEGER
type-of-service: NAME (one or more of)
"REGULAR" | "FORWARD" | "GENDEL" | "PRIORITY"
user: NAME
x121-address: NAME
zip-code: NAME
Postel [Page 57]
^L
August 1980
Internet Message Protocol
7.2. Deliver Message
PROPLIST:
NAME:"ID",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:<internet-address>
ENDLIST
NAME:"TRANSACTION", INTEGER:<transaction-number>
ENDLIST
NAME:"CMD",
PROPLIST:
NAME:"MAILBOX",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"NET", NAME:<net>
NAME:"HOST", NAME:<host>
NAME:"PORT", NAME:<port>
NAME:"USER", NAME:<user>
NAME:"ORG", NAME:<organization>
NAME:"CITY", NAME:<city>
NAME:"STATE", NAME:<state>
NAME:"COUNTRY", NAME:<country>
NAME:"ZIP", NAME:<zip-code>
NAME:"PHONE", NAME:<phone-number>
<<other-items>>
ENDLIST
NAME:"OPERATION", NAME:"DELIVER"
NAME:"TYPE-OF-SERVICE", NAME:<type-of-service>
NAME:"TRACE",
LIST:
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"DATE", NAME:<date>
NAME:"ACTION", NAME:<action>
ENDLIST
...
ENDLIST
ENDLIST
NAME:"DOC", <<document>>
ENDLIST
[Page 58] Postel
^L
August 1980
Internet Message Protocol
7.3. Acknowledge Message
PROPLIST:
NAME:"ID",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:<internet-address>
ENDLIST
NAME:"TRANSACTION", INTEGER:<transaction-number>
ENDLIST
NAME:"CMD",
PROPLIST:
NAME:"MAILBOX",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"USER", NAME:"*MPM*"
NAME:"NET", NAME:<net>
NAME:"PORT", NAME:<port>
NAME:"HOST", NAME:<host>
ENDLIST
NAME:"OPERATION", NAME:"ACKNOWLEDGE"
NAME:"REFERENCE",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:<internet-address>
ENDLIST
NAME:"TRANSACTION", INTEGER:<transaction-number>
ENDLIST
NAME:"ADDRESS",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"USER", NAME:<user>
ENDLIST
NAME:"TYPE-OF-SERVICE", NAME:<type-of-service>
NAME:"ERROR-CLASS", INDEX:<error-class>
NAME:"ERROR-STRING", NAME:<error-string>
NAME:"TRAIL",
LIST:
PROPLIST:
NAME:"MPM",
Postel [Page 59]
^L
August 1980
Internet Message Protocol
PROPLIST:
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"DATE", NAME:<date>
NAME:"ACTION", NAME:<action>
ENDLIST
...
ENDLIST
NAME:"TRACE",
LIST:
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"DATE", NAME:<date>
NAME:"ACTION", NAME:<action>
ENDLIST
...
ENDLIST
ENDLIST
ENDLIST
[Page 60] Postel
^L
August 1980
Internet Message Protocol
7.4. Probe Message
PROPLIST:
NAME:"ID",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:<internet-address>
ENDLIST
NAME:"TRANSACTION", INTEGER:<transaction-number>
ENDLIST
NAME:"CMD",
PROPLIST:
NAME:"MAILBOX",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"NET", NAME:<net>
NAME:"HOST", NAME:<host>
NAME:"PORT", NAME:<port>
NAME:"USER", NAME:<user>
NAME:"ORG", NAME:<organization>
NAME:"CITY", NAME:<city>
NAME:"STATE", NAME:<state>
NAME:"COUNTRY", NAME:<country>
NAME:"ZIP", NAME:<zip-code>
NAME:"PHONE", NAME:<phone-number>
<<other-items>>
ENDLIST
NAME:"OPERATION", NAME:"PROBE"
NAME:"TRACE",
LIST:
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"DATE", NAME:<date>
NAME:"ACTION", NAME:<action>
ENDLIST
...
ENDLIST
ENDLIST
ENDLIST
Postel [Page 61]
^L
August 1980
Internet Message Protocol
7.5. Response Message
PROPLIST:
NAME:"ID",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:<internet-address>
ENDLIST
NAME:"TRANSACTION", INTEGER:<transaction-number>
ENDLIST
NAME:"CMD",
PROPLIST:
NAME:"MAILBOX",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"NET", NAME:<net>
NAME:"HOST", NAME:<host>
NAME:"PORT", NAME:<port>
NAME:"USER", NAME:"*MPM*"
ENDLIST
NAME:"OPERATION", NAME:"RESPONSE"
NAME:"REFERENCE",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:<internet-address>
ENDLIST
NAME:"TRANSACTION", INTEGER:<transaction-number>
ENDLIST
NAME:"ADDRESS",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"USER", NAME:<user>
ENDLIST
NAME:"ERROR-CLASS", INDEX:<error-class>
NAME:"ERROR-STRING", NAME:<error-string>
NAME:"TRAIL",
LIST:
PROPLIST:
NAME:"MPM",
PROPLIST:
[Page 62] Postel
^L
August 1980
Internet Message Protocol
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"DATE", NAME:<date>
NAME:"ACTION", NAME:<action>
ENDLIST
...
ENDLIST
NAME:"TRACE",
LIST:
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"DATE", NAME:<date>
NAME:"ACTION", NAME:<action>
ENDLIST
...
ENDLIST
ENDLIST
ENDLIST
Postel [Page 63]
^L
August 1980
Internet Message Protocol
7.6. Cancel Message
PROPLIST:
NAME:"ID",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:<internet-address>
ENDLIST
NAME:"TRANSACTION", INTEGER:<transaction-number>
ENDLIST
NAME:"CMD",
PROPLIST:
NAME:"MAILBOX",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"NET", NAME:<net>
NAME:"HOST", NAME:<host>
NAME:"PORT", NAME:<port>
NAME:"USER", NAME:<user>
NAME:"ORG", NAME:<organization>
NAME:"CITY", NAME:<city>
NAME:"STATE", NAME:<state>
NAME:"COUNTRY", NAME:<country>
NAME:"ZIP", NAME:<zip-code>
NAME:"PHONE", NAME:<phone-number>
<<other-items>>
ENDLIST
NAME:"OPERATION", NAME:"CANCEL"
NAME:"REFERENCE",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:<internet-address>
ENDLIST
NAME:"TRANSACTION", INTEGER:<transaction-number>
ENDLIST
NAME:"TRACE",
LIST:
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"DATE", NAME:<date>
[Page 64] Postel
^L
August 1980
Internet Message Protocol
NAME:"ACTION", NAME:<action>
ENDLIST
...
ENDLIST
ENDLIST
ENDLIST
Postel [Page 65]
^L
August 1980
Internet Message Protocol
7.7. Canceled Message
PROPLIST:
NAME:"ID",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:<internet-address>
ENDLIST
NAME:"TRANSACTION", INTEGER:<transaction-number>
ENDLIST
NAME:"CMD",
PROPLIST:
NAME:"MAILBOX",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"NET", NAME:<net>
NAME:"HOST", NAME:<host>
NAME:"PORT", NAME:<port>
NAME:"USER", NAME:"*MPM*"
ENDLIST
NAME:"OPERATION", NAME:"CANCELED"
NAME:"REFERENCE",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", NAME:<internet-address>
ENDLIST
NAME:"TRANSACTION", INTEGER:<transaction-number>
ENDLIST
NAME:"ADDRESS",
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"USER", NAME:<user>
ENDLIST
NAME:"ERROR-CLASS", INDEX:<error-class>
NAME:"ERROR-STRING", NAME:<error-string>
NAME:"TRAIL",
LIST:
PROPLIST:
NAME:"MPM",
PROPLIST:
[Page 66] Postel
^L
August 1980
Internet Message Protocol
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"DATE", NAME:<date>
NAME:"ACTION", NAME:<action>
ENDLIST
...
ENDLIST
NAME:"TRACE",
LIST:
PROPLIST:
NAME:"MPM",
PROPLIST:
NAME:"IA", INTEGER:<internet-address>
ENDLIST
NAME:"DATE", NAME:<date>
NAME:"ACTION", NAME:<action>
ENDLIST
...
ENDLIST
ENDLIST
ENDLIST
Postel [Page 67]
^L
August 1980
Internet Message Protocol
7.8. Data Element Summary
CODE NAME STRUCTURE LENGTH
---- ---- --------- ------
0 NOP CODE(1) 1
1 PAD CODE(1),COUNT(3),DATA(C) C+4
2 BOOLEAN CODE(1),TRUE-FALSE(1) 2
3 INDEX CODE(1),INDEX(2) 3
4 INTEGER CODE(1),INTEGER(4) 5
5 EPI CODE(1),COUNT(3),INTEGER(C) C+4
6 BITSTR CODE(1),COUNT(3),BITS(C/8) C/8+4
7 NAME CODE(1),COUNT(1),NAME(C) C+2
8 TEXT CODE(1),COUNT(3),TEXT(C) C+4
9 LIST CODE(1),COUNT(3),ITEMS(2),DATA(C-2) C+4
10 PROPLIST CODE(1),COUNT(3),PAIRS(1),DATA(C-1) C+4
11 ENDLIST CODE(1) 1
12 S-TAG CODE(1),INDEX(2) 3
13 S-REF CODE(1),INDEX(2) 3
14 ENCRYPT CODE(1),COUNT(3),ALG-ID(1),
KEY-ID(2),DATA(C-3) C+4
The numbers in parentheses are the number of octets in the field.
[Page 68] Postel
^L
August 1980
Internet Message Protocol
REFERENCES
[1] Cerf, V., "The Catenet Model for Internetworking," Information
Processing Techniques Office, Defense Advanced Research Projects
Agency, IEN 48, July 1978.
[2] Postel, J., "DOD Standard Internet Protocol," USC/Information
Sciences Institute, IEN 128, NTIS number AD A079730, January 1980.
[3] Postel, J., "DOD Standard Transmission Control Protocol,"
USC/Information Sciences Institute, IEN 129, NTIS number AD
A082609, January 1980.
[4] Postel, J., "Assigned Numbers," RFC 762, USC/Information Sciences
Institute, January 1980.
[5] Feinler, E. and J. Postel, eds., "ARPANET Protocol Handbook,"
NIC 7104, for the Defense Communications Agency by the Network
Information Center of SRI International, Menlo Park, California,
Revised January 1978.
[6] Neigus, N., "File Transfer Protocol for the ARPA Network,"
RFC 542, NIC 17759, SRI International, August 1973.
[7] Bhushan, A., K. Progran, R. Tomlinson, and J. White,
"Standardizing Network Mail Headers," RFC 561, NIC 18516,
September 1973.
[8] Myer, T., and D. Henderson, "Message Transmission Protocol,"
RFC 680, NIC 32116, 30 April 1975.
[9] Crocker, D., J. Vittal, K. Progran, and D. Henderson, "Standard
for the Format of ARPA Network Text Messages," RFC 733, NIC 41952,
21 November 1977.
[10] Barber, D., and J. Laws, "A Basic Mail Scheme for EIN," INWG 192,
February 1979.
[11] Braaten, O., "Introduction to a Mail Protocol," Norwegian
Computing Center, INWG 180, August 1978.
[12] Crocker, D., E. Szurkowski, and D. Farber, "An Internetwork Memo
Distribution Capability - MMDF," Sixth Data Communications
Symposium, ACM/IEEE, November 1979.
Postel [Page 69]
^L
August 1980
Internet Message Protocol
References
[13] Haverty, J., D. Henderson, and D. Oestreicher, "Proposed
Specification of an Inter-site Message Protocol," 8 July 1975.
[14] Thomas, R., "Providing Mail Services for NSW Users," BBN NSW
Working Note 24, Bolt Beranek and Newman, October 1978.
[15] White, J., "A Proposed Mail Protocol," RFC 524, NIC 17140, SRI
International, 13 June 1973.
[16] White, J., "Description of a Multi-Host Journal," NIC 23144, SRI
International, 30 May 1974.
[17] White, J., "Journal Subscription Service," NIC 23143, SRI
International, 28 May 1974.
[18] Levin, R., and M. Schroeder, "Transport of Electronic Messages
Through a Network," Teleinformatics 79, Boutmy & Danthine (eds.)
North Holland Publishing Co., 1979.
[19] Earnest, L., and J. McCarthy, "DIALNET: A Computer Communications
Study," Computer Science Department, Stanford University, August
1978.
[20] Crispin M., "DIALNET: A Telephone Network Data Communications
Protocol," DECUS Proceedings, Fall 1979.
[21] Caulkins, D., "The Personal Computer Network (PCNET) Project: A
Status Report," Dr. Dobbs Journal of Computer Calisthenics and
Orthodontia, v.5, n.6, June 1980.
[22] Postel, J., "NSW Transaction Protocol (NSWTP)," USC/Information
Sciences Institute, IEN 38, May 1978.
[23] Haverty, J., "MSDTP -- Message Services Data Transmission
Protocol," RFC 713, NIC 34739, April 1976.
[24] Haverty, J., "Thoughts on Interactions in Distributed Services,"
RFC 722, NIC 36806, 16 September 1976.
[25] Postel, J., "A Structured Format for Transmission of Multi-Media
Documents," RFC 767, USC/Information Sciences Institute,
August 1980.
[26] ISO-2014, "Writing of calendar dates in all-numeric form,"
Recommendation 2014, International Organization for
Standardization, 1975.
[Page 70] Postel
^L
August 1980
Internet Message Protocol
References
[27] ISO-3307, "Information Interchange -- Representations of time of
the day," Recommendation 3307, International Organization for
Standardization, 1975.
[28] ISO-4031, "Information Interchange -- Representation of local time
differentials," Recommendation 4031, International Organization
for Standardization, 1978.
[29] CCITT-X.121, "International Numbering Plan for Public Data
Networks," Recommendation X.121, CCITT, Geneva, 1978.
[30] Postel, J., "NSW Data Representation (NSWB8)," USC/Information
Sciences Institute, IEN 39, May 1978.
[31] Cohen, D., "On Holy Wars and a Plea for Peace," IEN 137,
USC/Information Sciences Institute, 1 April 1980.
[32] Hofstadter, D., "Godel, Escher, Bach: An Eternal Golden Braid,"
Basic Books, New York, 1979..
[33] Harrenstien, K., "Field Addressing," ARPANET Message, SRI
International, October 1977.
[34] Postel, J., "Out-of-Net Host Address for Mail," RFC 754,
USC/Information Sciences Institute, April 1979.
[35] Shoch, J., "On Inter-Network Naming, Addressing, and Routing,"
IEEE Computer Society, COMPCON, Fall 1978.
[36] National Bureau of Standards, "Data Encryption Standard," Federal
Information Processing Standards Publication 46, January 1977.
[37] Diffie, W., and M. Hellman, "New Directions in Cryptology," IEEE
Transactions on Information Theory, IT-22, 6, November 1976.
[38] Rivest, R., A. Shamir, and L. Adleman, "A Method for Obtaining
Digital Signatures and Public-Key Cryptosystems" Communications
of the ACM, Vol. 21, Number 2, February 1978.
[39] Merkle, R., and M. Hellman, "Hiding Information and Signatures in
Trapdoor Knapsacks," IEEE Transactions of Information Theory,
IT-24,5, September 1978.
Postel [Page 71]
^L
|