[Dovecot] Bug when a duplicated file is found
Angel L. Mateo
amateo at um.es
Mon Feb 25 12:41:52 EET 2013
Hello,
Last days we had to restore some mailboxes from backup. Our mailboxes
are in maildir format and during restore, some duplicated files
appeared. The situation is:
* A user has messages in his new directory when the backup is made
* In some moment after the backup is done, the user accesses to his
mailbox, so the message is move to the cur directory.
* We restore his mailbox directly to his maildir path, so the message is
now at new directory too.
When this happens, dovecot detect it and it renames one of the files.
This is the reported log:
Feb 13 23:08:05 myotis31 dovecot: imap(<user>): Warning: Fixed a
duplicate:
/home/alumnos/59/122559/Maildir/cur/1360169810.M670208P13643.myotis31,S=6282,W=6409:2,
-> 1360793285.M721935P29136.myotis31
The problem with this is that we are using zlib plugin so messages are
compressed. When the rename is done, the rename is to a name without the
S=XXXX field (neither the W=XXX, although this field is less sensible),
so the result is that user's can't access to any message after this one.
I think than in this situation, rename one of the files is a good
solution (although it provokes duplicate mails, but this an
expected/acceptable situation after the restore), but the rename should
maintain the S= and W= fields (and even other maildir flags).
--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868889150
Fax: 868888337
More information about the dovecot
mailing list