From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 gFueEuqaC2ITfgAAgWs5BA (envelope-from ) for ; Tue, 15 Feb 2022 13:22:02 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SChED+qaC2JvKQAAauVa8A (envelope-from ) for ; Tue, 15 Feb 2022 13:22:02 +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 245842CCBB for ; Tue, 15 Feb 2022 13:22:01 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 224C05F6E8; Tue, 15 Feb 2022 12:21:58 +0000 (UTC) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by mail.notmuchmail.org (Postfix) with ESMTPS id 90E075F3FE for ; Mon, 14 Feb 2022 22:24:05 +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-out2.suse.de (Postfix) with ESMTPS id 4BC371F38A; Mon, 14 Feb 2022 22:24:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1644877444; h=from:from:reply-to: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; bh=6gR7VWInsR+pkb0XTiHAzvT7uorBJM+Gw1yOpyR6gBo=; b=1JwpFnjjXMKxITO5KCAX7wteJdjL5fGC3yUEf9DvfcALR3n8w3D6e8Wh5f2Z/oxneH5VBU BblME0e9YXEEmZuG7VA69IJmAnFlHjbnqtnvavWvXmOoUeKhZ4PdGREC2nreFTXdCw7Q3l j9PIPN8tAS2PmhNG8ucFUSA9FRGDv2Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1644877444; h=from:from:reply-to: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; bh=6gR7VWInsR+pkb0XTiHAzvT7uorBJM+Gw1yOpyR6gBo=; b=9h9SzLNbY90UHFaAjhL5RPyya0ZjMs1WqsX4kKMDd/iU44iSteSq1vUL1uic9Mm/wlTGYJ CD+afAuxgN3qtUBw== 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 609DC13BCC; Mon, 14 Feb 2022 22:24:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id hEqsBYPWCmJgFwAAMHmgww (envelope-from ); Mon, 14 Feb 2022 22:24:03 +0000 MIME-Version: 1.0 From: "NeilBrown" To: "David Bremner" Subject: Re: WIP: filter out envelope headers in notmuch-insert. In-reply-to: <87h791wvdh.fsf@tethera.net> References: <20220212025503.1690413-1-david@tethera.net>, <164481580222.17471.7090984749734305531@noble.neil.brown.name>, <87h791wvdh.fsf@tethera.net> Date: Tue, 15 Feb 2022 09:23:59 +1100 Message-id: <164487743989.17471.15302582357377741383@noble.neil.brown.name> X-MailFrom: neilb@suse.de X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0 Message-ID-Hash: Y4XBYYBCHHE6ZCPV4GRZHXCOTIIV5LMW X-Message-ID-Hash: Y4XBYYBCHHE6ZCPV4GRZHXCOTIIV5LMW X-Mailman-Approved-At: Tue, 15 Feb 2022 12:21:56 +0000 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=1644927722; 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:dkim-signature; bh=Agn0GZjJTuFbIdV7SKZAgvq3Sd0hGCMYj3bPnmUIoG0=; b=rrNukjeAJG0FPAYFjnjoJxu9lkR1sUGdMep/VYZeeI5WldZyA2gcbv7X5CfGA0eY2Far8U awymFxpBwkeXQ2aABpRrJwad83LENwsPJHYQtTpAxOWtEn/XJodEa7iFkRiZuIYSJHCOih il0Ew/2BrlViSnGNrKby/3PybrTpQE1bMXfDePia23w9QFQBOb1gjZbjVMBOQCaMoH6BHE pRgMtgxFfI0VFEEQoIryy4hN7EJPn5Gmx1pipllxcLlVUHmzTALVRxaVKlKox9iHBGEnaX CfPvpe4USZAZ0q4R+WCTTI7OTXXB1O2MrG5DMN+P+txlvjJYZs9EDCuDuCpriQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644927722; a=rsa-sha256; cv=none; b=mGzkGPBbtGvpuXgs9UIRnnsShelsssICVlZhZBdbs58vL0ZS/qW2qeNHVhgOZbxelm3/PT DSEF6EhdBVrqL+ukRFBc3OBqP8B7VR6qMiUs5uszxWOePzWUK+a0mxVLtHjwB0OHr74E/C t+P5uGkMUjjBESsoquPAF1kPQkyPkywCDkuJIfA/eyGsuevZ/8WS1JI6Hcj+4+LosXuO7T T9VBG5Qt2c/aKFTOH7vThHmTgcXvnQv5n4d8s5Db1++znHU6JYhxUZ5rOpCn4YEB13260t H6H+T4OncnfBE8lYWuf2r6IbUga4tbuffW3M/wLLMi3HBswVL77qP9vnMFNW6Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=suse.de header.s=susede2_rsa header.b=1JwpFnjj; dkim=fail ("body hash did not verify") header.d=suse.de header.s=susede2_ed25519 header.b=9h9SzLNb; dmarc=fail reason="SPF not aligned (relaxed)" header.from=suse.de (policy=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: -1.34 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=suse.de header.s=susede2_rsa header.b=1JwpFnjj; dkim=fail ("body hash did not verify") header.d=suse.de header.s=susede2_ed25519 header.b=9h9SzLNb; dmarc=fail reason="SPF not aligned (relaxed)" header.from=suse.de (policy=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: 245842CCBB X-Spam-Score: -1.34 X-Migadu-Scanner: scn1.migadu.com X-TUID: yBvqNfDNaKtx On Mon, 14 Feb 2022, David Bremner wrote: > "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. That one small change is probably defensible - though I would probably prefer that such messages were either completely rejected or completely supported. Your broader discussion in the sequence of emails seemed to suggest you were considering a lot more than that - sorry if I misunderstood. > > > 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. 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 don't suppose there is some config option to postfix to tell it to provide an RFC-2822 email message, not an mbox ??? Thanks, NeilBrown