| @@ -29,8 +29,7 @@ done || { echo "CA Certificate not found. Please install one or link it to /etc/ | |||||
| checkbasics() { command -V gpg >/dev/null 2>&1 && GPG="gpg" || GPG="gpg2" | checkbasics() { command -V gpg >/dev/null 2>&1 && GPG="gpg" || GPG="gpg2" | ||||
| PASSWORD_STORE_DIR="${PASSWORD_STORE_DIR:-$HOME/.password-store}" | PASSWORD_STORE_DIR="${PASSWORD_STORE_DIR:-$HOME/.password-store}" | ||||
| [ -r "$PASSWORD_STORE_DIR/.gpg-id" ] && | |||||
| "$GPG" --list-secret-keys "$(cat "$PASSWORD_STORE_DIR/.gpg-id")" >/dev/null 2>&1 || { | |||||
| [ -r "$PASSWORD_STORE_DIR/.gpg-id" ] || { | |||||
| echo "First run \`pass init <yourgpgemail>\` to set up a password archive." | echo "First run \`pass init <yourgpgemail>\` to set up a password archive." | ||||
| echo "(If you don't already have a GPG key pair, first run \`$GPG --full-generate-key\`.)" | echo "(If you don't already have a GPG key pair, first run \`$GPG --full-generate-key\`.)" | ||||
| exit 1 ;} ;} | exit 1 ;} ;} | ||||
| @@ -214,7 +213,7 @@ askinfo() { \ | |||||
| } | } | ||||
| createpass() { echo "$password" > "$PASSWORD_STORE_DIR/$fulladdr" | createpass() { echo "$password" > "$PASSWORD_STORE_DIR/$fulladdr" | ||||
| "$GPG" -qer "$(cat "$PASSWORD_STORE_DIR/.gpg-id")" "$PASSWORD_STORE_DIR/$fulladdr" | |||||
| "$GPG" -qe $(printf -- " -r %s" $(cat "$PASSWORD_STORE_DIR/.gpg-id")) "$PASSWORD_STORE_DIR/$fulladdr" | |||||
| rm -f "$PASSWORD_STORE_DIR/$fulladdr" ;} | rm -f "$PASSWORD_STORE_DIR/$fulladdr" ;} | ||||
| getpass() { while : ; do pass rm -f "$fulladdr" >/dev/null 2>&1 | getpass() { while : ; do pass rm -f "$fulladdr" >/dev/null 2>&1 | ||||
| @@ -1,4 +1,5 @@ | |||||
| ADDRESS,IMAP,imap port,SMTP,smtp port | ADDRESS,IMAP,imap port,SMTP,smtp port | ||||
| gordon.edu,outlook.office365.com,993,smtp.office365.com,587 | |||||
| 126.com,imap.126.com,993,smtp.126.com,587 | 126.com,imap.126.com,993,smtp.126.com,587 | ||||
| 163.com,imap.163.com,993,smtp.163.com,587 | 163.com,imap.163.com,993,smtp.163.com,587 | ||||
| 3nt3.de,mail.3nt3.de,993,mail.3nt3.de,465 | 3nt3.de,mail.3nt3.de,993,mail.3nt3.de,465 | ||||
| @@ -44,6 +45,7 @@ bocken.org,mail.bocken.org,993,mail.bocken.org,587 | |||||
| brew-meister.com,imap.mail.com,993,smtp.mail.com,587 | brew-meister.com,imap.mail.com,993,smtp.mail.com,587 | ||||
| bruttocarattere.org,mail.autistici.org,993,smtp.autistici.org,465 | bruttocarattere.org,mail.autistici.org,993,smtp.autistici.org,465 | ||||
| btinternet.com,mail.btinternet.com,993,mail.btinternet.com,587 | btinternet.com,mail.btinternet.com,993,mail.btinternet.com,587 | ||||
| calstatela.edu,outlook.office365.com,993,smtp.office365.com,587 | |||||
| canaglie.net,mail.autistici.org,993,smtp.autistici.org,465 | canaglie.net,mail.autistici.org,993,smtp.autistici.org,465 | ||||
| canaglie.org,mail.autistici.org,993,smtp.autistici.org,465 | canaglie.org,mail.autistici.org,993,smtp.autistici.org,465 | ||||
| carleton.ca,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 | carleton.ca,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 | ||||