Re: [exim-dev] mbx locking bug in CYGWIN

Top Page
Delete this message
Reply to this message
Author: sparrow
Date:  
To: exim-dev
Subject: Re: [exim-dev] mbx locking bug in CYGWIN
<-- Warning: charset 'X-UNKNOWN' is not supported -->



On Tue, 15 Mar 2005, Philip Hazel wrote:

> On Tue, 15 Mar 2005, [gb2312] ???? wrote:
>
> The MBX locking rules are specifically defined by the folks who invented

is there a well documented specification?
> the MBX mailbox format. The whole idea is to enable the use of shared
> mailboxes. I have a document entitled
>
>          UNIX Advisory File Locking Implications on c-client
>                     Mark Crispin, 28 November 1995

>
> which describes the method, and also has a lot of detail about problems
> with locking in different flavours of Unix. It is all a horrible mess
> (the locking, I mean, not the document).
>
> I am not surprised that problems arise with CYGWIN, but there is no way
> that the MBX locking rules will be changed in Exim.

I downloaded a copy of uw-imap source code and read through the section of
mbx.
I found that mbx_open (open a mailbox)and mbx_append (append message to a
mailbox) are implemented differently in locking the mailbox.
mbx_open get a exclusive lock on the temp file and a shared lock on the
mailbox, then release the exclusive lock on the temp file.
But mbx_append only acquire a exclusive lock on the temp file after
opengin the mailbox file. There is no code acquiring a shared lock on the
mailbox.
I'm wondering if the exim implements mbx open according to mbx_open of
uw-imap, or some documented specification says it must be implemented this
way. If a specification exists, I really wish to have a read. If no, I
think exim sould do as mbx_append when delivery mail using mbx format.
>
> Why do you want to use MBX mailboxes, anyway? Is there some problem
> with the default Berkeley mailbox format?

The default mailbox format works well. I'm building a mail server under
CYGWIN recently. I use exim as the MTA (exim is really an excellent work).
A imap server is also needed. But I found only uw-imap in CYGWIN setup.
The document of uw-imap says mbx format is preferred, so i got a try and
found the problem.
>
> --
> Philip Hazel            University of Cambridge Computing Service,
> ph10@???      Cambridge, England. Phone: +44 1223 334714.
> Get the Exim 4 book:    http://www.uit.co.uk/exim-book