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

Auto detect IMAP special folders when configuring account #1022

Merged
merged 5 commits into from
May 27, 2024

Conversation

Yannick243
Copy link
Member

PR

After #625, cypht was unable to auto detect IMAP special folders (Trash/Sent/Drafts) even though they exist on the server.
Based on "RFC 6154: IMAP LIST Extension for Special-Use Mailboxes"

Related issue:

#817

@Yannick243 Yannick243 changed the title Update nux_server_id in allowed output when configuring account Auto detect IMAP special folders when configuring account May 14, 2024
@marclaporte
Copy link
Member

After #625, cypht was unable

I don't remember ever seeing this work before. #625 arrived in Cypht 2.0.0

Can you confirm if this works OK in Cypht 1.4.x?

Thanks!

@Yannick243
Copy link
Member Author

The feature was introduced here: #586
After testing on version 1.4.x, it appears that it was working partially (on some folders).

With this adjustment to 2.0.0, it is working with all folders when using the configuration form below.
CleanShot 2024-05-14 at 20 52 11@2x
As we can see the folders are automatically detected:
CleanShot 2024-05-14 at 20 53 08@2x

For now, the remaining part that is not working is when using the advanced configuration form below:
https://imgur.com/a/HW4yFZZ

@marclaporte
Copy link
Member

Ok, but is it working because we are matching folder names or via "RFC 6154: IMAP LIST Extension for Special-Use Mailboxes"?

@marclaporte
Copy link
Member

@josaphatim any wisdom?

@josaphatim
Copy link
Member

josaphatim commented May 15, 2024

Ok, but is it working because we are matching folder names or via "RFC 6154: IMAP LIST Extension for Special-Use Mailboxes"?

@josaphatim any wisdom?

RFC 6154 says that: This extension adds new optional mailbox attributes that a server may include in IMAP LIST command responses to identify special-use mailboxes to the client. This being said, special-use mailboxes will not always be present for all providers and some will only provide a few special-use mailboxes.
However the feature was working fine before #625 was merged.

@marclaporte
Copy link
Member

Ok. So @Yannick243: please make sure to leverage RFC 6154 and not just folder names.

@Yannick243
Copy link
Member Author

Hello @josaphatim, @marclaporte
The code below that we have in Cypht takes advantage of RFC 6154.
With the command LIST (SPECIAL-USE) "" "*", we request mailboxes along with their special-use attributes and later filter them with their corresponding folders (if they exist). Are you okay with this so I can proceed to the next step ?

CleanShot 2024-05-16 at 15 15 25@2x

@marclaporte
Copy link
Member

Sounds good to me. @josaphatim?

@josaphatim
Copy link
Member

@Yannick243 why this still in draft ?

@Yannick243
Copy link
Member Author

This is not working when using the new advanced configuration form #855.
That's what I am fixing.

@Yannick243 Yannick243 force-pushed the imap-special-folder branch from b211784 to d8695d7 Compare May 21, 2024 14:34
@Yannick243 Yannick243 marked this pull request as ready for review May 21, 2024 14:35
@Yannick243
Copy link
Member Author

The PR is ready for a review.

@marclaporte marclaporte requested a review from josaphatim May 21, 2024 15:02
modules/core/site.js Outdated Show resolved Hide resolved
modules/core/handler_modules.php Outdated Show resolved Hide resolved
modules/core/site.js Outdated Show resolved Hide resolved
modules/imap_folders/modules.php Outdated Show resolved Hide resolved
modules/nux/site.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants