Re: [PATCH v2] cli/insert: new message file can be world-readable (rely on umask)

2018-02-08 Thread Daniel Kahn Gillmor
On Thu 2018-02-08 20:52:41 -0500, Brian Sniffen wrote: > If there’s a hidden danger in these modes, better to leave the switch > requiring octal tunes! eh? i'm not sure i understand the argument. if there's a hidden danger, we want them to really clearly say on the tin what the hidden danger is.

Re: [PATCH v2] cli/insert: new message file can be world-readable (rely on umask)

2018-02-08 Thread Daniel Kahn Gillmor
On Thu 2018-02-08 20:40:40 -0500, Daniel Kahn Gillmor wrote: > postfix's local delivery agent has apparently been delivering with mode > 0600 for nearly 20 years: > > > https://github.com/vdukhovni/postfix/blame/master/postfix/src/local/maildir.c#L188 and even postfix&#

Re: [PATCH v2] cli/insert: new message file can be world-readable (rely on umask)

2018-02-08 Thread Daniel Kahn Gillmor
On Tue 2018-02-06 14:43:56 -0500, Daniel Kahn Gillmor wrote: > There are legitimate cases (public archives) where a user might > actually want their archive to be readable to the world. > > "notmuch insert" historically used mode 0600 (unreadable by group or > other)

test message

2018-02-08 Thread Daniel Kahn Gillmor
this is a test message, please ignore. sorry for the noise! --dkg ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch

[PATCH v2] cli/insert: new message file can be world-readable (rely on umask)

2018-02-06 Thread Daniel Kahn Gillmor
There are legitimate cases (public archives) where a user might actually want their archive to be readable to the world. "notmuch insert" historically used mode 0600 (unreadable by group or other), but that choice doesn't appear to have been specifically justified (perhaps an abundance of caution?

[PATCH] debian: drop export-dir from gbp.conf

2018-02-06 Thread Daniel Kahn Gillmor
No one knows why this invocation is here. it does weird things during the build. If a developer really wants this behavior, they can specify it in their own ~/.gbp.conf Signed-off-by: Daniel Kahn Gillmor --- debian/gbp.conf | 3 --- 1 file changed, 3 deletions(-) diff --git a/debian/gbp.conf

Re: Bcc, throw-keyids, and metadata hiding [was: Re: Announcing Astroid v0.11]

2018-02-05 Thread Daniel Kahn Gillmor
On Mon 2018-02-05 08:33:36 +0100, Gaute Hope wrote: > Yes; this seems like the ultimate approach to this problem, unless > it will be possible for GPG to completely hide receivers - I am guessing > this is inherently impossible? I'm not sure how gpg could do that -- the metadata leak of most re

[PATCH] cli/insert: new message file can be world-readable (rely on umask)

2018-02-04 Thread Daniel Kahn Gillmor
There are legitimate cases (public archives) where a user might actually want their archive to be readable to the world. "notmuch insert" historically used mode 0600 (unreadable by group or other), but that choice doesn't appear to have been specifically justified (perhaps an abundance of caution?

clean up for nmweb/btsmail

2018-02-04 Thread Daniel Kahn Gillmor
The patches that follow are some proposed cleanups for contrib/notmuch-web (aka nmweb, aka btsmail), which was originally proposed by Brian Sniffen. These are pretty mechanical changes -- nothing fancy added or removed, just trying to make the code a little more maintainable and moving it to pytho

[PATCH 03/11] nmweb: (pylint) use spaces instead of tabs

2018-02-04 Thread Daniel Kahn Gillmor
--- contrib/notmuch-web/nmweb.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/notmuch-web/nmweb.py b/contrib/notmuch-web/nmweb.py index 1f6e0145..b56c6b12 100755 --- a/contrib/notmuch-web/nmweb.py +++ b/contrib/notmuch-web/nmweb.py @@ -47,7 +47,7 @@ clas

[PATCH 01/11] nmweb: (pylint) use __future__.absolute_import

2018-02-04 Thread Daniel Kahn Gillmor
pylint --py3k suggests always including this in code that might run in either python2 or python3. it selects the python3 default. (see "pylint --help-msg=no-absolute-import" for more details) --- contrib/notmuch-web/nmweb.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/notmuch-w

[PATCH 06/11] nmweb: (pylint) put if clause on separate line from predicate

2018-02-04 Thread Daniel Kahn Gillmor
--- contrib/notmuch-web/nmweb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/notmuch-web/nmweb.py b/contrib/notmuch-web/nmweb.py index 6c687554..0217fce0 100755 --- a/contrib/notmuch-web/nmweb.py +++ b/contrib/notmuch-web/nmweb.py @@ -249,7 +249,8 @@ def link_to_c

[PATCH 04/11] nmweb: (pylint) normalize whitespace

