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 aD6fMi1Y7l9CWgAA0tVLHw (envelope-from ) for ; Thu, 31 Dec 2020 23:01:01 +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 MGJ7Li1Y7l8FcwAAB5/wlQ (envelope-from ) for ; Thu, 31 Dec 2020 23:01:01 +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 20BEB940149 for ; Thu, 31 Dec 2020 23:01:00 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 3308328CB7; Thu, 31 Dec 2020 18:00:49 -0500 (EST) Received: from che.mayfirst.org (unknown [162.247.75.117]) by mail.notmuchmail.org (Postfix) with ESMTPS id E38322852F for ; Thu, 31 Dec 2020 18:00:45 -0500 (EST) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019; t=1609455644; h=from : to : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=zu6VjKyowayVi9KfvGcDlYEFLFJmuVoXWzA72Ey63T0=; b=hTWGoSRmNEwHWJtVsvnQNopi0c4StTNa9cT3sZuxLZ9CSv92O/KMyebMJgrQ6xxixf9GI 6go8dwB37L7q5m5DQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fifthhorseman.net; i=@fifthhorseman.net; q=dns/txt; s=2019rsa; t=1609455644; h=from : to : subject : in-reply-to : references : date : message-id : mime-version : content-type : from; bh=zu6VjKyowayVi9KfvGcDlYEFLFJmuVoXWzA72Ey63T0=; b=FzbapmVZb+sJ/1OZ2JClSXjaHmBn2rOF/9heFg6OdhMw6x7WOMIhhpKHLkS0WU6DLhIqL 24qpOjj/SxL+G5y/AARNIW3iihSp/6+IePizvcqaiLIzrser6bY7gk4oyTZDgil1rt8bmJ6 5t0m0UVLE/CA9kADoEKUBF5SBlHKB4ibrVbjHbwZIUSSghc2qkR3mXTdSYhce+EMDvJ07P+ Hat5fG4Z/3x3m/Yyq5nK7elVmCKw8JBNdv4eBAcmUBKlQh7Ec5WrujQ9903Ceka30aj33vu +wYNRZDKlv1YoIcp4z7Cef0vev+7ihpu1AmG7pugfhoEp6vrtzH9qxBfRdOw== 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 1E2C5F9A6; Thu, 31 Dec 2020 18:00:43 -0500 (EST) Received: by fifthhorseman.net (Postfix, from userid 1000) id 9EAB320397; Thu, 31 Dec 2020 17:39:24 -0500 (EST) From: Daniel Kahn Gillmor To: Teemu Likonen , Notmuch Mail Subject: Re: filtering headers from forwarded messages In-Reply-To: <87r1n7d11x.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> 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: Thu, 31 Dec 2020 17:39:23 -0500 Message-ID: <87k0sxtxb8.fsf@fifthhorseman.net> MIME-Version: 1.0 Message-ID-Hash: UDYABHREQPRLUOJOFCNNVDERVUZ55GJA X-Message-ID-Hash: UDYABHREQPRLUOJOFCNNVDERVUZ55GJA 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="===============0250100048391751171==" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.49 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=fifthhorseman.net header.s=2019 header.b=hTWGoSRm; dkim=fail (body hash did not verify) header.d=fifthhorseman.net header.s=2019rsa header.b=FzbapmVZ; 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: 20BEB940149 X-Spam-Score: -1.49 X-Migadu-Scanner: scn0.migadu.com X-TUID: HJE8FuVoazfa --===============0250100048391751171== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Teemu-- On Wed 2020-12-30 12:46:02 +0200, Teemu Likonen wrote: > I don't know any automatic way to remove headers from an email message > that is stored as a MIME part. The straightforward way seems to be to parse/interpret the message with our knowledge of rfc5322, identify the headers to be removed, and then re-render the message. iirc, it worked for me until i started using emacs 27.1, too =E2=98=B9 Obviously, if "Content-Type" or other structural headers are removed, you'll break the message. But the answer there is "don't do that", i think. > What about forwarding a message as MIME part which is just "text/plain" > (and not "message/rfc822")? This might be useful for some people, but doesn't really satisfy my goals. When i want to forward a message, i want to forward the whole message -- multipart, with attachments, etc. My goal when forwarding is to *not* mangle the message, but rather to supply it to the new recipient in a parseable way. I just don't think that most recipients need to have access to (for example) the headers that are added by all the mail transport agents along my receipt path. I want them filtered for privacy, which i think isn't unreasonable. (i recognize that if the use case is debugging the MTA path itself, i probably *don't* want those headers stripped, but that's a different use case than the most common message forwarding) so i'm still stuck with this regression, sadly. --dkg --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQQsv6x2UaqQJzY+dXHEDyVUMvKBDwUCX+5THAAKCRDEDyVUMvKB D0S0AQCpFsjVyFhJ+ycSKXDj1Q1w9wEUY5Iqpvw+RNi9r24FgwEAttpPylhLOzbI Sm/zQdETioJIZQ/5bU0j81H1IoYqCgw= =reQB -----END PGP SIGNATURE----- --=-=-=-- --===============0250100048391751171== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============0250100048391751171==--