Subject: Pine Folder Locks

From: Lynn Clark <[email-masked]>
Date: Mon, 21 Oct 1996 11:56:17 -0600

Well, we got imap4(beta) and pine 3.95 working the other day.  However, 
we noticed an odd bit of behavior as we were testing it and are 
wondering if what we were trying to do is beyond what pine/imap are 
supposed to be able to do.  Here's the scenario:

If we start pine on one machine, everything is fine.  Then, with this 
instance of pine running, we start pine on another machine as the same 
user.  After a short period of time, the first instance of pine 
relinquishes the folder lock to the second instance running on the other 
machine.  However, if the second instance on the other machine is shut 
down, the first instance never gets the folder lock back, so it can no 
longer process mail unless it, too, is shut down and restarted.  In 
fact, regardless of whether the second instance is shut down or not, the 
first instance apparently can not recover the folder lock.

Our question is, should pine/imap be able to "pass the folder lock" back 
and forth as we thought, or are we pushing it too far?  And, if it 
should be able to do this, what do we need to change/set in order for it 
to work?
--------------
Lynn Clark
[email-masked]
--------------

---

From: Mark Crispin <[email-masked]>
Date: Mon, 21 Oct 1996 17:28:33 -0700

The brief answer to your question is "No".

You misunderstand the purpose of the lock.  It isn't just a "permission to
write this folder" lock.  It is also a "I know where all the messages are
located in the folder, I know the sizes of all messages, and nobody else
may change things" lock.  Once this lock is lost, it can not be regained. 
The only way is to reparse the entire folder, which is done by closing the
folder in Pine (quitting in the case of INBOX) and opening it again.

This is because of the way that UNIX mbox format works.  The act of
changing flags (not to mention assigning UIDs) changes the size of a
message.

In certain other formats, e.g. tenex, it is possible to change flags
in place without changing the sizes of messages.  These formats permit
multiple simultaneous read/write access, and only forbid expunge when
someone else has it open too.

> should be able to do this, what do we need to change/set in order for it 

-- Mark --	Read http://www.imap.org for the "best kept secret in email"

DoD #0105, R90/6 pilot, FAX: (206) 685-4045  ICBM: N 47 39'35" W 122 18'39"
Science does not emerge from voting, party politics, or public debate.

---

From: Jason Englander <[email-masked]>
Date: Tue, 22 Oct 1996 14:12:45 -0500 (CDT)

-----BEGIN PGP SIGNED MESSAGE-----

On Mon, 21 Oct 1996, Mark Crispin wrote:

<SNIP>
> folder in Pine (quitting in the case of INBOX) and opening it again.
<SNIP>

Correct me if I'm wrong, but I thought you could re-open your INBOX (as of
3.95) by going back to the folder list and selecting it again.  It works for
me...

  Jason

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
E-mail      : [email-masked], @interl.net, @geocities.com
Web         : http://www.interl.net/~jasoneng/
Linux Links : http://nll.home.ml.org/
PGP Key     : send e-mail with subject: get-pgp-key
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Linux: because a PC is a terrible thing to waste