junk status not shown for courier imap servers

RESOLVED FIXED

Status

RESOLVED FIXED
15 years ago
10 years ago

People

(Reporter: mscott, Assigned: Bienvenu)

Tracking

Trunk
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

15 years ago
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
(Assignee)

Comment 1

15 years ago
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?
(Assignee)

Comment 2

15 years ago
taking - I'm going to try to do this this weekend.
Assignee: scott → bienvenu
(Assignee)

Comment 3

15 years ago
Created attachment 130416 [details] [diff] [review]
work in progress

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.
(Assignee)

Comment 4

15 years ago
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.

Comment 5

15 years ago
FYI: the latest versiona of courier-imap (2.1+) DO support the IMAP keyword
extension . . .
(Assignee)

Comment 6

15 years ago
Created attachment 131564 [details] [diff] [review]
proposed fix

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.
(Assignee)

Updated

15 years ago
Attachment #131564 - Flags: superreview?(scott)
(Reporter)

Comment 7

15 years ago
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+
(Assignee)

Comment 8

15 years ago
thx, no, GetMDBRow() definitely doesn't do an AddRef :-)

I've cleaned up the pre-existing tabs in that file.
(Assignee)

Comment 9

15 years ago
fix checked in - and Scott says it works for him...
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
(Reporter)

Updated

15 years ago
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.