Subject: How does imapd treat multiple conns to the same account?

From: "Alex Shvedov" <[email-masked]>
Date: Sat, 21 Aug 1999 21:12:01 -0400

Correct me if I'm wrong.

I have the impression that simultaneous connections to one
account are "almost" impossible.

What happens on the server side (see unix_open in unix.c) is that
if both clients try to open their streams in a read/write mode,
the client that happens to be the second one kills the guy who
happened to come first.

This murder is comitted in the most brutal fashion: Second sends
a series of SIGUSR2's, up to 15 bullets, one bullet per second,
right in First's belly.

Questions:
1. Am I right to understand that o the server side there's no
queueing for RW clients at all?
2. How do the RW/RO and RO/RO pairs go togther?
3. see below.

I read all the docs that are available, but didn't find an
answer. A *** IMPORTANT *** note in Internal.Doc mentions
external locks and thus seems to put the responsibility on the
application, which, in this case, is imapd itself.

The worst thing is that c-client doesn't give me the opportunity
to find out that the mailbox is locked, mail_open just logs off
and kicks me out. Am I missing something?

Question 3:
3. Is it possible for a client to find out that the mailbox it's
going to access is locked by some other RW guy before and/or
instead of being forced to logoff?

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

---

From: Mark Crispin <[email-masked]>
Date: Sat, 21 Aug 1999 19:33:58 -0700 (Pacific Daylight Time)

> account are "almost" impossible.

Just with the default UNIX format of mail.  No problem with most other
formats.

> queueing for RW clients at all?

Right.  You shouldn't have multiple clients.

> 2. How do the RW/RO and RO/RO pairs go togther?

An RO client doesn't lock and doesn't care if the mailbox is locked, which
means that it gets clobbered if the RW client makes any modification.  
However, since it's RO, no damage to the mailbox happened if it gets
clobbered, so you're allowed to take the risk.  You aren't allowed to take
the risk with multiple RW clients since it's more than a session that gets
clobbered, the mailbox itself can be clobbered.

> and kicks me out. Am I missing something?

There's no way to do it in IMAP protocol.  The IMAP protocol was not
designed for crufty old mailbox formats that aren't ameniable for multiple
RW with external software.

> instead of being forced to logoff?

No.