[Dovecot] Need help with Replication

Michael Neurohr mnewpipe at gmail.com
Wed Sep 11 15:34:48 EEST 2013


Hi!

I set up two mail servers with Postfix and Dovecot and I would like to sync
all mails between the servers. So I set up replication.

Now I'm still getting the following errors:

=======Server 1=======
Sep 11 13:43:52 mx0 dovecot: master: Dovecot v2.1.7 starting up (core dumps
disabled)
Sep 11 13:43:52 mx0 dovecot: auth-worker(4245): mysql(127.0.0.1): Connected
to database mailserver
Sep 11 13:43:52 mx0 dovecot: dsync-local(user1 at domain.com): Error:
stat(/var/mail/vhosts/domain.com/user1/.dovecot.sieve/tmp) failed: Not a
directory
Sep 11 13:43:52 mx0 dovecot: dsync-local(user1 at domain.com): Error: Failed
to sync mailbox dovecot.sieve: Internal error occurred. Refer to server log
for more information. [2013-09-11 13:43:52]
====================

=======Server 2=======
Sep 11 13:45:30 mx1 dovecot: master: Dovecot v2.1.7 starting up (core dumps
disabled)
Sep 11 13:45:32 mx1 dovecot: auth-worker(30031): mysql(127.0.0.1):
Connected to database mailserver
Sep 11 13:45:34 mx1 dovecot: dsync-local(user1 at domain.com): Error: remote:
dsync-remote(user1 at domain.com): Error: stat(/var/mail/vhosts/
domain.com/user1/.dovecot.sieve/tmp) failed: Not a directory
Sep 11 13:45:34 mx1 dovecot: doveadm: Error: dsync-remote(user1 at domain.com):
Error: Failed to sync mailbox dovecot.sieve: Internal error occurred. Refer
to server log for more information. [2013-09-11 13:45:33]
Sep 11 13:45:34 mx1 dovecot: doveadm: Error: dsync-remote(user1 at domain.com):
Error: command BOX-LIST failed
Sep 11 13:45:34 mx1 dovecot: dsync-local(user1 at domain.com): Error: Worker
server's mailbox iteration failed
====================

Currently Server 1 holds all mails. Server 2 has no mails.

Dovecot Version: 2.1.7 on both servers.

