Re: using gpg protected files to read passwords

Piet van Oostrum <[email protected]>
Newsgroups gmane.mail.getmail.user
Message-ID <[email protected]>
Charles Cazabon <[email protected]> writes:

> Lugubris <[email protected]> wrote:
>> 
>> I know about gnome keyring's integration, will there be an option for using
>> gpg protected files to read passwords? pass.gpg will have the saved password
>> and getmail will read it from that file.
>
> getmail can get the password from any arbitrary external command; see the
> password_command parameter.  Just write a shellscript that will produce the
> password from the gpg file for getmail to read.
>
> Note you can't interact with that process (i.e. see its output or provide
> keyboard input to it), as it's run as a separate process behind the scenes.
>

I have a similar thing with my gmail account. I am using MacOS, so I have all my passwords in the MacOS Keychain. However, Google started nagging me about using my Google password for accessing my Gmail account, so I switched over to xauth by using getmail-gmail-xoauth-tokens.
But this leaves the secret to access the gmail account in a plain json file. I don't want any password or secret to access my email in a plain (unencrypted) file, as your email accounts can be used to access most of your other accounts (by clicking 'I forgot my password' or similar). So I decided to encrypt the json file with gpg. By using gpg-agent, and storing the key in my keychain, I only have to supply a master key after login.
To make this possible I created a modified copy of getmail-gmail-xoauth-tokens. If you are interested I can share it.
-- 
Piet van Oostrum <[email protected]>
WWW: http://piet.vanoostrum.org/
PGP key: [8DAE142BE17999C4]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.