From 7d9166279985e79046525f495e9beef5da7086f0 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Thu, 28 Feb 2013 13:11:48 +2000 Subject: [PATCH] Re: [PATCH] cli: crypto: tell gmime to use gpg-agent --- 4d/96cefd53705bcbdcabaf9433620a425ddba5d2 | 94 +++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 4d/96cefd53705bcbdcabaf9433620a425ddba5d2 diff --git a/4d/96cefd53705bcbdcabaf9433620a425ddba5d2 b/4d/96cefd53705bcbdcabaf9433620a425ddba5d2 new file mode 100644 index 000000000..8db0527b8 --- /dev/null +++ b/4d/96cefd53705bcbdcabaf9433620a425ddba5d2 @@ -0,0 +1,94 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id A5751431FB6 + for ; Wed, 27 Feb 2013 09:11:57 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id GzOvq2DPsodl for ; + Wed, 27 Feb 2013 09:11:55 -0800 (PST) +Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 9679C431FAF + for ; Wed, 27 Feb 2013 09:11:55 -0800 (PST) +Received: from remotemail by tesseract.cs.unb.ca with local (Exim 4.80) + (envelope-from ) + id 1UAkXm-0002aX-SQ; Wed, 27 Feb 2013 13:11:50 -0400 +Received: (nullmailer pid 29489 invoked by uid 1000); + Wed, 27 Feb 2013 17:11:48 -0000 +From: David Bremner +To: Jameson Graef Rollins , + Jani Nikula , notmuch@notmuchmail.org +Subject: Re: [PATCH] cli: crypto: tell gmime to use gpg-agent +In-Reply-To: <87hakxpwcu.fsf@servo.finestructure.net> +References: <1361950838-22919-1-git-send-email-jani@nikula.org> + <87hakxpwcu.fsf@servo.finestructure.net> +User-Agent: Notmuch/0.15.1 (http://notmuchmail.org) Emacs/24.2.1 + (x86_64-pc-linux-gnu) +Date: Wed, 27 Feb 2013 13:11:48 -0400 +Message-ID: <87r4k1znor.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 27 Feb 2013 17:11:57 -0000 + +Jameson Graef Rollins writes: + +> I will argue that the "use-agent" option should be enabled. If we force +> use of gpg-agent, then we don't allow people to opt out of using it. +> That's not very user friendly, particularly if someone has not enabled +> it for a specific reason. + +But right now we force people to enable the agent globally via use-agent +if they want to decrypt mail in notmuch-cli/emacs. The proposed change +allows them to use the agent only for notmuch. + +> But I think more to the point we need a little bit of due diligence of +> the effects of this before we enable it. What happens if gpg-agent is +> not available? What happens if there is no X session? Tests that probe +> the various circumstances would be useful. + +I don't think we should directly care about the presence of an X session +or not; the agent protocol doesn't depend on how the agent was started +afaik. + +> I do note, though, that the error messages are not very useful. It +> would be nice if could figure out that the decryption failed because of +> lack of agent and inform the user of that. + +Yes, it would be nice to detect a missing/non-responsive agent. And that +could be used by tests. + +> We should probably also update the show man page to make explicit that +> an agent may be required. + +We probably need to word it more strongly than that. If the user wants +decryption then notmuch requires an agent; if they want encryption or +signing then message-mode (really probably easypg) requires an agent. +I'm not sure how it manages it, but according to Jani's experiments it +seems that message mode already uses the agent independently of the +user's config; perhaps via the '--use-agent' argument to gpg. So the +current situation is unfortunately asymmetric. + +Of course it would help if there was documentation for the emacs +interface that we could update. + -- 2.26.2