I’ve used Protonmail for several years and use the web interface for the most part and used Thunderbird on the desktop to keep offline copies of email. Since Protnmail takes care of the encryption it requires a local bridge to provide a standard interface like IMAP. Essentially, it is running an IMAP server on the local machine that any compatible client can connect to. Technically, the bridge can be made accessible on a local network so many clients from many machines can connect to it. I might eventually set this up when I have had a chance to get a better handle on vlans and access control.
Installing packages
In order to use connect to the local IMAP bridge locally, I will be using mbsync
. I’m using guix
for package management, guix (and other package managers) refer to mbsync
as isync
. The mu
package also includes mu4e
(at least in version 1.6+ and it’s not recommended to mix/match versions).
|
|
Configuring mbsync
mbsync
expects a configuration in ~/.mbsyncrc
(does anyone know how to move this to ~/.config
? I’m disheartened by all the home directory clutter). Ideally one would GPG encrypt the password but since Proton Bridge generates it locally and it’s is available as clear text to the local machine anyway, I didn’t bother. Instead I just put the password from the ProtonBridge application into a text file (ensure no extra characters exist like space or return) and cat that into the PassCmd
.
|
|
Running the sync command gave me an error that sent me on a goose chase:
|
|
Socket error: secure connect to 127.0.0.1 (127.0.0.1:1143): error:1408F10B:SSL routines:ssl3_get_record:wrong version number
The issue was the SSLType NONE
is the proper config as shown above, I originally had it set to IMAPS
. Once the sync starts it will take a long time depending upon how many emails you have.
Configuring mu4e
Configure the mu4e-maildir
location to wherever you want to store the mail directory (remember mail in this folder is stored in clear-text). The mu4e-****-folder
variables need to include the sub-directory in the relative path, in my case proton
.
|
|
I’m also configuring smtpmail
in the config section of mu4e
just to keep mail config together, smtpmail
is part of Emacs core. I’m adding SMTP authentication info to the un-encrypted .authinfo
for the same reason as .mbsyncrc
explanation above.
|
|
Using org-mode to compose HTML emails
At this stage plain-text email will work just fine, in order to send email with formatting I’m using org-msg
which lets you compose with org markup and sends it out as HTML (including in-lining images, tables, etc.)
|
|
References
Here are a list of references I used to get everything setup and configured: