Skip to content

Latest commit

 

History

History
4020 lines (2919 loc) · 104 KB

cmdlineutils.adoc

File metadata and controls

4020 lines (2919 loc) · 104 KB

Command Line Utilities

Command Line Interface (CLI) can be used to create, modify and delete certain features and functions of the {product-name}. The Administration Console is the main tool for maintaining the {product-name}, but some functions can only be changed from the CLI utility.

The CLI utility can be used for the following purposes:

  • Provisioning accounts

  • Backup and Restore

  • Starting and stopping a service

  • Move mailboxes

  • Cross-mailbox searches

  • Installing self-signed certificates

  • Local configuration

Note
In general, provisioning and managing accounts should be performed from the Administration Console.

General Tool Information

The {product-name} command-line utilities follow standard UNIX command-line conventions. Use the following general guidelines with the CLI:

  • CLI commands are run as the zimbra user:
    su - zimbrA

  • The CLI commands are case-sensitive. You must type them in lower case.

  • Press ENTER after you type a command.

  • To display usage information about a command, type the CLI command with - h.

    Example: zmprov - h lists all the options available for the zmprov utility.

  • Each operation is invoked through command-line options. Many have a long name and a short name. For example, these two commands are equivalent:

    zmprov createAccount [email protected] test123
    
    zmprov ca [email protected] test123

Syntax Conventions

When demonstrating the syntax of each tool, the following conventions indicate required, optional, and alternate values:

  • {attribute} in curly brackets is required information.

  • [attribute] in square brackets are optional arguments or information.

  • {a|b|c} or [a|b|c] options separated by the pipe character | means "a" OR "b" OR "c"

  • For attribute names that may contain spaces, surround the name with double quotes.

Location of Command-Line Utilities

The command-line tools available for administrators are all located in the /opt/zimbra/bin directory on the {product-name} server.

Zimbra CLI Commands

CLI

The table below lists the CLI commands in /opt/zimbra/bin.

CLI Description

antispam-mysqladmin

Send admin commands to anti=spam MySQL server

antispam-mysql

Enters interactive command-line MySQL session with the mailbox mysql

antispam-mysql.server

Start, stop the SQL instance for the mailbox package

ldap

Start, stop, or find the status of Zimbra LDAP

ldapsearch

Perform a search on an LDAP server

logmysqladmin

Send myslqadmin commands to the logger mysql

mysql

Enters interactive command-line MySQL session with the mailbox mysql

mysql.server

Start, stop the SQL instance for the mailbox package

mysqladmin

Send admin commands to MySQL

postconf

Postfix command to view or modify the postfix configuration

postfix

Start, stop, reload, flush, check, upgrade-configuration of postfix

qshape

Examine postfix queue in relation to time and sender/recipient domain

zmaccts

Lists the accounts and gives the status of accounts on domain

zmamavisdctl

Start, stop, restart, or find the status of the Amavis-D New

zmantispamctl

Start, stop, reload, status for anti-spam service

zmantivirusctl

Start, stop, reload, status for the anti-virus service

zmantispamdbpasswd

Changes anti-spam MySQL database password

zmapachectl

Start, stop, reload, or check status of Apache service (for spell check)

zmarchiveconfig

Command to view, modify, or configure archiving

zmarchivectl

Start, stop, reload, status for archiving

zmarchivesearch

Search archives on the account

zmauditswatchctl

Start, stop, restart, reload, status of the auditswatch

zmbackup

Performs full backups and incremental backups for a designated mail host.

zmbackupabort

Stops a backup that is in process.

zmbackupquery

Find a specific full backup set

zmblobchk

Check consistency of the Zimbra blob store

zmcalchk

Check consistency of appointments and attendees in the Zimbra calendar

zmcbpolicydctl

Start, stop, and restart the cluebringer policyd service, if enabled

zmconfigdctl

Start, stop, kill, restart status of the MTA configuration daemon.

zmcertmgr

Manage self-signed and commercial certificates

zmclamdctl

Start, stop, or find the status of Clam AV

zmcleaniplanetics

Clean iPlanet ICS calendar files

