printf "Your email domain is not in mutt-wizard's database yet.\\nmutt-wizard will still autoconfigure everything, but you will have to manually type in your service's IMAP and SMTP server information.\\nYou can usually quickly find this by internet searching for it.\\n"
printf "Your email domain is not in mutt-wizard's database yet.\\nmutt-wizard will still autoconfigure everything, but you will have to manually type in your service's IMAP and SMTP server information.\\nYou can usually quickly find this by internet searching for it.\\n"
printf "Insert the IMAP server for your email provider (excluding the port number)\\n"
printf "\033[36m\t"
printf "Insert the IMAP server for your email provider (excluding the port number)\\n\033[36m\t"
read -r imap
read -r imap
printf "\033[0m"
printf "What is your server's IMAP port number? (Usually something like 993)\\n"
printf "\033[36m\t"
printf "\033[0mWhat is your server's IMAP port number? (Usually something like 993)\\n\033[36m\t"
read -r iport
read -r iport
printf "\033[0m"
printf "Insert the SMTP server for your email provider (excluding the port number)\\n"
printf "\033[36m\t"
printf "\033[0mInsert the SMTP server for your email provider (excluding the port number)\\n\033[36m\t"
read -r smtp
read -r smtp
printf "\033[0m"
printf "What is your server's SMTP port number? (Usually 587 or 465)\\n"
printf "\033[36m\t"
printf "\033[0mWhat is your server's SMTP port number? (Usually 587 or 465)\\n\033[36m\t"
read -r sport
read -r sport
printf "\033[0m"
printf "\\nGreat! If you want to be helpful, copy the line below and you can add it to the \`domains.csv\` file on Github.\\nThis will make things easier for others who use your email provider.\\n\\n%s,%s,%s,%s,%s\\n\\nAlthough be sure to test to see if these settings work first! ;-)\\n" "$domain" "$imap" "$iport" "$smtp" "$sport"
printf "\033[0m\\nGreat! If you want to be helpful, copy the line below and you can add it to the \`domains.csv\` file on Github.\\nThis will make things easier for others who use your email provider.\\n\\n%s,%s,%s,%s,%s\\n\\nAlthough be sure to test to see if these settings work first! ;-)\\n" "$domain" "$imap" "$iport" "$smtp" "$sport"
else
else
IFS=, read -r service imap iport smtp sport <<EOF
IFS=, read -r service imap iport smtp sport <<EOF
$serverinfo
$serverinfo
@@ -162,13 +152,11 @@ EOF
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: "
read -r title
read -r title
while ! echo "$title" | grep "$namere" >/dev/null; do
while ! echo "$title" | grep "$namere" >/dev/null; do
printf "\033[31mTry again\033[0m. Pick a nickname that is one word only including lowercase letters and _ or -.\\n\tAccount name: "
printf "\033[36m\t"
printf "\033[31mTry again\033[0m. Pick a nickname that is one word only including lowercase letters and _ or -.\\n\tAccount name: \033[36m\t"
read -r title
read -r title
printf "\033[0m"
printf "\033[0m"
done
done
printf "If your account has a special username different from your address, insert it now. Otherwise leave this prompt totally blank.\\n\tLogin(?): "
printf "\033[36m\t"
printf "If your account has a special username different from your address, insert it now. Otherwise leave this prompt totally blank.\\n\tLogin(?): \033[36m\t"
read -r login
read -r login
printf "\033[0m"
printf "\033[0m"
[ -z "$login" ] && login="$fulladdr"
[ -z "$login" ] && login="$fulladdr"
@@ -203,13 +191,11 @@ getpass() { \
}
}
askgpg() { \
askgpg() { \
printf "To safely encrypt passwords, mutt-wizard requires that you have a GPG public/private key pair.\\n\\nPlease input the email address of your GPG key pair below.\\nEmail: "
printf "\033[36m\t"
printf "To safely encrypt passwords, mutt-wizard requires that you have a GPG public/private key pair.\\n\\nPlease input the email address of your GPG key pair below.\\nEmail: \033[36m\t"
read -r gpgemail
read -r gpgemail
printf "\033[0m"
printf "\033[0m"
while ! echo "$gpgemail" | grep "$emailre" >/dev/null; do
while ! echo "$gpgemail" | grep "$emailre" >/dev/null; do
printf "That is not a valid email address. Please try again.\\nEmail: "
printf "\033[36m\t"
printf "That is not a valid email address. Please try again.\\nEmail: \033[36m\t"