Re: [Dovecot] File isn't in mbox format: /home/foo/mail/Trash
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
On Tue, 17 Oct 2006, Phil Roffe wrote:
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.
Isn't that the delimiter format for one of the other mailbox formats that is a bit like mbox?
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.
That would make sense; I think Pine (via cclient) could use that mailbox format.
... I think is it "MMDF" described this page:
http://www.washington.edu/imap/documentation/formats.txt.html
Jethro.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Jethro R Binks Computing Officer, IT Services University Of Strathclyde, Glasgow, UK
On Tue, 2006-10-17 at 11:22 +0100, Jethro R Binks wrote:
On Tue, 17 Oct 2006, Phil Roffe wrote:
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.
Isn't that the delimiter format for one of the other mailbox formats that is a bit like mbox? .. ... I think is it "MMDF" described this page:
Nope. MMDF uses "^A^A^A^A\n" as the separator. ^@ means NUL character.
When Dovecot starts moving data around in mbox file it first increases the file size by writing NUL-bytes to the end of the file (so that no unexpected out-of-diskspace/quota errors can happen). With 0.99.x somehow these NUL-bytes ended up at the beginning of the mbox file.
On Tue, 17 Oct 2006, Timo Sirainen wrote:
On Tue, 2006-10-17 at 11:22 +0100, Jethro R Binks wrote:
On Tue, 17 Oct 2006, Phil Roffe wrote:
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.
Isn't that the delimiter format for one of the other mailbox formats that is a bit like mbox? .. ... I think is it "MMDF" described this page:
Nope. MMDF uses "^A^A^A^A\n" as the separator. ^@ means NUL character.
Ah, that was it ...
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Jethro R Binks Computing Officer, IT Services University Of Strathclyde, Glasgow, UK
On Tue, 2006-10-17 at 11:10 +0100, Phil Roffe wrote:
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.
It contains the rewritten mbox code. But sure, if your locking is wrong the mbox can break in all kinds of ways.
In 0.99.x there was anyway also a problem that even if the locking was correct it sometimes left some extra characters at the beginning of the mbox.
participants (3)
-
Jethro R Binks
-
Phil Roffe
-
Timo Sirainen