# Dictionary for key=value mailbox attributes. Currently used by URLAUTH, but
# soon intended to be used by METADATA as well.
#mail_attribute_dict =
+mail_attribute_dict = file:%h/.maildir/dovecot-attributes
##
## Mail processes
--- /dev/null
+# 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
+}