offlineimap
Synchronize email between local and remote mailboxes
TLDR
Synchronize once, without enabling autorefresh
Synchronize a specific account
Synchronize a specific folder
SYNOPSIS
offlineimap
PARAMETERS
-c configfile
Specify the configuration file to use. Defaults to ~/.offlineimaprc.
-d debuglevel
Set the debug level. Higher values produce more verbose output.
-n
Do a dry run. Show what would be done without actually performing any changes.
-o
Overwrite existing configuration file if it exists.
-q
Quiet mode. Suppress normal output.
-u account1,account2,...
Only synchronize the specified accounts. If not specified, all accounts defined in the config file will be synchronized.
-p password
Provide a global password used for all repositories that are configured to use the default password.
-V
Show version information and exit.
DESCRIPTION
OfflineIMAP is a tool for synchronizing mailboxes between a local Maildir and one or more remote IMAP servers. It allows you to read and manage your email offline, as well as keep multiple mailboxes synchronized. It is commonly used to maintain local backups of email, migrate between email providers, or simply improve email access speed by working with a local copy. OfflineIMAP is configured via a configuration file (`.offlineimaprc`) where you specify the IMAP server details, local Maildir paths, and other synchronization options. It supports multiple authentication methods, including password-based authentication, OAuth2, and more. It's important to note that while powerful, proper configuration is key to ensure correct and secure operation. Using the command does not alter the server and uses a syncronization approach, meaning that the latest version is transferred to the other end.
CAVEATS
Incorrect configuration can lead to data loss or security vulnerabilities. Always back up your mailboxes before using offlineimap. Be aware of IMAP server rate limits. OfflineIMAP can trigger rate limiting if synchronizing large mailboxes or performing frequent synchronization.
CONFIGURATION FILE
The .offlineimaprc file is crucial for configuring OfflineIMAP. It defines the IMAP server details, local Maildir paths, authentication methods, and other synchronization options.
The configuration file is written in Python syntax, allowing for complex configurations and scripting.
SYNCHRONIZATION MODES
OfflineIMAP supports different synchronization modes, including bi-directional synchronization (both local changes are pushed to the server, and server changes are pulled locally) and one-way synchronization (e.g., for backups). The synchronization behavior can be customized for each mailbox.
HISTORY
OfflineIMAP has been a long-standing tool in the Linux ecosystem for managing email synchronization. It was developed to provide a reliable solution for offline email access and backup. Over time, it has gained a dedicated user base and has been actively maintained and updated to support new IMAP features and authentication methods. The tool became popular due to its configuration flexibility and support of multiple accounts.
SEE ALSO
dovecot(1), mbsync(1)