From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id oAJvG3bKhGKwGgAAbAwnHQ (envelope-from ) for ; Wed, 18 May 2022 12:29:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id AJiSG3bKhGKnWwAA9RJhRA (envelope-from ) for ; Wed, 18 May 2022 12:29:10 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 02E8D16E8E for ; Wed, 18 May 2022 12:29:10 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 7E6555F76E; Wed, 18 May 2022 10:29:07 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id B54FD5F767 for ; Wed, 18 May 2022 10:29:05 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 0AA615FBD7; Wed, 18 May 2022 06:29:05 -0400 (EDT) Received: (nullmailer pid 743454 invoked by uid 1000); Wed, 18 May 2022 10:29:03 -0000 From: David Bremner To: Alexander Adolf , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs/smime: render decrypted MIME entities in notmuch-show In-Reply-To: <5fdc515751380c0ea8844fd9994895ec@condition-alpha.com> References: <9cc1c3dc135b5126efd210ee97b88d6b@condition-alpha.com> <87pmm43nig.fsf@tethera.net> <90f50b09c047913abad928c461b08412@condition-alpha.com> <877d819j1o.fsf@tethera.net> <874k359em5.fsf@tethera.net> <1e3b5d3c782206a10c600d0ccdc53c03@condition-alpha.com> <87tuazb3ag.fsf@tethera.net> <68e03382493db20b12786d19f79edfaf@condition-alpha.com> <87r160o7v8.fsf@tethera.net> <5fdc515751380c0ea8844fd9994895ec@condition-alpha.com> Date: Wed, 18 May 2022 07:29:03 -0300 Message-ID: <87pmkbb0cw.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: R77F37GHPFVCXLRQ656W657QB7RDENXU X-Message-ID-Hash: R77F37GHPFVCXLRQ656W657QB7RDENXU X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Daniel Kahn Gillmor , michaeljgruber+grubix+git@gmail.com X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652869750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=kc9ldDL81Kbd1AZIX5nzR2lCViL4/oc6DYbc+0oBZxU=; b=SVACy6CWZXzj+ocp0wu9cYMq4OyrIk9hvw9wFoz+Ko7EL9STKxsolaGsGU/jtJfl9Ag6YZ DSN+lkMm4DBxP1VfB5WEVbApjgD9SedU3hx1wd24AHPD/p1C6LwGhgg2mj50mJX0VEBjyP m+Q20Fxpz+Kp6SRLhFSA7jjs2OgP6KEZ6D6QIaZqF/x3S7as/XtXW6HLJ6P2Dxnllo06OK kvWcnmJVeRyOqmUc+I3fTwsl+JWUUZhdHKdxJWkfwnquqjHNcLwsWeh+kBV7RgSt4VaQE9 ttZht6xYdqCAGILq100/yQrXYQjuhe6rp6E92gJuKmWrZ3Q8CvXJXTHqsllnlg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652869750; a=rsa-sha256; cv=none; b=Q1rVe1KouFA0OvI4EaiVKcryCO2IyONbgFszsz/iFdLPoY+6eg+pal7mSTmYk18EL+83FL mwHcPRgG9L8urg4r/MIpvxaRvkP2Gr0jzhlsxhmdkVnZNJnRVkUZC1qrhwChlV/0cnc0pw oaY/iH8n09U/fa6T82/IfC757aLB41xf5upTLbkFZJ6e/Zyutc3o83iiRg0y5mk/Bje+gk 7QBc34VdvpSSQZpgE/fbNDSHRbOa9UvN4saFpPT9ajhc5oeglUQZ0oSUPbTRuk6jqlAuSL g5/OWldvaUGI0symJcFC7LkEbutw6g9P+UPoTHbc1FBZ2lfWPEXUnV2/cvidnA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.46 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 02E8D16E8E X-Spam-Score: -1.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3e2izP9D04Rd Alexander Adolf writes: > > Ok, I have added the line as you suggest. I was wondering though, as in > principle the secret key of test_suite@notmuchmail.org could be > available (it's in the key-ring at least)? Yes, it's added to the test suite's temporary keyring. One of the messages in test/corpora/crypto is not encrypted to that key though. $ for file in *; do echo $file gpg < $file |& grep encrypted; echo done basic-encrypted.eml gpg: encrypted with 1024-bit RSA key, ID C44D36DEAD54AB16, created 2011-02-05 encrypted-rfc822-attachment gpg: encrypted with 4096-bit RSA key, ID 70E3C0DE87068451, created 2019-06-08 gpg: encrypted with 1024-bit RSA key, ID C44D36DEAD54AB16, created 2011-02-05 encrypted-signed.eml gpg: encrypted with 1024-bit RSA key, ID C44D36DEAD54AB16, created 2011-02-05 simple-encrypted gpg: encrypted with 4096-bit RSA key, ID 3B7AA7F014E69B5A, created 2016-12-21 > It seems this refers to the very first line of the expected output? I > have updated the expected file to use an absolute date, and the test > script to set notmuch-show-relative-dates to nil as you suggest. > Yes, it's referring to the first line of output. >> Subject: notmuch-show S/MIME test >> To: test_suite@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_suite@notmuchmail.org ] >> >> This is exactly the problem we just dealt with for T355-smime. > > T357? > >> I think the same solution can be applied, but you will need to inline >> the output so that you can do variable substitution. > > I'm lost on what you're suggesting/expecting for this one. Remove the > angle brackets from the "Good signature" line of the expected file? Have a look at commit 8723e707c15f7b435f07f5d5ea693496bb9769bb, in particular the lines if [ $NOTMUCH_GMIME_EMITS_ANGLE_BRACKETS == 1 ]; then EXPECTED_EMAIL_ADDR='' else EXPECTED_EMAIL_ADDR='test_suite@notmuchmail.org' fi Then you can use $EXPECTED_EMAIL_ADDR in the expected output. This means you'll have to generate the expected output rather than hard coding it in a file. To pick some examples at random, you can see how to do something similar on lines 157 and 222 of T035-read-config.sh > >> [ 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. >> [...] > > I see; unfortunate choice of MIME part. As it seems I will need to > generate a new test message anyway, what would be a more "portable" > part? PNG? PNG should not be worse, but the output might still need postprocessing to avoid variation.