1 Return-Path: <dkg@fifthhorseman.net>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by arlo.cworth.org (Postfix) with ESMTP id 5B8CC6DE0A9A
\r
6 for <notmuch@notmuchmail.org>; Fri, 11 Dec 2015 07:34:30 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=-0.016 tagged_above=-999 required=5
\r
12 tests=[AWL=-0.016] autolearn=disabled
\r
13 Received: from arlo.cworth.org ([127.0.0.1])
\r
14 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id 6KXgyGtc-J2i for <notmuch@notmuchmail.org>;
\r
16 Fri, 11 Dec 2015 07:34:28 -0800 (PST)
\r
17 Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108])
\r
18 by arlo.cworth.org (Postfix) with ESMTP id 442986DE005F
\r
19 for <notmuch@notmuchmail.org>; Fri, 11 Dec 2015 07:34:28 -0800 (PST)
\r
20 Received: from fifthhorseman.net (unknown [38.109.115.130])
\r
21 by che.mayfirst.org (Postfix) with ESMTPSA id 89216F984
\r
22 for <notmuch@notmuchmail.org>; Fri, 11 Dec 2015 10:34:26 -0500 (EST)
\r
23 Received: by fifthhorseman.net (Postfix, from userid 1000)
\r
24 id B101320001; Fri, 11 Dec 2015 10:34:25 -0500 (EST)
\r
25 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
\r
26 To: Notmuch Mail <notmuch@notmuchmail.org>
\r
27 Subject: Re: allow indexing cleartext of encrypted messages
\r
28 In-Reply-To: <1449718786-28000-1-git-send-email-dkg@fifthhorseman.net>
\r
29 References: <1449718786-28000-1-git-send-email-dkg@fifthhorseman.net>
\r
30 User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1
\r
31 (x86_64-pc-linux-gnu)
\r
32 Date: Fri, 11 Dec 2015 10:34:25 -0500
\r
33 Message-ID: <87zixhgfsu.fsf@alice.fifthhorseman.net>
\r
35 Content-Type: text/plain
\r
36 X-BeenThere: notmuch@notmuchmail.org
\r
37 X-Mailman-Version: 2.1.20
\r
39 List-Id: "Use and development of the notmuch mail system."
\r
40 <notmuch.notmuchmail.org>
\r
41 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,
\r
42 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
44 List-Post: <mailto:notmuch@notmuchmail.org>
\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
46 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
48 X-List-Received-Date: Fri, 11 Dec 2015 15:34:30 -0000
\r
50 On Wed 2015-12-09 22:39:37 -0500, Daniel Kahn Gillmor wrote:
\r
51 > * the libnotmuch API is extended with
\r
52 > notmuch_database_add_message_try_decrypt(). This should probably
\r
53 > ultimately be more general, because there are a few additional
\r
54 > knobs that i can imagine fiddling at indexing time. For example:
\r
56 > * verifying cryptographic signatures and storing something about
\r
57 > those verifications in the notmuch db
\r
59 > * extracting OpenPGP session key information for a given message
\r
60 > and storing it in a lookaside table in the notmuch db, so that
\r
61 > it's possible to securely destroy old encryption-capable keys
\r
62 > and still have local access to the cleartext of the remaining
\r
65 > Some of these additional features might be orthogonal to one
\r
66 > another as well. I welcome suggestions for how to improve the API
\r
67 > so that we don't end up with a combinatorial explosion of
\r
68 > n_d_add_message_foo() functions.
\r
70 I have a proposal for how to do this better:
\r
72 I'll introduce a notmuch_index_options_t, with the usual constructors
\r
73 and destructors and a couple functions:
\r
75 notmuch_index_options_set_try_decrypt()
\r
76 notmuch_index_options_get_try_decrypt()
\r
77 notmuch_index_options_set_gpg_path()
\r
78 notmuch_index_options_get_gpg_path()
\r
82 notmuch_database_add_message_with_options(db, fname, options, &message)
\r
84 If we add new indexing features, they can be set directly in the
\r
85 index_options object (including features that might be more complex than
\r
86 a string or a bool, like a chain of command-line filters).
\r
88 a few nice features of this approach:
\r
90 * The user of the library can craft a set of index options and repeat
\r
91 it easily, and the options can contain cached/lazily-initialized
\r
92 things (like GMimeCryptoContexts) if needed.
\r
94 * The user can index different messages with different options if they
\r
95 prefer (no need to set the options on the database object itself)
\r
97 * the capability of the indexing features in the library is visible
\r
98 directly in the exposed API.
\r
100 any thoughts on this?
\r