Re: [Exim] maildirsize file corruption?

Góra strony
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
Dla: Nathan Ollerenshaw
CC: Exim users list
Temat: Re: [Exim] maildirsize file corruption?
On Wed, 11 Aug 2004, Nathan Ollerenshaw wrote:

> is it possible for the maildirsize file to be corrupted?


Anything is possible. :-)

> Does Exim do any locking when writing to this file, and could it
> conflict with courier-imap?


Exim is supposed to follow the rules that are described in

http://www.inter7.com/courierimap/README.maildirquota.html

No locking is involved. When creating a new maildirsize file, the data
is written to a temporary file which is then renamed. When adding a
single line to an existing file, the logic is

(void)lseek(fd, 0, SEEK_END);
(void)write(fd, buffer, len);

The file is opened with O_RDWR. Hmm. I wonder if it should be
O_RDWR+O_APPEND instead?


--
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