From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id MJvlOhUE8l+RbAAA0tVLHw (envelope-from ) for ; Sun, 03 Jan 2021 17:51:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6P2wNhUE8l8OWwAAB5/wlQ (envelope-from ) for ; Sun, 03 Jan 2021 17:51:17 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B1450940509 for ; Sun, 3 Jan 2021 17:51:16 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 7AC5F29C8B; Sun, 3 Jan 2021 12:51:06 -0500 (EST) Received: from che.mayfirst.org (unknown [162.247.75.117]) by mail.notmuchmail.org (Postfix) with ESMTPS id D9EAD28CC3 for ; Sun, 3 Jan 2021 12:51:02 -0500 (EST) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1609696262; h=from : to : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=6DJqqcYTCkHbCkw5H3KdOBy2Km9Us1OYCtTKu+PtTkg=; b=/2SEcI/JQST41LzGhI1cSRo9Jz9fmDS39IEaksriSeIHI8zSJC+RzEJC+jBe7jgGBpiMC QJXvy5llwJR5//sAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1609696262; h=from : to : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=6DJqqcYTCkHbCkw5H3KdOBy2Km9Us1OYCtTKu+PtTkg=; b=EZ+VL52S+rt5CI0z6HlQ1LLQvrpNyDMsf79XsNyfkG1axe//lKmIa1+JXfmTd8UVMo0g4 m6nz02JpSY4lviYP0MsgMbvXSYDUZ1eQJXR7bZGwHW16YkOAdHBb1azD23wXx7YdMIp8bOC uGHmJg33KVLHDRYr6JIzj3VF6nU637SZFilZdb19KuA5/3yFJIqbKOtpRpG2rDXrjey305W AEaGpj5fRVduwPi0BL1jQRrc/itfcjtAedFuTw2kotyhUQiXgIo9b8A2IdsFgRPHknQo3E7 d3+YQqGyFee3XP7Gn/3cs4/BgG70VcUhSeD+ZNzaR7V8KTnODCo3Hs8qqn4A== Received: from fifthhorseman.net (unknown [108.58.6.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id 815A3F9A5; Sun, 3 Jan 2021 12:50:59 -0500 (EST) Received: by fifthhorseman.net (Postfix, from userid 1000) id E569C2021E; Sun, 3 Jan 2021 12:35:48 -0500 (EST) From: Daniel Kahn Gillmor To: Teemu Likonen , Notmuch Mail Subject: Re: filtering headers from forwarded messages In-Reply-To: <87turylatz.fsf@iki.fi> References: <877e2qbzms.fsf@fifthhorseman.net> <87eewmlzqs.fsf@iki.fi> <875zhm6kch.fsf@fifthhorseman.net> <87pnfjgnku.fsf@fifthhorseman.net> <874kkbulza.fsf@fifthhorseman.net> <87r1n7d11x.fsf@iki.fi> <87k0sxtxb8.fsf@fifthhorseman.net> <87turylatz.fsf@iki.fi> Autocrypt: addr=dkg@fifthhorseman.net; prefer-encrypt=mutual; keydata= mDMEXEK/AhYJKwYBBAHaRw8BAQdAr/gSROcn+6m8ijTN0DV9AahoHGafy52RRkhCZVwxhEe0K0Rh bmllbCBLYWhuIEdpbGxtb3IgPGRrZ0BmaWZ0aGhvcnNlbWFuLm5ldD6ImQQTFggAQQIbAQULCQgH AgYVCgkICwIEFgIDAQIeAQIXgAIZARYhBMS8Lds4zOlkhevpwvIGkReQOOXGBQJd5Hw3BQkFpJWB AAoJEPIGkReQOOXGDYEA/j0ERjPxDleKMZ2LDcWc/3o5cLFwAVzBKQHppu0Be5IWAP0aeTnyEqlp RTE7M8zugwkhYeUYfYu0BjecDUMnYz6iDLgzBF3kewUWCSsGAQQB2kcPAQEHQK1IuW0GZmcrs2mx CYMl8IHse0tMF8cP7eBNXevrlx2ZiPUEGBYIACYCGwIWIQTEvC3bOMzpZIXr6cLyBpEXkDjlxgUC XeR7TwUJAiGl/gCBdiAEGRYIAB0WIQQsv6x2UaqQJzY+dXHEDyVUMvKBDwUCXeR7BQAKCRDEDyVU MvKBD7KmAQCHs+7588C4jto6fMje0Nu97zzoppjJM7lrGF2rVnbHvwD+MgmGUbHzPSUrTWnZBQDi /QM595bxNrBA4N1CiXhs2AMJEPIGkReQOOXGpp0BAM7YeBnt/UNvxJAGm4DidSfHU7RDMWe6Tgux HrH21cDkAQC9leNFXJsQ7F2ZniRPHa8CkictcQEKPL8VCWpfe8LbArg4BF3ke5wSCisGAQQBl1UB BQEBB0Cf+EiAXtntQMf51xpqb6uZ5O0eCLAZtkg0SXHjA1JlEwMBCAeIfgQYFggAJhYhBMS8Lds4 zOlkhevpwvIGkReQOOXGBQJd5HucAhsMBQkCIaVkAAoJEPIGkReQOOXGdYcBANYnW7VyL2CncKH1 iO4Zr0IwfdIv6rai1PUHL98pVi3cAP9tMh85CKGDa0Xi/fptQH41meollLW5tLb/bEWMuUNuBQ== Date: Sun, 03 Jan 2021 12:35:48 -0500 Message-ID: <87lfd99b4b.fsf@fifthhorseman.net> MIME-Version: 1.0 Message-ID-Hash: 2GWNFIMANZ7SOV2NARGKIKI3ESEXFHER X-Message-ID-Hash: 2GWNFIMANZ7SOV2NARGKIKI3ESEXFHER X-MailFrom: dkg@fifthhorseman.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; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: multipart/mixed; boundary="===============1437244006464709307==" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.06 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=fifthhorseman.net header.s=2019 header.b=/2SEcI/J; dkim=fail (body hash did not verify) header.d=fifthhorseman.net header.s=2019rsa header.b=EZ+VL52S; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fifthhorseman.net (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: B1450940509 X-Spam-Score: -3.06 X-Migadu-Scanner: scn1.migadu.com X-TUID: Qv9kuPlz2uYU --===============1437244006464709307== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain On Sun 2021-01-03 09:48:56 +0200, Teemu Likonen wrote: > But yes, it would be nice to filter headers like "Received", maybe > "DKIM-Signature" and various unofficial headers starting with "X-". Right, my current value of message-forward-ignored-headers is: ("^Content-Transfer-Encoding:" "^X-Gnus:" "^Received:" "^Return-Path:" "^X-Original-To:" "^Delivered-To:" "^X-Virus-Check-By:" "^Received-SPF:") (i don't care to strip out DKIM-Signature headers because i see that as part of the initial message injection into the SMTP system) > For a quick first step I would probably try running "C-u M-|" > (shell-command-on-region) in Emacs and pipe the forwarded message > through command like this: > > formail -I Received -I DKIM-Signature -I X-Whatever > > Probably after that I would integrate that shell command call in one > Emacs command and then implement the functionality in Emacs Lisp. But so > far I haven't cared enough. This all sounds like it would work, but it seems like a lot of trouble compared to fixing a regression. this filtering worked just fine for me before i upgraded to emacs 27.1. I've filed a report about the regression with emacs upstream: https://debbugs.gnu.org/45631 Thanks for helping me think through the details, Teemu. --dkg --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQQsv6x2UaqQJzY+dXHEDyVUMvKBDwUCX/IAdAAKCRDEDyVUMvKB D1kLAQDUm6WWo3u29eH+hSPq/R+LzUFOCnqtTpftvuola9W+NAD+LnQQNTPo8D4u KlVFYOXM3a7+rwVb8COHn2Jekd9QjAw= =AtBI -----END PGP SIGNATURE----- --=-=-=-- --===============1437244006464709307== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============1437244006464709307==--