Recently, offlineimap was removed from many Linux distros due to it relying on Python 2, and I found myself needing a new solution for using mutt (my email client of choice) and ProtonMail Bridge. I was able to use the program isync as a substitute. My initial setup for mail with offlineimap was based off this excelent post: https://spaceandtim.es/code/protonmail_mutt so you can refer to it for a lot of the reasoning behind this configuration. I'm personally using Gentoo, but this should work on most distros.
.mbsyncrcin your home directory. Here is what mine looks like for getting it working with ProtonMail Bridge:
SyncState * Sync Pull All Push All IMAPAccount [Put email here] Host 127.0.0.1 Port 1143 User [Put email here] Pass [Put ProtonMail Bridge password here] SSLType None AuthMechs LOGIN IMAPStore kevin-remote Account [Put email here] UseNamespace yes MaildirStore kevin-local SubFolders Verbatim Inbox ~/Mail/kevin/INBOX Path ~/Mail/kevin/ Flatten . Channel kevin Master :kevin-remote: Slave :kevin-local: Patterns * Create Both Expunge Both
.muttrcfile in my home directory:
set mbox_type=Maildir set folder=~/Mail/kevin set mail_check=2 # seconds # smtp set my_user=[Put email here] set my_pass=[Put ProtonMail Bridge password here] set smtp_url=smtp://[Put email here]:[Put ProtonMail Bridge password here]@127.0.0.1:1025 set ssl_starttls set spoolfile = "+INBOX" mailboxes +INBOX +Archive +Sent +Trash +Spam
mbsync [channel name]to sync your mail, for example:
mbsync kevin. So I have setup a cron job to sync my mail every five minutes:
*/5 * * * * /usr/bin/mbsync kevin