`zmcontrol (Start/Stop/Restart Service)

Start, stop, restart, status of the Zimbra servers. Also can use to find the Zimbra version installed

zmconvertctl

Start, stop, the conversion server or find the status of the converted attachments conversion/indexing

zmdevicesstats

Number of unique ActiveSync device IDs per server

zmgdcutil

(get devices count) gives the total devices system wide without the need of specifying individual servers.

zmdumpenv

General information about the server environment is displayed

zmgsautil

Global Address Book (GAL) synchronization command line utility. Create, delete the GAL sync account and initiate manual syncs.

zmhostname

Find the hostname of the Zimbra server

zmhsm

Start, stop and status of a HSM session.

zmitemdatafile

Extracts and packs tgz files that {product-abbrev} uses for REST import/export

zmjava

Execute Java with Zimbra-specific environment settings

zmjavaext

Execute Java and Zimbra-specific environment settings including extension based jars.

zmldappasswd

Changes the LDAP password

zmlicense

View and install your Zimbra license

zmlmtpinject

Testing tool

zmlocalconfig

Used to set or get the local configuration of a Zimbra server

zmloggerctl

Start, stop, reload, or find the status of the Zimbra logger service

zmloggerhostmap

Used to manually map a DNS hostname to a zmhostname.

zmlogswatchctl

Start, stop, status of the swatch that is monitoring logging.

zmmailbox

Performs mailbox management tasks

zmmailboxdctl

Start, stop, reload, or find the status of the mailbox components (zmmailboxd, MySQL, convert)

zmmboxsearch (Cross Mailbox Search)

Search across mailboxes to find messages and attachments

zmmboxmove

7.1.3 and later. Used to move selected mailboxes from one Zimbra server to another.

zmmboxmovequery

7.1.3 and later. Used to query ongoing mailbox moves on a server

zmpurgeoldmbox

7.1.3 and later. Purges a mailbox from the old server after a mailbox move

zmmemcachedctl

Start, stop, and restart

zmmetadump

Support tool that dumps an item’s metadata in a human-readable form

zmmilterctl

Start, stop, and restart the zimbra milter server if enabled

zmmtaconfigdctl

Beginning in {product-abbrev} 7.0, this command is not used. Use zmconfigdctl.

zmmtactl

Start, stop, or find the status of the MTA

zmmypasswd

Change MySQL passwords

zmmysqlstatus

Status of mailbox SQL instance

zmnginxconf

Command line utility to output the reverse proxy configuration

zmnginxctl

Start, stop, and restart the zimbra reverse proxy

zmplayredo

Performs data restore using backed up snapshots taken periodically. Users who use snapshots to backup and restore their information from a standby site use this command.

zmprov (Provisioning)

Performs all provisioning tasks in Zimbra LDAP, including creating accounts, domains, distribution lists and aliases

zmproxyconfgen

Generates configuration for the nginx proxy

zmproxyctl

Start, stop, restart, and find the status of the IMAP proxy service

zmproxypurge

Purges POP/IMAP routing information from one or more memcached servers

zmpython

Ability to write Python scripts that access Zimbra Java libraries. It sets the {product-abbrev} class path and starts the Jython interpreter.

zmredodump

Support tool for dumping contents of a redolog file for debugging purposes

zmrestore

Performs full restores and incremental restores for a designated mail host

zmrestoreldap

Restore accounts from the LDAP backup

zmrestoreoffline (Offline Restore)

Performs full restore when the Zimbra server (i.e., the mailboxd process) is down

zmsaslauthdctl

Start, stop, or find the status of saslauthd (authentication)

zmschedulebackup

Schedule backups and add the command to your cron table

zmshutil

Used for other zm scripts, do not use

zmskindeploy

Deploy skins for accounts from the command line

zmsoap

Print mail, account, and admin information in the SOAP format

zmspellctl

Start, stop, or find the status of the spell check server

zmsshkeygen

Generate Zimbra’s SSH encryption keys

zmstat-chart

Generate charts from zmstat data collected in a directory

zmstat-chart-config

Outputs an XML configuration that describes the current state of the data gathered from zmstat-chart to generate charts on the Administration Console.

zmstatctl

Start, stop, check status, or rotate logs of zmstat data collectors

zmstorectl

Start, stop, or find the status of Zimbra store services

zmswatchctl

Start, stop, or find the status of the Swatch process, which is used in monitoring

zmsyncreverseproxy

Decodes the sync request/responses and logs them when verbose mode is turned on.

zmthrdump

Initiate a thread dump and save the data to a file with a timestamp

zmtlsctl

Set the Web server mode to the communication protocol options: HTTP, HTTPS or mixed

zmtrainsa

Used to train the anti-spam filter to recognize what is spam or ham

zmtzupdate

Provides mechanism to process time zone changes from the command line

zmupdateauthkeys

Used to fetch the ssh encryption keys created by zmsshkeygen

zmvolume

Manage storage volumes on your Zimbra Mailbox server

zmzimletctl

Deploy and configure Zimlets

Using non-ASCII Characters in CLIs

If you use non-ASCII characters in the CLI, in order for the characters to display correctly, you must change this setting to the desired UTF-8 before running the CLI command. To change this, type

export LC_All=<UTF_locale>

Important
The default locale on the zimbra user system account is LANG=C. This setting is necessary for starting {product-abbrev} services. Changing the default LANG=C setting may cause performance issues with amavisd-new.

zmprov (Provisioning)

The zmprov tool performs all provisioning tasks in Zimbra LDAP, including creating accounts, aliases, domains, COS, distribution lists, and calendar resources. Each operation is invoked through command-line options, each of which has a long name and a short name.

The syntax is zmprov [cmd] [argument].

The syntax for modify can include the prefix “+” or “-” so that you can make changes to the attributes affected and do not need to reenter attributes that are not changing.

  • Use + to add a new instance of the specified attribute name without changing any existing attributes.

  • Use - to remove a particular instance of an attribute.

The following example would add the attribute zimbraZimletUserProperties with the value "blue" to user 1 and would not change the value of any other instances of that attribute.

zmprov ma user1 +zimbraZimletUserProperties "com_company_testing:favoriteColor:blue"

The attributes for the tasks zmprov can be used with are listed when you type zmprov -h. The task area divided into the following sections:

Long Name Syntax, Example, and Notes

--help (-h)

display usage

--file (-f)

use file as input stream

--server (-s)

{host}[:{port}] server hostname and optional port

--ldap (-l)

provision via LDAP instead of SOAP

--log property file (-L)

log 4j property file, valid only with -l

--account {name} (-a)

account name to auth as

--password {pass} (-p)

password for account

--passfile {file} (-P)

read password from file

--zadmin (-z)

use Zimbra admin name/password from localconfig for admin/password

--authtoken (authtoken) (-y)

use auth token string (has to be in JSON format) from command line

--authtoken (authtoken file) (-Y)

use auth token string (has to be in JSON format) from command line

--verbose (-v)

verbose mode (dumps full exception stack trace)

--debug (-d/)

debug mode (dumps SOAP messages)

--master (m)

use LDAP master. This only valid with -l

--replace (-r)

allow replacement of safe-guarded multi-value attribute configured in localconfig key zmprov_saveguarded_attrs

The commands are categorized and briefly described in the following topics:

Account Provisioning Commands

Table 1. zmprov — Account Provisioning Commands
Commnad Syntax Example/Notes

addAccountAlias (aaa)

{name@domain | id | adminName} {alias@domain}

checkPasswordStrength (cps)

{name@doman | id} {password}

zmprov cps [email protected] test123
Note
This command does not check the password age or history.

createAccount (ca)

{name@domain} {password} [attribute1 value1 etc]

zmprov ca [email protected] test123 displayName JSmith

createDataSource (cds)

{name@domain} {ds-type} {ds-name} zimbraDataSourceEnabled {TRUE | FALSE} zimbraDataSourceFolderId {folder-id} [attr1 value1 [attr2 value2…​]]

createIdentity (cid)

{name@domain} {identity-name} [attr1 value1 [attr2 value2…​]]

createSignature (csig)

{name@domain} {signature-name} [attr1 value1 [attr2 value2…​]]

deleteAccount (da)

{name@domain | id | adminName}

deleteDataSource (dds)

{name@domain | id} {ds-name | ds-id}

deleteIdentity (did)

{name@domain | id} {identity-name}

deleteSignature (dsig)

{name@domain | id} {signature-name}

getAccount (ga)

{name@domain | id | adminName}

getAccountMembership (gam)

{name@domain | id}

getAllAccounts (gaa)

[-v] [{domain}]

Must include -l/--ldap

zmprov -l gaa

zmprov -l gaa -v domain.com

getAllAdminAccounts (gaaa)

zmprov gaaa

getDataSources (gds)

{name@domain | id} [arg 1 [arg 2…​]]

getIdentities (gid)

{name@domain | id} [arg 1 [arg 2…​]]

getSignatures (gsig)

{name@domain | id} [arg 1 [arg 2…​]]

modifyAccount (ma)

{name@domain | id | adminName} [attribute1 value1 etc]

zmprov ma [email protected] zimbraAccountStatus maintenance

modifyDataSource (mds)

{name@domain | id} {ds-name | ds-id} [attr 1 value 1 [attr2 value 2…​]]

modifyIdentity (mid)

{name@domain | id} {identity-name} [attr 1 value 1 [attr2 value 2…​]]

modifySignature (msig)

{name@domain | id} {signature-name | signature-id} [attr 1 value 1 [attr 2 value 2…​]]

removeAccountAlias (raa)

{name@domain | id | adminName} {alias@domain}

renameAccount (ra)

{name@domain | id} {newname@domain}

Note
After you rename an account, you should run a full backup for that account.
zmbackup -f -<servername.com> -a <[email protected]>

setAccountCOS (sac)

{name@domain | id | adminName} {cos-name | cos-id}

zmprov sac [email protected] FieldTechnician

setPassword (sp)

{name@domain | id | adminName} {password}

zmprov sp [email protected] test321
Note
Passwords cannot included accented characters in the string. Example of accented characters that cannot be used: ã, é, í, ú, ü, ñ.

Calendar Resource Provisioning Commands

Table 2. zmprov — Calendar Resource Provisioning Commands
Commnad Syntax

createCalendarResource (ccr)

{name@domain} [attr1 value1 [attr2 value2…​]]

deleteCalendarResource (dcr)

{name@domain | id}

getAllCalendarResources (gacr)

[-v] [{domain}]

getCalendarResource (gcr)

{name@domain | id}

modifyCalendarResource (mcr)

{name@domain | id} [attr1 value1 {attr2 value2…​]]

purgeAccountCalendarCache (pacc)

{name@domain} […​]

renameCalendarResource (rcr)

{name@domain | id} {newName@domain}

Free Busy Commands

Table 3. zmprov — Free Busy Commands
Commnad Syntax

getAllFbp (gafbp)

[-v]

getFreebusyQueueInfo (gfbqi)

[{provider-name}]

pushFreebusy (pfb)

{domain | account-id} [account-id…​]

pushFreebusyDomain (pfbd)

{domain}

purgeFreebusyQueue (pfbg)

[{provider-name}]

Domain Provisioning Commands

Table 4. zmprov — Domain Provisioning Commands
Commnad Syntax Example/Notes

countAccount (cta)

{domain | id}

This lists each COS, the COS ID and the number of accounts assigned to each COS

createAliasDomain (cad)

{alias-domain-name} {local-domain-name | id} [attr1 value1 [attr2 value2…​]]

createDomain (cd)

{domain} [attribute1 value1 etc]

zmprov cd mktng.domain.com zimbraAuthMech zimbra

deleteDomain (dd)

{domain | id}

zmprov dd mktng.domain.com

getDomain (gd)

{domain | id}

zmprov gd mktng.domain.com

getDomainInfo (gdi)

name | id | virtualHostname {value} [attr1 [attr2…​]]

getAllDomains (gad)

[-v]

modifyDomain (md)

{domain | id} [attribute1 value1 etc]

zmprov md domain.com zimbraGalMaxResults 500
Note
Do not modify zimbraDomainRenameInfo manually. This is automatically updated when a domain is renamed.

renameDomain (rd)

{domain | id} {newDomain}

Note
renameDomain can only be used with zmprov -l/--ldap

COS Provisioning Commands

Table 5. zmprov — COS Provisioning Commands
Commnad Syntax Example/Notes

copyCos (cpc)

{src-cos-name | id} {dest-cos-name}

createCos (cc)

{name} [attribute1 value1 etc]

zmprov cc Executive zimbraAttachmentsBlocked FALSE zimbraAuthTokenLifetime 60m zimbraMailQuota 100M zimbraMailMessageLifetime 0

deleteCos (dc)

{name | id}

zmprov dc Executive

getCos (gc)

{name | id}

zmprov gc Executive

getAllCos (gac)

[-v]

zmprov gac -v

modifyCos (mc)

{name | id} [attribute1 value1 etc]

zmprov mc Executive zimbraAttachmentsBlocked TRUE

renameCos (rc)

{name | id} {newName}

zmprov rc Executive Business

Server Provisioning Commands

Table 6. zmprov — Server Provisioning Commands
Commnad Syntax Example/Notes

createServer (cs)

{name} [attribute1 value1 etc]

deleteServer (ds)

{name | id}

zmprov ds domain.com

getServer (gs)

{name | id}

zmprov gs domain.com

getAllServers (gas)

[-v]

zmprov gas

modifyServer (ms)

{name | id} [attribute1 value1 etc]

zmprov ms domain.com zimbraVirusDefinitionsUpdateFrequency 2h

getAllMtaAuthURLs (gamau)

Used to publish into saslauthd.conf what servers should be used for saslauthd.conf MTA auth

getAllMemcachedServers (gamcs)

Used to list memcached servers (for nginix use).

Config Provisioning Commands

Table 7. zmprov — Config Provisioning Commands
Commnad Syntax Example/Notes

getAllConfig (gacf)

[-v]

All LDAP settings are displayed

getConfig (gcf)

{name}

modifyConfig (mcf)

attr1 value1

Modifies the LDAP settings.

createXMPPComponent (csc)

{short-name} {domain} {server} {classname} {category} {type} [attr value1 [attr2 value2…​]]

deleteXMPPComponent (dxc)

{xmpp-component-name}

getXMPPComponent (gxc)

{name@domain} [attr1 [attr2 value2]]

modifyXMPPComponent (mxc)

{name@domain} [attr1 [attr2 value2]]

Distribution List Provisioning Commands

Table 8. zmprov — Distribution List Provisioning Commands
Commnad Syntax Example/Notes

createDistribution List (cdl)

{list@domain}

addDistributionListMember (adlm)

{list@domain | id} {member@domain}

removeDistributionListMember (rdlm)

{list@domain | id}

getAlldistributionLists (gadl)

[-v]

getDistributionListmembership (gdlm)

{name@domain | id}

Note
gdlm can not be used for gynamic groups, as dynamic groups cannot be nested.

getDistributionList (gdl)

{list@domain | id}

modifyDistributionList (mdl)

{list@domain | id} attr1 value1 {attr2 value2…​}

deleteDistributionList (ddl)

{list@domain | id}

addDistributionListAlias (adla)

{list@domain | id} {alias@domain}

removeDistributionListAlias (rdla)

{list@domain | id} {alias@domain}

renameDistributionList (rdl)

{list@domain | id} {newName@domain}

Mailbox Commands

Table 9. zmprov — Mailbox Commands
Commnad Syntax Example/Notes

getMailboxInfo--- (gmi)

{account}

getQuotaUsage--- (gqu)

{server}

reIndexMailbox (rim)

{name@domain | id} {start | status | cancel} [{reindex-by} {value1} [value2…​]]

RecalculateMailbox Counts (rmc)

{name@domain | id}

When unread message count and quota usage are out of sync with the data in the mailbox, use this command to immediately recalculate the mailbox quota usage and unread messages count.

Important
Recalculating mailbox quota usage and message count should be schedule to run in off peak hours and used on one mailbox at a time.

reIndexMailbox (rim)

{start | status | cancel} [{types | ids} {type or id} [type or id…​]]

compactIndexMailbox (cim)

{name@domain | id} {start | status}

verifyIndex (vi)

{name@domain | id}

getIndexStats (gis)

{name@domain | id}

selectMailbox (sm)

{account-name} [{zmmailbox commands}]

Miscellaneous Provisioning Commands

Table 10. zmprov — Miscellaneous Provisioning Commands
Commnad Syntax Example/Notes

countObjects (cto)

{type} [-d {domain | id}]

countObjects can only be used with zmprov -l/--ldap

createBulkAccounts (cabulk)

{domain} {namemask} {number of accounts to create}

describe (desc)

[[-v] [-ni] [{entry-type}]] | [-a {attribute-name}]

Prints all attribute names (account, domain, COS, servers, etc.).

flushCache (fc)

[-a] {acl | locale | skin | uistrings | license | all | account | config | glo | balgrant | cos | domain | galgroup | group | mime | server | zimlet | <extension-cache-type>} [name1 | id1 [name2 | i d2…​]]

Flush cached LDAP entries for a type. See Zimbra LDAP Service.

generateDomainPreAuth Key (gdpak)

{domain | id}

Generates a pre-authentication key to enable a trusted third party to authenticate to allow for single-sign on. Used in conjunction with GenerateDomainPreAuth.

generateDomainPreAuth (gdpa)

{domain | id} {name} {name | id | foreignPrincipal} {timestamp | 0} {expires | 0}

Generates preAuth values for comparison.

syncGal (syg)

{domain} [{token}]

getAccountLogger (gal)

[-s /--server hostname] {name@domain | id}

Logs Commands

Table 11. zmprov — Logs Commands
Commnad Syntax Example/Notes

addAccount Logger (aal)

{name@domain | id} {logging-category} {debug | info | warn | error}

Creates custom logging for a single account.

getAccountLoggers (gal)

[-s/--server hostname] {name@domain | id} {logging-category} {debug | info | warn | error}

getAllAccountLoggers (gaal)

[-s/--server hostname]

Shows all individual custom logger account.

removeAccountLogger (ral)

[-s/ --server hostname] {name@domain | id} {logging-category}

When name@domain is specified, removes the custom logger created for the account otherwise removes all accounts all account loggers from the system.

resetAllLoggers (rlog)

[-s/--server hostname]

This command removes all account loggers and reloads /opt/zimbra/conf/log4j.properties.

See the zmprov Log Categories for a list of logging categories.

Search Commands

Table 12. zmprov — Search Commands
Commnad Syntax Example/Notes

searchGAL (sg)

{domain} {name}

zmprov sg joe

autoCompleteGal (acg)

{domain} {name}

`searchAccounts (sa)

