~sircmpwn/aerc

6 2

Re: How to handle labels?

Axel Dahlberg
Details
Message ID
<C9GWWMQSFAX8.J9B6OJ2XKRX5@l390>
DKIM signature
pass
Download raw message
Thanks for your reply Simon!

I'm wondering if there is some way to use a index-format-hook
(http://www.mutt.org/doc/manual/#index-format-hook) that can indicate if an
email exists in certain folder, i.e. indicating it has a certain label.

Re: How to handle labels?

Details
Message ID
<122A2021-0082-4183-99B9-F40A8EEAB55A@labrat.space>
In-Reply-To
<C9GWWMQSFAX8.J9B6OJ2XKRX5@l390> (view parent)
DKIM signature
pass
Download raw message
What you call labels (gmail / protonmail sticky notes) and what emersion calls
labels (single letter thingies no one really uses) are very unrelated concepts.

imap simply doesn't have a similar feature as of yet as the two providers give you
with a non imap protocol.
IIRC jmap has something like that.

Aerc only talks imap so we don't have what you would like to use.

A workaround is using notmuch, there you can do things with labels / tags (sticky note version)

Re: How to handle labels?

Details
Message ID
<OzzoALuxiz12vGgkqKrSEdVXtUcoruzaNVQgMw_L0u3MxUufpmMYIy7trMiuX25hERinu6buoI_tfi9UkBmWDkSui8OUVLURJbOGE4aPc5w=@emersion.fr>
In-Reply-To
<122A2021-0082-4183-99B9-F40A8EEAB55A@labrat.space> (view parent)
DKIM signature
pass
Download raw message
On Tuesday, February 23rd, 2021 at 2:02 PM, Reto <reto@labrat.space> wrote:

> What you call labels (gmail / protonmail sticky notes) and what emersion calls
> labels (single letter thingies no one really uses) are very unrelated concepts.

IMAP flags aren't single-letter. They're just not well-supported by
email clients. IIRC Thunderbird just uses an opaque identifier like
Thunderbird42 for its flags, and has a local table of flags → labels.

> imap simply doesn't have a similar feature as of yet as the two providers give you
> with a non imap protocol.

Well. IMAP has flags. They have some restrictions, but should work just
like GMail/ProtonMail labels.

Re: How to handle labels?

Details
Message ID
<4EF100F5-371F-4BF0-B949-2D836C5B6279@labrat.space>
In-Reply-To
<OzzoALuxiz12vGgkqKrSEdVXtUcoruzaNVQgMw_L0u3MxUufpmMYIy7trMiuX25hERinu6buoI_tfi9UkBmWDkSui8OUVLURJbOGE4aPc5w=@emersion.fr> (view parent)
DKIM signature
pass
Download raw message
On 23 February 2021 14:06:57 CET, Simon Ser <contact@emersion.fr> wrote:
>IMAP flags aren't single-letter. They're just not well-supported by
>email clients.

>flag-keyword    = atom
>atom            = 1*ATOM-CHAR

ehm, am I *that* bad at reading RFCs?
1*char is a single letter yes?

Sure you can have a local mapping, however there's no (official) way to transfer the mappings, nor general client support for doing that.

In other words it doesn't work at all like you'd expect.

The whole point of labels as gmail does it,is that you can invent your own and sync them everywhere.
Also you can have a lot of labels while the address space of imap is restricted to the few letters available.


>Well. IMAP has flags. They have some restrictions, but should work just
>like GMail/ProtonMail labels.

See restrictions above.

Mind you I don't want to argue for the sake of arguing, if imap can in fact do that then I really need to change my setup.

So far I could not find a way and neither did the people who's blog post / email threads I could find.

Re: How to handle labels?

Details
Message ID
<911FBDD9-3A9D-4B45-A443-F6578A707181@labrat.space>
In-Reply-To
<4EF100F5-371F-4BF0-B949-2D836C5B6279@labrat.space> (view parent)
DKIM signature
pass
Download raw message
ah, thi gs like this confuse(ed) me:

IMAP keywords
All the non-standard message flags are called keywords in IMAP. Some clients use these automatically for marking spam (eg. $Junk, $NonJunk, $Spam, $NonSpam keywords). Thunderbird uses labels which map to keywords $Label1, $Label2, etc.

Dovecot stores keywords in the maildir filename's flags field using letters a..z. This means that only 26 keywords are possible to store in the maildir. If more are used, they're still stored in Dovecot's index files. The mapping from single letters to keyword names is stored in dovecot-keywords file. The file is in format:


0 $Junk
1 $NonJunk
0 means letter 'a' in the maildir filename, 1 means 'b' and so on. The file doesn't need to be locked for reading, but when writing dovecot-uidlist file must be locked. The file must not be directly modified, it can only be replaced with rename() call.

For example, a file named


1234567890.M20046P2137.mailserver,S=4542,W=4642:2,Sb
would be flagged as $NonJunk with the above keywords.

But that looks like a maildir limitation then, not imap

Re: How to handle labels?

Details
Message ID
<SN4ntnxmYLij5Dy2LWb-vV77_RoLDQTNUGI7ScnJbhywyQVzsu5L8D5KqxBfwGNGt-Ia-SzJFzP1soiKimIH4_vmmDD7Sv5j9t64qXASGfk=@emersion.fr>
In-Reply-To
<4EF100F5-371F-4BF0-B949-2D836C5B6279@labrat.space> (view parent)
DKIM signature
pass
Download raw message
On Tuesday, February 23rd, 2021 at 2:31 PM, Reto <reto@labrat.space> wrote:

> On 23 February 2021 14:06:57 CET, Simon Ser <contact@emersion.fr> wrote:
> >IMAP flags aren't single-letter. They're just not well-supported by
> >email clients.
>
> >flag-keyword    = atom
> >atom            = 1*ATOM-CHAR
>
> ehm, am I *that* bad at reading RFCs?
> 1*char is a single letter yes?

No, it's 1 letter at least, but can be more (because of the asterix character).

> Sure you can have a local mapping, however there's no (official) way to
> transfer the mappings, nor general client support for doing that.

Yes. I don't think a local mapping is a good idea, I was just pointing out
the Thunderbird uses IMAP flags, but uses them badly.

> In other words it doesn't work at all like you'd expect.
>
> The whole point of labels as gmail does it,is that you can invent your own
> and sync them everywhere.
> Also you can have a lot of labels while the address space of imap is
> restricted to the few letters available.

Yeah. You can do the same with IMAP, as long as the names only contain
atom characters, and don't start with "\". So there are restrictions,
but not as but as you've described.

> >Well. IMAP has flags. They have some restrictions, but should work just
> >like GMail/ProtonMail labels.
>
> See restrictions above.
>
> Mind you I don't want to argue for the sake of arguing, if imap can in fact
> do that then I really need to change my setup.
>
> So far I could not find a way and neither did the people who's blog post /
> email threads I could find.

Yeah, IMAP flags are an under-known, misused and under-used feature. I'm not
sure what the reasons are.

FWIW, hydroxide will translate ProtonMail labels into IMAP flags. Dovecot
should be able to handle arbitrary IMAP flags as well.

Re: How to handle labels?

Details
Message ID
<ix7tGDemmGhiier7Osdr2jOdq3qWmVoS_XtrcXQGfeN6za_VQypWuedeSc44LgaFlvUy6wQI9UZb81RT8HqMH6ZjSmRZ2PpXt-yxdyOuwCE=@emersion.fr>
In-Reply-To
<911FBDD9-3A9D-4B45-A443-F6578A707181@labrat.space> (view parent)
DKIM signature
pass
Download raw message
On Tuesday, February 23rd, 2021 at 2:49 PM, Reto <reto@labrat.space> wrote:

> IMAP keywords
> All the non-standard message flags are called keywords in IMAP. Some clients use these automatically for marking spam (eg. $Junk, $NonJunk, $Spam, $NonSpam keywords). Thunderbird uses labels which map to keywords $Label1, $Label2, etc.
>
> Dovecot stores keywords in the maildir filename's flags field using letters a..z. This means that only 26 keywords are possible to store in the maildir. If more are used, they're still stored in Dovecot's index files. The mapping from single letters to keyword names is stored in dovecot-keywords file. The file is in format:
>
> 0 $Junk
> 1 $NonJunk
> 0 means letter 'a' in the maildir filename, 1 means 'b' and so on. The file doesn't need to be locked for reading, but when writing dovecot-uidlist file must be locked. The file must not be directly modified, it can only be replaced with rename() call.
>
> For example, a file named
>
> 1234567890.M20046P2137.mailserver,S=4542,W=4642:2,Sb
> would be flagged as $NonJunk with the above keywords.
>
> But that looks like a maildir limitation then, not imap

As I understand it:

- If there are less than 26 user-defined labels, these are stored as an index
  in the message's filename in the maildir. There is a mapping file to get back
  the label full name from the index.
- If there are more than 26 labels, then they aren't stored in the message's
  filename, they are stored in Dovecot's index instead.
- Bare maildir per-se doesn't really support user-defined labels. These are
  just Dovecot extensions to make IMAP labels work with maildir.
Reply to thread Export thread (mbox)