Emacs: Use password store for authentication.

master
Pierre Neidhardt 2019-12-06 12:22:09 +01:00
parent 5307f003f3
commit c3c61d45a4
3 changed files with 4 additions and 3 deletions

View File

@ -367,5 +367,6 @@
(setq ws-butler-keep-whitespace-before-point nil))
(setq auth-sources '("~/.authinfo.gpg" "~/.authinfo" "~/.netrc"))
(add-to-list 'auth-sources 'password-store 'append)
(provide 'main)

View File

@ -331,7 +331,7 @@ if [ -f ~/personal/history/eshell.gpg ]; then
fi
section "Mail"
lnn "$SOURCEDIR/mail/authinfo.gpg" "$HOME/.authinfo.gpg"
# lnn "$SOURCEDIR/mail/authinfo.gpg" "$HOME/.authinfo.gpg" ## Only if no using password-store.
mkdir -pv "$HOME/.cache/mail/"
while IFS= read -r i; do
## Warning: We need to eval here to expand the "~".

View File

@ -3,7 +3,7 @@
IMAPAccount mail
Host mail.gandi.net
User mail@ambrevar.xyz
PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.authinfo.gpg | awk '/login mail@ambrevar.xyz/ {print $(NF); exit}'"
PassCmd "pass mail@ambrevar.xyz@mail.gandi.net"
SSLType IMAPS
IMAPStore mail-remote
@ -35,7 +35,7 @@ SyncState *
IMAPAccount atlas
Host mail.gandi.net
User pierre@atlas.engineer
PassCmd "gpg -q --for-your-eyes-only --no-tty -d ~/.authinfo.gpg | awk '/login pierre@atlas.engineer/ {print $(NF); exit}'"
PassCmd "pass pierre@atlas.engineer@mail.gandi.net"
SSLType IMAPS
IMAPStore atlas-remote