[-v] {ldap-query} [limit] [offset] [sortBy {attribute}] [sortAscending 0 | 1] [domain {domain}]

searchCalendarResources (scr)

[-v] domain attr op value {attr op value…​]

Share Provisioning Commands

zmprov—Share Provisioning Commands

Commnad Syntax Example/Notes

getShareInfo (gsi)

{owner-name | owner-id}

Unified Communication Service Commands

Table 13. zmprov — Unified Communication Service Commands
Commnad Syntax Example/Notes

createUCService (cucs)

{name} [attr1 value1 [attr2 value2…​]]

deleteUCService (ducs)

{name | id}

getAllUCServices (gaucs)

[-v]

getUCService (gucs)

[-e] {name | id} [attr1 [attr2…​]]

modifyUCService (mucs)

{name | id} [attr1 value1 [attr2 value2…​]]

renameUCService (rucs)

{name | id} {newName}

IMAP/POP Proxy Commands

Table 14. zmprov — IMAP/POP Proxy Commands
Commnad Example/Notes

--getAllReverseProxyURLs (garpu)

Used to publish into nginx.conf the servers that should be used for reverse proxy lookup.

`--getAllReverseProxy Backends (garpb)

Returns the list of servers that have zimbraReverseProxyLookupTarget=TRUE.

Basically if a mailbox server is available for lookup requests from the proxy.

`--getAllReverseProxyDomains (garpd)

Returns a list of all domains configured with ZimbraSSLCertificate zimbraVirtualHostname and zimbraVirtualIPAddress configured. This allows the proxy to configure a list of domains to serve customized/domain certificates for.

Examples—using zmprov

Example 1. Creating an account with a password that is assigned to the default COS
zmprov ca [email protected] password
Example 2. Creating an account with a password that is assigned to a specified COS

You must know the COS ID number. To find a COS ID:

zmprov gc <COSname>

zmprov ca [email protected] password zimbraCOS cosIDnumberstring
Example 3. Creating an account when the password is not authenticated internally
zmprov ca [email protected] ''

The empty single quote is required and indicates that there is no local password.

Example 4. Using a batch process to create accounts

See Provisioning User Accounts for the procedure.

Example 5. Bulk provisioning

See the Zimbra wiki page Bulk_Provisioning.

Example 6. Adding an alias to an account
Example 7. Creating a distribution list

The ID of the distribution list is returned.

Example 8. Adding a member to a distribution list
Tip
You can add multiple members to a list from the Administration Console.
Example 9. Changing the administrator’s password

Use this command to change any password. Enter the address of the password to be changed.

zmprov sp [email protected] password
Example 10. Creating a domain that authenticates against zimbra OpenLDAP
zmprov cd marketing.domain.com zimbraAuthMech zimbra
Example 11. Setting the default domain
zmprov mcf zimbraDefaultDomain domain1.com
Example 12. Listing all COSs and their attribute values
zmprov gac -v
Example 13. Listing all user accounts in a domain (domain.com)
zmprov gaa domain.com
Example 14. Listing all user accounts and their configurations
zmprov gaa -v domain.com
Example 15. Enabling logger on a single server
zmprov ms server.com +zimbraServiceEnabled logger

Then type zmloggerctl start, to start the logger.

Example 16. Querying a value for a multi-valued attribute
zmprov gs server.com attribute=value

For example, zmprov gs example.com zimbraServiceEnabled=ldap to find out if the ldap service is enabled.

Example 17. Modify the purge interval

To modify the purge interval, set zimbraMailPurgeSleepInterval to the duration of time that the server should "sleep" between every two mailboxes.

zmprov ms server.com zimbraMailPurgeSleepInterval <Xm>

X is the duration of time between mailbox purges; m represents minutes.You could also set <xh> for hours.

Example 18. Customize the notification email

Modify zimbraNewMailNotification to customize the notification email template. A default email is sent from Postmaster notifying users that they have received mail in another mailbox. To change the template, you modify the receiving mailbox account. The variables are

  • ${SENDER_ADDRESS}

  • ${RECIPIENT_ADDRESS}

  • ${RECIPIENT_DOMAIN}

  • ${NOTIFICATION_ADDRESSS}

  • ${SUBJECT}

  • ${NEWLINE}

You can specify which of the above variables appear in the Subject, From, or Body of the email. The following example is changing the appearance of the message in the body of the notification email that is received at [email protected]. You can also change the template in a class ofservice, use zmprov mc. The command is written on one line.

zmprov ma [email protected] zimbraNewMailNotificationBody 'Important message from ${SENDER_ADDRESS}.${NEWLINE}Subject:${SUBJECT}'
Example 19. Enable the SMS notification by COS, account or domain
zmprov mc <default> zimbingaFeatureCalendarReminderDeviceEmailEnabled TRUE
zmprov ma <user1> zimbraFeatureCalendarReminderDeviceEmailEnabled TRUE
zmprov md <domain> zimbraFeatureCalendarReminderDeviceEmailEnabled TRUE
Example 20. Enable the Activity Stream feature for a COS or set of users
zmprov mc <default> zimbraFeaturePriorityInboxEnabled TRUE
zmprov ma <user1> zimbraFeaturePriorityInboxEnabled TRUE

Configure Auto-Grouped Backup from the CLI

Set the backup method in the global configuration, and you can override the configuration on a per server basis if you do not want a server to use the auto-grouped backup method.

To set up auto-grouped backup, you modify LDAP attributes using the zmprov CLI. Type the command as

zmprov mcf <ldap_attribute> <arg>

You can also set the attributes at the server level using zmprov ms.

