[Dovecot] Duplicate mails

Vegar Nilsen
Fri, 13 Oct 2006 12:12:49 -0000

Hi,

one of our customers reported a problem after we moved her maildir to
another disk. (Jail in FreeBSD 6, moved to another disk with rsync.)

For some reason she's seeing duplicates of almost every message from
November, 2005 until June, 2006 (the move happened in September, 2006.)

It seems like these mails have been respooled somehow and been inserted
into the maildir with the same date and time as the original:

root#loc [</var/gopostal/maildirs/wow/lina/cur>] diff
1158863410.P19488Q34M511758.locusts.copyleft.no:2,STbf
1132869216.H332479P92237.mail9.copyleft.no,S=7755:2,STac
root#loc [</var/gopostal/maildirs/wow/lina/cur>] ls -l
1158863410.P19488Q34M511758.locusts.copyleft.no:2,STbf
-rw-------    1 mailnull mail         7755 Nov 24  2005
1158863410.P19488Q34M511758.locusts.copyleft.no:2,STbf
root#loc [</var/gopostal/maildirs/wow/lina/cur>] ls -l
1132869216.H332479P92237.mail9.copyleft.no,S=7755:2,STac
-rw-------    1 mailnull mail         7755 Nov 24  2005
1132869216.H332479P92237.mail9.copyleft.no,S=7755:2,STac

As the diff command shows these mails are identical, except that one was
created about 10 months after the other.

1132869216.H332479P92237.mail9.copyleft.no,S=7755:2,STac was written by
Exim in November (we've configured Exim to add the size
(",S=7755") to
the file name), but I have no idea where the other file comes from.
Could this be Dovecot that has recreated these mails for some reason?
(Since the file names are different I doubt that this happened during
the rsync, instead it must come from some program that conforms to the
maildir standard of naming files. The mailserver had a different name
back in November, mail9 was the old name, locusts is the new one.)

Originally this file
1158863410.P19488Q34M511758.locusts.copyleft.no:2,STbf was named
1158863410.P19488Q34M511758.locusts.copyleft.no:2,bf which, if I
understand it correctly, means it's unread. (The customer has deleted it
since reporting this problem.)

root#loc [</var/gopostal/maildirs/wow/lina/cur>] uname -r ; dovecot
--version ; exim -bV
6.1-RELEASE
1.0.beta3
Exim version 4.60 #0 (FreeBSD 6.0) built 22-Feb-2006 13:01:52

If anybody has an idea as to what caused this I would really appreciate
any pointers or info.

Thanks in advance,

Vegar Nilsen
--
Copyleft Software AS
< http://www.copyleft.no/ >