Assigning multiple labels (X-Label) to a message
David Champion
dgc at c13.us
Thu Dec 17 00:36:40 UTC 2020
Sorry for top-posting, the quoted stuff below is relevant but I don't want
to respond point by point.
As Kevin mentioned, I have some patches that work to resolve this
stuff. They're up to date as of Mutt 2.0, and I hope to work on merging
over the next few weeks (winter break in the US).
A quick summary of status and expectation:
* Mutt was the first mailer to support "tagging" that I know of, with
X-Label. That's why it's nonstandard: there were no standards at the
time. X-label is supported in all mutt backends. (There's a reason
that gmail calls them "labels" and not "tags" or "keywords"....)
* Upcoming code supports X-Label, X-Keywords, X-Mozilla-Keys, and
Keywords.
* Mutt will read keywords from any of these and, by default, write them
back to the same header they originated from. If you prefer, you can
tell mutt to merge them all to Keywords (the official RFC-compliant
way to do it now).
* The new code will permit X-Label keyword splitting on space or comma,
your choice, because the "correct" value is unspecified. The other
headers _do_ specify their separator.
* There will be virtual keyword support by means of a label-hook. These
keywords are generated in runtime based on other message properties
(e.g. List-Id, Subject, From) and are not saved to message headers.
Label-hook virtual keywords correspond closely to labels created by
gmail filters.
* Both IMAP and local folders are supported, but we're still doing it
through header analysis, not protocol-level keyword handling. There's
room for improvement here but I'm not taking it on right now.
* On 16 Dec 2020, Kurt Hackenberg wrote:
> On 2020-12-16 13:05, Kevin J. McCarthy wrote:
>
> > Mutt's label handling is pretty basic right now. It expects only a
> > single X-Label header in the email. When editing the label, Mutt only
> > knows how to write a single X-Label header back.
> ...
> > The label completion has some code to delimit by ":" or ",". However,
> > internally Mutt doesn't understand the multiple values, making the
> > completion less then useful.
>
> Some mail programs use X-Keywords, which I think can have multiple keywords
> separated by whitespace. Pine and Dovecot use that header, that I know of.
> My knowledge is fragmentary, and these headers are non-standard, so not well
> defined.
>
> I don't know of anything other than Mutt that uses X-Label, but I don't know
> much.
>
> One possibility would be to keep X-Label, add X-Keywords, and make the first
> value from X-Keywords be the only value of X-Label. That would attempt to
> maximize compatibility with other software.
>
> How does Mutt handle this through IMAP? The protocol knows about keywords.
> Dovecot, using maildir, can store multiple keywords as metadata, outside the
> message file contents. That's a non-standard extension of maildir, though.
>
> What about when Mutt handles maildir directly? Still X-Label in the message?
More information about the Mutt-users
mailing list