Zimbra CLI Command
Distribution List view of a user
zmprov gam lokesh.v@it****.in
getFilterRules(gfrl)
zmprov ga lokesh.v@it****.in zimbraMailSieveScript
Zimbra LDAP Details
zmlocalconfig -s zimbra_ldap_password zimbra_ldap_password = ****** zimbra_ldap_user = zimbra zimbra_ldap_userdn = uid=zimbra,cn=admins,cn=zimbra ou=people,dc=it***a,dc=com
Setting the Default Domain
zmprov mcf zimbraDefaultDomainName domain1.com
Setting System-wide Signatures
/opt/zimbra/data/altermime ------- Signature Location * zimbraDomainMandatoryMailSignatureEnabled (TRUE/FALSE) TRUE enables this feature. * zimbraDomainMandatoryMailSignatureText. This creates the plain text version. * zimbraDomainMandatoryMailSignatureHTML. This creates the HTML version.
1. To create a system wide mandatory signature, enter the following:
zmprov mcf zimbraDomainMandatoryMailSignatureEnabled TRUE zmprov mcf zimbraDomainMandatoryMailSignatureText <“some text”> zmprov mcf zimbraDomainMandatoryMailSignatureHTML "<html><body>ITCYBERTEK India Pvt Ltd - ITCYBERTEK India</body></html>"
2. Restart Amavis to apply the configuration and global signature files. Type:
/opt/zimbra/bin/zmamavisdctl restart
The global signature is not visible when an email is composed, but displays in the recipient’s email message.
zmprov mcf zimbraDomainMandatoryMailSignatureHTML "<html><body style='font-size: small;text-align:justify;'><p> <u>DISCLAIMER:</u><br />The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or ITCYBERTEK or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of ITCYBERTEK or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect.</p> </body></html>"
zimbra distribution list command line
zmprov gdlm support@it******.in
getAccountMembership
zmprov gam lokesh.v@it*****in
Allowing relaying for a remote machine
Let's say you have a single machine on a remote network (for example, an automated mailing list manager with the IP address 10.10.200.25), and the current settings look like this:
postconf mynetworks mynetworks = 127.0.0.0/8 10.10.130.0/24
Add the remote machine like this:
zmprov ms zimbra.example.com zimbraMtaMyNetworks '127.0.0.0/8 10.10.130.0/24 10.10.200.25/32'
postfix reload
Change the recipient of the "daily mail report"
By default, zmdailyreport uses smtp_destination to send the daily report. You need to change the following localconfig value as per your requirement:
zmlocalconfig smtp_destination zmlocalconfig -e smtp_destination=user@domain.com
ZMDaily Mail Report run manually
/opt/zimbra/libexec/zmdailyreport -m
zmamavisdctl is not running
Thie is the Link Refer
su - zimbra zmcontrol stop exit ps ax | grep zimbra mv /opt/zimbra/log/amavisd.pid /opt/zimbra/log/amavisd.pid.backup su - zimbra zmcontrol start
zmopendkimctl is not running
su - zimbra zmcontrol stop exit ps aux | grep opendkim killall -9 opendkim su - zimbra zmcontrol start
Renaming ZCS 8.7 Domain
The command to rename the domain for 8.7 is the same:
zmprov -l rd [olddomain.com] [newdomain.com].
However, the issue with the resource is fixed, also if you have domain aliases, they are not deleted after the rename. The only issue left is that the zimbraPrefFromAddress attribute is not changed. If you have users with this attribute set, you need to manually set that again.
Here is an output from the rename:
zmprov -l rd olddomain.com newdomain domain olddomain renamed to newdomain
Note: use zmlocalconfig to check and update any localconfig settings referencing domain 'olddomain' on all servers.
Use /opt/zimbra/libexec/zmdkimkeyutil to recreate the DKIM entries for new domain name if required.
You will need to use zmlocalconfig to do the checks and the zmdkimkeyutil utility to recreate the DKIM entries if required.
zmprov -l rd ******.com *****.info zmprov -l rd ******.info *****.com zmprov -l rd ******.com ******.co
As to list accounts mail with forward
zmprov -l gaa -v | grep -e zimbraMailDeliveryAddress: -e zimbraMailForwardingAddress:
Cleare the Deffered mail from selected users
This the Link Refer
/opt/zimbra/common/sbin/postqueue -p |egrep -v '^ *\(|-Queue ID-' | awk 'BEGIN { RS = "" } { if ($7 == "avalert@*****.co") print $1} '| tr -d '*!'| /opt/zimbra/common/sbin/postsuper -d -
/opt/zimbra/common/sbin/postqueue -p |egrep -v '^ *\(|-Queue ID-' | awk 'BEGIN { RS = "" } { if ($7 == "avalert@*****.co") print $1} '
**View** /opt/zimbra/common/sbin/postqueue -p | egrep -v '^ *\(|-Queue ID-' | awk 'BEGIN { RS = "" } { if ($7 == "support@*****.com") print $1} '
**Delete** /opt/zimbra/common/sbin/postqueue -p |egrep -v '^ *\(|-Queue ID-' | awk 'BEGIN { RS = "" } { if ($7 == "support@*****.com") print $1} '| tr -d '*!'| /opt/zimbra/common/sbin/postsuper -d -
Cron Setup
- *1 min */1 * * * * /opt/zimbra/common/sbin/postqueue -p |egrep -v '^ *\(|-Queue ID-' | awk 'BEGIN { RS = “” } { if ($7 == “support@***.com”) print $1} '| tr -d '*!'| /opt/zimbra/common/sbin/postsuper -d -
Command to display disk usage by mailbox
zmprov gqu `zmhostname` zmprov -l sa "(zimbraAccountStatus=active)" >/opt/Log/Activelist.xls zmprov -l sa "(zimbraAccountStatus=closed)""(givenName)" zmprov -l sa "(zimbraAccountStatus=Lockout)""(givenName)"