Re: [PATCH v2 2/2] test/smime: fix signature verification test with newer gmime.

2022-04-13 Thread David Bremner
Daniel Kahn Gillmor  writes:

> Thanks, Michael--
>
> This LGTM.
>
> It is more narrowly-targeted at permitting this specific variation than
> Bremner's earlier version of the patch (and it doesn't have any tests
> marked BROKEN), which is nice.
>
> It might be marginally cleaner to swap out the LEFT_ANGLE RIGHT_ANGLE
> variables for a single replacement variable like so:
>
> if [ $NOTMUCH_GMIME_EMITS_ANGLE_BRACKETS == 1 ]; then
>EXPECTED_EMAIL_ADDR=''
> else
>EXPECTED_EMAIL_ADDR='test_su...@notmuchmail.org'
> fi

In the end I applied this version to master. Thanks to you both.

d
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Forcing a sync of maildir flags?

2022-04-13 Thread Gregor Zattler
Hi Sean,
* Sean Whitton  [2022-04-04; 21:48]:
> On Tue 22 Mar 2022 at 12:44pm -07, Sean Whitton wrote:
>
>> I am seeing this bug, or a closely related one, a whole lot right now.
>> Messages are coming back as unread over and over again.

me too.  And it's not only messages from me, but also
messages from other people appear as unread of which I'm
quite certain I already read them.

>> I recently made some changes to my notmuch cronjobs, so
>> that probably has something to do with it, but I have no
>> guesses as to what the problem is.
>>
>> As a first thing to try, I am going to add something to my pre-new hook
>> to perform the new/ -> cur/ move as specified by maildir(5) on all my
>> synced maildirs, so that notmuch never sees messages in new/ except when
>> it writes new drafts and sent mail there (and they'll get moved on the
>> next sync).

Would you please disclose your workaround?  I'm very much
interested.


Ciao; Gregor
--
 -... --- .-. . -.. ..--.. ...-.-
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: [PATCH] emacs/smime: render decrypted MIME entities in notmuch-show

2022-04-13 Thread David Bremner
Alexander Adolf  writes:

> Hello David,
>
> David Bremner  writes:
>
>> [...]
>> I'm not sure it's less effort, 
>> [...]
>
> Neither am I... ;-))
>
> It might perhaps seem easier to run the tests I have added to the
> attached, updated patch in your complete environment?
>
>   --alexander


It seems that it is mostly working, but there are a few issues to iron out.

The first is easy, I think. Since we added a message to the crypto
corpus, we need to adjust the tests. I think it is fine to just add
the new message to the failing test output, as in the diff below.

T357-index-decryption: Testing indexing decrypted mail
 FAIL   indexing message fails when secret key not available
--- T357-index-decryption.31.expected   2022-04-13 23:15:02.258922959 
+
+++ T357-index-decryption.31.output 2022-04-13 23:15:02.258922959 
+
@@ -1,5 +1,6 @@
 #= simple-encryp...@crypto.notmuchmail.org index.decryption=failure
 #notmuch-dump batch-tag:3 config,properties,tags
++encrypted +inbox +unread -- 
id:575ddaaf0b234fd85e077cfb4d44d...@notmuchmail.org
 +encrypted +inbox +unread -- id:basic-encryp...@crypto.notmuchmail.org
 +encrypted +inbox +unread -- 
id:encrypted-rfc822-attachm...@crypto.notmuchmail.org
 +encrypted +inbox +unread -- id:encrypted-sig...@crypto.notmuchmail.org


T450-emacs-show: Testing emacs notmuch-show view
 BROKEN show encrypted rfc822 message
!!! Bodypart handler `notmuch-show-insert-part-*/*' threw an error:
!!! Symbol’s value as variable is void: gnus-newsgroup-charset
 FAIL   process cryptographic MIME parts (S/MIME)
--- T450-emacs-show.21.notmuch-show-smime-encrypted-signed-multipart
2022-04-13 23:15:11.267167711 +
+++ T450-emacs-show.21.OUTPUT   2022-04-13 23:15:11.267167711 +
@@ -1,4 +1,4 @@
-test_su...@notmuchmail.org (0 mins. ago) (encrypted inbox)
+test_su...@notmuchmail.org (Yest. 14:57) (encrypted inbox)

If you set notmuch-show-relative-dates to to nil, something like, with
maybe better indentation:

-test_emacs '(let ((notmuch-crypto-process-mime t))
+test_emacs '(let ((notmuch-crypto-process-mime t)
+  (notmuch-show-relative-dates nil))

Then you will get an actual date that you can hard code.

 Subject: notmuch-show S/MIME test
 To: test_su...@notmuchmail.org
 Date: Tue, 12 Apr 2022 16:57:30 +0200
@@ -6,10 +6,10 @@
 [ smime.p7m: application/pkcs7-mime ]
 [ Decryption successful ]
 [ multipart/signed ]
-[ Good signature by:  ]
+[ Good signature by: test_su...@notmuchmail.org ]

This is exactly the problem we just dealt with for T355-smime. I think
the same solution can be applied, but you will need to inline the output
so that you can do variable substitution.

 [ multipart/mixed ]
 [ multipart/mixed ]
 [ text/plain ]
 The password is "12345678". But don't tell anyone!
-[ test.dtd: application/octet-stream ]
+[ test.dtd: application/octet-stream (as application/xml-dtd) ]

This seems related to the function
#'notmuch-show-get-mime-type-of-application/octet-stream, which is
calling (mailcap-extension-to-mime "dtd"). Probably this is hard to make
reproducible, so just seding away an "(as ...)" string is a reasonable
alternative.

 [ smime.p7s: application/pkcs7-signature ]



___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org