Setting up replication?

Knute Johnson dovecot at knutejohnson.com
Wed Mar 23 21:26:21 UTC 2016


I'm trying to set up replication between two servers and I've hit a 
snag.  I have two users and am using mbox files.  If anybody has a 
sample config file for a simple system like mine I would really be 
grateful to see it.

Thanks,

The error I'm getting is:

Mar 23 14:07:31 knute2 dovecot: doveadm(192.168.3.100,nobody): Error: 
user nobody: Initialization failed: Namespace '': 
mkdir(/nonexistent/mail) failed: Permission denied (euid=65534(nobody) 
egid=65534(nogroup))
Mar 23 14:07:31 knute2 dovecot: doveadm(192.168.3.100,nobody): Error: 
dsync-server: User init failed
Mar 23 14:07:31 knute2 dovecot: doveadm(nobody): Error: sync: Failed to 
start dsync-server command: 75

knute at knute2:/etc/dovecot/conf.d $ sudo doveadm user '*'
nobody
knute
penny

I don't know why the user 'nobody' shows up here?  nobody is in the 
/etc/passwd file but he has no group.

knute at knute2:/ $ cat /etc/passwd | grep nobody
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin

-----------------------

I created a separate config file as suggested in Peer Heinlein's book.

knute at knute2:/etc/dovecot/conf.d $ cat 12-replication.conf
mail_plugins = $mail_plugins notify replication

service replicator {
     process_min_avail = 1
     unix_listener replicator-doveadm {
         mode = 0600
     }
}

service aggregator {
     fifo_listener replication-notify-fifo {
         mode = 0666
     }
     unix_listener replication-notify {
         mode = 0666
     }
}

service doveadm {
     inet_listener {
         port = 30303
     }
}

#doveadm_port = 30303

doveadm_password = secret

plugin {
     mail_replica = tcp:knute2.frazmtn.com:30303
}

replication_dsync_parameters = -d -N -l 30 -U

---------------------

