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:
A | share/pm.me | | | 2 | ++ |
A | share/protonmail.ch | | | 2 | ++ |
A | share/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 +}