Re: Re: moving mail between folders is intermittently failing

Mark Crispin <[email protected]> Mon, 3 May 2010 08:32:31 -0700 (PDT)
Newsgroups gmane.mail.imap.uw.c-client
Message-ID <[email protected]>
For what it's worth: Timo is the author of Dovecot.  His comments about
its implementation should be considered authoritative.  Mine are based
upon memory and second-hand/third-hand information.

What is important - and what I will/do comment upon - is whether or not
another server is compliant with the specification.  Dovecot is compliant.

I guess that the threaded semaphores stuff was in Communigate Pro.  Linda
comment about threading obviously confused me.

So, if I read you correctly, shared mbox access doesn't communicate flag
changes?  You don't use an external index file to avoid having to re-read
the entire file?  Do you allow shared expunge?

Did you ever test it over NFS and SMB (and NFS and SMB simultaneously)?
That's the kind of crap that I had to support when I did the code in UW
IMAP.  I hope that nobody has to support such nonsense ever again.

On Mon, 3 May 2010, Timo Sirainen wrote:
> A bit too much misinformation here so I'll have to reply :)
>
> On 3.5.2010, at 7.51, Mark Crispin wrote:
>
>> The main issue is if any other mail reading program is consuming the mbox.
>> If Dovecot is the only consumer you will be OK.  But if you have other
>> consumers (including Pine, Alpine, elm, /usr/ucb/mail, UW IMAP, etc.)
>> accessing the mbox while Dovecot is doing its thing there may be a
>> problem.
>
> Dovecot allows non-Dovecot programs to access mbox files. As long as
> they use compatible read/write locks, there aren't any corruption
> problems. The only potential problem is that flag changes and such may
> not be noticed immediately, but there are also settings to make Dovecot
> read/write the mbox state more aggressively (so worse performance). But
> the default behavior is actually pretty much the same as uw-imap's.
>
>> I wasn't aware of Dovecot supporting mix.  As far as I know, Dovecot only
>> supports maildir (its preferred format) and mbox.
>
> There's a mix-inspired upcoming new mailbox format "mdbox" (or
> multi-dbox, also dbox=single-dbox which uses compatible mail files, but
> only single mail/file).
>
>> Maildir, in turn, does extra stuff to be NFS-safe at the cost of not being
>> at all ameniable for IMAP.  Dovecot actually implements a modified version
>> of maildir which is not NFS-safe...
>
> Many people are using Dovecot with NFS, but you're right, it's not
> entirely safe because I assumed I could flush NFS caches as necessary,
> but that didn't turn out to work as well as I expected.
>
>> I think that you may have mistaken what Dovecot's multi-threading does.
>
> There is no multi-threading in Dovecot! Multiple processes, sure, but
> it's single-threaded everywhere. (But there is initial support for
> handling multiple client connections in a single process (in a single
> thread).)
>
>> The multi-threading allows multiple simutaneous read/write access to an
>> mbox format mailbox, as long as Dovecot is the only consumer of the mbox
>> file (and you don't want to violate that assumption).  It does this by
>> exchanging semaphores between the threads, which run in the same process;
>> otherwise there are no such semaphore with mbox format.
>
> IPC is done only via filesystem.

-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
_______________________________________________
Imap-uw mailing list
[email protected]
http://mailman2.u.washington.edu/mailman/listinfo/imap-uw