[PATCH 09/14] mime-node: Clean up unwrapped MIME parts correctly.

2019-12-03 Thread Daniel Kahn Gillmor
We clean it up by analogy with cleaning up the signature list associated with a MIME node. Signed-off-by: Daniel Kahn Gillmor --- mime-node.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/mime-node.c b/mime-node.c index 2a823dfd..ff6805bf 100644 --- a/mime-node.c

[PATCH 06/14] tests/smime: add tests for S/MIME SignedData

2019-12-03 Thread Daniel Kahn Gillmor
properly quote and attribute content? Signed-off-by: Daniel Kahn Gillmor --- test/T355-smime.sh | 76 + test/corpora/pkcs7/smime-onepart-signed.eml | 51 ++ 2 files changed, 127 insertions(+) create mode 100644 test/corpora/pkcs7/smime

[PATCH 12/14] cli/reply: Ignore PKCS#7 wrapper parts when replying

2019-12-03 Thread Daniel Kahn Gillmor
When composing a reply, no one wants to see this line in the proposed message: Non-text part: application/pkcs7-mime So we hide it, the same way we hide PGP/MIME cruft. Signed-off-by: Daniel Kahn Gillmor --- notmuch-reply.c| 5 +++-- test/T355-smime.sh | 1 - 2 files changed, 3

[PATCH 10/14] cli: include wrapped part of PKCS#7 SignedData in the MIME tree

2019-12-03 Thread Daniel Kahn Gillmor
Unwrap a PKCS#7 SignedData part unconditionally when the cli is traversing the MIME tree, and return it as a "child" of what would otherwise be a leaf in the tree. Unfortunately, this also breaks the JSON output. We will fix that next. Signed-off-by: Daniel Kahn Gillmor --- m

Handle PKCS#7 signedData (S/MIME single-part clearsigned)

2019-12-03 Thread Daniel Kahn Gillmor
PKCS#7 is the binary format used by Cryptographic Message Syntax (CMS). S/MIME (RFC 8551) specifies a number of different "smime-type" PKCS#7 wrapping layers. Until now, notmuch has only handled multipart/signed PKCS#7 clearsigned messages. But S/MIME has another form of clearsigned message

[PATCH 01/14] mime-node: Pass the correct flags to g_mime_multipart_signed_verify

2019-12-03 Thread Daniel Kahn Gillmor
GMIME_ENCRYPT_NONE and GMIME_VERIFY_NONE have the same value, but they are different enumerated types. So in C, this is a cosmetic change, but it is technically correct if we only had stricter typing. Signed-off-by: Daniel Kahn Gillmor --- mime-node.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 02/14] tests/smime: Always use --batch with gpgsm

2019-12-03 Thread Daniel Kahn Gillmor
GnuPG's gpgsm, like gpg, should always be used with --batch when it is invoked in a non-interactive environment. Signed-off-by: Daniel Kahn Gillmor --- test/T355-smime.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/T355-smime.sh b/test/T355-smime.sh index

[PATCH 07/14] lib: index PKCS7 SignedData parts

2019-12-03 Thread Daniel Kahn Gillmor
w. Signed-off-by: Daniel Kahn Gillmor --- lib/index.cc | 57 ++ test/T355-smime.sh | 2 -- 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/lib/index.cc b/lib/index.cc index 158ba5cf..bbf13dc5 100644 --- a/lib/index.cc +++ b/li

[PATCH 11/14] cli/show: If a leaf part has children, show them instead of omitting

2019-12-03 Thread Daniel Kahn Gillmor
Until we did PKCS#7 unwrapping, no leaf MIME part could have a child. Now, we treat the unwrapped MIME part as the child of the PKCS#7 SignedData object. So in that case, we want to show it instead of deliberately omitting the content. Signed-off-by: Daniel Kahn Gillmor --- notmuch-show.c

[PATCH 08/14] mime-node: rename decrypted_child to unwrapped_child

2019-12-03 Thread Daniel Kahn Gillmor
unwrappings as well as multipart/encrypted decryptions. This change is just a naming change, it has no effect on function. Signed-off-by: Daniel Kahn Gillmor --- mime-node.c | 10 +- notmuch-client.h | 6 -- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/mime

[PATCH 05/14] test-lib.sh: add test_valid_json

2019-12-03 Thread Daniel Kahn Gillmor
This test does exactly what it says on the tin. It expects JSON data to be parseable by Python, at least. Signed-off-by: Daniel Kahn Gillmor --- test/test-lib.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/test/test-lib.sh b/test/test-lib.sh index 7f8a3a4d..a54ae40f 100644

