Linux command
offlineimap 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Sync all accounts
offlineimap
Sync specific account
offlineimap -a [account_name]
Sync specific folder
offlineimap -f [INBOX]
Dry run
offlineimap --dry-run
Quick sync
offlineimap -q
Sync once and exit
offlineimap -o
Sync with custom config
offlineimap -c [/path/to/config]
Show folder list
offlineimap --info
说明
offlineimap synchronizes IMAP mailboxes with local Maildir storage. It enables offline access to email and backup of IMAP accounts. Bidirectional sync keeps local and remote in agreement. New messages, deletions, and flag changes propagate both ways. Conflicts are handled according to configuration. Maildir format stores each message as a file, enabling access by mail clients like mutt, notmuch, and others. The local copy works when offline. Configuration defines accounts, servers, and folder mappings. Multiple accounts can sync independently. Folder filtering controls which mailboxes to mirror. OAuth2 authentication works with Gmail and other providers requiring modern auth. Password storage can use system keyrings or external commands. Quick mode speeds up syncs by skipping unchanged folders. One-shot mode runs once without repeated checking.
参数
- -a _ACCOUNT_
- Sync specific account.
- -f _FOLDER_
- Sync specific folder.
- -o
- One-time sync (no repeat).
- -q, --quick
- Quick sync, skip flags.
- -c _FILE_
- Configuration file.
- -u _UI_
- User interface (quiet, basic, blinkenlights).
- --dry-run
- Show actions without executing.
- --info
- Show account/folder info.
- -l _FILE_
- Log file.
- --version
- Show version.
FAQ
What is the offlineimap command used for?
offlineimap synchronizes IMAP mailboxes with local Maildir storage. It enables offline access to email and backup of IMAP accounts. Bidirectional sync keeps local and remote in agreement. New messages, deletions, and flag changes propagate both ways. Conflicts are handled according to configuration. Maildir format stores each message as a file, enabling access by mail clients like mutt, notmuch, and others. The local copy works when offline. Configuration defines accounts, servers, and folder mappings. Multiple accounts can sync independently. Folder filtering controls which mailboxes to mirror. OAuth2 authentication works with Gmail and other providers requiring modern auth. Password storage can use system keyrings or external commands. Quick mode speeds up syncs by skipping unchanged folders. One-shot mode runs once without repeated checking.
How do I run a basic offlineimap example?
Run `offlineimap` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a _ACCOUNT_ do in offlineimap?
Sync specific account.