imap.myrealbox.com never sends FLAGS for FETCH BODY[]

RESOLVED FIXED

Status

RESOLVED FIXED
16 years ago
10 years ago

People

(Reporter: neil, Assigned: Bienvenu)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

16 years ago
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

16 years ago
Created attachment 129495 [details] [diff] [review]
Possible patch

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

16 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

16 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

16 years ago
the imap code knows what it's fetching. I have a patch coded up that I'll attach
tomrrow.
(Reporter)

Comment 5

16 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

16 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

16 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

16 years ago
Created attachment 129593 [details] [diff] [review]
possible fix

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

16 years ago
Created attachment 129600 [details] [diff] [review]
proposed fix

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

16 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

16 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

16 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

16 years ago
I've fixed all the indentation, but I attached a -uw diff.
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

16 years ago
Comment on attachment 129600 [details] [diff] [review]
proposed fix

Just tried this... so far, so good!
(Assignee)

Comment 16

16 years ago
fix checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.