[PATCH 04/14] tests/smime: consistently quote $GNUPGHOME

2019-12-03 Thread Daniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor --- test/T355-smime.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/T355-smime.sh b/test/T355-smime.sh index dac9b1e5..cbd3e5a6 100755 --- a/test/T355-smime.sh +++ b/test/T355-smime.sh @@ -6,13 +6,13 @@ test_description='S/MIME

[PATCH 13/14] cli: sprinter should be able to print an unsigned long

2019-12-03 Thread Daniel Kahn Gillmor
we need to do have this capability. Signed-off-by: Daniel Kahn Gillmor --- sprinter-json.c | 9 + sprinter-sexp.c | 9 + sprinter-text.c | 9 + sprinter.h | 1 + 4 files changed, 28 insertions(+) diff --git a/sprinter-json.c b/sprinter-json.c index c6ec8577..0fc734f7

[PATCH 03/14] tests/smime: Include the Sample LAMPS Certificate Authority

2019-12-03 Thread Daniel Kahn Gillmor
.html#name-certificate-authority-certi Signed-off-by: Daniel Kahn Gillmor --- test/T355-smime.sh | 2 ++ test/smime/README | 2 ++ test/smime/ca.crt | 20 3 files changed, 24 insertions(+) create mode 100644 test/smime/ca.crt diff --git a/test/T355-smime.sh b/test/T355

[PATCH 14/14] cli: Avoid bogus signature dates from GMime

2019-12-03 Thread Daniel Kahn Gillmor
since the epoch). GPGME reports the value faithfully as the expiration date of the signature on this message, but GMime wraps it back around to the negative. Once GMime fixes #68, we should transition to their upstream fix instead of maintaining this workaround forever. Signed-off-by: Daniel Kahn

Re: [PATCH 3/6] Move to dh 12

2019-12-03 Thread Daniel Kahn Gillmor
On Tue 2019-12-03 08:10:44 -0400, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> Signed-off-by: Daniel Kahn Gillmor >> --- >> debian/compat | 1 - >> debian/control | 2 +- >> 2 files changed, 1 insertion(+), 2 deletions(-) >> delete

moving the config into the database [was: Re: [PATCH] Display extra headers for emacs-mua - db config option]

2019-11-21 Thread Daniel Kahn Gillmor
On Thu 2019-11-21 23:38:06 +0200, Tomi Ollila wrote: > How can library open the database if it doesn't read the config file > -- the config file defines where database is located =D The *only* thing i think worth keeping in the config file is ultimately the location of the database, though i

Re: [PATCH] Display extra headers for emacs-mua - db config option

