Closed
Bug 215620
Opened 21 years ago
Closed 21 years ago
imap.myrealbox.com never sends FLAGS for FETCH BODY[]
Categories
(MailNews Core :: Networking: IMAP, defect)
MailNews Core
Networking: IMAP
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: neil, Assigned: Bienvenu)
Details
Attachments
(1 file, 2 obsolete files)
5.50 KB,
patch
|
sspitzer
:
review+
sspitzer
:
superreview+
sspitzer
:
approval1.5b+
|
Details | Diff | Splinter Review |
RFCs 1730 and 2060 say that a FETCH BODY[] sets the \Seen flag and SHOULD notify the UA that it has done so. However Mozilla only updates its internal database when the flags are sent, it does not assume that the flag is set. On some servers this means that a biff occuring after having read mail appears to mark the messages unread, although they are marked as read on the server.
Reporter | ||
Comment 1•21 years ago
|
||
Not sure that I've followed the RFC correctly, but it suggests that any FETCH BODY[ will set \Seen so I thought it best to fetch the FLAGS on every BODY[
Assignee | ||
Comment 2•21 years ago
|
||
I'd rather not always fetch the flags. It's just making more work for the server, especially in the case where the /SEEN flag is already set. My thought was just to update the /SEEN flag in the client uid-flag state array when we've finished a BODY FETCH command. I'll try to attach a patch this weekend for you to try. But first of all, does your patch fix the problem you were seeing?
Status: NEW → ASSIGNED
Reporter | ||
Comment 3•21 years ago
|
||
Well, the reason I did it that way is because I couldn't figure out how else to distinguish between a FETCH BODY[] and a FETCH BODY.PEEK[] as the response from imap.myrealbox.com is the same either way. I won't be able to test this until Monday at the earliest.
Assignee | ||
Comment 4•21 years ago
|
||
the imap code knows what it's fetching. I have a patch coded up that I'll attach tomrrow.
Reporter | ||
Comment 5•21 years ago
|
||
Well, my patch does work so far as I don't see any messages becoming unread, even when checking for new mail every minute.
Reporter | ||
Comment 6•21 years ago
|
||
Comment on attachment 129495 [details] [diff] [review] Possible patch No, this is no good. My second IMAP server doesn't set the \Seen flag if you explicitly fetch the flags at the same time :-(
Attachment #129495 -
Attachment is obsolete: true
Reporter | ||
Comment 7•21 years ago
|
||
Comment on attachment 129495 [details] [diff] [review] Possible patch No, this is no good. My second IMAP server doesn't set the \Seen flag if you explicitly fetch the flags at the same time :-(
Assignee | ||
Comment 8•21 years ago
|
||
this is roughly what I had in mind - I'm probably going to have to move the code that actually stores the seen flag in the flag and uid state but it should fix the problem for you in most cases.
Assignee | ||
Comment 9•21 years ago
|
||
this is my proposed fix - when we're fetching a single message for display, update our flag state to store the seen flag, in case the server doesn't do what it "should" :-)
Attachment #129593 -
Attachment is obsolete: true
Reporter | ||
Comment 10•21 years ago
|
||
Don't you have to do a check for nsImapMsgFetchPeek? Of course, if you only want to mark messages read when you display them, you could peek all messages, and then get the display to mark the message as read once it's completed loading, or perhaps 5 seconds after, for ex-Outlook users...
Assignee | ||
Comment 11•21 years ago
|
||
where I put the code, we're never peeking. re your second comment, yes, we could do that, if we ever felt it was high enough priority :-)
Reporter | ||
Comment 12•21 years ago
|
||
Well, possibly due to some very bad indentation in that file, I can't figure out why you're never peeking, so I'll just have to try it for myself tommorrow.
Assignee | ||
Comment 13•21 years ago
|
||
I've fixed all the indentation, but I attached a -uw diff.
Comment 14•21 years ago
|
||
Comment on attachment 129600 [details] [diff] [review] proposed fix r/sr/a=sspitzer for 1.5 beta bienvenu says he won't check in the change to src/nsImapUtils.cpp (it is part another bug).
Attachment #129600 -
Flags: superreview+
Attachment #129600 -
Flags: review+
Attachment #129600 -
Flags: approval1.5b+
Reporter | ||
Comment 15•21 years ago
|
||
Comment on attachment 129600 [details] [diff] [review] proposed fix Just tried this... so far, so good!
Assignee | ||
Comment 16•21 years ago
|
||
fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•