Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tagging #25

Closed
8 tasks done
Quix0r opened this issue Sep 1, 2016 · 12 comments
Closed
8 tasks done

Tagging #25

Quix0r opened this issue Sep 1, 2016 · 12 comments

Comments

@Quix0r
Copy link

Quix0r commented Sep 1, 2016

Tagging messages as known from Thunderbird and many other mailer should be implemented. This allows easier handling of your messages. The user should be able to create additional "labels" or "tags" such as (but not limited).

Todo (must)

  • Read tags from IMAP and store them into our database Add tagging to messages #4665
  • Switch $important imap label to a $label1 tag just like Thunderbird -> interoperability Add tagging to messages #4665
  • Add a one-time async background job that migrates old IMAP data from $important to $label1 on IMAP (changes will automagically flow into our cache at the next sync)
  • Add a one-time async background job that pushes the local flag_important to IMAP (as $label1) for those server that support it, but also populate the tags table for all others
  • Handle reading a new message with no $label1 on IMAP but a local label in the database -> this happens when permflags are not supported but the account was known before
  • Show tags in envelope list and message details #4805 Display tags in the UI (assigned through Thunderbird)
  • Add UI to assign tags #4807 Allow user to assign default and custom tags
  • Tag management UI #4806 Let the user configure additional tags (with label + color)

Todo (optionall follow-up, should possibly become a ticket when this one is closed)

  • Add quick filtering for tags
@ChristophWurst
Copy link
Member

do you know how that works on an IMAP level? Does the protocol support that?

@Quix0r
Copy link
Author

Quix0r commented Sep 5, 2016

I guess it cannot be done on server-side, maybe you can simulate it with some X-NextCloud-Tags: bla, foo, bar or so.

@juliusknorr
Copy link
Member

juliusknorr commented Sep 6, 2016

It is standardized within IMAP: PERMANENTFLAGS in http://www.ietf.org/rfc/rfc3501.txt

This is also used by thunderbird for tagging:
http://kb.mozillazine.org/Tags#IMAP

@ChristophWurst
Copy link
Member

Hey there,

I'd just like to let you know that due to the ongoing issue with Bountysource we're discussing ways to move to a different platform. As it looks right now, Bountysource might claim some of the money that was contributed by the community. We will try our best to prevent that. Historically we – the Nextcloud GmbH employees – simply put the claimed bounties back to other tickets until one was solved by a community member. So the money was always from the community and for the community. We'll therefore move to a better platform and currently don't post any new bounties until this situation is resolved. The current goal is to move/donate the money to Nextcloud include but details will follow in the forum post.

Hope this makes sense. If you have any questions please ask them on the forum. This comment will be copy-pasted to all open issues with bounties.

Christoph and the Mail team

@ChristophWurst ChristophWurst changed the title Tagging messages [$15] Tagging messages Jun 24, 2020
@ChristophWurst
Copy link
Member

We decided that for the first basic version we'll store the flags primarily in Nextcloud's message cache, later on we will try to store them on IMAP additionally if IMAP support it.

@miaulalala
Copy link
Contributor

A few thoughts:

  • The sync for newly flagged messages works ( Save important flag to IMAP if permflags enabled #4593 )
  • There needs to be a new background migration job that syncs existing ìmportant flags before resetting the cache. To consider: looping over each mailbox and each message can be resource intensive, especially if a user has many mailboxes and/or many messages
  • how will we handle servers that don't support permflags? The important flags should, if possible, not be lost when resetting the cache. Caching via flat file, or a table?

@miaulalala
Copy link
Contributor

miaulalala commented Mar 4, 2021

Some more thoughts:

  • cross compatibility with other mail clients like Thunderbird, Outlook, Gmail, Rainloop, Roundcube, etc...
  • keywords as mapped values with a new table (per user basis)
    • oc_mail_tags: id, user_id, imap_keyword, display_name, color
    • this tag table could store the $important flags when migrating and resetting the cache, solving the issue of IMAP servers that don't support $PERFFLAGS
  • table oc_mail_message_tags: id, imap_message_id, tag_id
  • tags with colour options
  • some predefined labels like Thunderbird on first login, but they should be customisable

@miaulalala
Copy link
Contributor

Possibly add the $important back to the tables (mail_message, mail_message_tags) with an optional repair step after migration for those servers that don't support IMAP PERMANENTFLAGS

@miaulalala
Copy link
Contributor

Interesting to know for the colour options - Thunderbird assumes a priority ranking from 1 to 5 - so the BG colour is always chosen by highest priority

@ChristophWurst
Copy link
Member

Info for later: #25 adds the most crucial parts. We now read all tags from IMAP and store them int our DB. $important was replaced by $label1 for compatibility with Thunerbird. Five default tags are created for every user, they are not editable right now.

I've added some todo to the original request description above.

@ChristophWurst
Copy link
Member

Handle reading a new message with no $label1 on IMAP but a local label in the database -> this happens when permflags are not supported but the account was known before

@miaulalala loooks like we forgot one tiny task ;)

@ChristophWurst
Copy link
Member

@GretaD @miaulalala you did it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants