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