2.2 KiB
2.2 KiB
publish, permalink, title, created, modified, tags, cssclasses
| publish | permalink | title | created | modified | tags | cssclasses | |||
|---|---|---|---|---|---|---|---|---|---|
| true | /apps/isync | isync (mbsync) | 2026-01-30T08:09:43.461-07:00 | 2026-02-05T12:16:17.112-07:00 |
|
isync (command: mbsync) is a tool for synchronizing IMAP mailboxes with local Maildir folders. Essential for offline email access with clients like 10-19 LIFE/13 TECH SETUP/13.11 APPS/aerc or mutt.
Installation
Arch Linux:
sudo pacman -S isync
ProtonMail Integration
ProtonMail requires the Proton Bridge app for IMAP access. See the Arch Wiki guide for details.
Setup with Proton Bridge
- Install and run Proton Bridge
- Get credentials from Bridge (it generates local IMAP/SMTP credentials)
- Configure mbsync as below
Configuration
~/.mbsyncrc:
# Global settings
Create Both
Remove Both
Expunge Both
SyncState *
# ProtonMail via Proton Bridge
IMAPAccount proton
Host 127.0.0.1
Port 1143
User your-email@proton.me
PassCmd "cat ~/.config/proton-bridge/password"
SSLType STARTTLS
CertificateFile ~/.config/proton-bridge/cert.pem
IMAPStore proton-remote
Account proton
MaildirStore proton-local
Path ~/.local/share/mail/proton/
Inbox ~/.local/share/mail/proton/INBOX
SubFolders Verbatim
Channel proton
Far :proton-remote:
Near :proton-local:
Patterns *
Usage
# Sync all configured channels
mbsync -a
# Sync specific channel
mbsync proton
# Verbose output
mbsync -V proton
# Dry run (show what would happen)
mbsync -n proton
Automation
systemd timer
~/.config/systemd/user/mbsync.timer:
[Unit]
Description=Sync mail periodically
[Timer]
OnBootSec=1m
OnUnitActiveSec=5m
[Install]
WantedBy=timers.target
~/.config/systemd/user/mbsync.service:
[Unit]
Description=Sync mail
[Service]
Type=oneshot
ExecStart=/usr/bin/mbsync -a
Enable:
systemctl --user enable --now mbsync.timer
Tips
- Create the local maildir first:
mkdir -p ~/.local/share/mail/proton - Use
PassCmdto avoid storing passwords in config - The
Patterns *line syncs all folders; use specific patterns to limit - Check sync status with
mbsync -Vfor verbose output