Dovecot 损坏的事务日志文件导致电子邮件延迟

Dovecot 损坏的事务日志文件导致电子邮件延迟

我们运行 dovecot 作为 IMAP 服务器,并使用 postfix 来发送邮件。我们的一个用户抱怨电子邮件延迟了(我们没有使用灰名单或类似的东西)。/var/log/mail.info 显示了这些日志消息,告诉用户何时应该收到这封电子邮件。邮件目录(例如 /mail)通过 NFS 挂载(如果有帮助的话)

Jul 26 18:31:08 mail1 deliver([email protected]): Corrupted transaction log file /mail/example.com/user/dovecot.index.log: start_offset (5160) > file size (5140)
Jul 26 18:31:08 mail1 deliver([email protected]): fscking index file /mail/example.com/user/dovecot.index
Jul 26 18:31:08 mail1 deliver([email protected]): msgid=<[email protected]>: save failed to INBOX: Internal error occurred. Refer to server log for more information. [2009-07-26 18:31:08]

答案1

哎呀!延迟的原因是 dovecot 正在尝试处理损坏的索引。

只需让用户退出邮件,删除索引文件,它将在用户登录时自动重新创建。因此,只需执行以下操作:

rm /mail/example.com/user/dovecot.*

Dovecot 会为每条消息创建临时索引文件;当用户首次登录时,如果索引不存在,则会从头开始创建,因此这是一个简单、有效的解决方案,而且每次都有效。我在使用早期版本的 Dovecot 时也遇到过这种情况,删除索引 100% 有效在所有情况下

以 maildir 格式将邮件存储在 NFS 挂载上,对吗?

顺便说一句,Dovecot 1.0 之前的版本或测试版经常会出现这个问题。较新的版本已经修复了这个问题。

相关内容