thunderbird / thunderbird-android

Thunderbird for Android – Open Source Email App for Android (fka K-9 Mail)
https://thunderbird.net/mobile
Apache License 2.0
11.09k stars 2.51k forks source link

IMAP "Show only subscribed folders" doesn't work for "standard" (well-known) folders #2615

Open smithfred opened 7 years ago

smithfred commented 7 years ago

Expected behavior

Archive, Drafts Inbox, Sent, Spam and Trash should be hidden if they are unsubscribed and "Show only subscribed folders" (Account settings -> Fetching mail -> Incoming server) is set for an IMAP account.

Presumably the non-IMAP K9mail-errors folder would remain but that's a separate issue.

Actual behavior

These folders are always shown even if they are unsubscribed and "Show only subscribed folders" is set. Other unsubscribed IMAP folders are hidden correctly by this setting.

This means that those folders can only be hidden by duplicating folder management effort using K-9's (client-specific, client-side) folder class mechanism.

It also complicates subsequent IMAP folder creation, since folder class display needs to be changed to see the new folder, the new folder classed, and then folder class display changed back again.

Environment

K-9 Mail version: 5.207

Account type (IMAP, POP3, WebDAV/Exchange): IMAP

philipwhiuk commented 7 years ago

I think they're always subscribed actually. The reality is that the app needs to subscribe to the core folders for the app to work properly. What we should actually do is prevent you from thinking you can unsubscribe from them at all IMO.

smithfred commented 7 years ago

They're not always subscribed (and there's nothing special about any IMAP folder except INBOX, per RFC 3501). It's completely valid to unsubscribe from all folders, even including INBOX.

It's possible for a client to interact properly with a server and any relevant folders without them being subscribed - IMAP doesn't care if the folder is subscribed or not for relevant operations (e.g. COPY/STORE), so provided the client isn't for example checking for the existence of folders with LSUB instead of LIST (which it shouldn't), it should work fine. And I have other clients that work without issue (including e.g. moving messages to Trash when Trash is unsubscribed).

What functions would not work if K9 followed the subscriptions list equally for the above folders?

Preventing the user from thinking they can be unsubscribed from is the wrong end of the stick - this is entirely permissible per IMAP (and is server-side, so unsubscription may well have been done elsewehere).

It might be a substantial amount of work/validation, so fair enough then if it's wontfix on that basis, but this is a valid bug, and there is nothing in IMAP that prevents its resolution ;)

philipwhiuk commented 7 years ago

I mean in K-9 they're always subscribed. i.e. it's not the listing of folders that's broken but the subscription process itself.

The reason is we have always treated special folders differently.

cketti commented 7 years ago

If you don't need the special folders to actually be special you should be able to get rid of them in K-9 Mail by going to 'Account settings > Folders' and settings the various special folders to "-NONE-". Then refresh the folder list.

smithfred commented 7 years ago

I mean in K-9 they're always subscribed.

So K-9 ignores the IMAP subscription info for these and treats them internally as "subscribed" regardless you mean?

So is this just a fairly deeply entrenched architectural barrier to fixing this bug?

If you don't need the special folders to actually be special you should be able to get rid of them in K-9 Mail by going to 'Account settings > Folders' and settings the various special folders to "-NONE-". Then refresh the folder list.

Doesn't work unfortunately - all the special folders are still shown. It also wouldn't have covered Trash if I want to still be able to delete messages without having to see the folder (presumably setting Trash to -NONE- prevents deletion, or maybe not?)

deepspaceaxolotl commented 1 month ago

Any plans for this? Would be nice to be able to unsubscribe from some folders.