Unread messages count not updated in folders when receiving new e-mail involving server-side filters
Categories
(MailNews Core :: Networking: IMAP, defect)
Tracking
(Not tracked)
People
(Reporter: erik.dercole, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
application/octet-stream
|
Details |
Comment 2•7 years ago
|
||
Comment 4•7 years ago
|
||
Comment 5•7 years ago
|
||
Comment 6•7 years ago
|
||
Comment 7•7 years ago
|
||
Comment 8•7 years ago
|
||
Comment 9•7 years ago
|
||
Comment 10•7 years ago
|
||
Reporter | ||
Comment 11•7 years ago
|
||
Reporter | ||
Comment 12•7 years ago
|
||
Reporter | ||
Comment 13•7 years ago
|
||
Comment 14•7 years ago
|
||
Reporter | ||
Comment 15•7 years ago
|
||
Comment 16•7 years ago
|
||
Reporter | ||
Comment 17•7 years ago
|
||
Comment 18•7 years ago
|
||
Comment 19•7 years ago
|
||
Reporter | ||
Comment 20•7 years ago
|
||
Reporter | ||
Comment 21•7 years ago
|
||
Reporter | ||
Comment 22•7 years ago
|
||
Comment 23•7 years ago
|
||
Comment 24•7 years ago
|
||
Comment 25•7 years ago
|
||
Reporter | ||
Comment 26•7 years ago
|
||
Comment 27•7 years ago
|
||
Comment 28•7 years ago
|
||
Reporter | ||
Comment 29•7 years ago
|
||
Comment 30•7 years ago
|
||
Reporter | ||
Comment 31•7 years ago
|
||
Reporter | ||
Comment 32•7 years ago
|
||
Reporter | ||
Comment 33•7 years ago
|
||
Comment 34•7 years ago
|
||
Comment 35•7 years ago
|
||
Reporter | ||
Comment 36•7 years ago
|
||
Comment 37•7 years ago
|
||
Comment 38•7 years ago
|
||
Reporter | ||
Comment 39•7 years ago
|
||
Comment 40•7 years ago
|
||
Reporter | ||
Comment 41•7 years ago
|
||
Comment 42•7 years ago
|
||
Comment 43•7 years ago
|
||
Reporter | ||
Comment 44•7 years ago
|
||
Reporter | ||
Comment 45•7 years ago
|
||
Reporter | ||
Comment 46•7 years ago
|
||
Comment 48•7 years ago
|
||
Comment 49•7 years ago
|
||
Comment 50•7 years ago
|
||
Comment 51•6 years ago
|
||
(In reply to gene smith from comment #6)
To fix this there is a "pref" that can be set to cause all folders to be
checked for new email and not just inbox. It is at Preferences(or
Options)/Advanced/Config Editor... In "about:config" widget, search for
"all_folders" and set "mail.server.default.check_all_folders_for_new" to
true by double-clicking on it and restart tb. This fixes yahoo for me so now
I see the unread count go up when a new filtered message arrives in the
destination folder.There doesn't seem to be a UI for setting this for individual
accounts/servers so it's either all or none (*). This feature was added at
Bug 289208 but the UI for making it server specific was never done it seems.
Since it will check every folder this might slow down tb some but probably
not noticeable on a fast connection.
mail.server.serverX.check_all_folders_for_new [auto, no, yes, no-auto, yes-auto].
I've always understood that check_all_folders_for_new is not a performance option. I've never tested myself. Perhaps this will not be slow when there are just a few folders in a few accounts. But what about other cases?
Updated•6 years ago
|
Comment 52•6 years ago
|
||
Wayne, As a minimum the option to check all folders for new mail will send a NOOP imap command to every folder in imap SELECTED state and fetch \recent flags for all others. If you check for new mail every minute and you have 100's of folders then it might cause a slowdown glitch especially if you are on a slow network (e.g., dialup, if that even still exists).
By the way, yesterday I sent an email to this bug's reporter Erik asking if he is still using TB and if he still sees the reported problem.
Looking at the code, the check for new email does recursive calls and loops though all the folders for an account so if you have 100's of folders the recursion would be 100's deep calling the same function over and over. It may be possible that if an error occurs, say at the 50th folder, that the remaining folders wouldn't be checked. But I've never observed a problem occurring.
Here's the function that calls itself recursively:
Comment 53•6 years ago
|
||
Perhaps any performance issue could be mitigated by imposing a reasonable minimum for the mail check interval. IMO 1 minute is an absurd minimum. It has caused problems elsewhere, for example bug 531455 and bug 512677
Comment 54•5 years ago
|
||
Do you also see this issue when using versoin 68?
Reporter | ||
Comment 55•5 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #54)
Do you also see this issue when using versoin 68?
Yes, sometimes I still encounter this issue. Just tried on Thunderbird 68.3.1 (Windows)
Comment 56•5 years ago
|
||
Gene, bug 422729 has fewer comments and bug 422729 comment 15 summarized.
Should we dupe this bug to it, or is there something different here that warrants keeping this bug open?
Comment 57•5 years ago
|
||
Another ~20 bugs https://mzl.la/34UOkE4
Comment 58•5 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #56)
Gene, bug 422729 has fewer comments and bug 422729 comment 15 summarized.
Should we dupe this bug to it, or is there something different here that warrants keeping this bug open?
Yes, I think this is actually a dup of that older bug. However, don't want to give reporter Erik the impression that this bug is actually fixed since it will then say RESOLVED as a duplicate of the older bug.
Anyhow, I need to research more why the "check this folder for new" setting doesn't seem to always work in detecting new mail when check for new mail is clicked.
Erik, at what level in the folder hierarchy are the problem folders? Maybe nested subfolders aren't being checked all the time?
Comment 59•5 years ago
|
||
I'm not sure if bug 1593611 is relevant to Erik's observation, but when account uses oauth2, like gmail, when you check for new messages in ALL accounts (shift-f5) the oauth2 based accounts are skipped as described here and in other comments: bug 1593611 comment 7. If the oauth2 based account is checked individually it works OK.
Comment 60•5 years ago
|
||
I am now on 72.0b2 and (still) see this issue (sub-folders not being updated). I have been following this thread (and related) and tried the 4 combinations of settings for "mail.server.default.check_all_folders_for_new" and "mail.imap.use_status_for_biff" with “when getting new messages for this account, always check this folder" enabled - without success. Quitting/restarting TB seems to reliably fetch new email again in all subfolders, it seems. So, it looks like after some time, TB (in combination with my yahoo/gmail accounts and about ~15 subscribed sub-folders) gets into a state, where at least certain sub-folders are not updated anymore. I tried to reduce my setup to a single yahoo account and still see the issue happening. Happy to evaluate any further debug suggestions.
Comment 61•5 years ago
|
||
Michael, thanks for the info. Just so I completely understand your issue, are you saying server filters are delivering emails to ~15 non-inbox yahoo folders and you don't see,
- New unread count in bold for folders with new message, or
- No notification pop-up when new mails in those folders, or
- Both?
I'm pretty sure you mean just 1. but want to make sure.
Also, what do you do that cause tb to see new messages? I assume you are just clicking the "get messages" button or waiting for the get new messages timer to expire. (Only inbox can always detect new messages on its own, without user or timer intervention, using imap IDLE.)
Comment 62•5 years ago
|
||
Yes, on the ~15 non-inbox server side filters.
I don't see (1) - I don't see unread counts in bold and neither unread messages in the respective folders.
I am not sure about (2) right now. I have TB notifications completely disabled.
I don't think that "Get Messages" or timer expiration solves my issue. Let me double-check though on if "Get Messages" helps to be sure. The only thing that seems to work reliably is to close (Command-Q) / restart of TB. This seems to fairly quickly make a pass through all folders and uncover all unread things. Inbox - as you mentioned - seems to reliably detect new messages and seems not affected by this issue.
Let me know, if there is anything you want me to try for a couple days and report back. I have next week off and super excited to help getting to bottom of this one.
On a side note: my reason for disabling TB notifications is that I get lot of (somewhat transient) errors for my Yahoo imap accounts for authentication issues. I believe this is a known (TB? or Yahoo?) issue in conjunction with Yahoo requiring use of "Allow apps that use less secure sign in", which does not seem to work well (for me at least). I assume this is a separate issue / topic and not related to me not getting new messages reliably.
Comment 63•5 years ago
|
||
If you still have your profile with just a single yahoo account you could try this.
1 Configure the server setting so new mail NOT checked at startup, and
2 timer to check for new is disabled, and
3. disable immediate notification of new mail.
4. Select a folder that has the least messages and you don't expect new mail to appear in it.
5. Also see last paragraph below for more details.
Then shutdown tb and restart from command line with IMAP:5,timestamp logging enabled as described here: https://wiki.mozilla.org/MailNews:Logging
On restart, tb should just make one connection to yahoo to the folder (mailbox) of the folder in step 4 above and will show the messages in that folder. Let tb just sit for at least 1/2 hour doing nothing so yahoo times out the connection. Then somehow cause new messages to occur in several of the 15 yahoo folders, maybe using another client like tb on another computer. Once the messages are processed at the yahoo server, on the tb under test, click the "get messages" button. Do the new unread number of message on the appropriate folders show in bold?
Now shutdown tb and attach the resulting log using the link above. Also, tell me which yahoo folder name and how many you expected to see new mail in and those that you didn't (if any).
Note also (and I'm sure you know this) that for any of the non-inbox folders to detect new mail they must have property “when getting new messages for this account, always check this folder" set. Also when doing this test make sure "mail.server.default.check_all_folders_for_new" and "mail.imap.use_status_for_biff" are set back to default values using config editor (false and true respectively).
Updated•5 years ago
|
Comment 64•5 years ago
|
||
Thanks for the detailed info. Ok, all set up following 1~5 above. To do so, I set up a fresh user account on my Mac and created a new TB profile over there with just one yahoo account in it. That one only has 5 sub-folders + inbox, but I assume this is an ok start. I am pointing to a sub-folder, where I don't expect messages and will generate some traffic in the others soon, as you suggested. Note that since is a new TB profile, it is syncing all messages right now from that yahoo account. I will let that run through and play with it after that.
Comment 65•5 years ago
|
||
I have uploaded the log. Looking at the log file, before I started the test, activity stopped around 14:01. Then at ~14:25 I clicked on "Get All New Messages", while still on the folder with no activity / no new unread message. Nothing happened, no unread messages where shown. I expected to see 1 unread email in each folder except for "Indoor'. A few mins later I clicked on a specific folder (which I know had an unread message), and then the unread message was shown by TB. Note that you will see a lot of "authlogin failed" errors in the log. As I mentioned above, I am struggling with yahoo these days. I hope it is not muddying the waters with this issue. Since I can see the new unread messages, once I click on a specific folder, I assume it is not the root-cause for the unread messages issue. But let me know, if you think otherwise.
Comment 66•5 years ago
|
||
Comment 67•5 years ago
|
||
Sorry for delay in responding. Been trying to update h/w in my main system and not having lots of good luck. Anyhow, thanks for the log. Here is a rough summary of the log:
14:00
Tb produces select immo url
Tb makes connection
Selects immo
Tb produces select indoor url
Tb makes another connection
Selects indoor
(This looks OK. But not sure why immo and indoor are both selected unless you click on both folders.)
14:25
Tb produces select Inbox url
Tb produces folderstatus url for tadpoles
Tb sends status request for tadpoles but yahoo drops connection.
Tb produces folderstatus url for chargepoint
Tb tries to make 3 connections that seem to be dropped by yahoo or yahoo refuses authentication.
Tb gives up on attempt to obtain status to detect new messages.
14:28
Tb produces select incoming url
Tb makes new connection
Tb selects incoming folder and obtains needed info (flags etc.)
I don't see any new headers or message body fetched here for folder incoming.
Yes, it looks like at 14:25 tb tries to get status for "Tadpoles" folder and yahoo drops and then refuses further connections for other folders. Looks like when tb tries to make multiple parallel connections when checking for new mail in multiple folders, yahoo doesn't like it and drops them or won't authenticate them. You might try reducing the number of "cached" connection that tb makes using the "advanced" server setting. It defaults to 5 so you might even try to reduce this to 1 and see if yahoo remains happier.
But I need to look closer at this so I'm only suggesting this as a temporary work-around, not as a complete solution.
Comment 68•5 years ago
|
||
Setting cached connection = 1 seems to help indeed in my case. I did a few runs with it and in each case, TB was able to detect unread messages in all folders. I believe you are also correct that there does not seem authentication issue with my yahoo account.
Having said that, with cached connection = 1, I think I saw one case of some sort of deadlock, where TB would not see any new unread messages at all, not even in inbox. I recovered by setting cached connection back to 5. It may also have been related to the fact that I had another TB instance running under my normal (non-test) account still, which I quit out as well. Not 100% sure, but something funky was going on.
I will keep testing with cached connection = 1 in my normal account and see if it helps. Note that I am pretty sure that I tried that setting a while ago (since it was floating around as suggestion as well) and came to the conclusion that it did not help resolve all my issues, but I am taking a fresh look with it again.
Comment 69•5 years ago
|
||
It seems to work better after running "cached connection = 1" in my normal account. I will keep evaluating and report back, if I see anything odd. I am curious as to what the downside of this setting is? Is there anything to look out for?
In terms of bugs, does it make sense to open a separate bug for "cached connections = 5" causing issues with at least my Yahoo imap, if it is not specific to this thread's issue? Do you think this is a general issue with sub-folders and yahoo or specific to using TB/Yahoo's "less-secure" app support mode for clients such as TB.
BTW, is there a thread/update on what the support model for TB & yahoo/imap will be, once Yahoo is phasing out its "less-secure" apps support, i.e. from Yahoo: "Allow apps that use less secure sign in (This option will be going away on March 2nd, 2020)".
Comment 70•5 years ago
|
||
Thanks for testing this. I need to test it with yahoo and see what happens myself once my setup here stabilizes again. Don't know that we need another bug report regarding 5 connections with yahoo.
Not sure, but I thought I had a full oauth2 setup with yahoo but got rid of it to test another problem and now have it set back to "use less secure app". I need to check this too.
Having just one connection would theoretically cause more activity when you move from folder to folders. But if yahoo refuses multiple connections or re-connections then the benefit is reduced and could causes a failure to detect mail in non-inbox folders.
Comment 71•5 years ago
|
||
Ok. Just double-checked, and I am actually on oauth2 as well. At some point, I wasn't sure if it that was supposed to be working between TB/yahoo based on some thread comments I read, but I remember now that I tried oauth2 a few weeks ago again (as part of my debug effort for my auth issues) and seems to be working for me at this point. Pls disregard my comments regarding less-secure apps support above.
So, I will keep using this configuration for the next week and report back if I see anything odd with it. But it looks like "cached connections = 1" addresses my auth issues and maybe with it, the issue I was facing with unread emails not showing up consistently in sub-folders. For completeness, my config is as follows:
- "cached connections = 1"
- “when getting new messages for this account, always check this folder" for the relevant sub-folder
- "mail.server.default.check_all_folders_for_new" = false
- "mail.imap.use_status_for_biff" = true
Comment 72•5 years ago
|
||
And I should add:
- Check or new messages every "3" minutes
- "Allow immediate server notifications when new messages arrive" checked
Comment 73•5 years ago
|
||
query https://mzl.la/3bAgEPq
Comment 75•4 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #74)
dup bug 422729 to this one?
Yes, that sounds good. I.e., mark bug 422729 a duplicate of this bug. That way this bug, which has the most recent activity, remains open and does not get set to resolved.
Updated•3 years ago
|
Comment 77•3 years ago
|
||
I'm pretty sure I've finally found the problem reported 4 long years ago by Erik.
Description
•