Re: open_mail, flags and synchronization

2004-06-10 Thread Mark Crispin
On Thu, 10 Jun 2004, Tomas Pospisek's Mailing Lists wrote:
"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?
That's not "Seen" status; that's "Recent" status or rather "not Recent" 
status.  "Seen" is "Status: R".

No, there is no way to get around the "not Recent" happening once the 
mailbox has been opened readwrite.  The definition of "Recent" is that the 
message has arrived since the last time the mailbox was opened readwrite.

-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.


Re: open_mail, flags and synchronization

2004-06-10 Thread Tomas Pospisek's Mailing Lists
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
---



open_mail, flags and synchronization

2004-06-09 Thread Tomas Pospisek's Mailing Lists
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.

Second question:
  some of my MH users say that re-mail_open'ing a MH store will make it
  forget all all removal flags.

  Is this a known bug/problem/feature. Is there a work around or should I
  try to fix c-clients source with respect to this?

Thanks a lot,
*t

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

-- 
--
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
--