On to, 2010-05-20 at 14:26 +0200, Chris Laif wrote:
> On Tue, May 18, 2010 at 6:47 PM, Chris Laif <[email protected]> wrote:
> >
> > I'm using dovecot 2.0.beta5 (IMAP and LMTP+sieve) and I'm getting lots
> > of errors like this:
> >
> > Warning: /data/mail/4567/Maildir/dovecot-uidlist: Duplicate file entry
> > at line 3: 1274182284.M635158P16414.mail,S=767,W=785:2,S (uid 5 -> 16)
Hmm. Can you reproduce this? Like sending a mail while client has the
mailbox open?
> Update (I really can't believe it but it seems to be true): These
> errors disappear if the user installs a sieve filter file. It doesn't
> matter if the filter is simple (e.g. just "keep;") or complex (many
> rules and fileinto subdirs).
I guess it just changes the timing and somehow happens to fix it.
I couldn't manage to reproduce it. Also this error has previously
happened sometimes because of a bug in dovecot-uidlist reading code. It
didn't really have duplicate entries, it just thought that it did. That
might still be the reason. Maybe you could apply the attached patch and
show me what a dovecot-uidlist.broken contains and the related log
message?
diff -r c4f56ed9dae0 src/lib-storage/index/maildir/maildir-uidlist.c
--- a/src/lib-storage/index/maildir/maildir-uidlist.c Mon May 31 16:46:08 2010 +0100
+++ b/src/lib-storage/index/maildir/maildir-uidlist.c Mon May 31 18:31:12 2010 +0100
@@ -532,6 +532,7 @@
} else {
/* This can happen if expunged file is moved back and the file
was appended to uidlist. */
+ link(uidlist->path, t_strconcat(uidlist->path, ".broken", NULL));
i_warning("%s: Duplicate file entry at line %u: "
"%s (uid %u -> %u)",
uidlist->path, uidlist->read_line_count, line,