2018-02-04 Thread Daniel Kahn Gillmor
I've settled on: * 2-space indent * one space after comma * one space on either side of assignment and comparison operators * no trailing whitespace This now satisfies the indentation/whitespace checks of: pylint --indent-string=' ' --indent-after-paren=2 nmweb.py --- contrib/notmuch-w

[PATCH 02/11] nmweb: (pylint) use replace() function directly on string object

2018-02-04 Thread Daniel Kahn Gillmor
Use of string.replace() is deprecated, better to invoke replace() directly on the string object. --- contrib/notmuch-web/nmweb.py | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/contrib/notmuch-web/nmweb.py b/contrib/notmuch-web/nmweb.py index c6d437c5..1f6e0145 100755

[PATCH 09/11] nmweb: explicitly move to python3

2018-02-04 Thread Daniel Kahn Gillmor
--- contrib/notmuch-web/nmweb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/notmuch-web/nmweb.py b/contrib/notmuch-web/nmweb.py index 31351399..eaeeb507 100755 --- a/contrib/notmuch-web/nmweb.py +++ b/contrib/notmuch-web/nmweb.py @@ -1,8 +1,8 @@ -#!/usr/bin/env

[PATCH 08/11] nmweb: use urllib.quote_plus() as plain quote_plus()

2018-02-04 Thread Daniel Kahn Gillmor
This will make it easier to import quote_plus from urllib.parse, which is where it is in python3. --- contrib/notmuch-web/nmweb.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/notmuch-web/nmweb.py b/contrib/notmuch-web/nmweb.py index 0217fce0..31351399 100755

[PATCH 10/11] nmweb: hide numeric date fields'

2018-02-04 Thread Daniel Kahn Gillmor
These are populated by javascript, but the user shouldn't see them. --- contrib/notmuch-web/templates/base.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/notmuch-web/templates/base.html b/contrib/notmuch-web/templates/base.html index 6d204562..e3743c93 100644

[PATCH 05/11] nmweb: (pylint) import built-in modules before third-party modules

2018-02-04 Thread Daniel Kahn Gillmor
--- contrib/notmuch-web/nmweb.py | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/notmuch-web/nmweb.py b/contrib/notmuch-web/nmweb.py index bee4896e..6c687554 100755 --- a/contrib/notmuch-web/nmweb.py +++ b/contrib/notmuch-web/nmweb.py @@ -2,15 +2,16 @@ from __

[PATCH 07/11] nmweb: shim for launching from gunicorn

2018-02-04 Thread Daniel Kahn Gillmor
file:///usr/share/doc/python-webpy-doc/html/deploying.html suggests that gunicorn is an efficient way to deploy a webpy-based WSGI daemon. This script is glue between nmweb.py and gunicorn. --- contrib/notmuch-web/nmgunicorn.py | 11 +++ 1 file changed, 11 insertions(+) create mode 10064

[PATCH 11/11] nmweb: handle non-numeric timestamp inputs

2018-02-04 Thread Daniel Kahn Gillmor
Without this check, it's trivial to crash the nmweb daemon with a ValueError by putting a non-numeric value in befores or afters. --- contrib/notmuch-web/nmweb.py | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/contrib/notmuch-web/nmweb.py b/contrib/notmuch-web/nmweb.p

a temporary nmweb view of notmuch mailing list archive

2018-02-04 Thread Daniel Kahn Gillmor
Hi all-- I did a bit of experimenting with Brian Sniffen's proposed notmuch-web branch, and it's now (temporarily) publishing a view of the notmuch mailing list here: https://nmbug.notmuchmail.org/btsmail/ I DO NOT EXPECT THIS URL TO BE STABLE -- please do not use links to it in permanent pl

Re: [PATCH] remove debian-build/ and its children when cleaning after debian package

2018-02-04 Thread Daniel Kahn Gillmor
On Sun 2018-02-04 20:34:32 -0400, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> --- >> debian/clean | 1 + >> 1 file changed, 1 insertion(+) >> create mode 100644 debian/clean >> >> diff --git a/debian/clean b/debian/clean >>

Bcc, throw-keyids, and metadata hiding [was: Re: Announcing Astroid v0.11]

2018-02-04 Thread Daniel Kahn Gillmor
On Sun 2018-02-04 16:18:02 -0500, Daniel Kahn Gillmor wrote: > Well, i guess you could limit it to two copies total: one copy is to all > Bcc'ed recipients, and one copy to all non-Bcc'ed recipients. you'd > want to make sure that you got the same Message-ID on each gen

backporting 0.26-1 to debian stable (stretch)

2018-02-04 Thread Daniel Kahn Gillmor
Hi all-- I've just backported notmuch 0.26-1 to debian stable (stretch) You can find the signed tag for debian/0.26-1_bpo9+1 at: https://gitlab.com/dkg/notmuch it's on the branch named debian/stretch-backports. it's be nice to have the "official" debian/stretch-backports branch fastforwarde

Re: Announcing Astroid v0.11