2019-11-21 Thread Daniel Kahn Gillmor
On Thu 2019-11-21 22:56:04 +0100, Johan Parin wrote: > Here is a taste (not fully tested, but seems to work). Oof, i see what you mean :( I haven't tried to implement this a different way, so i don't know whether there isn't a shorter cut to what we want, but yow it is a lot. Are we doing

Re: Debian packaging cleanup

2019-11-21 Thread Daniel Kahn Gillmor
On Thu 2019-11-21 08:08:53 -0400, David Bremner wrote: > Daniel Kahn Gillmor writes: >> Anarcat has reviewed these, but they're still tagged >> notmuch::needs-review in nmbug. should i clear these tags now that >> they've been reviewed by someone who knows something abou

Re: [PATCH] Display extra headers for emacs-mua - db config option

2019-11-21 Thread Daniel Kahn Gillmor
On Thu 2019-11-21 08:27:04 -0400, David Bremner wrote: > Apologies for being late to the discussion of where to store the > configuration. So far we have only stored configuration in the database > where it affected the behaviour of the library API. While i'm being ambitious, i'd like also to

Re: [PATCH] emacs: bind M-RET to notmuch-tree-from-search-thread

2019-11-20 Thread Daniel Kahn Gillmor
On Wed 2019-11-13 14:57:52 -0800, William Casarin wrote: > This is an unbound function that is quite useful. It opens a selected > thread in notmuch-tree from the current search query. > > Signed-off-by: William Casarin > > --- > > This is a simpler alternative to

Re: [PATCH] Display extra headers for emacs-mua - db config option

2019-11-20 Thread Daniel Kahn Gillmor
On Sat 2019-11-16 17:27:23 +0100, Johan Parin wrote: > Modify format_headers_sprinter so that it returns some additional headers in > the > sexp, instead of a small fixed set of headers. > > The extra header list is configured by the database config option > `show.extra_headers'. > > This is

Re: wish: notmuch-emacs: handle RFC822 attachments as email (allow for replying)

2019-11-20 Thread Daniel Kahn Gillmor
On Wed 2019-11-13 09:44:41 +, David Edmondson wrote: > 1. extract the attachment, add it to the database and use normal reply >processing (maybe remember to remove the message from the database >after?), I do this in the notmuch-emacs interface with: . | notmuch insert I don't

Re: Workaround for Exchange-corrupted PGP/Mime structure

2019-11-20 Thread Daniel Kahn Gillmor
On Wed 2019-11-20 13:19:12 -0800, Carl Worth wrote: > On Wed, Nov 20 2019, Carl Worth wrote: >> I'll update my notmuch and give this a try. > > Just a "git pull; make; make install" and my problem went away. > > Thanks again for the fixes, Daniel. Glad that it worked for you! (and, thanks for

Re: Debian packaging cleanup

2019-11-20 Thread Daniel Kahn Gillmor
On Tue 2019-11-12 10:47:33 -0500, Antoine Beaupré wrote: > On 2019-11-10 12:37:42, Daniel Kahn Gillmor wrote: >> This series offers a set of simple and small changes to the debian >> packaging for notmuch. they apply to the master branch. > > Looks good to me.

Re: Workaround for Exchange-corrupted PGP/Mime structure

2019-11-20 Thread Daniel Kahn Gillmor
On Wed 2019-11-20 17:10:40 -0500, Brian Sniffen wrote: > Yeah, these have been fantastic for me too. MSFT has no intention of > fixing PGP or MIME support; it's been well over a decade. I'm unwilling to accept this situation, and i hope that other people will join me in exerting pressure on

Re: can a notmuch query filter the output based on the size of a thread?

2019-11-17 Thread Daniel Kahn Gillmor
On Sat 2019-11-16 10:38:44 -0500, David Bremner wrote: > Alternatively someone (TM) could add thread objects to the notmuch > database. This would allow much faster thread operations, but would > require some fairly delicate maintenance of the thread > objects. Basically they would need to updated

Re: unifying and automating draft ("postpone/resume") behavior [was: Re: notmuch "lost" email during power failure]

2019-11-17 Thread Daniel Kahn Gillmor
On Fri 2019-11-15 10:08:02 -0500, Antoine Beaupré wrote: > The individual calls are not what's prohibitively expensive. The problem > is latency. Even if it just takes 100ms[1] to save the file to the disk, > that's a huge delay in terms of human interface, because the entire > Emacs UI will

Re: [PATCH] Add --message-headers flag to notmuch-show

2019-11-15 Thread Daniel Kahn Gillmor
On Thu 2019-11-14 22:44:32 +0200, Tomi Ollila wrote: > W/ all this information, somewhat exhaustive (not by options, but by > resources I put making it) list of thougts. > > > 1a by default behave as it is behaving now > > 1b alternative, in json and sexp, include *all* headers for the use of >

Re: unifying and automating draft ("postpone/resume") behavior [was: Re: notmuch "lost" email during power failure]

2019-11-14 Thread Daniel Kahn Gillmor
On Wed 2019-11-13 10:19:05 -0500, Antoine Beaupré wrote: > Fundamentally, I think message-mode should treat emails the same way > epg.el treats encrypted files: the data in the buffer isn't the same as > the on-disk data, and there should be translation between the two. At > the very least, the

Re: [PATCH] Add --message-headers flag to notmuch-show

2019-11-13 Thread Daniel Kahn Gillmor
On Wed 2019-11-13 01:30:50 +0200, Tomi Ollila wrote: > On Tue, Nov 12 2019, Daniel Kahn Gillmor wrote: > >> And, I still haven't heard any clear arguments for choosing between >> configurability as an absolute thing or a differential thing. They have >> significantly diff

Re: [PATCH] Add --message-headers flag to notmuch-show

2019-11-12 Thread Daniel Kahn Gillmor
On Tue 2019-11-12 10:48:54 -0500, Antoine Beaupré wrote: > They need User-Agent:, I want Archive-At:, they will want > X-Mailer... when is it going to stop? It's going to stop when users are satisfied. :) I highly doubt that we will reach all possible headers. > I would rather have

Re: Notmuch, Emacs and pinentry -- oh my

2019-11-11 Thread Daniel Kahn Gillmor
On Mon 2019-11-11 20:10:26 +0100, Ralph Seichter wrote: > I tried that by setting GPG_TTY to a fixed terminal, but while this > seemed to work on the first call, the second time I was prompted for a > password it was echoed, in cleartext, to the terminal. Is there a better > method to achieve what

Re: can a notmuch query filter the output based on the size of a thread?

2019-11-11 Thread Daniel Kahn Gillmor
On Mon 2019-11-11 09:48:47 -0800, Jameson Graef Rollins wrote: > On Mon, Nov 11 2019, Daniel Kahn Gillmor wrote: >> Over on https://github.com/pazz/alot/issues/1449, a user asks: >> >>> I would like to query for `mailcount`, for example >>> to search for

Re: Notmuch, Emacs and pinentry -- oh my

2019-11-11 Thread Daniel Kahn Gillmor
On Fri 2019-11-08 16:40:05 +0100, Ralph Seichter wrote: > I only access the server with a terminal, and that's where Emacs is > running in. Curses is as graphical as it gets. ;-) Neither pinentry-tty nor pinentry-curses is designed to work (or capable of working well) with another process

Re: [PATCH] Add --message-headers flag to notmuch-show

2019-11-11 Thread Daniel Kahn Gillmor
Hi Johan-- On Sun 2019-11-10 13:49:29 +0100, Johan Parin wrote: > Add a new flag --message-headers to notmuch show, in order to let the > user specify displayed headers using `notmuch-message-headers' in the > emacs mua. This is interesting work, thanks for proposing it. I haven't reviewed the

Re: [PATCH] Add --message-headers flag to notmuch-show

2019-11-11 Thread Daniel Kahn Gillmor
On Mon 2019-11-11 10:26:18 -0500, Daniel Kahn Gillmor wrote: > - What is the specific use case for this? For example, can you identify >situations where different headers need to be emitted by different >users? Even one motivating example would help others on this list >

can a notmuch query filter the output based on the size of a thread?

2019-11-11 Thread Daniel Kahn Gillmor
Over on https://github.com/pazz/alot/issues/1449, a user asks: > I would like to query for `mailcount`, for example > to search for mails on a mailing list which got answered > `:search tag:list/questions and mailcount>1` > or > `:search tag:list/questions and not mailcount:1` This seems

[PATCH 2/6] Rules-Requires-Root: no (we do nothing as root during package build)

2019-11-10 Thread Daniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index b7bffc71..efb54abe 100644 --- a/debian/control +++ b/debian/control @@ -32,6 +32,7 @@ Standards-Version: 4.4.1 Homepage: https://notmuchmail.org/ Vcs

[PATCH 6/6] Add debian/upstream/metadata (for DEP-12)

2019-11-10 Thread Daniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor --- debian/upstream/metadata | 6 ++ 1 file changed, 6 insertions(+) create mode 100644 debian/upstream/metadata diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index ..8f266aa8 --- /dev/null +++ b/debian

[PATCH 1/6] Standards-Version: bump to 4.4.1 (no changes needed)

2019-11-10 Thread Daniel Kahn Gillmor
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 b1829582..b7bffc71 100644 --- a/debian/control +++ b/debian/control @@ -28,7 +28,7 @@ Build-Depends: gnupg , bash-completion

[PATCH 5/6] debian/copyright: use secure git URL

2019-11-10 Thread Daniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor --- debian/copyright | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/copyright b/debian/copyright index 0931d9b9..a88ce1dc 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,6 +1,6 @@ Format: https://www.debian.org/doc

Debian packaging cleanup

2019-11-10 Thread Daniel Kahn Gillmor
This series offers a set of simple and small changes to the debian packaging for notmuch. they apply to the master branch. I've reviewed these changes, and tested a build with them with no problems. A modern, canonicalized debian package is easier to work with. Please consider applying these

[PATCH 4/6] wrap-and-sort -ast (for canonicalized debian metadata)

2019-11-10 Thread Daniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor --- debian/control | 103 debian/notmuch-mutt.install | 2 +- debian/notmuch-vim.dirs | 4 +- debian/notmuch-vim.install | 4 +- debian/notmuch.install | 2 +- debian/notmuch.manpages | 18

[PATCH 3/6] Move to dh 12

2019-11-10 Thread Daniel Kahn Gillmor
Signed-off-by: Daniel Kahn Gillmor --- debian/compat | 1 - debian/control | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 debian/compat diff --git a/debian/compat b/debian/compat deleted file mode 100644 index b4de3947.. --- a/debian/compat +++ /dev/null

Re: RFC: desktop entry for xdg-email

2019-11-01 Thread Daniel Kahn Gillmor
On Fri 2019-11-01 20:55:19 -0400, Antoine Beaupré wrote: > On my system, if I click on mailto: links in my web browser (yes, those > still exist), Thunderbird starts up. Oh the horror! > > Wouldn't it be nice if notmuch-emacs-mua would start instead? Please see https://bugs.debian.org/918975

performance on long encrypted+signed threads

2019-09-30 Thread Daniel Kahn Gillmor
Hi notmuch folks-- I just wanted to note a performance problem that i'm seeing with notmuch. I've attached a demonstration script ("crypto-performance-test"), which sets up a temporary GnuPG homedir and notmuch installation, adds 20 encrypted+signed messages in a thread (using indexed cleartext

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

2019-09-17 Thread Daniel Kahn Gillmor
On Mon 2019-09-16 07:49:21 -0300, David Bremner wrote: > David Bremner writes: > >> Daniel Kahn Gillmor writes: >> >>> When showing or replying to a message that has been mangled in transit >>> by an MTA in the "Mixed up" way, notmuch should in

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

2019-09-15 Thread Daniel Kahn Gillmor
On Sun 2019-09-15 23:26:59 +0300, Tomi Ollila wrote: > On Sun, Sep 15 2019, Daniel Kahn Gillmor wrote: > >> This patch implements a functional identification and repair process > > If there is going to be more versions, then the above could be changed > to either > >

[PATCH] Drop devel/printmimestructure (it is in mailscripts 0.11)

2019-09-15 Thread Daniel Kahn Gillmor
details about the adoption. Signed-off-by: Daniel Kahn Gillmor --- devel/printmimestructure | 69 1 file changed, 69 deletions(-) delete mode 100755 devel/printmimestructure diff --git a/devel/printmimestructure b/devel/printmimestructure deleted file mode

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

2019-09-15 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 | 84 +++ util/repair.h | 10 +

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

2019-09-15 Thread Daniel Kahn Gillmor
Thanks for the review, David. On Fri 2019-09-13 22:58:27 -0300, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> +/* see >> + * >> https://tools.ietf.org/html/draft-dkg-openpgp-pgpmime-message-mangling-00#section-4.1.1 >> */ >> +static bool >>

Re: v4 of repairing Mixed-up mangled MIME messages

2019-09-14 Thread Daniel Kahn Gillmor
On Sat 2019-09-14 14:33:56 -0300, David Bremner wrote: > Jameson Graef Rollins writes: >> Any reason not to move "encrypted" and "signed" to be properties as >> well? > > I guess it would require some client code to be adapted. I'm not sure > what really relies on those tags other than ad hoc

Re: v4 of repairing Mixed-up mangled MIME messages

2019-09-14 Thread Daniel Kahn Gillmor
On Sat 2019-09-14 00:29:40 -0700, Jameson Graef Rollins wrote: > Can we have notmuch auto-apply a tag, like the "encrypted" and "signed" > tags, that indicates mail has been mangled in this way? i don't believe tags are appropriate for this use -- the growing convention is to use properties for

Re: [PATCH v3 0/4] Retrieve GPG keys asynchronously.

2019-09-11 Thread Daniel Kahn Gillmor
On Tue 2019-09-03 20:49:13 -0300, David Bremner wrote: > David Edmondson writes: > >> Retrieve GPG keys asynchronously. […] > I went back to this series to try and do the last minor things my self, > but unfortunately I got lost in trying to do the rebase. I think it > collides with a couple of

version 4: Retrieve GPG keys asynchronously.

2019-09-11 Thread Daniel Kahn Gillmor
In id:87blw1rldy@tethera.net, bremner identified two of my edits breaking dme's series that permits asynchronous retrieval of OpenPGP keys. This is a revision of that series that should apply to the current master, taking into account my earlier fixes. dme, if you could review i would

[PATCH v4 4/4] emacs: Improve the reporting of key activity

2019-09-11 Thread Daniel Kahn Gillmor
From: David Edmondson Improve the information provided about key retrieval and key validity. --- emacs/notmuch-crypto.el | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el index 9b615a0f..f4585d5e 100644 ---

[PATCH v4 1/4] emacs: Asynchronous retrieval of GPG keys

2019-09-11 Thread Daniel Kahn Gillmor
From: David Edmondson Rather than blocking emacs while gpg does its' thing, by default run key retrieval asynchronously, possibly updating the display of the message on successful completion. --- emacs/notmuch-crypto.el | 85 +++-- 1 file changed, 74

[PATCH v4 3/4] emacs: Add notmuch-crypto-gpg-program and use it

2019-09-11 Thread Daniel Kahn Gillmor
From: David Edmondson Allow the user to specify the gpg program to use when retrieving keys, etc., defaulting to the value of `epg-gpg-program'. --- emacs/notmuch-crypto.el | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/emacs/notmuch-crypto.el

[PATCH v4 2/4] emacs: Minor refactoring of crypto code

2019-09-11 Thread Daniel Kahn Gillmor
From: David Edmondson --- emacs/notmuch-crypto.el | 91 + 1 file changed, 47 insertions(+), 44 deletions(-) diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el index 0ab85f4b..457c821c 100644 --- a/emacs/notmuch-crypto.el +++

Re: [PATCH] configure: disallow whitespace in paths, extend checks to $PWD

2019-09-11 Thread Daniel Kahn Gillmor
On Sun 2019-09-01 23:09:46 +0300, Tomi Ollila wrote: > Whitespace in $NOTMUCH_SRCDIR (and $PWD) may work in builds, > but definitely will not work in tests. It would be difficult > to make tests support whitespace in test filename paths -- and > fragile to maintain if done. > > So it is just

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

2019-09-08 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 | 79 +++ util/repair.h | 10 ++

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

2019-09-08 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 v4 1/4] test: add test for "Mixed-Up Mime" message mangling

2019-09-08 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

v4 of repairing Mixed-up mangled MIME messages

2019-09-08 Thread Daniel Kahn Gillmor
This is the fourth revision of the "Mixed up Mangling" series. Previous versions: * v1 starts at id:20190528225452.17550-1-...@fifthhorseman.net * v2 starts at id:20190530172707.10378-1-...@fifthhorseman.net * v3 starts at id:20190531074842.16789-1-...@fifthhorseman.net This is a simple

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

2019-09-08 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

v4 of legacy-display cleanup

2019-08-29 Thread Daniel Kahn Gillmor
This is the fourth 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 3 can be found at id:20190625014107.12452-1-...@fifthhorseman.net version 2 can be found at

[PATCH v4 4/8] util/crypto: _n_m_crypto_potential_payload: rename "payload" arg to "part"

2019-08-29 Thread Daniel Kahn Gillmor
rity. This is a non-functional change, just semantic cleanup. Signed-off-by: Daniel Kahn Gillmor --- util/crypto.c | 16 util/crypto.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/util/crypto.c b/util/crypto.c index 225f537a..3845ade8 100644 --- a/util

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

2019-08-29 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 v4 5/8] util/crypto: _n_m_crypto_potential_payload returns whether part is the payload

2019-08-29 Thread Daniel Kahn Gillmor
this return value in future patches, to make different decisions based on whether a part is the cryptographic payload or not. But for now, we just leave the places where it gets invoked marked with (void) to show that the result is ignored. Signed-off-by: Daniel Kahn Gillmor --- lib/index.cc | 9

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

2019-08-29 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 v4 8/8] index: avoid indexing legacy-display parts

2019-08-29 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 v4 7/8] cli/{show,reply}: skip over legacy-display parts

2019-08-29 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 v4 2/8] repair: set up codebase for repair functionality

2019-08-29 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 v4 6/8] util/repair: add _notmuch_repair_crypto_payload_skip_legacy_display

2019-08-29 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 | 101 ++ util/repair.h | 17 + 2 files changed, 118 insertions(+)

Re: [PATCH v2] configure: fix out of tree build; check unsafe characters in srcdir

2019-08-29 Thread Daniel Kahn Gillmor
On Mon 2019-08-26 20:03:46 +0300, Tomi Ollila wrote: > While check for GMime session key extraction support... was made > out of tree build compatible, related (and some unrelated) unsafe > characters are now checked in notmuch source directory path. LGTM. Thanks, Tomi. > The known unsafe

Re: notmuch-emacs: WISH: command notmuch-show-message-up with key bindung u

2019-08-29 Thread Daniel Kahn Gillmor
On Sun 2019-08-25 12:02:05 +0200, Gregor Zattler wrote: > Dear notmuch developers, when reading a long going discussion > which is deeply threaded, it often would come in handy if it was > possible to jump up to the parent message of the message on is > reading, unfolding this message in

Re: segfault using python bindings

2019-08-23 Thread Daniel Kahn Gillmor
On Fri 2019-08-23 09:07:12 -0300, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> The other possibility would be to implement the old "notmuch" API on top >> of the new one with explicitly logged deprecations. But iirc, the >> semantics and object lif

Re: segfault using python bindings

2019-08-22 Thread Daniel Kahn Gillmor
On Thu 2019-08-22 19:37:34 +, Rollins, Jameson wrote: > Ug, this naming issue is unfortunate. I don't really like "notmuch3" as > a reference to python 3, honestly. how about notmuch3000? :P > What about making these new bindings only for python3, and the old ones > relegating to python2,

Re: segfault using python bindings

2019-08-21 Thread Daniel Kahn Gillmor
On Tue 2019-08-20 19:20:30 +0200, Floris Bruynooghe wrote: > Sounds reasonable, just a quick note that I'm on holiday at the moment > and generally won't be too quick. But I guess there's no rush. I was > also trying to improve the docs but got sidetracked at some point. > There should be

custom property for messages with synthesized message-ids?

2019-08-18 Thread Daniel Kahn Gillmor
over in id:87mug6kyyv@fifthhorseman.net i started looking at the ways that notmuch sometimes synthesizes a message-id. In previous discussions around it, (e.g. in NEWS about notmuch 0.17) it's assumed that the form of the message-id itself -- it starts with "notmuch-sha1-" -- should be

Re: viewing duplicate messages

2019-08-18 Thread Daniel Kahn Gillmor
On Sat 2019-08-17 19:12:26 -0300, Jorge P. de Morais Neto wrote: > I have attached a tarball with three homonymous messages from Dell. The > last (most recent) two have the same subject and bodies, but the first > (earliest) one is different and yet they all have Message-Id 1. I have > included

Re: Bug#934082: elpa-notmuch: Shows remote images even when requested not to

2019-08-09 Thread Daniel Kahn Gillmor
On Thu 2019-08-08 09:45:06 -0300, David Bremner wrote: > I meant more specifically, the issue that this variable is only > effective if your html converter is the default shr Yes, this should be clearly documented, presumably in the documentation text about the variable. It would be even nicer

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

2019-08-06 Thread Daniel Kahn Gillmor
Hi Bremner-- thanks for the review! On Sat 2019-08-03 12:15:30 -0300, David Bremner wrote: > Daniel Kahn Gillmor writes: > >> +ret = true; >> +for (int i = 0; i < g_mime_header_list_get_count >> (legacy_display_headers); i++) {

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

2019-08-01 Thread Daniel Kahn Gillmor
On Thu 2019-08-01 08:32:56 -0300, David Bremner wrote: > assert is OK, but INTERNAL_ERROR is definded in util/error_util.c, so > including that header is another sensible option. gotcha, i think i was doing these updates with not-enough-sleep. I've gone back to INTERNAL_ERROR for my internal

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

2019-07-31 Thread Daniel Kahn Gillmor
On Wed 2019-07-31 23:15:55 -0400, Daniel Kahn Gillmor wrote: > On Wed 2019-07-31 08:57:56 -0300, David Bremner wrote: >> what about leaving an assert or call to INTERNAL_ERROR here? I'm a bit >> concerned this change is making the code less robust. I guess we'll see >>

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

2019-07-31 Thread Daniel Kahn Gillmor
Hi David-- Thanks for the review! On Wed 2019-07-31 08:57:56 -0300, David Bremner wrote: > Is a bit confusing that this patch introduces a new return value, and > then ignores. Perhaps cast the calls to (void) to make it clear you are > ignoring it on purpose. hm, we ignore it only for the

Re: Indentation style

2019-07-30 Thread Daniel Kahn Gillmor
On Tue 2019-07-30 00:23:16 +0300, Tomi Ollila wrote: > On Sun, Jul 28 2019, Daniel Kahn Gillmor wrote: >> (fwiw, i would also be happy if we moved away from literal tabs and just >> used spaces-only. But i am not interested in setting off a flamewar, >> so if anyone p

Re: viewing duplicate messages

2019-07-29 Thread Daniel Kahn Gillmor
On Wed 2019-07-17 15:08:49 +, Georg Faerber wrote: > On 19-07-17 14:50:50, drebs wrote: >> When I send a message to a schleuder list, it is first encrypted to >> the list's OpenPGP certificate before leaving my computer. Schleuder >> will then decrypt it and re-encrypt to the subscribers'

Re: Indentation style

2019-07-29 Thread Daniel Kahn Gillmor
On Mon 2019-07-29 00:19:48 +0200, Thomas Schneider wrote: > Maybe I misunderstood, but this doesn’t really look like Emacs’ defaults > for C. I think the question is less "emacs defaults" vs. "consistency with the current codebase". > While we’re at it, how about a generic .editorconfig? The

[PATCH v2] notmuch-show: run uncrustify

2019-07-02 Thread Daniel Kahn Gillmor
This is the result of running: $ uncrustify --replace --config devel/uncrustify.cfg *.c *.h In the top level source directory. I was using uncrustify 0.68.1+dfsg1-2. I do not know why these changes were not caught in 33382c2b5ba2537952a60ea378feff36961e4713 Signed-off-by: Daniel Kahn

Re: [PATCH] test: aggregate-results.sh: count test files where all tests skipped

2019-07-02 Thread Daniel Kahn Gillmor
On Sat 2019-06-15 17:28:44 +0300, Tomi Ollila wrote: > Previously, when all tests were skipped on a test file, there were > no indication of this in the final results aggregate-results.sh > printed. > Now count of the files where all tests were skipped is printed. LGTM. thanks for proposing

[PATCH v3 1/2] test: provide machinery to make and use test_shims

2019-06-26 Thread Daniel Kahn Gillmor
From: David Bremner These can be used e.g. to override return values for functions, in place of the existing scripting of gdb. This prepends to LD_PRELOAD rather than clobbering it, thanks to a suggestion from Tomi Ollila. Signed-off-by: Daniel Kahn Gillmor --- test/test-lib.sh | 16

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

2019-06-26 Thread Daniel Kahn Gillmor
From: David Bremner This removes the dependency of this test script on gdb, and considerably speeds up the running of the tests. Signed-off-by: Daniel Kahn Gillmor --- test/T070-insert.sh | 48 - 1 file changed, 17 insertions(+), 31 deletions

v3 of test speedup by replacing gdb with LD_PRELOAD

2019-06-26 Thread Daniel Kahn Gillmor
Here are the two patches from this series, revised according to the on-list discussion. In particular, the revision from Bremner's original series are: * LD_PRELOAD is now prepended to, not clobbered (thanks, Tomi!) * gen_insert_msg is not moved We still don't deal with platforms that don't

Re: [PATCH 1/2] test: provide machinery to make and use test_shims

2019-06-25 Thread Daniel Kahn Gillmor
On Wed 2019-06-26 00:05:09 +0300, Tomi Ollila wrote: > LD_PRELOAD=./${shim_file}${LD_PRELOAD:+:$LD_PRELOAD} notmuch-shared "$@" > > So that if LD_PRELOAD is already set and is non-empty then ':' and its > old value is appended to new value of LD_PRELOAD before this > notmuch-shared invocation.

Re: [PATCH] vim: Patch Ruby Mail's depracated method

2019-06-25 Thread Daniel Kahn Gillmor
On Mon 2019-03-18 15:10:51 +0100, Tarvi Verro wrote: > Method is not supported in Ruby's Mail 2.8.0+. > --- > vim/notmuch.vim | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/vim/notmuch.vim b/vim/notmuch.vim > index ad8b7c80..541698cd 100644 > --- a/vim/notmuch.vim > +++

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

2019-06-25 Thread Daniel Kahn Gillmor
On Mon 2019-06-24 19:43:58 -0700, William Casarin wrote: >> +static bool >> +_mime_node_set_up_part (mime_node_t *node, GMimeObject *part, int numchild); >> + > > nit: Instead of a forward declaration, could _mime_node_create be moved after > _mime_node_set_up_part instead? yep, we could

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

2019-06-25 Thread Daniel Kahn Gillmor
On Mon 2019-06-24 20:02:13 -0700, William Casarin wrote: > dkg wrote: >> +if ((protected_headers = g_mime_object_get_header_list (payload), >> protected_headers) && >> +(legacy_display = GMIME_TEXT_PART (first), legacy_display) && >> +(legacy_display_header_text =

[PATCH] test: run uncrustify

2019-06-25 Thread Daniel Kahn Gillmor
This is the result of running: $ uncrustify --replace --config ../devel/uncrustify.cfg *.cc *.c *.h in the test directory. Signed-off-by: Daniel Kahn Gillmor --- test/arg-test.c | 72 + test/ghost-report.cc| 10 +++--- test/hex-xcode.c

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