dotfiles/mail/.config/imapfilter/accounts.lua
Marty Oehme c5cd2b6a8d
mail: Enable direct pgp decryption
When called over systemd, pass will not display a pin-entry field to
decrypt the necessary passwords for email synching.

This prepares automatic background synching.
2020-09-24 14:22:03 +02:00

14 lines
591 B
Lua

local accounts = {}
local status, gmailuser = pipe_from('gpg2 --decrypt --no-tty --quiet --no-verbose --for-your-eyes-only --pinentry-mode ask ~/.local/share/pass/misc/aerc-gmail-app-password.gpg | grep username | cut -d: -f2')
local status, gmailpass = pipe_from('gpg2 --decrypt --no-tty --quiet --no-verbose --for-your-eyes-only --pinentry-mode ask ~/.local/share/pass/misc/aerc-gmail-app-password.gpg | head -n1')
-- Setup an imap account called gmail
accounts.gmail = IMAP {
server = "imap.gmail.com",
username = gmailuser,
password = gmailpass,
ssl = "auto"
}
return accounts