summaryrefslogtreecommitdiff
path: root/bin/mw
diff options
context:
space:
mode:
authorAyman Bagabas <ayman.bagabas@gmail.com>2019-08-19 20:55:59 -0400
committerGitHub <noreply@github.com>2019-08-19 20:55:59 -0400
commit9ce96c9a40cc57703fd386b52195bc48c873ba79 (patch)
treec5e165f0d3f7ac472914334713655eb2a8aa6073 /bin/mw
parent04528a0fb92ea57be040a7ed87901d8186c970ff (diff)
parent75c1d44a84463e723d4c1ae70a105c4b5dd3f560 (diff)
Merge branch 'master' into master
Diffstat (limited to 'bin/mw')
-rwxr-xr-xbin/mw7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/mw b/bin/mw
index 3268fa5..96a2402 100755
--- a/bin/mw
+++ b/bin/mw
@@ -22,7 +22,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 ;}
@@ -103,7 +103,7 @@ set folder = \"imaps://$fulladdr@$imap:$iport\"
set imap_user = \"$login\"
set header_cache = $cachedir/$title/headers
set message_cachedir = $cachedir/$title/bodies
-set imap_pass = \`pass mutt-wizard-$title\`
+set imap_pass = \"\`pass mutt-wizard-$title\`\"
set mbox_type = Maildir
set ssl_starttls = yes
@@ -190,7 +190,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
}
@@ -289,6 +289,7 @@ asktype() { while : ; do
purge() { confirm "delete all account data" || exit
rm -rf "$mbsyncrc" "$accdir" "$HOME/.config/msmtp" "$cachedir"
+ crontab -l | sed '/mailsync/d' | crontab - >/dev/null
echo "All configs and account settings have been purged."
sed -ibu "/\# mw-autogenerated/d" "$muttrc" ; rm -f "$muttrc"bu
}