[Dovecot] failed: Message has been copied too many times

Timo Sirainen tss at iki.fi
Sat Nov 2 12:27:40 EET 2013


On 28.10.2013, at 11.46, Angel L. Mateo <amateo at um.es> wrote:

> El 26/10/13 17:10, Timo Sirainen escribió:
>> On 24.10.2013, at 13.41, Angel L. Mateo <amateo at um.es> wrote:
>> 
>>>> amateo_adm at myotis51:~$ sudo doveadm search -u vlo  mailbox
>>>> BORRADOS.INBOX.MNCS
>>>> doveadm(vlo): Error: Syncing mailbox BORRADOS.INBOX.MNCS failed: Message
>>>> has been copied too many times (59306 + -1)
>> 
>> Looks like the index is corrupted. It should never have gotten that high. Have you tried doveadm force-resync -u vlo INBOX?
>> 
> 	I have just tried it now, for the same problem with other user. But it didn't fix anything.
> 
> 	The problem is that for some reason, dovecot is duplicating user mails. In the problem I'm having today, a user has 3833 distinct messages in a mailbox, but 122 of them are duplicated 19866 each, so a search in the folder shows 2228712 messages. A force-resync of the folder doesn't fix anything.
> 
> 	What worried me the most is that this problem is appearing very often in my system (once a week at least).

In normal operation it wouldn’t be possible to get the refcount that high. The IMAP command would simply fail instead of growing the refcount obove 32768. The only possibilities I can think of are:

a) something causing corruption
b) multiple IMAP sessions at exactly the same time copying the same mail

Anyway, it’s definitely a bug that the refcount can’t be shrunk. Fixed: http://hg.dovecot.org/dovecot-2.2/rev/8cdd4124de0b



More information about the dovecot mailing list