diff options
-rw-r--r-- | .mbsyncrc | 2 | ||||
-rw-r--r-- | .msmtprc | 2 | ||||
-rwxr-xr-x | .req_pwd.sh | 14 |
3 files changed, 16 insertions, 2 deletions
@@ -1,7 +1,7 @@ IMAPAccount tharre3@gmail.com Host imap.gmail.com User tharre3@gmail.com -PassCmd "pass email/tharre3@gmail.com" +PassCmd "~/.req_pwd.sh email/tharre3@gmail.com" SSLType IMAPS CertificateFile /etc/ssl/certs/ca-certificates.crt @@ -11,7 +11,7 @@ host smtp.gmail.com port 587 from tharre3@gmail.com user tharre3@gmail.com -passwordeval "pass email/tharre3@gmail.com" +passwordeval "~/.req_pwd.sh email/tharre3@gmail.com" # Set a default account account default : gmail diff --git a/.req_pwd.sh b/.req_pwd.sh new file mode 100755 index 0000000..bce131b --- /dev/null +++ b/.req_pwd.sh @@ -0,0 +1,14 @@ +#!/bin/sh -e +# A simple wrapper script to deal with situations where pass, password-store, or +# my gpg key is not available. + +pass "$1" && exit + +# if pass fails, request password manually +stty -echo +printf "Password: " >&2 +read passwd +stty echo +printf "\n" >&2 + +printf "$passwd" |