It would probably be more useful if you set OP_DEBUG in your mail_open() calls and collect the mm_dlog() events; this will show a protocol telemetry of what the server is actually doing.

With that in mind, I agree that this seems to be bad behavior on the part of the server and your surmises appear correct. There isn't much that you can do other than work around the problem. As far as I can tell, c-client is performing correctly.

On Thu, 1 May 2008, Patrick Hamel (path) wrote:
Hi,

This might be a really specific one; looking for guidelines on doing the
right thing with the API c-client offers.

Here's the setup:
   o Server: Exchange 2007, with IMAP ports enabled
   o Client #1: simplistic client implementation using c-client (I'll
give you a better idea in later)
   o Client #2: MAPI client

I have single AND new (un-seen) message in the inbox mailbox and
everyone is happy.

The c-client based client does a simple:

- mail_ping(stream)
- loop from 1 to stream->nmsgs
 mail_uid( msgno )  <-- from the loop iterator
 decide to "do nothing" or "get details"  on the message
- done

Now when the message is opened by the MAPI client, the next time the
c-client client goes through the motion I see this:

- mail_ping(stream)
** At this point:
 -> trace shows callback mm_exists gets called; did not see that in
other iteration; trace is:: msg [1] exists mailbox
 -> trace shows callback mm_expunged  gets called; did not see that in
other iteration; trace is:: expunge msg [1]

** At this point
 -> stream->nmsgs == 0
- loop ... is skipped

From this point stream->nmsgs stays == 0.
and I flush the list a message since nmsgs == 0 ...


From what I gathered, Exchange 2007 will expunge the message when
attributes are changed and assign a new UID to the message in the
mailbox.
I'm pretty sure I'm missing an important piece to have the stream->nmsgs
value refresh to "1";

I mean outside of  "mail_close_full" and a new "mail_open" how would one
break that cycle?
NOTE:: Have not tried mail_close<->mail_open yet, (it's a guess) I'm
looking for a better solution; or guidance that that's the way to go.

Other Exchange version this works nicely with this simplistic approach.

Oh yeah, using imap 2007 from last October-December.

Thank,

PatH



-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to