zimbra command line

zimbra command line

How do I use zimbra command lines (CLI) , my post focus command lines for zimbra ldap, zimbra mta, zimbra mailbox, zimbra proxy.

For zimbra ldap

To get all artibute information of uid in base DN:

# ldapsearch -LLL -D "uid=zimbra,cn=admins,cn=zimbra" -x -H ldap://ldap.huuphan.local -w password -b dc=huuphan,dc=local "(&(uid=huupv))"

For zimbra MTA

Starting zmconfigd...failed
Host mta.huuphan.local
        Starting zmconfigd...Failed.
Starting zmconfigd...failed.

To solve problem
# vim /etc/hosts
comment out, to fixed Starting zmconfigd...Failed.   localhost.localdomain localhost

To display trouble logs
# egrep '(reject|warning|error|fatal|panic):' /var/log/zimbra.log

To check if no smtp connection

# netstat -nplt | awk '{print $4 " " $6}' | egrep "[0-9]+.[0-9]+.[0-9]+.[0-9]+:25" | egrep "ESTABLISHED" | wc -l

To see the postfix queue (as zimbra user)
# sudo ~/libexec/zmqstat
# postqueue -p
# mailq
How to delete all MAILER-DAEMON emails in Postfix queue ( To run root user)
for i in `/opt/zimbra/postfix/sbin/postqueue -p|grep 'MAILER-DAEMON' |awk {'print $1'}|grep -v 'MAILER-DAEMON'`; do /opt/zimbra/postfix/sbin/postsuper -d $i ; done

To view message postfix queue
# postcat -q C12E6246BC | more


Tuning Postfix queue in Zimbra

To check and reconfigure queue lifetime
$ postconf | grep maximal_queue_lifetime
maximal_queue_lifetime = 5d
$ postconf -e maximal_queue_lifetime=15m
To check and reconfigure deferred queue parameter
$ postconf | egrep "queue_run_delay|minimal_backoff_time"
minimal_backoff_time = 300s
queue_run_delay = 300s
$ postconf -e queue_run_delay=2000s
$ postconf -e minimal_backoff_time=2000s


Popular posts from this blog

zimbra some services are not running [Solve problem]

Bash script list all IP addresses connected to Server

How to install php7 on centos 6