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 ms0.migadu.com with LMTPS id CPmlDaj/CmL/6wAAgWs5BA (envelope-from ) for ; Tue, 15 Feb 2022 02:19:36 +0100 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 mGALC6j/CmLrdgAA9RJhRA (envelope-from ) for ; Tue, 15 Feb 2022 02:19:36 +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 9999517F47 for ; Tue, 15 Feb 2022 02:19:35 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id AD9C55F6E8; Tue, 15 Feb 2022 01:19:32 +0000 (UTC) X-Greylist: delayed 350 seconds by postgrey-1.36 at yantan; Tue, 15 Feb 2022 01:19:30 UTC Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by mail.notmuchmail.org (Postfix) with ESMTPS id 0E0E25F402 for ; Tue, 15 Feb 2022 01:19:30 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B3A33210EE; Tue, 15 Feb 2022 01:13:38 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D4928139F6; Tue, 15 Feb 2022 01:13:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id akhJI0H+CmKbTQAAMHmgww (envelope-from ); Tue, 15 Feb 2022 01:13:37 +0000 MIME-Version: 1.0 From: NeilBrown To: "David Bremner" Subject: Re: WIP: filter out envelope headers in notmuch-insert. In-reply-to: <87mtituht3.fsf@tethera.net> References: <20220212025503.1690413-1-david@tethera.net>, <164481580222.17471.7090984749734305531@noble.neil.brown.name>, <87h791wvdh.fsf@tethera.net>, <164487743989.17471.15302582357377741383@noble.neil.brown.name>, <87mtituht3.fsf@tethera.net> Date: Tue, 15 Feb 2022 12:13:32 +1100 Message-id: <164488761286.17471.15404760359666744352@noble.neil.brown.name> Message-ID-Hash: G4YCUKXLJPJ4LNOQDDVSZ4QA2KDLVDRW X-Message-ID-Hash: G4YCUKXLJPJ4LNOQDDVSZ4QA2KDLVDRW X-MailFrom: neil@brown.name 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=1644887975; 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=UryWL1FPEilo3SuAGhGltvDJGLD8D+kKt9rYnvCFWtM=; b=BRJ2GcNcXYR+KeNx9T0mgSsOR/lOe1hTZUvmr6cuSFaQCSfAvufhiVxuuva6Mfu6BVzS48 SwPyMhVKfS8DNlgQH3K7x0iXm3v3alXjX+c+sywcruWHIEapDSnOpeMv69MRXPit5RMaYv jv+dAzlWtry5ACUEcrd8Tl50x9T+Y3fntrgw2oBS4kVyJa0+eRY9/OU8aM2XuiCTglv5Rh oCUKRNV64rUFLvJ2zkSjhad4C1p4M9OQYbmoXiencjvgmTnqtEWzikXqv5RPsQFZhB/KLC IAmPeOJabz+qYsRVeaqRjQ92O8VeqDdZoGGy3xNGndneWQYus8KPofibPJMV9g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644887975; a=rsa-sha256; cv=none; b=C067+wduCARL9Vfu5n6eq6vmEuAgYlvGFg/cE+BBjz5CrocuU0X9DXPZTDGP+HjPN9zE8t JO0/moyj2yzyR3EV+79Wxy9jAW1LLZILq1SX1o3Ke6Jzn3FjLIxWVZIc1jwYHNkmU8hGE0 Rl92Ng0v3SESX3uPyVK/xavcT/bdQ2Tej/ufgcXqVkaYQ0Oe0t0qKdkzRW6XdgRA2l/ZbP KbO9MXbLUsUYltCAdXPd3vqVjRuUZaTNkUFSi06quVXZujf+fb3+sHwqSdBe6xoPS4O/sD 0GA3QDS2VRMRedBzVwbISEV5r3TPm8YYT3ot/ccbw5O7HBv22go0IPxTA4/iAQ== 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: -4.34 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: 9999517F47 X-Spam-Score: -4.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9c6tEXIAAEMJ On Tue, 15 Feb 2022, David Bremner wrote: > "NeilBrown" writes: > > > On Mon, 14 Feb 2022, David Bremner wrote: > > > > If notmuch-insert is given an 'mbox', shouldn't it either reject it, or > > split it up into individual messages and insert each one individually > > (discarding the "From" line because it shouldn't add any new > > information)? > > I guess you could think of what the patch does as a conservative version > of that. I'm not aware of any case where a "real" mbox with multiple > messages is passed to notmuch-insert. So the modification effectively > discards the From line, although keeping the contents, because who knows > what people rely on. And on digging into postfix a bit, it seem that when forwarding to a program, it *doesn't* quote other "From " lines in the email, so splitting up the input would break things. I wonder if that is a bug... the documentation is clear on the details of delivering to a program > > > I don't suppose there is some config option to postfix to tell it to > > provide an RFC-2822 email message, not an mbox ??? > > It seems not, at least for the case of invoking notmuch-insert via a > .forward file, which I would guess is the most common case (nothing > specific to postfix, it's just the obvious way to invoke > notmuch-insert). So it seems... In the case of postfix the sender information is provided both in "From " and "Return-Path:", so just stripping "From " would be safe. It is hard to argue against the extra caution of retaining the from line in an "X-Envolope-from" though. Thanks, NeilBrown