Subject: How to prevent: Session now Read-Only

From: [email-masked] (Morten Holmqvist)
Date: 28 Jun 96 11:17:09 GMT

Is it possible to disable the steal-folder feature, which happens
when one (by accident?) are running two pine-sessions.

My problem is that the second pine-session forces the
first pine-session to enter read-only mode, and thereby
cancels all modifications done to that folder.

I would preferer that the second pine-session were started
in read-only mode instead of stealing the folder from the first.

Have I overlooked a 'feature'-variable which controls that feature?

Does anyone have a hack which prevents the theft? (Or can someone
point me to the files which controls it)

  Morten...
-- 
Name:  Morten Holmqvist           |\  v  /|   Danish Library Centre
Email: [email-masked]    ||     ||   Tempovej 7-11
Phone: (+45) 44 86 78 73          ||_-.-_||   DK-2750 Ballerup
Fax:   (+45) 44 86 78 94          |,--_--.|   Denmark

---

From: Mike Brudenell <[email-masked]>
Date: Wed, 3 Jul 1996 08:58:28 +0100 (BST)

One way would be to include the "-o" option on the command line you use to
start Pine.  This forces the first-opened folder (usually the IBOX unless
you specify a different folder using the -f option) to be opened
read-only.

There is no specific feature to say "if I'm the second concurrent IMAP
client session then don't grab write-control".  Indeed I'm not sure it
would even be possible to do so with the IMAP spec: I know it is possible
to open a folder read-only, and to open a folder read-write (grabbing the
lock of any other IMAP session for that folder), but I don't recall a
"test if anyone else has this folder write-locked" command.

Cheers,

Mike Brudenell                                         <[email-masked]>
------------------------------------------------------------------------
The Computing Service, University of York, Heslington, York, YO1 5DD, UK
Tel: +44-1904-433811  FAX: +44-1904-433740  http://www.york.ac.uk/~pmb1/

---

From: Morten Holmqvist <[email-masked]>
Date: Wed, 3 Jul 1996 14:20:39 +0200 (CEST)

On Wed, 3 Jul 1996, Mike Brudenell wrote:

Thank you for pointing me in the 'imap' direction.
I removed the block around the kill(,SIGUSR2) in
imap/ANSI/c-client/bezerk.c:bezerk_open() and in mmdf.c:mmdf_open(),
and now the second pine never tries to 'steal' the folder, but instead
opens it in read-only mode.

  Morten...

---

From: "Richard G. Roberto" <[email-masked]>
Date: Wed, 3 Jul 1996 09:00:47 -0400 (EDT)

Hi!

I thought I remember reading something on IMAP that implied the
functionality Morten is seeking.  Is there something with IMAP4 maybe that
handles multiple simultaneous client sessions without running into lock
contention?  Maybe the imapd process handling the locking on behalf of the
clients?  This would be _very_ useful.  One of my biggest problems with
remote access is a user stealing a lock from another session and coming in
the next day and not being able to reclaim the lock on the original
session. 

Thanks

> > Mike Brudenell                                         <[email-masked]>

 ... stuff deleted

Richard G. Roberto
[email-masked]
201-739-2886 - whippany, nj

--
*******************************************************************************
Bear Stearns is not responsible for any recommendation, solicitation, offer or
agreement or any information about any transaction, customer account or account
activity contained in this communication.
*******************************************************************************

---

From: Mike Brudenell <[email-masked]>
Date: Wed, 3 Jul 1996 14:29:40 +0100 (BST)

OK.... but just be warned that the general idea of Pine's normal behaviour
is that if you leave a session in Pine and later start it again elsewhere
(another office, dialling in from home, etc) it presenets you with a
usable (read/write) session rather than being locked into a read-only
session.

As such your changes aren't really ideal in a general environment (but
presumably are to you with your particular needs).

Cheers,

---

From: Terry Gray <[email-masked]>
Date: Wed, 3 Jul 1996 06:44:14 -0700 (PDT)

Richard,
The locking behavior is a function of the mailbox format.
If you configure your system to use the so-called "Tenex"
format, you can have multiple sessions that can update flags
and see new mail.  The one thing you can't do is Expunge when there is
more than one session.

An experimental mailbox format is under development that may allow for
simultaneous expunges as well.  Also, I believe CMU's Cyrus IMAP server
already permits concurrent sessions with full access.

-teg

---

From: Mark Crispin <[email-masked]>
Date: Wed, 3 Jul 1996 09:46:20 -0700

> the next day and not being able to reclaim the lock on the original

This has nothing to do with IMAP.  IMAP is just as limited by the
restrictions of the mail store as local access is limited by those
restrictions.  What is special about IMAP is that, unlike POP, it does not
impose any additional restrictions of its own.

The problem (did you read my other message about this?) is that the
standard Unix mail format can not be handled by multiple simultaneous
read/write agents in any sort of reasonable fashion.  Simultaneous update
involves some kind of update mode access, either a format that is
ameniable to update mode (O_RDWR on UNIX) or a format which stores
messages in separate files.

The fix, therefore, is to use some other format of mail than the UNIX
standard.  This is Cyrus' "secret" to accomplishing this.  This is also
how you accomplish it in c-client.

If you use Pine, please refer to the Pine technical notes about "tenex
format" and how to convert to using it.  This is the simplest of about
half a dozen different alternative format options in existance, and it
works with all versions of the software.  [There are better choices today,
but they only work with the latest imap-4 toolkit versions.]

-- Mark --

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.