knute at knute2:/etc/dovecot/conf.d $ dovecot -n
# 2.2.13: /etc/dovecot/dovecot.conf
# OS: Linux 4.1.19-v7+ armv7l Debian 8.0
doveadm_password = secret
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_plugins = " notify replication"
namespace {
   inbox = yes
   location =
   mailbox {
     special_use = \Drafts
     name = Drafts
   }
   mailbox {
     special_use = \Junk
     name = Junk
   }
   mailbox {
     special_use = \Sent
     name = Sent
   }
   mailbox {
     special_use = \Sent
     name = Sent Messages
   }
   mailbox {
     auto = subscribe
     special_use = \Trash
     name = Trash
   }
   prefix =
   name = inbox
}
passdb {
   driver = pam
}
plugin {
   mail_replica = tcp:knute3.frazmtn.com:30303
}
protocols = " imap"
service {
   fifo_listener {
     mode = 0666
     path = replication-notify-fifo
   }
   unix_listener {
     mode = 0666
     path = replication-notify
   }
   name = aggregator
}
service anvil-auth-penalty {
   name = anvil
}
service auth-worker {
   name = auth-worker
}
service auth-client {
   name = auth
}
service config {
   name = config
}
service dict {
   name = dict
}
service login/proxy-notify {
   name = director
}
service dns-client {
   name = dns_client
}
service {
   inet_listener {
     port = 30303
     name =
   }
   name = doveadm
}
service imap {
   inet_listener {
     port = 0
     name = imaps
   }
   name = imap-login
}
service imap-urlauth {
   name = imap-urlauth-login
}
service imap-urlauth-worker {
   name = imap-urlauth-worker
}
service token-login/imap-urlauth {
   name = imap-urlauth
}
service login/imap {
   name = imap
}
service indexer-worker {
   name = indexer-worker
}
service indexer {
   name = indexer
}
service ipc {
   name = ipc
}
service lmtp {
   name = lmtp
}
service log-errors {
   name = log
}
service {
   inet_listener {
     port = 0
     name = pop3
   }
   inet_listener {
     port = 0
     name = pop3s
   }
   name = pop3-login
}
service login/pop3 {
   name = pop3
}
service {
   process_min_avail = 1
   unix_listener {
     mode = 0600
     path = replicator-doveadm
   }
   name = replicator
}
service login/ssl-params {
   name = ssl-params
}
service stats-mail {
   name = stats
}
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
   driver = passwd
}
protocol lmtp {
   service replication-notify-fifo {
     name = aggregator
   }
   service anvil-auth-penalty {
     name = anvil
   }
   service auth-worker {
     name = auth-worker
   }
   service auth-client {
     name = auth
   }
   service config {
     name = config
   }
   service dict {
     name = dict
   }
   service login/proxy-notify {
     name = director
   }
   service dns-client {
     name = dns_client
   }
   service doveadm-server {
     name = doveadm
   }
   service imap {
     name = imap-login
   }
   service imap-urlauth {
     name = imap-urlauth-login
   }
   service imap-urlauth-worker {
     name = imap-urlauth-worker
   }
   service token-login/imap-urlauth {
     name = imap-urlauth
   }
   service login/imap {
     name = imap
   }
   service indexer-worker {
     name = indexer-worker
   }
   service indexer {
     name = indexer
   }
   service ipc {
     name = ipc
   }
   service lmtp {
     name = lmtp
   }
   service log-errors {
     name = log
   }
   service pop3 {
     name = pop3-login
   }
   service login/pop3 {
     name = pop3
   }
   service replicator-doveadm {
     name = replicator
   }
   service login/ssl-params {
     name = ssl-params
   }
   service stats-mail {
     name = stats
   }
}
protocol lda {
   service replication-notify-fifo {
     name = aggregator
   }
   service anvil-auth-penalty {
     name = anvil
   }
   service auth-worker {
     name = auth-worker
   }
   service auth-client {
     name = auth
   }
   service config {
     name = config
   }
   service dict {
     name = dict
   }
   service login/proxy-notify {
     name = director
   }
   service dns-client {
     name = dns_client
   }
   service doveadm-server {
     name = doveadm
   }
   service imap {
     name = imap-login
   }
   service imap-urlauth {
     name = imap-urlauth-login
   }
   service imap-urlauth-worker {
     name = imap-urlauth-worker
   }
   service token-login/imap-urlauth {
     name = imap-urlauth
   }
   service login/imap {
     name = imap
   }
   service indexer-worker {
     name = indexer-worker
   }
   service indexer {
     name = indexer
   }
   service ipc {
     name = ipc
   }
   service lmtp {
     name = lmtp
   }
   service log-errors {
     name = log
   }
   service pop3 {
     name = pop3-login
   }
   service login/pop3 {
     name = pop3
   }
   service replicator-doveadm {
     name = replicator
   }
   service login/ssl-params {
     name = ssl-params
   }
   service stats-mail {
     name = stats
   }
}
protocol imap {
   mail_max_userip_connections = 32
   service replication-notify-fifo {
     name = aggregator
   }
   service anvil-auth-penalty {
     name = anvil
   }
   service auth-worker {
     name = auth-worker
   }
   service auth-client {
     name = auth
   }
   service config {
     name = config
   }
   service dict {
     name = dict
   }
   service login/proxy-notify {
     name = director
   }
   service dns-client {
     name = dns_client
   }
   service doveadm-server {
     name = doveadm
   }
   service imap {
     name = imap-login
   }
   service imap-urlauth {
     name = imap-urlauth-login
   }
   service imap-urlauth-worker {
     name = imap-urlauth-worker
   }
   service token-login/imap-urlauth {
     name = imap-urlauth
   }
   service login/imap {
     name = imap
   }
   service indexer-worker {
     name = indexer-worker
   }
   service indexer {
     name = indexer
   }
   service ipc {
     name = ipc
   }
   service lmtp {
     name = lmtp
   }
   service log-errors {
     name = log
   }
   service pop3 {
     name = pop3-login
   }
   service login/pop3 {
     name = pop3
   }
   service replicator-doveadm {
     name = replicator
   }
   service login/ssl-params {
     name = ssl-params
   }
   service stats-mail {
     name = stats
   }
}

-- 

Knute Johnson



More information about the dovecot mailing list