Subject: Re: New mail?

From: "Cyrus Daboo" <[email-masked]>
Date: Mon, 11 May 1998 16:58:22 -0400

--On Monday, May 11, 1998, 3:09 PM -0400 "Barry Leiba"
<[email-masked]> wrote: 

>> Of course things get more complicated in a shared environment, and this
>> crucially depends on how the server is setup to handle flags for multiple
>> users on the same mailbox. The \Recent flag should be per user (i.e. one
>> user opening a mailbox does not remove the \Recent flag for any other
users
>> who might later do the same).
> 
> Ahhh, here we get onto shaky ground, though.
> 
> My interpretation of \Recent is that it is set for exactly one "select" of

> the mailbox.  That is to say, \Recent means "You're the first session 
> that's been told about the existence of this message."  That means that if

> I leave my client logged on at work and it polls for new mail (or, better,

> uses IDLE :-), then while I'm bicycling home the "new" (whatever that 
> means...) mail that comes in while I'm on my way will show up as "recent" 
> to my client at work.  When I get home and log on there, it will not show 
> as "recent".  But it will be "recent" when I get to work the next morning.
> 

Strictly speaking, I was talking about multiple (different) users of the
same mailbox, as opposed to the same user connected to a single mailbox
multiple times (which is what you describe above). There is a fundamental
difference in that the server can keep a per user \Recent flag, whereas it
is not as easy to keep a per connection \Recent flag, which is kind of what
you're asking for (I think).

> Worse, if mail comes in while I'm logged on at home, then whether my home 
> or work session sees it as "recent" will be at the whim of the server -- 
> whichever session it happens to notify first, which, with most clients, 
> means whichever one happens to send a command to the server first and get 
> the "* n EXISTS" and "* m RECENT" messages in response.  That makes the 
> behaviour of "recent" rather capricious in the case at hand.
> 

Hmm, well I just tested this with our Cyrus server (no relation :-) ) and it
did this:

Opened connection #1 to INBOX - 1 recent
Opened connection #2 to INBOX - 0 recent
Sent mail to myself
NOOP on #1 - 1 recent
NOOP on #2 - 1 recent
Sent mail to myself
Closed #1
NOOP on #2 - 2 recent

Thus with both connections open, the '* n RECENT' response is the same for
both. This server, at least, does not behaviour in the manner you describe
above. I can't speak for other servers, though the spec says the exact
behaviour in these circumstances is 'undefined'.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cyrus Daboo                                 <mailto:[email-masked]>
Cyrusoft International, Inc.                  <http://www.cyrusoft.com>
Voice: +1 412 605 0499                             Fax: +1 412 605 0705
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     Proud Purveyors of Mulberry: Internet Mail from the Ground Up
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~