User Mail Replica Management

User Mail Replica Management#

CLI commands to manage the User Mail Replica, to promote and replicate accounts on other Mailstores, can be found in the dedicated section User Mail Replica Usage.

Check User Mail Replica Services Status#

This section is a collection of commands that can be used to verify the status of Carbonio's User Mail Replica and related services.

Depending on the type of check, commands should be executed as either the root user or zextras user. All commands should be issued on the Node where the corresponding service is installed.

These are the commands to be issued as the root user.

  1. Connect consul to check all CARBONIO service status

    # ssh root@mob-ha-svcs1.demo.zextras.io -L8550:127.0.0.1:8500
    
  2. Check Kafka services status

    # systemctl status carbonio-kafka.service
    
  3. Check Kafka Topics

    # /opt/kafka/bin/kafka-topics.sh --bootstrap-server 127.0.0.1:9092 --list
    

These are the commands to be issued as the zextras user.

  1. Check patroni service, including finding the leader

    # systemctl -u patroni -f
    
  2. Get Global Broker info

    zextras$ carbonio config get global brokers
    
  3. Check status of service

    zextras$ carbonio MailReplica getServices
    
  4. Check LDAP (Directory Server) Multi Master status check

    zextras$ /opt/zextras/libexec/zmreplchk
    
  5. List all Buckets

    zextras$ carbonio core listBuckets all
    
  6. Test S3 connection

    zextras$ carbonio core testS3Connection S3UUID
    
  7. Consul Token get

    zextras$ export CONSUL_HTTP_TOKEN=$(gpg -qdo - /etc/zextras/service-discover/cluster-credentials.tar.gpg | tar xOf - consul-acl-secret.json | jq .SecretID -r)
    
  8. Verify that the Consul server is configured as a service discovery tool and installed as a service

    zextras$ carbonio prov gs $(zmhostname) | grep -i service
    
  9. Check that the server is a Master and that a Replication relationship exists

    # /opt/zextras/libexec/zmldapmmrtool -q
    

    Example output:

    # Master Server ID: 1
    # Master replication agreement: 1
    # rid: 100 URI: ldap://srv2.example.com:389/ TLS:
    

    This confirms that:

    • The node is configured as an LDAP master

    • A replication exists with the peer server

  10. Verify that LDAP Masters are in sync

    # /opt/zextras/libexec/zmreplchk
    

    Example output:

    Master: ldap://srv1.example.com:389 ServerID: 1 Code: 0 Status: In Sync CSNs:
    20251015095813.150894Z#000000#001#000000
    
    Master: ldap://srv2.example.com:389 ServerID: 2 Code: 0 Status: In Sync CSNs:
    20251015095813.150894Z#000000#001#000000
    

    Interpretation

    • Code: 0 indicates that no replication errors are present.

    • Status: In Sync confirms that the LDAP masters are synchronized.

    • Matching CSNs confirm replication consistency between the servers.