The following LDAP attributes are modified:

  • zimbraBackupMode —  Set it to be Auto-Grouped. The default is Standard.

  • zimbraBackupAutoGroupedInterval — Set this to the interval in either days or weeks that backup sessions should run for a group. The default is `1d. Backup intervals can be 1 or more days, entered as xd (1d); or 1 or more weeks, entered as xw (1w).

  • zimbraBackupAutoGroupedNumGroups — This the number of groups to spread mailboxes over. The default is 7 groups.

Changing Conversations Thread Default

Messages can be grouped into conversations by a common thread. The default is to thread messages in a conversation by the References header. If there is no References header, the Subject is used to determine the conversation thread. The default options can be changed from the COS or for individual accounts.

zmprov mc [cosname] zimbraMailThreadingAlgorithm [type]

The types include:

  • none — no conversation threading is performed.

  • subject — the message will be threaded based solely on its normalized subject.

  • strict — only the threading message headers (References, In-Reply-To, Message-ID, and Resent-Message-ID) are used to correlate messages. No checking of normalized subjects is performed.

  • references — the same logic as "strict" with the constraints slightly altered so that the non-standard Thread-Index header is considered when threading messages and that a reply message lacking References and In-Reply-To headers will fall back to using subject-based threading.

  • subjrefs — the same logic as "references" with the further caveat thatchanges in the normalized subject will break a thread in two.

Detecting Corrupted Indexes

Run zmprov verifyIndex as a sanity check for the specified mailbox index. Diagnostic information is written to stdout. If problems are detected, a failure status is returned.

verifyIndex locks the index while it’s running, and checks every byte in the index. Therefore, it’s not recommended to run this on a regular basis such as in a cron job. The zmprov verifyIndex command should be used only when you need to make a diagnosis.

zmprov verifyIndex <[email protected]>

If verifyIndex reports that the index is corrupted, you can repair the mailbox index by running reIndexMailbox (rim).

zmprov rim <[email protected]> start
Table 15. zmprov — Log Categories

zimbra.account

Account operations

zimbra.acl

ACL operations

zimbra.backup

Backup and restore

zimbra.cache

Inmemory cache operations

zimbra.calendar

Calendar operations

zimbra.dav

DAV operations

zimbra.dbconn

Database connection tracing

zimbra.extensions

Server extension loading

zimbra.filter

Mail filtering

zimbra.gal

GAL operations

zimbra.imap

IMAP protocol operations

zimbra.index

Index operations

zimbra.io

Filesystem operations

zimbra.ldap

LDAP operations

zimbra.lmtp

LMTP operations (incoming mail)

zimbra.mailbox

General mailbox operations

zimbra.misc

Miscellaneous

zimbra.op

Changes to mailbox state

zimbra.pop

POP protocol operations

zimbra.redolog

Redo log operations

zimbra.security

Security events

zimbra.session

User session tracking

zimbra.smtp

SMTP operations (outgoing mail)

zimbra.soap

SOAP protocol

zimbra.sqltrace

SQL tracing

zimbra.store

Mail store disk operations

zimbra.sync

Sync client operations

zimbra.system

Startup/shutdown and other system messages

zimbra.wiki

Wiki operations

zimbra.zimlet

Zimlet operations

zmaccts

Use zmaccts to run a report that lists all the accounts, their status, when they were created and the last time anyone logged on. The domain summary shows the total number of accounts and their status.

Syntax

zmaccts

zmarchiveconfig

Use zmarchiveconfig for configuring the archiving mailbox. It has the option of using short commands or full names for commands that lead to the same function being carried out.

Syntax

zmarchiveconfig [args] [cmd] [cmd-args...]

Description

Long Name Short Name Description

--help

-h

Displays the usage options for this command

--server

-s

(host)[:(port)] Displays the server hostname and optional port

--account

-a

(name) Returns the value of the account name to be authorized

--ldap

-l

Allows archiving to be provisioned via LDAP

--password

-p

(pass) Returns the password for auth account

--passfile

-P

(file) Allows password to be read from file

--zadmin

-z

Allows use of Zimbra admin/password from local

--debug

-d

Activates debug mode (dumps SOAP messages)

Command in …​

enable <account>

[archive-address <aaddr> [archive-cos <cos>] [archive-create <TRUE/FALSE>] [archive-password <pa [zimbraAccountAttrName <archive-attr-value]+

disable <account>

zmarchivectl

Use zmarchivectl to start, stop, reload, or check the status of the Zimbra account archive.

Syntax

/opt/zimbra/bin/zmarchivectl start|stop|reload|status

zmarchivesearch

Use zmarchivesearch to search across account archives. You can search for archives that match specific criteria and save copies to a directory.

Syntax

zmarchivesearch {-m <[email protected]>} {-q <query_string>} [-o <offset>] [-l <limit>] [-d <output_directory>]

Description

Long Name Short Name Description

--dir

-d

<arg> Directory to write messages to. If none is specified, then only the headers are fetched. Filenames are generated in the form RESULTNUM_ACCOUNT-ID_MAILITEMID

--help

-h

Displays help messages

--limit

-l

<arg> Sets the limit for the number of results returned. The default is 25

--mbox

-m

<arg> Name of archive account to search

--offset

-o

<arg> Specifies where the hit list should begin. The default is 0

--query

-q

<arg> The query string for archive search

--server

-s

<arg> Mail server hostname. Default is localhost

--verbose

-v

Allows printing of status messages while the search is being executed

Example 21. Search archives on a specified server and put a copy of the archive in a specified directory
zmarchivesearch -m [email protected] -q "in:sent" -o 0 -l 30 -d /var/tmp

zmbackup

Use zmbackup to perform full backups and incremental backups for a designated mail host.

This utility has short option names and full names. The short option is preceded by a single dash, while the full option is preceded by a double dash. For example, -f is the same as --fullBackup.

Syntax

One of -f, -i, or -del must be specified.

zmbackup {-f | -i | del} {-a <arg>} [options]

Description

Long Name Short Name Description

--account

-a

<arg> Account email addresses separated by white space or all for all accounts. This option is not specified for auto-grouped backups since the system knows which accounts to backup every night.

--debug

-d

Display diagnostics for debugging purposes.

--delete

-del

<arg> Deletes the backups including and prior to the specified label, date (YYYY/MM/DD[-hh:mm:ss]) or period (nn(d | m | y]).

--excludeBlobs

Exclude blobs from full backup. If unspecified, use server config

--excludeHsmBlobs

Exclude blobs on HSM volumes from full backup; if unspecified, use server config

--excludeSearchIndex

Exclude search index from full backup; if unspecified, use server config

--fullBackup

-f

Starts a full backup. In auto-grouped backup mode, this option also copies the redologs since the last backup (which is the main function of an incremental backup).

--help

-h

Displays the usage options for this command.

--incrementalBackup

-i

Starts an incremental backup. This option is not available in the auto-grouped backup mode.

--includeBlobs

Include blobs in full backup. If this is unspecified, the server config is used.

--includeHsmBlobs

Include blobs on HSM volumes in full backup. If this is unspecified, the server config is used.

--includeSearchIndex

Include search index in full backup. If this is unspecified, the server config is used.

--noZip

Backs up blobs as individual files rather than in zip files.

--server

-s

<arg> Mail server host name. For format, use either the plain host name or the server.domain.com name. The default is the localhost name.

--sync

-sync

Runs full backup synchronously.

--target

-t

<arg> Specifies the target backup location. The default is <zimbra_home>/backup.

--zip

-z

Backs up blobs in compressed zip files. Ignored if --zipStore is specified.

--zipStore

Backup blobs in zip file without compression. (default)

Examples

In these examples, the server (-s) is server1.domain.com. The (-t) is not required if the target is the default directory, (zimbra_home/backup).

Example 22. Perform a full backup of all mailboxes on server1
zmbackup -f -a all -s server1.domain.com
Example 23. Perform incremental backup of all mailboxes on server1 since last full backup
zmbackup -i -a all -s server1.domain.com
Example 24. Perform full backup of only user1’s mailbox on server1.
zmbackup -f -a [email protected] -s server1
Note
Hostname does not need full domain if account is used.
Example 25. Perform incremental backup of user1’s mailbox on server1
zmbackup -i -a [email protected] -s server1

zmblobchk

Use zmblobchk to check the consistency of the Zimbra blob store (/opt/zimbra/store). This command checks and records notes of files without matching database metadata. It also checks to make sure that size information is correct for the files.

Syntax

zmblobchk [options] start

The start command is required to avoid unintentionally running a blob check. The ID values are separated by commas.

Description

Long Name Short Name Description

--export-dir

<path> Target directory for database export files.

--help

-h

Displays help messages

--mailboxes

-m

<mailbox-ids> Specify which mailboxes to check. If not specified, check all mailboxes.

--missing-blob-delete-item

Delete any items that have a missing blob.

--no-export

Delete items without exporting

--skip-size-check

Skip blob size check

--unexpected-blob-list

<path> Write the paths of any unexpected blobs to a file

--verbose

-v

Display verbose output; display stack trace on error

--volumes

<volume-ids> Specify which volumes to check. If not specified, check all volumes

zmcalchk

Use zmcalchk to check the consistency of appointments on the Zimbra calendar and sends an email notification regarding inconsistencies. For example, it checks if all attendees and organizers of an event on the calendar agree on start/stop times and occurrences of a meeting.

See the output of *zmmailbox help appointmen*t for details on time-specs.

Syntax

zmcalchk [-d] [-n <type>] <user> <start-time-spec> <end-time-spec>

Description

Short Name Description

-d

Debugs verbose details

-m

Allows the user to specify the maximum number of attendees to check. The default value is 50.

-n

-n none | user | organizer | attendee | all

Send email notifications to selected users if they are out of sync for an appointment

zmschedulebackup

Use zmschedulebackup to schedule backups and add the command to your cron table.

The default schedule is as follows:

  • Full backup, every Saturday at 1:00 a.m. (0 1 * * 6)

  • Incremental backup, Sunday through Friday at 1:00 a.m. (0 1 * * 0-5)

Each crontab entry is a single line composed of five fields separated by a blank space. Specify the fields as follows:

  • minute — 0 through 59

  • hour — 0 through 23

  • day of month — 1 through 31

  • month — 1 through 12

  • day of week — 0 through 7 (0 or 7 is Sunday, or use names)

Type an asterisk (*) in the fields you are not using.

This command automatically writes the schedule to the crontab.

Syntax

zmschedulebackup {-q|-s|-A|-R|-F|-D}[f|i|d|] ["schedule"]

Description

Name Command Name Description

help

-h

Displays the usage options for this command.

query

-q

Default command. Displays the existing Zimbra backup schedule.

save

-s

Save the schedule. Allows you to save the schedule command to a text file so that you can quickly regenerate the backup schedule when the system is restored.

flush

-F

Removes the current schedule and cancels all scheduled backups.

append

-A

Adds an additional specified backup to the current schedule.

replace

-R

Replaces the current schedule with the specified schedule.

default

-D

Replaces the current schedule with the default schedule.

Options that will be passed to zmbackup

no compression

-n

Backs up blobs as individual files rather than in zip files

compress

-z

Backs up blobs in compressed zip files. Ignored if --zipStore is specified.

--zipStore

Backs up blobs in zip file without compression.

target

-t

Can be used only to designate a full back target location. The default is /opt/zimbra/backup.

Note
You cannot designate a target for incremental backups. If a target (-t) location is added for incremental scheduled backups, it is ignored.

account

-a

Account specific. The default is all accounts.

--mail-report

Send an email report to the admin user.

--server

server - Mail server hostname. Default is localhost.

--sync

Runs full backup synchronously.

--excludeBlobs

Exclude blobs from full backup. If unspecified, server config is used.

--includeBlobs

Include blobs in full backup. If unspecified, the server config is used.

--excludeHsmBlobs

Exclude blobs on HSM volumes from full backup. If unspecified, the server config is used.

--includeHsmBlobs

Include blobs on HSM volumes in full backup. If unspecified, the server config is used.

--excludeSearchIndex

Exclude search index form full backup. If unspecified, the server config is used.

--includeSearchIndex

Include search index in full backup. If unspecified, the server config is used.

Cron schedule — backup-type: <i | f | d arg>

incremental backup

i

<time specifier> Incremental backup.

Incremental backup is not used with the auto-grouped backup mode.

full backup

f

Full backup

delete

d <arg>

Delete backups. <arg> is n(d | m | y)

Backup Scheduling Examples

Example 26. Schedule the default full and incremental backup
zmschedulebackup -D
Example 27. Replace the existing schedule with a new schedule
zmschedulebackup -R f ["schedule"]
Example 28. Add an additional full backup to the existing schedule
zmschedulebackup -A f ["schedule"]
Example 29. Add an additional incremental backup to the existing schedule
zmschedulebackup -A i ["schedule"]
Example 30. Display the existing schedules
zmschedulebackup -q
Example 31. Display the schedules on one line

Display the schedules on one line as a command, so that they can be copied to a text file and saved to be used if the application needs to be restored.

zmschedulebackup -s

zmbackupabort

Use zmbackupabort to stop a backup process. Before you can abort an account you must know its backup label. This label is displayed after you start the backup procedure. If you do not know the label, use zmbackupquery to find the label name.

To stop the restore process:

The zmbackupabort -r interrupts an ongoing restore. The restore process is stopped after the current account is restored. The command displays message showing which accounts were not restored.

Syntax

zmbackupabort [options]

Description

Long Name Short Name Description

--debug

-d

Display diagnostics for debugging purposes

--help

-h

Displays the usage options for this command

--label

-lb

` <arg>` Label of the full backup to be aborted.

Use the zmbackupquery, to find the label name.

--restore

-r

Abort the restore in process

--server

-s

<arg> Mail server host name. For format, use either the plain host name or the server.domain.com name. The default is the localhost name.

--target

-t

<arg> Specifies the target backup location.

The default is <zimbra_home>/backup.

zmbackupquery

Use zmbackupquery to find full backup sets. The command can be used to find a specific full backup set or full backup sets since a specific date, or all backup sets in the backup directory.

To find out the best full backup to use as the basis for point-in-time restore of an account, run a command like this:

zmbackupquery -a <account email> --type full --to <restore-to time>

Syntax

zmbackupquery [options]

Description

Long Name Short Name Description

--account

-a

<arg> Account email addresses separated by white space or all for all accounts

--debug

-d

Display diagnostics for debugging purposes

--help

-h

Displays the usage options for this command

--from

<arg> List backups whose start date/time is at or after the date/time specified here.

--label

-lb

<arg> The label of the full backup session to query. An example of a label is backup200507121559510.

--server

-s

<arg> Mail server host name. For format, use either the plain host name or the server.domain.com name. The default is the localhost name.

--target

-t

<arg> Specifies the backup target location (The default is <zimbra_home>/backup.)

--to

<arg> List backups whose start date/time is at or before the date/time specified here.

--type

<arg> Backup set type to query. "full" or "incremental", both are queried if one is not specified.

--verbose

-v

Returns detailed status information

Specify date/time in one of these formats:

2008/12/16 12:19:23

2008/12/16 12:19:23 257

2008/12/16 12:19:23.257

2008/12/16-12:19:23-257

2008/12/16-12:19:23

20081216.121923.257

20081216.121923

20081216121923257

20081216121923

Specify year, month, date, hour, minute, second, and optionally millisecond.

Month/date/hour/minute/second are 0-padded to 2 digits, millisecond to 3 digits.

Hour must be specified in 24-hour format, and time is in local time zone.

zmrestore

Use zmrestore to perform full restores and incremental restores for a designated mail host. You can either specify specific accounts, or, if no accounts are specified, all accounts are in the backup are restored. In addition, you can restore to a specific point in time.

This utility has short option names and full names. The short option is preceded by a single dash, the full option is proceeded by a double dash. For example, -rf is the same as --restorefullBackupOnly.

Syntax

zmrestore [options]

Description

Long Name Short Name Description

--account

-a

<arg> Specifies the account email addresses. Separate accounts with a blank space or type all to restore all accounts.

--backedupRedologs

-br

Replays the redo logs in backup only, which Only excludes archived and current redo logs of the system.

--continueOnError

-c

Continue to restore other accounts when an error occurs.

--createAccount

-ca

Restores accounts to target accounts whose names are prepended with prefix.

(Can only be used in commands that use the -pre option.)

--debug

-d

Display diagnostics for debugging purposes.

--excludeBlobs

Do not restore blobs (HSM or not).

--excludeHsmBlobs

Do not restore HSM blobs.

--excludeSearchIndex

Do not restore search index.

--help

-h

Displays the usage options for this command.

--label

-lb

<arg> The label of the full backup to restore. Restores to the latest full backup if this is omitted.

--prefix

-pre

<arg> The prefix to pre-pend to the original account names.

--restoreAccount

-ra

Restores the account in directory service.

--restoreToIncrLabel

<arg> Replay redo logs up to and including this incremental backup

--restoreToRedoSeq

<arg> Replay up to and including this redo log sequence.

--restoreToTime

<arg> Replay rodo logs until this time.

--restorefullBackupOnly

-rf

Restores to the full backup only, not any incremental backups since that backup.

--server

-s

<arg> Mail server host name. For format, use either the plain host name or the server.domain.com name. The default is the localhost name.

--skipDeletes

If true, do not execute delete operation during redo log replay.

--skipDeletedAccounts

Do not restore if named accounts were deleted or did not exist at backup time. (This option is always enabled with -a all)

--systemData

-sys

Restores global tables and local config.

--target

-t

` <arg>` Specifies the backup target location. The default is <zimbra_home>/backup.

Examples

Example 32. Perform complete restore of all accounts on server1

Perform complete restore of all accounts on server1, including last full backup and any incremental backups since last full backup.

zmrestore -a all -s server1.domain.com
Example 33. Perform restore only to last full backup

Perform restore only to last full backup, excluding incremental backups since then, for all accounts on server1.

zmrestore -rf -a all -s server1.domain.com
Example 34. Create a new account from a backup of the target account

The name of the new account will be [email protected].

zmrestore -a [email protected] -ca -pre new_

zmrestoreoffline (Offline Restore)

Run zmresotreoffline when the Zimbra server (i.e., the mailbox process) is down. The MySQL database for the server and the OpenLDAP directory server must be running before you start the zmrestoreoffline command.

Syntax

zmrestoreoffline [options]

Description

Long Name Short Name Description

--account

-a

<arg> Specifies the account email addresses. Separate accounts with a blank space or state all for restoring all accounts. Required.

--backedupRedologsOnly

-br

Replays the redo logs in backup only, which excludes archived and current redo logs of the system.

--continueOnError

-c

Continue to restore other accounts when an error occurs.

--createAccount

-ca

Restores accounts to new target accounts whose names are pre-pended with prefix.

--debug

-d

Display diagnostics for debugging purposes.

--help

-h

Displays the usage options for this command.

--ignoreRedoErrors

If true, ignore all errors during redo log replay.

--label

-lb

<arg> The label of the full backup to restore. Type this label to specify a backup file other then the latest.

--prefix

-pre

<prefix> The prefix to pre-pend to the original account names.

--restoreAccount

-ra

Restores the account in directory service.

--restoreToIncrLabel

<arg> Replay redo logs up to and including this incremental backup.

--restoreToRedoSeq

<arg> Replay up to and including this redo log sequence.

--restoreToTime

<arg> Replay rodo logs until this time.

--restoreFullBackupOnly

-rf

Restores to the full backup only, not any incremental backups since that backup.

--server

-s

<arg> Mail server host name. For format, use either the plain host name or the server.domain.com name. The default is the localhost name. If -s is specified, this must be localhost.

--skipDeletedAccounts

-skipDeletedAccounts

Do not restore if named accounts were deleted or did not exist at backup time. (This option is always enabled with -a all)

--systemData

-sys

Restores global tables and local config.

--target

-t

<arg> Specifies the backup target location. The default is <zimbra_home>/backup.

Examples

Before you begin zmrestoreoffline, the LDAP directory server must be running.

Example 35. Perform a complete restore of all accounts on server1

Perform a complete restore of all accounts on server1, including last full backup and any incremental backups since last full backup.

zmrestoreoffline -s server1.domain.com

zmrestoreldap

Use zmrestoreldap to restore accounts from the LDAP backup.

Syntax

zmrestoreldap {-lb <arg>} {-t <arg>} [options]

Description

Short Name Description

-lb

<arg> Session label to restore from. For example, full200612291821113.

-t

<arg> Specifies the backup target location. The default is /opt/zimbra/backup.

-lbs

Lists all session labels in backup.

-l

Lists accounts in file.

-a

<arg> Restores named account(s). List account names separated by white space.

zmcontrol (Start/Stop/Restart Service)

Use zmcontrol to start, to stop, or to restart services. You can also find which version of the {product-name} is installed.

Syntax

zmcontrol [ -v -h ] command [args]

Description

Long Name Short Name Description

-v

Displays {product-abbrev} software version.

-h

Displays the usage options for this command.

-H

Host name (localhost).

Command in…​

maintenance

Toggle maintenance mode.

restart

Restarts all services and manager on this host.

shutdown

Shutdown all services and manager on this host. When the manager is shutdown, you cannot query that status.

start

Startup manager and all services on this host.

startup

Startup manager and all services on this host.

status

Returns services information for the named host.

stop

Stop all services but leaves the manager running.

Use zmmboxsearch is used to search across mailboxes. You can search across mailboxes to find messages and attachments that match specific criteria and save copies of these messages to a directory.

Syntax

zmmboxsearch {-m <arg>} {-q <arg>} [-o <arg>] [-l <arg>] [-d <arg>] [options]

Description

Long Name Short Name Description

--dir

-d

<arg> Directory to write the messages to. If none is specified, then only the headers are fetched. Files names are generated in the form RESULTNUM_ACCOUNT-ID_MAILITEMID.

--help

-h

Displays help information.

--limit

-l

Sets the limit for the number of results returned. The default is 25.

--mbox

-m

<arg> Comma-separated list of mailboxes to search. UIDs or email-address or /SERVER/MAILBOXID or *.

--offset

-o

<arg> Specify where the hit list should start. The default is 0.

--query

-q

<arg> The query string for the search.

--server

-s

<arg> Mail server hostname. default is the localhost

--verbose

-v

Request that the status message print while the search is being executed.

Example

The following example is to do a cross-mailbox search in the inbox folder of two different mailboxes on the specified server and put a copy of the message in to the specified directory.

Example 36. Cross-mailbox search
zmmboxsearch -m [email protected],[email protected] -q "in:inbox" -d /var/tmp

zmmboxmove

Use zmmboxmove to move mailboxes. The destination server manages the overall move process. Using the zmmboxmove command significantly reduces the account lockout time.

The CLI command zmmboxmove is used to move mailboxes from one Zimbra server to another. Mailboxes can be moved between Zimbra servers that share the same LDAP server. All the files are copied to the new server and the LDAP is updated. After the mailbox is moved to a new server a copy still remains on the older server, but the status of the old mailbox is closed. Users cannot log on and mail is not delivered. You should check to see that all the mailbox content was moved successfully before purging the old mailbox.

Syntax

zmmboxmove -a <email> --from <src> --to <dest> [--sync]

Description

Long Name Short Name Description

--account

-a

<arg> Email address of account to move.

--help

-h

Displays the usage options for this command.

--from

-f

<arg> Mail server hostname. Server where the --account mailbox is located.

--to

-t

<arg> Destination server.

--sync

-sync

Run synchronously

zmmboxmovequery

Use zmmboxmovequery to query ongoing mailbox moves on a server, both move-ins and move-outs.

Syntax

zmmboxmovequery -a <account email> [-s <server to query>]

zmpurgeoldmbox

Use zmpurgeoldmbox to purge the mailbox from the older server after a mailbox move.

Syntax

zmpurgeoldmbox -a <account email> [-s <server to purge>]

Description

Long Name Short Name Description

--account

-a

<arg> Email address of account to purge.

--help

-h

Displays the usage options for this command

--server

-s

<arg> Mail server hostname. Old server where the account existed

zmgsautil

Use zmgsautil to create or delete the GAL sync account, and to force syncing of the LDAP data to the GAL sync account.

A GAL sync account is created when the GAL is configured on a domain. This account is created and the polling interval for performing a full sync is managed from the Administration Console.

To see attributes and settings for a GAL sync account, run zmprov gds against the account.

Long Name Description

createAccount

Creates the GAL sync account. This should be done from the Administration Console.

The parameter "server" is required.

-a {account-name} -n {datasource-name} --domain {domain-name} -t zimbra|ldap -s {server} [-f {folder-name}] [-p {polling-interval}]

addDataSource

When configuring a datasource for a server, specify a folder name other than /Contacts. The datasource folder name must be unique.

-a {account-name} -n {datasource-name} --domain {domain-name} -t zimbra|ldap [-f {folder-name}] [-p {polling-interval}]

deleteAccount

Deletes the GAL sync account and the references to the LDAP server. The account can also be deleted from the Administration Console.

deleteAccount [-a {galsynceaccountname}|-i {account-id}]

trickleSync

This syncs new and updated contact data only.

[-a {galsynceaccountname}|-i {account-id}]
[-d {datasource-id}] [-n {datsource-name}]

The datasource ID the LDAP datasource ID. The datasource name is the name of the address book (folder) in the GAL account created to sync LDAP to.

A cron job can be set up to run trickleSync.

fullSync

This syncs all LDAP contact data. You can also set this from the Administration Console.

[-a {galsynceaccountname}|-i {account-id}]
[-d {datasource-id}] [-n {datsource-name}]

forceSync

This should be used to reload the entire GAL if there is change in the filter, attribute mapping or LDAP server parameters.

[-a {galsynceaccountname}|-i {account-id}]
[-d {datasource-id}] [-n {datsource-name}]

zmldappasswd

Use zmldappasswd to change the LDAP password on the local server. In multi node environments, this command must be run on the LDAP master server only.

This CLI command used with options changes other passwords.

For better security and audit trails the following passwords are generated in {product-abbrev}:

  • LDAP Admin password. This is the master LDAP password.

  • LDAP Root password. This is used for internal LDAP operations.

  • LDAP Postfix password. This is the password used by the postfix user toidentify itself to the LDAP serve and must be configured on the MTA server to be the same as the password on the LDAP master server.

  • LDAP Amavis password. This is the password used by the amavis userto identify itself to the LDAP server and must be configured on the MTA server to be the same as the password on the LDAP server.

  • LDAP Replication password. This is the password used by the LDAPreplication user to identify itself to the LDAP master and must be the same as the password on the LDAP master server.

Syntax

opt/zimbra/bin/zmldappasswd [-h] [-r] [-p] [-l] new password

Description

Name Syntax, Example, Notes

-h

Displays the help.

-a

Changes ldap_amavis-password.

-b

Changes ldap_bes_searcher_password.

-l

Changes ldap_replication_password.

-p

Changes ldap_postfix_password.

-n

Changes ldap_nginx_password.

-r

Changes ldap_root_passwd.

-c

Updates the password in the config database on replicas. Must be used with -1 and must be run on a replica after changing the password on the master.

Only one of a, l, p, or r can be specified. If options are not included, the zimbra_ldap_password is changed.

zmlocalconfig

Use zmlocalconfig to set or get the local configuration for a zimbra server. Use zmlocalconfig -i to see a list of supported properties that can be configured by an administrator.

Syntax

zmlocalconfig [options]

To see the local config type zmlocalconfig.

Description

Long Name Short Name Description

--config

-c

<arg> File in which the configuration is stored.

--default

-d

Show default values for keys listed in [args].

--edit

-e

Edit the configuration file, change keys and values specified. The [args] is in the key=value form.

--force

-f

Edit the keys whose change is known to be potentially dangerous.

--help

-h

Shows the help for the usage options for this tool.

--info

-i

Shows the list of supported properties.

--format

-m

<arg> Shows the values in one of these formats: plain (default), xml, shell, nokey.

--changed

-n

Shows the values for only those keys listed in the [args] that have been changed from their defaults.

--path

-p

Shows which configuration file will be used.

--quiet

-q

Suppress logging.

--random

-r

This option is used with the edit option. Specified key is set to a random password string.

--show

-s

Forces the display of the password strings.

--unset

-u

Remove a configuration key. If this is a key with compiled-in defaults, set its value to the empty string.

--expand

-x

Expand values.

--zimbraAmavisMaxServers

Allows control of the concurrency of Amavisd (default 10).

--zimbraClamAVMaxThreads

Allows control of the concurrency of ClamAV (default 10).

zmmailbox

Use zmmailbox for mailbox management. The command can help administrators provision new mailboxes along with accounts, debug issues with a mailbox, and help with migrations.

You can invoke the zmmailbox command from within the zmprov command. You enter selectMailbox within zmprov to access the zmmailbox command connected to that specified mailbox. You can then enter zmmailbox commands until you type exit. Exit returns you to zmprov. This is useful when you want to create accounts and also pre-create some folders, tags, or saved searches at the same time.

Syntax

zmmailbox [args] [cmd] [cmd-args ...]

Description

Short Name Long Name Syntax, Example, and Notes

-h

--help

Display usage.

-f

--file

Use file as input stream.

-u

--url

http[s]://{host}[:{port}] server hostname and optional port. Must use admin port with -z/-a.

-a

--account

Account name to auth as {name}.

-z

--zadmin

Use zimbra admin name/password from localconfig for admin/password.

-y

--authtoken (authtoken)

Use authtoken string (has to be in JSON format) from command line.

-Y

--authtoken (authtoken file)

Use authtoken string (has to be in JSON format) from command line.

-m

--mailbox {name}

Mailbox to open. Can be used as both authenticated and targeted unless other options are specified.

--auth {name}

Account name to authorize as. Defaults to --mailbox unless --admin-priv is used.

-A

--admin-priv

Execute requests with admin privilege.

-p

--password {pass}

Password for admin account and or mailbox.

-P

--passfile {file}

Read password from file.

-t

--timeout

Timeout (in seconds).

-v

--verbose

Verbose mode (dumps full exception stack trace)

-d

--debug

Debug mode (dumps SOAP messages)

Specific CLI tools are available for the different components of a mailbox. Usage is described in the CLI help for the following.

zmmailbox help admin

Help on admin-related commands.

zmmailbox help commands

Help on all zmmailbox commands.

zmmailbox help appointment

Help on appointment-related commands.

zmmailbox help contact

Help on contact-related commands (address book).

zmmailbox help conversation

Help on conversation-related commands.

zmmailbox help filter

Help on filter-related commands.

zmmailbox help folder

Help on folder-related commands.

zmmailbox help item

Help on item-related commands.

zmmailbox help message

Help on message-related commands.

zmmailbox help misc

Help on miscellaneous commands.

zmmailbox help right

Help on right commands.

zmmailbox help search

Help on search-related commands.

zmmailbox help tag

Help on tag-related commands.

Examples

Example 37. Create tags and folders

When you create an account, you may want to pre-create some tags and folders. You can invoke zmmailbox inside of zmprov by using selectMailbox(sm).

domain.example.com$ /opt/zimbra/bin/zmprov
prov> ca [email protected] test123
9a993516-aa49-4fa5-bc0d-f740a474f7a8
prov> sm [email protected]
mailbox: [email protected], size: 0 B, messages: 0, unread: 0
mbox [email protected]> createFolder /Archive
257
mbox [email protected]> createTag TODO
64
mbox [email protected]> createSearchFolder /unread "is:unread"
258
mbox [email protected]> exit
prov>
Example 38. Find the mailbox size for an account
zmmailbox -z-m [email protected] gms
Example 39. Send requests to a mailbox using the admin auth token

This is required when using the command emptyDumpster. Use --admin-priv to skip delegated auth as the target mailbox.

zmmailbox -z --admin-priv -m [email protected] emptyDumpster
Example 40. Use --admin-priv with select Mailbox command
zmmailbox -z mbox> sm --admin-priv [email protected]
Example 41. Authenticate as a delegated admin user

This lets one user login to another user’s mailbox. The authenticating user must be a delegated admin account and must have adminLoginAs right on the target mailbox. This auth option uses a non-admin auth token. Use the --auth option to specify the authenticating account. To login as user bar and open mailbox foo:

$ zmmailbox --auth [email protected] -p password -m [email protected]
Example 42. Find the mailbox size for an account
zmmailbox -z-m [email protected] gms
Example 43. Backup mailbox content in a zip file

When you use zmmailbox to backup individual mailboxes, you can save the file as either a zip file or a tgz file. The default settings for the information that is saved in these formats is different.

File TGZ ZIP

Briefcase

X

X

Calendar

X

Conversations

X

Contacts

X

X

Deleted Messages

X

X

Emailed Contacts

X

Inbox

X

X

Sent

X

X

Sent Messages

X

X

Tasks

X

To include all the mailbox content in a zip file, you must enable the meta data. Type as:

zmmailbox -z-m [email protected] gru "?fmt=zip&meta=1" > /<filename.zip>

zmtlsctl

Use zmtlsctl to set the Web server zimbraMailMode to the communication protocol options: HTTP, HTTPS, Mixed, Both and Redirect. The default setting is HTTPS.

Important
The zmtlsctl setting also impacts the ZCO’s Use Secure Connection setting. ZCO users in a self-signed environment will encounter warnings about connection security unless the root CA certificate is added to Window Certificate Store. See the Zimbra Wiki article ZCO Connection Security for more information.
  • HTTP. HTTP only, the user would browse to http://zimbra.domain.com.

  • HTTPS. HTTPS only (default), the user would browse to https:/zimbra.domain.com. http:// is denied.

  • Mixed If the user goes to http:// it will switch to https:// for the login only,then will revert to http:// for normal session traffic. If the user browses to https://, then the user will stay https://

  • Both A user can go to http:// or https:// and will keep that mode for the entire session.

  • Redirect Like mixed if the user goes to http:// it will switch to https:// but they will stay https:// for their entire session.

All modes use SSL encryption for back-end administrative traffic.

Important
Only zimbraMailMode HTTPS can ensure that no listener will be available on HTTP/port 80, that no client application will try to auth over HTTP, and that all data exchanged with the client application will be encrypted.

Mailboxd has to be stopped and restarted for the change to take effect.

Note
If you switch to HTTPS, you use the self-signed certificate generated during {product-abbrev} installation in /opt/zimbra/ssl/zimbra/server/server.crt. For ZCO users, secure ZCO profiles will display Certificate Trust dialogs unless the root CA certificate is deployed to the server. For more information about ZCO certificates, see the Zimbra Wiki page ZCO Connection Security.

Syntax

zmtlsctl [mode]

mode = http, https, mixed, both, redirect

Steps to run

  1. Type zmtlsctl [mode] and press ENTER.

  2. Type zmmailboxdctl stop and press ENTER.

  3. When mailboxd is stopped, type zmmailboxdctl start and press ENTER.

Limitations When Using Redirect

  • Many client applications send an auth request in the initial HTTP request to the Server ("blind auth"). The implications of this are that this auth request is sent in the clear/unencrypted prior to any possible opportunity to redirect the client application to HTTPS.

  • Redirect mode allows for the possibility of a man-in-the-middle attack, international/unintentional redirection to a non-valid server, or the possibility that a user will mis type the server name and not have certificate-based validity of the server.

  • In many client applications, it is impossible for users to tell if they have been redirected (for example, ActiveSync), and therefore the users continue to use HTTP even if the auth request is being sent unencrypted.

zmhsm

Use zmhsm to start, stop (abort), and see the status of a HSM session. The threshold for when messages are moved to a storage volume is configured from the Administration Console, Servers > Volumes page.

Syntax

zmhsm {abort|start|status} {server} <name>

Description

Long Name Short Name Description

--abort

-a

Aborts the current HSM session. If all the messages in a mailbox being processed were not moved before you clicked Abort, no messages from that mailbox are moved from the primary volume. Messages for mailboxes that have completed the move to the secondary volume are not moved back to the primary volume.

--help

-h

Shows the help for the usage options for this tool.

--server

-s

<arg> The mail server host name. The default is the localhost [args].

--start

-t

Manually starts the HSM process.

--status

-u

The status of the last HSM session is displayed.

zmlicense

Use zmlicense to view and install your Zimbra license. The license can be viewed and installed from the Administration Console, Global Settings > License page.

Syntax

zmlicense [options]

Description

Long Name Short Name Description

--check

-c

Check to see if a valid license is installed.

--help

-h

Shows the help for the usage options for this tool.

--install

--i

<arg> Installs the specified license file.

[arg] — This is the Zimbra license file that you received.

--ldap

-l

Install on LDAP only.

--print

-p

Displays the license information.

zmmetadump

The zmmetadump command is a support tool that dumps the contents of an item’s metadata in a human readable form.

Syntax

zmmetadump -m <mailbox id/email> -i <item id>

or

zmmetadump -f <file containing encoded metadata>

zmmypasswd

Use zmmypasswd to change zimbra_mysql_password. If the --root option is specified, the mysql_root_passwd is changed. In both cases, MySQL is updated with the new passwords. Refer to the MySQL documentation to see how you can start the MySQL server temporarily to skip grant tables, to override the root password.

Note
This requires a restart for the change to take effect.

Syntax

zmmypasswd [--root] <new_password>

zmplayredo

Users who maintain a backup and restore mechanism using the snapshot facility of the storage layer use zmplayredo to restore backed up data. This command brings all backed up data to the current state so that there is no loss of information during the restore process.

Syntax

zmplayredo <option>

Description

Long Name Short Name Description

--fromSeq

<arg> Replays snapshots from the specified redolog sequence.

--fromTime

<arg> Replays snapshots from the specified time.

--help

-h

Shows the help information for this command.

--logfiles

<arg> Replays the specified logfiles in order.

--mailboxId

<arg> Replays snapshots for the specified mailbox.

`--queueCapacity

