[Dovecot] Expunged message reappeared, giving a new UID

Simon Fraser srf at sanger.ac.uk
Mon Sep 23 16:13:07 EEST 2013

On Sun, 2013-09-22 at 00:13 +0300, Timo Sirainen wrote:

> > One side has uidnext=23 and the other side has uidnext=24. You're
> deleting the last message with uid=22, so the uidnext=23 is correct.
> The other side however thinks that the same mail's uid is 23. There
> must be something wrong with the mail delivery, because both sides
> should have uid=22 and uidnext=23 here. So replication rawlogs of a
> new mail delivery would be helpful..

Here's the rawlog from node A: http://pastebin.com/2hcBXNc4 (24k, hence
not attached)

This records the following activity:

Shut down dovecot on both nodes
removed the mailbox (so that the new message delivery would create it)
Emptied /tmp/dsync-rawlog
Started dovecot on both nodes
Sent a test email to node A
Deleted it - it didn't reappear
Sent a second test email to node A
Deleted the second email, which reappeared.

After testing this a few times with a different number of messages, it
seems they only start reappearing after the first deletion. 

> Or there are some other strange things here also: The GUIDs are
> different for the mails, so it's as if the same mail was saved to both
> sides via LMTP instead of being copied to the other side via
> replication? Also the logs show an extra dsync run that seems to mess
> things up even further. The whole deletion operation did:
>  - expunge uid=22
>  - copy uid=23 from A to B
>  - expunge uid=21 (the message was there twice?)
>  - copy uid=23 from B to back to A (??)

I have double checked the configuration and node b has not taken
delivery of any messages - exim has nothing in the logs. 

Thank you for your perseverance with this! 


 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

More information about the dovecot mailing list