OfflineIMAP is
IMAP
In computing, the Internet Message Access Protocol (IMAP) is an Internet standard protocol used by email clients to retrieve email messages from a mail server over a TCP/IP connection. IMAP is defined by .
IMAP was designed with the goal of pe ...
synchronization utility software
Utility software is software designed to help analyze, configure, optimize or maintain a computer. It is used to support the computer infrastructure - in contrast to application software, which is aimed at directly performing tasks that benefit or ...
, capable of synchronizing mail on IMAP server with local
Maildir
The Maildir e-mail format is a common way of storing email messages in which each message is stored in a separate file with a unique name, and each mail folder is a file system directory. The local file system handles file locking as messages are ...
folder
or another server.
Description
The synchronization is performed bidirectionally between two endpoints ("Remote" and "Local" repositories).
OfflineIMAP accesses mail servers only via
Internet Message Access Protocol
In computing, the Internet Message Access Protocol (IMAP) is an Internet standard protocol used by email clients to retrieve email messages from a mail server over a TCP/IP connection. IMAP is defined by .
IMAP was designed with the goal ...
(
Post Office Protocol
In computing, the Post Office Protocol (POP) is an application-layer Internet standard protocol used by e-mail clients to retrieve e-mail from a mail server. POP version 3 (POP3) is the version in common use, and along with IMAP the most comm ...
– another popular way to get mail from server – is not supported),
it works faster (though it is sensitive to connection's latency) and supports more advanced features than most
mail client
An email client, email reader or, more formally, message user agent (MUA) or mail user agent is a computer program used to access and manage a user's email.
A web application which provides message management, composition, and reception func ...
s.
The special mode for better handling the non-standard implementation of IMAP in
Gmail
Gmail is a free email service provided by Google. As of 2019, it had 1.5 billion active user (computing), users worldwide. A user typically accesses Gmail in a web browser or the official mobile app. Google also supports the use of email clien ...
may optionally be enabled in a
configuration file
In computing, configuration files (commonly known simply as config files) are files used to configure the parameters and initial settings for some computer programs. They are used for user applications, server processes and operating system ...
.
When configured to store mail locally, OfflineIMAP uses the
Maildir
The Maildir e-mail format is a common way of storing email messages in which each message is stored in a separate file with a unique name, and each mail folder is a file system directory. The local file system handles file locking as messages are ...
format.
Unix mail boxes support may be added in the future, though currently it is not implemented.
Configuration
Several synchronizations account, each consisting of Remote and Local repositories, may be defined in configuration file. Each repository is then configured separately, allowing to specify credentials and access method.
Filtering and translation
OfflineIMAP is capable of filtering the folders of Remote repository, so that only partial synchronization would occur if needed. To use this capability one has to define the
mask
A mask is an object normally worn on the face, typically for protection, disguise, performance, or entertainment and often they have been employed for rituals and rights. Masks have been used since antiquity for both ceremonial and pra ...
that would be matched against the list of folders with each synchronization. This is achieved by using
Python's
lambda
Lambda (}, ''lám(b)da'') is the 11th letter of the Greek alphabet, representing the voiced alveolar lateral approximant . In the system of Greek numerals, lambda has a value of 30. Lambda is derived from the Phoenician Lamed . Lambda gave ris ...
capability; for example, to synchronize only "INBOX", "Sent Mail" and "Received" folders one should specify the following rule:
folderfilter = lambda foldername: foldername in INBOX", "Sent Mail", "Received"
Remaining folders' names may be altered (translated) using similar construct:
nametrans = lambda foldername: re.sub(
"^Sent$", "root/Sent", re.sub("^(\ .*ail\INBOX)", "root", foldername)
)
This technique may also be used to synchronize the content of an IMAP server to the folder of another server.
Limitations
Each account has to use separate directory; otherwise the synchronization process may suffer from unexpected behavior or even data loss.
User interface
OfflineIMAP provides several
command-line interfaces, including interactive color
curses
A curse (also called an imprecation, malediction, execration, malison, anathema, or commination) is any expressed wish that some form of adversity or misfortune will befall or attach to one or more persons, a place, or an object. In particular, ...
-based,
non-interactive
Across the many fields concerned with interactivity, including information science, computer science, human-computer interaction, communication, and industrial design, there is little agreement over the meaning of the term "interactivity", but m ...
console logging, and several yet less verbose modes.
Tk-based
graphical user interface
The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows User (computing), users to Human–computer interaction, interact with electronic devices through graphical icon (comp ...
is also available.
See also
*
Mail delivery agent A message delivery agent (MDA), or mail delivery agent, is a computer software component that is responsible for the delivery of e-mail messages to a local recipient's mailbox., ''Internet Mail Architecture'', D. Crocker (July 2009) It is also calle ...
*
getmail
getmail is a simple mail retrieval agent intended as a replacement for fetchmail, implemented in Python. It can retrieve mail from POP3, IMAP4, and ''Standard Dial-up POP3 Service'' servers, with or without SSL. It supports simple and domain ...
*
fetchmail
Fetchmail is an open-source software utility for POSIX-compliant operating systems which is used to retrieve e-mail from a remote POP3, IMAP, or ODMR mail server to the user's local system. It was developed from thpopclientprogram, written by Car ...
References
Free email software
Data synchronization
Free software programmed in Python
Software that uses Tk (software)
Articles with example Python (programming language) code
{{Use MDY dates, date=September 2012