<arg> Used for specifying the queue capacity per player thread. The default value is 100.

--stopOnError

Stops the replay on occurrence of any error.

--threads

<arg> Specifies the number of parallel redo threads. The default value is 50.

--toSeq

<arg> Replays snapshots to the specified redolog sequence.

--toTime

<arg> Replays snapshots to the specified time.

Time is specified in the local time zone. The year, month, date, hour, minute, second, and optionally millisecond should be specified. Month/date/hour/ minute/second are 0 -padded to 2 digits, millisecond to 3 digits. The hour must be specified in a 24- hour format.

zmproxyconfgen

Use zmproxyconfgen to generate the Nginx proxy configuration files. It reads LDAP settings to replace template variables and generates the final Nginx configuration.

Syntax

ProxyConfGen [options]

Description

Long Name Short Name Description

--config

-c

<arg> Overrides a config variable. The <arg> format should be name=value. To see a list of names, use -d or -D.

--defaults

-d

Prints the default variable map.

--definitions

-D

Prints the Definitions variable map after loading LDAP configuration and processing overrides.

--help

-h

Displays help information.

--include-dir

-i

<arg> Displays the directory path (relative to $workdir/conf), where included configuration files are written.

--dry-run

-n

Specifies not to write configuration and only display the files that would be written.

