Browse Source

Added support for STARTTLS

The script failed for my VPS , had to change SSLtype for mbsync to STARTTLS instead of IMAPS.
Added a question so the user can choose.
My error before this adjustement was this:
error:1408F10B:SSL routines:ssl3_get_record:wrong version number
pull/367/head
wimstockman 4 years ago
committed by GitHub
parent
commit
dfa4672c9c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      bin/mw

+ 7
- 2
bin/mw View File

@@ -21,7 +21,8 @@ mwconfig="$muttshare/mutt-wizard.muttrc"
cachedir="$HOME/.cache/mutt-wizard" cachedir="$HOME/.cache/mutt-wizard"
muttrc="$muttdir/muttrc" muttrc="$muttdir/muttrc"
msmtprc="$HOME/.config/msmtp/config" msmtprc="$HOME/.config/msmtp/config"
ssltype="IMAPS" # This is later changed to `None` later in the script if using Protonmail
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" "/usr/local/share/ca-certificates/" 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 do
@@ -54,7 +55,6 @@ Port $iport
User $login User $login
PassCmd \"pass mutt-wizard-$title\" PassCmd \"pass mutt-wizard-$title\"
SSLType $ssltype SSLType $ssltype
AuthMech LOGIN
CertificateFile $sslcert CertificateFile $sslcert


MaildirStore $title-local MaildirStore $title-local
@@ -171,6 +171,11 @@ EOF
esac esac
[ "$sport" = 465 ] && starttlsoff="tls_starttls off" [ "$sport" = 465 ] && starttlsoff="tls_starttls off"
fi fi
printf "\nDoes your server uses \033[35mSTARTTLS? \033[0m [Yes/No/Unknown]"
read -r is_TLS
case $is_TLS in
[Yy][Ee][Ss]) ssltype="STARTTLS";;
esac
printf "Enter the \033[35mfull name\033[0m you want to be identified by on this account.\\n\tReal name: " printf "Enter the \033[35mfull name\033[0m you want to be identified by on this account.\\n\tReal name: "
read -r realname read -r realname
printf "Enter a short, \033[36mone-word identifier\033[0m for this email account that will distinguish them from any other accounts you add.\\n\tAccount name: " printf "Enter a short, \033[36mone-word identifier\033[0m for this email account that will distinguish them from any other accounts you add.\\n\tAccount name: "


Loading…
Cancel
Save