linagora / tmail-flutter

A multi-platform (Flutter) application for reading your emails, with your favorite devices, using the JMAP protocol!
GNU Affero General Public License v3.0
275 stars 60 forks source link

IMAP Mailbox Name Attributes for Spam folder is Junk #2894

Open jip149 opened 1 month ago

jip149 commented 1 month ago

Description

JMAP spec states that mailboxes role must be one of IMAP Mailbox Name Attributes

According to this link, the attribute name for Junk/Spam folder is Junk and not Spam.

As a consequence, the mailbox used by the server is ignored, and a Spam folder is created instead.

This can be reproduced by connecting to a Stalwart server.

chibenwa commented 1 month ago

Hi,

Thanks for spotting this: indeed on point!

As early adopters of the JMAP specification, LINAGORA used the spam role instead. We would need a smooth transition to Junk I thus believe.... In order to ease this transition, Twake Mail frontend should interprete both roles Junk and Spam the same way....

@jip149 would you like to give such a contribution a go?

chibenwa commented 1 month ago

CF https://issues.apache.org/jira/browse/JAMES-4040

jip149 commented 1 month ago

If I understand correctly: both JAMES and twake incorrectly implement the JMAP RFC. Since they are mostly used together, it works as expected for most users.

So what needs to be done:

I'm willing to spend a bit of time trying to fix tmail-flutter. I suppose jmap-dart-client needs to be fixed as well. I'll let you know if I manage to send a PR. That might take a bit of time as I need to set up the dev environment and get a hang of the codebase.

I must admit I cannot make sense of your last comment. I don't see how this is related to scaling and channel number.

chibenwa commented 1 month ago

I must admit I cannot make sense of your last comment. I don't see how this is related to scaling and channel number.

Deleted, I likely commented on the wrong PR, sorry.

chibenwa commented 2 weeks ago

Please @hoangdat do not forget to work on this. Interoperability is a must.

jip149 commented 2 days ago

Hello @chibenwa, @hoangdat,

I've started working on this. I published a PR in jmap-dart-client, however, I have not yet managed to compile TwakeMail to fully test this.

I believe it is because the flutter sdk version I have installed is too recent. Could you tell me what flutter sdk version do you use?

dab246 commented 1 day ago

Hello @chibenwa, @hoangdat,

I've started working on this. I published a PR in jmap-dart-client, however, I have not yet managed to compile TwakeMail to fully test this.

I believe it is because the flutter sdk version I have installed is too recent. Could you tell me what flutter sdk version do you use?

Currently, TwakeMail is working on flutter sdk version 3.16.0

jip149 commented 1 day ago

The #2969 PR is not needed to fix this if PR#89 for jmap-dart-client is merged, but I believe it should still use the correct role in the source code, even if jmap-dart-client does the conversion.

jip149 commented 1 day ago

Please let me know if there's something else I need to do on the matter.