]> code.delx.au - offlineimap/blob - offlineimap.1
Add the FAQ
[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" "01 December 2006" "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://software.complete.org/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://software.complete.org/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://software.complete.org/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://software.complete.org/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 .SH "CONFORMING TO"
640 .TP 0.2i
641 \(bu
642 Internet Message Access Protocol version 4rev1 (IMAP 4rev1) as
643 specified in RFC2060 and RFC3501
644 .TP 0.2i
645 \(bu
646 CRAM-MD5 as specified in RFC2195
647 .TP 0.2i
648 \(bu
649 Maildir as specified in
650 the Maildir manpage <URL:http://www.qmail.org/qmail-manual-html/man5/maildir.html> and
651 the qmail website <URL:http://cr.yp.to/proto/maildir.html>\&.
652 .TP 0.2i
653 \(bu
654 Standard Python 2.2.1 as implemented on POSIX-compliant systems.
655 .SH "NOTES"
656 .SS "DELETING LOCAL FOLDERS"
657 .PP
658 \fBOfflineIMAP\fR does a two-way synchronization. That is, if you
659 make a change to the mail on the server, it will be propagated to your
660 local copy, and vise-versa. Some people might think that it would be
661 wise to just delete all their local mail folders periodically. If you
662 do this with \fBOfflineIMAP\fR, remember to also remove your local status
663 cache (\fI~/.offlineimap\fR by default). Otherwise, \fBOfflineIMAP\fR will take
664 this as an intentional deletion of many messages and will interpret
665 your action as requesting them to be deleted from the server as well.
666 (If you don't understand this, don't worry; you probably won't
667 encounter this situation)
668 .SS "MULTIPLE INSTANCES"
669 .PP
670 \fBOfflineIMAP\fR is not designed to have several instances (for instance, a cron job and an interactive invocation) run over the same
671 mailbox simultaneously. It will perform a check on startup and
672 abort if another \fBOfflineIMAP\fR is already running. If you need
673 to schedule synchronizations, please use the
674 \fIautorefresh\fR settings rather than cron.
675 Alternatively, you can set a separate \fImetadata\fR
676 directory for each instance.
677 .SS "COPYING MESSAGES BETWEEN FOLDERS"
678 .PP
679 Normally, when you copy a message between folders or add a new message
680 to a folder locally, \fBOfflineIMAP\fR
681 will just do the right thing. However, sometimes this can be tricky
682 -- if your IMAP server does not provide the SEARCH command, or does
683 not return something useful, \fBOfflineIMAP\fR
684 cannot determine the new UID of the message. So, in these rare
685 instances, OfflineIMAP will upload the message to the IMAP server and
686 delete it from your local folder. Then, on your next sync, the
687 message will be re-downloaded with the proper UID.
688 \fBOfflineIMAP\fR makes sure that the message was properly uploaded before deleting it,
689 so there should be no risk of data loss.
690 .SS "MAILING LIST"
691 .PP
692 There is an OfflineIMAP mailing list available.
693 To subscribe, send the text "Subscribe" in the subject of a mail to
694 offlineimap-request@complete.org. To post, send the message to
695 offlineimap@complete.org. Archives are available at
696 <URL:http://lists.complete.org/offlineimap@complete.org/>\&.
697 .SS "BUGS"
698 .PP
699 Reports of bugs should be reported online at the
700 \fBOfflineIMAP\fR homepage.
701 Debian users are encouraged to instead use the
702 Debian
703 bug-tracking system.
704 .SH "UPGRADING TO 4.0"
705 .PP
706 If you are upgrading from a version of \fBOfflineIMAP\fR prior to
707 3.99.12, you will find that you will get errors when
708 \fBOfflineIMAP\fR starts up (relating to ConfigParser or
709 AccountHashGenerator) and the
710 configuration file. This is because the config file format
711 had to change to accommodate new features in 4.0. Fortunately,
712 it's not difficult to adjust it to suit.
713 .PP
714 First thing you need to do is stop any running \fBOfflineIMAP\fR
715 instance, making sure first that it's synced all your mail.
716 Then, modify your
717 \fI~/.offlineimaprc\fR file. You'll need to
718 split up each account section (make sure that it now starts
719 with "Account ") into two Repository sections (one for the
720 local side and another for the remote side.) See the files
721 \fIofflineimap.conf.minimal\fR and
722 \fIofflineimap.conf\fR in the distribution if
723 you need more assistance.
724 .PP
725 \fBOfflineIMAP\fR\&'s status directory area has also changed.
726 Therefore, you should delete everything in ~/.offlineimap as
727 well as your local mail folders.
728 .PP
729 When you start up \fBOfflineIMAP\fR 4.0, it will re-download all
730 your mail from the server and then you can continue using it
731 like normal.
732 .SH "COPYRIGHT"
733 .PP
734 OfflineIMAP, and this manual, are Copyright (C) 2002 - 2006 John Goerzen.
735 .PP
736 This program is free software; you can redistribute it and/or modify
737 it under the terms of the GNU General Public License as published by
738 the Free Software Foundation; either version 2 of the License, or
739 (at your option) any later version.
740 .PP
741 This program is distributed in the hope that it will be useful,
742 but WITHOUT ANY WARRANTY; without even the implied warranty of
743 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
744 GNU General Public License for more details.
745 .PP
746 You should have received a copy of the GNU General Public License
747 along with this program; if not, write to the Free Software
748 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
749 .PP
750 imaplib.py comes from the Python dev tree and is licensed under
751 the GPL-compatible PSF license as stated in the file
752 \fICOPYRIGHT\fR in the \fBOfflineIMAP\fR
753 distribution.
754 .SH "AUTHOR"
755 .PP
756 \fBOfflineIMAP\fR, its libraries, documentation, and all included files, except where
757 noted, was written by John Goerzen <jgoerzen@complete.org> and
758 copyright is held as stated in the COPYRIGHT section.
759 .PP
760 \fBOfflineIMAP\fR may be downloaded, and information found, from its
761 homepage <URL:http://software.complete.org/offlineimap>\&.
762 .SH "SEE ALSO"
763 .PP
764 \fBmutt\fR(1),
765 \fBpython\fR(1)
766 .SH "HISTORY"
767 .PP
768 Detailed history may be found in the file ChangeLog in the
769 \fBOfflineIMAP\fR distribution. Feature and bug histories may be
770 found in the file debian/changelog which, despite its name, is
771 not really Debian-specific. This section provides a large
772 overview.
773 .PP
774 Development on \fBOfflineIMAP\fR began on June 18, 2002. Version
775 1.0.0 was released three days later on June 21, 2002. Point
776 releases followed, including speed optimizations and some
777 compatibility fixes.
778 .PP
779 Version 2.0.0 was released on July 3, 2002, and
780 represented the first time the synchronization became
781 multithreaded and, to the best of my knowledge, the first
782 multithreaded IMAP syncrhonizing application in existance.
783 The last 2.0.x release, 2.0.8, was made on July 9.
784 .PP
785 Version 3.0.0 was released on July 11, 2002, and introduced
786 modular user interfaces and the first GUI interface for
787 \fBOfflineIMAP\fR\&. This manual also was introduced with 3.0.0,
788 along with many command-line options. Version 3.1.0 was
789 released on July 21, adding the Noninteractive user
790 interfaces, profiling support, and several bugfixes. 3.2.0
791 was released on July 24, adding support for the Blinkenlights
792 GUI interface. \fBOfflineIMAP\fR entered maintenance mode for
793 awhile, as it had reached a feature-complete milestone in my
794 mind.
795 .PP
796 The 3.99.x branch began in on October 7, 2002, to begin work
797 for 4.0. The Curses.Blinkenlights interface was added in
798 3.99.6, and many architectural changes were made.
799 .PP
800 4.0.0 was released on July 18, 2003, including the ability to
801 synchronize directly between two IMAP servers, the first
802 re-architecting of the configuration file to refine the
803 notion of an account, and the new Curses interface.