X-Git-Url: https://dehnerts.com/gitweb/?a=blobdiff_plain;f=conf.d%2F30-replication.conf;fp=conf.d%2F30-replication.conf;h=0c3583b623bfe10879b32a11d984db7a8bf15485;hb=267f4213acf2e92bc0ebedfdaac2db328290339a;hp=0000000000000000000000000000000000000000;hpb=44820d03f2e279fc916ff096d4a0b7df0823718a;p=sysconfig%2Fdovecot.git diff --git a/conf.d/30-replication.conf b/conf.d/30-replication.conf new file mode 100644 index 0000000..0c3583b --- /dev/null +++ b/conf.d/30-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 +}