[PATCH 7/7] index: avoid indexing legacy-display parts

2019-06-24 Thread Daniel Kahn Gillmor
on the message: index.repaired=skip-protected-headers-legacy-display Signed-off-by: Daniel Kahn Gillmor --- doc/man7/notmuch-properties.rst | 6 ++ lib/index.cc| 20 test/T356-protected-headers.sh | 2 -- 3 files changed, 22 insertions(+), 6

[PATCH 5/7] util/repair: add _notmuch_repair_crypto_payload_skip_legacy_display

2019-06-24 Thread Daniel Kahn Gillmor
lay, which tests all of the things we'd expect to be true in a a cryptographic payload that contains a legacy display part. Signed-off-by: Daniel Kahn Gillmor --- util/repair.c | 98 +++ util/repair.h | 17 + 2 files changed, 115 insertions(+)

[PATCH 4/7] util/crypto: _n_m_crypto_potential_payload returns whether part is the payload

2019-06-24 Thread Daniel Kahn Gillmor
-by: Daniel Kahn Gillmor --- lib/index.cc | 9 ++--- mime-node.c | 6 +- util/crypto.c | 27 --- util/crypto.h | 7 +-- 4 files changed, 20 insertions(+), 29 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index db3dd568..8a3e2e09 100644 --- a/lib

v3 of legacy-display cleanup

2019-06-24 Thread Daniel Kahn Gillmor
This is the third revision of the series that cleans up legacy-display protected headers parts so that notmuch users only have to look at one subject line. version 2 can be found at id:20190531075907.17035-1-...@fifthhorseman.net version 1 can be found at

[PATCH 6/7] cli/{show,reply}: skip over legacy-display parts

2019-06-24 Thread Daniel Kahn Gillmor
Make use of the previous changes to fast-forward past any legacy-display parts during "notmuch show" and "notmuch reply". Signed-off-by: Daniel Kahn Gillmor --- mime-node.c| 11 ++- test/T356-protected-headers.sh | 2 -- 2 files changed,

Re: [PATCH] emacs: add keywords to notmuch-emacs-mua.desktop

2019-06-24 Thread Daniel Kahn Gillmor
Ping! If there is a reason that this trivial patch has languished, i'd be happy to receive critical feedback. Or maybe we can just merge it? --dkg On Mon 2019-06-10 04:44:39 +0300, Daniel Kahn Gillmor wrote: > Debian's lintian has an informational alert > desktop-entry-lacks-keywords

[PATCH 2/7] repair: set up codebase for repair functionality

2019-06-24 Thread Daniel Kahn Gillmor
This adds no functionality directly, but is a useful starting point for adding new repair functionality. Signed-off-by: Daniel Kahn Gillmor --- doc/man7/notmuch-properties.rst | 12 lib/notmuch-private.h | 1 + notmuch-client.h| 1 + util/Makefile.local

[PATCH 3/7] test: avoid showing legacy-display parts

2019-06-24 Thread Daniel Kahn Gillmor
but haven't had time to write the tests for the unusual cases) Signed-off-by: Daniel Kahn Gillmor --- test/T356-protected-headers.sh| 33 +++ .../protected-with-legacy-display.eml | 40 +++ 2 files changed, 73 insertions(+) create mode 100644

[PATCH 1/7] mime-node: split out _mime_node_set_up_part

2019-06-24 Thread Daniel Kahn Gillmor
in the codebase that referred to an older name of _mime_node_create (message_part_create), where this functionality originally resided. I've fixed that comment to refer to the new function instead. Signed-off-by: Daniel Kahn Gillmor --- mime-node.c | 30 ++ 1 file changed, 22

[PATCH] uncrustify: clean up whitespace in notmuch-show.c

