Hi, 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. I checked for sieve filters. None. I upgraded dovecot to 2.1.7, as I have not done any newer packages yet for Ubuntu (using my own PPA). Same problem one day later. I tested with telnet locally. Same result as in the client. I also did doveadm dump -t log and index and saw that there had been expunged mails. 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? 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? Thanks in advance -Christian R??ner --- R??ner-Network-Solutions Bachelor of Science Informatik Erlenwiese 14, 36304 Alsfeld T: +49 6631 7882340-0 F: +49 6631 7882340-9 M: +49 176 93118939 USt-IdNr.: DE225643613 http://www.roessner-network-solutions.com -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3880 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20120809/1147f48f/attachment-0004.bin>
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.
On 9.8.2012, at 11.24, Christian R??ner wrote:> I had enabled mail_log and search for any kind of errors. None. Only expunge messages from a imap process. Which I thought was Outlook. But isn't.So there is an imap expunge entry for all of the mails that get lost? You should be able to match that with the IMAP client's IP address by using session IDs, for example: mail_log_prefix = "%s(%u) <%{session}>: " Also you may be able to find out what client is doing it by setting: imap_id_log = *