mu-wizard

shell script to easily configure mu4e accounts on Emacs
git clone git://git.ckyln.com/mu-wizard
Log | Files | Refs | LICENSE

commit edafeef2b537a0679874a886497cd862aec6f996
parent 79d8f5f9b8effee9ee2d6e49cb6ee1311869c413
Author: Cem Keylan <cem@ckyln.com>
Date:   Sun, 26 Jul 2020 02:26:12 +0300

mu-wizard: supply override for protonmail hosts

Diffstat:
Ashare/pm.me | 2++
Ashare/protonmail.ch | 2++
Ashare/protonmail.com | 28++++++++++++++++++++++++++++
3 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/share/pm.me b/share/pm.me @@ -0,0 +1 @@ +protonmail.com+ \ No newline at end of file diff --git a/share/protonmail.ch b/share/protonmail.ch @@ -0,0 +1 @@ +protonmail.com+ \ No newline at end of file diff --git a/share/protonmail.com b/share/protonmail.com @@ -0,0 +1,28 @@ +#!/bin/sh +# Override file for Protonmail +ssltype=None +imap=127.0.0.1 +iport=1143 +smtp=127.0.0.1 +sport=1025 + +out "Getting protonmail bridge fingerprint" +fingerprint=$(msmtp --serverinfo --host=127.0.0.1 --port=1025 --tls --tls-certcheck=off | + sed -n 's/^SHA256: //p') + +set_msmtp() { + [ -f "$config_home/msmtp/config" ] || msmtp_header + + cat <<EOF >> "$config_home/msmtp/config" +account $title +host $smtp +port $sport +from $fulladdr +user $login +passwordeval "$password_command" +tls_fingerprint $fingerprint/ +$starttlsoff +# End profile + +EOF +}