]> code.delx.au - offlineimap/blob - offlineimap/head/manual.txt
/offlineimap/head: changeset 510
[offlineimap] / offlineimap / head / 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 adminstrator 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://quux.org/devel/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
157 <URL:http://quux.org/devel/offlineimap/> and then run dpkg -i to
158 install the downloaded package. Then, skip to [XRef to CONFIGURATION]
159 below. You will type 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://quux.org/devel/offlineimap/>. Then run these commands,
164 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://quux.org/devel/offlineimap/>. Then run these commands:
177
178 tar -zxvf offlineimap_x.y.z.tar.gz
179 cd offlineimap-x.y.z
180
181 When you want to run OfflineIMAP, you will issue the cd command as
182 above and then type ./offlineimap.py; there is no installation step
183 necessary.
184
185 CONFIGRUATION
186 OfflineIMAP is regulated by a configuration file that is normally
187 stored in ~/.offlineimaprc. OfflineIMAP ships with a file named
188 offlineimap.conf that you should copy to that location and then edit.
189 This file is vital to proper operation of the system; it sets every-
190 thing you need to run OfflineIMAP. Full documentation for the configu-
191 ration file is included within the sample file.
192
193 OfflineIMAP also ships a file named offlineimap.conf.minimal that you
194 can also try. It's useful if you want to get started with the most
195 basic feature set, and you can read about other features later with
196 offlineimap.conf.
197
198 OPTIONS
199 Most configuration is done via the configuration file. Nevertheless,
200 there are a few command-line options that you may set for OfflineIMAP.
201
202 -1 Disable most multithreading operations and use solely a single-
203 connection sync. This effectively sets the maxsyncaccounts and
204 all maxconnections configuration file variables to 1.
205
206 -P profiledir
207 Sets OfflineIMAP into profile mode. The program will create
208 profiledir (it must not already exist). As it runs, Python pro-
209 filing information about each thread is logged into profiledir.
210 Please note: This option is present for debugging and optimiza-
211 tion only, and should NOT be used unless you have a specific
212 reason to do so. It will significantly slow program perfor-
213 mance, may reduce reliability, and can generate huge amounts of
214 data. You must use the -1 option when you use -P.
215
216 -a accountlist
217 Overrides the accounts option in the general section of the con-
218 figuration file. You might use this to exclude certain
219 accounts, or to sync some accounts that you normally prefer not
220 to. Separate the accounts by commas, and use no embedded
221 spaces.
222
223 -c configfile
224 Specifies a configuration file to use in lieu of the default,
225 ~/.offlineimaprc.
226
227 -d debugtype[,...]
228 Enables debugging for OfflineIMAP. This is useful if you are
229 trying to track down a malfunction or figure out what is going
230 on under the hood. I suggest that you use this with -1 to make
231 the results more sensible.
232
233 -d requires one or more debugtypes, separated by commas. These
234 define what exactly will be debugged, and include three options:
235 imap, maildir, and thread. The imap option will enable IMAP
236 protocol stream and parsing debugging. Note that the output may
237 contain passwords, so take care to remove that from the debug-
238 ging output before sending it to anyone else. The maildir
239 option will enable debugging for certain Maildir operations.
240 And thread will debug the threading model.
241
242 -l filename
243 Enables logging to filename. This will log everything that goes
244 to the screen to the specified file. Additionally, if any
245 debugging is specified with -d, then debug messages will not go
246 to the screen, but instead to the logfile only.
247
248 -o Run only once, ignoring all autorefresh settings in the configu-
249 ration file.
250
251 -h
252
253 --help Show summary of options.
254
255 -u interface
256 Specifies an alternative user interface module to use. This
257 overrides the defailt specified in the configuration file. The
258 pre-defined options are listed in the User Interfaces section.
259
260 USER INTERFACES
261 OfflineIMAP has a pluggable user interface system that lets you choose
262 how the program communicates information to you. There are two graphi-
263 cal interfaces, two terminal interfaces, and two noninteractive inter-
264 faces suitable for scripting or logging purposes. The ui option in the
265 configuration file specifies user interface preferences. The -u com-
266 mand-line option can override the configuration file setting. The
267 available values for the configuration file or command-line are
268 described in this section.
269
270 TK.BLINKENLIGHTS
271 Tk.Blinkenlights is an interface designed to be sleek, fun to watch,
272 and informative of the overall picture of what OfflineIMAP is doing. I
273 consider it to be the best general-purpose interface in OfflineIMAP.
274
275 Tk.Blinkenlights contains, by default, a small window with a row of
276 LEDs, a small log, and a row of command buttons. The total size of the
277 window is very small, so it uses little desktop space, yet it is quite
278 functional. The optional, toggleable, log shows more detail about what
279 is happening and is color-coded to match the color of the lights.
280
281 Tk.Blinkenlights is the only user interface that has configurable
282 parameters; see the example offlineimap.conf for more details.
283
284 Each light in the Blinkenlights interface represents a thread of execu-
285 tion -- that is, a particular task that OfflineIMAP is performing right
286 now. The colors indicate what task the particular thread is perform-
287 ing, and are as follows:
288
289 Black indicates that this light's thread has terminated; it will light
290 up again later when new threads start up. So, black indicates
291 no activity.
292
293 Red (Meaning 1)
294 is the color of the main program's thread, which basically does
295 nothing but monitor the others. It might remind you of HAL 9000
296 in 2001.
297
298 Gray indicates that the thread is establishing a new connection to
299 the IMAP server.
300
301 Purple is the color of an account synchronization thread that is moni-
302 toring the progress of the folders in that account (not generat-
303 ing any I/O).
304
305 Cyan indicates that the thread is syncing a folder.
306
307 Green means that a folder's message list is being loaded.
308
309 Blue is the color of a message synchronization controller thread.
310
311 Orange indicates that an actual message is being copied. (We use
312 fuschia for fake messages.)
313
314 Red (meaning 2)
315 indicates that a message is being deleted.
316
317 Yellow / bright orange
318 indicates that message flags are being added.
319
320 Pink / bright red
321 indicates that message flags are being removed.
322
323 Red / Black Flashing
324 corresponds to the countdown timer that runs between synchro-
325 nizations.
326
327 The name of this interfaces derives from a bit of computer history.
328 Eric Raymond's Jargon File defines blinkenlights, in part, as:
329
330
331 Front-panel diagnostic lights on a computer, esp. a dinosaur.
332 Now that dinosaurs are rare, this term usually refers to status
333 lights on a modem, network hub, or the like.
334
335 This term derives from the last word of the famous blackletter-
336 Gothic sign in mangled pseudo-German that once graced about half
337 the computer rooms in the English-speaking world. One version
338 ran in its entirety as follows:
339
340 ACHTUNG! ALLES LOOKENSPEEPERS!
341
342 Das computermachine ist nicht fuer gefingerpoken und mitten-
343 grabben. Ist easy schnappen der springenwerk, blowenfusen und
344 poppencorken mit spitzensparken. Ist nicht fuer gewerken bei
345 das dumpkopfen. Das rubbernecken sichtseeren keepen das cotten-
346 pickenen hans in das pockets muss; relaxen und watchen das
347 blinkenlichten.
348
349 CURSES.BLINKENLIGHTS
350 Curses.Blinkenlights is an interface very similar to Tk.Blinkenlights,
351 but is designed to be run in a console window (an xterm, Linux virtual
352 terminal, etc.) Since it doesn't have access to graphics, it isn't
353 quite as pretty, but it still gets the job done.
354
355 Please see the Tk.Blinkenlights section above for more information
356 about the colors used in this interface.
357
358 TK.VERBOSEUI
359 Tk.VerboseUI (formerly known as Tk.TkUI) is a graphical interface that
360 presents a variable-sized window. In the window, each currently-exe-
361 cuting thread has a section where its name and current status are dis-
362 played. This interface is best suited to people running on slower con-
363 nections, as you get a lot of detail, but for fast connections, the
364 detail may go by too quickly to be useful. People with fast connec-
365 tions may wish to use Tk.Blinkenlights instead.
366
367 TTY.TTYUI
368 TTY.TTYUI interface is for people running in basic, non-color termi-
369 nals. It prints out basic status messages and is generally friendly to
370 use on a console or xterm.
371
372 NONINTERACTIVE.BASIC
373 Noninteractive.Basic is designed for situations in which OfflineIMAP
374 will be run non-attended and the status of its execution will be
375 logged. You might use it, for instance, to have the system run auto-
376 matically and e-mail you the results of the synchronization. This user
377 interface is not capable of reading a password from the keyboard;
378 account passwords must be specified using one of the configuration file
379 options.
380
381 NONINTERACTIVE.QUIET
382 Noninteractive.Quiet is designed for non-attended running in situations
383 where normal status messages are not desired. It will output nothing
384 except errors and serious warnings. Like Noninteractive.Basic, this
385 user interface is not capable of reading a password from the keyboard;
386 account passwords must be specified using one of the configuration file
387 options.
388
389 EXAMPLES
390 Here are some example configurations for various situations. Please e-
391 mail any other examples you have that may be useful to me.
392
393 MULTIPLE ACCOUNTS WITH MUTT
394 This example shows you how to set up OfflineIMAP to synchronize multi-
395 ple accounts with the mutt mail reader.
396
397 Start by creating a directory to hold your folders by running mkdir
398 ~/Mail. Then, in your ~/.offlineimaprc, specify:
399
400 accounts = Personal, Work
401
402 Make sure that you have both an [Account Personal] and an [Account
403 Work] section. The local repository for each account must have differ-
404 ent localfolder path names. Also, make sure to enable [mbnames].
405
406 In each local repository section, write something like this:
407
408 localfolders = ~/Mail/Personal
409
410 Finally, add these lines to your ~/.muttrc:
411
412 source ~/path-to-mbnames-muttrc-mailboxes
413 folder-hook Personal set from="youremail@personal.com"
414 folder-hook Work set from="youremail@work.com"
415 set mbox_type=Maildir
416 set folder=$HOME/Mail
417 spoolfile=+Personal/INBOX
418
419 That's it!
420
421 UW-IMAPD AND REFERENCES
422 Some users with a UW-IMAPD server need to use OfflineIMAP's "reference"
423 feature to get at their mailboxes, specifying a reference of "~/Mail"
424 or "#mh/" depending on the configuration. The below configuration from
425 (originally from docwhat@gerf.org) shows using a reference of Mail, a
426 nametrans that strips the leading Mail/ off incoming folder names, and
427 a folderfilter that limits the folders synced to just three.
428
429 [Account Gerf]
430 localrepository = GerfLocal
431 remoterepository = GerfRemote
432
433 [Repository GerfLocal]
434 type = Maildir
435 localfolders = ~/Mail
436
437 [Repository GerfRemote]
438 type = IMAP
439 remotehost = gerf.org
440 ssl = yes
441 remoteuser = docwhat
442 reference = Mail
443 # Trims off the preceeding Mail on all the folder names.
444 nametrans = lambda foldername: \
445 re.sub('^Mail/', '', foldername)
446 # Yeah, you have to mention the Mail dir, even though it
447 # would seem intuitive that reference would trim it.
448 folderfilter = lambda foldername: foldername in [
449 'Mail/INBOX',
450 'Mail/list/zaurus-general',
451 'Mail/list/zaurus-dev',
452 ]
453 maxconnections = 1
454 holdconnectionopen = no
455
456 PYTHONFILE CONFIGURATION FILE OPTION
457 You can have OfflineIMAP load up a Python file before evaluating the
458 configuration file options that are Python expressions. This example
459 is based on one supplied by Tommi Virtanen for this feature.
460
461 In ~/.offlineimap.rc, he adds these options:
462
463 [general]
464 pythonfile=~/.offlineimap.py
465 [Repository foo]
466 foldersort=mycmp
467
468 Then, the ~/.offlineimap.py file will contain:
469
470 prioritized = ['INBOX', 'personal', 'announce', 'list']
471
472 def mycmp(x, y):
473 for prefix in prioritized:
474 if x.startswith(prefix):
475 return -1
476 elif y.startswith(prefix):
477 return +1
478 return cmp(x, y)
479
480 def test_mycmp():
481 import os, os.path
482 folders=os.listdir(os.path.expanduser('~/data/mail/tv@hq.yok.utu.fi'))
483 folders.sort(mycmp)
484 print folders
485
486 This code snippet illustrates how the foldersort option can be cus-
487 tomized with a Python function from the pythonfile to always synchro-
488 nize certain folders first.
489
490 ERRORS
491 If you get one of some frequently-encountered or confusing errors,
492 please check this section.
493
494 UID VALIDITY PROBLEM FOR FOLDER
495 IMAP servers use a unique ID (UID) to refer to a specific message.
496 This number is guaranteed to be unique to a particular message forever.
497 No other message in the same folder will ever get the same UID. UIDs
498 are an integral part of OfflineIMAP's synchronization scheme; they are
499 used to match up messages on your computer to messages on the server.
500
501 Sometimes, the UIDs on the server might get reset. Usually this will
502 happen if you delete and then recreate a folder. When you create a
503 folder, the server will often start the UID back from 1. But
504 OfflineIMAP might still have the UIDs from the previous folder by the
505 same name stored. OfflineIMAP will detect this condition and skip the
506 folder. This is GOOD, because it prevents data loss.
507
508 You can fix it by removing your local folder and cache data. For
509 instance, if your folders are under ~/Folders and the folder with the
510 problem is INBOX, you'd type this:
511
512 rm -r ~/Folders/INBOX
513 rm -r ~/.offlineimap/Account-AccountName
514 rm -r ~/.offlineimap/Repository-RepositoryName
515
516 (Of course, replace AccountName and RepositoryName with the names as
517 specified in ~/.offlineimaprc).
518
519 Next time you run OfflineIMAP, it will re-download the folder with the
520 new UIDs. Note that the procedure specified above will lose any local
521 changes made to the folder.
522
523 Some IMAP servers are broken and do not support UIDs properly. If you
524 continue to get this error for all your folders even after performing
525 the above procedure, it is likely that your IMAP server falls into this
526 category. OfflineIMAP is incompatible with such servers. Using
527 OfflineIMAP with them will not destroy any mail, but at the same time,
528 it will not actually synchronize it either. (OfflineIMAP will detect
529 this condition and abort prior to synchronization.)
530
531 This question comes up frequently on the OfflineIMAP mailing list
532 <URL:http://lists.complete.org/offlineimap@complete.org/>. You can
533 find a detailed discussion <URL:http://lists.com-
534 plete.org/offlineimap@complete.org/2003/04/msg00012.html.gz> of the
535 problem there.
536
537 OTHER FREQUENTLY ASKED QUESTIONS
538 There are some other FAQs that might not fit into another section of
539 the document, so they are discussed here.
540
541 What platforms does OfflineIMAP run on?
542 It should run on most platforms supported by Python, which are
543 quite a few.
544
545 I'm using Mutt. Other IMAP sync programs require me to use "set
546 maildir_trash=yes". Do I need to do that with OfflineIMAP?
547 No. OfflineIMAP is smart enough to figure out message deletion
548 without this extra crutch. You'll get the best results if you
549 don't use this setting, in fact.
550
551 I've upgraded and now OfflineIMAP crashes when I start it up! Why?
552 You need to upgrade your configuration file. See [XRef to
553 UPGRADING.4.0] at the end of this manual.
554
555 How do I specify the names of my folders?
556 You do not need to. OfflineIMAP is smart enough to automati-
557 cally figure out what folders are present on the IMAP server and
558 synchronize them. You can use the folderfilter and foldertrans
559 configuration file options to request certain folders and rename
560 them as they come in if you like.
561
562 How can I prevent certain folders from being synced?
563 Use the folderfilter option in the configuration file.
564
565 How can I add or delete a folder?
566 OfflineIMAP does not currently provide this feature, but if you
567 create a new folder on the IMAP server, it will be created
568 locally automatically.
569
570 Are there any other warnings that I should be aware of?
571 Yes; see the Notes section below.
572
573 What is the mailbox name recorder (mbnames) for?
574 Some mail readers, such as Mutt, are not capable of automati-
575 cally determining the names of your mailboxes. OfflineIMAP can
576 help these programs by writing the names of the folders ni a
577 format you specify. See the example offlineimap.conf for
578 details.
579
580 Can I synchronize multiple accounts with OfflineIMAP?
581 Sure. Just name them all in the accounts line in the general
582 section of the configuration file, and add a per-account section
583 for each one.
584
585 Does OfflineIMAP support POP?
586 No. POP is not robust enough to do a completely reliable multi-
587 machine synchronization like OfflineIMAP can do. OfflineIMAP
588 will not support it.
589
590 Does OfflineIMAP support mailbox formats other than Maildir?
591 Not at present. There is no technical reason not to; just no
592 demand yet. Maildir is a superior format anyway. However,
593 OfflineIMAP can sync between two IMAP servers, and some IMAP
594 servers support other formats. You could install an IMAP server
595 on your local machine and have OfflineIMAP sync to that.
596
597 [technical] Why are your Maildir message filenames so huge?
598 OfflineIMAP has two relevant principles: 1) never modifying your
599 messages in any way and 2) ensuring 100% reliable synchroniza-
600 tions. In order to do a reliable sync, OfflineIMAP must have a
601 way to uniquely identify each e-mail. Three pieces of informa-
602 tion are required to do this: your account name, the folder
603 name, and the message UID. The account name can be calculated
604 from the path in which your messages are. The folder name can
605 usually be as well, BUT some mail clients move messages between
606 folders by simply moving the file, leaving the name intact.
607
608 So, OfflineIMAP must store both a UID folder ID. The folder ID
609 is necessary so OfflineIMAP can detect a message moved to a dif-
610 ferent folder. OfflineIMAP stores the UID (U= number) and an
611 md5sum of the foldername (FMD5= number) to facilitate this.
612
613 What is the speed of OfflineIMAP's sync?
614 OfflineIMAP versions 2.0 and above contain a multithreaded sys-
615 tem. A good way to experiment is by setting maxsyncaccounts to
616 3 and maxconnections to 3 in each account clause.
617
618 This lets OfflineIMAP open up multiple connections simultane-
619 ously. That will let it process multiple folders and messages
620 at once. In most cases, this will increase performance of the
621 sync.
622
623 Don't set the number too high. If you do that, things might
624 actually slow down as your link gets saturated. Also, too many
625 connections can cause mail servers to have excessive load.
626 Administrators might take unkindly to this, and the server might
627 bog down. There are many variables in the optimal setting;
628 experimentation may help.
629
630 An informal benchmark yields these results for my setup:
631
632 o 10 minutes with MacOS X Mail.app "manual cache"
633
634 o 5 minutes with GNUS agent sync
635
636 o 20 seconds with OfflineIMAP 1.x
637
638 o 9 seconds with OfflineIMAP 2.x
639
640 o 3 seconds with OfflineIMAP 3.x "cold start"
641
642 o 2 seconds with OfflineIMAP 3.x "held connection"
643
644 CONFORMING TO
645 o Internet Message Access Protocol version 4rev1 (IMAP 4rev1) as speci-
646 fied in RFC2060 and RFC3501
647
648 o CRAM-MD5 as specified in RFC2195
649
650 o Maildir as specified in the Maildir manpage
651 <URL:http://www.qmail.org/qmail-manual-html/man5/maildir.html> and
652 the qmail website <URL:http://cr.yp.to/proto/maildir.html>.
653
654 o Standard Python 2.2.1 as implemented on POSIX-compliant systems.
655
656 NOTES
657 DELETING LOCAL FOLDERS
658 OfflineIMAP does a two-way synchronization. That is, if you make a
659 change to the mail on the server, it will be propogated to your local
660 copy, and vise-versa. Some people might think that it would be wise to
661 just delete all their local mail folders periodically. If you do this
662 with OfflineIMAP, remember to also remove your local status cache
663 (~/.offlineimap by default). Otherwise, OfflineIMAP will take this as
664 an intentional deletion of many messages and will interpret your action
665 as requesting them to be deleted from the server as well. (If you
666 don't understand this, don't worry; you probably won't encounter this
667 situation)
668
669 MULTIPLE INSTANCES
670 OfflineIMAP is not designed to have several instances (for instance, a
671 cron job and an interactive invocation) run over the same mailbox
672 simultaneously. It will perform a check on startup and abort if
673 another OfflineIMAP is already running. If you need to schedule syn-
674 chronizations, please use the autorefresh settings rather than cron.
675 Alternatively, you can set a separate metadata directory for each
676 instance.
677
678 COPYING MESSAGES BETWEEN FOLDERS
679 Normally, when you copy a message between folders or add a new message
680 to a folder locally, OfflineIMAP will just do the right thing. How-
681 ever, sometimes this can be tricky -- if your IMAP server does not pro-
682 vide the SEARCH command, or does not return something useful,
683 OfflineIMAP cannot determine the new UID of the message. So, in these
684 rare instances, OfflineIMAP will upload the message to the IMAP server
685 and delete it from your local folder. Then, on your next sync, the
686 message will be re-downloaded with the proper UID. OfflineIMAP makes
687 sure that the message was properly uploaded before deleting it, so
688 there should be no risk of data loss.
689
690 USE WITH EVOLUTION
691 OfflineIMAP can work with Evolution. To do so, first configure your
692 OfflineIMAP account to have sep = / in its configuration. Then, con-
693 figure Evolution with the "Maildir-format mail directories" server
694 type. For the path, you will need to specify the name of the top-level
695 folder inside your OfflineIMAP storage location. You're now set!
696
697 USE WITH KMAIL
698 At this time, I believe that OfflineIMAP with Maildirs is not compati-
699 ble with KMail. KMail cannot work in any mode other than to move all
700 messages out of all folders immediately, which (besides being annoying
701 and fundamentally broken) is incompatible with OfflineIMAP.
702
703 However, I have made KMail version 3 work well with OfflineIMAP by
704 installing an IMAP server on my local machine, having OfflineIMAP sync
705 to that, and pointing KMail at the same server.
706
707 MAILING LIST
708 There is an OfflineIMAP mailing list available. To subscribe, send the
709 text "Subscribe" in the subject of a mail to offlineimap-request@com-
710 plete.org. To post, send the message to offlineimap@complete.org.
711 Archives are available at
712 <URL:http://lists.complete.org/offlineimap@complete.org/>.
713
714 BUGS
715 Reports of bugs should be sent via e-mail to the OfflineIMAP bug-track-
716 ing system (BTS) at offlineimap@bugs.complete.org or submitted online
717 using the web interface <URL:http://bugs.complete.org/>.
718
719 The Web site also lists all current bugs, where you can check their
720 status or contribute to fixing them.
721
722 UPGRADING TO 4.0
723 If you are upgrading from a version of OfflineIMAP prior to 3.99.12,
724 you will find that you will get errors when OfflineIMAP starts up
725 (relating to ConfigParser or AccountHashGenerator) and the configura-
726 tion file. This is because the config file format had to change to
727 accomodate new features in 4.0. Fortunately, it's not difficult to
728 adjust it to suit.
729
730 First thing you need to do is stop any running OfflineIMAP instance,
731 making sure first that it's synced all your mail. Then, modify your
732 ~/.offlineimaprc file. You'll need to split up each account section
733 (make sure that it now starts with "Account ") into two Repository sec-
734 tions (one for the local side and another for the remote side.) See
735 the files offlineimap.conf.minimal and offlineimap.conf in the distri-
736 bution if you need more assistance.
737
738 OfflineIMAP's status directory area has also changed. Therefore, you
739 should delete everything in ~/.offlineimap as well as your local mail
740 folders.
741
742 When you start up OfflineIMAP 4.0, it will re-download all your mail
743 from the server and then you can continue using it like normal.
744
745 COPYRIGHT
746 OfflineIMAP, and this manual, are Copyright (C) 2002, 2003 John
747 Goerzen.
748
749 This program is free software; you can redistribute it and/or modify it
750 under the terms of the GNU General Public License as published by the
751 Free Software Foundation; either version 2 of the License, or (at your
752 option) any later version.
753
754 This program is distributed in the hope that it will be useful, but
755 WITHOUT ANY WARRANTY; without even the implied warranty of MER-
756 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
757 Public License for more details.
758
759 You should have received a copy of the GNU General Public License along
760 with this program; if not, write to the Free Software Foundation, Inc.,
761 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
762
763 imaplib.py comes from the Python dev tree and is licensed under the
764 GPL-compatible PSF license as stated in the file COPYRIGHT in the
765 OfflineIMAP distribution.
766
767 AUTHOR
768 OfflineIMAP, its libraries, documentation, and all included files,
769 except where noted, was written by John Goerzen <jgoerzen@complete.org>
770 and copyright is held as stated in the COPYRIGHT section.
771
772 OfflineIMAP may be downloaded, and information found, from its homepage
773 via either Gopher <URL:gopher://quux.org/1/devel/offlineimap> or HTTP
774 <URL:http://quux.org/devel/offlineimap>.
775
776 OfflineIMAP may also be downloaded using Subversion. Additionally, the
777 distributed tar.gz may be updated with a simple "svn update" command;
778 it is ready to go. For information on getting OfflineIMAP with Subver-
779 sion, please visit the complete.org Subversion page
780 <URL:http://svn.complete.org/>.
781
782 SEE ALSO
783 mutt(1), python(1)
784
785
786
787 John Goerzen 18 July 2003 OFFLINEIMAP(1)