[plt-scheme] IMAP message positions

From: dvanhorn at emba.uvm.edu (dvanhorn at emba.uvm.edu)
Date: Mon Nov 11 18:50:00 EST 2002

Quoting Matthew Flatt <mflatt at cs.utah.edu>:

> At Mon, 11 Nov 2002 18:14:53 -0500 (EST), dvanhorn at emba.uvm.edu wrote:
> > When an IMAP connection is established, is it guranteed not to be
> > updated until a reselect? That is, can you rely on message positions
> > to remain constant during a connection?
> 
> I don't think the IMAP standard provides such a guarantee. Indeed, IMAP
> doesn't seem to be designed for concurrent access to a given mailbox.
> 
> Good IMAP servers seem to drop the old connection to a particular
> mailbox, if any, when a new connection selects the mailbox.
> 
> The IMAP server currently running at Utah does not seem to be a good
> one. Consequently, SirMail is in some ways designed around the problem.
> But it's still possible to mess up by deleting messages from multiple
> clients simultaneously, and I don't see a way around it, even in theory
> (i.e, within the IMAP protocol). This hasn't been a problem in
> practice, because I rare sit in front of two SirMail-running machines
> at once.

Thanks.  What I'm trying to do is download a set of headers and choose from the
headers which messages need to be moved to another mailbox.  So it's something
like...

(imap-get-messages imap '(1 2 3) '(header))

...  find that message 2 needs to be moved

(imap-copy imap '(2) dest)
(imap-store imap '! '(2) '(deleted))
(imap-expunge imap)

But if a new message arrives during the ..., or even during the copy, the
message positions would be off (presumably).  Is that right?


Thanks,
David



Posted on the users mailing list.