diff options
author | WhaleJ84 <43613409+WhaleJ84@users.noreply.github.com> | 2019-08-06 13:07:18 +0100 |
---|---|---|
committer | Luke Smith <luke@lukesmith.xyz> | 2019-08-06 08:07:18 -0400 |
commit | 48f61faef7bb7eecc525e410f9ba699652f9ad4d (patch) | |
tree | 6afeb79423bcef6caea6537c4ba22a9a27dcb734 /bin/mw | |
parent | c41d0949b2ff82c6fbcefa5fa5299529497577d5 (diff) |
Modified code to work better with Protonmail (#267)
Added new search location for certificates and modified command that caused errors for Protonmail users.
Diffstat (limited to 'bin/mw')
-rwxr-xr-x | bin/mw | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -26,7 +26,7 @@ muttrc="$muttdir/muttrc" msmtprc="$HOME/.config/msmtp/config" ssltype="IMAPS" # This is later changed to `None` later in the script if using Protonmail -for x in "/etc/ssl/certs/ca-certificates.crt" "/etc/pki/tls/certs/ca-bundle.crt" "/etc/ssl/ca-bundle.pem" "/etc/pki/tls/cacert.pem" "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" "/etc/ssl/cert.pem" +for x in "/etc/ssl/certs/ca-certificates.crt" "/etc/pki/tls/certs/ca-bundle.crt" "/etc/ssl/ca-bundle.pem" "/etc/pki/tls/cacert.pem" "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" "/etc/ssl/cert.pem" "/usr/local/share/ca-certificates/" do [ -f "$x" ] && sslcert="$x" && break done || { echo "CA Certificate not found. Please install one or link it to /etc/ssl/certs/ca-certificates.crt" && exit 1 ;} @@ -194,7 +194,7 @@ EOF } protonfinger() { printf "Getting Protonmail bridge fingerprint...\\n" - fingerprint="$(msmtp --serverinfo --tls --tls-certcheck=off -a "$title")" || return 1 + fingerprint="$(msmtp --serverinfo --host=127.0.0.1 --port=1025 --tls --tls-certcheck=off)" || return 1 sed -ibu "s/account $title/&\ntls_trust_file\ntls_fingerprint $fingerprint/" "$msmtprc" ; rm -f "$msmtprc"bu } |