]> code.delx.au - offlineimap/blob - manual.txt
Start moving FAQ to wiki
[offlineimap] / manual.txt
1 OFFLINEIMAP(1) OfflineIMAP Manual OFFLINEIMAP(1)
2
3
4
5 NAME
6 OfflineIMAP - Powerful IMAP/Maildir synchronization and reader support
7
8 SYNOPSIS
9 offlineimap [ -1 ] [ -P profiledir ] [ -a accountlist ] [ -c configfile
10 ] [ -d debugtype[,...] ] [ -l filename ] [ -o ] [ -u interface ]
11
12
13 offlineimap -h | --help
14
15
16 DESCRIPTION
17 OfflineIMAP is a tool to simplify your e-mail reading. With
18 OfflineIMAP, you can read the same mailbox from multiple computers.
19 You get a current copy of your messages on each computer, and changes
20 you make one place will be visible on all other systems. For instance,
21 you can delete a message on your home computer, and it will appear
22 deleted on your work computer as well. OfflineIMAP is also useful if
23 you want to use a mail reader that does not have IMAP support, has poor
24 IMAP support, or does not provide disconnected operation.
25
26 OfflineIMAP is FAST; it synchronizes my two accounts with over 50 fold-
27 ers in 3 seconds. Other similar tools might take over a minute, and
28 achieve a less-reliable result. Some mail readers can take over 10
29 minutes to do the same thing, and some don't even support it at all.
30 Unlike other mail tools, OfflineIMAP features a multi-threaded synchro-
31 nization algorithm that can dramatically speed up performance in many
32 situations by synchronizing several different things simultaneously.
33
34 OfflineIMAP is FLEXIBLE; you can customize which folders are synced via
35 regular expressions, lists, or Python expressions; a versatile and com-
36 prehensive configuration file is used to control behavior; two user
37 interfaces are built-in; fine-tuning of synchronization performance is
38 possible; internal or external automation is supported; SSL and PREAUTH
39 tunnels are both supported; offline (or "unplugged") reading is sup-
40 ported; and esoteric IMAP features are supported to ensure compatibil-
41 ity with the widest variety of IMAP servers.
42
43 OfflineIMAP is SAFE; it uses an algorithm designed to prevent mail loss
44 at all costs. Because of the design of this algorithm, even program-
45 ming errors should not result in loss of mail. I am so confident in
46 the algorithm that I use my own personal and work accounts for testing
47 of OfflineIMAP pre-release, development, and beta releases. Of course,
48 legally speaking, OfflineIMAP comes with no warranty, so I am not
49 responsible if this turns out to be wrong.
50
51 METHOD OF OPERATION
52 OfflineIMAP traditionally operates by maintaining a hierarchy of mail
53 folders in Maildir format locally. Your own mail reader will read mail
54 from this tree, and need never know that the mail comes from IMAP.
55 OfflineIMAP will detect changes to the mail folders on your IMAP server
56 and your own computer and bi-directionally synchronize them, copying,
57 marking, and deleting messages as necessary.
58
59 With OfflineIMAP 4.0, a powerful new ability has been introduced -- the
60 program can now synchronize two IMAP servers with each other, with no
61 need to have a Maildir layer in-between. Many people use this if they
62 use a mail reader on their local machine that does not support
63 Maildirs. People may install an IMAP server on their local machine,
64 and point both OfflineIMAP and their mail reader of choice at it. This
65 is often preferable to the mail reader's own IMAP support since
66 OfflineIMAP supports many features (offline reading, for one) that most
67 IMAP-aware readers don't. However, this feature is not as time-tested
68 as traditional syncing, so my advice is to stick with normal methods of
69 operation for the time being.
70
71 QUICK START
72 If you have already installed OfflineIMAP system-wide, or your system
73 administrator has done that for you, your task for setting up
74 OfflineIMAP for the first time is quite simple. You just need to set
75 up your configuration file, make your folder directory, and run it!
76
77 You can quickly set up your configuration file. The distribution
78 includes a file offlineimap.conf.minimal (Debian users may find this at
79 /usr/share/doc/offlineimap/examples/offlineimap.conf.minimal) that is a
80 basic example of setting of OfflineIMAP. You can simply copy this file
81 into your home directory and name it .offlineimaprc (note the leading
82 period). A command such as cp offlineimap.conf.minimal
83 ~/.offlineimaprc will do it. Or, if you prefer, you can just copy this
84 text to ~/.offlineimaprc:
85
86 [general]
87 accounts = Test
88
89 [Account Test]
90 localrepository = Local
91 remoterepository = Remote
92
93 [Repository Local]
94 type = Maildir
95 localfolders = ~/Test
96
97 [Repository Remote]
98 type = IMAP
99 remotehost = examplehost
100 remoteuser = jgoerzen
101
102 Now, edit the ~/.offlineimaprc file with your favorite editor. All you
103 have to do is specify a directory for your folders to be in (on the
104 localfolders line), the host name of your IMAP server (on the remote-
105 host line), and your login name on the remote (on the remoteuser line).
106 That's it!
107
108 To run OfflineIMAP, you just have to say offlineimap -- it will fire
109 up, ask you for a login password if necessary, synchronize your fold-
110 ers, and exit. See? You can just throw away the rest of this finely-
111 crafted, perfectly-honed manual! Of course, if you want to see how you
112 can make OfflineIMAP FIVE TIMES FASTER FOR JUST $19.95 (err, well, $0),
113 you have to read on!
114
115 INSTALLATION
116 If you are reading this document via the "man" command, it is likely
117 that you have no installation tasks to perform; your system administra-
118 tor has already installed it. If you need to install it yourself, you
119 have three options: a system-wide installation with Debian, system-wide
120 installation with other systems, and a single-user installation. You
121 can download the latest version of OfflineIMAP from the OfflineIMAP
122 website <URL:http://software.complete.org/offlineimap/>.
123
124 PREREQUISITES
125 In order to use OfflineIMAP, you need to have these conditions satis-
126 fied:
127
128 o Your mail server must support IMAP. Most Internet Service Providers
129 and corporate networks do, and most operating systems have an IMAP
130 implementation readily available.
131
132 o You must have Python version 2.2.1 or above installed. If you are
133 running on Debian GNU/Linux, this requirement will automatically be
134 taken care of for you. If you do not have Python already, check with
135 your system administrator or operating system vendor; or, download it
136 from the Python website <URL:http://www.python.org/>. If you intend
137 to use the Tk interface, you must have Tkinter (python-tk) installed.
138 If you intend to use the SSL interface, your Python must have been
139 built with SSL support.
140
141 o Have a mail reader that supports the Maildir mailbox format. Most
142 modern mail readers have this support built-in, so you can choose
143 from a wide variety of mail servers. This format is also known as
144 the "qmail" format, so any mail reader compatible with it will work
145 with OfflineIMAP. If you do not have a mail reader that supports
146 Maildir, you can often install a local IMAP server and point both
147 OfflineIMAP and your mail reader at it.
148
149 SYSTEM-WIDE INSTALLATION, DEBIAN
150 If you are tracking Debian unstable, you may install OfflineIMAP by
151 simply running the following command as root:
152
153 apt-get install offlineimap
154
155 If you are not tracking Debian unstable, download the Debian .deb pack-
156 age from the OfflineIMAP website <URL:http://software.com-
157 plete.org/offlineimap/> and then run dpkg -i to install the downloaded
158 package. Then, skip to [XRef to CONFIGURATION] below. You will type
159 offlineimap to invoke the program.
160
161 SYSTEM-WIDE INSTALLATION, OTHER
162 Download the tar.gz version of the package from the website
163 <URL:http://software.complete.org/offlineimap/>. Then run these com-
164 mands, making sure that you are the "root" user first:
165
166 tar -zxvf offlineimap_x.y.z.tar.gz
167 cd offlineimap-x.y.z
168 python2.2 setup.py install
169
170 On some systems, you will need to use python instead of python2.2.
171 Next, proceed to [XRef to CONFIGURATION] below. You will type
172 offlineimap to invoke the program.
173
174 SINGLE-ACCOUNT INSTALLATION
175 Download the tar.gz version of the package from the website
176 <URL:http://software.complete.org/offlineimap/>. Then run these com-
177 mands:
178
179 tar -zxvf offlineimap_x.y.z.tar.gz
180 cd offlineimap-x.y.z
181
182 When you want to run OfflineIMAP, you will issue the cd command as
183 above and then type ./offlineimap.py; there is no installation step
184 necessary.
185
186 CONFIGURATION
187 OfflineIMAP is regulated by a configuration file that is normally
188 stored in ~/.offlineimaprc. OfflineIMAP ships with a file named
189 offlineimap.conf that you should copy to that location and then edit.
190 This file is vital to proper operation of the system; it sets every-
191 thing you need to run OfflineIMAP. Full documentation for the configu-
192 ration file is included within the sample file.
193
194 OfflineIMAP also ships a file named offlineimap.conf.minimal that you
195 can also try. It's useful if you want to get started with the most
196 basic feature set, and you can read about other features later with
197 offlineimap.conf.
198
199 OPTIONS
200 Most configuration is done via the configuration file. Nevertheless,
201 there are a few command-line options that you may set for OfflineIMAP.
202
203 -1 Disable most multithreading operations and use solely a single-
204 connection sync. This effectively sets the maxsyncaccounts and
205 all maxconnections configuration file variables to 1.
206
207 -P profiledir
208 Sets OfflineIMAP into profile mode. The program will create
209 profiledir (it must not already exist). As it runs, Python pro-
210 filing information about each thread is logged into profiledir.
211 Please note: This option is present for debugging and optimiza-
212 tion only, and should NOT be used unless you have a specific
213 reason to do so. It will significantly slow program perfor-
214 mance, may reduce reliability, and can generate huge amounts of
215 data. You must use the -1 option when you use -P.
216
217 -a accountlist
218 Overrides the accounts option in the general section of the con-
219 figuration file. You might use this to exclude certain
220 accounts, or to sync some accounts that you normally prefer not
221 to. Separate the accounts by commas, and use no embedded
222 spaces.
223
224 -c configfile
225 Specifies a configuration file to use in lieu of the default,
226 ~/.offlineimaprc.
227
228 -d debugtype[,...]
229 Enables debugging for OfflineIMAP. This is useful if you are
230 trying to track down a malfunction or figure out what is going
231 on under the hood. I suggest that you use this with -1 to make
232 the results more sensible.
233
234 -d requires one or more debugtypes, separated by commas. These
235 define what exactly will be debugged, and include three options:
236 imap, maildir, and thread. The imap option will enable IMAP
237 protocol stream and parsing debugging. Note that the output may
238 contain passwords, so take care to remove that from the debug-
239 ging output before sending it to anyone else. The maildir
240 option will enable debugging for certain Maildir operations.
241 And thread will debug the threading model.
242
243 -l filename
244 Enables logging to filename. This will log everything that goes
245 to the screen to the specified file. Additionally, if any
246 debugging is specified with -d, then debug messages will not go
247 to the screen, but instead to the logfile only.
248
249 -o Run only once, ignoring all autorefresh settings in the configu-
250 ration file.
251
252 -h
253
254 --help Show summary of options.
255
256 -u interface
257 Specifies an alternative user interface module to use. This
258 overrides the default specified in the configuration file. The
259 pre-defined options are listed in the User Interfaces section.
260
261 USER INTERFACES
262 OfflineIMAP has a pluggable user interface system that lets you choose
263 how the program communicates information to you. There are two graphi-
264 cal interfaces, two terminal interfaces, and two noninteractive inter-
265 faces suitable for scripting or logging purposes. The ui option in the
266 configuration file specifies user interface preferences. The -u com-
267 mand-line option can override the configuration file setting. The
268 available values for the configuration file or command-line are
269 described in this section.
270
271 TK.BLINKENLIGHTS
272 Tk.Blinkenlights is an interface designed to be sleek, fun to watch,
273 and informative of the overall picture of what OfflineIMAP is doing. I
274 consider it to be the best general-purpose interface in OfflineIMAP.
275
276 Tk.Blinkenlights contains, by default, a small window with a row of
277 LEDs, a small log, and a row of command buttons. The total size of the
278 window is very small, so it uses little desktop space, yet it is quite
279 functional. The optional, toggleable, log shows more detail about what
280 is happening and is color-coded to match the color of the lights.
281
282 Tk.Blinkenlights is the only user interface that has configurable
283 parameters; see the example offlineimap.conf for more details.
284
285 Each light in the Blinkenlights interface represents a thread of execu-
286 tion -- that is, a particular task that OfflineIMAP is performing right
287 now. The colors indicate what task the particular thread is perform-
288 ing, and are as follows:
289
290 Black indicates that this light's thread has terminated; it will light
291 up again later when new threads start up. So, black indicates
292 no activity.
293
294 Red (Meaning 1)
295 is the color of the main program's thread, which basically does
296 nothing but monitor the others. It might remind you of HAL 9000
297 in 2001.
298
299 Gray indicates that the thread is establishing a new connection to
300 the IMAP server.
301
302 Purple is the color of an account synchronization thread that is moni-
303 toring the progress of the folders in that account (not generat-
304 ing any I/O).
305
306 Cyan indicates that the thread is syncing a folder.
307
308 Green means that a folder's message list is being loaded.
309
310 Blue is the color of a message synchronization controller thread.
311
312 Orange indicates that an actual message is being copied. (We use fuch-
313 sia for fake messages.)
314
315 Red (meaning 2)
316 indicates that a message is being deleted.
317
318 Yellow / bright orange
319 indicates that message flags are being added.
320
321 Pink / bright red
322 indicates that message flags are being removed.
323
324 Red / Black Flashing
325 corresponds to the countdown timer that runs between synchro-
326 nizations.
327
328 The name of this interfaces derives from a bit of computer history.
329 Eric Raymond's Jargon File defines blinkenlights, in part, as:
330
331
332 Front-panel diagnostic lights on a computer, esp. a dinosaur.
333 Now that dinosaurs are rare, this term usually refers to status
334 lights on a modem, network hub, or the like.
335
336 This term derives from the last word of the famous blackletter-
337 Gothic sign in mangled pseudo-German that once graced about half
338 the computer rooms in the English-speaking world. One version
339 ran in its entirety as follows:
340
341 ACHTUNG! ALLES LOOKENSPEEPERS!
342
343 Das computermachine ist nicht fuer gefingerpoken und mitten-
344 grabben. Ist easy schnappen der springenwerk, blowenfusen und
345 poppencorken mit spitzensparken. Ist nicht fuer gewerken bei
346 das dumpkopfen. Das rubbernecken sichtseeren keepen das cotten-
347 pickenen hans in das pockets muss; relaxen und watchen das
348 blinkenlichten.
349
350 CURSES.BLINKENLIGHTS
351 Curses.Blinkenlights is an interface very similar to Tk.Blinkenlights,
352 but is designed to be run in a console window (an xterm, Linux virtual
353 terminal, etc.) Since it doesn't have access to graphics, it isn't
354 quite as pretty, but it still gets the job done.
355
356 Please see the Tk.Blinkenlights section above for more information
357 about the colors used in this interface.
358
359 TK.VERBOSEUI
360 Tk.VerboseUI (formerly known as Tk.TkUI) is a graphical interface that
361 presents a variable-sized window. In the window, each currently-exe-
362 cuting thread has a section where its name and current status are dis-
363 played. This interface is best suited to people running on slower con-
364 nections, as you get a lot of detail, but for fast connections, the
365 detail may go by too quickly to be useful. People with fast connec-
366 tions may wish to use Tk.Blinkenlights instead.
367
368 TTY.TTYUI
369 TTY.TTYUI interface is for people running in basic, non-color termi-
370 nals. It prints out basic status messages and is generally friendly to
371 use on a console or xterm.
372
373 NONINTERACTIVE.BASIC
374 Noninteractive.Basic is designed for situations in which OfflineIMAP
375 will be run non-attended and the status of its execution will be
376 logged. You might use it, for instance, to have the system run auto-
377 matically and e-mail you the results of the synchronization. This user
378 interface is not capable of reading a password from the keyboard;
379 account passwords must be specified using one of the configuration file
380 options.
381
382 NONINTERACTIVE.QUIET
383 Noninteractive.Quiet is designed for non-attended running in situations
384 where normal status messages are not desired. It will output nothing
385 except errors and serious warnings. Like Noninteractive.Basic, this
386 user interface is not capable of reading a password from the keyboard;
387 account passwords must be specified using one of the configuration file
388 options.
389
390 EXAMPLES
391 Here are some example configurations for various situations. Please e-
392 mail any other examples you have that may be useful to me.
393
394 MULTIPLE ACCOUNTS WITH MUTT
395 This example shows you how to set up OfflineIMAP to synchronize multi-
396 ple accounts with the mutt mail reader.
397
398 Start by creating a directory to hold your folders by running mkdir
399 ~/Mail. Then, in your ~/.offlineimaprc, specify:
400
401 accounts = Personal, Work
402
403 Make sure that you have both an [Account Personal] and an [Account
404 Work] section. The local repository for each account must have differ-
405 ent localfolder path names. Also, make sure to enable [mbnames].
406
407 In each local repository section, write something like this:
408
409 localfolders = ~/Mail/Personal
410
411 Finally, add these lines to your ~/.muttrc:
412
413 source ~/path-to-mbnames-muttrc-mailboxes
414 folder-hook Personal set from="youremail@personal.com"
415 folder-hook Work set from="youremail@work.com"
416 set mbox_type=Maildir
417 set folder=$HOME/Mail
418 spoolfile=+Personal/INBOX
419
420 That's it!
421
422 UW-IMAPD AND REFERENCES
423 Some users with a UW-IMAPD server need to use OfflineIMAP's "reference"
424 feature to get at their mailboxes, specifying a reference of "~/Mail"
425 or "#mh/" depending on the configuration. The below configuration from
426 (originally from docwhat@gerf.org) shows using a reference of Mail, a
427 nametrans that strips the leading Mail/ off incoming folder names, and
428 a folderfilter that limits the folders synced to just three.
429
430 [Account Gerf]
431 localrepository = GerfLocal
432 remoterepository = GerfRemote
433
434 [Repository GerfLocal]
435 type = Maildir
436 localfolders = ~/Mail
437
438 [Repository GerfRemote]
439 type = IMAP
440 remotehost = gerf.org
441 ssl = yes
442 remoteuser = docwhat
443 reference = Mail
444 # Trims off the preceeding Mail on all the folder names.
445 nametrans = lambda foldername: \
446 re.sub('^Mail/', '', foldername)
447 # Yeah, you have to mention the Mail dir, even though it
448 # would seem intuitive that reference would trim it.
449 folderfilter = lambda foldername: foldername in [
450 'Mail/INBOX',
451 'Mail/list/zaurus-general',
452 'Mail/list/zaurus-dev',
453 ]
454 maxconnections = 1
455 holdconnectionopen = no
456
457 PYTHONFILE CONFIGURATION FILE OPTION
458 You can have OfflineIMAP load up a Python file before evaluating the
459 configuration file options that are Python expressions. This example
460 is based on one supplied by Tommi Virtanen for this feature.
461
462 In ~/.offlineimap.rc, he adds these options:
463
464 [general]
465 pythonfile=~/.offlineimap.py
466 [Repository foo]
467 foldersort=mycmp
468
469 Then, the ~/.offlineimap.py file will contain:
470
471 prioritized = ['INBOX', 'personal', 'announce', 'list']
472
473 def mycmp(x, y):
474 for prefix in prioritized:
475 xsw = x.startswith(prefix)
476 ysw = y.startswith(prefix)
477 if xsw and ysw:
478 return cmp(x, y)
479 elif xsw:
480 return -1
481 elif ysw:
482 return +1
483 return cmp(x, y)
484
485 def test_mycmp():
486 import os, os.path
487 folders=os.listdir(os.path.expanduser('~/data/mail/tv@hq.yok.utu.fi'))
488 folders.sort(mycmp)
489 print folders
490
491 This code snippet illustrates how the foldersort option can be cus-
492 tomized with a Python function from the pythonfile to always synchro-
493 nize certain folders first.
494
495 ERRORS
496 If you get one of some frequently-encountered or confusing errors,
497 please check this section.
498
499 UID VALIDITY PROBLEM FOR FOLDER
500 IMAP servers use a unique ID (UID) to refer to a specific message.
501 This number is guaranteed to be unique to a particular message forever.
502 No other message in the same folder will ever get the same UID. UIDs
503 are an integral part of OfflineIMAP's synchronization scheme; they are
504 used to match up messages on your computer to messages on the server.
505
506 Sometimes, the UIDs on the server might get reset. Usually this will
507 happen if you delete and then recreate a folder. When you create a
508 folder, the server will often start the UID back from 1. But
509 OfflineIMAP might still have the UIDs from the previous folder by the
510 same name stored. OfflineIMAP will detect this condition and skip the
511 folder. This is GOOD, because it prevents data loss.
512
513 You can fix it by removing your local folder and cache data. For
514 instance, if your folders are under ~/Folders and the folder with the
515 problem is INBOX, you'd type this:
516
517 rm -r ~/Folders/INBOX
518 rm -r ~/.offlineimap/Account-AccountName
519 rm -r ~/.offlineimap/Repository-RepositoryName
520
521 (Of course, replace AccountName and RepositoryName with the names as
522 specified in ~/.offlineimaprc).
523
524 Next time you run OfflineIMAP, it will re-download the folder with the
525 new UIDs. Note that the procedure specified above will lose any local
526 changes made to the folder.
527
528 Some IMAP servers are broken and do not support UIDs properly. If you
529 continue to get this error for all your folders even after performing
530 the above procedure, it is likely that your IMAP server falls into this
531 category. OfflineIMAP is incompatible with such servers. Using
532 OfflineIMAP with them will not destroy any mail, but at the same time,
533 it will not actually synchronize it either. (OfflineIMAP will detect
534 this condition and abort prior to synchronization.)
535
536 This question comes up frequently on the OfflineIMAP mailing list
537 <URL:http://lists.complete.org/offlineimap@complete.org/>. You can
538 find a detailed discussion <URL:http://lists.com-
539 plete.org/offlineimap@complete.org/2003/04/msg00012.html.gz> of the
540 problem there.
541
542 USE WITH MS EXCHANGE SERVER
543 Several users have reported problems with Microsoft Exchange servers in
544 conjunction with OfflineIMAP. This generally seems to be related to
545 the Exchange servers not properly following the IMAP standards.
546
547 Mark Biggers has posted some information <URL:http://lists.com-
548 plete.org/offlineimap@complete.org/2005/09/msg00011.html.gz> to the
549 OfflineIMAP mailing list about how he made it work.
550
551 Other users have indicated that older (5.5) releases of Exchange are so
552 bad that they will likely not work at all.
553
554 I do not have access to Exchange servers for testing, so any problems
555 with it, if they can even be solved at all, will require help from
556 OfflineIMAP users to find and fix.
557
558 OTHER FREQUENTLY ASKED QUESTIONS
559 There are some other FAQs that might not fit into another section of
560 the document, so they are discussed here.
561
562 What platforms does OfflineIMAP run on?
563 It should run on most platforms supported by Python, which are
564 quite a few. I do not support Windows myself, but some have
565 made it work there; see the FAQ entry for that platform.
566
567 I'm using Mutt. Other IMAP sync programs require me to use "set
568 maildir_trash=yes". Do I need to do that with OfflineIMAP?
569 No. OfflineIMAP is smart enough to figure out message deletion
570 without this extra crutch. You'll get the best results if you
571 don't use this setting, in fact.
572
573 I've upgraded and now OfflineIMAP crashes when I start it up! Why?
574 You need to upgrade your configuration file. See [XRef to
575 UPGRADING.4.0] at the end of this manual.
576
577 How do I specify the names of my folders?
578 You do not need to. OfflineIMAP is smart enough to automati-
579 cally figure out what folders are present on the IMAP server and
580 synchronize them. You can use the folderfilter and nametrans
581 configuration file options to request certain folders and rename
582 them as they come in if you like.
583
584 How can I prevent certain folders from being synced?
585 Use the folderfilter option in the configuration file.
586
587 How can I add or delete a folder?
588 OfflineIMAP does not currently provide this feature, but if you
589 create a new folder on the IMAP server, it will be created
590 locally automatically.
591
592 Are there any other warnings that I should be aware of?
593 Yes; see the Notes section below.
594
595 What is the mailbox name recorder (mbnames) for?
596 Some mail readers, such as Mutt, are not capable of automati-
597 cally determining the names of your mailboxes. OfflineIMAP can
598 help these programs by writing the names of the folders in a
599 format you specify. See the example offlineimap.conf for
600 details.
601
602 Can I synchronize multiple accounts with OfflineIMAP?
603 Sure. Just name them all in the accounts line in the general
604 section of the configuration file, and add a per-account section
605 for each one.
606
607 Does OfflineIMAP support POP?
608 No. POP is not robust enough to do a completely reliable multi-
609 machine synchronization like OfflineIMAP can do. OfflineIMAP
610 will not support it.
611
612 Does OfflineIMAP support mailbox formats other than Maildir?
613 Not at present. There is no technical reason not to; just no
614 demand yet. Maildir is a superior format anyway. However,
615 OfflineIMAP can sync between two IMAP servers, and some IMAP
616 servers support other formats. You could install an IMAP server
617 on your local machine and have OfflineIMAP sync to that.
618
619 [technical] Why are your Maildir message filenames so huge?
620 OfflineIMAP has two relevant principles: 1) never modifying your
621 messages in any way and 2) ensuring 100% reliable synchroniza-
622 tions. In order to do a reliable sync, OfflineIMAP must have a
623 way to uniquely identify each e-mail. Three pieces of informa-
624 tion are required to do this: your account name, the folder
625 name, and the message UID. The account name can be calculated
626 from the path in which your messages are. The folder name can
627 usually be as well, BUT some mail clients move messages between
628 folders by simply moving the file, leaving the name intact.
629
630 So, OfflineIMAP must store both a UID folder ID. The folder ID
631 is necessary so OfflineIMAP can detect a message moved to a dif-
632 ferent folder. OfflineIMAP stores the UID (U= number) and an
633 md5sum of the foldername (FMD5= number) to facilitate this.
634
635 What is the speed of OfflineIMAP's sync?
636 OfflineIMAP versions 2.0 and above contain a multithreaded sys-
637 tem. A good way to experiment is by setting maxsyncaccounts to
638 3 and maxconnections to 3 in each account clause.
639
640 This lets OfflineIMAP open up multiple connections simultane-
641 ously. That will let it process multiple folders and messages
642 at once. In most cases, this will increase performance of the
643 sync.
644
645 Don't set the number too high. If you do that, things might
646 actually slow down as your link gets saturated. Also, too many
647 connections can cause mail servers to have excessive load.
648 Administrators might take unkindly to this, and the server might
649 bog down. There are many variables in the optimal setting;
650 experimentation may help.
651
652 An informal benchmark yields these results for my setup:
653
654 o 10 minutes with MacOS X Mail.app "manual cache"
655
656 o 5 minutes with GNUS agent sync
657
658 o 20 seconds with OfflineIMAP 1.x
659
660 o 9 seconds with OfflineIMAP 2.x
661
662 o 3 seconds with OfflineIMAP 3.x "cold start"
663
664 o 2 seconds with OfflineIMAP 3.x "held connection"
665
666 Can I use OfflineIMAP on Windows?
667 These answers have been reported by OfflineIMAP users. I do not
668 run OfflineIMAP on Windows myself, so I can't directly address
669 their accuracy.
670
671 The basic answer is that it's possible and doesn't require hack-
672 ing OfflineIMAP source code. However, it's not necessarily
673 trivial. The information below is based in instructions submit-
674 ted by Chris Walker.
675
676 First, you must run OfflineIMAP in the Cygwin
677 <URL:http://www.cygwin.com/> environment.
678
679 Next, you'll need to mount your Maildir directory in a special
680 way. There is information for doing that at
681 <URL:http://barnson.org/node/view/295>. That site gives this
682 example:
683
684 mount -f -s -b -o managed "d:/tmp/mail" "/home/of/mail"
685
686
687 That URL also has more details on making OfflineIMAP work with
688 Windows.
689
690 CONFORMING TO
691 o Internet Message Access Protocol version 4rev1 (IMAP 4rev1) as speci-
692 fied in RFC2060 and RFC3501
693
694 o CRAM-MD5 as specified in RFC2195
695
696 o Maildir as specified in the Maildir manpage
697 <URL:http://www.qmail.org/qmail-manual-html/man5/maildir.html> and
698 the qmail website <URL:http://cr.yp.to/proto/maildir.html>.
699
700 o Standard Python 2.2.1 as implemented on POSIX-compliant systems.
701
702 NOTES
703 DELETING LOCAL FOLDERS
704 OfflineIMAP does a two-way synchronization. That is, if you make a
705 change to the mail on the server, it will be propagated to your local
706 copy, and vise-versa. Some people might think that it would be wise to
707 just delete all their local mail folders periodically. If you do this
708 with OfflineIMAP, remember to also remove your local status cache
709 (~/.offlineimap by default). Otherwise, OfflineIMAP will take this as
710 an intentional deletion of many messages and will interpret your action
711 as requesting them to be deleted from the server as well. (If you
712 don't understand this, don't worry; you probably won't encounter this
713 situation)
714
715 MULTIPLE INSTANCES
716 OfflineIMAP is not designed to have several instances (for instance, a
717 cron job and an interactive invocation) run over the same mailbox
718 simultaneously. It will perform a check on startup and abort if
719 another OfflineIMAP is already running. If you need to schedule syn-
720 chronizations, please use the autorefresh settings rather than cron.
721 Alternatively, you can set a separate metadata directory for each
722 instance.
723
724 COPYING MESSAGES BETWEEN FOLDERS
725 Normally, when you copy a message between folders or add a new message
726 to a folder locally, OfflineIMAP will just do the right thing. How-
727 ever, sometimes this can be tricky -- if your IMAP server does not pro-
728 vide the SEARCH command, or does not return something useful,
729 OfflineIMAP cannot determine the new UID of the message. So, in these
730 rare instances, OfflineIMAP will upload the message to the IMAP server
731 and delete it from your local folder. Then, on your next sync, the
732 message will be re-downloaded with the proper UID. OfflineIMAP makes
733 sure that the message was properly uploaded before deleting it, so
734 there should be no risk of data loss.
735
736 USE WITH EVOLUTION
737 OfflineIMAP can work with Evolution. To do so, first configure your
738 OfflineIMAP account to have sep = / in its configuration. Then, con-
739 figure Evolution with the "Maildir-format mail directories" server
740 type. For the path, you will need to specify the name of the top-level
741 folder inside your OfflineIMAP storage location. You're now set!
742
743 USE WITH KMAIL
744 At this time, I believe that OfflineIMAP with Maildirs is not compati-
745 ble with KMail. KMail cannot work in any mode other than to move all
746 messages out of all folders immediately, which (besides being annoying
747 and fundamentally broken) is incompatible with OfflineIMAP.
748
749 However, I have made KMail version 3 work well with OfflineIMAP by
750 installing an IMAP server on my local machine, having OfflineIMAP sync
751 to that, and pointing KMail at the same server.
752
753 MAILING LIST
754 There is an OfflineIMAP mailing list available. To subscribe, send the
755 text "Subscribe" in the subject of a mail to offlineimap-request@com-
756 plete.org. To post, send the message to offlineimap@complete.org.
757 Archives are available at
758 <URL:http://lists.complete.org/offlineimap@complete.org/>.
759
760 BUGS
761 Reports of bugs should be sent via e-mail to the OfflineIMAP mailing
762 list at offlineimap at complete dot org. Debian users are encouraged
763 to instead use the Debian bug-tracking system.
764
765 UPGRADING TO 4.0
766 If you are upgrading from a version of OfflineIMAP prior to 3.99.12,
767 you will find that you will get errors when OfflineIMAP starts up
768 (relating to ConfigParser or AccountHashGenerator) and the configura-
769 tion file. This is because the config file format had to change to
770 accommodate new features in 4.0. Fortunately, it's not difficult to
771 adjust it to suit.
772
773 First thing you need to do is stop any running OfflineIMAP instance,
774 making sure first that it's synced all your mail. Then, modify your
775 ~/.offlineimaprc file. You'll need to split up each account section
776 (make sure that it now starts with "Account ") into two Repository sec-
777 tions (one for the local side and another for the remote side.) See
778 the files offlineimap.conf.minimal and offlineimap.conf in the distri-
779 bution if you need more assistance.
780
781 OfflineIMAP's status directory area has also changed. Therefore, you
782 should delete everything in ~/.offlineimap as well as your local mail
783 folders.
784
785 When you start up OfflineIMAP 4.0, it will re-download all your mail
786 from the server and then you can continue using it like normal.
787
788 COPYRIGHT
789 OfflineIMAP, and this manual, are Copyright (C) 2002, 2003 John
790 Goerzen.
791
792 This program is free software; you can redistribute it and/or modify it
793 under the terms of the GNU General Public License as published by the
794 Free Software Foundation; either version 2 of the License, or (at your
795 option) any later version.
796
797 This program is distributed in the hope that it will be useful, but
798 WITHOUT ANY WARRANTY; without even the implied warranty of MER-
799 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
800 Public License for more details.
801
802 You should have received a copy of the GNU General Public License along
803 with this program; if not, write to the Free Software Foundation, Inc.,
804 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
805
806 imaplib.py comes from the Python dev tree and is licensed under the
807 GPL-compatible PSF license as stated in the file COPYRIGHT in the
808 OfflineIMAP distribution.
809
810 AUTHOR
811 OfflineIMAP, its libraries, documentation, and all included files,
812 except where noted, was written by John Goerzen <jgoerzen@complete.org>
813 and copyright is held as stated in the COPYRIGHT section.
814
815 OfflineIMAP may be downloaded, and information found, from its homepage
816 <URL:http://software.complete.org/offlineimap>.
817
818 OfflineIMAP may also be downloaded using Subversion. Additionally, the
819 distributed tar.gz may be updated with a simple "svn update" command;
820 it is ready to go. For information on getting OfflineIMAP with Subver-
821 sion, please visit the complete.org Subversion page
822 <URL:http://svn.complete.org/>.
823
824 SEE ALSO
825 mutt(1), python(1)
826
827 HISTORY
828 Detailed history may be found in the file ChangeLog in the OfflineIMAP
829 distribution. Feature and bug histories may be found in the file
830 debian/changelog which, despite its name, is not really Debian-spe-
831 cific. This section provides a large overview.
832
833 Development on OfflineIMAP began on June 18, 2002. Version 1.0.0 was
834 released three days later on June 21, 2002. Point releases followed,
835 including speed optimizations and some compatibility fixes.
836
837 Version 2.0.0 was released on July 3, 2002, and represented the first
838 time the synchronization became multithreaded and, to the best of my
839 knowledge, the first multithreaded IMAP syncrhonizing application in
840 existance. The last 2.0.x release, 2.0.8, was made on July 9.
841
842 Version 3.0.0 was released on July 11, 2002, and introduced modular
843 user interfaces and the first GUI interface for OfflineIMAP. This man-
844 ual also was introduced with 3.0.0, along with many command-line
845 options. Version 3.1.0 was released on July 21, adding the Noninterac-
846 tive user interfaces, profiling support, and several bugfixes. 3.2.0
847 was released on July 24, adding support for the Blinkenlights GUI
848 interface. OfflineIMAP entered maintenance mode for awhile, as it had
849 reached a feature-complete milestone in my mind.
850
851 The 3.99.x branch began in on October 7, 2002, to begin work for 4.0.
852 The Curses.Blinkenlights interface was added in 3.99.6, and many archi-
853 tectural changes were made.
854
855 4.0.0 was released on July 18, 2003, including the ability to synchro-
856 nize directly between two IMAP servers, the first re-architecting of
857 the configuration file to refine the notion of an account, and the new
858 Curses interface.
859
860
861
862 John Goerzen 29 November 2006 OFFLINEIMAP(1)