Open Bug 334483 Opened 18 years ago Updated 1 year ago

unchecking IMAP "Check this folder for new messages" option doesn't prohibit notifications through IDLE

Categories

(Thunderbird :: Mail Window Front End, defect)

defect

Tracking

(Not tracked)

People

(Reporter: stiv, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2

I have got IMAP mail account. It catches tons of spam hourly. I redirect spam messages with mozilla to the special folder. The option for the folder "Check this folder for new messages" is disabled. Though I get informed every time spam arrives in that folder.

Reproducible: Always

Steps to Reproduce:
1. create imap account
2. create imap folder
2.5 make sure that "Check this folder for new messages" flag is disabled
3. forward some kind of messages to that folder
4. send this kind of message to your account so it gets to the folder


Actual Results:  
You will be informed of new message while you didn't expect that.

Expected Results:  
You should not be notified.
I have a similar problem, that seems it could be related.

I have a private IMAP account and a work IMAP account.

At work, both are added to Thunderbird, and to avoid spending too much time on private mails during workhours I have tried setting the check interval for the private account to every 60 minutes.

I have also made sure to not check the "Check this folder for new messages" checkbox on some of the less important folders (such as junk mail).

Yet, after I have checked mail once, thunderbird continues to check for newly arrived mail to that account every couple minutes or so. I see no pattern to which folders it is checking, but it checks both some folders that I have told it not to check, and also some folders I have told it to check.

This happens with Thunderbird version 1.5.0.7 (20060909) on Windows XP, running against a Cyrus IMAP server with server-side sieve filters.
Stepan, do you still see this problem?
Assignee: mscott → nobody
Component: General → Mail Window Front End
QA Contact: general → front-end
Version: unspecified → 1.5
I've just upgraded to Tb v2.0.0.4 (20070604) a couple days ago, and can
confirm that the problem still exists in that version. I haven't tried latest nightly.
Confirmed on a 2007091917 Trunk build on my Linux computer.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All
Version: 1.5 → Trunk
Flags: wanted-thunderbird3?
(In reply to comment #0)
> I have got IMAP mail account.
> The option for the folder "Check this folder for new messages" is disabled.
> Though I get informed every time spam arrives in that folder.

What is your setting which relates to IDLE support?
Does your IMAP server support IDLE?
> Account Setting/Server Settings/Advanced
> "Use IDLE command if the server supports it"

I both answers are yes, this is valid behavior based on design/spec of IDLE, I believe. Search by Google for "IMAP IDLE".
If you want POP3 like behavior(periodical mail check only or manual mail check only) even when IMAP server supports IDLE, you should disable IDLE support currently. 

If you are talking about phenomenon that "new mail notification" appears even when spam mail only(detected as Junk & all mail is moved to Junk), search bugzilla.mozilla.org well via "Advanced Search".
I saw may bugs for "new mail notification" related problem when newly arrived non-spam mail count is ZERO(==all newly arrived mail is Junk), although I can't recall bug numbers.
(In reply to comment #5)
> What is your setting which relates to IDLE support?
> Does your IMAP server support IDLE?

Default. I don't remember which server I used to test, but I believe it was Gmail's IMAP server, which I am 90% sure supports IMAP.

> I both answers are yes, this is valid behavior based on design/spec of IDLE, I
> believe. Search by Google for "IMAP IDLE".

I know the purpose of IDLE, but, from a UI standpoint, if I say "don't check this folder for new messages", I don't want it to be checked. Merely moving a message into that folder should not be sufficient grounds to override the setting. In that sense, we shouldn't be using IDLE for folders we don't want to regularly check for new messages.
If a folder is not configured to be checked for new messages, when IDLE tells us there are new messages, we don't go download the new message headers.
Flags: wanted-thunderbird3? → wanted-thunderbird3-
Summary: IMAP "Check this folder for new messages" option doesn't work right → unchecking IMAP "Check this folder for new messages" option doesn't prohibit notifications through IDLE
Hi all,

it feels like this issue is still up in TB3 (Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3).

I have a theory: When using server side filter (like server sided junk filter), emails FIRST arrive in Inbox and THEN get moved so TB gets notified about a new mail but can't show it because it's already moved.
Ok, I didn't see any notifications for SPAM filtered by my server after I removed the checkmark for "new mail notification" in the properties of my SPAM folder.
This still exists.

With all the following options under Server Settings unchecked:
--Check for new messages at startup
--Check for new messages every ... minutes
--[Advanced] Use IDLE command...

an IMAP account still shows new messages unasked from time to time.

This is inconvenient as this account is used only for safety copies, and if new messages appear these show as extra unwanted copies beside the main bccs in the Smart Folders Inbox.

Thanks, Roger.
Sorry should have added that above is in T'bird 3.0.4 under Vista SP2.
E-mail notifications are considered as the biggest productivity killer. Could we please raise the importance of this bug, it's been filed FIVE YEARS AGO.
ideally, we would update the folder to get the new headers, but not notify the user about them, because it helps keep our global database up to date, and is the cheapest time to get the new headers. But, the notification code can't easily distinguish between a new header download via idle vs. a new header that appeared because an imap filter moved a newly downloaded message to an other folder. So not updating the folder at all is probably the easiest fix.
Dumb question: Why can K-9 Mail on my Android distinguish but not my Thunderbird?
(In reply to Raul Pinto from comment #14)
> Dumb question: Why can K-9 Mail on my Android distinguish but not my
> Thunderbird?

dumber question - k-9 has mail filters?!
Now you see, how dumb my question was: I don't know if K-9 has mail filters. Even more: I don't even know why this matters.
The Spam filters we're talking about in this bug are server-sided, right? So why does it matter, if TB or K-9 offers filters? Please explain, if you have the time. I just thought, it might help to know other open source IMAP clients don't have this problem...
(In reply to Raul Pinto from comment #16)
> Now you see, how dumb my question was: I don't know if K-9 has mail filters.
> Even more: I don't even know why this matters.
> The Spam filters we're talking about in this bug are server-sided, right?
No, I want messages that are filtered by Thunderbird mail filters into other folders to show up in the new mail alert. The code in question doesn't know the difference between those messages, and messages that showed up because of server side filters. So it's not trivial.
I see your point. Thank you, for your explanation.
So the question is, when is the notification triggered, right? There must be some kind of "chain" like in "Email arrives at Mailserver" -> "Thunderbird requests Headers" -> "TB handles filter" -> "Notification is triggered". Is that documented somewhere?
This problem still exists with Thunderbird 24.1.1 (running on 64-bit GNU/Linux).  The workaround in Comment #5 (disabling IDLE) works, but this seems to take effect only after Thunderbird is restarted.
(In reply to Tristan Miller from comment #19)
> but this seems to take effect only after Thunderbird is restarted.
It's pretty normal, because the setting is for "IDLE command is issued or not, upon end of consecutive IMAP command execution at a cached connection".
"Uncheck of the setting" never means "Tb kills IDLE at a cached connection if IDLE command is already issued at a cached connection.
Get IMAP log with timestamp and view IMAP log(text file) by Text Editor by yourself, and see protocol level flow after IDLE command is issued.
It's pretty simple.
- Tb issues IDLE -> server & Tb enters a state(can be called "IDLE mode" or "IDLE state").
- If event such as "new mail in selected mbox" happens at server, server notifies it to Tb
  via unsolicit response to IDLE command.
- If new IMAP command execution is needed by Tb(client), Tb(client) requests 
  "end of IDLE state" to server, then sends IMAP command to server.
- If a "time threashold of IDLE state" expires(default=29 min), Tb(client) requests
  "end of IDLE state" to server and issues IDLE command again.
  This is because defined so in protocol named IMAP :
  Tb(client) has to end IDLE state within a threshold time, and if Tb(client) wants to
  continue "IDLE state", Tb(client) has to send IDLE command again.
The "threshold time" is less than 30 minutes and default is 29 minutes. So, "restart of Tb" is easiest and simplest and fastest way to terminate IDLE state at all cached connections and to force "new next IDLE interval" with the IDLE setting of Tb Unchecked.
(In reply to Raul Pinto from comment #18)
> There must be some kind of "chain" like in "Email arrives at Mailserver"
> -> "Thunderbird requests Headers" -> "TB handles filter" -> "Notification is triggered".

It's a little bit wrong on why new mail via IDLE is shown by alert even though new mail check is not requested for the folder.
And, "new mail notification is triggered on folder for which new mail check is not requested" part involved in your chain is perhaps wrong.

Phenomenon is perhaps;
New mail is detected via IDLE at folderA for which automatic/periodical new mail check is not requested
-> Message headers is fetched for the mail and meta data of mail is saved in MsgDB for FolderA with status of "New mail"
-> Tb doesn't invoke new mail alert at this step because this is not new mail check by Biff and automatic new mail check is not requested for this FolderA
-> New mail is detected at folderB for which automatic/periodical new mail check is requested, via new mail check by Biff(by any of STATUS, uid fetch HighestUID:* flags) or by IDLE or by periodical folder check by auto-sync
-> Message headers is fetched for the mail and meta data of mail is saved in MsgDB for FolderB with status of "New mail"
-> Because new mail alert is requested for FolderB and "Number of new mails to be shown by alert>0", new mail alert is shown. Because "Number of new mails in FolderA>0" and "Number of new mails in FolderB>0", new mails in FolderA and new mails in FolderB is shown in new mail alert.

Bug 885220 is problem of;
  New mail alert is not invoked on FolderB in above(new mail check is requested),
  because "Number of new mail in FolderB">0 is not set(not updated),
  if server supports CONDSTORE && Tb's CONDSTORE support is enabled
  && new mail in FolderB is detected via IDLE(not by Biff).

IDLE is for "new mail notification from server to IMAP client for Mbox which is already selected at a cached connection" without IMAP client side "periodical server access for new mail check".
So, new mail detection via IDLE can be called a "new mail check".
Even if IDLE related setting is hidden in Advanced of Server Settings for user and enabled by default, "using software's default setting as-is" is surely "user's intentional choice to use software's default".
Although current option setting UI, which is around automatic new mail check and Biff alert, is sufficiently confusing and inadequate for Tb user, "new mail alert for new mail detected via IDLE" is never WRONG or BAD behavior as IMAP mail client, and it is never RFC violation by Tb.
It's simply "different from user's expectation" which is caused by inadequate UI.

However, request/expectation of "No new mail alert for new mails detected via IDLE, if user doesn't intentionally request periodical new mail check at Server Setting(not in Advanced)" is also an absolutely valid or proper or reasonable request/expectation.
I see this kind of expectation by Tb users in some bugs at bugzilla.mozilla.org. Number of users who expects it is never huge, but it's never negligibly small.

I think clear definition of "New mail in IMAP" is needed.
  Currently, "Unknown Unread mail" is "new mail for Tb".
  A reason of this definition is ; "Recent flag in IMAP" is not usable.
  So, problem of "new mail alert on draft mails at a Tb instance for draft mail saved by
  other Tb instance" can pretty easily occurs merely by "saving draft mail without \Seen
  flag" for easy recognition of "writing, not sent yet" mail, for user's convenience.
I think following is better.
    Mail which has larger UID than HighestUID which Tb already knows.
"How the newly detected mail is shown or notified to Tb user" should be separated form "newly detected mail for Tb or not".
    For a user, draft saved by other IMAP client(mailer, Smart Phone) is "new mail" of
    this Tb, but for a different user, the draft is never "new mail" because it's draft
    he wrote on Smart Phone.
    Some users say draft is never "new mail", because draft is never "mail sent to me
    by someone and arrived at my Inbox", but some users say "newly saved mail in an IMAP
    Mbox" should be "new mail of the IMAP Mbox even when it has \Draft flag".
    If IMAP Mbox is shared among multiple peoples who use different Tb on different PC,
    "newly detected mail in Inbox by my Tb with \Seen flag" is better shown as
    "new mail in Inbox", even when the mail is already accessed by other people using
    other Tb then the mail is flagged as \Seen.

I think sorting out of following is also needed in UI.
  - automatic new mail check/detection
  - showing folder's status of "new mail exists"
  - showing mail's status of "this is new mail"
  - new mail alert on newly detected mail
I believe "newly detected mail in Inbox" is better indicated by "new icon" at folder pane and by "new icon" at thread pane, regardless of \Seen flag(regardless of Read/Unread status which is set by other Tb/people).
Even when user never wants "new mail alert on newly detected mail without \Seen flag in Trash and Junk", I believe "new icon" at folder pane/"new icon" at thread pane is better shown at Trash folder and Spam folder, regardless of \Seen flag unless \Seen flag is added by message filter of this Tb.
To bug opener and problem reportes in this bug:
Is your request in this bug one like next?
- When "check new messages" is unchecked at Server Settings by Tb user,
  uncheck IDLE command use setting, which is hidden in Advanced, automatically.
- Per folder "use IDLE command" setting, and;
  when "Include this folder..." is unchecked at Folder Properties, disable it.
(In reply to WADA from comment #22)
> To bug opener and problem reportes in this bug:
> Is your request in this bug one like next?
> - When "check new messages" is unchecked at Server Settings by Tb user,
>   uncheck IDLE command use setting, which is hidden in Advanced,
> automatically.

I think you might have the first part of this backwards.  And also, except in very specific cases such as a tree list, it's poor UI design for one checkbox to automatically uncheck other checkboxes.  A better way of formulating the problem and solution would be as follows:

(a) When "Check for new messages every X minutes" is checked, then the "Use IDLE command if the server supports it" functionality should be disabled, and this should be made apparent to the user by making the corresponding checkbox inactive (but *not* automatically changing its checked/unchecked state).

However, the problem with this is that it's not obvious to the user if or how the server can be made to present real-time notifications of new mail.  So perhaps instead the best solution would be as follows:

(b) Get rid of both the "Check for new messages every X minutes" checkbox in the Server Settings dialog, and the "Use IDLE command if the server supports it" checkbox in the Advanced Account Settings dialog, and replace them with the following radio button group:

  ( ) Check for new messages only manually
  ( ) Check for new messages every X minutes
  ( ) Receive instant notifications of new messages

The third radio button could have some additional text in parentheses such as "(if the server supports it)".  Or better yet Thunderbird could just ask the server itself using CAPABILITY and deactivate the button if IDLE is not supported.

> - Per folder "use IDLE command" setting, and;
>   when "Include this folder..." is unchecked at Folder Properties, disable
> it.

I don't do per-folder mail checking so this doesn't really apply to my situation.
I have the same problem describe in #1 today in Linux with TB 24.1.1.
(In reply to Tristan Miller from comment #23)
>   ( ) Check for new messages only manually
>   ( ) Check for new messages every X minutes
>   ( ) Receive instant notifications of new messages
Please note that;
- "IDLE" is never for "notification of new message" only.
  Flag status change such as \Deleted, \Seen, flag/keyword corresponds to Tb's Tag, ...
  is also notified via IDLE, although some major IMAP servers doi't notfy flag change
  (bug 693204).
- If user doesn't want to use IDLE command at any place, "simply uncheck" is sufficiet.
  However, when IDLE command is enabled, "where/when IDLE command is effective" is never
  on all mail boxes at any time.
  IDLE state by IDLE command is applicable to "Mbox currently selected at a cached
  connection" only, and "max cached connection is never infinite(default=5).
  And Tb reserves one cached connection for Inbox if max cached connection>1.
  Tb reserves second cached connection for Trash if max cached connection>2.
  When access to an MboxB is needed, if other Mboxes are selected at all available cached
  connections, "select MboxB" is issued at a cached connection where MboxX is already
  selected. This measn "alredy selected then IDLE command was used" MboxX is de-selected.
  i.e. when user wants IDLE command is used by Tb and user requests Tb to use IDLE command,
  "affect on an Mbox by IDLE" is unpredictale,
  except when max cached connections=1(IDLE is applicale to currently selected Mbox only), 
  Inbox with max cached connections>1 (IDLE is applicable always),
  Trash with max cached connections>2 (IDLE is applicable always).

Actual problem is "IDLE command was issued" because "Use IDLE commad" related setting is hidden in Advanced?
Such option settings is sufficient and sufficiently clear for user who wants "IDLE commad is used", especially when user wants automatic new mail check of other than Inbox too?
Your actual problem is "mail detected via IDLE at Mbox(Inbox, or other than Inbox)" is shown by new mail alert even though you don't request Tb to do new mail check automatically(new mail check of Inbox only in your case), isn't it?
Problem is "New mail alert for such mails even though you don't want new mail check is merely annoyance", isn't it?

You disabled new mail check setting because you don't want automatic new mail check by Tb.
If so, "Disable new mail alert by Biff" is sufficiant in your case, isn't it?
No, I disagree very strongly that the "Use IDLE command" setting is "sufficient and sufficiently clear" to disable the new mail notifications.  The vast majority of users have no idea what "IDLE" is, nor should they need to in order to operate an e-mail client.  I'm pretty technically literate (a free software programmer, but not of e-mail clients) and even I don't understand 90% of what you just wrote.

The suggestion in my previous comment was an attempt at an interface for controlling the automatic mail check which doesn't rely on the user having detailed knowledge of the underlying protocol.
(In reply to Tristan Miller from comment #26)
What I want to say is;
- Even if following is true,
  - when you unchecked "new mail check",
      when "IDLE command use" was checked, new mail alert was shown,
      when "IDLE command use" was unchecked, new mail alert was not shown,
   - or if "IDLE command use" was not checked, 
          when you unchecked "new mail check", new mail alert was not shown,
        but if "IDLE command use" was checked,
          when you unchecked "new mail check", new mail alert was still shown,
  proper conclusion is not "make 'disable IDLE setting' easy".
- What is bad is not;
    new mail was notified from server via IDLE, because IDLE command was used
    even though user disabled automatic new mail check of an IMAP account.
  What is bad is;
    "new mail alert on new mails in an Mbox" was shown by Tb, even though user disabled
    "automatic new mail check of an Mbox",
  even if "new mail was notified from server via IDLE because IDLE was used" is involved
  in problem.
- What should be done in order to stop unwanted "new mail alert" for user on "new mails in
  Mbox for which new mail check is not requested" is;
     Tb stops "new mail alert" on "new mails in Mbox" for which new mail check is not
     requested by user, which is usually detected by "new mail notification from server
     via IDLE".
  What should be done is not "disable new mail notification from server via IDLE".
- What should be clearly related to "new mail check" is "new mail alert",
  because root problem/cause is not "IDLE command was issued and new mail was notified
  from server via IDLE",
  because root problem/cause is that "new mail alert on new mails in an Mbox" was shown by
  Tb, even though user explicitly disables "new mail check for an Mbox".

Please imagine following case:
(Case-A)
- For Inbox and MboxA, user wants "new mail check", so user checks "Check new message ...",
  and checks "Include this folder upon new mail check of Inbox" of MboxA.
- Because user wants new mail detection on MboxB by "new mail notification from server
  via IDLE", user enable "Use IDLE" command.
  However, user doesn't want "new mail alert by new mail check" on MboxB,
  so user doesn't set "Include this folder..." of MboxB.
Problem in this case is;
  When new mails in MboxB is detected by "new mail notification from server via IDLE",
  Tb doesn't show new mail alert.
  However, if new mails in MboxB which is detected by "new mail notification from server
  via IDLE" is explicitly read by user yet, when new mail is detected at Inbox or MboxA,
  regardless of "by new mail check or by IDLE", and "new mail alert" is shown, 
  the new mails in MboxB which was detected by "new mail notification from server via
  IDLE" is shown in "new mail alert invoked by new mails in Inbox or MboxA".
In this case, "disable IDLE command" is useless, because user needs "IDLE command use at least for MboxB".
Problem is;
  new mails in MboxB which was detected via IDLE is included in new mail alert,
  even though user doesn't want new mail alert on MboxB then user disabled new mail check
  of MboxB.
User's expectation can not be called INVALID.
This is actual case seen in some bugs.

Please don't confuse with following.
(Case-B)
1. Check new message every 5 minutes is set.
   New mail check is for Inbox only.
   "Use IDLE command" is enabled by default in Server Settings/Advanced.
2. At T1, Biff requests "new mail check after 5 minutes"==new mail check at T1+5.
3. At T2(<T1+5), Check new message every 5 minutes is disabled.
   Because "Check new message every NN minutes" is for "request next new mail check",
   request of "new mail check at T1+5" is not removed and is active.
4. At T1+5, "new mail check at T1+5" is scheduled and executed.
   Because new mails arrived between T1 and T1+5, new mail alert is shown,
   even though "Check new message every NN minutes" is disabled.
5. "next new mail check" is not requested, because "Check new message every NN
   minutes" is disabled.
6. After it, call T6(>T1+5), "Use IDLE command" is disabled.
   Because one connection is reserved for Inbox, IDLE command is already issued at cached 
   connection where Inbox is selected.
   Because "Use IDLE command" is for "Next IDLE interval", IDLE command issued at
   connection where Inbox is selected is still active.
   Tb doesn't do "kill already issued IDLE command" when "IDLE command use" is disabled.
7. At T7(>T6), new mail in Inbox is notified via IDLE", and fetch header is requested.
   Because new mails in Inbox is detected,
   "new icon" is shown for Inbox at folder pane.
   "new icon" is shown for each new mail in Inbox at thread pane of Inbox.
8. After fetch header, IDLE command is not issued at cached connection reserved for Inbox,
   because "Use IDLE command is disabled.
9. After it, following continues.
   Because "check new message every NN minutes" is disabled, new mail check is not invoked,
   then "New mail alert" won't be shown.
   Because "IDLE command use" is disable, IDLE command is never newly issued,
   so "new mail notification from server via IDLE" wont occur, then "new icon" won't be
   shown at folder pane automatically.

As far as I know, "new mail alert" won't be shown by following, which is same as "step 5" in (Case-B), even though "new icon" is shown for Inbox at folder pane automatically when new mails in Inbox is notified from server via IDLE.
(Case-C)
11. Check new message upon start up is disabled.
    Check new message every 5 minutes is disabled.
    "Use IDLE command" is enabled by default in Server Settings/Advanced.
12. Restart Tb, open Inbox at folder pane.

Tristan Miller, was "new mail alert" shown at "step 5"?
Do you see "new mail alert" even at step 12 or after step 12?
If so, "new mail alert on Inbox" may be different from other Mboxes.

Following is comment #0 of this bug.
> Expected Results:  
> You should not be notified.
What shouldn't be notified by whom in what situation, when user unchecked "Check new messages upon or every"?
Please note that, in Case-A, "Use IDLE command" can't be disabled by any one, because user wants it explicitly on MboxB, and this user's want can't be INVALID.
And, please note that I'm not opposite to proposal of UI improvements around new mail check like yours, and such improvements can surely be applicable to Case-B ad Case-C.
However, I think user's actual want is "no annoying new mail alert on an Mbox if he disables new mail check for the Mbox" instead of "disable automatic new icon of any Mbox of an account at folder pane, if he disables new mail check of the account".
(In reply to Tristan Miller from comment #23)
>   ( ) Check for new messages only manually
>   ( ) Check for new messages every X minutes
>   ( ) Receive instant notifications of new messages
Good points of your proposal.
- "Don't hide IDLE command relevant setting in Advanced button" is good.
- Easy to understand outline.
- "If user unchecked new mail check option, disable IDLE" is easy, and user is visible it.
Problems in it;
- "(almost) one to one relationship between check box in UI and entry in prefs.js" is lost,
  at least for login_at_startup.
  If dialup enviroment, login_at_startup=true/check_new_mail=false is reasonable setting.
  By your proposal, user can't use such setting.
> (a) Server Settings
>   mail.server.server#.login_at_startup = true (check at startup)
>   mail.server.server#.check_new_mail   = true (check every minutes)
>   mail.server.server#.check_time       = 1    (every NN minute)
> (b) Server Settings/Advanced
>   mail.server.server#.use_idle         = true/false (Use IDLE command if supported)
> (c) Folder Property/General, Include this folder in new mail check... = Checked/Unchecked
> (d) "New mail check of all folders" 
>   mail.server.default.check_all_folders_for_new = true/false (for all IMAP accounts)
>   mail.server.server#.check_all_folders_for_new = true/false (per server setting)
> (e) "New mail alert" related settings.
>  -----------------------------------------------         -----------------------------------------
>  New mail alert related settings in Tools/Option         Corresponding settings in prefa.js
>  -----------------------------------------------         -----------------------------------------
>  Tools/Options/General
>    When new messages arrive:
>      [ ? ] Show an alert          [Customize...]   <->   mail.biff.show_alert         = true/false
> 
>  At "Customize New Mail Alert" sub panel,
>      [ ? ] Message Preview Text                    <->   mail.biff.alert.show_preview = true (default)
>      [ ? ] Subject                                 <->   mail.biff.alert.show_subject = true (default)
>      [ ? ] Sender                                  <->   mail.biff.alert.show_sender  = true (default)
>  -----------------------------------------------         -----------------------------------------
> FYI. A known problem in new mail alert setting.
> Even when user disabled New mail alert via UI, mail.biff.alert.show_preview is kept true.
> So excess fetch for preViewText is issued by Tb, then it may interfere fetch by auto-sync,
> thus mail data saved in Offline-store may be garbled.
> Note:
> New mail alert relevant setting is currently global setting in Tb.
> It's not "per account/server, per folder" setting.
> So, trying to "disable new mail alert on an IMAP Mbox only or account only" is pretty hard.
- When "IDLE command use" is changed from unchecked to checked by user at Server Settings,
  it will produce user's confusions around IDLE because IDLE commad is used by Tb,
  due to spec of IDLE in protocol named IMAP, due to Tb's implemetstion around IDLE.
    IDLE is effective for Mbox which is currently selected at cached connection only.
    Default of Max cached connections=5. Number of connections is limited by server.
    So, "IDLE is used for any Mbox at any time" can be expected by user
    only when "Number of IMAP Mbox user has <= Number of connections permitted by server"
           && "Number of IMAP Mbox user has <= Max cached connecsion in Tb".
    And, "flag staus change” is also notified via IDLE,
    in addition to "new mail notification via IDLE".
  Who exposed "kindly hidden IDLE commad use in Advanced button" at Server Settings panel
  is you. So you should be fully responsible on such user's confusions around IDLE,
  regarless of "you know IMAP/IDLE/Tb well or not" :-)
I read comment #0 of this old bug, which was pointed in other bug, carefully again.

Comment #0 of this bug.
> Steps to Reproduce:
> 2.5 make sure that "Check this folder for new messages" flag is disabled
Inbox doesn't have this setting in Tb.
If "new mail check at Server Settings" is disabled, there is no need to refer to this setting.
So, comment #0 is;
- "New mail check at Server Settings", which is for Inbox, is enabled.
  "Use IDLE commad" is enabled by default at hidden panel.
  "Check this folder for new messages" of Junk folder is disabled.
- Because "Check this folder for new messages" of Junk folder is disabled,
  "periodical new message check by Biff" is never invoked for Junk folder.
- New mails in Junk folder is notified via IDLE because;
  - Because many spam mails arrive, spam mails are moved to Junk folder by message filter
    or Junk filter, filter at server or filter in Tb.
    These mails are obviously "new mail in Mbox named Junk" at server.
  - Junk folder is selected at a cached conection by Junk folder access in Tb, for example,
    periodical folder check by auto-sync, Junk folder open at folder pane, message filter
    move or Junk filter move in Tb.
- Tb shows the "New mails in Junk folder", which was detected via IDLE, upon displaying
  "New mail alert" for new mails in Inbox which was invoked by "Check new messages upon
  startup/every" for Inbox at Server Settings.
  It is pretty annoying for user especially when many mails are moved to Junk folder.
  It is pretty funny for user because user doesn't request new mail check of Junk folder.

Tristan Miller, this is absolutely same situation as (Case-A) which I wrote in comment #27, except;
- comment #0 :
  "Disable IDLE command use" can be a solution, because user doesn't need IDLE.
- (Case-A) I wrote in comment #27, for which I intensionally enable IDLE for MboxB :-)
  "Disable IDLE command use" can not be a solution, because IDLE command use is needed.
And comment #0 is never same as (Case-B) or (Case-C) which I wrote in comment #27 and which is perhaps your case.
Even if your proposal is a correct solution of (Case-B)/(Case-C), and even if your proposal can be a workaroud in comment #0 case, your propsal can't resolve problem in (Case-A) which is absolutely same phenomenon as comment #0.

Both of following are needed.
- Improve new mail check/IDLE/new mail alert relevant UI.
  Because "new mail notificasion from server" is involved in IDLE,
  and because a major purpose of IDLE in protocol named IMAP is "new mail check without
  periodical new mail check by client", "new mail check by simply keeping connection
  established", needless to say, IDLE is surely relevant to new mail check in mail client.
- Don't show unwanted "New mail alert" for "new mails notified from server via IDLE"
  in Mbox for which "periodical new mail check by Biff" is not requested by user.
This behavior still exists in 24.4.0.

As has been said, from a UX perspective, "Do not periodically check for messages" should mean that Thunderbird will not periodically check for messages, period, IMAP IDLE being enabled or not.

I don't mean to imply my time is more precious than those who put their hours into writing Thunderbird but figuring out that there's another checkbox for IMAP IDLE I have to disable in order to achieve the behavior I assumed one checkbox would have handled did take 10-15 minutes out of my day. I think it is scenarios like the one I just experienced which argue for this being a UX bug, and presumably a straightforward behavior to correct.
See Also: → 885220

This bug is still present in TB 78.7.0.

My account settings for IMAP-Account, Server settings panel:

  • check for new messages at startup*: DISABLED
  • check each xx minutes for new messages*: DISABLED
  • notify me instantly when new messages arrive on server*: DISABLED

Despite these settings, Thunderbird

  • loads for new messages at startup
  • while running in background, dowloads new mails without any interaction from my side
  • creates new-mail-notification via winows-10-notification (bottom right of screen, next to clock)

*wording may not be correct in english, I've translated from my german user interface

It would be helpful for was a clear explanation of why people get pushed email notifications of new mail when they disable all 3 options in Account Settings > Server Settings.
People assume if 'notify me instantly when new messages arrive on server* is DISABLED then the IDLE process is disabled and therefore they will not receive any pushed email from server.

Or does disabling it stop/close the constant/idle connectivity but not disable it, so if server pushes email the IDLE kind of reboots connectivity to occur?

Thus it is impossible to not get new pushed mail notifications if server uses PUSH?

Flags: needinfo?(vseerror)

Perhaps Gene knows.

Flags: needinfo?(vseerror) → needinfo?(gds)

I'm mostly configured for imap and have 10 or more accounts, most for testing. I keep all three items (check mail at start, check mail every X min, and notify immediately) turned off for all 10 accounts except for maybe the account I am debugging at the time. I don't see any notifications for new mail on any of these "disabled" accounts. Also, running IMAP:5 logs I only see network activity for my one enabled account that I'm working on so I don't see a way the other accounts could do any new mail notifications if all 3 items are un-checked.

To check for new mail on my main account (charter) I have to go to Inbox and open it. Only then are new messages brought in. For example, I only just now saw the bug mail for need info for this after not clicking on my charter Inbox for over 24 hours.

All I can suppose is that the users are somehow "parked" on Inbox. Without periodic check for new mail, the imap connection to Inbox will time out after about 30 min so you won't get any new mail. But if you then select another folder (say, Sent mail) and then come back to Inbox, a new connection will be made with Inbox and any new mail will be retrieved. Maybe that's what the users are seeing? If so, the solution is to just don't open Inbox at all if you don't want to see the new mail.

Note1: tb doesn't really have a way to disable an account other than going offline or, as an approximate solution, un-checking the 3 items listed above.
Note2: I assume no one is clicking the "get mail" button. That will cause new mail to be checked for Inbox of the selected account plus any other folder of that account that have the right-click" property "check new mail in this folder too when checking for new mail".
Note3: If "immediate notify" is unchecked you can't get any immediate or "push" notifications no matter what you do otherwise.

Flags: needinfo?(gds)

Well, I just noticed something that is similar to the reported problem. I have all all 3 items un-checked so all of my many accounts are supposedly disabled. Also my accounts don't use offline store, for the most part. But my main account has one folder with offline store, but it's not a folder I ever open and I don't check for new mail in it. I noticed after reading my bugmail on the main account and then moving to another test account, there was still activity on the main account every few minutes or so, based on data getting written to IMAP:5 log. Tb was doing an imap STATUS on the single offline stored folder of my main account checking for new mail in it.

So the thing causing this must be autosync since all 3 items are unchecked. Also the folder getting checked for new mail isn't configured to be checked!

So possible work-arounds for this might be to turn off autosync in the config editor or turn off offline store for all folders.
Probably a restart is needed after these changes.

Not sure how to "fix" autosync so new mail detection is prevented when it triggers an imap STATUS on all folders with offline store during tb "idle" times. I was thinking autosync only downloaded new messages in a folder after you open the folder, but apparently not. The code and docs are not real clear on this.

For me, the situation has improved over the past couple updates. I didn't pay close attention, so I couldn't be more precise when that happened. Therefore, on the surface / user interface, the issue seems resolved to me. (Except maybe the task-icon in Windows still shows me with red numbers, how many new mails have arrived; I'd prefer not being reminded, even through this way).

But I didn't do any thoruough testing. I think Gene Smith my have found some of the underlying reasons that had been triggering the issue in the first place. Might be worth NOT closing the issue without further investigation. Just my 2 cents. Thanks everyone who supports this great software.

My previous comment ist WRONG. I have just observed how Thunderbird made the windows-taskbar show a notification about new mail. My open Thunderbird was "parked" in a subfolder of the mailaccount (a custom subfolder for a project; it' s situated within the inbox)

Left pane of Thunderbird:

  • Account name
    • Inbox
      • Drafts
      • Sent
      • Archive
      • Junk
      • Spam
      • Trash
      • Project A
      • Project B <--- I was parked here
      • Project C

p.s. for clarification of the above comment: I am not sure anymore if Thunderbird was open, but hidden behind other windows, or if the window was minimized to the task bar. But either way, it should not go out to look if new mail has arrived.

Are you saying there really was new mail in "Project B" folder and you don't have "Project B" folder set to be checked for new mail?
If there was new mail in Project B, did it get there by a TB filter or by a server filter?
If via TB filter, new mail in Inbox would trigger the notification and then move the message to Project B.
AFAIK, TB being hidden or minimized shouldn't affect new message notification.

The Support Forum frequently gets queries on why any email is downloaded when the imap account Account Settings has un-checked the 3 items:

check for new messages at startup*: DISABLED
check each xx minutes for new messages*: DISABLED
notify me instantly when new messages arrive on server*: DISABLED

Therefore it is expected:
The email should not have arrived in Inbox, - so there would not be any notification nor any filter moving anything.
But this happened:
The email did arrive in Inbox, - so there was a notification and therefore filter moved email to designated folder.

if 'notify me instantly when new messages arrive on server* is DISABLED then it is assumed the IDLE process is disabled and therefore they will not receive any pushed email from server.

It's not about whether the notification and filter are working, the email should not have arrived.

The words disable IDLE are not explicitly used - this 'IDLE' option was removed from the Advanced settings.

Need to know:
Is it impossible to turn off IDLE, so if server 'PUSH' email, then Thunderbird will get notification and download whether user wants it or not and none of those three settings has any effect?

Therefore, going 'Offline' the only way to prevent auto downloads for imap account.

Flags: needinfo?(gds)

(In reply to Anje from comment #43)

The Support Forum frequently gets queries on why any email is downloaded when the imap account Account Settings has un-checked the 3 items:

check for new messages at startup*: DISABLED
check each xx minutes for new messages*: DISABLED
notify me instantly when new messages arrive on server*: DISABLED

Therefore it is expected:
The email should not have arrived in Inbox, - so there would not be any notification nor any filter moving anything.
But this happened:
The email did arrive in Inbox, - so there was a notification and therefore filter moved email to designated folder.

Anje,
If the three items are disable (not ticked/checked) the account is almost disabled. However, if you select (visit) a folder (e.g., INBOX) any new mail will still be fetched. So to effectively disable an account you have to not select/visit any folder of the account that can receive new mail.
I have about 20 accounts (mostly for tb test purposes but some do receive new mail) and I typically only "enable" the one I am testing by setting the 3 items and un-setting them on all the others.
It would require an enhancement to TB to truly disable an individual account so the even selecting a folder disables fetch of new mail.

Need to know:
Is it impossible to turn off IDLE, so if server 'PUSH' email, then Thunderbird will get notification and download whether user wants it or not and none of those three settings has any effect?

Not sure what you are asking here. If IDLE is enabled for the account and the server supports it you will get a notification of new mail if the folder is in "imap selected" state. However, only INBOX is typically always in select state but still only if you enable "check for new messages at startup" or if you visit INBOX.

Therefore, going 'Offline' the only way to prevent auto downloads for imap account.

I guess you could say going offline disables an account, but it disable all accounts and you won't get any downloads. I think other clients allow disable of individual accounts -- maybe Evolution.

To throw one more variable into the mix, there is the concept of "autosync". It causes all new mail in a folder to be downloaded and stored in mbox/maildir file(s) when the folder is selected and autosync defaults to enabled. With autosync disabled (in about:config prefs) message bodies are only downloaded and stored to file(s) when each is individually opened. But I don't think this is relevant to your question.

Flags: needinfo?(gds)
Severity: normal → S3

Hi -- for now, may I confirm this bug and workaround, hoping this may help others finding about this... faster than I did. :)

Given Thunderbird 102.3.0 (from Debian, here) :

  • with 3 IMAP accounts, 2 of them with the "Notify" checkbox explicitly unchecked in their respective Server settings (en français : « Autoriser les notifications instantanées lorsque de nouveaux messages arrivent ») ;
  • and despite these preferences being correctly stored in the profile, e.g. "mail.server.server2.use_idle = false" (default : true) if I understand this correctly ;

then, anyway, all notifications/alerts are produced for all 3 accounts, thus ignoring entirely the user preferences.

Workaround for this use case :

  1. Install FiltaQuilla (version 3.5, here) from Thunderbird Addons manager ;
  2. In FiltaQuilla preferences, check the box for "Do Not Notify" at the top right (here, I also unchecked other actions I found activated by default);
  3. For each of the 2 accounts to be silenced, create a new filter rule, as follow :
  • condition : e.g. "Subject", "does not contain", "always true... workaround for bug 334483, using FiltaQuilla action" :)
  • when : upon reception only
  • action : "Do Not Notify"

WorksForMe© Thanks for all the fish in this thread.

See Also: → 1794779
You need to log in before you can comment on or make changes to this bug.