On 8/4/2014 12:38 μμ, Teemu Huovila wrote:

3) dsync replication / doveadm sync not working as expected.
These came in pretty late in the thread and I did not get a full picture of 
what kind of setups and parameters were used. I
suspect these might be a configuration issue. I think trying with different 
configurations and going through the documentation,
such as it is, once more, is your best bet. Use -D and -v to make dsync more 
verbose, so you do not miss any error messages.

Thank you for the reply; I am focusing on the 3rd part, since this is the one I can provide feedback about.

My current configuration is exactly as suggested on the wiki2 and I list it below for your reference.

Neither using replication nor using dsync from CLI leads to subfolders getting replicated, as I have explained. As an example, if a user creates subfolder "boxtest" e.g. under Inbox on either side, it never gets created on the other side.

Running dsync with -Dv does not reveal any errors.

For example, here is the output of command:

# dsync -fDv -u imaptester mirror ssh -l root vmail1.example.com dsync -u imaptester

Mailbox "boxtest" under Inbox (on vmail server) -containing one message- should get replicated (created) on vmail1 server, but it does not.

If you can spot anything that can help on tracing the problem, please help.

Otherwise, I can't see what is causing the erratic replication.

Thanks,
Nick

*****************************************************************************
...
dsync-local(imaptester): Debug: brain M: in box 'INBOX.boxtest' recv_state=mailbox send_state=mailbox dsync-local(imaptester): Debug: brain M: out box 'INBOX.boxtest' recv_state=mailbox send_state=mailbox changed=0
dsync-local(imaptester): Debug: brain M: out state=sync_mails changed=0
dsync-local(imaptester): Debug: brain M: in state=sync_mails
dsync-local(imaptester): Debug: brain M: in box 'INBOX.boxtest' recv_state=mailbox send_state=mailbox dsync-local(imaptester): Debug: brain M: out box 'INBOX.boxtest' recv_state=attributes send_state=changes changed=1
dsync-local(imaptester): Debug: brain M: out state=sync_mails changed=1
dsync-local(imaptester): Debug: brain M: in state=sync_mails
dsync-local(imaptester): Debug: brain M: in box 'INBOX.boxtest' recv_state=attributes send_state=changes dsync-local(imaptester): Debug: brain M: out box 'INBOX.boxtest' recv_state=changes send_state=mail_requests changed=1
dsync-local(imaptester): Debug: brain M: out state=sync_mails changed=1
dsync-local(imaptester): Debug: brain M: in state=sync_mails
dsync-local(imaptester): Debug: brain M: in box 'INBOX.boxtest' recv_state=changes send_state=mail_requests dsync-local(imaptester): Debug: brain M: Import INBOX.boxtest: Import change GUID=1396119018.M550517P3113.vmail.example.com,S=1169,W=1194 UID=1 hdr_hash= dsync-local(imaptester): Debug: brain M: out box 'INBOX.boxtest' recv_state=changes send_state=mail_requests changed=1
dsync-local(imaptester): Debug: brain M: out state=sync_mails changed=1
dsync-local(imaptester): Debug: brain M: in state=sync_mails
dsync-local(imaptester): Debug: brain M: in box 'INBOX.boxtest' recv_state=changes send_state=mail_requests dsync-local(imaptester): Debug: brain M: Import INBOX.boxtest: Last common UID=1 dsync-local(imaptester): Debug: brain M: out box 'INBOX.boxtest' recv_state=mail_requests send_state=mails changed=1
dsync-local(imaptester): Debug: brain M: out state=sync_mails changed=1
dsync-local(imaptester): Debug: brain M: in state=sync_mails
dsync-local(imaptester): Debug: brain M: in box 'INBOX.boxtest' recv_state=mail_requests send_state=mails dsync-local(imaptester): Debug: brain M: out box 'INBOX.boxtest' recv_state=mail_requests send_state=mails changed=0
dsync-local(imaptester): Debug: brain M: out state=sync_mails changed=0
dsync-local(imaptester): Debug: brain M: in state=sync_mails
dsync-local(imaptester): Debug: brain M: in box 'INBOX.boxtest' recv_state=mail_requests send_state=mails dsync-local(imaptester): Debug: brain M: out box 'INBOX.boxtest' recv_state=mails send_state=done changed=1
dsync-local(imaptester): Debug: brain M: out state=sync_mails changed=1
dsync-local(imaptester): Debug: brain M: in state=sync_mails
dsync-local(imaptester): Debug: brain M: in box 'INBOX.boxtest' recv_state=mails send_state=done
dsync-local(imaptester): Debug: brain M: Import INBOX.boxtest: Saved UIDs:
dsync-local(imaptester): Debug: brain M: Import INBOX.boxtest: Finish update: min_next_uid=2 min_first_recent_uid=2 min_highest_modseq=2 min_highest_pvt_modseq=0 dsync-local(imaptester): Debug: brain M: out box 'INBOX.boxtest' recv_state=recv_last_common send_state=done changed=1
dsync-local(imaptester): Debug: brain M: out state=sync_mails changed=1
dsync-local(imaptester): Debug: brain M: in state=sync_mails
dsync-local(imaptester): Debug: brain M: in box 'INBOX.boxtest' recv_state=recv_last_common send_state=done dsync-local(imaptester): Debug: brain M: out box 'INBOX.boxtest' recv_state=recv_last_common send_state=done changed=0
dsync-local(imaptester): Debug: brain M: out state=sync_mails changed=0
dsync-local(imaptester): Debug: brain M: in state=sync_mails
dsync-local(imaptester): Debug: brain M: in box 'INBOX.boxtest' recv_state=recv_last_common send_state=done dsync-local(imaptester): Debug: brain M: out box '' recv_state=recv_last_common send_state=done changed=1 dsync-local(imaptester): Debug: brain M: out state=master_send_mailbox changed=1
dsync-local(imaptester): Debug: brain M: in state=master_send_mailbox
dsync-local(imaptester): Debug: brain M: out state=sync_mails changed=1
dsync-local(imaptester): Debug: brain M: in state=sync_mails
...
*****************************************************************************

