Mail duplication on multimaster replication

Alexey alukardd at alukardd.org
Tue Aug 24 20:43:28 EEST 2021


Hello.

I have 3 machines with dovecot with a circular replication: 1 → 2 → 3 → 
1.

As I notice there is two anomalies:
1) Mass expunge often not replicated with fast replication (default 
replicator mode). Replication happens only after incremental replication 
(full of course too, but it is not necessary).
I mean, that after mail was expunged on first server via imap, I can get 
it with doveadm fetch on second.
2) There is some odd lines in log:
   doveadm(mail at domain.org)<10620><...>: Info: copy from INBOX: 
box=INBOX, uid=137704, msgid=<...>, size=2877
   doveadm(mail at domain.org)<10620><...>: Info: expunge: box=INBOX, 
uid=134812, msgid=<...>, size=2877

What is the copy from INBOX to INBOX. I guess that after this actions of 
replicator I got a ton of duplicates of removed to Trash mails.

Only IMAP is in use.
All 3 servers use the same version:
# dovecot --version
2.3.15 (0503334ab1)


doveconf -n
# 2.3.15 (0503334ab1): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.15 (e6a84e31)
# OS: Linux 5.10.0-0.bpo.3-amd64 x86_64 Debian 10.10
auth_verbose = yes
default_vsz_limit = 30 G
doveadm_password = # hidden, use -P to show it
doveadm_port = 4545
first_valid_gid = 500
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep 
tb-lsub-flags
last_valid_gid = 500
last_valid_uid = 500
log_path = /var/log/dovecot/dovecot.log
mail_attribute_dict = file:%h/dovecot-attributes
mail_gid = dmail
mail_location = mdbox:~/mdbox
mail_log_prefix = "%s(%u): "
mail_plugins = " mail_log notify notify replication"
mail_uid = dmail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope 
encoded-character vacation subaddress comparator-i;ascii-numeric 
relational regex imap4flags copy include variables body enotify 
environment mailbox date index ihave duplicate mime foreverypart 
extracttext
namespace inbox {
   inbox = yes
   location =
   mailbox Drafts {
     special_use = \Drafts
   }
   mailbox Junk {
     special_use = \Junk
   }
   mailbox Sent {
     special_use = \Sent
   }
   mailbox "Sent Messages" {
     special_use = \Sent
   }
   mailbox Trash {
     special_use = \Trash
   }
   prefix =
}
passdb {
   args = /etc/dovecot/dovecot-sql.conf.ext
   driver = sql
}
plugin {
   fts = xapian
   fts_autoindex = yes
   fts_autoindex_exclude = \Trash
   fts_decoder = decode2text
   fts_enforced = yes
   fts_xapian = partial=3 full=20 verbose=1 attachments=0
   mail_log_events = delete undelete expunge copy mailbox_delete 
mailbox_rename
   mail_log_fields = uid box msgid size
   mail_replica = tcp:10.1.1.137:4545
   plugin = fts fts_xapian
   replication_max_conns = 100
   sieve_before = /var/lib/dovecot/sieve.d/vmail/
   sieve_dir = ~/sieve
   sieve_global_extensions = +vnd.dovecot.duplicate
   sieve_trace_debug = no
   sieve_trace_level = actions
}
protocols = " imap lmtp sieve sieve"
service aggregator {
   fifo_listener replication-notify-fifo {
     group = dmail
     user = dmail
   }
   unix_listener replication-notify {
     group = dmail
     user = dmail
   }
}
service auth {
   unix_listener /var/spool/postfix/private/auth {
     group = postfix
     mode = 0666
     user = postfix
   }
   unix_listener auth-userdb {
     group = dmail
     mode = 0600
     user = dmail
   }
}
service decode2text {
   executable = script /usr/lib/dovecot/decode2text.sh
   unix_listener decode2text {
     mode = 0666
   }
   user = dovecot
}
service doveadm {
   inet_listener {
     port = 4545
   }
}
service imap-login {
   inet_listener imaps {
     port = 993
     ssl = yes
   }
}
service indexer-worker {
   vsz_limit = 15 G
}
service lmtp {
   unix_listener /var/spool/postfix/private/dovecot-lmtp {
     group = postfix
     mode = 0600
     user = postfix
   }
}
service managesieve-login {
   inet_listener sieve {
     port = 4190
   }
}
service replicator {
   process_min_avail = 1
   unix_listener replicator-doveadm {
     group = dmail
     mode = 0660
     user = dmail
   }
}
service stats {
   unix_listener stats-reader {
     group = dmail
     mode = 0660
     user = dmail
   }
   unix_listener stats-writer {
     group = dmail
     mode = 0660
     user = dmail
   }
}
ssl = required
ssl_cert = # hidden, use -^^ to show it
ssl_cipher_list = 
ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
userdb {
   args = /etc/dovecot/dovecot-sql.conf.ext
   driver = sql
}
protocol lmtp {
   mail_plugins = " mail_log notify notify replication sieve"
}
protocol lda {
   mail_plugins = " mail_log notify notify replication sieve"
}
protocol imap {
   mail_plugins = " mail_log notify notify replication fts fts_xapian"
}


More information about the dovecot mailing list