--prefix

-p

<arg> Displays the config file prefix. The default value is nginx.conf

--template-prefix

-P

<arg> Displays the template file prefix. The default value is $prefix.

--server

-s

<arg> Specifies a valid server object. Configuration is generated based on the specified server’s attributes. The default is to generate configuration based on global configuration values.

--templatedir

-t

<arg> Specifies the proxy template directory. The default value is $workdir/conf/nginx/templates.

--verbose

-v

Displays verbose data.

--workdir

-w

<arg> Specifies the proxy working directory. The default value is /opt/zimbra.

zmproxypurge

Use zmproxypurge to purge POP/IMAP proxy routing information from one or more memcached servers. Available memcached servers are discovered by the zmprov gamcs function. Others can be specified if necessary using the server port.

Syntax

ProxyPurgeUtil [-v] [-i] -a account [-L accountlist] [cache1] [cache2...]]

Description

Long Name Short Name Description

--help

-h

Shows the help for the usage options for this tool.

--verbose

-v

Displays verbose data.

--info

-i

Displays account routing information.

--account

-a

Displays account name.

--list

-L

Displays file containing list of accounts, one per line.

--output

-o

Specifies the format to be used for printing routing information with information. The fields that display by default are

  • cache server

  • account name

  • route information

cacheN

