<div ><div>
<p dir="auto">On 2 Sep 2015, at 15:17, Philip Paeps wrote:</p>
<blockquote style="border-left-color: #136BCE; border-left-style: solid; border-left-width: 2px; color: #136BCE; margin: 0 0 5px; padding-left: 5px">
<p dir="auto">On 2015-09-01 12:01:04 (+0200), Benny Kjær Nielsen <a href="mailto:mailinglist@freron.com">mailinglist@freron.com</a> wrote:</p>
<blockquote style="border-left-color: #4B89CF; border-left-style: solid; border-left-width: 2px; color: #4B89CF; margin: 0 0 5px; padding-left: 5px">
<p dir="auto">The <code>gpg2</code> command uses <code>gpg-agent</code> as far as I understand, but to be honest I don't know how or if it can be used directly. I also think GPGMail, more or less, does the same as MailMate (executing the <code>gpg2</code> command).</p>
</blockquote>
<p dir="auto">Mmhm. That's odd. If you're just calling <code>gpg2</code>, the agent should be picked up.</p>
</blockquote>
<p dir="auto">Yes, and that's what happens for me. If I kill <code>gpg-agent</code> then it's relaunched as soon as <code>gpg2</code> is used by MailMate.</p>
<blockquote style="border-left-color: #136BCE; border-left-style: solid; border-left-width: 2px; color: #136BCE; margin: 0 0 5px; padding-left: 5px">
<p dir="auto">Is MailMate sanitising the environment before calling <code>gpg2</code> or is it running sandboxed? <code>gpg2</code> looks for an agent socket in $GPG_AGENT_INFO. If it exists, it should get used.</p>
</blockquote>
<p dir="auto">MailMate doesn't explicitly remove this variable. I'm no expert, but I think <code>GPG_AGENT_INFO</code> is deprecated. <a href="https://www.gnupg.org/faq/whats-new-in-2.1.html">This</a> says:</p>
<p dir="auto">"With GnuPG 2.1 the need of GPG_AGENT_INFO has been completely removed and the variable is ignored. Instead a fixed Unix domain socket named S.gpg-agent in the GnuPG home directory (by default ~/.gnupg) is used. The agent is also started on demand by all tools requiring services from the agent."</p>
<p dir="auto">It appears my GnuPG is 2.0.28 (MacGPG), but I do have the socket file in <code>~/.gnupg/</code>.</p>
<p dir="auto">-- <br>
Benny</p>
</div></div>