Re: Tags in the headers of mail files

Subject: Re: Tags in the headers of mail files

Date: Mon, 01 Jun 2026 08:06:21 +0900

To: Stephen J Eglen, notmuch@notmuchmail.org

Cc:

From: David Bremner


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

Thread: