From 805ba45336ca24c05c15d40fa5f9a4f16e9573a2 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Mon, 15 Aug 2016 07:42:39 +0900 Subject: [PATCH] Re: [PATCH v4 16/16] add "notmuch reindex" subcommand --- 16/b4a247fb7c5750b4fa3be50ee8eb3394515a47 | 96 +++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 16/b4a247fb7c5750b4fa3be50ee8eb3394515a47 diff --git a/16/b4a247fb7c5750b4fa3be50ee8eb3394515a47 b/16/b4a247fb7c5750b4fa3be50ee8eb3394515a47 new file mode 100644 index 000000000..f69f1de0a --- /dev/null +++ b/16/b4a247fb7c5750b4fa3be50ee8eb3394515a47 @@ -0,0 +1,96 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 03D096DE8256 + for ; Sun, 14 Aug 2016 16:41:58 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.007 +X-Spam-Level: +X-Spam-Status: No, score=-0.007 tagged_above=-999 required=5 tests=[AWL=0.004, + SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id RDVhMFu7Q6Lb for ; + Sun, 14 Aug 2016 16:41:49 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id CA20E6DEAEE1 + for ; Sun, 14 Aug 2016 16:24:10 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) + (envelope-from ) + id 1bZ4lM-0005JT-Ao; Sun, 14 Aug 2016 19:24:16 -0400 +Received: (nullmailer pid 13226 invoked by uid 1000); + Sun, 14 Aug 2016 22:42:39 -0000 +From: David Bremner +To: Daniel Kahn Gillmor , + Notmuch Mail +Cc: Olly Betts +Subject: Re: [PATCH v4 16/16] add "notmuch reindex" subcommand +In-Reply-To: <1467970047-8013-17-git-send-email-dkg@fifthhorseman.net> +References: <1467970047-8013-1-git-send-email-dkg@fifthhorseman.net> + <1467970047-8013-17-git-send-email-dkg@fifthhorseman.net> +User-Agent: Notmuch/0.22.1+61~g2ce0f13 (https://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Mon, 15 Aug 2016 07:42:39 +0900 +Message-ID: <87h9an3rc0.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Sun, 14 Aug 2016 23:41:58 -0000 + +Daniel Kahn Gillmor writes: + + +> +Supported options for **reindex** include +> + +> + ``--try-decrypt`` +> + +> + For each message, if it is encrypted, try to decrypt it while +> + indexing. If decryption is successful, index the cleartext +> + itself. Be aware that the index is likely sufficient to +> + reconstruct the cleartext of the message itself, so please +> + ensure that the notmuch message index is adequately +> + protected. DO NOT USE THIS FLAG without considering the +> + security of your index. + +What can we say about re-indexing without the flag, when the user has +previously indexed cleartext? I guess this is at least partly a question +for Olly: if we delete terms from a xapian document, how recoverable are +those terms and positions? I suppose it might depend on backend, but +does deleting terms provide at least same level of security as deleting +files in modern file systems (i.e. not much against determined state +level actors, but good enough to defeat most older brothers) + +> +# TODO: test removal of a message from the message store between +> +# indexing and reindexing. +> + +> +# TODO: insert the same message into the message store twice, index, +> +# remove one of them from the message store, and then reindex. +> +# reindexing should return a failure but the message should still be +> +# present? -- or what should the semantics be if you ask to reindex a +> +# message whose underlying files have been renamed or moved or +> +# removed? + +These tests don't seem hard to impliment, just a bit of drudge work? + +TBH I'd have to read source to figure out the degree of robustness +promised by e.g. show/search for renames (without intervening new). +There is some argument for reindexing by path as being a useful use +case, if it could handle renames. + +In any case, it would be nice (TM) to document what the current +behaviour is for users. + +d -- 2.26.2