Since Mark seems to be listening on the list, but there's no reply yet:
let's make the requirements a bit lighter and ask some more specific
questions. I'll cut this email in two, since it is two different
questions actually.

On Wed, 9 Jun 2004, Tomas Pospisek's Mailing Lists wrote:

> I'm trying to fix mailsync a mail synchronizer to properly work wrt to
> flags. I'm trying to accomplish this by using c-client.
>
> I need to:
>
> * read the headers in box A
> * read the headers in box B
> * determine from the header which emails I have already seen in what
>   inbox (same algorithm CVS is using)
> * copy all messages that A hasn't seen from B to A
> * copy all messages that B hasn't seen from A to B
> * delete all messages on B that were deleted on A
> * delete all messages on A that were deleted on B
> * expunge A
> * expunge B
>
> Now the mailsync source code is juggling with mail_open in a rather ugly
> way and I am not sure whether it is really succeeding in all cases
> to keep all the flags (especially "seen") intact on both A and B and at
> the same time trying to do that transparently with respect to where those
> boxes are (IMAP, mbox, mh, remote, locally, ...).
>
> So my first question is:
>   is there a way to achieve the above with c-client, that is guaranteed to
>   work? Basically this means:
>
>   * open a box for reading messages
>   * open a box for appending messages
>   * expunge a box
>
>   and at the same time keep all flags as they were.

"Expunging" a box will, AFAIK traverse all messages, look for those that
are marked for deletion and remove them. A side effect of this seems to
be, that all those traversed messages seem to get marked as "Seen" aka
"Status: O" ("old"). Is this a requirement of some sort? Isn't there a way
around it?

So if there isn't - can we fullfull our requirements, that is to leave all
flags alone, even the "Seen" one, if we don't expunge? Or can't that be
guaranteed even then?
*t

--
-----------------------------------------------------------
  Tomas Pospisek
  http://sourcepole.com -  Linux & Open Source Solutions
-----------------------------------------------------------

Reply via email to