============================ Configuration file ============================

# cat /etc/dovecot/dovecot.conf
# 2.2.12: dovecot.conf

protocols = imap pop3

login_greeting = EXAMPLE.COM POP/IMAP Srv XAPITI XPICTOY

mail_location = maildir:~/Maildir/
mail_gid = 500
mail_uid = 500

auth_mechanisms = plain login
auth_username_format = %Lu

auth_verbose = yes
auth_debug = no

disable_plaintext_auth = no

mail_plugins = quota notify replication

protocol imap {
  imap_client_workarounds = "delay-newmail"
  mail_plugins = quota imap_quota notify replication
}

protocol pop3 {
  mail_max_userip_connections = 3
  mail_plugins = quota notify replication
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
}

protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  info_log_path =
  log_path =
  mail_plugins = quota notify replication
  postmaster_address = sysad...@example.com
  sendmail_path = /usr/lib/sendmail
}

userdb {
  args = /etc/dovecot/dovecot-usrdb-ldap.conf
  driver = ldap
}

passdb {
  args = /etc/dovecot/dovecot-passdb-ldap.conf
  driver = ldap
}

dsync_remote_cmd = ssh -l root vmail1.example.com doveadm dsync-server -u%u

replication_dsync_parameters = -d -N -l 30 -U

plugin {
  mail_replica = remote:vm...@vmail1.example.com
}

plugin {
  quota = maildir:User quota
  quota_rule = *:storage=4G
  quota_rule2 = Trash:storage=+3%%
  quota_warning = storage=75%% quota-warning 75 %u
  quota_warning2 = storage=90%% quota-warning 90 %u
}

service quota-warning {
  executable = script /opt/mail1.sh
  user = vmail
  unix_listener quota-warning {
    user = vmail
  }
}

service aggregator {
  fifo_listener replication-notify-fifo {
    user = vmail
  }
  unix_listener replication-notify {
    user = vmail
  }
}

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

service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-master {
    group = vmail
    mode = 0660
    user = vmail
  }
  user = root
}

service imap-login {
  service_count = 1
  vsz_limit = 64 M
}

service pop3-login {
  service_count = 1
  vsz_limit = 64 M
}

service replicator {
  process_min_avail = 1
}

ssl_ca = </etc/pki/tls/certs/chain-1552.pem
ssl_cert = </etc/pki/tls/certs/cert-1552.pem
ssl_key = </etc/pki/tls/private/key-1552.pem

syslog_facility = local1

================================================================================

Reply via email to