How to make gpg-agent forget the passphrase automatically

gpggpg-agentthunderbird

I'm using Thunderbird with enigmail and gpg. From thunderbird/enigmail, I can't make the gpg-agent forget my passphrase, enigmail tells me I'm using gpg-agent for passphrase management so enigmail can't forget my passphrase.

Is there a way to make gpg-agent forget my passphrase periodically? To be honest, I only skimmed the manpage but it looked like there was nothingin there.

Best Answer

You can use the --default-cache-ttl option to set how long to keep an entry around:

eval $(gpg-agent --default-cache-ttl 300)

will cache for five minutes. You can also set this in your gpg-agent.conf file:

default-cache-ttl 300

The default is ten minutes (600 seconds). These timeouts will be reset when you use the key. max-cache-ttl sets the upper limit before reentering the passphrase.

Related Question