sed -i "s/account $mwaccount/&\ntls_trust_file\ntls_fingerprint $fingerprint/" "$mwmsmtprc"
}
getpass() { while : ; do pass rm -f "$mwpass" >/dev/null 2>&1
getpass() {
while : ; do pass rm -f "$mwpass" >/dev/null 2>&1
pass insert "$mwpass" && break; done ;}
formatShortcut() { \
formatShortcut() {
while read -r data; do { echo "macro index,pager g$1 \"<change-folder>$data<enter>\" \"go to $2\" # mw-autogenerated"
echo "macro index,pager M$1 \"<save-message>$data<enter>\" \"move mail to $2\" # mw-autogenerated"
echo "macro index,pager C$1 \"<copy-message>$data<enter>\" \"copy mail to $2\" # mw-autogenerated"; } >> "$mwaccdir/$idnum-$mwaccount.muttrc"
done ;}
done
}
tryconnect() { \
tryconnect() {
if [ -z "$mailboxes" ]; then
mkdir -p $mwmaildir/$mwaccount
mailboxes="$($mbsyncbin -l $mwaccount | sed 's/\//./')" >/dev/null 2>&1
@@ -235,9 +244,10 @@ tryconnect() { \
else
printf "\033[31m\033[31mLog-on not successful.\033[0m\\nIt seems that either you inputted the wrong password or server settings, or there are other requirements for your account out of the control of mutt-wizard.\\n"
[ -z "$boxes" ] && printf "\033[31mNo local mailboxes have been detected for %s.\033[0m\\nThis means that mbsync has not been successfully run.\\nRun mbsync, and if it has an error, be sure to check your password and server settings manually if needbe.\\n" "$mwaccount" && return
printf "Setting default mailboxes for your Inbox, Sent, Drafts and Trash in mutt...\\n"
@@ -262,24 +272,32 @@ finalize() { \
return 0
}
confirm() { printf "[y/N]: Do you want to %s?\\n\t" "$@" && read -r input && ! echo "$input" | grep -i "^y$\|^yes$" >/dev/null && printf "That doesn't seem like a yes to me.\\n\\n" && return 1
return 0 ;}
confirm() {
printf "[y/N]: Do you want to %s?\\n\t" "$@" && read -r input && ! echo "$input" | grep -i "^y$\|^yes$" >/dev/null && printf "That doesn't seem like a yes to me.\\n\\n" && return 1
return 0 ;
}
mwpick() { printf "Select an accounts to %s:\\n" "$1"