Gerald Galster
2018-Mar-27 14:36 UTC
Duplicate mails on pop3 expunge with dsync replication on 2.2.35 (2.2.33.2 works)
Hello, consider the following setup with dovecot 2.2.35: smtp/587 (subject: test 1535) | | mx2a.example.com --> dsync/ssh --> mx2b.example.com | pop3 fetch/expunge (uid 23) | !! dsync (copy from INBOX -> uid 24) /| dsync (expunge uid 23) / The pop3 client deletes mail from the server which triggers a copy from INBOX before it is expunged. On the next pop3 fetch you get the copy of the mail you thought had been expunged. This occurs only if mail is received by smtp on mx2a, synced to mx2b via dsync/ssh and then expunged via pop3 on mx2b. It does not occur if mail is received and expunged on mx2b. As a temporary workaround the system has been downgraded to 2.2.33.2. There are no duplicate emails after expunge with this version. 2.2.34 has not been tested. Does anyone know if there were changes in the dsync code from 2.2.33.2 to 2.2.35? Log: (mail received on mx2a.example.com and delivered via dsync to mx2b.example.com, then expunged via pop3 on mx2b.example.com -> copy/duplicate) Mar 26 15:35:57 mx2b.example.com dovecot[3825]: pop3-login: Login: user=<poptest at example.com>, method=PLAIN, rip=91.0.0.1, lip=188.0.0.1, mpid=3922, TLS, TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits) Mar 26 15:35:58 mx2b.example.com dovecot[3825]: pop3(poptest at example.com): expunge: box=INBOX, uid=23, msgid=<ACD482CD-443E-479A-A9E9-67549E186E35 at example.com>, size=1210, subject=test 1535 Mar 26 15:35:58 mx2b.example.com dovecot[3825]: pop3(poptest at example.com): Disconnected: Logged out top=0/0, retr=1/1259, del=1/1, size=1242 Mar 26 15:35:58 mx2b.example.com dovecot[3825]: doveadm: Error: dsync-remote(poptest at example.com): Info: copy from INBOX: box=INBOX, uid=24, msgid=<ACD482CD-443E-479A-A9E9-67549E186E35 at example.com>, size=1210, subject=test 1535 Mar 26 15:35:58 mx2b.example.com dovecot[3825]: doveadm: Error: dsync-remote(poptest at example.com): Info: expunge: box=INBOX, uid=23, msgid=<ACD482CD-443E-479A-A9E9-67549E186E35 at example.com>, size=1210, subject=test 1535 (mail received on mx2b.example.com and expunged via pop3 on mx2b.example.com -> no copy/duplicate) Mar 26 15:36:09 mx2b.example.com dovecot[3825]: pop3-login: Login: user=<poptest at example.com>, method=PLAIN, rip=91.0.0.1, lip=188.0.0.1, mpid=3927, TLS, TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits) Mar 26 15:36:09 mx2b.example.com dovecot[3825]: pop3(poptest at example.com): expunge: box=INBOX, uid=24, msgid=<ACD482CD-443E-479A-A9E9-67549E186E35 at example.com>, size=1210, subject=test 1535 Mar 26 15:36:09 mx2b.example.com dovecot[3825]: pop3(poptest at example.com): Disconnected: Logged out top=0/0, retr=1/1259, del=1/1, size=1242 Mar 26 15:36:10 mx2b.example.com dovecot[3825]: doveadm: Error: dsync-remote(poptest at example.com): Info: expunge: box=INBOX, uid=24, msgid=<ACD482CD-443E-479A-A9E9-67549E186E35 at example.com>, size=1210, subject=test 1535 Thanks for looking into this Gerald