On Mon, 2006-10-16 at 05:40 -0500, James Lupolt wrote:
> Hello,
> 
> I'm seeing the following error on a server:
> 
>  File isn't in mbox format: /home/foo/mail/Trash
> 
> The Trash file is full of the following at the beginning:
> 
> ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^
> 
> I've repaired the file several times, but this keeps happening. Would 
> any of you mind offering me some insight into what could be causing this 
> and how to fix it?
  

This is a known problem with v0.99.x. The mbox code has been rewritten
in 1.0rc versions and it doesn't have this problem, so I'd just suggest
upgrading.
We had a problem with this several months ago.  The alarming aspect of the corruption is when it occurs at the beginning of an email (i.e. ^@^@^@From:...).  Emails can be lost/appended to the bottom of the previous email.

I've seen this problem several times on our deployment and tracked it down to what appears to be NFS locking issues.  Are you storing mails on an NFS mounted filesystem? If so check the following...
http://wiki.dovecot.org/NFS

We're running dovecot-1.0 beta5 (admittedly not an rc version but >beta4 which is mentioned in the NFS wiki section) so I'm not sure the mbox rewrite from v0.99.x has fixed the problem.

We had several applications accessing the mbox (Dovecot and Pine mainly).  Reconfiguring Pine to use IMAP (using Dovecot) rather than write to the mbox directly appears to have fixed the problem and we have had no corruption for several months now.

So, my question is am I wrong to assume NFS locking/corruption? Does anyone know if this is really a Dovecot or NFS issue?

Phil