(optional command) Specifies additional memcache server in the form of server:port.

zmredodump

Use zmredodump for debugging purposes and to dump the contents of a redolog file. When users are debugging a problem, Zimbra support might ask them to run zmredodump with specific options.

Multiple log files/directories can be specified with all redolog files under each directory being sorted in ascending order and processed.

Syntax

zmredodump [options] <redolog file/directory> [...]

Description

Long Name Short Name Description

--help

-h

Displays help messages.

-m

Specifies the mailbox ids separated by a comma or a space. The entire list of mailbox ids must be quoted if using space as a separator.

To dump contents of all the redolog files, omit this option.

--no-offset

Specifies if file offsets and size for each redolog dump should not be shown.

--quiet

-q

Activates the quiet mode. Used to only print the log filename and errors, if any. Useful for verifying integrity of redologs with minimal output.

--show-blob

Shows blob content. The specified item’s blob is printed with <START OF BLOB> and <END OF BLOB> marking the start and end of the blob.

zmskindeploy

Use zmskindeploy to simplify the process of deploying skins in ZWC. This tool processes the skin deployment, enables the skin for all users of the ZWC deployment, and restarts the web server so that it recognizes the new skin.

Syntax

zmskindeploy <path/to/skin/dir/or/zipfile>

zmsoap

Use zmsoap to print mail, account, and admin information in the SOAP format.

Syntax

zmsoap [options] <path1 [<path2>...]

Description

Long Name Short Name Description

--help

-h

Prints usage information.

--mailbox

-m

<name> Displays mailbox account name. Mail and account requests are sent to this account. This attribute is also used for authentication if -a and -z are not specified.

--target

<name> Displays the target account name to which the requests are sent. Used only for non-admin sessions.

--admin name

-a

<name> Displays the admin account name to authenticate as.

--zadmin

-z

Displays the Zimbra admin name and password to authenticate as.

--password

-p

<pass> Displays account password.

--passfile

-P

<path> Reads password from a file.

--element

-e

<path> Displays the root element path. If specified, all path arguments that do not start with a slash (/) are relative to this element.

--type

-t

<type> Displays the SOAP request type. Can either be mail, account, or admin.

--url

-u

<http[s]://…​> Displays the server hostname and optional port value.

--verbose

-v

Prints the SOAP request and other status information.

path

