docker-offlineimap/offlineimap/head/offlineimap.sgml

569 lines
22 KiB
Plaintext
Raw Normal View History

<!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!ENTITY OfflineIMAP "<application>OfflineIMAP</application>">
]>
<!-- -*- DocBook -*- -->
<!-- "file:///usr/share/sgml/docbook/dtd/xml/4.2/docbookx.dtd"> -->
<reference>
<title>OfflineIMAP Manual</title>
<refentry>
<refentryinfo>
<address><email>jgoerzen@complete.org</email></address>
<author><firstname>John</firstname><surname>Goerzen</surname></author>
2003-01-08 21:48:41 +01:00
<date> $Date: 2003-01-08 08:48:41 -0600 (Wed, 08 Jan 2003) $ </date>
</refentryinfo>
<refmeta>
<refentrytitle>offlineimap</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo>John Goerzen</refmiscinfo>
</refmeta>
<refnamediv>
<refname>OfflineIMAP</refname>
<refpurpose>Powerful IMAP/Maildir synchronization
and reader support</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>offlineimap</command>
<arg>-1</arg>
<arg>-P <replaceable>profiledir</replaceable></arg>
<arg>-a <replaceable>accountlist</replaceable></arg>
<arg>-c <replaceable>configfile</replaceable></arg>
<arg>-d <replaceable>debugtype[,...]</replaceable></arg>
<arg>-o</arg>
<arg>-u <replaceable>interface</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>offlineimap</command>
<group choice="plain"><arg>-h</arg><arg>--help</arg></group>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>&OfflineIMAP; is a tool to simplify your e-mail
reading. With &OfflineIMAP;, you can read the same mailbox
from multiple computers. You get a current copy of your
messages on each computer, and changes you make one place will be
visible on all other systems. For instance, you can delete a message
on your home computer, and it will appear deleted on your work
computer as well. &OfflineIMAP; is also useful if you want to
use a mail reader that does not have IMAP support, has poor IMAP
support, or does not provide disconnected operation.
</para>
<para>&OfflineIMAP; is <emphasis>FAST</emphasis>; it synchronizes
my two accounts with over 50 folders in 3 seconds. Other
similar tools might take over a minute, and achieve a
less-reliable result. Some mail readers can take over 10
minutes to do the same thing, and some don't even support it
at all. Unlike other mail tools, &OfflineIMAP; features a
multi-threaded synchronization algorithm that can dramatically
speed up performance in many situations by synchronizing
several different things simultaneously.
</para>
<para>&OfflineIMAP; is <emphasis>FLEXIBLE</emphasis>; you can
customize which folders are synced via regular expressions,
lists, or Python expressions; a versatile and comprehensive
configuration file is used to control behavior; two user
interfaces are built-in; fine-tuning of synchronization
performance is possible; internal or external automation is
supported; SSL and PREAUTH tunnels are both supported; offline
(or "unplugged") reading is supported; and esoteric IMAP
features are supported to ensure compatibility with the widest
variety of IMAP servers.
</para>
<para>&OfflineIMAP; is <emphasis>SAFE</emphasis>; it uses an
algorithm designed to prevent mail loss at all costs. Because
of the design of this algorithm, even programming errors
should not result in loss of mail. I am so confident in the
algorithm that I use my own personal and work accounts for
testing of &OfflineIMAP; pre-release, development, and beta
releases. Of course, legally speaking, &OfflineIMAP; comes
with no warranty, so I am not responsible if this turns out
to be wrong.
</para>
<refsect2>
<title>Method of Operation</title>
<para>&OfflineIMAP; operates by maintaining a hierarchy of
mail folders in Maildir format locally. Your own mail
reader will read mail from this tree, and need never know
that the mail comes from IMAP. &OfflineIMAP; will detect
changes to the mail folders on your IMAP server and your own
computer and bi-directionally synchronize them, copying,
marking, and deleting messages as necessary.
</para>
</refsect2>
</refsect1>
<refsect1>
<title>Quick Start</title>
<para>If you have already installed &OfflineIMAP; system-wide,
or your system adminstrator has done that for you, your task
for setting up &OfflineIMAP; for the first time is quite
simple. You just need to set up your configuration file, make
your folder directory, and run it!
</para>
<para>You can quickly set up your configuration file. The distribution
includes a file <filename>offlineimap.conf.minimal</filename>
(Debian users
may find this at
<filename>/usr/share/doc/offlineimap/examples/offlineimap.conf.minimal</filename>) that is a basic example of setting of &OfflineIMAP;. You can
simply copy this file into your home directory and name it
<filename>.offlineimaprc</filename> (note the leading period). A
command such as <command>cp offlineimap.conf.minimal ~/.offlineimaprc</command> will do it. Or, if you prefer, you can just copy this text to
<filename>~/.offlineimaprc</filename>:
</para>
<PROGRAMLISTING>[general]
accounts = Test
[Test]
localfolders = ~/Test
remotehost = examplehost
remoteuser = jgoerzen
</PROGRAMLISTING>
<para>Now, edit the <filename>~/.offlineimaprc</filename> file with
your favorite editor. All you have to do is specify a directory
for your folders to be in (on the <property>localfolders</property>
line), the host name of your IMAP server (on the
<property>remotehost</property> line), and your login name on
the remote (on the <property>remoteuser</property> line). That's
it!</para>
<para>To run &OfflineIMAP;, you just have to say
<command>offlineimap</command> -- it will fire up, ask you for
a login password if necessary, synchronize your folders, and exit.
See? You can just throw away the rest of this finely-crafted,
perfectly-honed manual! Of course, if you want to see how you can
make &OfflineIMAP; FIVE TIMES FASTER FOR JUST $19.95 (err, well,
$0), you have to read on!
</para>
</refsect1>
2003-01-08 04:04:35 +01:00
<refsect1>
<title>Installation</title>
<para>If you are reading this document via the "man" command, it is
likely
that you have no installation tasks to perform; your system
administrator has already installed it. If you need to install it
yourself, you have three options: a system-wide installation with
Debian, system-wide installation with other systems, and a single-user
installation. You can download the latest version of &OfflineIMAP; from
<ulink url="http://quux.org/devel/offlineimap/">the &OfflineIMAP;
website</ulink>.
</para>
<refsect2>
<title>Prerequisites</title>
<para>In order to use &OfflineIMAP;, you need to have these conditions
satisfied:
</para>
<itemizedlist>
<listitem>
<para>Your mail server must support IMAP. Most Internet Service
Providers
and corporate networks do, and most operating systems
have an IMAP
implementation readily available.
</para>
</listitem>
<listitem>
<para>
You must have Python version 2.2.1 or above installed.
If you are
running on Debian GNU/Linux, this requirement will automatically be
taken care of for you. If you do not have Python already, check with
your system administrator or operating system vendor; or, download it from
<ulink url="http://www.python.org/">the Python website</ulink>.
If you intend to use the Tk interface, you must have Tkinter
(python-tk) installed. If you intend to use the SSL interface, your
Python must have been built with SSL support.
</para>
</listitem>
<listitem>
<para>
Have a mail reader that supports the Maildir mailbox format. Most
modern mail readers have this support built-in, so you can choose from
a wide variety of mail servers. This format is also known as the
"qmail" format, so any mail reader compatible with it will work with
&OfflineIMAP;.
</itemizedlist>
</refsect2>
<refsect2>
<title>System-Wide Installation, Debian</title>
<para>
If you are tracking Debian unstable, you may install
&OfflineIMAP; by simply running the following command as root:
</para>
<para>
<command>apt-get install offlineimap</command>
</para>
<para>
If you are not tracking Debian unstable, download the Debian .deb
package from the <ulink url="http://quux.org/devel/offlineimap/">&OfflineIMAP; website</ulink>
and then run <command>dpkg -i</command> to install the downloaded
package. Then, skip to <xref linkend="configuration" endterm="configuration-title"> below. You will type <command>offlineimap</command> to
invoke the program.
</para>
</refsect2>
<refsect2>
<title>System-Wide Installation, Other</title>
<para>
Download the tar.gz version of the package from the
<ulink url="http://quux.org/devel/offlineimap/">website</ulink>.
Then run
these commands, making sure that you are the "root" user first:
</para>
<ProgramListing>tar -zxvf offlineimap_x.y.z.tar.gz
cd offlineimap-x.y.z
python2.2 setup.py install</ProgramListing>
<para>On some systems, you will need to use
<command>python</command> instead of <command>python2.2</command>.
Next, proceed to <xref linkend="configuration" endterm="configuration-title"> below. You will type <command>offlineimap</command> to
invoke the program.
</para>
</refsect2>
<refsect2>
<title>Single-Account Installation</title>
<para>
Download the tar.gz version of the package from the
<ulink url="http://quux.org/devel/offlineimap/">website</ulink>.
Then run these commands:
</para>
<ProgramListing>tar -zxvf offlineimap_x.y.z.tar.gz
cd offlineimap-x.y.z</ProgramListing>
<para>When you want to run &OfflineIMAP;, you will issue the
<command>cd</command> command as above and then type
<command>./offlineimap.py</command>; there is no installation
step necessary.
</para>
</refsect2>
</refsect1>
<refsect1 id="configuration">
<title id="configuration-title">Configruation</title>
<para>
&OfflineIMAP; is regulated by a configuration file that is normally
stored in <filename>~/.offlineimaprc</filename>. &OfflineIMAP;
ships with a file named <filename>offlineimap.conf</filename>
that you should copy to that location and then edit. This file is
vital to proper operation of the system; it sets everything you need
to run &OfflineIMAP;. Full documentation for the configuration file
is included within the sample file.
</para>
<para>
&OfflineIMAP; also ships a file named
<filename>offlineimap.conf.minimal</filename> that you can also try.
It's useful if you want to get started with
the most basic feature set, and you can read about other features
later with <filename>offlineimap.conf</filename>.
</para>
</refsect1>
2003-01-08 05:44:07 +01:00
<refsect1>
<title>Options</title>
<para>
Most configuration is done via the configuration file. Nevertheless,
there are a few command-line options that you may set for
&OfflineIMAP;.
</para>
2003-01-08 04:04:35 +01:00
2003-01-08 05:44:07 +01:00
<variablelist><title>OfflineIMAP arguments</title>
2003-01-08 06:02:43 +01:00
<varlistentry><term>-1</term>
<listitem><para>Disable most multithreading operations and use
solely a single-connection
sync. This effectively sets the <property>maxsyncaccounts</property>
and all <property>maxconnections</property> configuration file
variables to 1.
</para></listitem>
</varlistentry>
<varlistentry><term>-P <replaceable>profiledir</replaceable></term>
<listitem><para>Sets &OfflineIMAP; into profile mode. The program
will create <replaceable>profiledir</replaceable>
(it must not already exist). As it runs, Python profiling
information
about each thread is logged into profiledir. Please note: This option
is present for debugging and optimization only, and should NOT be used
unless you have a specific reason to do so. It will significantly
slow program performance, may reduce reliability, and can generate
huge amounts of data. You must use the <option>-1</option> option when
you use <option>-P</option>.
</para></listitem>
</varlistentry>
<varlistentry><term>-a <replaceable>accountlist</replaceable></term>
<listitem><para>Overrides the <property>accounts</property> option
in the <property>general</property> section of the configuration
file. You might use this to exclude certain accounts, or to sync
some accounts that you normally prefer not to. Separate the
accounts by commas, and use no embedded spaces.
</para></listitem>
</varlistentry>
<varlistentry><term>-c <replaceable>configfile</replaceable></term>
<listitem><para>Specifies a configuration file to use in lieu of
the default, <filename>~/.offlineimaprc</filename>.
</para></listitem>
</varlistentry>
<varlistentry><term>-d <replaceable>debugtype[,...]</replaceable></term>
<listitem><para>Enables debugging for OfflineIMAP. This is useful if
you are trying to track down a malfunction or figure out what is going
on under the hood. I suggest that you use this with
<option>-1</option> to make the results more sensible.</para>
<para><option>-d</option> requires one or more debugtypes,
separated by commas. These define what exactly will be
debugged, and include two options: <property>imap</property>
and <property>maildir</property>. The <property>imap</property>
option will enable IMAP protocol stream and parsing debugging. Note
that the output may contain passwords, so take care to remove that
from the debugging output before sending it to anyone else. The
<property>maildir</property> option will enable debugging for
certain Maildir operations.
</para></listitem>
</varlistentry>
2003-01-08 21:40:39 +01:00
<varlistentry><term>-o</term>
<listitem><para>Run only once, ignoring all
<property>autorefresh</property> settings in the configuration
file.</para>
</listitem>
</varlistentry>
<varlistentry><term>-h</term> <term>--help</term>
<listitem><para>Show summary of options.</para></listitem>
</varlistentry>
<varlistentry><term>-u <replaceable>interface</replaceable></term>
<listitem><para>Specifies an alternative user interface module
to use. This overrides the defailt specified in the
configuration file. The pre-defined options are listed in
the User Interfaces section.</para>
</listitem>
</varlistentry>
2003-01-08 05:44:07 +01:00
</variablelist>
2003-01-08 21:40:39 +01:00
</refsect1>
<refsect1>
<title>User Interfaces</title>
<para>&OfflineIMAP; has a pluggable user interface system that lets you choose how the
program communicates information to you. There are two graphical
interfaces, two terminal interfaces, and two noninteractive interfaces
suitable for scripting or logging purposes. The
<property>ui</property> option in the configuration file specifies
user interface preferences. The <option>-u</option> command-line
option can override the configuration file setting. The available
values for the configuration file or command-line are described
in this section.</para>
<refsect2>
<title>Tk.Blinkenlights</title>
2003-01-08 21:48:41 +01:00
<para>Tk.Blinkenlights is an interface designed to be sleek, fun to watch, and
2003-01-08 21:40:39 +01:00
informative of the overall picture of what &OfflineIMAP;
is doing. I consider it to be the best general-purpose interface in
&OfflineIMAP;.
</para>
<para>
Tk.Blinkenlights contains, by default, a small window with a row of
LEDs, a small log, and a row of command buttons.
The total size of the window is
very small, so it uses little desktop space, yet it is quite
functional. The optional, toggleable, log shows more
detail about what is happening and is color-coded to match the color
of the lights.
</para>
<para>
Tk.Blinkenlights is the only user interface that has configurable
parameters; see the example <filename>offlineimap.conf</filename>
for more details.
</para>
<para>
Each light in the Blinkenlights interface represents a thread
of execution -- that is, a particular task that &OfflineIMAP;
is performing right now. The colors indicate what task
the particular thread is performing, and are as follows:
</para>
<variablelist><title>Blinkenlights Colors</title>
<varlistentry>
<term>Black</term>
2003-01-08 21:48:41 +01:00
<listitem><para>indicates that this light's thread has terminated; it will light up
2003-01-08 21:40:39 +01:00
again later when new threads start up. So, black indicates no
activity.
2003-01-08 21:48:41 +01:00
</para></listitem>
2003-01-08 21:40:39 +01:00
</varlistentry>
<varlistentry>
<term>Red (Meaning 1)</term>
2003-01-08 21:48:41 +01:00
<listitem><para>is the color of the main program's thread, which basically does
2003-01-08 21:40:39 +01:00
nothing but monitor the others. It might remind you of HAL 9000 in
<citation>2001</citation>.
2003-01-08 21:48:41 +01:00
</para></listitem>
2003-01-08 21:40:39 +01:00
</varlistentry>
<varlistentry>
<term>Gray</term>
2003-01-08 21:48:41 +01:00
<listitem><para>indicates that the thread is establishing a new connection to the IMAP
2003-01-08 21:40:39 +01:00
server.
2003-01-08 21:48:41 +01:00
</para></listitem>
2003-01-08 21:40:39 +01:00
</varlistentry>
<varlistentry>
<term>Purple</term>
2003-01-08 21:48:41 +01:00
<listitem><para>is the color of an account synchronization thread that is monitoring
2003-01-08 21:40:39 +01:00
the progress of the folders in that account (not generating any I/O).
2003-01-08 21:48:41 +01:00
</para></listitem>
2003-01-08 21:40:39 +01:00
</varlistentry>
<varlistentry>
<term>Cyan</term>
2003-01-08 21:48:41 +01:00
<listitem><para>indicates that the thread is syncing a folder.
</para></listitem>
2003-01-08 21:40:39 +01:00
</varlistentry>
<varlistentry>
<term>Green</term>
2003-01-08 21:48:41 +01:00
<listitem><para>means that a folder's message list is being loaded.
</para></listitem>
2003-01-08 21:40:39 +01:00
</varlistentry>
<varlistentry>
<term>Blue</term>
2003-01-08 21:48:41 +01:00
<listitem><para>is the color of a message synchronization controller thread.
</para></listitem>
2003-01-08 21:40:39 +01:00
</varlistentry>
<varlistentry>
<term>Orange</term>
2003-01-08 21:48:41 +01:00
<listitem><para>indicates that an actual message is being copied.
2003-01-08 21:40:39 +01:00
(We use fuschia for fake messages.)
2003-01-08 21:48:41 +01:00
</para></listitem>
2003-01-08 21:40:39 +01:00
</varlistentry>
<varlistentry>
<term>Red (meaning 2)</term>
2003-01-08 21:48:41 +01:00
<listitem><para>indicates that a message is being deleted.
</para></listitem>
2003-01-08 21:40:39 +01:00
</varlistentry>
<varlistentry>
<term>Yellow / bright orange</term>
2003-01-08 21:48:41 +01:00
<listitem><para>indicates that message flags are being added.
</para></listitem>
2003-01-08 21:40:39 +01:00
</varlistentry>
<varlistentry>
<term>Pink / bright red</term>
2003-01-08 21:48:41 +01:00
<listitem><para>indicates that message flags are being removed.
</para></listitem>
2003-01-08 21:40:39 +01:00
</varlistentry>
<varlistentry>
<term>Red / Black Flashing</term>
2003-01-08 21:48:41 +01:00
<listitem><para>corresponds to the countdown timer that runs between
2003-01-08 21:40:39 +01:00
synchronizations.
2003-01-08 21:48:41 +01:00
</para></listitem>
2003-01-08 21:40:39 +01:00
</varlistentry>
</variablelist>
<para>The name of this interfaces derives from a bit of computer
history. Eric Raymond's <citation>Jargon File</citation> defines
2003-01-08 21:48:41 +01:00
<firstterm>blinkenlights</firstterm>, in part, as:
2003-01-08 21:40:39 +01:00
</para>
<blockquote>
<para>Front-panel diagnostic
lights on a computer, esp. a dinosaur. Now that dinosaurs are rare,
this term usually refers to status lights on a modem, network hub, or
the like.
</para>
<para>
This term derives from the last word of the famous blackletter-Gothic
sign in mangled pseudo-German that once graced about half the computer
rooms in the English-speaking world. One version ran in its entirety as
follows:
</para>
<para>
<emphasis>ACHTUNG! ALLES LOOKENSPEEPERS!</emphasis>
</para>
<para>
Das computermachine ist nicht fuer gefingerpoken und mittengrabben.
Ist easy schnappen der springenwerk, blowenfusen und poppencorken
mit spitzensparken. Ist nicht fuer gewerken bei das dumpkopfen.
Das rubbernecken sichtseeren keepen das cotten-pickenen hans in das
pockets muss; relaxen und watchen das blinkenlichten.
</para>
</blockquote>
</refsect2>
<refsect2>
<title>Curses.Blinkenlights</title>
<para>
Curses.Blinkenlights is an interface very similar to Tk.Blinkenlights,
but is designed to be run in a console window (an xterm, Linux virtual
terminal, etc.) Since it doesn't have access to graphics, it isn't
quite as pretty, but it still gets the job done.
</para>
<para>Please see the Tk.Blinkenlights section above for more
information about the colors used in this interface.
</para>
</refsect2>
<refsect2>
<title>Tk.VerboseUI</title>
<para>
2003-01-08 21:48:41 +01:00
Tk.VerboseUI (formerly known as Tk.TkUI) is a graphical interface
2003-01-08 21:40:39 +01:00
that presents a variable-sized window. In the window, each
currently-executing thread has a section where its name and current
status are displayed. This interface is best suited to people running
on slower connections, as you get a lot of detail, but for fast
connections, the detail may go by too quickly to be useful. People
with fast connections may wish to use Tk.Blinkenlights instead.
</para>
</refsect2>
<refsect2>
<title>TTY.TTYUI</title>
<para>
2003-01-08 21:48:41 +01:00
TTY.TTYUI interface is for people running in basic, non-color terminals. It
2003-01-08 21:40:39 +01:00
prints out basic status messages and is generally friendly to use on a console
or xterm.
</para>
</refsect2>
<refsect2>
<title>Noninteractive.Basic</title>
<para>
2003-01-08 21:48:41 +01:00
Noninteractive.Basic is designed for situations in which &OfflineIMAP;
2003-01-08 21:40:39 +01:00
will be run non-attended and the status of its execution will be
logged. You might use it, for instance, to have the system run
automatically and
e-mail you the results of the synchronization. This user interface
is not capable of reading a password from the keyboard; account
passwords must be specified using one of the configuration file options.
</para>
</refsect2>
<refsect2>
<title>Noninteractive.Quiet</title>
<para>
2003-01-08 21:48:41 +01:00
Noninteractive.Quiet is designed for non-attended running in situations
2003-01-08 21:40:39 +01:00
where normal status messages are not desired. It will output nothing
except errors and serious warnings. Like Noninteractive.Basic,
this user interface
is not capable of reading a password from the keyboard; account
passwords must be specified using one of the configuration file options.
</para>
</refsect2>
</refsect1>
<refsect1>
<title>See Also</title>
<para>This is also a test. Foo bar.</para>
</refsect1>
</refentry>
</reference>