From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SGC8MT46CmL/OwAAgWs5BA (envelope-from ) for ; Mon, 14 Feb 2022 12:17:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kNFpKj46CmJDjwAAG6o9tA (envelope-from ) for ; Mon, 14 Feb 2022 12:17:18 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (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 114A134051 for ; Mon, 14 Feb 2022 12:17:18 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 7DEAA5F6E8; Mon, 14 Feb 2022 11:17:15 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 004BC5F6D1 for ; Mon, 14 Feb 2022 11:17:11 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id E15FA5FBD2; Mon, 14 Feb 2022 06:17:10 -0500 (EST) Received: (nullmailer pid 3219120 invoked by uid 1000); Mon, 14 Feb 2022 11:16:58 -0000 From: David Bremner To: NeilBrown Subject: Re: WIP: filter out envelope headers in notmuch-insert. In-Reply-To: <164481580222.17471.7090984749734305531@noble.neil.brown.name> References: <20220212025503.1690413-1-david@tethera.net> <164481580222.17471.7090984749734305531@noble.neil.brown.name> Date: Mon, 14 Feb 2022 07:16:58 -0400 Message-ID: <87h791wvdh.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: QZNSCQ7IQAP3OD6YSPLMJSCK3JOCOBYS X-Message-ID-Hash: QZNSCQ7IQAP3OD6YSPLMJSCK3JOCOBYS 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: notmuch@notmuchmail.org 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-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644837438; 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=GUxSRsbNJakcu2N36FkwVpdJ81uua/LJ0+RM70oj76U=; b=MCO88jMNCYk1L6+Ie9DDZsr71r7+e3H/HUIw/4coWq7EPLGwctTdWC81cUAJQb9yWJ7qel OkWS8Q95WMllNR3bGfZStrjx+JzzhjdKotQrQpvxwzn5ljYE9lnlqBWq4BRrOwNRDrfYo3 EvWI98p1rZtFtgu8jtsjzk09UBzaid6fS6cMelxBLhFSfCDGg76bu+azySpD1HXvdnsrpK 4hvo+2YcnCr8Bmx2LavLUcE5jIw8xKI2+GzVQs2XzXaVwXOflJzCjiiU6F2Bz1G7m9NkmU B0kasUxa7Pe9i3nSFqNiRrtX8a6813zirPlLOAuH4cPbNKPWFvx1BF8So7qYtA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644837438; a=rsa-sha256; cv=none; b=XZMjBiYvr8X9n/ambnqsngLKAjsW5cEt9Uf06a/YrkqFCa8YcihyHyTkOZrKCmg8RYpOjz ttysPn1B+7g8ysuZ12buX27hlKS2pecfGjRv/IebT4TsABYfmwoDc0a6a0n/9ZoJVYrBdC Uo7bVDSlwzja/nd48JQZ37+ESLG+fgSgRELqZrn8rch8NzM4MthV/VA+/XoJX0xdMDiMst JhCvWyH/UniMk8ImcJWQuXZCKfMJg0fnhcWQotB2q6Tlecuv3lcLIS9uhvgM83HB1Ve/Cn 0egw1JlMh2P+7E/1vSjJLYuSz8mEAPTVmzqKnpWA3YJPOhoaTCEoEAZ5C4UVSQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.84 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 114A134051 X-Spam-Score: -2.84 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2jSrB+Y0FSl2 "NeilBrown" writes: > On Sat, 12 Feb 2022, David Bremner wrote: >> This is a bit rough and ready, but before I fine tune it, I want to >> make sure the overall idea of stripping envelope headers in >> notmuch-insert makes sense. > > I think that it would be highly inappropriate to modify the message > passed to notmuch-insert AT ALL. > It *might* be appropriate to check that it looks generally like an email > message (e.g. headers followed by a blank line), but changing it would > be wrong. > Here we're just changing "From foo" into "X-Envelope-From: foo", so no information is lost, unless you consider being an mbox file information. > Why do you think it might be helpful? Currently we throw an error from notmuch-insert when trying to index those mbox files (as passed to notmuch-insert by postfix). This means the message is either bounced or (with --keep), invisible in the notmuch index. d