[Dovecot] Bug: Fixed a duplicate
I restored a dovecot mailserver today, and when I started the server again, the logs filled up with "Fixed a duplicate" warnings.
This in itself it not a problem, the problem is that it appears the fix is not done correct. Consider this:
Warning: Fixed a duplicate: [X]/cur/1305907573.V807I37682f3M146183.mail8.xxx.com:2,S -> 1306601066.M382668P27710.mail8.xxx.com
The problem appears to be the timestamp of this new file isn't updated correctly.
Now I got hundreds of mailboxes filled with mails named 1305907573.* with random (in the past) timestamps, leading to mangled miss-sorted inboxes for customers.
3575 May 25 02:05 1306600913.M982997P26976.mail8.xxx.com:2,S 55313 May 6 01:50 1306600913.M982998P26976.mail8.xxx.com:2,S 9839 May 7 23:59 1306600913.M982999P26976.mail8.xxx.com:2,S 3453 May 10 01:32 1306600913.M983000P26976.mail8.xxx.com:2,S 16616 May 14 00:22 1306600913.M983001P26976.mail8.xxx.com:2,S 68850 May 25 00:46 1306600913.M983002P26976.mail8.xxx.com:2,S etc.
Dovecot is v. 2.0.11
I guess I should have deleted all dovecot.* files after the restore, before I started dovecot?
// Tom
On Sat, 2011-05-28 at 21:16 +0200, Tom Sommer wrote:
I restored a dovecot mailserver today, and when I started the server again, the logs filled up with "Fixed a duplicate" warnings.
This in itself it not a problem, the problem is that it appears the fix is not done correct.
You shouldn't have restored an old maildir on top of an existing maildir. That is the main problem. The same mails had different flags (=different filenames), and Dovecot just renamed one of the files to make sure no mails got accidentally lost. In your case it should have just deleted the duplicates, but there's no such feature yet. Dovecot works exactly as intended here. The full explanation is more complex than I want to type right now.
On Fri, June 3, 2011 15:00, Timo Sirainen wrote:
On Sat, 2011-05-28 at 21:16 +0200, Tom Sommer wrote:
I restored a dovecot mailserver today, and when I started the server again, the logs filled up with "Fixed a duplicate" warnings.
This in itself it not a problem, the problem is that it appears the fix is not done correct.
You shouldn't have restored an old maildir on top of an existing maildir. That is the main problem. The same mails had different flags (=different filenames), and Dovecot just renamed one of the files to make sure no mails got accidentally lost. In your case it should have just deleted the duplicates, but there's no such feature yet. Dovecot works exactly as intended here. The full explanation is more complex than I want to type right now.
Would it be possible to set the correct timestamp on the renamed files, so the timestamp remains the same as on the original?
// Tom
On Mon, 2011-06-06 at 11:46 +0200, Tom Sommer wrote:
On Fri, June 3, 2011 15:00, Timo Sirainen wrote:
On Sat, 2011-05-28 at 21:16 +0200, Tom Sommer wrote:
I restored a dovecot mailserver today, and when I started the server again, the logs filled up with "Fixed a duplicate" warnings.
This in itself it not a problem, the problem is that it appears the fix is not done correct.
You shouldn't have restored an old maildir on top of an existing maildir. That is the main problem. The same mails had different flags (=different filenames), and Dovecot just renamed one of the files to make sure no mails got accidentally lost. In your case it should have just deleted the duplicates, but there's no such feature yet. Dovecot works exactly as intended here. The full explanation is more complex than I want to type right now.
Would it be possible to set the correct timestamp on the renamed files, so the timestamp remains the same as on the original?
The timestamp is preserved. If you sort the messages by "received date", they are in the same order.
participants (2)
-
Timo Sirainen
-
Tom Sommer