[Dovecot] Corrupted mailboxes
Hello,
We are currently facing some weird problems, and although it may not be directly related to dovecot, I hope some of you guys may have a clue on this.
We used to have a POP/IMAP server running Fedora Core1, with dovecot 0.99.13 (DAG). Everything was working fine, until an hardware problem forced us to install a new server, on another machine.
We installed a fresh new Fedora Core 3 box, running both sendmail 8.13.1, procmail 3.22 and dovecot 0.99.13.
Now, we are seeing strange errors in our dovecot logfiles. It seems to happen randomely, but always on the same mailboxes.
The following error is logged:
pop3(username): Jan 27 17:26:46 Error: Error syncing mbox file /var/spool/mail/szameitatd: LF not found where expected
pop3(username): Jan 27 17:26:46 Error: Error indexing mbox file /var/spool/mail/username: LF not found where expected
pop3(username): Jan 27 17:26:46 Error: Couldn't open INBOX: Internal error occured. Refer to server log for more information. [2005-01-27 17:26:46]
People having that problem are able to login, but cannot retrieve new mails. Clients simply says no new mails are available.
We tried to remove completely the mailbox file, waiting for procmail to create a new, but after a few minutes, the problem happens again. We cannot reproduce the bug with a particular mail; it seems the problem come from nowhere. Verbosing procmail didn't helped either.
The only way to fix it when this happens, is to manually edit the file, and remove the first line feed at the very beginning of the mailbox file.
I saw one post in the mailing list with the same problem, and we tried the "mail_extra_groups = mail" workaround, but that didn't help either. I actually think this has nothing to do with my problem :)
We have around 500 mailboxes, and only a couple of them (3-5) do have the problem.
Any idea how this can happen ? Any suggestions ?
Thanks ! Vincent.
Vincent Jaussaud Kelkoo.com Security Manager email: tatooin@kelkoo.com GPG key: 1024D/3BFE3FC7 2002-02-07
"Those who desire to give up freedom in order to gain security will not have, nor do they deserve, either one." -- President Thomas Jefferson. 1743-1826
On 27.1.2005, at 18:39, Vincent Jaussaud wrote:
Now, we are seeing strange errors in our dovecot logfiles. It seems to happen randomely, but always on the same mailboxes.
The following error is logged:
pop3(username): Jan 27 17:26:46 Error: Error syncing mbox file /var/spool/mail/szameitatd: LF not found where expected .. We tried to remove completely the mailbox file, waiting for procmail to create a new, but after a few minutes, the problem happens again. We cannot reproduce the bug with a particular mail; it seems the problem come from nowhere. Verbosing procmail didn't helped either.
Is procmail using same file locking mechanisms as Dovecot? procmail -v and mbox_file_locks in dovecot.conf should show it.
The only way to fix it when this happens, is to manually edit the file, and remove the first line feed at the very beginning of the mailbox file.
Is it always the first LF?
Anyway, 0.99.x's mbox support isn't very good. If you can't get it to work I'd suggest using 1.0-test61.
Hi Timo, and thanks for your reply.
Is procmail using same file locking mechanisms as Dovecot? procmail -v and mbox_file_locks in dovecot.conf should show it.
Yes.
procmail -v: Locking strategies: dotlocking, fcntl()
dovecot.conf: mbox_locks = fcntl
The only way to fix it when this happens, is to manually edit the file, and remove the first line feed at the very beginning of the mailbox file.
Is it always the first LF?
Yes.
Actually, deleting the user completely from the system, and recreating it seems to fix the problem. That's weird.
Anyway, 0.99.x's mbox support isn't very good. If you can't get it to work I'd suggest using 1.0-test61.
Unfortunately, it's for a production environment... so we are actually waiting for the final 1.0 release.
Thanks for providing dovecot to the Internet community.
Vincent.
-- Vincent Jaussaud Kelkoo.com Security Manager email: tatooin@kelkoo.com GPG key: 1024D/3BFE3FC7 2002-02-07
"Those who desire to give up freedom in order to gain security will not have, nor do they deserve, either one." -- President Thomas Jefferson. 1743-1826
On Mon, 2005-01-31 at 16:18 +0100, Vincent Jaussaud wrote:
The only way to fix it when this happens, is to manually edit the file, and remove the first line feed at the very beginning of the mailbox file.
Is it always the first LF?
Yes.
Actually, deleting the user completely from the system, and recreating it seems to fix the problem. That's weird.
Probably same as if you had deleted .imap/ directory, ie. Dovecot's indexes.
participants (2)
-
Timo Sirainen
-
Vincent Jaussaud