X-Git-Url: https://dehnerts.com/gitweb/?a=blobdiff_plain;f=conf.d%2F10-replication.conf;fp=conf.d%2F10-replication.conf;h=0c3583b623bfe10879b32a11d984db7a8bf15485;hb=2643afa9785f1b255aaafa36dd70440c161fa0be;hp=0000000000000000000000000000000000000000;hpb=a92c4a61c84e38235e10e61c2a9e32c3ecde3270;p=sysconfig%2Fdovecot.git diff --git a/conf.d/10-replication.conf b/conf.d/10-replication.conf new file mode 100644 index 0000000..0c3583b --- /dev/null +++ b/conf.d/10-replication.conf @@ -0,0 +1,43 @@ +# Configure Dovecot mail replication +# Based on https://wiki.dovecot.org/Replication + +mail_plugins = $mail_plugins notify replication + +service replicator { + process_min_avail = 1 +} + +dsync_remote_cmd = ssh -l%{login} %{host} doveadm dsync-server -u%u +plugin { + mail_replica = remote:dovecot-vmail@mail-pi.dehnerts.com +} + +service aggregator { + fifo_listener replication-notify-fifo { + user = dovereplicate + mode = 0666 + } + unix_listener replication-notify { + user = dovereplicate + mode = 0666 + } +} + +service replicator { + unix_listener replicator-doveadm { + mode = 0600 + } +} + +service doveadm { + vsz_limit=512M +} + +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 +}