Please tell me about Dsync replicator.
The following are set to enable the "replication" plug-in
/etc/dovecot/conf.d/10-mail.conf
---
mail_plugins = notify replication
---
And I made the following file
/etc/dovecot/conf.d/30-dsync.conf
---
service replicator {
process_min_avail = 1
}
dsync_remote_cmd = ssh -l%{login} %{host} doveadm dsync-server -u%u
plugin {
mail_replica = remote:root@"ServerIP"
}
service aggregator {
fifo_listener replication-notify-fifo {
user = mail
}
unix_listener replication-notify {
user = mail
}
}
service replicator {
unix_listener replicator-doveadm {
mode = 0600
}
}
replication_max_conns = 10
plugin {
# When saving a new mail via IMAP or delivering a mail via LDA/LMTP,
# wait for the mail to be synced to the remote site. If it doesn't finish
# in 2 seconds, return success anyway.
# replication_sync_timeout = 2s
}
---
But replication gives an error
---
Error: open(/var/run/dovecot/replication-notify-fifo) failed: Permission denied
---
Why is this?
By the way, When 30-dsync.conf is changed as follows, it works only for one user
---
service aggregator {
fifo_listener replication-notify-fifo {
user = "one user name"
}
unix_listener replication-notify {
user = "one user name"
}
}
---
However, I want to work with all mail users.
Please help me what to do.
My configuration is as follows
---
# 2.2.36 (1f10bfa63): /etc/dovecot/dovecot.conf
# OS: Linux 3.10.0-1062.9.1.el7.x86_64 x86_64 CentOS Linux release 7.7.1908 (Core)
# Hostname: test1.s1.iwate-np.co.jp
dsync_remote_cmd = ssh -l%{login} %{host} doveadm dsync-server -u%u
first_valid_uid = 1000
mail_location = maildir:~/Maildir
mail_plugins = notify replication
mbox_write_locks = fcntl
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 {
driver = pam
}
plugin {
mail_replica = remote:root@192.168.4.2
}
service aggregator {
fifo_listener replication-notify-fifo {
user = mail
}
unix_listener replication-notify {
user = mail
}
}
service replicator {
process_min_avail = 1
unix_listener replicator-doveadm {
mode = 0600
}
}
ssl = required
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = # hidden, use -P to show it
userdb {
driver = passwd
}
---