2018-02-04 Thread Daniel Kahn Gillmor
On Sun 2018-02-04 20:10:25 +0100, Gaute Hope wrote: > Because that is currently the only option when using GMime [0]. right, sad. and that's likely due to the constraints of GPGME. what a dependency chain! I've just opened two issues to try to push that forward: https://github.com/jstedfast/

[PATCH] debian: use pristine-tar

2018-02-04 Thread Daniel Kahn Gillmor
Some (all?) versions of git-buildpackage default to not using pristine-tar. Most recently, i stumbled into this trying to build a stretch-backports package, which was rejected because the orig.tar.gz did not match. Stating this clearly in debian/gbp.conf would have avoided this problem for me. --

Re: umask/permissions on new files created via notmuch-insert(1) ?

2018-02-04 Thread Daniel Kahn Gillmor
On Sun 2018-02-04 20:34:09 +0100, Gaute Hope wrote: > Daniel Kahn Gillmor writes on februar 4, 2018 20:25: >> is there a reason that "notmuch insert" should be stricter than the >> umask? does this ring any bells for people? > > Are you asking why it is or why it s

[PATCH] remove debian-build/ and its children when cleaning after debian package

2018-02-04 Thread Daniel Kahn Gillmor
--- debian/clean | 1 + 1 file changed, 1 insertion(+) create mode 100644 debian/clean diff --git a/debian/clean b/debian/clean new file mode 100644 index ..c5797567 --- /dev/null +++ b/debian/clean @@ -0,0 +1 @@ +debian-build/ -- 2.15.1 ___

umask/permissions on new files created via notmuch-insert(1) ?

2018-02-04 Thread Daniel Kahn Gillmor
during some maintenance work today, bremner and i noticed that message delivery via "notmuch insert" creates files that are stricter than the umask. using notmuch 0.23.6, with umask 027, "notmuch insert" created files with mode 0600. i would have expected 0640. using strace, i don't see notmuch

Re: Announcing Astroid v0.11

2018-02-04 Thread Daniel Kahn Gillmor
On Sun 2018-02-04 18:52:22 +0100, Gaute Hope wrote: > This is done to hide Bcc-recipients. sure, but i'm wondering why you throw *all* keyids, instead of only the key-ids of the bcc'ed people? > As you say, GnuPG must try all the secret keys; but many > users use some sort of keyring to unlock t

Re: Announcing Astroid v0.11

2018-02-04 Thread Daniel Kahn Gillmor
Hi Gaute-- On Sun 2018-02-04 11:46:20 +0100, Gaute Hope wrote: > Astroid v0.11 has been released! Congratulations -- it's great to see this progress! :) > * Always throw key-id when sending (using GMime 3) Can you explain this choice? As someone who receives mail with a thrown key-id, and as s

Re: Fetching from the git repositories over https?

