Zimbra CLI Commands: Domain

In this article we are going to see how to manage your Domain(s) with CLI Commands using zmprov. As usual, for every command, we will show you the extendend and short form along with the syntax to be used.

Remember that all commands are intended to be executed logging in as Zimbra user, with the command: su - zimbra

Create Domain:

To create a Domain you need to use createDomain (cd) with the following syntax:

zmprov createDomain {yourdomain} [attr1 value1 ...]

Modify Domain:

To modify a Domain you need to use modifyDomain (md) with the following syntax:

zmprov modifyDomain {yourdomain|id} [attr1 value1 ...]

Rename Domain:

To rename a Domain you need to use renameDomain (rd) with the following syntax:

zmprov renameDomain -l {yourdomain|id} {newdomain}

-l options indicates that provision is done via LDAP 

Delete Domain:

To delete a Domain you need to use deleteDomain (dd) with the following syntax:

zmprov deleteDomain {yourdomain|id}

Get Domain:

To get a Domain you need to use getDomain (gd) with the following syntax:

zmprov getDomain {yourdomain|id}

Get Domain Info:

To get Domain Information you need to use getDomainInfo (gdi) with the following syntax:

zmprov getDomainInfo {yourdomain|id|virtualHostname} {value} [attr1 value1 ...]

Get All Domains:

To get all Domains you need to use getAllDomains (gad) with the following syntax:

zmprov getAllDomains [-v]

The -v attribute, stands for verbose. Verbose mode dumps full exception stack trace

Create Alias Domain:

To create an Alias Domain you need to use createAliasDomain (cad) with the following syntax:

zmprov createAliasDomain {AliasDomainName} {yourdomain|id} [attr1 value1 ...]

Count Account:

The countAccount (cta) command is used to list every COS, the COS ID and the number of accounts assigned to each COS. The syntax is the following:

zmprov countAccount {yourdomain|id}

Technical writer at Zextras. Linux and technology enthusiast. He describes himself as an atypical and polyhedric IT expert, thanks to a creative and open minded attitude, and to the experience gained over time as an IT technician, system engineer and developer.

Post your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Zimbra CLI Commands: Server
Zextras Team: 3.1.9 new features