Hi Andy,

Andreas Aardal Hanssen wrote:
Mailbox* foo = depot.get("INBOX/foo");


That line asks the depot to get a Mailbox * object that matches the type
of INBOX/foo. What you would usually get is either a 0-object or a Maildir
* object.

this clears me up. the argument represents the type of folder, not folder itself. this was what i was misunderstanding :-(



   Mailbox* bar = depot.get("INBOX/bar");
   bar->imapSelect(depot.mailboxToFilename("INBOX/bar"));
   Mailbox::iterator e2 = bar->end();
   for (Mailbox::iterator i2 = bar->begin(); i2 != e2;++i2) {
     Message & message = *i2;
     logger << "INBOX/bar: " << message.getID() << endl;
   }
 }


That code is supposed to work ;-) although it's quite inefficient but I guess you know that. I'll take a look and see if I can make it work.

yeah, that'd be nice. it seemed that the inner loop destroyed something of outer loop and ended up accessing somewhere wrong.



if you copy or move a read message to other folder, it will appear as unread.


Yes, that is a problem today. The easiest approach I can think of is that
the COPY operator stores the flags on the messages as they are written to
new/ in the Maildir. I have no idea wether this is allowed or not in
Maildir, but if there is no direct indication of this _not_ being allowed
I think we should post to [EMAIL PROTECTED] and see what the gurus say about
it.

the document, http://cr.yp.to/proto/maildir.html, doesn't clearly say that messages should be copied to new/ first, although it implies.


so, i think that we can copy files to cur/ directly as long as file names hold _info_.

btw, courier-imap copies files to cur/ not new/. we don't need to follow it but refering to it doesn't hurt us, does it? :-)


PS: The COPY, FETCH and APPEND operators suffer today from the incomplete Mailbox/Message design. Hacks to make the flags stuff work are fine, but
the code is likely to change. :-)

i see... how soon are you going to refactor those things? guess i should go easy for a while to see what will happen.


-- Hiroshima




Reply via email to