[Dovecot] Problem to setup replication

Daniel Thielemann Daniel-128 at gmx.de
Tue Jan 28 14:02:50 EET 2014


Hi,

i tried to setup replication since some days but I'am stuck now. 



My conf:

# 2.2.10: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-431.3.1.el6.x86_64 x86_64 CentOS release 6.5 (Final)
dsync_remote_cmd = ssh -l%{login} %{host} /usr/bin/doveadm dsync-server -u%u -l%{lock_timeout} -n%{namespace}
log_path = /var/log/dovecot
mail_gid = 5000
mail_home = /var/vmail/%d/%n
mail_location = maildir:~/Maildir
mail_plugins = " notify replication"
mail_uid = 5000
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
mbox_write_locks = fcntl
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 Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
plugin {
  mail_replica = remote:vmail at server1.domain.dom
  replication_full_sync_interval = 1 hours
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
}
protocols = imap sieve
service aggregator {
  fifo_listener replication-notify-fifo {
    user = vmail
  }
  unix_listener replication-notify {
    user = vmail
  }
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
    user = postfix
  }
  unix_listener auth-master {
    mode = 0600
    user = vmail
  }
  unix_listener auth-userdb {
    group = vmail
    mode = 0600
    user = vmail
  }
}
service managesieve-login {
  inet_listener sieve_deprecated {
    port = 2000
  }
}
service replicator {
  process_min_avail = 1
  unix_listener replicator-doveadm {
    mode = 0600
    user = vmail
  }
}
ssl = required
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  log_path = /var/log/protocol-lda.log
  mail_plugins = sieve
  postmaster_address = postmaster at domain.dom
}

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

sql-conf:

driver = mysql
connect = host=127.0.0.1 dbname=xxx user=mailuser password=xxx
default_pass_scheme = SSHA512

password_query = SELECT email as user, password FROM virtual_users WHERE email='%u';

user_query = SELECT email as user FROM virtual_users WHERE email ='%u';

iterate_query = SELECT email as user FROM virtual_users WHERE email='%u';

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


The config on the other node is similar, except the mail_replica settings. The weird thing is, that my logs are completly empty. I see only the dovecot startup messages and nothing else. I don't understand why the replication never starts by itself or why there are no errors or anything else in the log. I already read the dovecot replication howto in the official documentation, but IMO I've setup everything already like in the docs.



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

I've already tried to replicate my mailboxes using dsync, but if I run the dsync command I get only this output:


bash-4.1$ ssh vmail at server1.domain.dom /usr/bin/doveadm dsync-server -u john at domain.dom
VERSION dsync   3       2
Hhostname       sync_ns_prefix  sync_box        sync_box_guid   sync_type       debug   sync_visible_namespaces exclude_mailboxes       send_mail_requests      backup_send     backup_recv  lock_timeout     no_mail_sync    no_backup_overwrite     purge_remote
Smailbox_guid   last_uidvalidity        last_common_uid last_common_modseq      last_common_pvt_modseq  changes_during_sync
Nname   existence       mailbox_guid    uid_validity    uid_next        last_renamed_or_created subscribed      last_subscription_change
Dhierarchy_sep  mailboxes       dirs    unsubscribes
Bmailbox_guid   uid_validity    uid_next        messages_count  first_recent_uid        highest_modseq  highest_pvt_modseq      mailbox_lost    cache_fields    have_guids      have_save_guids       have_only_guid128
Atype   key     value   stream  deleted last_change     modseq
Ctype   uid     guid    hdr_hash        modseq  pvt_modseq      save_timestamp  add_flags       remove_flags    final_flags     keywords_reset  keyword_changes
Rguid   uid
Mguid   uid     pop3_uidl       pop3_order      received_date   stream
cname   decision        last_used
.
Hserver1.domain.dom
dsync-remote(john at domain.dom): Error: dsync(local): I/O has stalled, no activity for 600 seconds
dsync-remote(john at domain.dom): Error: Timeout during state=slave_recv_handshake



Any help would be appreciated, because I've really no other ideas anymore.


Thanks in advance


PS: Excuse my english, I'am german :D


More information about the dovecot mailing list