Hans Kristian Rosbach wrote:
On Mon, 2004-11-01 at 14:41, Paul J Stevens wrote:

I know I use copy *a lot*, and I know many people who use client-side filtering for sorting and spam-filtering. Copying must be as fast and cheap as possible.


So you can have two spam mails instead of one? Or is this in conjunction
with wanting to move the message? If so, then I can see your point.

Yep. Moving a message, for instance with thunderbirds junk-mail handler, triggers a COPY/DELETE action.

But I still don't see the physmessages table helping that at all.

It allows copying in a single query that doesn't touch the messageblks table at 
all:

        /* Copy the message table entry of the message. */
        snprintf(query, DEF_QUERYSIZE,
                 "INSERT INTO %smessages (mailbox_idnr,"
                 "physmessage_id, seen_flag, answered_flag, deleted_flag, "
                 "flagged_flag, recent_flag, draft_flag, unique_id, status) "
                 "SELECT '%llu', "
                 "physmessage_id, seen_flag, answered_flag, deleted_flag, "
                 "flagged_flag, recent_flag, draft_flag, '%s', status "
                 "FROM %smessages WHERE message_idnr = '%llu'",DBPFX,
                 mailbox_to, unique_id,DBPFX, msg_idnr);


Now the same set of messageblk rows is used by different message rows.



Still I see no use for answered_flag etc in Mailboxes?

I'm guessing here that those flags were introduced with certain optimizations in mind. The imap commands status and examine could access those fields in stead of checking all messages in a mailbox. But you are right in so far as that they don't seem to be actively used in the code.


I see that that could be necessary for seen_flag and deleted_flag maybe.
But never answered_flag.. Who would ever answer to an entire mailbox?

I misunderstood the rfc. Querying a mailbox for flags using STATUS or EXAMINE must return the flags for a mailbox. If I understand the rfc correctly this determines the flags that may be used on messages in a mailbox by clients accessing that mailbox.


--
  ________________________________________________________________
  Paul Stevens                                         [EMAIL PROTECTED]
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands_______________________________________www.nfg.nl

Reply via email to