Explorar el Código

added option to use existing password for a new account

pull/467/head
Andres Burgos hace 4 años
padre
commit
3421cd718a
Se han modificado 1 ficheros con 11 adiciones y 5 borrados
  1. +11
    -5
      bin/mw

+ 11
- 5
bin/mw Ver fichero

@@ -45,14 +45,14 @@ host $smtp
port $sport
from $fulladdr
user $login
passwordeval \"pass mutt-wizard-$title\"
passwordeval \"pass $accpass\"
$starttlsoff
"
mbsync_profile="IMAPStore $title-remote
Host $imap
Port $iport
User $login
PassCmd \"pass mutt-wizard-$title\"
PassCmd \"pass $accpass\"
AuthMechs LOGIN
SSLType $ssltype
CertificateFile $sslcert
@@ -111,7 +111,7 @@ set folder = \"imaps://$login@$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 $accpass\`\"

set crypt_autosign = yes
set crypt_opportunistic_encrypt = yes
@@ -192,6 +192,10 @@ EOF
read -r title
printf "\033[0m"
done
printf "If you already have a password stored for the account, insert the name now. Otherwise leave this prompt totally blank, and later you will be asked to set up a password.\033[0m\\n\tPassword name in pass(?): \033[36m"
read -r accpass
printf "\033[0m"
[ -z "$accpass" ] && accpass=mutt-wizard-$title
printf "If your account has a special username different from your address, insert it now. Otherwise leave this prompt totally blank.\\n\033[34mMost accounts will not have a separate login, so you should probably leave this blank.\033[0m\\n\tLogin(?): \033[36m"
read -r login
printf "\033[0m"
@@ -223,8 +227,10 @@ protonfinger() { printf "Getting Protonmail bridge fingerprint...\\n"
sed -ibu "s/account $title/&\ntls_trust_file\ntls_fingerprint $fingerprint/" "$msmtprc" ; rm -f "$msmtprc"bu
}

getpass() { while : ; do pass rm -f "mutt-wizard-$title" >/dev/null 2>&1
pass insert "mutt-wizard-$title" && break; done ;}
getpass() { \
if [ "$accpass" = "mutt-wizard-$title" ]; then
while : ; do pass rm -f "$accpass" >/dev/null 2>&1;
pass insert "$accpass" && break; done ; fi ;}

formatShortcut() { \
while read -r data; do { echo "macro index,pager g$1 \"<change-folder>$data<enter>\" \"go to $2\" # mw-autogenerated"


Cargando…
Cancelar
Guardar