Closed Bug 1725911 Opened 3 years ago Closed 3 years ago

no new mail notification popup for non-inbox imap folders, when mail is detected by polling (not IDLE)

Categories

(Thunderbird :: Mail Window Front End, defect)

Thunderbird 91
Unspecified
Windows
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: bughit.github, Unassigned)

References

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36

Steps to reproduce:

  • add an gmail label which becomes an imap folder
  • in TB enable "when getting new messages, always check this folder"
  • add a gmail filter to direct certain messages to this folder ("Do this: Skip Inbox, Apply label ...)
  • mail.notification.count.inbox_only=false to have the tray icon indicate new mail
  • IDLE seems to broken for non-inbox, so minimize the mail check interval
  • have TB minimized to tray

send an email to this folder

Actual results:

when new mail is detected, the icon changes, audible alert sounds, but there's no bottom right screen corner new mail notification popup

Expected results:

new mail notification popup

Keywords: regression
OS: Unspecified → Windows
Summary: no new mail notification popup for non-inbox imap folders → TB 91 regression: no new mail notification popup for non-inbox imap folders

IDLE works for non-inbox for me (but not using that for gmail)

Blocks: tb91found
Component: Untriaged → Mail Window Front End
See Also: → 1725914

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

IDLE works for non-inbox for me (but not using that for gmail)

The focus of this bug is not IDLE, but the notification popup. Since you've tried to repro, are you getting them?

If you are then probably notification popup and IDLE are linked, because without IDLE, I am consistently not getting the notification popup.

If they are linked, disable IDLE for the account, restart and you should be able to repro.

AFAIK, the setting for "immediate notification" does not control if the pop-up is enabled or not. It only enables the use of imap IDLE to detect new mail. I've seen the pop-up with and without IDLE on non-Inbox folders. But I'm not really running official 91 but a self-built daily 92.0a1 on linux. Also, haven't tried it with TB minimized. So not sure if my comment is relevant.

I've confirmed this is linked to IDLE. If you open the folder prior to minimizing, which enables IDLE on it (per Bug 1725914), you get both immediate IDLE detection and a popup notification.

This should be easy to repro and new, can someone please try, notifications are pretty important for email.

Summary: TB 91 regression: no new mail notification popup for non-inbox imap folders → no new mail notification popup for non-inbox imap folders, when mail is detected by polling (not IDLE)

This may not be a regression, but anecdotally I've been seeing these popups in 78 more frequently than in 91 (which is never, when not intentionally trying to have IDLE enabled for the folder).

There maybe something in 78 that makes IDLE in more likely for a folder.

I see something wrong. I have a non-Inbox folder set to be checked for new mail with the timed interval set to 1m. Idle is disabled. With another tb instance I copy an unread mail to that folder. I see the STATUS check on the folder occur every minute in IMAP:5 log like it should and the server reports an increase in the number of messages but tb is ignoring it. Only after I select the folder (mouse over or click-on) is the new mail detected and reported via bold unread count and pop-up notification.

This is on linux and without the related changes I've recently proposed with bug 1708981.

Research continuing...

Edit: I actually saw the new unread account appear in bold when the folder imap STATUS is checked. Just didn't see the notification pop-up. See more in comment 7.

See Also: → 1708981

From comment 0:

Actual results:
when new mail is detected, the icon changes, audible alert sounds, but there's no bottom right screen corner new mail notification popup

I'm pretty sure by "notification popup" you are referring to something that pops up in a box and says something like this:

TB Daily Problems from Larry Finkel
Gene, I have problems with Daily. I had 

Just want to be sure. But if so, the pop-up can only occur when the folder is imap SELECTed. Otherwise all you will see is the unread count in bold as a "notification" on the folder name. Being "selected" can seem somewhat random but you are always selected when you are clicked on the folder. In that case, new mail will produce the expected popup. (Inbox is almost always imap SELECTed so only inbox will always produce a popup when new mail arrives, even if you are not clicked on Inbox.)

To ensure that the non-Inbox folder is imap SELECTed when it is checked for new mail you must set with config editor

mail.imap.use_status_for_biff = false

and restart TB. This will cause tb to do an imap SELECT when checking for new mail in non-Inbox folders that you have configured to be checked for new mail even if you are not clicked on the folder. If you really want to always see a pop-up for these non-Inbox folder, this seems to be the only way to have it occur consistently. (Imap SELECT requires a lot more network and TB activity than the default of just check imap STATUS.)

Attached image new mail

In the settings there are three optional notifications for new mail ("when new messages arrive"): alert, icon, sound. It's self evident that "when new messages arrive" all the selected notifications are supposed to occur.

But in this case only 2 out 3 do: icon and sound. That's clearly a bug.

If TB can detect new mail via STATUS and notify with an icon and sound, why wouldn't it be able to also show an alert if configured so?

It's mostly a bug in the documentation (e.g., mozillazine which is no longer maintained AFAIK). But since most users only receive new mail in Inbox it does work for them.

Have you tried setting mail.imap.use_status_for_biff = false ? This works for me.

The reason you see the icon and sound and bold unread count is because the default imap STATUS for checking for new mail only looks at the folder and sees how many total messages and unread messages are currently present and this is enough to trigger sound "You've mail" or the icon to do something or to set the unread count bold on the folder. STATUS doesn't provide anything specific about the new mail that goes into the pop-up alert like email subject. All the STATUS response can do is set the folder to be "auto-synced" when an imap SELECT occurs for the folder to fetch new headers (containing the alert info like subject) and, if enabled, mail bodies to be stored locally. And since imap SELECT occur when you click the folder, you may not always see a pop-up until you click the non-Inbox folder.

But the "use_status_for_biff" set false forces a SELECT on each non-Inbox folder marked to be checked for new mail on every timed (biff) interval so you should see the alert.

Also, I might add that I only (try to) maintain the imap code and had zero involvement in its design and I've had no contact with the original developers. Anything I know about this is based on reading the mostly poorly documented code and reading bug reports and enhancement requests.

Have you tried setting mail.imap.use_status_for_biff = false

thanks, not yet, if it doesn't work I'll file a new one

STATUS doesn't provide anything specific about the new mail that goes into the pop-up alert like email subject.

Does IDLE? If so the ideal solution to these non-inbox folder issues is Bug 1726379 (per folder setting to enable IDLE).

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID

Does IDLE? If so the ideal solution to these non-inbox folder issues is Bug 1726379 (per folder setting to enable IDLE).

IDLE itself only says "you have a change in the number of messages" but it occurs on already SELECTed folders only so the pop-up occurs.
Yes, doing something like Bug 1726379 would be nice. A few years ago I tried to do that but ran into a bunch of problems and gave up. I still have the WIP somewhere so I might be tempted to look at it again.

mail.imap.use_status_for_biff=false is working

Until non-inbox IDLE is implemented, proper notification for non-inbox folders requires two obscure, arcane prefs:

mail.imap.use_status_for_biff=false to get popup alerts
mail.notification.count.inbox_only=false to get the tray icon indicator

The user can't be expected to discover or understand them, so it should be up to TB to set them when appropriate.

As it happens the need for these prefs can be inferred from user surfaced settings.

The main cue is the presence of any imap folder set to check_for_new. When the user checks that, they are signaling their desire for all enabled notifications (alert, icon, sound) for new mail in this folder.

so something like this

if (user enables "always check this folder") AND (when_new::show_alert is enabled)
   OR 
   (user enables when_new::show_alert) AND (has any folder with "always check this folder")
then
  set mail.imap.use_status_for_biff = false

if (user enables "always check this folder") AND (when_new::show_tray_icon is enabled)
   OR 
   (user enables when_new::show_tray_icon) AND (has any folder with "always check this folder")
then
  set mail.notification.count.inbox_only = false
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: