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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>OfflineIMAP Manual</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"></HEAD
><BODY
CLASS="REFERENCE"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="REFERENCE"
><A
NAME="AEN1"
></A
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="TITLE"
>I. OfflineIMAP Manual</H1
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
><A
HREF="#AEN3"
>offlineimap</A
> -- Powerful IMAP/Maildir synchronization
and reader support</DT
></DL
></DIV
></DIV
><H1
><A
NAME="AEN3"
></A
>offlineimap</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN15"
></A
><H2
>Name</H2
>OfflineIMAP -- Powerful IMAP/Maildir synchronization
and reader support</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN18"
></A
><H2
>Synopsis</H2
><P
><B
CLASS="COMMAND"
>offlineimap</B
> [-1] [-P <TT
CLASS="REPLACEABLE"
><I
>profiledir</I
></TT
>] [-a <TT
CLASS="REPLACEABLE"
><I
>accountlist</I
></TT
>] [-c <TT
CLASS="REPLACEABLE"
><I
>configfile</I
></TT
>] [-d <TT
CLASS="REPLACEABLE"
><I
>debugtype[,...]</I
></TT
>] [-l <TT
CLASS="REPLACEABLE"
><I
>filename</I
></TT
>] [-o] [-u <TT
CLASS="REPLACEABLE"
><I
>interface</I
></TT
>]</P
><P
><B
CLASS="COMMAND"
>offlineimap</B
> -h | --help </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN40"
></A
><H2
>Description</H2
><P
><SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> is a tool to simplify your e-mail
reading. With <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>, you can read the same mailbox
from multiple computers. You get a current copy of your
messages on each computer, and changes you make one place will be
visible on all other systems. For instance, you can delete a message
on your home computer, and it will appear deleted on your work
computer as well. <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> is also useful if you want to
use a mail reader that does not have IMAP support, has poor IMAP
support, or does not provide disconnected operation.
</P
><P
><SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> is <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>FAST</I
></SPAN
>; it synchronizes
my two accounts with over 50 folders in 3 seconds. Other
similar tools might take over a minute, and achieve a
less-reliable result. Some mail readers can take over 10
minutes to do the same thing, and some don't even support it
at all. Unlike other mail tools, <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> features a
multi-threaded synchronization algorithm that can dramatically
speed up performance in many situations by synchronizing
several different things simultaneously.
</P
><P
><SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> is <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>FLEXIBLE</I
></SPAN
>; you can
customize which folders are synced via regular expressions,
lists, or Python expressions; a versatile and comprehensive
configuration file is used to control behavior; two user
interfaces are built-in; fine-tuning of synchronization
performance is possible; internal or external automation is
supported; SSL and PREAUTH tunnels are both supported; offline
(or "unplugged") reading is supported; and esoteric IMAP
features are supported to ensure compatibility with the widest
variety of IMAP servers.
</P
><P
><SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> is <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>SAFE</I
></SPAN
>; it uses an
algorithm designed to prevent mail loss at all costs. Because
of the design of this algorithm, even programming errors
should not result in loss of mail. I am so confident in the
algorithm that I use my own personal and work accounts for
testing of <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> pre-release, development, and beta
releases. Of course, legally speaking, <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> comes
with no warranty, so I am not responsible if this turns out
to be wrong.
</P
><DIV
CLASS="REFSECT2"
><A
NAME="AEN58"
></A
><H3
>Method of Operation</H3
><P
><SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> traditionally
operates by maintaining a hierarchy of
mail folders in Maildir format locally. Your own mail
reader will read mail from this tree, and need never know
that the mail comes from IMAP. <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> will detect
changes to the mail folders on your IMAP server and your own
computer and bi-directionally synchronize them, copying,
marking, and deleting messages as necessary.
</P
><P
> With <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> 4.0, a powerful new ability has been
introduced -- the program can now synchronize two IMAP
servers with each other, with no need to have a Maildir
layer in-between. Many people use this if they use a mail
reader on their local machine that does not support
Maildirs. People may install an IMAP server on their local
machine, and point both <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> and their mail reader
of choice at it. This is often preferable to the mail
reader's own IMAP support since <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> supports many
features (offline reading, for one) that most IMAP-aware
readers don't. However, this feature is not as time-tested
as traditional syncing, so my advice is to stick with normal
methods of operation for the time being.
</P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN67"
></A
><H2
>Quick Start</H2
><P
>If you have already installed <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> system-wide,
or your system administrator has done that for you, your task
for setting up <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> for the first time is quite
simple. You just need to set up your configuration file, make
your folder directory, and run it!
</P
><P
>You can quickly set up your configuration file. The distribution
includes a file <TT
CLASS="FILENAME"
>offlineimap.conf.minimal</TT
>
(Debian users
may find this at
<TT
CLASS="FILENAME"
>/usr/share/doc/offlineimap/examples/offlineimap.conf.minimal</TT
>) that is a basic example of setting of <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>. You can
simply copy this file into your home directory and name it
<TT
CLASS="FILENAME"
>.offlineimaprc</TT
> (note the leading period). A
command such as <B
CLASS="COMMAND"
>cp offlineimap.conf.minimal ~/.offlineimaprc</B
> will do it. Or, if you prefer, you can just copy this text to
<TT
CLASS="FILENAME"
>~/.offlineimaprc</TT
>:
</P
><PRE
CLASS="PROGRAMLISTING"
>[general]
accounts = Test
[Account Test]
localrepository = Local
remoterepository = Remote
[Repository Local]
type = Maildir
localfolders = ~/Test
[Repository Remote]
type = IMAP
remotehost = examplehost
remoteuser = jgoerzen</PRE
><P
>Now, edit the <TT
CLASS="FILENAME"
>~/.offlineimaprc</TT
> file with
your favorite editor. All you have to do is specify a directory
for your folders to be in (on the <SPAN
CLASS="PROPERTY"
>localfolders</SPAN
>
line), the host name of your IMAP server (on the
<SPAN
CLASS="PROPERTY"
>remotehost</SPAN
> line), and your login name on
the remote (on the <SPAN
CLASS="PROPERTY"
>remoteuser</SPAN
> line). That's
it!</P
><P
>To run <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>, you just have to say
<B
CLASS="COMMAND"
>offlineimap</B
> -- it will fire up, ask you for
a login password if necessary, synchronize your folders, and exit.
See? You can just throw away the rest of this finely-crafted,
perfectly-honed manual! Of course, if you want to see how you can
make <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> FIVE TIMES FASTER FOR JUST $19.95 (err, well,
$0), you have to read on!
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN89"
></A
><H2
>Installation</H2
><P
>If you are reading this document via the "man" command, it is
likely
that you have no installation tasks to perform; your system
administrator has already installed it. If you need to install it
yourself, you have three options: a system-wide installation with
Debian, system-wide installation with other systems, and a single-user
installation. You can download the latest version of <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> from
<A
HREF="http://quux.org/devel/offlineimap/"
TARGET="_top"
>the <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>
website</A
>.
</P
><DIV
CLASS="REFSECT2"
><A
NAME="AEN95"
></A
><H3
>Prerequisites</H3
><P
>In order to use <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>, you need to have these conditions
satisfied:
</P
><P
></P
><UL
><LI
><P
>Your mail server must support IMAP. Most Internet Service
Providers
and corporate networks do, and most operating systems
have an IMAP
implementation readily available.
</P
></LI
><LI
><P
> You must have Python version 2.2.1 or above installed.
If you are
running on Debian GNU/Linux, this requirement will automatically be
taken care of for you. If you do not have Python already, check with
your system administrator or operating system vendor; or, download it from
<A
HREF="http://www.python.org/"
TARGET="_top"
>the Python website</A
>.
If you intend to use the Tk interface, you must have Tkinter
(python-tk) installed. If you intend to use the SSL interface, your
Python must have been built with SSL support.
</P
></LI
><LI
><P
> Have a mail reader that supports the Maildir mailbox
format. Most modern mail readers have this support
built-in, so you can choose from a wide variety of mail
servers. This format is also known as the "qmail"
format, so any mail reader compatible with it will work
with <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>. If you do not have a mail reader
that supports Maildir, you can often install a local
IMAP server and point both <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> and your mail
reader at it.
</P
></LI
></UL
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN109"
></A
><H3
>System-Wide Installation, Debian</H3
><P
> If you are tracking Debian unstable, you may install
<SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> by simply running the following command as root:
</P
><P
> <B
CLASS="COMMAND"
>apt-get install offlineimap</B
>
</P
><P
> If you are not tracking Debian unstable, download the Debian .deb
package from the <A
HREF="http://quux.org/devel/offlineimap/"
TARGET="_top"
><SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> website</A
>
and then run <B
CLASS="COMMAND"
>dpkg -i</B
> to install the downloaded
package. Then, skip to <A
HREF="#CONFIGURATION"
><I
>Configuration</I
></A
> below. You will type <B
CLASS="COMMAND"
>offlineimap</B
> to
invoke the program.
</P
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN121"
></A
><H3
>System-Wide Installation, Other</H3
><P
> Download the tar.gz version of the package from the
<A
HREF="http://quux.org/devel/offlineimap/"
TARGET="_top"
>website</A
>.
Then run
these commands, making sure that you are the "root" user first:
</P
><PRE
CLASS="PROGRAMLISTING"
>tar -zxvf offlineimap_x.y.z.tar.gz
cd offlineimap-x.y.z
python2.2 setup.py install</PRE
><P
>On some systems, you will need to use
<B
CLASS="COMMAND"
>python</B
> instead of <B
CLASS="COMMAND"
>python2.2</B
>.
Next, proceed to <A
HREF="#CONFIGURATION"
><I
>Configuration</I
></A
> below. You will type <B
CLASS="COMMAND"
>offlineimap</B
> to
invoke the program.
</P
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN131"
></A
><H3
>Single-Account Installation</H3
><P
> Download the tar.gz version of the package from the
<A
HREF="http://quux.org/devel/offlineimap/"
TARGET="_top"
>website</A
>.
Then run these commands:
</P
><PRE
CLASS="PROGRAMLISTING"
>tar -zxvf offlineimap_x.y.z.tar.gz
cd offlineimap-x.y.z</PRE
><P
>When you want to run <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>, you will issue the
<B
CLASS="COMMAND"
>cd</B
> command as above and then type
<B
CLASS="COMMAND"
>./offlineimap.py</B
>; there is no installation
step necessary.
</P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="CONFIGURATION"
></A
><H2
>Configuration</H2
><P
> <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> is regulated by a configuration file that is normally
stored in <TT
CLASS="FILENAME"
>~/.offlineimaprc</TT
>. <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>
ships with a file named <TT
CLASS="FILENAME"
>offlineimap.conf</TT
>
that you should copy to that location and then edit. This file is
vital to proper operation of the system; it sets everything you need
to run <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>. Full documentation for the configuration file
is included within the sample file.
</P
><P
> <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> also ships a file named
<TT
CLASS="FILENAME"
>offlineimap.conf.minimal</TT
> that you can also try.
It's useful if you want to get started with
the most basic feature set, and you can read about other features
later with <TT
CLASS="FILENAME"
>offlineimap.conf</TT
>.
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN152"
></A
><H2
>Options</H2
><P
> Most configuration is done via the configuration file. Nevertheless,
there are a few command-line options that you may set for
<SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>.
</P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>-1</DT
><DD
><P
>Disable most multithreading operations and use
solely a single-connection
sync. This effectively sets the
<SPAN
CLASS="PROPERTY"
>maxsyncaccounts</SPAN
>
and all <SPAN
CLASS="PROPERTY"
>maxconnections</SPAN
> configuration file
variables to 1.
</P
></DD
><DT
>-P <TT
CLASS="REPLACEABLE"
><I
>profiledir</I
></TT
></DT
><DD
><P
>Sets <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> into profile mode. The program
will create <TT
CLASS="REPLACEABLE"
><I
>profiledir</I
></TT
>
(it must not already exist). As it runs, Python profiling
information
about each thread is logged into profiledir. Please note: This option
is present for debugging and optimization only, and should NOT be used
unless you have a specific reason to do so. It will significantly
slow program performance, may reduce reliability, and can generate
huge amounts of data. You must use the <CODE
CLASS="OPTION"
>-1</CODE
> option when
you use <CODE
CLASS="OPTION"
>-P</CODE
>.
</P
></DD
><DT
>-a <TT
CLASS="REPLACEABLE"
><I
>accountlist</I
></TT
></DT
><DD
><P
>Overrides the <SPAN
CLASS="PROPERTY"
>accounts</SPAN
> option
in the <SPAN
CLASS="PROPERTY"
>general</SPAN
> section of the configuration
file. You might use this to exclude certain accounts, or to sync
some accounts that you normally prefer not to. Separate the
accounts by commas, and use no embedded spaces.
</P
></DD
><DT
>-c <TT
CLASS="REPLACEABLE"
><I
>configfile</I
></TT
></DT
><DD
><P
>Specifies a configuration file to use in lieu of
the default, <TT
CLASS="FILENAME"
>~/.offlineimaprc</TT
>.
</P
></DD
><DT
>-d <TT
CLASS="REPLACEABLE"
><I
>debugtype[,...]</I
></TT
></DT
><DD
><P
>Enables debugging for OfflineIMAP. This is useful if
you are trying to track down a malfunction or figure out what is going
on under the hood. I suggest that you use this with
<CODE
CLASS="OPTION"
>-1</CODE
> to make the results more sensible.</P
><P
><CODE
CLASS="OPTION"
>-d</CODE
> requires one or more debugtypes,
separated by commas. These define what exactly will be
debugged, and include three options: <SPAN
CLASS="PROPERTY"
>imap</SPAN
>,
<SPAN
CLASS="PROPERTY"
>maildir</SPAN
>, and <SPAN
CLASS="PROPERTY"
>thread</SPAN
>.
The <SPAN
CLASS="PROPERTY"
>imap</SPAN
>
option will enable IMAP protocol stream and parsing debugging. Note
that the output may contain passwords, so take care to remove that
from the debugging output before sending it to anyone else. The
<SPAN
CLASS="PROPERTY"
>maildir</SPAN
> option will enable debugging for
certain Maildir operations. And <SPAN
CLASS="PROPERTY"
>thread</SPAN
>
will debug the threading model.
</P
></DD
><DT
>-l
<TT
CLASS="REPLACEABLE"
><I
>filename</I
></TT
></DT
><DD
><P
> Enables logging to filename. This will log everything
that goes to the screen to the specified file.
Additionally, if any debugging is specified with -d,
then debug messages will not go to the screen, but
instead to the logfile only.</P
></DD
><DT
>-o</DT
><DD
><P
>Run only once, ignoring all
<SPAN
CLASS="PROPERTY"
>autorefresh</SPAN
> settings in the configuration
file.</P
></DD
><DT
>-h, --help</DT
><DD
><P
>Show summary of options.</P
></DD
><DT
>-u <TT
CLASS="REPLACEABLE"
><I
>interface</I
></TT
></DT
><DD
><P
>Specifies an alternative user interface module
to use. This overrides the default specified in the
configuration file. The pre-defined options are listed in
the User Interfaces section.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN219"
></A
><H2
>User Interfaces</H2
><P
><SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> has a pluggable user interface system that lets you choose how the
program communicates information to you. There are two graphical
interfaces, two terminal interfaces, and two noninteractive interfaces
suitable for scripting or logging purposes. The
<SPAN
CLASS="PROPERTY"
>ui</SPAN
> option in the configuration file specifies
user interface preferences. The <CODE
CLASS="OPTION"
>-u</CODE
> command-line
option can override the configuration file setting. The available
values for the configuration file or command-line are described
in this section.</P
><DIV
CLASS="REFSECT2"
><A
NAME="AEN225"
></A
><H3
>Tk.Blinkenlights</H3
><P
>Tk.Blinkenlights is an interface designed to be sleek, fun to watch, and
informative of the overall picture of what <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>
is doing. I consider it to be the best general-purpose interface in
<SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>.
</P
><P
> Tk.Blinkenlights contains, by default, a small window with a row of
LEDs, a small log, and a row of command buttons.
The total size of the window is
very small, so it uses little desktop space, yet it is quite
functional. The optional, toggleable, log shows more
detail about what is happening and is color-coded to match the color
of the lights.
</P
><P
> Tk.Blinkenlights is the only user interface that has configurable
parameters; see the example <TT
CLASS="FILENAME"
>offlineimap.conf</TT
>
for more details.
</P
><P
> Each light in the Blinkenlights interface represents a thread
of execution -- that is, a particular task that <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>
is performing right now. The colors indicate what task
the particular thread is performing, and are as follows:
</P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>Black</DT
><DD
><P
>indicates that this light's thread has terminated; it will light up
again later when new threads start up. So, black indicates no
activity.
</P
></DD
><DT
>Red (Meaning 1)</DT
><DD
><P
>is the color of the main program's thread, which basically does
nothing but monitor the others. It might remind you of HAL 9000 in
[<SPAN
CLASS="CITATION"
>2001</SPAN
>].
</P
></DD
><DT
>Gray</DT
><DD
><P
>indicates that the thread is establishing a new connection to the IMAP
server.
</P
></DD
><DT
>Purple</DT
><DD
><P
>is the color of an account synchronization thread that is monitoring
the progress of the folders in that account (not generating any I/O).
</P
></DD
><DT
>Cyan</DT
><DD
><P
>indicates that the thread is syncing a folder.
</P
></DD
><DT
>Green</DT
><DD
><P
>means that a folder's message list is being loaded.
</P
></DD
><DT
>Blue</DT
><DD
><P
>is the color of a message synchronization controller thread.
</P
></DD
><DT
>Orange</DT
><DD
><P
>indicates that an actual message is being copied.
(We use fuchsia for fake messages.)
</P
></DD
><DT
>Red (meaning 2)</DT
><DD
><P
>indicates that a message is being deleted.
</P
></DD
><DT
>Yellow / bright orange</DT
><DD
><P
>indicates that message flags are being added.
</P
></DD
><DT
>Pink / bright red</DT
><DD
><P
>indicates that message flags are being removed.
</P
></DD
><DT
>Red / Black Flashing</DT
><DD
><P
>corresponds to the countdown timer that runs between
synchronizations.
</P
></DD
></DL
></DIV
><P
>The name of this interfaces derives from a bit of computer
history. Eric Raymond's [<SPAN
CLASS="CITATION"
>Jargon File</SPAN
>] defines
<I
CLASS="FIRSTTERM"
>blinkenlights</I
>, in part, as:
</P
><A
NAME="AEN288"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><P
>Front-panel diagnostic
lights on a computer, esp. a dinosaur. Now that dinosaurs are rare,
this term usually refers to status lights on a modem, network hub, or
the like.
</P
><P
> This term derives from the last word of the famous blackletter-Gothic
sign in mangled pseudo-German that once graced about half the computer
rooms in the English-speaking world. One version ran in its entirety as
follows:
</P
><P
> <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>ACHTUNG! ALLES LOOKENSPEEPERS!</I
></SPAN
>
</P
><P
> Das computermachine ist nicht fuer gefingerpoken und mittengrabben.
Ist easy schnappen der springenwerk, blowenfusen und poppencorken
mit spitzensparken. Ist nicht fuer gewerken bei das dumpkopfen.
Das rubbernecken sichtseeren keepen das cotten-pickenen hans in das
pockets muss; relaxen und watchen das blinkenlichten.
</P
></BLOCKQUOTE
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN294"
></A
><H3
>Curses.Blinkenlights</H3
><P
> Curses.Blinkenlights is an interface very similar to Tk.Blinkenlights,
but is designed to be run in a console window (an xterm, Linux virtual
terminal, etc.) Since it doesn't have access to graphics, it isn't
quite as pretty, but it still gets the job done.
</P
><P
>Please see the Tk.Blinkenlights section above for more
information about the colors used in this interface.
</P
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN298"
></A
><H3
>Tk.VerboseUI</H3
><P
> Tk.VerboseUI (formerly known as Tk.TkUI) is a graphical interface
that presents a variable-sized window. In the window, each
currently-executing thread has a section where its name and current
status are displayed. This interface is best suited to people running
on slower connections, as you get a lot of detail, but for fast
connections, the detail may go by too quickly to be useful. People
with fast connections may wish to use Tk.Blinkenlights instead.
</P
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN301"
></A
><H3
>TTY.TTYUI</H3
><P
> TTY.TTYUI interface is for people running in basic, non-color terminals. It
prints out basic status messages and is generally friendly to use on a console
or xterm.
</P
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN304"
></A
><H3
>Noninteractive.Basic</H3
><P
> Noninteractive.Basic is designed for situations in which <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>
will be run non-attended and the status of its execution will be
logged. You might use it, for instance, to have the system run
automatically and
e-mail you the results of the synchronization. This user interface
is not capable of reading a password from the keyboard; account
passwords must be specified using one of the configuration file options.
</P
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN308"
></A
><H3
>Noninteractive.Quiet</H3
><P
> Noninteractive.Quiet is designed for non-attended running in situations
where normal status messages are not desired. It will output nothing
except errors and serious warnings. Like Noninteractive.Basic,
this user interface
is not capable of reading a password from the keyboard; account
passwords must be specified using one of the configuration file options.
</P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN311"
></A
><H2
>Examples</H2
><P
>Here are some example configurations for various situations.
Please e-mail any other examples you have that may be useful to
me.
</P
><DIV
CLASS="REFSECT2"
><A
NAME="AEN314"
></A
><H3
>Multiple Accounts with Mutt</H3
><P
> This example shows you how to set up <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> to
synchronize multiple accounts with the mutt mail reader.
</P
><P
> Start by creating a directory to hold your folders by running
<B
CLASS="COMMAND"
>mkdir ~/Mail</B
>. Then, in your
<TT
CLASS="FILENAME"
>~/.offlineimaprc</TT
>, specify:
</P
><PRE
CLASS="PROGRAMLISTING"
>accounts = Personal, Work</PRE
><P
> Make sure that you have both an
<SPAN
CLASS="PROPERTY"
>[Account Personal]</SPAN
>
and an <SPAN
CLASS="PROPERTY"
>[Account Work]</SPAN
> section. The
local repository for each account must have different
<SPAN
CLASS="PROPERTY"
>localfolder</SPAN
> path names.
Also, make sure
to enable <SPAN
CLASS="PROPERTY"
>[mbnames]</SPAN
>.
</P
><P
> In each local repository section, write something like this:
</P
><PRE
CLASS="PROGRAMLISTING"
>localfolders = ~/Mail/Personal</PRE
><P
> Finally, add these lines to your <TT
CLASS="FILENAME"
>~/.muttrc</TT
>:
</P
><PRE
CLASS="PROGRAMLISTING"
>source ~/path-to-mbnames-muttrc-mailboxes
folder-hook Personal set from="youremail@personal.com"
folder-hook Work set from="youremail@work.com"
set mbox_type=Maildir
set folder=$HOME/Mail
spoolfile=+Personal/INBOX</PRE
><P
> That's it!
</P
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN333"
></A
><H3
>UW-IMAPD and References</H3
><P
>Some users with a UW-IMAPD server need to use <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>'s
"reference" feature to get at their mailboxes, specifying a reference
of "~/Mail" or "#mh/" depending on the configuration. The below
configuration from (originally from docwhat@gerf.org)
shows using a <SPAN
CLASS="PROPERTY"
>reference</SPAN
> of Mail, a <SPAN
CLASS="PROPERTY"
>nametrans</SPAN
>
that strips
the leading Mail/ off incoming folder names, and a
<SPAN
CLASS="PROPERTY"
>folderfilter</SPAN
> that
limits the folders synced to just three.
</P
><PRE
CLASS="PROGRAMLISTING"
>[Account Gerf]
localrepository = GerfLocal
remoterepository = GerfRemote
[Repository GerfLocal]
type = Maildir
localfolders = ~/Mail
[Repository GerfRemote]
type = IMAP
remotehost = gerf.org
ssl = yes
remoteuser = docwhat
reference = Mail
# Trims off the preceeding Mail on all the folder names.
nametrans = lambda foldername: \
re.sub('^Mail/', '', foldername)
# Yeah, you have to mention the Mail dir, even though it
# would seem intuitive that reference would trim it.
folderfilter = lambda foldername: foldername in [
'Mail/INBOX',
'Mail/list/zaurus-general',
'Mail/list/zaurus-dev',
]
maxconnections = 1
holdconnectionopen = no</PRE
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN341"
></A
><H3
>pythonfile Configuration File Option</H3
><P
>You can have <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>
load up a Python file before evaluating the
configuration file options that are Python expressions. This example
is based on one supplied by Tommi Virtanen for this feature.
</P
><P
> In <TT
CLASS="FILENAME"
>~/.offlineimap.rc</TT
>, he adds these options:
</P
><PRE
CLASS="PROGRAMLISTING"
>[general]
pythonfile=~/.offlineimap.py
[Repository foo]
foldersort=mycmp</PRE
><P
> Then, the <TT
CLASS="FILENAME"
>~/.offlineimap.py</TT
> file will
contain:
</P
><PRE
CLASS="PROGRAMLISTING"
>prioritized = ['INBOX', 'personal', 'announce', 'list']
def mycmp(x, y):
for prefix in prioritized:
xsw = x.startswith(prefix)
ysw = y.startswith(prefix)
if xsw and ysw:
return cmp(x, y)
elif xsw:
return -1
elif ysw:
return +1
return cmp(x, y)
def test_mycmp():
import os, os.path
folders=os.listdir(os.path.expanduser('~/data/mail/tv@hq.yok.utu.fi'))
folders.sort(mycmp)
print folders</PRE
><P
> This code snippet illustrates how the <SPAN
CLASS="PROPERTY"
>foldersort</SPAN
>
option can be customized with a Python function from the
<SPAN
CLASS="PROPERTY"
>pythonfile</SPAN
> to always synchronize certain
folders first.
</P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN354"
></A
><H2
>Errors</H2
><P
> If you get one of some frequently-encountered or confusing errors,
please check this section.
</P
><DIV
CLASS="REFSECT2"
><A
NAME="AEN357"
></A
><H3
>UID validity problem for folder</H3
><P
>IMAP servers use a unique ID (UID) to refer to a specific message.
This number is guaranteed to be unique to a particular message
<SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>forever</I
></SPAN
>.
No other message in the same folder will ever get the same
UID. UIDs are an integral part of <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>'s synchronization
scheme; they are used to match up messages on your computer to
messages on the server.
</P
><P
> Sometimes, the UIDs on the server might get reset. Usually this will
happen if you delete and then recreate a folder. When you create a
folder, the server will often start the UID back from 1. But
<SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> might still have the UIDs from the previous folder by the
same name stored. <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> will detect this condition and skip the
folder. This is GOOD, because it prevents data loss.
</P
><P
> You can fix it by removing your local folder and cache data. For
instance, if your folders are under <TT
CLASS="FILENAME"
>~/Folders</TT
>
and the folder with the problem is INBOX, you'd type this:
</P
><PRE
CLASS="PROGRAMLISTING"
>rm -r ~/Folders/INBOX
rm -r ~/.offlineimap/Account-<TT
CLASS="REPLACEABLE"
><I
>AccountName</I
></TT
>
rm -r ~/.offlineimap/Repository-<TT
CLASS="REPLACEABLE"
><I
>RepositoryName</I
></TT
></PRE
><P
> (Of course, replace AccountName and RepositoryName
with the names as specified
in <TT
CLASS="FILENAME"
>~/.offlineimaprc</TT
>).
</P
><P
>Next time you run <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>, it will re-download
the folder with the
new UIDs. Note that the procedure specified above will lose any local
changes made to the folder.
</P
><P
> Some IMAP servers are broken and do not support UIDs properly. If you
continue to get this error for all your folders even after performing
the above procedure, it is likely that your IMAP server falls into
this category. <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> is incompatible with such servers.
Using <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> with them will not destroy any mail, but at the same time,
it will not actually synchronize it either. (<SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> will detect
this condition and abort prior to synchronization.)
</P
><P
> This question comes up frequently on the
<A
HREF="http://lists.complete.org/offlineimap@complete.org/"
TARGET="_top"
><SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>
mailing list</A
>. You can find a
<A
HREF="http://lists.complete.org/offlineimap@complete.org/2003/04/msg00012.html.gz"
TARGET="_top"
>detailed
discussion</A
> of the problem there.
</P
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN382"
></A
><H3
>Use with MS Exchange server</H3
><P
> Several users have reported problems with Microsoft Exchange
servers in conjunction with OfflineIMAP. This generally
seems to be related to the Exchange servers not properly
following the IMAP standards.
</P
><P
> Mark Biggers has posted some <A
HREF="http://lists.complete.org/offlineimap@complete.org/2005/09/msg00011.html.gz"
TARGET="_top"
>information</A
>
to the <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> mailing list about how he made it work.
</P
><P
> Other users have indicated that older (5.5) releases of
Exchange are so bad that they will likely not work at all.
</P
><P
> I do not have access to Exchange servers for testing, so any
problems with it, if they can even be solved at all, will
require help from <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> users to find and fix.
</P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN391"
></A
><H2
>Other Frequently Asked Questions</H2
><P
>There are some other FAQs that might not fit into another section
of the document, so they are discussed here.
</P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>What platforms does <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> run on?</DT
><DD
><P
> It should run on most platforms supported by Python, which are quite a
few. I do not support Windows myself, but some have made
it work there; see the FAQ entry for that platform.
</P
></DD
><DT
>I'm using Mutt. Other IMAP sync programs require me to use "set maildir_trash=yes". Do I need to do that with <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>?</DT
><DD
><P
> No. <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> is smart enough to figure out message deletion without this extra
crutch. You'll get the best results if you don't use this setting, in
fact.
</P
></DD
><DT
>I've upgraded and now <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>
crashes when I start it up! Why?</DT
><DD
><P
>You need to upgrade your configuration
file. See at the end of this
manual.
</P
></DD
><DT
>How do I specify the names of my folders?</DT
><DD
><P
> You do not need to. <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> is smart
enough to automatically figure out what folders are present
on the IMAP server and synchronize them. You can use the
<SPAN
CLASS="PROPERTY"
>folderfilter</SPAN
> and <SPAN
CLASS="PROPERTY"
>nametrans</SPAN
>
configuration file options to request certain folders and rename them
as they come in if you like.
</P
></DD
><DT
>How can I prevent certain folders from being synced?</DT
><DD
><P
> Use the <SPAN
CLASS="PROPERTY"
>folderfilter</SPAN
> option in the configuration file.
</P
></DD
><DT
>How can I add or delete a folder?</DT
><DD
><P
> <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> does not currently provide this feature, but if you create a new
folder on the IMAP server, it will be created locally automatically.
</P
></DD
><DT
>Are there any other warnings that I should be aware of?</DT
><DD
><P
> Yes; see the Notes section below.
</P
></DD
><DT
>What is the mailbox name recorder (mbnames) for?</DT
><DD
><P
>Some mail readers, such as Mutt, are not capable
of automatically determining the names of your mailboxes.
<SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> can help these programs by writing the names
of the folders in a format you specify. See the example
<TT
CLASS="FILENAME"
>offlineimap.conf</TT
> for details.
</P
></DD
><DT
>Can I synchronize multiple accounts with <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>?</DT
><DD
><P
>Sure. Just name them all in the
<SPAN
CLASS="PROPERTY"
>accounts</SPAN
> line in the <SPAN
CLASS="PROPERTY"
>general</SPAN
>
section of the configuration file, and add a per-account section
for each one.
</P
></DD
><DT
>Does <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> support POP?</DT
><DD
><P
>No. POP is not robust enough to do a completely reliable
multi-machine synchronization like <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> can do. <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>
will not support it.
</P
></DD
><DT
>Does <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> support mailbox formats other than Maildir?</DT
><DD
><P
>Not at present. There is no technical reason not to; just no
demand yet. Maildir is a superior format anyway.
However, <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> can sync between two IMAP
servers, and some IMAP servers support other formats. You
could install an IMAP server on your local machine and have
<SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> sync to that.
</P
></DD
><DT
>[technical] Why are your Maildir message filenames so huge?</DT
><DD
><P
><SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> has two relevant principles: 1) never modifying your
messages in any way and 2) ensuring 100% reliable synchronizations.
In order to do a reliable sync, <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>
must have a way to
uniquely identify each e-mail. Three pieces of information are
required to do this: your account name, the folder name, and the
message UID. The account name can be calculated from the path in
which your messages are. The folder name can usually be as well, BUT
some mail clients move messages between folders by simply moving the
file, leaving the name intact.
</P
><P
> So, <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> must store both a UID folder ID. The folder ID is
necessary so <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> can detect a message moved to a different
folder. <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> stores the UID (U= number) and an md5sum of the
foldername (FMD5= number) to facilitate this.
</P
></DD
><DT
>What is the speed of <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>'s sync?</DT
><DD
><P
>OfflineIMAP
versions 2.0 and above contain a multithreaded system. A good way to
experiment is by setting <SPAN
CLASS="PROPERTY"
>maxsyncaccounts</SPAN
> to 3 and <SPAN
CLASS="PROPERTY"
>maxconnections</SPAN
> to 3
in each account clause.
</P
><P
>This lets OfflineIMAP open up multiple connections simultaneously.
That will let it process multiple folders and messages at once. In
most cases, this will increase performance of the sync.
</P
><P
>Don't set the number too high. If you do that, things might actually
slow down as your link gets saturated. Also, too many connections can
cause mail servers to have excessive load. Administrators might take
unkindly to this, and the server might bog down. There are many
variables in the optimal setting; experimentation may help.
</P
><P
>An informal benchmark yields these results for my setup:
</P
><P
></P
><UL
><LI
><P
>10 minutes with MacOS X Mail.app "manual cache"
</P
></LI
><LI
><P
>5 minutes with GNUS agent sync</P
></LI
><LI
><P
>20 seconds with OfflineIMAP 1.x</P
></LI
><LI
><P
>9 seconds with OfflineIMAP 2.x</P
></LI
><LI
><P
>3 seconds with OfflineIMAP 3.x "cold start"</P
></LI
><LI
><P
>2 seconds with OfflineIMAP 3.x "held connection"</P
></LI
></UL
></DD
><DT
>Can I use <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> on Windows?</DT
><DD
><P
> These answers have been reported by <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>
users. I do not run <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> on Windows myself, so
I can't directly address their accuracy.
</P
><P
> The basic answer is that it's possible and doesn't
require hacking <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> source code. However,
it's not necessarily trivial. The information below is
based in instructions submitted by Chris Walker.
</P
><P
> First, you must run <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> in the <A
HREF="http://www.cygwin.com/"
TARGET="_top"
>Cygwin</A
>
environment.
</P
><P
> Next, you'll need to mount your Maildir directory in a
special way. There is information for doing that at
<A
HREF="http://barnson.org/node/view/295"
TARGET="_top"
>http://barnson.org/node/view/295</A
>.
That site gives this example:
</P
><PRE
CLASS="PROGRAMLISTING"
>mount -f -s -b -o managed "d:/tmp/mail" "/home/of/mail"
</PRE
><P
> That URL also has more details on making OfflineIMAP
work with Windows.
</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN509"
></A
><H2
>Conforming To</H2
><P
></P
><UL
><LI
><P
>Internet Message Access Protocol version 4rev1 (IMAP 4rev1) as
specified in RFC2060 and RFC3501</P
></LI
><LI
><P
>CRAM-MD5 as specified in RFC2195</P
></LI
><LI
><P
>Maildir as specified in
<A
HREF="http://www.qmail.org/qmail-manual-html/man5/maildir.html"
TARGET="_top"
>the Maildir manpage</A
> and
<A
HREF="http://cr.yp.to/proto/maildir.html"
TARGET="_top"
>the qmail website</A
>.</P
></LI
><LI
><P
>Standard Python 2.2.1 as implemented on POSIX-compliant systems.</P
></LI
></UL
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN522"
></A
><H2
>Notes</H2
><DIV
CLASS="REFSECT2"
><A
NAME="AEN524"
></A
><H3
>Deleting Local Folders</H3
><P
><SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> does a two-way synchronization. That is, if you
make a change to the mail on the server, it will be propagated to your
local copy, and vise-versa. Some people might think that it would be
wise to just delete all their local mail folders periodically. If you
do this with <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>, remember to also remove your local status
cache (<TT
CLASS="FILENAME"
>~/.offlineimap</TT
> by default). Otherwise, <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> will take
this as an intentional deletion of many messages and will interpret
your action as requesting them to be deleted from the server as well.
(If you don't understand this, don't worry; you probably won't
encounter this situation)
</P
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN531"
></A
><H3
>Multiple Instances</H3
><P
><SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> is not designed to have several instances (for instance, a cron job and an interactive invocation) run over the same
mailbox simultaneously. It will perform a check on startup and
abort if another <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> is already running. If you need
to schedule synchronizations, please use the
<SPAN
CLASS="PROPERTY"
>autorefresh</SPAN
> settings rather than cron.
Alternatively, you can set a separate <SPAN
CLASS="PROPERTY"
>metadata</SPAN
>
directory for each instance.
</P
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN538"
></A
><H3
>Copying Messages Between Folders</H3
><P
> Normally, when you copy a message between folders or add a new message
to a folder locally, <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>
will just do the right thing. However, sometimes this can be tricky
-- if your IMAP server does not provide the SEARCH command, or does
not return something useful, <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>
cannot determine the new UID of the message. So, in these rare
instances, OfflineIMAP will upload the message to the IMAP server and
delete it from your local folder. Then, on your next sync, the
message will be re-downloaded with the proper UID.
<SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> makes sure that the message was properly uploaded before deleting it,
so there should be no risk of data loss.
</P
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN544"
></A
><H3
>Use with Evolution</H3
><P
><SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> can work with Evolution. To do so, first configure
your <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> account to have
<CODE
CLASS="OPTION"
>sep = /</CODE
> in its configuration. Then, configure
Evolution with the
"Maildir-format mail directories" server type. For the path, you will need to
specify the name of the top-level folder
<SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>inside</I
></SPAN
> your <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> storage location.
You're now set!
</P
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN552"
></A
><H3
>Use with KMail</H3
><P
>At this time, I believe that <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> with Maildirs
is not compatible
with KMail. KMail cannot work in any mode other than to move
all messages out of all folders immediately, which (besides being annoying
and fundamentally broken) is incompatible with
<SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>.
</P
><P
> However, I have made KMail version 3 work well with
<SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> by installing an IMAP server on my local
machine, having <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> sync to that, and pointing
KMail at the same server.
</P
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN560"
></A
><H3
>Mailing List</H3
><P
>There is an OfflineIMAP mailing list available.
To subscribe, send the text "Subscribe" in the subject of a mail to
offlineimap-request@complete.org. To post, send the message to
offlineimap@complete.org. Archives are available at
<A
HREF="http://lists.complete.org/offlineimap@complete.org/"
TARGET="_top"
>http://lists.complete.org/offlineimap@complete.org/</A
>.
</P
></DIV
><DIV
CLASS="REFSECT2"
><A
NAME="AEN564"
></A
><H3
>Bugs</H3
><P
>Reports of bugs should be sent via e-mail to the
<SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> mailing list at offlineimap at complete
dot org. Debian users are encouraged to instead use the
Debian
bug-tracking system.
</P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="UPGRADING.4.0"
></A
><H2
>Upgrading to 4.0</H2
><P
> If you are upgrading from a version of <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> prior to
3.99.12, you will find that you will get errors when
<SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> starts up (relating to ConfigParser or
AccountHashGenerator) and the
configuration file. This is because the config file format
had to change to accommodate new features in 4.0. Fortunately,
it's not difficult to adjust it to suit.
</P
><P
> First thing you need to do is stop any running <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>
instance, making sure first that it's synced all your mail.
Then, modify your
<TT
CLASS="FILENAME"
>~/.offlineimaprc</TT
> file. You'll need to
split up each account section (make sure that it now starts
with "Account ") into two Repository sections (one for the
local side and another for the remote side.) See the files
<TT
CLASS="FILENAME"
>offlineimap.conf.minimal</TT
> and
<TT
CLASS="FILENAME"
>offlineimap.conf</TT
> in the distribution if
you need more assistance.
</P
><P
> <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>'s status directory area has also changed.
Therefore, you should delete everything in ~/.offlineimap as
well as your local mail folders.
</P
><P
> When you start up <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> 4.0, it will re-download all
your mail from the server and then you can continue using it
like normal.
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN582"
></A
><H2
>Copyright</H2
><P
>OfflineIMAP, and this manual, are Copyright © 2002, 2003 John Goerzen.</P
><P
> This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
</P
><P
> This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
</P
><P
> You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</P
><P
>imaplib.py comes from the Python dev tree and is licensed under
the GPL-compatible PSF license as stated in the file
<TT
CLASS="FILENAME"
>COPYRIGHT</TT
> in the <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>
distribution.
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN591"
></A
><H2
>Author</H2
><P
><SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>, its libraries, documentation, and all included files, except where
noted, was written by John Goerzen <CODE
CLASS="EMAIL"
><<A
HREF="mailto:jgoerzen@complete.org"
>jgoerzen@complete.org</A
>></CODE
> and
copyright is held as stated in the COPYRIGHT section.
</P
><P
> <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> may be downloaded, and information found, from its
homepage via either <A
HREF="gopher://quux.org/1/devel/offlineimap"
TARGET="_top"
>Gopher</A
>
or <A
HREF="http://quux.org/devel/offlineimap"
TARGET="_top"
>HTTP</A
>.
</P
><P
> <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> may also be downloaded using Subversion. Additionally,
the distributed tar.gz may be updated with a simple "svn update"
command; it is ready to go. For information on getting OfflineIMAP
with Subversion, please visit the
<A
HREF="http://svn.complete.org/"
TARGET="_top"
>complete.org Subversion page</A
>.
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN603"
></A
><H2
>See Also</H2
><P
><SPAN
CLASS="APPLICATION"
>mutt</SPAN
>(1),
<SPAN
CLASS="APPLICATION"
>python</SPAN
>(1)
</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN608"
></A
><H2
>History</H2
><P
> Detailed history may be found in the file ChangeLog in the
<SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> distribution. Feature and bug histories may be
found in the file debian/changelog which, despite its name, is
not really Debian-specific. This section provides a large
overview.
</P
><P
> Development on <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> began on June 18, 2002. Version
1.0.0 was released three days later on June 21, 2002. Point
releases followed, including speed optimizations and some
compatibility fixes.
</P
><P
>Version 2.0.0 was released on July 3, 2002, and
represented the first time the synchronization became
multithreaded and, to the best of my knowledge, the first
multithreaded IMAP syncrhonizing application in existance.
The last 2.0.x release, 2.0.8, was made on July 9.
</P
><P
> Version 3.0.0 was released on July 11, 2002, and introduced
modular user interfaces and the first GUI interface for
<SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
>. This manual also was introduced with 3.0.0,
along with many command-line options. Version 3.1.0 was
released on July 21, adding the Noninteractive user
interfaces, profiling support, and several bugfixes. 3.2.0
was released on July 24, adding support for the Blinkenlights
GUI interface. <SPAN
CLASS="APPLICATION"
>OfflineIMAP</SPAN
> entered maintenance mode for
awhile, as it had reached a feature-complete milestone in my
mind.
</P
><P
> The 3.99.x branch began in on October 7, 2002, to begin work
for 4.0. The Curses.Blinkenlights interface was added in
3.99.6, and many architectural changes were made.
</P
><P
> 4.0.0 was released on July 18, 2003, including the ability to
synchronize directly between two IMAP servers, the first
re-architecting of the configuration file to refine the
notion of an account, and the new Curses interface.
</P
></DIV
></DIV
></BODY
></HTML
>
|