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

2019-12-03 Thread David Bremner
William Casarin writes: > 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 merged to master. d ___ notmuch mailing list

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

2019-12-03 Thread David Bremner
Daniel Kahn Gillmor writes: > Signed-off-by: Daniel Kahn Gillmor > --- > debian/compat | 1 - > debian/control | 2 +- > 2 files changed, 1 insertion(+), 2 deletions(-) > delete mode 100644 debian/compat This change introduces a large number of warnings from dh_missing. I guess this is

Re: [PATCH] emacs: A prefix argument kills rather than browsing URLs

2019-12-03 Thread David Bremner
David Edmondson writes: > In `notmuch-show', the "B" key (notmuch-show-browse-urls) will kill > the URL if called with a prefix argument rather than browsing > directly. merged to master. d ___ notmuch mailing list notmuch@notmuchmail.org

Re: [PATCH 4/5] tests: run python-cffi tests

2019-12-03 Thread David Bremner
David Bremner writes: > Tomi rightly observed that I somehow dropped the shutil.which change. As > penance, I created a seprate commit and pushed that to wip/cffi. > > d I have pushed this series to master. d ___ notmuch mailing list

possibly outdated info on notmuch website(?)

2019-12-03 Thread Gregor Zattler
Dear notmuch developers, https://notmuchmail.org/#index8h2 states among other things: Another mailing list Currently the mailing list at notmuchmail.org is not working much, so we have a temporary (?) list at freelists.org. Feel free to subscribe if you like, and to CC both

Re: [BUG] notmuch-emacs: spoils sendmail -f with emacs 27 commit 3a59cc84069376802ba8fd731b524d78db58262c and later

2019-12-03 Thread David Edmondson
On Sunday, 2019-12-01 at 18:10:59 +01, Gregor Zattler wrote: > [@Stefan: FYI] > Dear notmuch developers, > > I use notmuch-emacs configured with > (setq mail-specify-envelope-from t) > (setq mail-envelope-from 'header) > (setq send-mail-function 'sendmail-send-it) > > this should/used to invoke

Re: [BUG] notmuch-emacs: spoils sendmail -f with emacs 27 commit 3a59cc84069376802ba8fd731b524d78db58262c and later

2019-12-03 Thread Gregor Zattler
Hi David, * David Edmondson [2019-12-03; 18:43]: > On Sunday, 2019-12-01 at 18:10:59 +01, Gregor Zattler wrote: >> I use notmuch-emacs configured with >> (setq mail-specify-envelope-from t) >> (setq mail-envelope-from 'header) >> (setq send-mail-function 'sendmail-send-it) >> >> this should/used

Re: [BUG] notmuch-emacs: spoils sendmail -f with emacs 27 commit 3a59cc84069376802ba8fd731b524d78db58262c and later

2019-12-03 Thread David Edmondson
On Tuesday, 2019-12-03 at 20:15:02 +01, Gregor Zattler wrote: >> As best I can determine, this relates to the order in which things are >> loaded. >> >> If you load message.el before setting `mail-specify-envelope-from', >> things are broken (sorry for the long lines): >> >> disaster-area

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

2019-12-03 Thread David Bremner
Daniel Kahn Gillmor writes: > 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 mode

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 mode 100644 debian/compat > > This change

Re: possibly outdated info on notmuch website(?)

2019-12-03 Thread David Bremner
Gregor Zattler writes: > Dear notmuch developers, > > https://notmuchmail.org/#index8h2 > > states among other things: > > Another mailing list > > Currently the mailing list at notmuchmail.org is not working > much, so we have a temporary (?) list at freelists.org. Feel > free

Re: [PATCH] configure: Install zsh completions where zsh will find them.

2019-12-03 Thread David Bremner
Oliver Kiddle writes: > Zsh searches in the $fpath array for completion functions. By default > this includes $(prefix)/share/zsh/site-functions but not the existing > value. The prefix for zsh and notmuch isn't guaranteed to be the same > but it normally will be making this a better default for

Re: [BUG] notmuch-emacs: spoils sendmail -f with emacs 27 commit 3a59cc84069376802ba8fd731b524d78db58262c and later

2019-12-03 Thread David Edmondson
On Tuesday, 2019-12-03 at 15:39:47 -05, Stefan Monnier wrote: >> disaster-area ~/s/emacs % ./src/emacs -Q -nw -batch --eval "(progn (require >> 'message) (setq mail-specify-envelope-from t mail-envelope-from 'header) >> (message \"%s\" message-sendmail-envelope-from))" >> nil >> disaster-area

[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
When walking the MIME tree, we might need to extract a new MIME object. Thus far, we've only done it when decrypting multipart/encrypted messages, but PKCS#7 (RFC 8551, S/MIME) has several other transformations that warrant a comparable form of unwrapping. Make this member re-usable for PKCS#7

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
When we are indexing, we should treat SignedData parts the same way that we treat a multipart object, indexing the wrapped part as a distinct MIME object. Unfortunately, this means doing some sort of cryptographic verification whose results we throw away, because GMime doesn't offer us any way to

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

2019-12-03 Thread Daniel Kahn Gillmor
In some circumstances, we will encounter an unsigned long, and need to emit it textually. For example, in GPGME, the gpgme_signature_t object has members (`created` and `expires`) that are unsigned long integers. notmuch doesn't use GPGME directly, but subsequent changes will make it clear why

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

2019-12-03 Thread Daniel Kahn Gillmor
This CA is useful for test suites and the like, but is not an actually-secure CA, because its secret key material is also published. I plan to use it for its intended purpose in the notmuch test suite. It was copied from this Internet Draft:

[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 14/14] cli: Avoid bogus signature dates from GMime

2019-12-03 Thread Daniel Kahn Gillmor
As noted in https://github.com/jstedfast/gmime/issues/68, GMime converts the unsigned longs returned from GPGME into time_t objects. On architectures with a signed 32-bit time_t (like GNU/Linux x86_64), this means that we're limited to 31 bits of data, which means the clock wraps around in 2038.

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

2019-12-03 Thread Daniel Kahn Gillmor
Add a simple S/MIME SignedData message, taken from an upcoming draft of https://datatracker.ietf.org/doc/draft-autocrypt-lamps-protected-headers/ RFC 8551 describes a SignedData, a one-part clearsigned object that is more resistant to common patterns of MTA message munging than multipart/signed

[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 --- mime-node.c

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

2019-12-03 Thread Daniel Kahn Gillmor
Avoid a memory leak in the notmuch command line. gmime_multipart_encrypted_decrypt returns a GMimeObject marked by GMime as "transfer full", so we are supposed to clean up after it. When parsing a message, notmuch would leak one GMimeObject part per multipart/encrypted MIME layer. We clean it

[PATCH 4/6 v2] wrap-and-sort -ast

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

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

2019-12-03 Thread Daniel Kahn Gillmor
On Tue 2019-12-03 19:17:19 -0400, David Bremner wrote: > I've merged all except this patch, Thanks! > and the wrap-and-sort. No real objection to the latter, but it is too > painful to rebase, and will need regeneration. I've regenerated it and sent it to the list. the earlier you apply