]> code.delx.au - offlineimap/blob - manual.txt
Noted date fix in changelog
[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://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 CONFIGURATION
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 default 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 fuch-
312 sia 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 xsw = x.startswith(prefix)
475 ysw = y.startswith(prefix)
476 if xsw and ysw:
477 return cmp(x, y)
478 elif xsw:
479 return -1
480 elif ysw:
481 return +1
482 return cmp(x, y)
483
484 def test_mycmp():
485 import os, os.path
486 folders=os.listdir(os.path.expanduser('~/data/mail/tv@hq.yok.utu.fi'))
487 folders.sort(mycmp)
488 print folders
489
490 This code snippet illustrates how the foldersort option can be cus-
491 tomized with a Python function from the pythonfile to always synchro-
492 nize certain folders first.
493
494 ERRORS
495 If you get one of some frequently-encountered or confusing errors,
496 please check this section.
497
498 UID VALIDITY PROBLEM FOR FOLDER
499 IMAP servers use a unique ID (UID) to refer to a specific message.
500 This number is guaranteed to be unique to a particular message forever.
501 No other message in the same folder will ever get the same UID. UIDs
502 are an integral part of OfflineIMAP's synchronization scheme; they are
503 used to match up messages on your computer to messages on the server.
504
505 Sometimes, the UIDs on the server might get reset. Usually this will
506 happen if you delete and then recreate a folder. When you create a
507 folder, the server will often start the UID back from 1. But
508 OfflineIMAP might still have the UIDs from the previous folder by the
509 same name stored. OfflineIMAP will detect this condition and skip the
510 folder. This is GOOD, because it prevents data loss.
511
512 You can fix it by removing your local folder and cache data. For
513 instance, if your folders are under ~/Folders and the folder with the
514 problem is INBOX, you'd type this:
515
516 rm -r ~/Folders/INBOX
517 rm -r ~/.offlineimap/Account-AccountName
518 rm -r ~/.offlineimap/Repository-RepositoryName
519
520 (Of course, replace AccountName and RepositoryName with the names as
521 specified in ~/.offlineimaprc).
522
523 Next time you run OfflineIMAP, it will re-download the folder with the
524 new UIDs. Note that the procedure specified above will lose any local
525 changes made to the folder.
526
527 Some IMAP servers are broken and do not support UIDs properly. If you
528 continue to get this error for all your folders even after performing
529 the above procedure, it is likely that your IMAP server falls into this
530 category. OfflineIMAP is incompatible with such servers. Using
531 OfflineIMAP with them will not destroy any mail, but at the same time,
532 it will not actually synchronize it either. (OfflineIMAP will detect
533 this condition and abort prior to synchronization.)
534
535 This question comes up frequently on the OfflineIMAP mailing list
536 <URL:http://lists.complete.org/offlineimap@complete.org/>. You can
537 find a detailed discussion <URL:http://lists.com-
538 plete.org/offlineimap@complete.org/2003/04/msg00012.html.gz> of the
539 problem there.
540
541 OTHER FREQUENTLY ASKED QUESTIONS
542 There are some other FAQs that might not fit into another section of
543 the document, so they are discussed here.
544
545 What platforms does OfflineIMAP run on?
546 It should run on most platforms supported by Python, which are
547 quite a few. I do not support Windows myself, but some have
548 made it work there; see the FAQ entry for that platform.
549
550 I'm using Mutt. Other IMAP sync programs require me to use "set
551 maildir_trash=yes". Do I need to do that with OfflineIMAP?
552 No. OfflineIMAP is smart enough to figure out message deletion
553 without this extra crutch. You'll get the best results if you
554 don't use this setting, in fact.
555
556 I've upgraded and now OfflineIMAP crashes when I start it up! Why?
557 You need to upgrade your configuration file. See [XRef to
558 UPGRADING.4.0] at the end of this manual.
559
560 How do I specify the names of my folders?
561 You do not need to. OfflineIMAP is smart enough to automati-
562 cally figure out what folders are present on the IMAP server and
563 synchronize them. You can use the folderfilter and nametrans
564 configuration file options to request certain folders and rename
565 them as they come in if you like.
566
567 How can I prevent certain folders from being synced?
568 Use the folderfilter option in the configuration file.
569
570 How can I add or delete a folder?
571 OfflineIMAP does not currently provide this feature, but if you
572 create a new folder on the IMAP server, it will be created
573 locally automatically.
574
575 Are there any other warnings that I should be aware of?
576 Yes; see the Notes section below.
577
578 What is the mailbox name recorder (mbnames) for?
579 Some mail readers, such as Mutt, are not capable of automati-
580 cally determining the names of your mailboxes. OfflineIMAP can
581 help these programs by writing the names of the folders in a
582 format you specify. See the example offlineimap.conf for
583 details.
584
585 Can I synchronize multiple accounts with OfflineIMAP?
586 Sure. Just name them all in the accounts line in the general
587 section of the configuration file, and add a per-account section
588 for each one.
589
590 Does OfflineIMAP support POP?
591 No. POP is not robust enough to do a completely reliable multi-
592 machine synchronization like OfflineIMAP can do. OfflineIMAP
593 will not support it.
594
595 Does OfflineIMAP support mailbox formats other than Maildir?
596 Not at present. There is no technical reason not to; just no
597 demand yet. Maildir is a superior format anyway. However,
598 OfflineIMAP can sync between two IMAP servers, and some IMAP
599 servers support other formats. You could install an IMAP server
600 on your local machine and have OfflineIMAP sync to that.
601
602 [technical] Why are your Maildir message filenames so huge?
603 OfflineIMAP has two relevant principles: 1) never modifying your
604 messages in any way and 2) ensuring 100% reliable
605 synchronizations. In order to do a reliable sync, OfflineIMAP
606 must have a way to uniquely identify each e-mail. Three pieces
607 of information are required to do this: your account name, the
608 folder name, and the message UID. The account name can be cal-
609 culated from the path in which your messages are. The folder
610 name can usually be as well, BUT some mail clients move messages
611 between folders by simply moving the file, leaving the name
612 intact.
613
614 So, OfflineIMAP must store both a UID folder ID. The folder ID
615 is necessary so OfflineIMAP can detect a message moved to a dif-
616 ferent folder. OfflineIMAP stores the UID (U= number) and an
617 md5sum of the foldername (FMD5= number) to facilitate this.
618
619 What is the speed of OfflineIMAP's sync?
620 OfflineIMAP versions 2.0 and above contain a multithreaded sys-
621 tem. A good way to experiment is by setting maxsyncaccounts to
622 3 and maxconnections to 3 in each account clause.
623
624 This lets OfflineIMAP open up multiple connections simultane-
625 ously. That will let it process multiple folders and messages
626 at once. In most cases, this will increase performance of the
627 sync.
628
629 Don't set the number too high. If you do that, things might
630 actually slow down as your link gets saturated. Also, too many
631 connections can cause mail servers to have excessive load.
632 Administrators might take unkindly to this, and the server might
633 bog down. There are many variables in the optimal setting;
634 experimentation may help.
635
636 An informal benchmark yields these results for my setup:
637
638 o 10 minutes with MacOS X Mail.app "manual cache"
639
640 o 5 minutes with GNUS agent sync
641
642 o 20 seconds with OfflineIMAP 1.x
643
644 o 9 seconds with OfflineIMAP 2.x
645
646 o 3 seconds with OfflineIMAP 3.x "cold start"
647
648 o 2 seconds with OfflineIMAP 3.x "held connection"
649
650 Can I use OfflineIMAP on Windows?
651 These answers have been reported by OfflineIMAP users. I do not
652 run OfflineIMAP on Windows myself, so I can't directly address
653 their accuracy.
654
655 The basic answer is that it's possible and doesn't require hack-
656 ing OfflineIMAP source code. However, it's not necessarily
657 trivial. The information below is based in instructions submit-
658 ted by Chris Walker.
659
660 First, you must run OfflineIMAP in the Cygwin
661 <URL:http://www.cygwin.com/> environment.
662
663 Next, you'll need to mount your Maildir directory in a special
664 way. There is information for doing that at
665 <URL:http://barnson.org/node/view/295>. That site gives this
666 example:
667
668 mount -f -s -b -o managed "d:/tmp/mail" "/home/of/mail"
669
670
671 That URL also has more details on making OfflineIMAP work with
672 Windows.
673
674 CONFORMING TO
675 o Internet Message Access Protocol version 4rev1 (IMAP 4rev1) as speci-
676 fied in RFC2060 and RFC3501
677
678 o CRAM-MD5 as specified in RFC2195
679
680 o Maildir as specified in the Maildir manpage
681 <URL:http://www.qmail.org/qmail-manual-html/man5/maildir.html> and
682 the qmail website <URL:http://cr.yp.to/proto/maildir.html>.
683
684 o Standard Python 2.2.1 as implemented on POSIX-compliant systems.
685
686 NOTES
687 DELETING LOCAL FOLDERS
688 OfflineIMAP does a two-way synchronization. That is, if you make a
689 change to the mail on the server, it will be propagated to your local
690 copy, and vise-versa. Some people might think that it would be wise to
691 just delete all their local mail folders periodically. If you do this
692 with OfflineIMAP, remember to also remove your local status cache
693 (~/.offlineimap by default). Otherwise, OfflineIMAP will take this as
694 an intentional deletion of many messages and will interpret your action
695 as requesting them to be deleted from the server as well. (If you
696 don't understand this, don't worry; you probably won't encounter this
697 situation)
698
699 MULTIPLE INSTANCES
700 OfflineIMAP is not designed to have several instances (for instance, a
701 cron job and an interactive invocation) run over the same mailbox
702 simultaneously. It will perform a check on startup and abort if
703 another OfflineIMAP is already running. If you need to schedule syn-
704 chronizations, please use the autorefresh settings rather than cron.
705 Alternatively, you can set a separate metadata directory for each
706 instance.
707
708 COPYING MESSAGES BETWEEN FOLDERS
709 Normally, when you copy a message between folders or add a new message
710 to a folder locally, OfflineIMAP will just do the right thing. How-
711 ever, sometimes this can be tricky -- if your IMAP server does not pro-
712 vide the SEARCH command, or does not return something useful,
713 OfflineIMAP cannot determine the new UID of the message. So, in these
714 rare instances, OfflineIMAP will upload the message to the IMAP server
715 and delete it from your local folder. Then, on your next sync, the
716 message will be re-downloaded with the proper UID. OfflineIMAP makes
717 sure that the message was properly uploaded before deleting it, so
718 there should be no risk of data loss.
719
720 USE WITH EVOLUTION
721 OfflineIMAP can work with Evolution. To do so, first configure your
722 OfflineIMAP account to have sep = / in its configuration. Then, con-
723 figure Evolution with the "Maildir-format mail directories" server
724 type. For the path, you will need to specify the name of the top-level
725 folder inside your OfflineIMAP storage location. You're now set!
726
727 USE WITH KMAIL
728 At this time, I believe that OfflineIMAP with Maildirs is not compati-
729 ble with KMail. KMail cannot work in any mode other than to move all
730 messages out of all folders immediately, which (besides being annoying
731 and fundamentally broken) is incompatible with OfflineIMAP.
732
733 However, I have made KMail version 3 work well with OfflineIMAP by
734 installing an IMAP server on my local machine, having OfflineIMAP sync
735 to that, and pointing KMail at the same server.
736
737 MAILING LIST
738 There is an OfflineIMAP mailing list available. To subscribe, send the
739 text "Subscribe" in the subject of a mail to offlineimap-request@com-
740 plete.org. To post, send the message to offlineimap@complete.org.
741 Archives are available at
742 <URL:http://lists.complete.org/offlineimap@complete.org/>.
743
744 BUGS
745 Reports of bugs should be sent via e-mail to the OfflineIMAP mailing
746 list at offlineimap at complete dot org. Debian users are encouraged
747 to instead use the Debian bug-tracking system.
748
749 UPGRADING TO 4.0
750 If you are upgrading from a version of OfflineIMAP prior to 3.99.12,
751 you will find that you will get errors when OfflineIMAP starts up
752 (relating to ConfigParser or AccountHashGenerator) and the configura-
753 tion file. This is because the config file format had to change to
754 accommodate new features in 4.0. Fortunately, it's not difficult to
755 adjust it to suit.
756
757 First thing you need to do is stop any running OfflineIMAP instance,
758 making sure first that it's synced all your mail. Then, modify your
759 ~/.offlineimaprc file. You'll need to split up each account section
760 (make sure that it now starts with "Account ") into two Repository sec-
761 tions (one for the local side and another for the remote side.) See
762 the files offlineimap.conf.minimal and offlineimap.conf in the distri-
763 bution if you need more assistance.
764
765 OfflineIMAP's status directory area has also changed. Therefore, you
766 should delete everything in ~/.offlineimap as well as your local mail
767 folders.
768
769 When you start up OfflineIMAP 4.0, it will re-download all your mail
770 from the server and then you can continue using it like normal.
771
772 COPYRIGHT
773 OfflineIMAP, and this manual, are Copyright 2002, 2003 John Goerzen.
774
775 This program is free software; you can redistribute it and/or modify it
776 under the terms of the GNU General Public License as published by the
777 Free Software Foundation; either version 2 of the License, or (at your
778 option) any later version.
779
780 This program is distributed in the hope that it will be useful, but
781 WITHOUT ANY WARRANTY; without even the implied warranty of MER-
782 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
783 Public License for more details.
784
785 You should have received a copy of the GNU General Public License along
786 with this program; if not, write to the Free Software Foundation, Inc.,
787 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
788
789 imaplib.py comes from the Python dev tree and is licensed under the
790 GPL-compatible PSF license as stated in the file COPYRIGHT in the
791 OfflineIMAP distribution.
792
793 AUTHOR
794 OfflineIMAP, its libraries, documentation, and all included files,
795 except where noted, was written by John Goerzen <jgoerzen@complete.org>
796 and copyright is held as stated in the COPYRIGHT section.
797
798 OfflineIMAP may be downloaded, and information found, from its homepage
799 via either Gopher <URL:gopher://quux.org/1/devel/offlineimap> or HTTP
800 <URL:http://quux.org/devel/offlineimap>.
801
802 OfflineIMAP may also be downloaded using Subversion. Additionally, the
803 distributed tar.gz may be updated with a simple "svn update" command;
804 it is ready to go. For information on getting OfflineIMAP with Subver-
805 sion, please visit the complete.org Subversion page
806 <URL:http://svn.complete.org/>.
807
808 SEE ALSO
809 mutt(1), python(1)
810
811 HISTORY
812 Detailed history may be found in the file ChangeLog in the OfflineIMAP
813 distribution. Feature and bug histories may be found in the file
814 debian/changelog which, despite its name, is not really Debian-spe-
815 cific. This section provides a large overview.
816
817 Development on OfflineIMAP began on June 18, 2002. Version 1.0.0 was
818 released three days later on June 21, 2002. Point releases followed,
819 including speed optimizations and some compatibility fixes.
820
821 Version 2.0.0 was released on July 3, 2002, and represented the first
822 time the synchronization became multithreaded and, to the best of my
823 knowledge, the first multithreaded IMAP syncrhonizing application in
824 existance. The last 2.0.x release, 2.0.8, was made on July 9.
825
826 Version 3.0.0 was released on July 11, 2002, and introduced modular
827 user interfaces and the first GUI interface for OfflineIMAP. This man-
828 ual also was introduced with 3.0.0, along with many command-line
829 options. Version 3.1.0 was released on July 21, adding the Noninterac-
830 tive user interfaces, profiling support, and several bugfixes. 3.2.0
831 was released on July 24, adding support for the Blinkenlights GUI
832 interface. OfflineIMAP entered maintenance mode for awhile, as it had
833 reached a feature-complete milestone in my mind.
834
835 The 3.99.x branch began in on October 7, 2002, to begin work for 4.0.
836 The Curses.Blinkenlights interface was added in 3.99.6, and many archi-
837 tectural changes were made.
838
839 4.0.0 was released on July 18, 2003, including the ability to synchro-
840 nize directly between two IMAP servers, the first re-architecting of
841 the configuration file to refine the notion of an account, and the new
842 Curses interface.
843
844
845
846 John Goerzen 17 June 2005 OFFLINEIMAP(1)