[Alpine-info] Dealing with Alpine's single-threadedness
Benjamin R. Haskell
alpine at benizi.com
Fri Feb 22 18:33:39 PST 2008
On Fri, 22 Feb 2008, Mark Crispin wrote:
> On Fri, 22 Feb 2008, Benjamin R. Haskell wrote:
>> On Fri, 22 Feb 2008, Asheesh Laroia wrote:
>>>> How does everyone here keep track of emails they need to finish/write in
>>> I just run a few (dozen? I jest) alpines.
> I do the same thing.
>> Really? I was under the (perhaps mistaken) impression that it was
>> usually a bad idea to have multiple connections to the same IMAP
>> server(s). I'm more sure of that opinion in the case of different
>> clients that don't have superb IMAP support. But, still, that might be
>> wrong, too.
> Sigh. It seems that this is a bit of folklore that has been distorted
> and misunderstood in the retelling.
> First, there is nothing wrong with running another Alpine for the sole
> purpose of composing a message without ever opening a mailbox. You can
> do that with a command line email-address argument, e.g.,
> alpine fred at example.com
> Second, there is no reason why a user should not open multiple IMAP
> sessions to a server in order to view different mailboxes on the server
> Third, the issue about multiple sessions to the same mailbox on the same
> IMAP server has to do with the practice of certain clients of treating
> IMAP as a stateless protocol like HTML. In a mistaken notion that it is
> "faster", they open multiple connections to the same mailbox on the same
> IMAP server. Even worse, some clients make a new connection for each
> FETCH (and just drop the previous one).
> With this said, a user may quite reasonably open multiple connections to
> the same mailbox on the same server from different clients. For
> example, while a user has a session open on his workstation at work, he
> might want to open a session on a laptop that he takes to a meeting...or
> his machine at home.
> There generally is not a reason for a user to open multiple connections
> to the same mailbox on the same server from the same workstation. The
> only one that I can think of is Alpine's inability (since it is a
> text-based program) to launch a separate window for reading messages.
> My old MailManager program for the NeXT was able to launch a separate
> window to read a message, so that you could read multiple messages in
> the same mailbox simultaneously; IMHO all GUI programs should have that
> capability without requiring a separate IMAP session.
> Last, but not least, there is the restriction of traditional UNIX
> mailbox format that only one session can have the read-write token on a
> mailbox at a time. In both Alpine and UW imapd, a new session will
> forcibly steal the read-write token from an old session. This kills the
> old UW imapd session, and causes the old Alpine session to go readonly
> on that mailbox.
> This restriction does not apply to the newer mbx or mix formats.
> Sadly, this also covers up the bad behavior of poorly-written clients.
Okay. Thanks for the explanations. I think my "blame" was misplaced. It's
mbox, not IMAP, that prevents reliable simultaneous read-write access.
The multiple-connections-for-multiple-mailboxes scenario doesn't apply
very often to the way I use mail (see below). But, just as a run-down to
see that I'm not misinterpreting the rest:
- It's not inherently problematic from a data-corruption standpoint to
have multiple IMAP sessions open to the same folder, provided it's not
stored on the server in UNIX mailbox format.
- The main problem with multiple connections is that it's inefficient. And
that stems from setting up and tearing down the connections, not from
there being more than one open at once.
- The lack of restrictions on non-mbox formats prevents bad IMAP clients
from being penalized for that inefficiency.
To justify my prior position a bit, I still wonder whether my particular,
peculiar IMAP usage pattern would cause trouble using send-only Alpine
a. I keep replies to messages in the same folder as the replied-to message.
b. I like searching (especially in Alpine).
c. I detest organizing messages into folders.
d. I don't delete messages.
As a consequence, I have all of my non-spam messages in my INBOX, and I
FCC: my INBOX on all outgoing mail. So, I'd be making multiple connections
to the INBOX.
Would my 'main' Alpine session (open to my INBOX) go readonly upon finding
that a message had its keywords changed behind it's back (when the
send-only Alpine alters the replied-to message)? Or is it really only when
the session gets killed? (It sounds like the latter.) Are there other
potentially-conflicting actions that I should avoid?
Again, thanks for the explanation, and any further insight. I still have
the password-entry problem for which I'd have to find a workaround (SSH
agent-style). I might try the Kerberos route, since I have an AFS cell
More information about the Alpine-info