Open Bug 42456 Opened 25 years ago Updated 16 years ago

Changes not written to IMAP INBOX at mailnews shutdown if browser still open

Categories

(SeaMonkey :: MailNews: Backend, defect, P3)

defect

Tracking

(Not tracked)

Future

People

(Reporter: BenB, Unassigned)

References

Details

(Keywords: helpwanted, imap-interop, Whiteboard: [nsbeta3-])

Attachments

(1 file)

Reproduce: 1. Use a standalone biff (not Netscape or Mozilla) 2. Send an email to your IMAP account (I use UW-IMAP) 3. Open Mozilla Mailnews (via |-mail|) 4. Read all new msgs 5. Open Navigator via the Task menu 6. Close all Mailnews windows 7. Ask the standalone biff to update 8. Close the browser 9. Ask the standalone biff to update Actual result: - After step 7: - The biff still notifies about new mail, because it thinks, there were new mail (but you already read all) - After step 9: - The biff stops notifying Expected result: The biff already stops notifying after step 7. Additional comments: Bug 28355 is related (update even after |Get Mail|).
Summary: Changes not written to IMAP INBOX if browser still open → Changes not written to IMAP INBOX at shutdown if browser still open
i'm not sure if this is a biff issue or an imap flags issue? re-assigning to gayatri. If it doesn't look like biff, feel free to bounce this back to me or bienvenu gayatri.
Assignee: mscott → gayatrib
cc'ing bienvenu. Before I reassign this back, I just want to know what the biff code could be doing to cause this so we could investigate. It seems to me that once we've downloaded all of the headers and read them in steps 3+4, that the biff visual code is out of the picture and that we must must not be doing whatever it takes to let the imap server know that we've downloaded all of the headers.
moving to future milestone.
Target Milestone: --- → Future
*sigh* This bug is important for interop with other mail clients running against the same account, including biffs. Example setup (happens to be mine): - Browser is open all day (unless it crashes) - A standalone biff is running in the Taskbar equivalent - A mail comes in. biff plays animation. - User selects Tasks|Mail and newsgroups - User reads mail - User closes Mailnews (but still has other browser windows open) - User wants biff to stop. It doesn't. - User is annoyed - A new mail comes in - Since the biff notified all the time although no new mail where there, the user doesn't know that there is new mail. biff is useless. Summary: This bug makes operation in the example setup (see above) impossible. Need to be fixed for release. nsbeta3 nomination.
Keywords: interop, nsbeta3
s/where/were I should note that this setup is quite common, at least under Unix users.
Status: NEW → ASSIGNED
Keywords: mail2
- per mail triage. Adding to helpwanted keyword list.
Keywords: helpwanted
Whiteboard: [nsbeta3-]
I cannot close the browser just to make the biff stopp notifying. I need the standalone biff. The product is unusable for me with this bug. I cannot fix it - it is in the networking tier. Please reevaluate.
Whiteboard: [nsbeta3-]
BTW: This bug is propably just a symptom of an arch bug. If I open the browser, open Mailnews and close (just Mailnews), it should be as if Mailnews were never started.
mail triage marking [nsbeta3-]
Whiteboard: [nsbeta3-]
So, guys, what am I supposed to do? Drop the biff, or what? Or drop Mozilla? OK, I'll nominate bug 28355, maybe that is easier to implement.
Another reason to fix this bug: No other client can write to the folder until the connection is closed. So, it also harms interop with other mail clients (e.g. 4.x).
Keywords: mozilla1.0
sorry for the extra email. Removing mail2 keyword.
Keywords: mail2
This may need to be a preference - many people will want biff to be running after shutting down the last mail/news window (as it has in every Netscape product since 2.0). Another possibility is when we implement offline, the user can bonk the offline icon to force the client to close any imap connections, which should make biff stop. Also, the UW server, AFAIK, will kick existing imap connections off if a new connection is attempted - it doesn't lock out new connection attempts, unless this has changed.
Keywords: nsbeta3mail3
bienvenu, can't we make it dependant on the 2 variables you mentioned? I.e. if either (biff is disabled and all Mailnews windows are closed) or the user enables "offline", the connections are closed?
marking nsbeta1-
Keywords: nsbeta1-
-> default qa and assignee
Assignee: gayatrib → mscott
Status: ASSIGNED → NEW
QA Contact: lchiang → huang
Does attachment 54335 [details] [diff] [review] makes sense? I'm not sure of few things: 1. What about biff service in that case 2. Is it better to send offline-status-changed notification to mailnews (don't think so) 3. Do I need new preference, or it's possible to reuse some existing prefs...
BTW, shouldn't description be changed? This bug not about not writing changes now, but about closing connectons... ;-)
> 1. What about biff service in that case Maybe close only, if the biff pref is off? OTOH, there might be way more connections open than biffs needs. > 3. Do I need new preference If so, it should be hidden. Unfortunate. > BTW, shouldn't description be changed? This bug not about not writing changes > now, but about closing connectons... ;-) No, since writing out changes was the most important thing. If you don't achieve that, you didn't fix the bug and should maybe file a different one. bienvenu, is that in your area?
Keywords: patch
I don't think that changes are not written. As far as I remember, IMAP spec says that fetching message body implicitly sets Seen flag. But I don't insist on that statement, let me refresh my memory first :-) BTW, what IMAP server you use?
> what IMAP server you use? UW
yes, fetching a message marks the message read, but the server doesn't have to commit that state unless the client asks the server to (by either closing the connection, or explicitly issuing a check command). And as I mentioned earlier, the UW server, in certain configurations, will drop the first connection, and all its state, if a second connection is made to the same folder.
I tested UW server with another mail client and its behaviour is the same. I used gbuffy biff client. The problem is that biff client checks mailbox with STATUS INBOX (MESSAGES RECENT) command (w/o selecting inbox). RECENT flag cannot be changes by client; it not changed by server during the session either (until CHECK or CLOSE). But IMAP spec says that "A checkpoint MAY take a non-instantaneous amount of real time to complete." I don't think that sending CHECK command every time is a good idea.So the best we can do is to close all connection upon closing last messenger window (based on user preference).
If CHECK (or CLOSE?) is the only way to reliably write out the changes, then you must do that (to fix this bug). *shrug* - Or did I misunderstand something?
My patch closes all connections (so CLOSE command sent to server and external biff notised the changes). May be someone from mailnews team can add few words here? (Is it okay to CHECK everytime, or just close connection, wharever) On the other hands, this bug may be covered by bug 95130 (Mailnews stays in RAM after being closed) - if you unload mailnews, you probably don't want to keep open connections, except for biff service, buf biff doesn't need to SELECT inbox....
It's not OK to "CHECK everytime", if you mean whenever we do anything with the server, issue a check command, because that will hurt server performance. Our biff service does keep the inbox in the selected state, so we cannot keep biff working after closing the inbox.
Okay, "close connections upon closing last mail window, if user wants so" then? What about patch in that case? :-)
> It's not OK to "CHECK everytime", if you mean whenever we do anything with the > server, issue a check command, No, I meant "issue CHECK whenever the last Mailnews window has been closed". (Assuming that CHECK is the only reliable way to write out changes.) I don't think we need a pref for that, unless it's a noticable perf hit.
Please remove 'patch' from keyword - it's need to be reworked
Attachment #54335 - Flags: needs-work+
Looking at this bug now, I'd add commitState to nsIInconingServer and upon closing last window either close connection to server if user don't want biff it or call this method if user wants biff. commitState will do nothig for all servers except IMAP one, for which it should issue CHECK command...
QA Contact: huang → meehansqa
Summary: Changes not written to IMAP INBOX at shutdown if browser still open → UW IMAP:Changes not written to IMAP INBOX at shutdown if browser still open
Not limited the UW IMAP, I think.
Summary: UW IMAP:Changes not written to IMAP INBOX at shutdown if browser still open → Changes not written to IMAP INBOX at shutdown if browser still open
I'm surprised this had only one vote before I cast mine. Everytime I shutdown Win2k, if I haven't remembered to close Mozilla first, I lose all changes to my inbox, as this bug's summary aptly describes. I appreciate any work towards fixing this bug and am willing to help in any way I can with testing -- I use Mozilla 1.1 on RedHat 7.3, Win2k, and OS X 10.1.
if we're not closing the imap connections when you shut down win2K with mozilla open, that means that mozilla is not handling the request for app shutdown correctly when win2K is shut down. It should be just like the normal app close as far as the imap code is concerned - we should get a shutdown notification, at which point we will close our imap connection(s). There is a known problem if you shut down mozilla with Ctrl C on linux - Mozilla doesn't catch that and tell the imap code to shut down cleanly, but that's a different problem.
There is nowadays code to do a periodical checkpoint, maybe it helps this at least a bit, although I've also seen recent changes getting lost when shutting down Windows.
OS should probably be changed to "All", since I see this on Win2K with build 2003031304. In addition to read messages being marked unread again, deleted and moved messages that weren't purged seem to reappear in the Inbox.
OS: Linux → All
Hardware: PC → All
Blocks: 95130
*** Bug 87825 has been marked as a duplicate of this bug. ***
Blocks: 139412
*** Bug 130883 has been marked as a duplicate of this bug. ***
*** Bug 124224 has been marked as a duplicate of this bug. ***
*** Bug 139412 has been marked as a duplicate of this bug. ***
*** Bug 131747 has been marked as a duplicate of this bug. ***
No longer blocks: 95130
*** Bug 95130 has been marked as a duplicate of this bug. ***
Changed Summary from: Changes not written to IMAP INBOX at shutdown if browser still open to: Changes not written to IMAP INBOX at mailnews shutdown if browser still open because mailnews stays in RAM
No longer blocks: 139412
Summary: Changes not written to IMAP INBOX at shutdown if browser still open → Changes not written to IMAP INBOX at mailnews shutdown if browser still open because mailnews stays in RAM
Blocks: 95130
Summary: Changes not written to IMAP INBOX at mailnews shutdown if browser still open because mailnews stays in RAM → Changes not written to IMAP INBOX at mailnews shutdown if browser still open
Product: MailNews → Core
this is a suite bug only now, I'd say, first of all. standalone biff was a separate application in 4.x that checked a user's accounts for new mail. The issue, as I remember, is simply that closing the last mailnews window when you had both browser and mail windows open, didn't shutdown the mail connections, thus telling the imap server to flush its state.
Component: Networking: IMAP → MailNews: Main Mail Window
Product: Core → Mozilla Application Suite
Assignee: mscott → mail
QA Contact: meehansqa
OK, but does standalone biff (a separate application) even exist anymore either in reality or on some SM suite plan? If not in reality, then this shouldn't this be marked as an enhancement request?
Is the following an accurate summary of what is requested? ... "add preference option to cleanly terminate all mailnews / imap operations at closing of last mailnews-related window and browser still open"
Severity: normal → minor
Keywords: mail3
No. Comment 8 describes it accurately. Thunderbird delivers that, but seamonkey users would still suffer from it. This severely hampers using 2 IMAP clients (on different machines or just any "new mail" check tool), and leads to uncommited changes when the client crashes or is killed.
Severity: minor → normal
> does standalone biff (a separate application) even exist anymore Yes, there are countless biffs out there, in GNOME, KDE, even my wireless phone can notify me about new email in account. All these keep notifying until a flush happens.
I don't see the distinction you are trying to make in comparison to comment 8. Are you asking for the connection / mailnews to stay alive but something needs to be flushed (comment 44)? Comment 8 doesn't state nor imply that.
No. When all mail windows are closed, all connections (that these windows used) should be flushed and closed.
Assignee: mail → nobody
Component: MailNews: Message Display → MailNews: Backend
QA Contact: mailnews-backend
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: