In order to use OfflineIMAP, you need to have these conditions satisfied:
- Your mail server must support IMAP. Mail access via POP is not supported. A special Gmail mailbox type is available to interface with Gmail’s IMAP front-end, although Gmail has a very peculiar and non-standard implementation of its IMAP interface.
- You must have Python version 2.6 or above installed. If you are running on Debian GNU/Linux, this requirement will automatically be taken care of for you. If you intend to use the SSL interface, your Python must have been built with SSL support.
- If you use OfflineImap as an IMAP<->Maildir synchronizer, you will obviously need to 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.
Installing OfflineImap should usually be quite easy, as you can simply unpack and run OfflineImap in place if you wish to do so. There are a number of options though:
- system-wide installation via your distribution package manager
- system-wide or single user installation from the source package
- system-wide or single user installation from a git checkout
The easiest way to install OfflineIMAP is via your distribution’s package manager. OfflineImap is available under the name offlineimap in most Linux and BSD distributions.
- Download the latest source archive from our download page. Simply click the “Download as .zip” or “Download as .tar.gz” buttons to get the latest “stable” code from the master branch. If you prefer command line, you will want to use:
- wget https://github.com/spaetz/offlineimap/tarball/master
git clone git://github.com/spaetz/offlineimap.git
This will download the source with history. By default, git sets up the master branch up, which is most likely what you want. If not, you can checkout a particular release like this:
cd offlineimap git checkout v18.104.22.168
Then run these commands, to build the python package:
make clean make
Finally, install the program (as root):
python setup.py install
Next, proceed to below. You tofflineimap to invoke the program.
If you installed a system-wide installation via “python setup.py install”, there are a few files to purge to cleanly uninstall OfflineImap again. Assuming that /usr/local is the standard prefix of your system and that you use python 2.7, you need to:
Delete the OfflineImap installation itself:
In case, you did the single-user installation, simply delete your offlineimap directory.
- Delete all files that OfflineImap creates during its operation. - The cache at (default location) ~/.offlineimap - Your manually created (default loc) ~/.offlineimaprc (It is possible that you created those in different spots)
That’s it. Have fun without OfflineImap.