2019-06-24 Thread Daniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor --- notmuch-show.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 9779cfa5..21792a57 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -492,7 +492,7 @@ format_part_text (const void *ctx

Re: [PATCH 2/2] test: replace use of gdb with LD_PRELOAD shims in T070-insert.sh

2019-06-24 Thread Daniel Kahn Gillmor
On Mon 2019-06-24 21:44:13 +0300, Tomi Ollila wrote: > If this suite speedup is merged, I'd suggest using original David's patch > 2/2 due to consistency reasons -- $gen_test_filename is used likewise in > other test_expect_code cases. and, unless $TEST_DIRECTORY contains '"'s, > '$'s or '`'s it

Re: [PATCH 2/2] test: replace use of gdb with LD_PRELOAD shims in T070-insert.sh

2019-06-24 Thread Daniel Kahn Gillmor
On Fri 2019-06-14 08:16:14 -0300, David Bremner wrote: > Ralph Seichter writes: > >> * Daniel Kahn Gillmor: >> >>> Perhaps Ralph Seichter (explicitly cc'ed above) could comment on how >>> it'll affect homebrew? >> >> MacPorts, actually. ;-)

Re: locales and notmuch

2019-06-19 Thread Daniel Kahn Gillmor
(sorry for the late reply to this thread) On Thu 2019-02-21 15:11:48 -0400, David Bremner wrote: > to be unique case-insensitively, so I decided to convert them to lower > case on input. This turns out to be "fun", if we try to handle things > other than ASCII. So one option is to just insist

Re: [PATCH 3/8] CLI: replace some constructs with more uncrustify friendly ones

2019-06-17 Thread Daniel Kahn Gillmor
On Mon 2019-06-17 01:01:39 -0400, David Bremner wrote: > Yes, the C11 standard seems pretty clear here, 6.3.1.{1,2} Thanks for the reference. I'm fine with accepting these changes, and chalking this up as one more piece of programming arcana that i've learned from working on the notmuch project

Re: [PATCH] python: bind add_property/remove_property and related methods

2019-06-16 Thread Daniel Kahn Gillmor
On Sun 2019-06-16 02:52:52 +0300, Daniel Kahn Gillmor wrote: > On Fri 2019-06-14 22:34:16 +0200, VA wrote: >> As a general rule, an application MUST prefix their own property names >> with "x--". It is recommended to report an application's >> properti

Re: [PATCH v2 2/2] test: replace use of gdb with LD_PRELOAD shims in T070-insert.sh

2019-06-16 Thread Daniel Kahn Gillmor
On Sun 2019-06-16 14:35:53 +0300, Tomi Ollila wrote: > On Mon, Jun 10 2019, Daniel Kahn Gillmor wrote: >> +test_expect_code 1 "$(printf "notmuch_with_shim shim-%q insert < %q" >> "$code" "$gen_msg_filename")" > >

Re: [PATCH 3/8] CLI: replace some constructs with more uncrustify friendly ones

2019-06-16 Thread Daniel Kahn Gillmor
On Thu 2019-06-13 08:08:32 -0300, David Bremner wrote: >- add parens in some ternery operators itym "ternary" > @@ -120,13 +120,13 @@ _process_string_arg (const notmuch_opt_desc_t > *arg_desc, char next, const char * > static int _opt_set_count (const notmuch_opt_desc_t *opt_desc) > { >

Re: [PATCH] configure: fix mktemp call for macOS

2019-06-16 Thread Daniel Kahn Gillmor
On Fri 2019-06-14 20:57:07 +0300, Tomi Ollila wrote: > Yes. $TMPDIR could be problematic if it makes the full (unix domain > socket?) path be too long. Modern, maintained version of GnuPG will only place sockets directly in the $GNUPGHOME if /run/user/$(id -u) (i.e., $XDG_RUNTIME_DIR) is not

Re: [PATCH] python: bind add_property/remove_property and related methods

2019-06-16 Thread Daniel Kahn Gillmor
On Fri 2019-06-14 22:34:16 +0200, VA wrote: > The wiki would serve to advertise each projects interests, and if some > other project has a common interest, they could get together to > standardize it in the interest of both projects? Makes sense to me. Each one then gets to deal with the

Re: [PATCH 1/2] debian: bump Standards-Version to 4.3.0 (no changes needed)

2019-06-11 Thread Daniel Kahn Gillmor
On Mon 2019-06-10 04:22:50 +0300, Daniel Kahn Gillmor wrote: > /usr/share/doc/debian-policy/upgrading-checklist.txt.gz suggests that > notmuch is already compliant with debian-policy 4.3.0. > > Signed-off-by: Daniel Kahn Gillmor just wanted to note that i screwed up my own e-

Re: [PATCH] python: bind add_property/remove_property and related methods

2019-06-11 Thread Daniel Kahn Gillmor
On Mon 2019-06-10 14:55:48 +0200, VA wrote: > Le 09/06/2019 à 21:58, Daniel Kahn Gillmor a écrit : >> We do expose this functionality in the library, so it's not the end of >> the world to expose it in the python bindings, but i do worry a little >> bit about encoura

Re: [PATCH V2] test: aggregate-results.sh: consistent style. zero forks.

2019-06-11 Thread Daniel Kahn Gillmor
On Mon 2019-06-10 21:39:23 +0300, Tomi Ollila wrote: > - all variables in $((...)) without leading $ > - all comparisons use -gt, -eq or -ne > - no -a nor -o inside [ ... ] expressions > - all indentation levels using one tab > > Dropped unnecessary empty string check when reading results files. >

Re: STYLE and uncrustify

2019-06-10 Thread Daniel Kahn Gillmor
Hi Bremner-- Thanks for doing this kind of cleanup work. Long-term consistency is worth the short-term pain. The main short-term pain comes from dealing with changes that are in-flight. As someone with a couple of series that are in flight, of course i'd prefer that you merge my changes first,

[PATCH] fix misspelling

2019-06-10 Thread Daniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor --- lib/messages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/messages.c b/lib/messages.c index 04fa19f8..7ddfaf26 100644 --- a/lib/messages.c +++ b/lib/messages.c @@ -117,7 +117,7 @@ _notmuch_messages_has_next (notmuch_messages_t

Re: [PATCH] python: bind add_property/remove_property and related methods

2019-06-10 Thread Daniel Kahn Gillmor
Hi VA-- On Sat 2019-06-08 17:37:10 +0200, VA wrote: > These methods were simply missing from the Python bindings. > From 47dcf1659377f1ec8a237fbe474a5412123d0aa1 Mon Sep 17 00:00:00 2001 > From: hydrargyrum > Date: Sun, 27 Jan 2019 09:43:57 +0100 > Subject: [PATCH] python: bind

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

2019-06-10 Thread Daniel Kahn Gillmor
/usr/share/doc/debian-policy/upgrading-checklist.txt.gz suggests that notmuch is already compliant with debian-policy 4.3.0. Signed-off-by: Daniel Kahn Gillmor --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 31d6471c

Re: [PATCH] append _unused to the expression defined using unused() macro

2019-06-10 Thread Daniel Kahn Gillmor
On Thu 2019-05-30 22:56:14 +0300, Tomi Ollila wrote: > This way if variables defined using unused() macro are actually > used then code will not compile... > > - removed unused usage around one argc and one argv since those > were used > > - changed one unused (char *argv[]) to unused (char

[PATCH v2 2/2] test: replace use of gdb with LD_PRELOAD shims in T070-insert.sh

2019-06-10 Thread Daniel Kahn Gillmor
('"') in it. Signed-off-by: Daniel Kahn Gillmor --- test/T070-insert.sh | 48 - 1 file changed, 17 insertions(+), 31 deletions(-) diff --git a/test/T070-insert.sh b/test/T070-insert.sh index 48165caa..017124fc 100755 --- a/test/T070-insert.sh

Re: notmuch vim failing to show rfc822 attachments

2019-06-10 Thread Daniel Kahn Gillmor
Hi Kay-- On Tue 2019-05-07 01:51:50 +0200, Kay wrote: > I've recently switched to using notmuch for mail management and I like > it so far. The only thing stopping me from full joy is that neither alot > nor the notmuch vim frontend can display message/rfc822 attachments. that sounds

Re: [PATCH 2/2] test: replace use of gdb with LD_PRELOAD shims in T070-insert.sh

2019-06-10 Thread Daniel Kahn Gillmor
On Sun 2019-05-26 10:08:54 -0300, David Bremner wrote: > This removes the dependency of this test script on gdb, and > considerably speeds up the running of the tests. This series looks good to me. I've tested it with moreutils parallel installed, and it reduces total CPU time for the parallel

Re: [PATCH] test: aggregate-results.sh: consistent style. zero forks.

2019-06-10 Thread Daniel Kahn Gillmor
On Tue 2019-06-04 22:46:24 +0300, Tomi Ollila wrote: > - all variables in $((...)) without leading $ > - all comparisons use -gt, -eq or -ne > - no -a nor -o inside [ ... ] expressions > - all indentation levels using one tab > > Dropped unnecessary empty string check when reading results files. >

Re: [WIP PATCH] test: make test-serially to run test serially

2019-06-10 Thread Daniel Kahn Gillmor
On Wed 2019-05-08 19:46:25 +0300, Tomi Ollila wrote: > This is easier and less error prone than mistyping NOTMUCH_TEST_SERIALIZE > manually from command line (mistype make test-serially and it just doesn't > work) > --- > > quick first version. this works, but someone(tm) w/ native english

Re: Cycle-expand all org-style in show-mode and search all

2019-06-10 Thread Daniel Kahn Gillmor
Hi Pierre-- sorry for the delay in responding here, i'd missed this proposal when it came in! I *think* what you're trying to do here is, when reading a thread in emacs' notmuch-show mode, you want to use "C-s" (I-search?) to find whatever you're searching for in the folded messages as well as

[PATCH] debian: enable build hardening features

2019-06-10 Thread Daniel Kahn Gillmor
ead-only. See https://wiki.debian.org/Hardening for more details. Signed-off-by: Daniel Kahn Gillmor --- debian/rules | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/rules b/debian/rules index d056edb6..ebd10481 100755 --- a/debian/rules +++ b/debian/rules @@ -2,6 +2,8 @@ python3_

Re: [PATCH 2/2] test: replace use of gdb with LD_PRELOAD shims in T070-insert.sh

2019-06-10 Thread Daniel Kahn Gillmor
One more nit-pick: On Sun 2019-05-26 10:08:54 -0300, David Bremner wrote: > +test_expect_code 0 "notmuch_with_shim shim-$code insert --keep < > \"$gen_msg_filename\"" This kind of business breaks obscurely if $gen_msg_filename happens to have U+0022 QUOTATION MARK in it. That's a pretty

[PATCH 2/2] debian: Add appropriate substitution variables to debian/control

2019-06-10 Thread Daniel Kahn Gillmor
: package notmuch-mutt: substitution variable ${perl:Depends} unused, but is defined Signed-off-by: Daniel Kahn Gillmor --- debian/control | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 56849500..ff646c6b 100644 --- a/debian/control

[PATCH] emacs: add keywords to notmuch-emacs-mua.desktop

2019-06-10 Thread Daniel Kahn Gillmor
other suggestions for keywords, they can add them to this list. Signed-off-by: Daniel Kahn Gillmor --- emacs/notmuch-emacs-mua.desktop | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs/notmuch-emacs-mua.desktop b/emacs/notmuch-emacs-mua.desktop index 0d9af2a4..752a1d7b 100644 --- a/emacs

Re: [BUG] emacs: notmuch-mua-attachment-check finds triggering string inside forwarded messages

2019-06-10 Thread Daniel Kahn Gillmor
On Wed 2019-05-08 19:19:18 +0200, Örjan Ekeberg wrote: > I have found what seems to be a bug, or at least a misbehaviour of the > "missing attachment warning" implemented by the otherwise so nice > notmuch-mua-attachment-check. > > It works fine to detect the regexp for attachments in simple

Re: [emacs] Auto-rotate pictures

2019-06-10 Thread Daniel Kahn Gillmor
Hi Pierre-- On Wed 2019-04-03 11:10:54 +0200, Pierre Neidhardt wrote: > Some pictures embed "exif" metadata with autorotate information. > I know that mu4e can autorotate inlined pictures. > I guess it wouldn't be too hard to implement this for Emacs Notmuch > either. If you have pointers to

Re: feature request: caching message arrival time

2019-06-04 Thread Daniel Kahn Gillmor
On Mon 2019-06-03 18:02:53 +0200, Örjan Ekeberg wrote: > As far as I understand the autocrypt protocol (i.e. not much;-) ), the > vulnerability is that an incoming message with a later time-stamp than > the locally saved autocrypt status can update the stored state > (e.g. turn off encryption).

Re: feature request: caching message arrival time

2019-06-04 Thread Daniel Kahn Gillmor
On Mon 2019-06-03 16:02:48 +0200, Ralph Seichter wrote: > Not meaning to complicate things, but Notmuch does not receive messages > at all. ;-) One needs to rely on some software to populate the Maildir > tree (Dovecot LMTP in my case, Postfix or some other MTA for local > delivery in other

Re: feature request: caching message arrival time

2019-06-03 Thread Daniel Kahn Gillmor
On Mon 2019-06-03 10:57:15 +0200, Örjan Ekeberg wrote: > Daniel Kahn Gillmor writes: > >> So Autocrypt defines the "effective date" of a message as the *earliest* >> of two dates: the date that the message is first seen, and the Date: >> header itself. So we w

[PATCH] emacs: cleanup commented archive services

2019-06-01 Thread Daniel Kahn Gillmor
MarkMail and Nabble both support https. I can no longer get any DNS resolution for opensubscriber.com. Signed-off-by: Daniel Kahn Gillmor --- emacs/notmuch-show.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index

Re: feature request: caching message arrival time

2019-06-01 Thread Daniel Kahn Gillmor
On Sat 2019-06-01 16:19:19 +0200, Ralph Seichter wrote: > I'm interested. Right now I frankly don't know what knowing when a > message was first seen by Notmuch might be useful for. That makes it > a bit difficult for me to contemplate your questions. Sure, thanks for asking! As i went to write

Re: forwarding multiple messages from notmuch emacs

2019-06-01 Thread Daniel Kahn Gillmor
On Sun 2016-04-10 15:26:35 +0100, David Edmondson wrote: > On Tue, Apr 23 2013, Daniel Kahn Gillmor wrote: >> hi notmuch folks-- >> >> i'd like to be able to forward several messages from a given thread (up >> to and including the whole thread) to someone else. I us

feature request: caching message arrival time

2019-06-01 Thread Daniel Kahn Gillmor
Hi Notmuch folks-- I'm working on Autocrypt integration for notmuch right now, and it occurs to me that it might be useful to know the time that any given message was first seen by notmuch. I'm trying to not get distracted by implementing such a feature, but I wanted to log this as a feature

Re: viewing duplicate messages

2019-05-31 Thread Daniel Kahn Gillmor
On Fri 2019-05-31 12:45:46 -0300, Jorge P. de Morais Neto wrote: > I have searched and found no copy. That's because I physically delete > these Dell notification messages after reading and acting on them. This > way there is always 0 or 1 such message, so Notmuch does not get > confused. But I

[PATCH v2 4/5] cli/{show,reply}: skip over legacy-display parts

2019-05-31 Thread Daniel Kahn Gillmor
Make use of the previous changes to fast-forward past any legacy-display parts during "notmuch show" and "notmuch reply". Signed-off-by: Daniel Kahn Gillmor --- mime-node.c| 11 ++- test/T356-protected-headers.sh | 2 -- 2 files changed,

[PATCH v2 3/5] util/repair: add _notmuch_repair_crypto_payload_skip_legacy_display

2019-05-31 Thread Daniel Kahn Gillmor
lay, which tests all of the things we'd expect to be true in a a cryptographic payload that contains a legacy display part. Signed-off-by: Daniel Kahn Gillmor --- util/repair.c | 98 +++ util/repair.h | 17 + 2 files changed, 115 insertions(+)

[PATCH v2 1/5] test: avoid showing legacy-display parts

2019-05-31 Thread Daniel Kahn Gillmor
but haven't had time to write the tests for the unusual cases) Signed-off-by: Daniel Kahn Gillmor --- test/T356-protected-headers.sh| 33 +++ .../protected-with-legacy-display.eml | 40 +++ 2 files changed, 73 insertions(+) create mode 100644

Re: [PATCH 4/6] mime-node: split out _mime_node_set_up_part

2019-05-31 Thread Daniel Kahn Gillmor
On Fri 2019-05-31 00:41:54 -0400, Daniel Kahn Gillmor wrote: > This particular re-organization has a slight conflict with the patch > proposed in id:20190530172707.10378-5-...@fifthhorseman.net (patch 4/4 > from the "mixed-up mangling repair" series). looking in more detail,

[PATCH v2 2/5] util/crypto: _n_m_crypto_potential_payload returns whether part is the payload

2019-05-31 Thread Daniel Kahn Gillmor
-by: Daniel Kahn Gillmor --- lib/index.cc | 9 ++--- mime-node.c | 6 +- util/crypto.c | 27 --- util/crypto.h | 7 +-- 4 files changed, 20 insertions(+), 29 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index 1fd9e67e..deb76f6f 100644 --- a/lib

[PATCH v2 5/5] index: avoid indexing legacy-display parts

2019-05-31 Thread Daniel Kahn Gillmor
on the message: index.repaired=skip-protected-headers-legacy-display Signed-off-by: Daniel Kahn Gillmor --- doc/man7/notmuch-properties.rst | 6 ++ lib/index.cc| 20 test/T356-protected-headers.sh | 2 -- 3 files changed, 22 insertions(+), 6

v2 of skipping over legacy-display protected header parts

2019-05-31 Thread Daniel Kahn Gillmor
This is the second revision of the series that skips over "legacy-display" protected header parts. v1 can be found at id:20190531042825.27774-1-...@fifthhorseman.net -- Now that notmuch can handle and interpret protected subject lines, it should also avoid forcing the user to look at

[PATCH v3 1/4] test: add test for "Mixed-Up Mime" message mangling

2019-05-31 Thread Daniel Kahn Gillmor
ill succeed. Signed-off-by: Daniel Kahn Gillmor --- test/T351-pgpmime-mangling.sh | 36 ++ test/corpora/mangling/mixed-up.eml | 33 +++ 2 files changed, 69 insertions(+) create mode 100755 test/T351-pgpmime-mangling.sh create mode 100644 t

[PATCH v3 3/4] index: repair "Mixed Up" messages before indexing.

2019-05-31 Thread Daniel Kahn Gillmor
ir process, or an improved repair process is proposed later, this should make it easy for people to reindex the relevant message. The property will also hopefully make it easier to diagnose this particular problem in the future. Signed-off-by: Daniel Kahn Gillmor --- doc/man7/notmuch-propertie

v3 of repairing Mixed-up mangled MIME messages

2019-05-31 Thread Daniel Kahn Gillmor
This is the third revision of the "Mixed up Mangling" series. Version 1 was at id:20190528225452.17550-1-...@fifthhorseman.net. Version 2 can be found at id:20190530172707.10378-1-...@fifthhorseman.net. The main difference here is that this series now depends on the two-part series "Setup for

[PATCH v3 2/4] util/repair: identify and repair "Mixed Up" mangled messages

2019-05-31 Thread Daniel Kahn Gillmor
eft FIXMEs in the code so that anyone excited about adding these additional checks can see where to put them in. I'll use this functionality in the next two patches. Signed-off-by: Daniel Kahn Gillmor --- util/repair.c | 80 +++ util/repair.h | 9 +

[PATCH v3 4/4] cli/{show, reply}: use repaired form of "Mixed Up" mangled messages

2019-05-31 Thread Daniel Kahn Gillmor
kiest part of this patch, but the choices here are based on the idea that the mime_node_context is the memory manager for the whole mime_node tree in the first place, so new GMimeObject tree created on-the-fly during message parsing should be disposed of in the same place. Signed-off-by: Daniel Ka

[PATCH 1/2] mime-node: split out _mime_node_set_up_part

2019-05-31 Thread Daniel Kahn Gillmor
in the codebase that referred to an older name of _mime_node_create (message_part_create), where this functionality originally resided. I've fixed that comment to refer to the new function instead. Signed-off-by: Daniel Kahn Gillmor --- mime-node.c | 29 + 1 file changed, 21

Setup for message repair

2019-05-31 Thread Daniel Kahn Gillmor
This series of two commits offers no functional change, but it is a useful basis for two outstanding series that i'd like to get merged: * "mixed up" message mangling * skipping legacy-display protected headers Both of these series include code that touches lightly on notmuch's MIME

[PATCH 2/2] repair: set up codebase for repair functionality

2019-05-31 Thread Daniel Kahn Gillmor
This adds no functionality directly, but is a useful starting point for adding new repair functionality. Signed-off-by: Daniel Kahn Gillmor --- doc/man7/notmuch-properties.rst | 12 lib/notmuch-private.h | 1 + notmuch-client.h| 1 + util/Makefile.local

Re: [PATCH 4/6] mime-node: split out _mime_node_set_up_part

2019-05-30 Thread Daniel Kahn Gillmor
On Fri 2019-05-31 00:28:23 -0400, Daniel Kahn Gillmor wrote: > This is a code reorganization that should have no functional effect, > but will make future changes simpler, because a future commit will > reuse the _mime_node_set_up_part functionality. This particular re-organization has

[PATCH 6/6] index: avoid indexing legacy-display parts

2019-05-30 Thread Daniel Kahn Gillmor
When we notice a legacy-display part during indexing, it makes more sense to avoid indexing it as part of the message body. Given that the protected subject will already be indexed, there is no need to index this part at all, so we skip over it. Signed-off-by: Daniel Kahn Gillmor --- lib

[PATCH 3/6] util/crypto: add _notmuch_crypto_payload_skip_legacy_display

2019-05-30 Thread Daniel Kahn Gillmor
lay, which tests all of the things we'd expect to be true in a a cryptographic payload that contains a legacy display part. Signed-off-by: Daniel Kahn Gillmor --- util/crypto.c | 96 +++ util/crypto.h | 17 + 2 files changed, 113 insertions(+)

[PATCH 4/6] mime-node: split out _mime_node_set_up_part

2019-05-30 Thread Daniel Kahn Gillmor
name of _mime_node_create, where this functionality originally resided. I've fixed that comment to refer to the new function instead. Signed-off-by: Daniel Kahn Gillmor --- mime-node.c | 43 ++- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git

[PATCH 1/6] test: avoid showing legacy-display parts

2019-05-30 Thread Daniel Kahn Gillmor
but haven't had time to write the tests for the unusual cases) Signed-off-by: Daniel Kahn Gillmor --- test/T356-protected-headers.sh| 28 + .../protected-with-legacy-display.eml | 40 +++ 2 files changed, 68 insertions(+) create mode 100644

[PATCH 2/6] util/crypto: make _n_m_crypto_potential_payload whether part is a payload

2019-05-30 Thread Daniel Kahn Gillmor
a cryptographic payload, so we dispense with the status return. If future changes to that function suggest adding a status return back, there are only a handful of call sites, and no pressure to retain a stable API, so it could be changed easily in that case. Signed-off-by: Daniel Kahn Gillmor --- lib

[PATCH 5/6] cli/{show,reply}: skip over legacy-display parts

2019-05-30 Thread Daniel Kahn Gillmor
Make use of the previous changes to fast-forward past any legacy-display parts during "notmuch show" and "notmuch reply". Signed-off-by: Daniel Kahn Gillmor --- mime-node.c| 9 - test/T356-protected-headers.sh | 2 -- 2 files changed, 8 insert

Hiding legacy-display parts

2019-05-30 Thread Daniel Kahn Gillmor
Now that notmuch can handle and interpret protected subject lines, it should also avoid forcing the user to look at "legacy display" parts that some MUAs (notably enigmail) copies of the protected headers that are intended to be rendered only by legacy clients -- clients capable of decryption but

[PATCH] mime-node: be clearer about decryption

2019-05-30 Thread Daniel Kahn Gillmor
Part 0 of a multipart/encrypted object is GMIME_MULTIPART_ENCRYPTED_VERSION; part 1 is GMIME_MULTIPART_ENCRYPTED_CONTENT. Using the name for what we want describes our intent more clearly than using a magic number in the code. Signed-off-by: Daniel Kahn Gillmor --- mime-node.c | 2 +- 1 file

Re: viewing duplicate messages

2019-05-30 Thread Daniel Kahn Gillmor
On Thu 2019-05-30 19:11:22 -0300, Jorge P. de Morais Neto wrote: > I have a Dell laptop and I subscribed to email notifications about > firmware updates. It turns out that Dell sends all such notifications > (which obviously have different content) with the same message-id. Have you reported

Re: [FEATURE] indexing arbitrary headers

2019-05-30 Thread Daniel Kahn Gillmor
On Sat 2017-06-03 13:28:46 -0300, David Bremner wrote: > Łukasz Stelmach writes: > >> I'd like to ask for a new feature: indexing of arbitrary headers. Not >> all headers but a few selected by users. >> >> For example, I get a lot of mails from a Gerrit system. I'd like to keep >> them for a

Re: Safe and useful handling of "Mixed Up" mangled messages

2019-05-30 Thread Daniel Kahn Gillmor
On Thu 2019-05-30 02:21:02 +, Rollins, Jameson wrote: > The way he handles the repair seems reasonable to me (modulo > a couple minor comments in reply). I've responded to jamie's review here with v2 of this series, which can be found at id:20190530172707.10378-1-...@fifthhorseman.net. If

[PATCH v2 3/4] index: repair "Mixed Up" messages before indexing.

2019-05-30 Thread Daniel Kahn Gillmor
ir process, or an improved repair process is proposed later, this should make it easy for people to reindex the relevant message. The property will also hopefully make it easier to diagnose this particular problem in the future. Signed-off-by: Daniel Kahn Gillmor --- doc/man7/notmuch-propertie

[PATCH v2 2/4] util/repair: identify and repair "Mixed Up" mangled messages

2019-05-30 Thread Daniel Kahn Gillmor
eft FIXMEs in the code so that anyone excited about adding these additional checks can see where to put them in. I'll use this functionality in the next two patches. Signed-off-by: Daniel Kahn Gillmor --- util/Makefile.local | 1 + util/repair.c | 101

[PATCH v2 1/4] test: add test for "Mixed-Up Mime" message mangling

2019-05-30 Thread Daniel Kahn Gillmor
ill succeed. Signed-off-by: Daniel Kahn Gillmor --- test/T351-pgpmime-mangling.sh | 36 ++ test/corpora/mangling/mixed-up.eml | 33 +++ 2 files changed, 69 insertions(+) create mode 100755 test/T351-pgpmime-mangling.sh create mode 100644 t

v2 of Safe and useful handling of "Mixed Up" mangled messages

2019-05-30 Thread Daniel Kahn Gillmor
This is the second revision of the series initially posted at id:20190528225452.17550-1-...@fifthhorseman.net. The changes in this series from v1 are in response to the helpful review by jrollins. In particular: * test to ensure that 'notmuch reply' is fixed as well * the repair

[PATCH v2 4/4] cli/{show, reply}: use repaired form of "Mixed Up" mangled messages

2019-05-30 Thread Daniel Kahn Gillmor
kiest part of this patch, but the choices here are based on the idea that the mime_node_context is the memory manager for the whole mime_node tree in the first place, so new GMimeObject tree created on-the-fly during message parsing should be disposed of in the same place. Signed-off-by: Daniel Ka

Re: [PATCH 4/4] cli/show: show repaired form of "Mixed Up" mangled messages

2019-05-30 Thread Daniel Kahn Gillmor
On Thu 2019-05-30 02:09:47 +, Rollins, Jameson wrote: > On Wed, May 29 2019, Jameson Graef Rollins wrote: >> On Tue, May 28 2019, Daniel Kahn Gillmor wrote: >>> When showing a message that has been mangled in transit by an MTA in >>> the "Mixed up" wa

Re: [PATCH 2/4] util/crypto: identify and repair "Mixed Up" mangled messages

2019-05-30 Thread Daniel Kahn Gillmor
On Thu 2019-05-30 02:18:57 +, Rollins, Jameson wrote: > I understand that this fix is for multipart/encrypted messages, but I'm > not sure I would call the repair function itself a "crypto function". > Given that I can imagine more repair functions in the future, would it > make sense to break

[PATCH] test: signature verification during decryption (session keys)

2019-05-29 Thread Daniel Kahn Gillmor
also fixed it in the gpgme packages (1.13.0-2~ppa1) in the ubuntu xenial PPA (ppa:notmuch/notmuch) that notmuch uses for Travis CI. Signed-off-by: Daniel Kahn Gillmor --- test/T357-index-decryption.sh| 19 + test/corpora/crypto/encrypted-signed.eml | 35 2 fil

Re: Safe and useful handling of "Mixed Up" mangled messages

2019-05-29 Thread Daniel Kahn Gillmor
On Tue 2019-05-28 18:58:22 -0400, Daniel Kahn Gillmor wrote: > I forgot to mention: this test case makes use of the test_json_nodes > functionality introduced in 03/17 of the protected header series. > > So please only consider this after that patch has been merged. It has bee

[PATCH] NEWS: add a note about protected headers

2019-05-29 Thread Daniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor --- NEWS | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 8f250ab9..c08c564e 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,10 @@ mboxes); e.g. `gzip -9 $MAIL/archive/giant-message && notmuch new` should wo

Re: Protected Headers (2nd major revision, more testing!)

2019-05-29 Thread Daniel Kahn Gillmor
On Wed 2019-05-29 08:44:00 -0300, David Bremner wrote: > It's in. Thanks! > I did bodge things up slightly due to the threading of patch 14, but I > added the trivial patch with the one line change I missed. that's not a bodge at all compared to the several different bodges i did on that

Re: Safe and useful handling of "Mixed Up" mangled messages

2019-05-28 Thread Daniel Kahn Gillmor
On Tue 2019-05-28 18:54:48 -0400, Daniel Kahn Gillmor wrote: > The test case included in this series should be sufficient to show the > problem specifically I forgot to mention: this test case makes use of the test_json_nodes functionality introduced in 03/17 of the protected header serie

Safe and useful handling of "Mixed Up" mangled messages

2019-05-28 Thread Daniel Kahn Gillmor
I've documented an unfortunate MTA habit over in https://tools.ietf.org/html/draft-dkg-openpgp-pgpmime-message-mangling-00#section-4.1 which i've named "Mixed Up" mangling. In particular, popular versions of Microsoft Exchange take a multipart/encrypted e-mail and transform it unaccountably to

[PATCH 1/4] test: add test for "Mixed-Up Mime" message mangling

2019-05-28 Thread Daniel Kahn Gillmor
ill succeed. Signed-off-by: Daniel Kahn Gillmor --- test/T351-pgpmime-mangling.sh | 28 + test/corpora/mangling/mixed-up.eml | 33 ++ 2 files changed, 61 insertions(+) create mode 100755 test/T351-pgpmime-mangling.sh create mode 100644 t

[PATCH 3/4] index: repair "Mixed Up" messages before indexing.

2019-05-28 Thread Daniel Kahn Gillmor
ir process, or an improved repair process is proposed later, this should make it easy for people to reindex the relevant message. The property will also hopefully make it easier to diagnose this particular problem in the future. Signed-off-by: Daniel Kahn Gillmor --- doc/man7/notmuch-propertie

Re: [PATCH v4 06/17] cli/show: add information about which headers were protected

2019-05-28 Thread Daniel Kahn Gillmor
On Tue 2019-05-28 08:10:35 -0300, David Bremner wrote: > Daniel Kahn Gillmor writes: >> decrypted?: { >>status: msgdecstatus, >> + # map encrypted headers that differed from the outside >> headers. >> +

[PATCH 4/4] cli/show: show repaired form of "Mixed Up" mangled messages

2019-05-28 Thread Daniel Kahn Gillmor
y the trickiest part of this patch, but the choices here are based on the idea that the mime_node_context is the memory manager for the whole mime_node tree in the first place, so new GMimeObject tree created on-the-fly during message parsing should be disposed of in the same place. Signed-off-by:

[PATCH 2/4] util/crypto: identify and repair "Mixed Up" mangled messages

2019-05-28 Thread Daniel Kahn Gillmor
eft FIXMEs in the code so that anyone excited about adding these additional checks can see where to put them in. I'll use this functionality in the next two patches. Signed-off-by: Daniel Kahn Gillmor --- util/crypto.c | 80 +++ util/crypto.h | 9 +

[PATCH 1/2] NEWS: include information about per-message cryptographic status

2019-05-27 Thread Daniel Kahn Gillmor
--- NEWS | 4 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index d8aa272f..999affc7 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,10 @@ Command Line Interface `notmuch show` now supports --body=false and --include-html with --format=text +`notmuch show` and `notmuch reply` now

[PATCH 2/2] NEWS: note parallel test suite

2019-05-27 Thread Daniel Kahn Gillmor
--- NEWS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 999affc7..60a69936 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,13 @@ The minimum supported major version of Emacs is now 24. Support for GNU Emacs older than 25.1 is deprecated with this release, and may be

Re: [PATCH] NEWS: News for my changes for 0.29

2019-05-27 Thread Daniel Kahn Gillmor
On Mon 2019-05-27 07:46:55 -0300, David Bremner wrote: > +Dependencies > + > + > +Support for GMime 2.6 is removed. > + I'd add here: The minimum supported version of GMime is now 3.0.3. GMime also needs to have been compiled with cryptographic support. --dkg

Re: Protected Headers (2nd major revision, more testing!)

2019-05-27 Thread Daniel Kahn Gillmor
On Sun 2019-05-26 18:15:53 -0400, Daniel Kahn Gillmor wrote: > this series delivers a concrete improvement: users of notmuch can now > read, index, and search for the subject lines of encrypted messages > sent from MUAs like Enigmail and K-9 mail. Many thanks to jrollins an

[PATCH v4 10/17] indexing: record protected subject when indexing cleartext

2019-05-27 Thread Daniel Kahn Gillmor
When indexing the cleartext of an encrypted message, record any protected subject in the database, which should make it findable and visible in search. Signed-off-by: Daniel Kahn Gillmor --- lib/index.cc | 42 ++ lib/message.cc

Re: [PATCH v3 10/17] indexing: record protected subject when indexing cleartext

2019-05-27 Thread Daniel Kahn Gillmor
On Mon 2019-05-27 17:17:20 -0400, Daniel Kahn Gillmor wrote: > When indexing the cleartext of an encrypted message, record any > protected subject in the database, which should make it findable and > visible in search. ugh, please ignore v3 of this patch (10/17) as well. v4 should

Re: [PATCH v3 06/17] cli/show: add information about which headers were protected

2019-05-27 Thread Daniel Kahn Gillmor
On Mon 2019-05-27 16:40:59 -0400, Daniel Kahn Gillmor wrote: > This allows a clever UI frontend to mark whether a header was > protected (or not), and if it was protected, to show the details to > an interested user. > > As before, we only handle Subject for now, but we might be a

[PATCH v4 06/17] cli/show: add information about which headers were protected

2019-05-27 Thread Daniel Kahn Gillmor
age's Subject looked like on the wire" feature in expert mode. As before, we only handle Subject for now, but we might be able to handle other headers in the future. Signed-off-by: Daniel Kahn Gillmor --- devel/schemata | 9 + notmuch-show.c

<    1   2   3   4   5   6   7   8   9   10   >