X-Envelope-From: notmuch-bounces@notmuchmail.org  Sun May 31 23:06:31 2026
Return-Path: <notmuch-bounces@notmuchmail.org>
X-Original-To: nmbug@yantan.tethera.net
Delivered-To: nmbug@yantan.tethera.net
Received: from yantan.tethera.net (localhost [127.0.0.1])
	by mail.notmuchmail.org (Postfix) with ESMTP id AD12C5DFAE;
	Sun, 31 May 2026 23:06:31 +0000 (UTC)
Received: from phubs.tethera.net (phubs.tethera.net [IPv6:2607:5300:60:3a9d::1])
	by mail.notmuchmail.org (Postfix) with ESMTPS id E2B105DF37
	for <notmuch@notmuchmail.org>; Sun, 31 May 2026 23:06:27 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tethera.net;
 i=@tethera.net; q=dns/txt; s=2024; t=1780268785; h=from : to : subject
 : in-reply-to : references : date : message-id : mime-version :
 content-type : from; bh=cRD7QlFl11tLltrUXSCz06CI2UdCfKrPpWW6PtQrgNo=;
 b=R2lD/9iCUlv9bNphGU3Ty8yvo6SlNctgPwDReAvExQLrsX+cCLnzLbUGTFxadB6aGqRTb
 cTS7oSdVpQ2jkSY63wbVoodPJft+Esa12JYcDT2hTZAisBQ1Nyor6hzukDGNcBaBLFInlvx
 VWVg7GegIXQJZicoOBNszu/7lsjz3HKU11iaoqREX7bxv5MsSfU5BhSj9Jf/JRaUopLVHBX
 nik1Iyyje9fsfkPOzrQsLxgwbJYxAQ/54/YV6Oy859Y1UFt5jYqx+NoJq8gdHZ8NeVfWJrz
 lVGpJOvZfuCCKd5DzPgH9rUVKK/4WYDdGuOmBm4HHW8gp3kkJLnIGGMcdjQg==
Received: from tethera.net (unknown [IPv6:2001:268:c0ce:4fac:f89a:7804:5219:2])
	by phubs.tethera.net (Postfix) with ESMTPS id 684921800F7;
	Sun, 31 May 2026 20:06:24 -0300 (ADT)
Received: (nullmailer pid 2933157 invoked by uid 1000);
	Sun, 31 May 2026 23:06:21 -0000
From: David Bremner <david@tethera.net>
To: Stephen J Eglen <sje30@cam.ac.uk>, notmuch@notmuchmail.org
Subject: Re: Tags in the headers of mail files
In-Reply-To: <m1mrxf8mkt.fsf@sje30.cam>
References: <m1mrxf8mkt.fsf@sje30.cam>
Date: Mon, 01 Jun 2026 08:06:21 +0900
Message-ID: <87pl2bxjpu.fsf@tethera.net>
MIME-Version: 1.0
Message-ID-Hash: Y4RZVASBE5HSYWTZOBJ6GJIJRQCVATRV
X-Message-ID-Hash: Y4RZVASBE5HSYWTZOBJ6GJIJRQCVATRV
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
X-Mailman-Version: 3.3.3
Precedence: list
List-Id: "Use and development of the notmuch mail system." <notmuch.notmuchmail.org>
List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
List-Owner: <mailto:notmuch-owner@notmuchmail.org>
List-Post: <mailto:notmuch@notmuchmail.org>
List-Subscribe: <mailto:notmuch-join@notmuchmail.org>
List-Unsubscribe: <mailto:notmuch-leave@notmuchmail.org>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

Stephen J Eglen <sje30@cam.ac.uk> writes:

> Hi,
>
> I have a few old mail files (from my time with other mailers), where the tags are saved in the mail headers like "X-Labels: tag1".
>
> Does anyone here routinely deal (read/write) tags in mail headers?  I'm aware that the notmuch philosophy is treat the incoming mail as immutable.  However, from my point of view having tags in the mail headers would mean:
>
> (a)  the state is in the file, not the notmuch db.
>
> (b) I could trim down some of the crazily longer headers that microsoft outlook generates.
>
> Just asking on here in case anyone has done the above, not asking for any change to notmuch (which is awesome, thank you).

I have not done the above; I vaguely remember someone doing that
(perhaps with offline-imap) many years ago. Somewhat tangentially, the
new git-remote-notmuch code makes sidecar files for tags, which would be
another approach to consider. Basically the tags are in
_notmuch_metadata/xx/yy/message-id/tags.  I hope to extend that to other
parts of notmuch; it seems like a reasonable format for dump / restore,
for example. I don't know about the performance impact, but it might be
reasonable to augment / replace maildir syncing with
syncing-to-sidecars.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org
