[Dovecot] Problem with dsync replication : mails are not deleted correctly

Timo Sirainen tss at iki.fi
Mon May 27 17:19:34 EEST 2013


On 27.5.2013, at 17.09, Nicolas ROCHE <nicolas.roche at fluid-e.com> wrote:

> I have two linux serveurs (Oracle RHEL 5 86_64) and I install both sides dovecot (V2.2.2+), postfix (2.10.0) and mysql (Ver 14.12 Distrib 5.0.77).
> I configured these servers in order to make them replicate, and I created some virtual users.
> I use some java code in order to send mail (with SMTP) and to get mail (with POP3).
> When the java code get a mail, it deletes it from mailbox (the flag "DELETED" is set to true).
> 
> When I send a mail on server A, I can see the mail replicated on both servers A and B : a file containing the message data exists in /home/vmail/test03/new/ in both sides.

The mail is delivered via LMTP?

> When I get the mail from server A with my java POP3 client, all is OK : the mail is deleted on both servers A and B (no more file in /home/vmail/test03/new/).
> 
> The problem is when I send a mail on server A and I get it from server B : I can get the mail, but the mail is not deleted from server B, and neither from server A.
> When I try a second time to get the mail on server B, then all becomes OK : the mail is deleted on both server A and B.
> 
> I can reproduce the problem every time.
> 
> Is it a known bug or not ? If yes, is there a patch ? If no, may the problem come from my config ?

Shouldn't happen. Try this:

1. Disable the replication plugin (remove from mail_plugins)
2. Deliver a new mail on A
3. Sync the new mail to the replica: doveadm sync -u user at domain -d
4. Read + delete mail on B (and verify it gets deleted from B)
5. Sync the deletion to the replica with rawlog enabled: doveadm sync -r rawlog -u user at domain -d

Now assuming that the mail was added back to B instead of being deleted from A, send the rawlog to me.


More information about the dovecot mailing list