Hello,
I have a question in regards to specific dovecot replication behaviour
and I'm just wondering if this is actually an expected/normal behaviour,
or just a version issue.
I'm using dovecot 2.3.16 which is packed by default with latest Ubuntu
22.04.1 LTS server release. I setup dovecot replication pair (mx1 - mx2)
which is working ok. MX1 has priority 10, MX2 has priority 20. I use
maildir (postfix + dovecot lmtp).
The "strange" behaviour is this. When new mail arrives, it's by default
delivered into "new" folder inside user directory. This email is then
replicated to both servers (mx1 and mx2). When I login to mx1 via IMAP
client (roundcube, outlook, etc.) that specific email is moved from
"new" to "cur" folder on server mx1 and it's flagged also with "S",
which probably means read flag. On server mx2, that email filename is
also flagged with "S", but the email stays inside the "new" folder and
it's not moved to "cur". If I want this email to be moved to "cur" on
mx2 server, I have to login to that IMAP server as well, click on that
email (which is already flagged as read), and after click, the email is
also moved to "cur" on server mx2.
Simply said, all new mails on mx1 server are moved to "cur" when
accessed, but the stay in "new" folder on server mx2 until they're
physically accessed there as well. Is this normal behaviour?
I tried setup with TCP and SSH replication, and the situation is the
same in all cases. Lastly, I tried TCPS (with SSL) as well, but that
option has issues in 2.3.16, which is probably known already as I found
multiple posts about these issues in this version.
Thank you in advance for your answer and kind regards, Tomaz Kavcic.
---
As suggested by mr. Timo Sarainen, this should be synced, so I'm posting
doveconf -n as attachment for both servers as well.# 2.3.16 (7e2e900c1a): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.16 (09c29328)
# OS: Linux 5.15.0-56-generic x86_64 Ubuntu 22.04.1 LTS ext4
# Hostname: mx1.futurion.si
auth_mechanisms = plain login
debug_log_path = /var/log/dovecot.log
doveadm_password = # hidden, use -P to show it
doveadm_port = 999
info_log_path = /var/log/dovecot.log
log_path = /var/log/dovecot.log
mail_location = maildir:/data/mail/%d/%n/
mail_plugins = notify replication
mail_privileged_group = mail
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 {
mail_replica = remote:mx2.futurion.si
sieve = file:/data/mail/sieve/%d/%n/sieve;active=/data/mail/sieve/%d/%n/.dovecot.sieve
}
protocols = " imap lmtp sieve pop3"
replication_full_sync_interval = 2 hours
service aggregator {
fifo_listener replication-notify-fifo {
user = vmail
}
unix_listener replication-notify {
user = vmail
}
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
}
service doveadm {
inet_listener {
port = 999
ssl = yes
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
service replicator {
process_min_avail = 1
unix_listener replicator-doveadm {
mode = 0600
user = vmail
}
}
ssl = required
ssl_cert = </etc/letsencrypt/live/mail.futurion.si/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
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 = notify replication sieve
}
# 2.3.16 (7e2e900c1a): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.16 (09c29328)
# OS: Linux 5.15.0-56-generic x86_64 Ubuntu 22.04.1 LTS ext4
# Hostname: mx2.futurion.si
auth_mechanisms = plain login
debug_log_path = /var/log/dovecot.log
doveadm_password = # hidden, use -P to show it
doveadm_port = 999
info_log_path = /var/log/dovecot.log
log_path = /var/log/dovecot.log
mail_location = maildir:/data/mail/%d/%n/
mail_plugins = notify replication
mail_privileged_group = mail
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 {
mail_replica = remote:mx1.futurion.si
sieve = file:/data/mail/sieve/%d/%n/sieve;active=/data/mail/sieve/%d/%n/.dovecot.sieve
}
protocols = " imap lmtp sieve pop3"
replication_full_sync_interval = 2 hours
service aggregator {
fifo_listener replication-notify-fifo {
user = vmail
}
unix_listener replication-notify {
user = vmail
}
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
}
service doveadm {
inet_listener {
port = 999
ssl = yes
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
service replicator {
process_min_avail = 1
unix_listener replicator-doveadm {
mode = 0600
user = vmail
}
}
ssl = required
ssl_cert = </etc/letsencrypt/live/mail.futurion.si/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
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 = notify replication sieve
}