<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
Hi,<br>
<br>
Hope you are well.<br>
<br>
We have a cluster of 2 Dovecot servers, both on v2.3.13 (89f716dc2),
using dsync to sync the messages between them.<br>
<br>
Previously, we used TCPS to sync the messages, but after some
testing, we concluded that syncing over SSH resulted in a lot less
failed syncs, so we started using SSH.<br>
<br>
The change has been a success, but I now notice a issue when a email
client immediately moves a messages to a separate folder while
Dovecot is syncing, where the message is seen twice in the folder
(with the exact same headers/content).<br>
<br>
For example, I have set a filter in my email client, Thunderbird, to
immediately move all emails coming from this list to a separate
folder. When opening that folder, I do not see one, but two unread
messages, both identical to each other.<br>
<br>
When checking the directories on the server, I see this:<br>
mx1:<br>
/var/vmail/example.com/joe/Maildir/.Subdir.Subdir/cur/1652615808.M190190P990486.mx2,S=19089,W=19384:2,S<br>
/var/vmail/example.com/joe/Maildir/.Subdir.Subdir/cur/1652615811.M180050P1376677.mx1,S=19089,W=19384:2,S<br>
<br>
mx2:<br>
/var/vmail/example.com/joe/Maildir/.Subdir.Subdir/cur/1652615811.M981426P990530.mx2,S=19089,W=19384:2,S<br>
/var/vmail/example.com/joe/Maildir/.Subdir.Subdir/cur/1652615808.M190190P990486.mx2,S=19089,W=19384:2,S<br>
<br>
Note the difference: on mx1, one indicates mx1, and one mx2, while
on the other server, both indicate mx2/<br>
<br>
Any idea (other then telling end-users not to use such filters) how
we could prevent these duplicate messages?<br>
<br>
This is our config:<br>
<font face="monospace"># Pigeonhole version 0.5.13 (cdd19fe3)<br>
# OS: Linux 5.10.0-13-cloud-amd64 x86_64 Debian 11.3 <br>
# Hostname: mx1.example.com<br>
auth_mechanisms = plain login<br>
disable_plaintext_auth = no<br>
dsync_remote_cmd = ssh -p 222 -l%{login} %{host} doveadm
dsync-server -u%u<br>
imap_capability = +SPECIAL-USE XLIST<br>
listen = *,[::]<br>
lmtp_rcpt_check_quota = yes<br>
log_timestamp = "%Y-%m-%d %H:%M:%S "<br>
mail_max_userip_connections = 100<br>
mail_plugins = quota<br>
mail_privileged_group = vmail<br>
namespace inbox {<br>
inbox = yes<br>
location = <br>
mailbox Drafts {<br>
special_use = \Drafts<br>
}<br>
mailbox Junk {<br>
special_use = \Junk<br>
}<br>
mailbox Sent {<br>
special_use = \Sent<br>
}<br>
mailbox "Sent Messages" {<br>
special_use = \Sent<br>
}<br>
mailbox Trash {<br>
special_use = \Trash<br>
}<br>
prefix = <br>
separator = .<br>
}<br>
passdb {<br>
args = /etc/dovecot/dovecot-sql.conf<br>
driver = sql<br>
}<br>
plugin {<br>
mail_replica = <a class="moz-txt-link-abbreviated
moz-txt-link-freetext" href="mailto:remote:root@mx2.example.com">remote:root@mx2.example.com</a><br>
quota = <a class="moz-txt-link-freetext"
href="dict:user::file:/var/vmail/%d/%n/.quotausage">dict:user::file:/var/vmail/%d/%n/.quotausage</a><br>
quota_status_nouser = DUNNO<br>
quota_status_overquota = 552 5.2.2 Mailbox is full<br>
quota_status_success = DUNNO<br>
sieve = /var/vmail/%d/%n/.sieve<br>
sieve_after = /var/vmail/%d/%n/.ispconfig.sieve<br>
sieve_before = /var/vmail/%d/%n/.ispconfig-before.sieve<br>
sieve_max_actions = 100<br>
sieve_max_redirects = 25<br>
sieve_max_script_size = 2M<br>
}<br>
protocols = imap pop3 lmtp<br>
replication_max_conns = 50<br>
service aggregator {<br>
fifo_listener replication-notify-fifo {<br>
mode = 0666<br>
user = vmail<br>
}<br>
unix_listener replication-notify {<br>
mode = 0666<br>
user = vmail<br>
}<br>
}<br>
service auth {<br>
unix_listener /var/spool/postfix/private/auth {<br>
group = postfix<br>
mode = 0660<br>
user = postfix<br>
}<br>
unix_listener auth-userdb {<br>
group = vmail<br>
mode = 0600<br>
user = vmail<br>
}<br>
user = root<br>
}<br>
service imap-login {<br>
client_limit = 1000<br>
process_limit = 512<br>
}<br>
service lmtp {<br>
unix_listener /var/spool/postfix/private/dovecot-lmtp {<br>
group = postfix<br>
mode = 0600<br>
user = postfix<br>
}<br>
}<br>
service quota-status {<br>
client_limit = 1<br>
executable = quota-status -p postfix<br>
unix_listener /var/spool/postfix/private/quota-status {<br>
group = postfix<br>
mode = 0660<br>
user = postfix<br>
}<br>
}<br>
service replicator {<br>
process_min_avail = 1<br>
unix_listener replicator-doveadm {<br>
mode = 0666<br>
user = vmail<br>
}<br>
}<br>
service stats {<br>
unix_listener stats-reader {<br>
group = vmail<br>
mode = 0660<br>
user = vmail<br>
}<br>
unix_listener stats-writer {<br>
group = vmail<br>
mode = 0660<br>
user = vmail<br>
}<br>
}<br>
ssl_cert = </etc/postfix/smtpd.cert<br>
ssl_cipher_list =
kEECDH:+kEECDH+SHA:kEDH:+kEDH+SHA:+kEDH+CAMELLIA:kECDH:+kECDH+SHA:kRSA:+kRSA+SHA:+kRSA+CAMELLIA:!aNULL:!eNULL:!SSLv2:!RC4:!MD5:!DES:!EXP:!SEED:!IDEA:!3DES<br>
ssl_client_ca_dir = /etc/ssl/certs<br>
ssl_dh = # hidden, use -P to show it<br>
ssl_key = # hidden, use -P to show it<br>
ssl_min_protocol = TLSv1.2<br>
ssl_prefer_server_ciphers = yes<br>
userdb {<br>
driver = prefetch<br>
}<br>
userdb {<br>
args = /etc/dovecot/dovecot-sql.conf<br>
driver = sql<br>
}<br>
protocol imap {<br>
auth_verbose = yes<br>
mail_plugins = quota quota imap_quota quota notify replication<br>
}<br>
protocol pop3 {<br>
auth_verbose = yes<br>
mail_plugins = quota quota quota notify replication<br>
pop3_uidl_format = %08Xu%08Xv<br>
}<br>
protocol lda {<br>
mail_plugins = quota sieve quota sieve quota notify replication<br>
postmaster_address = <a class="moz-txt-link-abbreviated
moz-txt-link-freetext" href="mailto:postmaster@mx1.example.com">postmaster@mx1.example.com</a><br>
}<br>
protocol lmtp {<br>
mail_plugins = quota quota sieve sieve quota notify replication<br>
postmaster_address = <a class="moz-txt-link-abbreviated
moz-txt-link-freetext" href="mailto:postmaster@mx1.example.com">postmaster@mx1.example.com</a><br>
}</font><br>
<br>
<div class="moz-signature">
<div class="moz-signature">Thanks in advance for your thoughts.<br>
<br>
Kind regards,<br>
<br>
Thom Pol</div>
<div class="moz-signature"><br>
<img
src="https://static.amste.ch/amsterdamtech/email-signature-v1.png"
width="200" height="26"></div>
<br>
<br>
</div>
</body>
</html>