Re: [Exim] maildirsize file corruption?

Etusivu
Poista viesti
Vastaa
Lähettäjä: Nathan Ollerenshaw
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [Exim] maildirsize file corruption?
On Aug 11, 2004, at 5:40 PM, Philip Hazel wrote:

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


The reason I ask is that we have an app that can't read some of the
files. Turns out, they're reading it incorrectly. They are assuming
that there will be a XXXXC entry after the XXXXS entry, but this might
not be the case. Nowhere in the spec for Maildir++ does it say that any
of the entries are mandatory.

Though, while investigating this, I did fine this:

[root@??? root]# cat
/data/mail/85/59/flyflyfly.net/me@???/Maildir/maildirsize

        0    0
     -686   -1
2864 1
    -2864   -1
6997 1
618 1
1378 1
1628 1
1637 1


Note that blank line at the beginning. Thats kinda odd, but not sure if
its exim doing that or not?

Running courier-imap imapd/pop3d in this system.

Nathan.

--
Nathan Ollerenshaw - UNIX Systems Engineer
ValueCommerce - http://www.valuecommerce.ne.jp/