=======Dovecot Config Server 1=======
root at mx0:/home/mine# dovecot -n
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-686-pae i686 Debian 7.1 ext4
auth_mechanisms = plain login
mail_location = maildir:/var/mail/vhosts/%d/%n
mail_plugins = notify replication
mail_privileged_group = mail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags
copy include variables body enotify environment mailbox date ihave imapflags
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Spam {
    auto = subscribe
    special_use = \Junk
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
plugin {
  antispam_backend = dspam
  antispam_dspam_args = --deliver;--user;%u
  antispam_dspam_binary = /usr/bin/dspam
  antispam_signature = X-DSPAM-Signature
  antispam_signature_missing = move
  antispam_spam = Spam
  antispam_trash = trash;Trash;Deleted Items;Deleted Messages
  mail_replica = remote:vmail at mx1.neurohr.at
  replication_full_sync_interval = 1 hours
  sieve = ~/.dovecot.sieve
  sieve_before = /etc/sieve/conf.d/before
  sieve_dir = ~/sieve
  sieve_extensions = +imapflags
}
protocols = imap pop3 lmtp sieve
service aggregator {
  fifo_listener replication-notify-fifo {
    mode = 0600
    user = vmail
  }
  unix_listener replication-notify {
    mode = 0600
    user = vmail
  }
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener auth-userdb {
    mode = 0600
    user = vmail
  }
  user = dovecot
}
service config {
  unix_listener config {
    user = vmail
  }
}
service dict {
  unix_listener dict {
    user = vmail
  }
}
service doveadm {
  user = vmail
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
}
service replicator {
  process_min_avail = 1
}
ssl = required
ssl_ca = </etc/ssl/private/mailserver/ca-bundle.crt
ssl_cert = </etc/ssl/private/mailserver/mx0.neurohr.at.pem
ssl_key = </etc/ssl/private/mailserver/mx0.neurohr.at.key
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
protocol lmtp {
  mail_plugins = sieve
}
protocol lda {
  mail_plugins = sieve
}
protocol imap {
  mail_plugins = antispam
}
===============================

=======Dovecot Config Server 2=======
root at mx1:/home/mine# dovecot -n
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.6.11+ armv6l Debian 7.1 ext4
auth_mechanisms = plain login
dsync_remote_cmd = ssh -p 2222 -l%{login} %{host} doveadm dsync-server -u%u
-l%{lock_timeout} -n%{namespace}
mail_location = maildir:/var/mail/vhosts/%d/%n
mail_privileged_group = mail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character
vacation subaddress comparator-i;ascii-numeric relational regex imap4flags
copy include variables body enotify environment mailbox date ihave imapflags
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 = \Junk
    name = Spam
  }
  mailbox {
    auto = subscribe
    special_use = \Trash
    name = Trash
  }
  prefix =
  name = inbox
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
plugin {
  antispam_backend = dspam
  antispam_dspam_args = --deliver;--user;%u
  antispam_dspam_binary = /usr/bin/dspam
  antispam_signature = X-DSPAM-Signature
  antispam_signature_missing = move
  antispam_spam = Spam
  antispam_trash = trash;Trash;Deleted Items;Deleted Messages
  mail_replica = remote:vmail at mx0.domain.com
  replication_full_sync_interval = 1 hours
  sieve = ~/.dovecot.sieve
  sieve_before = /etc/sieve/conf.d/before
  sieve_dir = ~/sieve
  sieve_extensions = +imapflags
}
protocols = imap pop3 lmtp sieve
service {
  fifo_listener {
    mode = 0600
    user = vmail
    path = replication-notify-fifo
  }
  unix_listener {
    mode = 0600
    user = vmail
    path = replication-notify
  }
  name = aggregator
}
service anvil-auth-penalty {
  name = anvil
}
service auth-worker {
  name = auth-worker
}
service {
  unix_listener {
    group = postfix
    mode = 0666
    user = postfix
    path = /var/spool/postfix/private/auth
  }
  unix_listener {
    mode = 0600
    user = vmail
    path = auth-userdb
  }
  user = dovecot
  name = auth
}
service {
  unix_listener {
    user = vmail
    path = config
  }
  name = config
}
service {
  unix_listener {
    user = vmail
    path = dict
  }
  name = dict
}
service login/proxy-notify {
  name = director
}
service dns-client {
  name = dns_client
}
service doveadm-server {
  user = vmail
  name = doveadm
}
service imap {
  name = imap-login
}
service login/imap {
  name = imap
}
service indexer-worker {
  name = indexer-worker
}
service indexer {
  name = indexer
}
service ipc {
  name = ipc
}
service {
  unix_listener {
    group = postfix
    mode = 0600
    user = postfix
    path = /var/spool/postfix/private/dovecot-lmtp
  }
  name = lmtp
}
service log-errors {
  name = log
}
service {
  inet_listener {
    port = 4190
    name = sieve
  }
  name = managesieve-login
}
service login/sieve {
  name = managesieve
}
service pop3 {
  name = pop3-login
}
service login/pop3 {
  name = pop3
}
service {
  process_min_avail = 1
  name = replicator
}
service login/ssl-params {
  name = ssl-params
}
service stats-mail {
  name = stats
}
ssl = required
ssl_ca = </etc/ssl/private/mailserver/ca-bundle.crt
ssl_cert = </etc/ssl/private/mailserver/mx1.domain.com.pem
ssl_key = </etc/ssl/private/mailserver/mx1.domain.com.key
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
protocol lmtp {
  mail_plugins = sieve
  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 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 sieve {
    name = managesieve-login
  }
  service login/sieve {
    name = managesieve
  }
  service pop3 {
    name = pop3-login
  }
  service login/pop3 {
    name = pop3
  }
  service replicator {
    name = replicator
  }
  service login/ssl-params {
    name = ssl-params
  }
  service stats-mail {
    name = stats
  }
}
protocol lda {
  mail_plugins = sieve
  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 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 sieve {
    name = managesieve-login
  }
  service login/sieve {
    name = managesieve
  }
  service pop3 {
    name = pop3-login
  }
  service login/pop3 {
    name = pop3
  }
  service replicator {
    name = replicator
  }
  service login/ssl-params {
    name = ssl-params
  }
  service stats-mail {
    name = stats
  }
}
protocol imap {
  mail_plugins = antispam
  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 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 sieve {
    name = managesieve-login
  }
  service login/sieve {
    name = managesieve
  }
  service pop3 {
    name = pop3-login
  }
  service login/pop3 {
    name = pop3
  }
  service replicator {
    name = replicator
  }
  service login/ssl-params {
    name = ssl-params
  }
  service stats-mail {
    name = stats
  }
}
protocol sieve {
  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 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 sieve {
    name = managesieve-login
  }
  service login/sieve {
    name = managesieve
  }
  service pop3 {
    name = pop3-login
  }
  service login/pop3 {
    name = pop3
  }
  service replicator {
    name = replicator
  }
  service login/ssl-params {
    name = ssl-params
  }
  service stats-mail {
    name = stats
  }
}
protocol pop3 {
  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 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 sieve {
    name = managesieve-login
  }
  service login/sieve {
    name = managesieve
  }
  service pop3 {
    name = pop3-login
  }
  service login/pop3 {
    name = pop3
  }
  service replicator {
    name = replicator
  }
  service login/ssl-params {
    name = ssl-params
  }
  service stats-mail {
    name = stats
  }
}
===============================

What could be the problem?

Thanks,
Michael


More information about the dovecot mailing list