<[path…​]> Displays the element or attribute path and value. Roughly follows the XPath syntax as: [/]element1[/element2][/@attr][=value].

zmstat-chart

Use zmstat-chart to collect statistical information for the CPU, IO, mailboxd, MTAqueue, MySQL, and other components and to run a script on the csv files to display the usage details in various charts. These csv files are saved to /opt/zimbra/zmstat/.

You must enable zmstat to collect the performance charts data:

  1. Enter zmprov ms {hostname} zimbraServerEnable : stats.

  2. Restart the server, Enter:

    zmcontrol stop
    zmcontrol start

Syntax

zmstat-chart -s <arg> -d <arg> [options]

Description

Long Name Short Name Description

--aggregate-end-at

<arg> If this is specified, the aggregate computation ends at this timestamp. Usage is MM/dd/yyyy HH:mm:ss.

--aggregate-start-at

<arg> If this is specified, the aggregate computation starts at this timestamp. Usage is MM/dd/yyyy HH:mm:ss.

--end-at

<arg> If this is specified, all samples after the specified timestamp are ignored. Usage is MM/dd/yyyy HH:mm:ss.

--start-at

<arg> If this is specified, all samples before this timestamp are ignored.

--title

<arg> This gives the chart a title that displays. Defaults to the last directory name of srcdir.

--no-summary

Summary data generation is not included.

--conf

-c

<arg> Chart the configuration xml files.

--destdir

-d

<arg> The directory where the generated chart files are saved.

--srcdir

One or more directories where the csv files are located. The csv files are moved to directories listed by date under zmstat/.

zmstat-chart-config

Use zmstat-chart-config to generate an xml file /opt/zimbra/conf/zmstat-chart.xml from a template, taking into account the server setup including theLDAP node and the processes run, among other specifications.

zmstatctl

Use zmstatctl to run a control script for checking zmstat data collectors. This instruction starts or stops monitoring processes, and checks status or rotates logs.

Syntax

zmstatctl start|stop|status|rotate

zmthrdump

Use zmthrdump to invoke a thread dump in the {product-abbrev} server process and print the output file. This command also gives the option of saving the thread dump to a file and inserts a timestamp on the logfile.

Syntax

zmthrdump [-h] [-i] [-t <timeout seconds>] [-p <pid file>] [-f <file>] [-o <out-file>]

Description

Short Name Description

-h

Displays help messages.

-i

Appends the timestamp to the LOGFILE before invoking SIGQUIT.

-p

Returns the PID to send SIGQUIT. The default value can be found in zmmailboxd_java.pid

-f

Specifies the LOGFILE to save the thread dump output in. The default value is zmmailbox.out.

-o

Specifies the output file of the thread dump. The default value is stdout.

-t

Specifies the timeout value (in seconds) to exit if the process becomes unresponsive. The default value is 30 seconds.

zmtrainsa

Use zmtrainsa to train the anti-spam filter. This command is run automatically every night to train the SpamAssasin filter from messages users mark as "junk" / "not junk" from their mailbox. See SpamAssassin’s sa-update tool, which is included with SpamAssassin. This tool updates SpamAssassin rules from the SA organization. The tool is installed into /opt/zimbra/common/bin.

The zmtrainsa command can be run manually to forward any folder from any mailbox to the spam training mailboxes. If you do not enter a folder name when you manually run zmtrainsa for an account, for spam, the default folder is Junk. For ham, the default folder is Inbox.

Syntax

zmtrainsa <user> spam|ham [folder]

zmtzupdate

Use zmtzupdate to update time zone changes in existing appointments for specific users or all users. A .ics rule file should first be created to run with this command. A rule file lists a series of rules to match a time zone and the replacement time zone definitions. More information about this command can be found at: https://wiki.zimbra.com/wiki/Changing_{product-abbrev}_Time_Zones.

Syntax

zmtzupdate --rulefile <rule file> -a <"all" or list of specific email addresses> [--sync] [--after <date/time stamp>]

Description

Long Name* Short Name Description

--account

-a

<arg> account email addresses separated by a white space. Use "all" for all accounts to be updated.

--after

<arg> Appointments occurring after the specified date/time in this field are updated. The default cut off time is January 1st, 2008.

--help

-h

Displays help information.

--rulefile

Specifies the .ics XML file that should be used to update time zone definitions.

--server

-s

<arg> Specifies the mail server hostname. The default value is localhost.

--sync

If specified, this option causes the zmtzupdate command to block till the server processes all requested accounts. The default value is no.

zmvolume

Use zmvolume to manage storage volumes from the CLI. Note that volumes can be managed from the Administration Console, Server > Volumes page.

Syntax

zmvolume {-a|-d|-l|-e|-dc|-sc} [options]

Description

Long Name Short Name Description

--add

-a

Adds a volume.

--compress

-c

<arg> Compress BLOBs; "true" or "false".

--compressionThreshold

-ct

Compression threshold; default 4KB.

--delete

-d

Deletes a volume.

--displayCurrent

-dc

Displays the current volume.

--edit

-e

Edits a volume.

--help

-h

Shows the help for the usage options for this tool.

--id

-id

<arg> Volume ID.

--list

-l

Lists volumes.

--name

-n

<arg> Volume name.

--path

-p

<arg> Root path.

--server

-s

<arg> Mail server hostname. Default is localhost.

--setCurrent

-sc

Sets the current volume.

--type

-t

<arg> Volume type (primaryMessage, secondaryMessage, or index)

--turnOffSecondary

-ts

Turns off the current secondary message volume.

zmzimletctl

Use zmzimletctl to manage Zimlets and to list all zimlets on the server. Additional information is provided in Zimlets. Most Zimlet deployment can be completed from the zimbra Administration Console.

Syntax

zmzimletctl {-l} {command} <zimlet.zip|config.xml|zimlet>

Description

Long Name Short Name Description

deploy

<zimlet.zip> Creates the Zimlet entry in the LDAP server, installs the zimlet files on the Server, grants, access to the members of the default COS, and turns on the Zimlet.

undeploy

<zimlet> Uninstall a zimlet from the zimbra server.

install

<zimlet.zip> Installs the Zimlet files on the host.

ldapDeploy

<zimlet> Adds the Zimlet entry to the LDAP.

enable

<zimlet> Enables the Zimlet.

disable

<zimlet> Disables the Zimlet.

acl

<zimlet> <cos1> {grant | deny} | [<cos2> {grant|deny}…​]

Sets the access control, grant|deny, to a COS.

listAcls

<zimlet> Lists the ACLs for the Zimlets.

listZimlets

View details about all Zimlets on the server.

getConfigTemplate

<zimlet.zip> Extracts the configuration template from the Zimlet.zip file.

configure

<config.xml> Installs the configuration.

listPriority

Shows the current Zimlet priorities (0 is high, 9 is low)

setPriority

<zimlet> Sets the Zimlet priority.

zmproxyconfig

Use zmproxyconfig to manage Zimbra proxy and should only be used when you have to make changes to Zimbra proxy after it has been installed. See Zimbra Proxy Server.

Note
Previous to {product-abbrev} 6.0, this command was called zmproxyinit.

Syntax

/opt/zimbra/libexec/zmproxyconfig [-h] [-o] [-m] [-w] [-d [-r] [-s] [-a w1:w2:w3:w4] [-i p1:p2:p3:p4] [-p p1:p2:p3:p4] [-x mailmode]] [-e [-a w1:w2:w3:w4] [-i p1:p2:p3:p4] [-p p1:p2:p3:p4] [-x mailmode]] [-f] -H hostname

Description

Short Name Description

-h

Displays help messages.

-H

Hostname of the server on which enable/disable proxy functionality.

-a

Colon separated list of Web ports to use. Format: HTTP-STORE:HTTP-PROXY:HTTPS-STORE:HTTPS-PROXY (Ex: 8080:80:8443:443)

-d

Disable proxy.

-e

Enable proxy.

-f

Full reset on memcached port and search queries and POP/IMAP throttling.

-i

Colon separated list of IMAP ports to use. Format: IMAP-STORE:IMAP-PROXY:IMAPS-STORE:IMAPS-PROXY (Ex: 7143:143:7993:993)

-m

Toggle mail proxy portions.

-o

Override enabled checks.

-p

Colon separated list of POP ports to use. Format: POP-STORE:POP-PROXY:POPS-STORE:POPS-PROXY (Ex: 7110:110:7995:995)

-r

Run against a remote host. Note that this requires the server to be properly configured in the LDAP master.

-s

Set Cleartext to FALSE (secure mode) on disable.

-t

Disable reverse proxy lookup target for the store server. Only valid with -d. Make sure that you intend for all proxy functions for the server to be disabled.

-w

Toggle Web proxy portions.

-x

zimbraMailMode to use on disable (Default is HTTP)

hostname is the value of the zimbra_server_hostname LC key for the server being modified.

Required options are -f by itself, or -f with -d or -e.

Note that

  • -d or -e require one or both of -m and -w.

  • -i or -p require -m.

  • -a requires -w.

  • -x requires -w and -d for store.

  • -x requires -w for proxy.

The following are the defaults for -a, -i, -p, and -x if they are not supplied as options.

-a

default on enable: 8080:80:8443:443

default on disable: 80:0:443:0

-i

default on enable: 7143:143:7993:993

default on disable: 143:7143:993:7993

-p

default on enable: 7110:110:7995:995

default on disable: 110:7110:995:7995

-x

default on store disable: http

default on proxy enable/disable: http

zmsyncreverseproxy

Use zmsyncreverseproxy to reserve proxies mobile sync HTTP traffic between the source and forwarding server and port. Decodes the sync requests/responses and logs them when verbose mode is turned on.

Syntax

zmsyncreverseproxy [-v] [-d] [-L log4j.properties] -p <port number> -fs <fwd server> -fp <fwd port> [-sv syncversions]

Description

Long Name Short Description

--help

-h

Displays help.

--verbose

-v

Verbose mode, dumps full exception stack trace.

--debug

-d

Debug mode, dumps decoded sync messages.

--port

-p

The port this service listens on.

--forwardserver

-fs

The server host to forward requests to.

--forwardport

-fp

The server port to forward requests to.

--syncversions

-sv

Active sync versions supported.

--logpropertyfile

-L

log4j property file, valid only with -l.