[Dovecot] some mdbox mails get lost each day

Timo Sirainen tss at iki.fi
Thu Aug 9 11:20:42 EEST 2012


On 9.8.2012, at 11.14, Christian Rößner wrote:

> I have a strange problem here. I had installed Dovecot-2.1.6 on a customers setup. They have 102 mail accounts on the server. The started using this dovecot version on the 20th June. One mailbox suddenly started expunging mails. Not from the current day, but one week back in the past. First I thought about an Outlook issue. Some filter or archieving thing, but we did a test and on one day, the curstomer did not start Outlook first; instead he checked his mails with the SOGo-webinterface. We saw that mails got deleted again.

A wrongly used doveadm expunge in a cronjob? mail_log plugin is very helpful when trying to figure out what deletes messages. http://wiki2.dovecot.org/Plugins/MailLog

> Yesterday I asked the customer to backup all his mails in Outlook. After that I renamed the whole mdbox folder of this account on the server and sent one test mail to recreate the mailbox. After that her restored his mail in Outlook. This morning her contacted me and said that all mails are ok right now and no mails have been erased anymore.
> 
> Coud this been a corrupted index?

Corrupted indexes would log errors in log file. Do you see any errors/warning?

> I also chekced the storage/-folder and see that all mails are still on disk. Now he asked me if there is any way to get all the lost messaged back? It would be okay for him, if all mails since June are sent again, as he can clean his mailbox afterwards. So does somebody have an idea on how to solve this? Maybe scripting something in python and using local sendmail command?
> 
> Or is there some doveadm voodoo to repair the index or unexpunge all mails?

cp mdbox ~/mdbox-backup
rm -rf ~/mdbox-backup/storage/dovecot.map* ~/mdbox-backup/mailboxes/
doveadm import mdbox:~/mdbox-backup all-mails all

Now all the mails in m.* files are under all-mails folder.


More information about the dovecot mailing list