2018-02-04 Thread Daniel Kahn Gillmor
Hi Adam-- On Sun 2018-01-28 17:26:08 +, Adam Plaice wrote: > I apologise if I'm asking in the wrong place. > > Is it possible to clone/fetch from the notmuch git repositories > (particularly https://git.notmuchmail.org/git/notmuch) over https > rather than with the `git://' protocol? (None of

Re: [PATCH] doc: create manpage folders with right permissions

2018-01-31 Thread Daniel Kahn Gillmor
On Wed 2018-01-31 21:50:45 +0100, Antoine Amarilli wrote: > Avoids the issue where umask can make man pages unreadable after > installation. Relevant email on the mailing-list: > <87h8rt30sy@fifthhorseman.net> lgtm, and i've tagged to suggest that it's ready for inclusion. thanks, Antoine!

Re: trouble searching with unix timestamps

2018-01-30 Thread Daniel Kahn Gillmor
On Mon 2018-01-29 16:13:38 +, Matthew Lear wrote: > [ Jani wrote: ] >> Alternatively, you can use @ in date: queries, although this >> seems to be completely undocumented: > > I guess this relates to similar syntax requirements of date -d in that a > unix timestamp is required to be preceded by

Re: Long delay when opening signed emails

2018-01-30 Thread Daniel Kahn Gillmor
Hi Michal-- On Tue 2018-01-30 17:17:54 +0100, Michal Sojka wrote: > Hi all, > > I experience annoyingly long delay, when opening some signed emails in > Emacs. This is likely related to the following lines appearing in my > log when opening the email: > > Jan 30 17:07:46 dirmngr[7526]: no CRL avai

Re: Bug?: manpages are only readable by root when doing sudo make install with umask 077

2018-01-10 Thread Daniel Kahn Gillmor
Hi Antoine-- On Wed 2018-01-10 19:29:59 +0100, Antoine Amarilli wrote: > On Wed, Jan 10, 2018 at 11:23:03AM -0500, Daniel Kahn Gillmor wrote: > That's right. Looking more closely I think the issue is only with the > permissions of the directories /usr/local/share/man/man*, not th

Re: Bug?: manpages are only readable by root when doing sudo make install with umask 077

2018-01-10 Thread Daniel Kahn Gillmor
On Wed 2018-01-10 21:45:34 +0200, Tomi Ollila wrote: > If user has set umask to 077, should we override that (as we're now doing > with the files by giving explicit permissions) ? /usr/bin/install itself does already override the user's umask, and it's being run by the superuser ("sudo make instal

Re: [PATCH 1/2] INSTALL: refer to python3-sphinx

2018-01-10 Thread Daniel Kahn Gillmor
On Wed 2018-01-10 13:09:20 -0400, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> @@ -88,11 +88,11 @@ dependencies with a simple simple command line. For >> example: > > BTW, "simple simple" is probably a typo but it's so simpl

Re: Bug?: manpages are only readable by root when doing sudo make install with umask 077

2018-01-10 Thread Daniel Kahn Gillmor
On Wed 2018-01-10 16:38:14 +0100, Antoine Amarilli wrote: > My user has umask 077. When I do sudo make install, this umask seems to > affect installation: the folders /usr/local/share/man/man* get created > as belonging to root:staff with permissions 2700, so the installed > manpages cannot be rea

[PATCH 2/2] travis: build against python3-sphinx instead of python-sphinx

2018-01-10 Thread Daniel Kahn Gillmor
Ubuntu trusty has python3-sphinx 1.2.2+dfsg-1ubuntu1, so this should be OK. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 802efd98..d18325e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ addons: - libxapian-d

Re: Bug: INSTALL should mention python3-sphinx not python-sphinx

2018-01-10 Thread Daniel Kahn Gillmor
On Wed 2018-01-10 16:38:18 +0100, Antoine Amarilli wrote: > In the current master (a727e7d4d398375c4a3ba5020e2ab25b5b874785), > INSTALL contains: > > For Debian and similar: > > sudo apt-get install libxapian-dev libgmime-3.0-dev libtalloc-dev > zlib1g-dev python-sphinx > > However it s

[PATCH 1/2] INSTALL: refer to python3-sphinx

2018-01-10 Thread Daniel Kahn Gillmor
We're now preferring to build with python3 instead of python2. Update the INSTALL to match. Thanks to Antoine Amarilli for pointing this out! --- INSTALL | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL b/INSTALL index 875014f0..4a0dc741 100644 --- a/INSTALL +++ b

[PATCH v2 5/5] cli/show: enable --decrypt=stash

2018-01-09 Thread Daniel Kahn Gillmor
Add fancy new feature, which makes "notmuch show" capable of actually indexing messages that it just decrypted. This enables a workflow where messages can come in in the background and be indexed using "--decrypt=auto". But when showing an encrypted message for the first time, it gets automatical

[PATCH v2 1/5] lib: expose notmuch_message_get_database()

2018-01-09 Thread Daniel Kahn Gillmor
We've had _notmuch_message_database() internally for a while, and it's useful. It turns out to be useful on the other side of the library interface as well (i'll use it later in this series for "notmuch show"), so we expose it publicly now. --- lib/index.cc| 10 +- lib/message

[PATCH v2 2/5] properties: add notmuch_message_count_properties

2018-01-09 Thread Daniel Kahn Gillmor
The user can already do this manually, of course, but (a) it's nice to have a convenience function, and (b) exposing this interface means that someone more clever with a _notmuch_string_map_t than i am can write a more efficient version if they like, and it will just accelerate the users of the con

notmuch show --decrypt=stash

2018-01-09 Thread Daniel Kahn Gillmor
This is a revision of the series initially introduced in id:20171212025225.11854-1-...@fifthhorseman.net, with minor updates to accomodate the recent release of notmuch 0.26 (yay!) This series allows "notmuch show" to index the cleartext and stash the session keys of an encrypted message while dis

[PATCH v2 4/5] cli/show: reindex when we learned new session keys about a message

2018-01-09 Thread Daniel Kahn Gillmor
If the number of session keys for a given message increased after running "notmuch show" then we just learned something new that might let us do automatic decryption. We should reindex this message using our newfound knowledge. --- notmuch-show.c | 20 1 file changed, 20 inse

[PATCH v2 3/5] cli: write session keys to database, if asked to do so

2018-01-09 Thread Daniel Kahn Gillmor
If the decryption policy is NOTMUCH_DECRYPT_TRUE, that means we want to stash session keys in the database. Note that there is currently no way from the command line to set it this way, though, so it is not yet included in the test suite. --- mime-node.c | 24 1 file chan

Re: [PATCH] CLI/restore: handle missing keys and values in config data.

2018-01-07 Thread Daniel Kahn Gillmor
On Sun 2018-01-07 17:30:25 -0400, David Bremner wrote: > Although such lines can't occur in notmuch dump output, they might be > useful for clearing config, and anyway segfaulting is not the best > error message. I don't think we want "notmuch restore" to actually clear any configurations (it's al

[PATCH] notes about debian packaging changes

2018-01-07 Thread Daniel Kahn Gillmor
+ * build against python3-sphinx instead of python-sphinx + * d/changelog: strip trailing whitespace + * move to debhelper 10 + * Standards-Version: bump to 4.1.3 (drop priority: extra +from transitional packages) + * update symbols + + -- Daniel Kahn Gillmor Sun, 07 Jan 2018 09:36:24 -0500

Re: [PATCH] WIP: support XDG database directory

2018-01-02 Thread Daniel Kahn Gillmor
On Tue 2018-01-02 20:00:33 -0400, David Bremner wrote: > Daniel Kahn Gillmor writes: >> where would each such notmuch database live if there were two different >> mailstores? how is any given mailstore bound to the associated notmuch >> database itself? > > Each

Re: [PATCH] WIP: support XDG database directory

2018-01-02 Thread Daniel Kahn Gillmor
On Sat 2017-12-30 16:07:40 -0400, David Bremner wrote: > Just a rebase against current master, based on discussion in IRC > today. AFAIK, the general approach could be extended to support a > "NOTMUCH_DATABASE_DIRECTORY" environment variable, which if think is > what Tomi was suggesting previousl

[PATCH 2/2] Standards-Version: bump to 4.1.3 (no changes needed)

2018-01-02 Thread Daniel Kahn Gillmor
--- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 126a2777..c3fe710a 100644 --- a/debian/control +++ b/debian/control @@ -28,7 +28,7 @@ Build-Depends: gpgsm , gnupg , bash-completion (>=1.9.0~) -Standards-Version: 4.1

[PATCH 1/2] move to debhelper 10

2018-01-02 Thread Daniel Kahn Gillmor
--- debian/compat | 2 +- debian/control | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/compat b/debian/compat index ec635144..f599e28b 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -9 +10 diff --git a/debian/control b/debian/control index bf7eb647..126

[PATCH] fix typos

2018-01-02 Thread Daniel Kahn Gillmor
--- Makefile.local| 2 +- NEWS | 4 ++-- bindings/python/notmuch/database.py | 4 ++-- bindings/python/notmuch/filenames.py | 2 +- bindings/python/notmuch/message.py| 4 ++-- bindings/python/notmuch/messages.py | 2 +- bindin

[PATCH 2/6] NEWS: transition n_d_add_message to n_d_index_file

2017-12-31 Thread Daniel Kahn Gillmor
--- NEWS | 8 1 file changed, 8 insertions(+) diff --git a/NEWS b/NEWS index 989cc405..a7ca0245 100644 --- a/NEWS +++ b/NEWS @@ -82,6 +82,14 @@ Change of return value of `notmuch_thread_get_authors` returned NULL. This has been replaced by an empty string, since the possibility of

[PATCH 6/6] NEWS: document notmuch-properties(7)

2017-12-31 Thread Daniel Kahn Gillmor
--- NEWS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/NEWS b/NEWS index 7b50afc0..47b62d73 100644 --- a/NEWS +++ b/NEWS @@ -131,6 +131,16 @@ User-facing changes with this notmuch release: * Only error for invalid diff lines in `tags/`, which allows for `README`s and similar

[PATCH 1/6] NEWS: cleartext indexing section includes session keys

2017-12-31 Thread Daniel Kahn Gillmor
These are part and parcel of the same feature, so include the overview here. --- NEWS | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 10752fa7..989cc405 100644 --- a/NEWS +++ b/NEWS @@ -43,13 +43,22 @@ Indexing cleartext of encrypted e-mails

[PATCH 5/6] NEWS: document notmuch_message_remove_all_properties_with_prefix

2017-12-31 Thread Daniel Kahn Gillmor
--- NEWS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 997c07d3..7b50afc0 100644 --- a/NEWS +++ b/NEWS @@ -82,6 +82,12 @@ New functions to count files Two new functions in the libnotmuch API: `notmuch_message_count_files`, and `notmuch_thread_get_total_files`.

[PATCH 4/6] NEWS: notmuch {show, reply} --decrypt takes explicit argument

2017-12-31 Thread Daniel Kahn Gillmor
--- NEWS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 274d522c..997c07d3 100644 --- a/NEWS +++ b/NEWS @@ -35,6 +35,12 @@ Support maildir synced tags in `new.tags` maildir syncing, and will be added for files in `new/` regardless of the setting of `new.tags`.

[PATCH 3/6] NEWS: note decrypt_policy in python bindings for index_file

2017-12-31 Thread Daniel Kahn Gillmor
--- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index a7ca0245..274d522c 100644 --- a/NEWS +++ b/NEWS @@ -104,6 +104,8 @@ Open mail files in binary mode when using Python 3 Add python bindings for notmuch_database_{get,set}_config* +Optional `decrypt_policy` flag is

Re: [PATCH v4 3/3] cli/reply: make --decrypt take a keyword

2017-12-30 Thread Daniel Kahn Gillmor
On Sat 2017-12-30 09:05:40 -0400, David Bremner wrote: > I need more time to think about this, so I'd rather defer till after the > release in any case. are you saying that you want to defer this whole series until after the release? that would be a real shame, since it would mean we'd have both

Re: [PATCH v4 3/3] cli/reply: make --decrypt take a keyword

2017-12-29 Thread Daniel Kahn Gillmor
On Fri 2017-12-29 10:30:00 -0400, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> No, we should not support --decrypt=nostash for show or reply. The >> semantics of the display commands (show, reply) are such that they >> *never* modify the index or stash

Re: [PATCH 0/2] nmbug: Bump to 0.3 and document in NEWS

2017-12-29 Thread Daniel Kahn Gillmor
On Fri 2017-12-29 17:33:45 +0200, Tomi Ollila wrote: > On Thu, Dec 28 2017, W. Trevor King wrote: > >> As discussed previously in [1,2,3]. I've split this into two patches, >> and only covered the changes since the last notmuch release. There >> have been additional changes since nmbug 0.2 (which

Re: [PATCH v4 1/3] cli: some keyword options can be supplied with no argument

2017-12-28 Thread Daniel Kahn Gillmor
On Sat 2017-12-23 10:29:30 -0400, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> >> +bool incremented = false; >> if (next == '\0' && next_arg != NULL && ! try->opt_bool) { >> next = '

Re: [PATCH v4 2/3] cli/show: make --decrypt take a keyword.

2017-12-28 Thread Daniel Kahn Gillmor
On Sat 2017-12-23 10:39:47 -0400, David Bremner wrote: > One thing that gave me pause is the fact that --decrypt=auto does not > verify by default. What are the security implications of this? The only issue is that some messages that are correctly signed are marked as unsigned if the user hasn't c

Re: [PATCH v4 3/3] cli/reply: make --decrypt take a keyword

2017-12-28 Thread Daniel Kahn Gillmor
On Sat 2017-12-23 10:47:52 -0400, David Bremner wrote: > Daniel Kahn Gillmor writes: >> +{ .opt_keyword = (int*)(¶ms.crypto.decrypt), .name = "decrypt", >> + .keyword_no_arg_value = "true", .keywords = >> + (notmuch_keywor

Re: Notmuch Emacs: tab completion for tags in Fcc:

2017-12-21 Thread Daniel Kahn Gillmor
On Thu 2017-12-21 15:07:32 +0100, Tomas Nordin wrote: > Alex Abdo writes: >> One small suggestion for Notmuch Emacs: it would be nice if there were >> tab completion for tags (and, if possible, folders) in the Fcc header >> when composing messages in Emacs. >> >> There is already tab completion

Re: Update on python-cffi bindings

2017-12-21 Thread Daniel Kahn Gillmor
On Thu 2017-12-21 12:30:39 +0100, Floris Bruynooghe wrote: > The API changes a lot and there is no easy migration. And history has > shown that's a terrible way to get something new adopted. Last time I > suggested a possible multi-tiered approach (maybe not as explicit): > > 1 I think it's possi

Re: [PATCH] cli: add support for only printing the addresses in notmuch address

2017-12-19 Thread Daniel Kahn Gillmor
On Tue 2017-12-19 13:23:55 -0800, Jameson Graef Rollins wrote: > On Thu, Nov 02 2017, Jani Nikula wrote: >> The notmuch address output is much more useful for scripts with just >> the addresses printed. Support this using the --output=address option. > > Isn't "address" kind of orthogonal to "send

Re: [PATCH v4] python: add decrypt_policy argument to Database.index_file()

2017-12-19 Thread Daniel Kahn Gillmor
On Tue 2017-12-19 07:23:35 -0400, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> +Date: $(date -R) >> +Message-ID: >> +MIME-Version: 1.0 >> +Content-Type: multipart/encrypted; boundary="=-=-="; >> +protocol="application/pgp-encrypte

[PATCH v5] python: add decrypt_policy argument to Database.index_file()

2017-12-19 Thread Daniel Kahn Gillmor
We adopt a pythonic idiom here with an optional argument, rather than exposing the user to the C indexopts object directly. This now includes a simple test to ensure that the decrypt_policy argument works as expected. --- bindings/python/notmuch/database.py | 45 ++

[PATCHES v4] Encourage explicit arguments for --decrypt in "show" and "reply"

2017-12-19 Thread Daniel Kahn Gillmor
This is a clean revision of the series that was first introduced at id:20171212001858.706-1-...@fifthhorseman.net. It needed to be rebased after Jani's boolean/negation series. It should now apply cleanly. I think it's important to apply this series before releasing 0.26, because of the interact

[PATCH v4 3/3] cli/reply: make --decrypt take a keyword

2017-12-19 Thread Daniel Kahn Gillmor
This brings the --decrypt argument to "notmuch reply" into line with the other --decrypt arguments (in "show", "new", "insert", and "reindex"). This patch is really just about bringing consistency to the user interface. We also use the recommended form in the emacs MUA when replying, and update t

[PATCH v4 2/3] cli/show: make --decrypt take a keyword.

2017-12-19 Thread Daniel Kahn Gillmor
We also expand tab completion for it, update the emacs bindings, and update T350, T357, and T450 to match. Make use of the bool-to-keyword backward-compatibility feature. --- completion/notmuch-completion.bash | 6 +- doc/man1/notmuch-show.rst | 37 +-

[PATCH v4 1/3] cli: some keyword options can be supplied with no argument

2017-12-19 Thread Daniel Kahn Gillmor
We might change some notmuch command line tools that used to be booleans into keyword arguments. In that case, there are some legacy tools that will expect to be able to do "notmuch foo --bar" instead of "notmuch foo --bar=baz". This patch makes it possible to support that older API, while provid

[PATCH] test: final named query test works regardless of Xapian FieldProcessor

2017-12-19 Thread Daniel Kahn Gillmor
This test passes with older versions of Xapian as well, because neither query returns any results. This should resolve the travis build failure at https://travis-ci.org/notmuch/notmuch/builds/318571658 Signed-off-by: Daniel Kahn Gillmor --- test/T600-named-queries.sh | 3 --- 1 file changed, 3

Re: Update on python-cffi bindings

2017-12-18 Thread Daniel Kahn Gillmor
Hi Floris-- On Sun 2017-12-17 19:08:18 +0100, Floris Bruynooghe wrote: > Thanks for all the feedback on an early post of my CFFI-based libnotmuch > Python bindings. I've now completed these somewhat more and they now > have most of the functionality. Here's what's new since last time: thanks f

Re: subjects and duplicated message id's

2017-12-14 Thread Daniel Kahn Gillmor
On Thu 2017-12-14 10:03:12 -0400, David Bremner wrote: > There are currently several somewhat related issues with notmuch's > handling of subject headers for messages with duplicate message-ids > (i.e. several files on disk with the same message id). These are all > reflections of the fact that we

config file vs. config in the database [was: Re: Possible bug with named queries]

2017-12-13 Thread Daniel Kahn Gillmor
Hi Carl, all-- thanks for raising this subject! I've taken this opportunity to write down a bit more justification for why i lean in the direction that Bremner describes, but would be happy to be argued out of it. On Wed 2017-12-13 15:09:23 -0800, Carl Worth wrote: > Really? We're deprecating th

Re: [PATCH v3 14/15] docs: clean up documentation about decryption policies

2017-12-13 Thread Daniel Kahn Gillmor
On Fri 2017-12-08 22:27:37 -0400, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> Now that the range of sensible decryption policies has come into full >> view, we take a bit of space to document the distinctions. > > pushed 1-14, but holding you to your promise

cope with inline PGP encrypted messages

2017-12-11 Thread Daniel Kahn Gillmor
Inline PGP encrypted messages are clearly worse than PGP/MIME structured encrypted messages. There are no standards for how they are formed, and they don't offer any structured metadata about how to interpret the bytestream produced by decrypting them. However, some other MUAs and end-user workfl

[PATCH 4/5] index: _index_encrypted_mime_part returns success or failure

2017-12-11 Thread Daniel Kahn Gillmor
This change prepares us to know whether or not _index_encrypted_mime_part succeeded or not on a given MIME part. We don't currently make use of the information, but we will in subsequent changes. --- lib/index.cc | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --g

[PATCH 3/5] index: tag text parts with inline PGP encryption as "encrypted"

2017-12-11 Thread Daniel Kahn Gillmor
Assuming we have GMime 3.0 (which has efficient detection of inline PGP encrypted blobs) we should be able to mark those messages with the same tag that we mark PGP/MIME and S/MIME encrypted messages. --- lib/index.cc | 6 ++ test/T359-inline-pgp-decryption.sh | 4 ++-- 2

[PATCH 1/5] crypto: prepare for decryption of inline PGP encrypted messages

2017-12-11 Thread Daniel Kahn Gillmor
Inline PGP encrypted messages are clearly worse than PGP/MIME structured encrypted messages. There are no standards for how they are formed, and they don't offer any structured metadata about how to interpret the bytestream produced by decrypting them. However, some other MUAs and end-user workfl

[PATCH 5/5] index: try indexing the cleartext of inline PGP encrypted text parts

2017-12-11 Thread Daniel Kahn Gillmor
Assuming that we're using GMime 3.0 or later, and the user has asked for decryption of some sort, we should go ahead and index the cleartext. --- lib/index.cc | 7 +++ test/T359-inline-pgp-decryption.sh | 7 +++ 2 files changed, 14 insertions(+) diff --git a/lib/inde

[PATCH 2/5] cli/{show, reply}: try to decrypt inline PGP encrypted messages

2017-12-11 Thread Daniel Kahn Gillmor
We try this only for leaf parts that are explicitly marked as Content-Type: text/*, since we don't want to accidentally match on any other weird part that happens to contain the magic string, or on the payload child of a multipart/encrypted part. Of course, this only works for GMime 3.0 and later,

Re: [PATCH v2] cli/reply: make --decrypt take a keyword

2017-12-11 Thread Daniel Kahn Gillmor
On Tue 2017-12-12 01:52:52 -0500, Daniel Kahn Gillmor wrote: > This brings the --decrypt argument to "notmuch reply" into line with > the other --decrypt arguments (in "show", "new", "insert", and > "reindex"). This patch is really just

Re: [PATCH v3] cli/show: make --decrypt take a keyword.

2017-12-11 Thread Daniel Kahn Gillmor
On Tue 2017-12-12 01:51:57 -0500, Daniel Kahn Gillmor wrote: > We also expand tab completion for it, update the emacs bindings, and > update T350, T357, and T450 to match. > > Make use of the bool-to-keyword backward-compatibility feature. and now revision 3 of this patch includes t

[PATCH v2] cli/reply: make --decrypt take a keyword

2017-12-11 Thread Daniel Kahn Gillmor
This brings the --decrypt argument to "notmuch reply" into line with the other --decrypt arguments (in "show", "new", "insert", and "reindex"). This patch is really just about bringing consistency to the user interface. We also use the recommended form in the emacs MUA when replying, and update t

[PATCH v3] cli/show: make --decrypt take a keyword.

2017-12-11 Thread Daniel Kahn Gillmor
We also expand tab completion for it, update the emacs bindings, and update T350, T357, and T450 to match. Make use of the bool-to-keyword backward-compatibility feature. --- completion/notmuch-completion.bash | 6 +- doc/man1/notmuch-show.rst | 37 +-

[PATCH v2] properties: add notmuch_message_count_properties

2017-12-11 Thread Daniel Kahn Gillmor
The user can already do this manually, of course, but (a) it's nice to have a convenience function, and (b) exposing this interface means that someone more clever with a _notmuch_string_map_t than i am can write a more efficient version if they like, and it will just accelerate the users of the con

[PATCH 2/5] properties: add notmuch_message_count_properties

2017-12-11 Thread Daniel Kahn Gillmor
The user can already do this manually, of course, but (a) it's nice to have a convenience function, and (b) exposing this interface means that someone more clever with a _notmuch_string_map_t than i am can write a more efficient version if they like, and it will just accelerate the users of the con

[PATCH 4/5] cli/show: reindex when we learned new session keys about a message

2017-12-11 Thread Daniel Kahn Gillmor
If the number of session keys for a given message increased after running "notmuch show" then we just learned something new that might let us do automatic decryption. We should reindex this message using our newfound knowledge. --- notmuch-show.c | 20 1 file changed, 20 inse

notmuch show --decrypt=stash

2017-12-11 Thread Daniel Kahn Gillmor
This series allows "notmuch show" to index the cleartext and stash the session keys of an encrypted message while displaying it. Because it uses a keyword argument to --decrypt for "notmuch show", It needs to be applied *after* the series with the subject: Encourage explicit arguments for --d

[PATCH 1/5] lib: expose notmuch_message_get_database()

2017-12-11 Thread Daniel Kahn Gillmor
We've had _notmuch_message_database() internally for a while, and it's useful. It turns out to be useful on the other side of the library interface as well (i'll use it later in this series for "notmuch show"), so we expose it publicly now. --- lib/index.cc| 10 +- lib/message

[PATCH 5/5] cli/show: enable --decrypt=stash

2017-12-11 Thread Daniel Kahn Gillmor
Add fancy new feature, which makes "notmuch show" capable of actually indexing messages that it just decrypted. This enables a workflow where messages can come in in the background and be indexed using "--decrypt=auto". But when showing an encrypted message for the first time, it gets automatical

[PATCH 3/5] cli: write session keys to database, if asked to do so

2017-12-11 Thread Daniel Kahn Gillmor
If the decryption policy is NOTMUCH_DECRYPT_TRUE, that means we want to stash session keys in the database. Note that there is currently no way from the command line to set it this way, though, so it is not yet included in the test suite. --- mime-node.c | 24 1 file chan

Re: [PATCH v2] cli/show: make --decrypt take a keyword.

2017-12-11 Thread Daniel Kahn Gillmor
On Mon 2017-12-11 21:33:57 -0500, Daniel Kahn Gillmor wrote: > We also expand tab completion for it, and update T357 to match. > > Make use of the bool-to-keyword backward-compatibility feature. v2 of this patch just removes an unnecessary attempt to open the database read-write. T

[PATCH v2] cli/show: make --decrypt take a keyword.

2017-12-11 Thread Daniel Kahn Gillmor
We also expand tab completion for it, and update T357 to match. Make use of the bool-to-keyword backward-compatibility feature. --- completion/notmuch-completion.bash | 6 +- doc/man1/notmuch-show.rst | 37 + notmuch-show.c | 2

<    3   4   5   6   7   8   9   10   11   12   >