Closed Bug 767051 Opened 12 years ago Closed 11 years ago

Draft appears as new incoming message in popup notification

Categories

(Thunderbird :: Mail Window Front End, defect)

12 Branch
x86
Windows 7
defect
Not set
major

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 687140

People

(Reporter: firstpeterfourten, Unassigned)

References

(Blocks 1 open bug)

Details

When I am composing a draft e-mail on an IMAP account, and the message is saved as draft, the next time e-mail is checked on this account, I get a New Mail Alert popup notification showing a few of the newer unread messages. 

Invariably, the message I am currently drafting is among these.  It is a new message in the Drafts folder on the IMAP server, so I understand why Thunderbird might think it's a new message deserving a popup alert.  

However, it seems a little silly and confusing to inform me of a new message that I've just received when I'm still typing it.  It often leads me to wonder if the message was actually sent inadvertently before completion (which could be pretty bad, depending on the message).

Suggested change: If new messages are in the Drafts folder, don't show the new message alert.

The Drafts folder might be determined by name or at the least by "this is the folder where drafts are saved to, in this instance of Thunderbird on this machine."
Blocks: tb-drafts
WBT, is this a regression?

I never use notifications, but this must be incredibly annoying for people who do. Half temped to mark this major.
(In reply to Wayne Mery (:wsmwk) from comment #2)
> WBT, is this a regression?

I tested it on Thunderbird 3.1.9 and the same thing happens, so I don't think this is a regression.


> I never use notifications, but this must be incredibly annoying for people
> who do. Half temped to mark this major.

Fortunately, it only does this when there are other new messages, so it is not as annoying as it could be (unless you continuously receive new mail).  I am surprised there are not more complaints about this as it is annoying, and fairly odd behavior.
Personally, I would mark this major.
Every time I'm writing a draft, I see a popup notification and it's on the same topic and looks like the same topic as what I'm writing (as it is, exactly the same) and I think "oh!  That person who I'm writing to right now on this topic must have just sent me a message about it; I should read that before I send this message I'm currently composing, as the new information may change what I'm writing!" 

I do get e-mails all the time - hundreds per day - and used to just turn notifications off, but then it would happen that somebody would write me while I was responding, and I looked pretty foolish send a message five or ten minutes *after* new information came in that would have changed my conclusion.  Of course, with all the false alarms, the notifications are not especially useful.

It may be a regression from version 2 or previous, but I'm not sure.
Severity: normal → major
Essentially, this bug is for same phenomenon as bug 673400.
And, bug 671232("new mail alert in Tb" case) is already closed as dup of that bug, and bug 676249(also "new mail alert in Tb" case) is kept open for ease of duping of complaint only bugs("improvements in new mail alert side" request or "configuarable \Seen flag of draft mail" request is unclear), and bug 687140 is an example of "improvements in new mail alert" request instead of "configuarable \Seen flag of draft mail" request by bug 673400.

To WBT(bug opener) and Wesley Hardman:

What is difference of this bug from above already known bug reports?

In Tb, "new mail alert for IMAP draft mail without \Seen flag" occurs only when automatic new mail check is enabled for Drafts folder.
Why you enable automatic new mail check of IMAP Drafts folder?
(In reply to WADA from comment #5)
> Essentially, this bug is for same phenomenon as bug 673400.
> And, bug 671232("new mail alert in Tb" case) is already closed as dup of
> that bug, and bug 676249(also "new mail alert in Tb" case) is kept open for
> ease of duping of complaint only bugs("improvements in new mail alert side"
> request or "configuarable \Seen flag of draft mail" request is unclear), and
> bug 687140 is an example of "improvements in new mail alert" request instead
> of "configuarable \Seen flag of draft mail" request by bug 673400.

this would seem to be a duplicate of one of the above.

> To WBT(bug opener) and Wesley Hardman:
> 
> What is difference of this bug from above already known bug reports?
> 
> In Tb, "new mail alert for IMAP draft mail without \Seen flag" occurs only
> when automatic new mail check is enabled for Drafts folder.
> Why you enable automatic new mail check of IMAP Drafts folder?

for me, I have not set drafts to check for new mail - folder pref is not set, and mail.server.default.check_all_folders_for_new is false.
(In reply to WADA from comment #5)
> Essentially, this bug is for same phenomenon as bug 673400.
> And, bug 671232("new mail alert in Tb" case) is already closed as dup of
> that bug, and bug 676249(also "new mail alert in Tb" case) is kept open for
> ease of duping of complaint only bugs("improvements in new mail alert side"
> request or "configuarable \Seen flag of draft mail" request is unclear), and
> bug 687140 is an example of "improvements in new mail alert" request instead
> of "configuarable \Seen flag of draft mail" request by bug 673400.
> 
> To WBT(bug opener) and Wesley Hardman:
> 
> What is difference of this bug from above already known bug reports?

In general, it does seem to be quite similar, especially reading Comments 3 and 22. However, the proposed resolution in 673400 is a configuration bit for whether drafts are marked read or unread (e. g. see Mark Banner's Comment 19).  The discussion about interoperability with Gmail notifications is considerable, possibly primary, which may obscure a solution.  WADA, you wrote in Comment 14 that "[other] bugs are for change of new mail notfication behavior of Tb, but this bug [673400] is for issue of unwanted new mail alert(s) at Android Smart Phone on draft mail saved by Tb(\Seen flag is not stored by Tb, then Android Smart Phone shows alert for the draft mail at Smart Phone.)"

The question of whether to mark drafts read or unread or configurable should be independent of this bug.  Here, I am seeking to exclude the Drafts folder from new mail popup notifications.  I acknowledge there may be good reason to mark drafts as unread even if the semantics don't make sense and saving them as read would fix this problem, but either way the Drafts folder should be excluded from popup notifications. 

Those bugs are also reported to be regressions with OK behavior in TB3 (see Bug 673400 Comment 3 and 676249 Comment 1 and Bug 687140 Comment 0 or 10), contradicting Wesley Hardman's Comment 3 here.  676249 Comment 3 indicates that's a Linux-only bug which I am observing here on Windows.  Probably, somebody is just wrong about 3.x behavior and that doesn't seem super-important anyway, but it is another distinguishing aspect of the discussions.

> In Tb, "new mail alert for IMAP draft mail without \Seen flag" occurs only
> when automatic new mail check is enabled for Drafts folder.
> Why you enable automatic new mail check of IMAP Drafts folder?

In my config, like Wayne's, the option "When getting new messages for this account, always check this folder" is DISABLED, and mail.server.default.check_all_folders_for_new is false.
See Also: → 687140, 673400, 676249, 671232
(In reply to WBT from comment #7)
> In my config, like Wayne's, the option "When getting new messages for this
> account, always check this folder" is DISABLED, and
> mail.server.default.check_all_folders_for_new is false.

If so, new mail alert on draft mail is perhaps by new mail notification via IDLE.
(1) By draft save, Drafts folder is selected at a cached connection.
(2) append draft mail to Drafts folder with no \Seen flag
(3) IDLE 
(4) By IDLE, IMAP server sends unsol response to client for the newly added mail
(5) Because of no \Seen flag, new mail alert is shown

Bug 673400 is request for improvement at step (2).
Bug 687140 is request for improvement at step (5).

If Tb user enables "automatic new mail check" of the IMAP account, following is a simple workaround at step (3)/(4) by user.
(a) mail.server.default.check_all_folders_for_new = false
(b) Enable "When getting new messages ..., always check this folder" of
    all folders of the IMAP account for which you want new mail alert.
(c) Disable "When getting new messages ..., always check this folder" of
    Drafts folder of the IMAP account.
(d) Disable IDLE command use(Server Settings/Advanced)
You already did (a) and (c). 

However, above workaround may not work if namespace="INBOX/" or "INBOX." is used by IMAP server, because Drafts is a subfolder of Inbox in this case.
I am in the case you described where the workaround wouldn't work; Drafts is a subfolder of INBOX.  I also have hundreds of other folders that are subfolders of INBOX (and each other) and regularly add new ones, so anything that requires a per-folder setting would not work for my use case.

I would like an option to simply exclude the DRAFTS folder (wherever Thunderbird is set to autosave drafts too) from the new message notification, or at the least have a user option (probably in the place where you set the drafts folder) to do this, probably in the requested state by default.
(In reply to WBT from comment #9)
> I am in the case you described where the workaround wouldn't work;
> Drafts is a subfolder of INBOX. I also have hundreds of other folders that are
> subfolders of INBOX (and each other) and regularly add new ones, so anything
> that requires a per-folder setting would not work for my use case.

Bug 522657 is for opposite result : no new mail alert for sub folders under Inbox. And, per folder "When getting new messages ..., always check this folder" and mail.server.default.check_all_folders_for_new=true is guided in it.
However, IIRC, I read bug report which is for "new mail check is always done for subfolder of Inbox" in the past, similar to your comment, I'm not sure though.
I don't know which is Tb's current behavior.

WBT, actually the workaround won't work? Please note that there are known problem like "new mail check of a folder is not stopped until restart of Tb after setting change".

With which Tb release?
I can see Tooltip like new message list upon hover on Inbox, Inbox.AAA etc. in my Tb 17 with IMAP account who uses namespace="INBOX.". But no annoying, repeated pop-up-type new mail alert is seen.
(In reply to WADA from comment #5)

> To WBT(bug opener) and Wesley Hardman:
> 
> What is difference of this bug from above already known bug reports?

I specifically only see this when I receive a new message (other than the draft), and EVERY time I see a new message, until there is no longer a new draft message.  The other bug reports appear to be about receiving a notification for the draft message by itself. 

> In Tb, "new mail alert for IMAP draft mail without \Seen flag" occurs only
> when automatic new mail check is enabled for Drafts folder.
> Why you enable automatic new mail check of IMAP Drafts folder?

My settings are the same as WBT's and I believe they are the default settings for Tb.


(In reply to WBT from comment #9)

> I would like an option to simply exclude the DRAFTS folder (wherever
> Thunderbird is set to autosave drafts too) from the new message
> notification, or at the least have a user option (probably in the place
> where you set the drafts folder) to do this, probably in the requested state
> by default.

This is what I would expect to happen, and AFAIK no other email client displays new mail notifications for draft messages.
(In reply to Wesley Hardman from comment #11)
> I specifically only see this when I receive a new message (other than the draft) (snip)

As written in Bug Summary of this bug,
> Bug summary of tis bug : Draft appears as new incoming message in popup notification
and as written in any comments posted by other than you,
this bug is apparently/clearly for "unwanted new mail alert on IMAP Drafts folder after change by bug 470746 which doess't store \Seen flag upon draft mail save any more".
Why can your problem be relivant to this bug even though your problem is on other than draft?
(In reply to WADA from comment #12)
> (In reply to Wesley Hardman from comment #11)
> > I specifically only see this when I receive a new message (other than the draft) (snip)
> 
> As written in Bug Summary of this bug,
> > Bug summary of tis bug : Draft appears as new incoming message in popup notification
> and as written in any comments posted by other than you,
> this bug is apparently/clearly for "unwanted new mail alert on IMAP Drafts
> folder after change by bug 470746 which doess't store \Seen flag upon draft
> mail save any more".
> Why can your problem be relivant to this bug even though your problem is on
> other than draft?

I am going to re-open my original bug 809513 as I don't think what I am seeing is the same as this bug.
FYI: the Linux version suffers from the same bug.
Blocks: 809513
No longer blocks: 809513
Depends on: 809513
This bug reports many problems...
(A) Bug 673400
    Tb saves draft mail with no \Seen flag.
(B) Due to (i), new mail alert(s) at Android Smart Phone happens
    on draft mail saved by Tb.
(C) Bug 809513 (that bug focuses on following only)
(C-1) Because "newest draft with no \Seen" is considered "new mail"
      by Tb upon message /flag fetch just after draft save,
      state of "Mbox has new mails" is set in Drafts folder.
(C-2) Because "New mail alert by Biff" shows new mails in Mbox
      flagged as "mbox has new mails",
      "newest draft mail in Drafts" is shown by new mail alert
      due to (C-1), until the newest draft mail is read or Drafts folder
      is re-opened by "Click other folder, then click Drafts again".

As for (B), I don't think solution other than Bug 673400 exists.

As written in Bug 809513, (C-1) and (C-2) is never Drafts only phenomenon.
If "new mail" is detected via IDLE, or is detected by periodical new mail check by auto-sync, (C-1) and (C-2) occurs on any Mbox, even when new mail check of the Mbox is disabled..

(In reply to WBT from comment #0)
> Suggested change: If new messages are in the Drafts folder, don't show the new message alert.

Other possible solutions.
(i)  Show new message in an Mbox only when "new mail check" is enabled
     for the Mbox and "new mail check every NN minutes" is enabled.
(ii) Don't set "Mbox has new mails" flag of Drafts, Templates, ...
(In reply to WADA from comment #15)
(i) doesn't seem like a good solution if the user values seeing notifications of new messages in folders other than Drafts, Templates, ...
(ii) sounds better, though I am not familiar enough with this code to know just how that flag is used.
(In reply to WBT from comment #16)

"New mail", "Mbox has new mails", what I called. 
(a) mail of nsMsgMessageFlagType==New in msgDBHdr.flags.
    => "new icon" is shown at left of Subject in Thread Pane
(b) nsIMsgFolder.hasNewMessages=true of an Mbox(isServer==false).
    true is set if a mail in the Mbox has nsMsgMessageFlagType==New.
    => "New icon" is shown in folder icon at Folder Pane
(c) nsIMsgFolder.hasNewMessages=true of IMAP account(isServer==true).
    true is set if an sub folder is hasNewMessages=true.
    => "New icon" is shown in folder icon for account at Folder Pane
Read Bug 770050 Comment #13, please.

One of causes of "New mail alert for newest draft after change by bug 470746" is above (a) for "newly saved draft mail".
So, following is possible solution of this bug for "New mail alert on newly saved draft mail".
(1) Don't do (a) on newly saved draft mail.
(2) Don't do (b) on IMAP Drafts.
(3) Don't do (c) if IMAP Drafts.
(4) Don't show draft mail in "New mail alert" by Biff.

IIRC, purpose of change by bug 470746 is "Unread state of newest draft" instead of "New mail state of newest draft".
So, I think solution should be above (a).

"Which solution is needed" depends on requirement on "new mail alert for newest mail saved by other IMAP client".
When a draft mail is saved by other mail client, "new mail alert" for it should be shown? Or shouldn't be shown? Or it should be configuarable?
Sorry, typo.
  So, I think solution should be above (1), don't do (a) if draft.
As for "new mail with Unread status appended by other mail client or server",
as far as New mail==larger UID than HigestUID && no \Seen, no \Deleted,
I think following is pretty normal and reasonable request.
(5) Don't show new mail alert, if new mail check for an Mbox is not
    requested by user.
    Exclude new mail in Mbox of "no new mail check" from "New mail
    alert by Biff".
So, I think (5) is a reasonale solution of this bug.
- If user enables new mail check for Drafts,
  newly saved draft by any IMAP client is shown by new mail alert
  by Biff.
- If user disables new mail check for Drafts,
  newly saved draft by any IMAP client is not shown by new mail alert
  by Biff.
As for "auto-saved draft mail with no \Seen" case, add-on like following can be a workaround.
  Different draft folder for auto-save, local Drafts folder for auto-save.
See Bug 809513 Comment #4 and bug pointed in it, please.
To WBT(bug opener): 

What is essential difference of this bug from bug 676249 and/or bug 687140?
Bug 687140 seems to be caused by a "bug" and this one seems to be caused by a "feature." 

Bug 676249 is explicitly Linux, not Windows (Comment 3); I'm running on Windows; and that bug has some clarity issues that make it hard to tell just what it's about.

I do not hear any new message alert as reported in these other two, but I may have disabled that. 

However, fixing those other ones might fix this one too, or at least make significant progress.
(In reply to WBT from comment #22)
> I do not hear any new message alert as reported in these other two,

What do you call by "popup notification" in your bug summary?
(a) toaster popup which is shown at right bottom of desktop
    just before task-tray icon for new message is shown on Win
(b) new message list shown by task-tray icon click 
(c) tooltip like popup for new messages which appears on mouseover
    of an Mbox
(d) other

I call (a) "new mail alert". (b) is shown after (a), so (b) is also "new mail alert" which I called.

> but I may have disabled that.

Your mail address is xxx@gmail.com. Your problem is with Gmail IMAP?
If yes, see Bug 885220.
(a) toaster popup like this one (which is a selection from a random Google Image search): http://www.eweek.com/imagesvr_ce/eweek/images/slide/197225_3.jpg

I do not use Thunderbird for this bug mail-receiving Gmail account.  I observe this with other non-gmail IMAP accounts.
(a) toaster popup like this one (which is a selection from a random Google Image search): http://www.eweek.com/imagesvr_ce/eweek/images/slide/197225_3.jpg

I do not use Thunderbird for this bugmail-receiving Gmail account.  I observe this with other non-gmail IMAP accounts.
After change by bug 470746(save draft mail without \Seen flag), many bugs like bug 676249 were opened.
They are categorized to two types:
(a) bug 673400 : Request of a way to save draft with \Seen flag.
(b) bug 687140 : Request of "stop wrong new mail alert" on draft mail.
    Unread of draft is acceptable, and is never wrong.
    However, "New Mail" status of saved draft mail is wrong
    and "New mail alert" on saved draft mail is wrong,
    at least at Tb where the draft mail is saved.
    This is similar to bug 661239, but fix of that bug was Linux only.

You refer to "new mail alert" only since initial.
Closing as dup of bug 687140.

If your case is specific case like following,
  When draft mail is saved without \Seen flag in IMAP Drafts folder,
  "New mail" state is set in msgDBHdr of the saved draft mail
  at Tb where the draft mail is saved.
  Then, at Tb where the draft mail is saved, the draft mail is shown
  in "new mail alert"(popup new mail notification) which is shown
  when new mail arrived at Inbox.
duping to Bug 809513 may be better(see bug 809513 comment #4 for Steps to Reproduce).
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.