Closed Bug 216612 Opened 22 years ago Closed 21 years ago

junk status not shown for courier imap servers

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mscott, Assigned: Bienvenu)

References

Details

Attachments

(2 files)

from an aim conversation with david: if we are talking to a server that does not support custom flags (like courier), could we easily fall back & store junk flag status in the summary file? David's answer on how we would do this: in the destination db, record enough information about the msg hdrs that got moved into it so that when we download the new headers, we'd recognize them as messages that need to have the flags set. if you switch machines, it'll fall down...but it would work OK for most users. it should be easy enough to only do this when the server doesn't support user defined keywords. We could probably just hash the headers and store the date header and use those two to match
there is an other possibility - if the imap server supports COPYUID, then we *will* know what the destination uids will be. Scott, if you generate a protocol log of copying messages between two imap folders on your server, does the copy response look like this? 5 OK [COPYUID 1055340261 121:124 16:19] Completed or does it just say 5 OK completed?
taking - I'm going to try to do this this weekend.
Assignee: scott → bienvenu
Attached patch work in progressSplinter Review
this cleans up some unused methods in the msg db code and starts work on a method for adding pending hdr info to imap db's. Remaining work is to actually set the properties in the db, to play back the changes when a matching hdr is added, and to hook up this call in the imap code.
I have the db code done; I just need to figure out where to hook it up in the imap code. Currently, the db code I've written only sets one custom property; that's probably sufficient for junk mail (we'd set the junk score) but it's not very general. Perhaps the thing to do is, in nsImapMailFolder::OnMessageClassified, if the destination is an imap folder, add a pending hdr to the dest folder. Unfortunately, we don't know at this point if the folder/server does support custom keywords because that information is only stored in the protocol object. We probably should store this kind of information in the imap folder object and/or the db.
FYI: the latest versiona of courier-imap (2.1+) DO support the IMAP keyword extension . . .
Attached patch proposed fixSplinter Review
oy gevalt, that was a little tricky. But it seems to work now. I made the db functionality fairly general, so you can set an arbitrary number of extra properties on pending headers, and those will be restored when the hdr is downloaded.
Attachment #131564 - Flags: superreview?(scott)
Comment on attachment 131564 [details] [diff] [review] proposed fix I take it: nsIMdbRow *row = msgHdr->GetMDBRow(); GetMDRow does not addref the returned result. 2) small spacing issue here: + attribute unsigned long supportedUserFlags;
Attachment #131564 - Flags: superreview?(scott) → superreview+
thx, no, GetMDBRow() definitely doesn't do an AddRef :-) I've cleaned up the pre-existing tabs in that file.
fix checked in - and Scott says it works for him...
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Blocks: 219336
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: