On Sat, Jun 02, 2012 at 01:27:58AM +0300, Timo Sirainen wrote:
> On 2.6.2012, at 1.23, Bron Gondwana wrote:
>
> > This probably shits the purists as much as anything else.
> > But I can tell you for sure that the FastMail web interface
> > does its "Delete Permanently" as:
> >
> > $Res = $Self->store($Uids, "+flags", "(\\seen \\deleted)")
> > && $Self->uidexpunge($Uids)
> > && $Self->refresh_count('');
> >
> > Which is an extra roundtrip to the server and an extra lock and
> > parse of the mailbox index.
>
> It doesn't need to be an extra roundtrip. You can run uidexpunge even if
> store fails and it doesn't do anything bad. By avoiding the extra roundtrip
> it is possible for the server to optimize the STORE+EXPUNGE into equivalent
> of ERASE. (Dovecot does halfway that - it for example doesn't rename maildir
> files on STORE stage, just unlinks them on EXPUNGE.)
Not so easy if you want to delete the messages by sequence number of
course.
TAG ERASE 1:10
Isn't implementable as a pipelined command, it would have to be
TAG1 STORE 1:10 +Flags \Deleted
TAG2 UID EXPUNGE UID1,UID2,UID3,UID4,UID5..UID10
So how does Dovecot handle a crash or filesystem error during that
intermediate stage? Replay an action log? What if the file can't
be renamed, but it's already replied to a client saying "yes, your
flag store succeeded"?
Bron.
_______________________________________________
imap5 mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/imap5