Closed Bug 1671748 Opened 1 month ago Closed 1 month ago

Show only STORAGE, MESSAGE and MAIlBOX quota thresholds exceeded indications on main window status panel

Categories

(Thunderbird :: Mail Window Front End, defect)

defect

Tracking

(thunderbird_esr78+ affected, thunderbird83 affected)

RESOLVED FIXED
84 Branch
Tracking Status
thunderbird_esr78 + affected
thunderbird83 --- affected

People

(Reporter: gds, Assigned: gds)

References

Details

Attachments

(1 file, 2 obsolete files)

+++ This bug was initially created as a clone of Bug #1667141 +++

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0

It seems that some IMAP providers (T-Online, Telekon) report unusual quota items like LEVEL that are very small and the limit is easily reached. This causes a continuous display on the main screen of a bargraph showing that the quota has been reached. It cannot be cleared without setting the "threshold" with config editor to 101% which prevents any exceeded quota threshold from appearing on the main screen. (Of course, it it still present and readable in the folder properties quota screen.)

The attachment show a possible simple patch that checks for the main screen only the standard/canonical quota items STORAGE, MESSAGE and MAILBOX and does not check others like LEVEL. Non-standard items like LEVEL will still appear on the folder properties quota screen.

Flags: needinfo?(mkmelin+mozilla)
Summary: T-Online IMAP Quota → Show only STORAGE, MESSAGE and MAIlBOX quota thresholds exceeded indications on main window status panel
Attachment #9182163 - Attachment is patch: true
Attachment #9182163 - Attachment mime type: application/octet-stream → text/plain
Attachment #9182163 - Flags: feedback?(mkmelin+mozilla)

The MAILBOX quota apparently refers to the number of folders. Shouldn't we take these out too?

(In reply to Alfred Peters from comment #1)

The MAILBOX quota apparently refers to the number of folders. Shouldn't we take these out too?

In my opionion, we should do this. The quota warning should be based on the "filling" with messages, which is the size ("STORAGE") and number ("MESSAGE").

For all other quota limitations we should implement an additional separate information / warning.

Comment on attachment 9182163 [details] [diff] [review]
Possible patch to exclude LEVEL quota exceeed indication from main window.

Review of attachment 9182163 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/base/content/commandglue.js
@@ +151,5 @@
> +  // status panel while still showing them on the folder properties quota page.  
> +  folderQuota = folderQuota.filter(quota =>
> +                  quota.name.toUpperCase().startsWith("STORAGE") ||
> +                  quota.name.toUpperCase().startsWith("MESSAGE") ||
> +                  quota.name.toUpperCase().startsWith("MAILBOX"); 

Seems to me missing a parenthesis?
But maybe storage is the only one we want?
Attachment #9182163 - Flags: feedback?(mkmelin+mozilla)

Maybe we want also "message", because some Providers do count.

T-online:
"Es gibt eine Beschränkung für die maximale Anzahl an E-Mails pro Postfach, diese beträgt bei Mail & Cloud S 62000. Ab Mail & Cloud M beträgt die maximale Anzahl an E-Mails pro Postfach 93000."

Attachment 9177668 [details] shows a good example. I guess it's OK to include just STORAGE and MESSAGE and leave off anything else. MAILBOX has a pretty low limit too of only 31 in this example. But I expect if the user reaches that limit they will get an alert from the server that it is unable to create the desired folder. Same with trying to create more than 3 levels of folders, so these don't really need the panel bar-graph showing up.

Without the panel bar-graph lighting up there may be no other indication you have reached the STORAGE and MESSAGE limit unless the provider (Telekom or whoever) sends you a message of some sort.

(In reply to Magnus Melin [:mkmelin] from comment #3)

Seems to me missing a parenthesis?

Probably is. I just found this JS stuff and never used it before. Haven't even tried to run it yet.

But maybe storage is the only one we want?

I vote for STORAGE and MESSAGE. But you're the boss and I'll do what you think is best.

STORAGE and MESSAGE seems fine.

let folderQuota = folder.getQuota().filter(quota =>
quota.name.toUpperCase().startsWith("STORAGE") ||
quota.name.toUpperCase().startsWith("MESSAGE"));

Flags: needinfo?(mkmelin+mozilla)

Had to use includes() instead of startsWith() since the resource name typically starts with the quotaroot name, e.g., "User Quota" while the full resource name would be "User Quota / MESSAGE".

I tested this with my local Dovecot server and created a fake "LEVEL" quota with above threshold usage and it doesn't trigger a main window bar-graph alert. Tested that only MESSAGE and STORAGE do trigger the alert when threshold is reached.

Assignee: nobody → gds
Attachment #9182163 - Attachment is obsolete: true
Attachment #9182252 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9182252 [details] [diff] [review]
Bug1671748-check-only-STORAGE-and-MESSAGE-quota.patch

Review of attachment 9182252 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. I think it would be good to add that example name, i.e. a code comment
// Quota name is typically something like "User Quota / MESSAGE".
Attachment #9182252 - Flags: review?(mkmelin+mozilla) → review+
Attachment #9182252 - Attachment is obsolete: true
Attachment #9182477 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9182477 [details] [diff] [review]
Bug1671748-check-only-STORAGE-and-MESSAGE-quota-v2.patch

Review of attachment 9182477 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #9182477 - Flags: review?(mkmelin+mozilla) → review+
Status: NEW → ASSIGNED
Target Milestone: --- → 84 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/bae6e0d9225a
Check only STORAGE and MESSAGE for imap quota threshold met. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED

esr78 uplift?

Yes but it should go to beta (next Tuesday) first.

You need to log in before you can comment on or make changes to this bug.