Set up replication
[sysconfig/dovecot.git] / conf.d / 30-replication.conf
1 # Configure Dovecot mail replication
2 # Based on https://wiki.dovecot.org/Replication
3
4 mail_plugins = $mail_plugins notify replication
5
6 service replicator {
7   process_min_avail = 1
8 }
9
10 dsync_remote_cmd = ssh -l%{login} %{host} doveadm dsync-server -u%u
11 plugin {
12   mail_replica = remote:dovecot-vmail@mail-pi.dehnerts.com
13 }
14
15 service aggregator {
16   fifo_listener replication-notify-fifo {
17     user = dovereplicate
18     mode = 0666
19   }
20   unix_listener replication-notify {
21     user = dovereplicate
22     mode = 0666
23   }
24 }
25
26 service replicator {
27   unix_listener replicator-doveadm {
28     mode = 0600
29   }
30 }
31
32 service doveadm {
33   vsz_limit=512M
34 }
35
36 replication_max_conns = 10
37
38 plugin {
39   # When saving a new mail via IMAP or delivering a mail via LDA/LMTP,
40   # wait for the mail to be synced to the remote site. If it doesn't finish
41   # in 2 seconds, return success anyway.
42   #replication_sync_timeout = 2s
43 }