dovecot sync not working

Discussion in 'Server Operation' started by darkness_08, Dec 22, 2016.

  1. darkness_08

    darkness_08 New Member

    Hey.

    I've setup two mailserver as mirror and I'm using Dovecot for replication as Florian wrote in his Blog: https://blog.schaal-24.de/uncategorized/mails-mit-dovecot-ueber-tcp-syncen/
    When I start
    Code:
    doveadm  sync  -A  tcp:mx2.server2:23456
    everything works fine. All mails are synced.
    But when a new mail arrives on server1 it isn't synced to server2 automatically.
    The replicator process is running on both server

    What can I do else?
     
  2. florian030

    florian030 Well-Known Member HowtoForge Supporter

    Did you define mail_plugins
    Code:
    mail_plugins = notify replication quota
    and use this in the protocols?
    Code:
    protocol imap {
      mail_plugins = $mail_plugins imap_quota
    }
    protocol lda {
      mail_plugins = $mail_plugins sieve
    [email protected]
    }
    
    This is the dovecot.conf from one of my servers:
    Code:
    #mail_debug=yes
    #debug_log_path = /tmp/dovecot-debug.log
    listen = *,[::]
    protocols = imap pop3 lmtp
    auth_mechanisms = plain login ntlm
    disable_plaintext_auth = no
    log_timestamp = "%Y-%m-%d %H:%M:%S "
    ssl_cert = </etc/postfix/smtpd.cert
    ssl_key = </etc/postfix/smtpd.key
    ssl_protocols = !SSLv2 !SSLv3
    ssl_ca = </etc/ssl/startssl/ca-bundle.crt
    ssl_client_ca_file = /etc/ssl/ca-bundle.crt
    ssl=yes
    ssl_cipher_list =  ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ALL:!LOW:!SSLv2:!EXP:!aNULL
    
    mail_fsync = never
    
    mail_plugins = notify replication quota
    
    passdb {
      args = /etc/dovecot/dovecot-sql.conf
      driver = sql
    }
    
    userdb {
      args = /etc/dovecot/dovecot-sql.conf
      driver = sql
    }
    
    plugin {
      quota = dict:user::file:/var/vmail/%d/%n/.quotausage
      sieve=/var/vmail/%d/%n/.sieve
    }
    
    service auth {
      user = root
      unix_listener /var/spool/postfix/private/auth {
      user = postfix
      group = postfix
      mode = 0666
      }
      unix_listener auth-userdb {
      user = vmail
      group = vmail
      mode = 0666
      }
    }
    
    service imap-login {
      client_limit = 1000
      process_limit = 500
    }
    
    protocol imap {
      mail_plugins = $mail_plugins imap_quota
    }
    
    protocol pop3 {
      pop3_uidl_format = %08Xu%08Xv
    }
    
    protocol lda {
      mail_plugins = $mail_plugins sieve
    [email protected]
    }
    
    # http://wiki2.dovecot.org/Replication
    
    
    doveadm_password = secret
    replication_max_conns = 50
    
    service aggregator {
      fifo_listener replication-notify-fifo {
      user = vmail
      mode = 0666
      }
    
      unix_listener replication-notify {
      user = vmail
      mode = 0666
      }
    }
    
    service replicator {
      unix_listener replicator-doveadm {
      mode = 0666
      }
    }
    
    service doveadm {
      user = vmail
      inet_listener {
      port = 4711
      }
    }
    
    service config {
      unix_listener config {
      user = vmail
      }
    }
    
    plugin {
      replication_full_sync_interval = 1 hours
      mail_replica = tcp:1.2.3.4:2233
    }
    
    protocol sieve {
    }
    
    login_log_format_elements = "user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k"
    
    
     
  3. darkness_08

    darkness_08 New Member

    Hey Florian.

    Thx, this was the right hint:

     
  4. pjservices.de

    pjservices.de New Member

Share This Page