Re: [Exim] Mail storage formats/ POP/IMAP/webmail daemon/etc…

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Ray Miller
日付:  
To: Peter Galbavy
CC: exim-users
題目: Re: [Exim] Mail storage formats/ POP/IMAP/webmail daemon/etc..
On Wed, Apr 04, 2001 at 05:20:06PM +0100, Peter Galbavy wrote:
> On Wed, Apr 04, 2001 at 10:42:54AM +0100, Ray Miller wrote:
> > Not quite. There are a couple of differences between the exim and
> > c-client implementations of mbx locking which have potentially
> > disasterous implications. c-client uses the flock() system call for
> > file-locking, whereas exim uses flock(). Ignoring the different
>
> [I assume one of those is supposed to be fcntl() ?]


Yes, exim uses fcntl(). Sorry if my typo caused confusion.

> > semantics of the two system calls, this works on some systems
> > (e.g. Solaris, where flock() is implemented via fcntl()), but on other
> > operating systems (e.g. Linux, where flock() and fcntl() are
> > implemented as independent system calls) it is possible for one
> > process to lock a file using flock() and another process to lock the
> > same file at the same time using fcntl(). There's also a difference in
>
> Erm, so ? Again, this is implementation vs. implementation. If Phil or
> anyone working on code for exim cannot rely on an independent model
> for the mbx format but instead has to keep up to date with the moving
> target that is c-client, then the problem is clear.


The c-client documentation clearly states that flock() is used. As I
explain above, an application wishing to cooperate with c-client must
use flock().

> A specification for mbx locking would talk about the types of locks,
> not the OS and language specific details. Yes, I am aware that this
> is a wish for nirvana and that C is a system programming language
> that is usually singled out for exactly this kind of thing, but how
> do we then go and implement MBX access in perl / python / Java etc. ?


Well, you could always use the Mail::Cclient module for perl. :-)

Please note that I'm not trying to defend c-client's way of doing
things, or suggesting that exim's got it wrong. But it's important to
note that the two applications do things differently and will not
interoperate as expected in all environments.

--
Ray Miller <ray.miller@???>
Unix Systems Programmer
Oxford University Computing Services