Difference between revisions of "Zmprov Examples"

(Zmprov Examples)
 
(20 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== zmprov Usage Examples ==
+
{{BC|Community Sandbox}}
 +
__FORCETOC__
 +
<div class="col-md-12 ibox-content">
 +
=Zmprov Examples=
 +
{{KB|{{Unsupported}}|{{ZCS 8.0}}|{{ZCS 7.0}}|}}
 +
{{WIP}}== Accounts ==
  
 
Create one account with a password that is assigned to the default COS:
 
Create one account with a password that is assigned to the default COS:
 
  zmprov ca name@domain.com password
 
  zmprov ca name@domain.com password
  
Create one account with a password that is assigned to a specified COS. You must know the COS ID number. To find a COS ID, type <tt>gc <COSname>.</tt>:
+
Create one account, password with first name/last name:
 +
zmprov ca name@example.com password cn "Firstname Lastname" displayName "Firstname Lastname" givenName "Firstname" zimbraPrefFromDisplay "Firstname Lastname"
 +
 
 +
Create one account with a password that is assigned to a specified COS. You must know the COS ID number. To find a COS ID, type <tt>zmprov gc <COSname></tt>.:
 
  zmprov ca name@domain.com <password> zimbraCOSid <cosIDnumberstring>
 
  zmprov ca name@domain.com <password> zimbraCOSid <cosIDnumberstring>
 +
 +
Create an account that forwards to another account:
 +
zmprov ca user@domain.com <password> zimbraMailForwardingAddress user@otherdomain.com
  
 
Create one account when the password is not authenticated internally:
 
Create one account when the password is not authenticated internally:
  zmprov ca name@domain.com ‘’
+
  zmprov ca name@domain.com ""
 +
 
 +
Change the administrator’s password. Use this command to change any password. Enter the address of the password to be changed:
 +
zmprov sp admin@domain.com password
 +
 
 +
To list all COSs and their attribute values:
 +
zmprov gac -v
 +
 
 +
To list all COSs and their attribute values:
 +
zmprov gaa domain.com
 +
 
 +
To list all user accounts [domain.com is optional]:
 +
zmprov -l gaa [domain.com]
  
 
Note: The empty single quote is required and indicates that there is no local password
 
Note: The empty single quote is required and indicates that there is no local password
Line 17: Line 40:
 
see the [[Managing_ZCS_Configuration#Batch_Provisioning_from_the_CLI_Utility|Batch Provisioning from the CLI Utility]] section of the Managing the Zimbra Collaboration Suite chapter for the procedure.
 
see the [[Managing_ZCS_Configuration#Batch_Provisioning_from_the_CLI_Utility|Batch Provisioning from the CLI Utility]] section of the Managing the Zimbra Collaboration Suite chapter for the procedure.
  
* <div class="NumberedCont">Add an alias to an account.</div>
+
== Aliases ==
  
<div class="CLI_indented_command">
+
Add an alias to an account:
  
 
  zmprov aaa accountname@domain.com aliasname@domain.com
 
  zmprov aaa accountname@domain.com aliasname@domain.com
  
</div>
+
Canonical address</div>
 
 
* <div class="NumberedCont">Canonical address</div>
 
 
>  zimbraMailCanonicalAddress
 
>  zimbraMailCanonicalAddress
  
* <div class="CLI_indented_command">Create distribution list. The ID of the distribution list is returned.</div>
+
== Distribution Lists ==
 
 
<div class="CLI_indented_command">
 
  
 +
Create distribution list. The ID of the distribution list is returned:
 
  zmprov cdl listname@domain.com
 
  zmprov cdl listname@domain.com
  
</div>
+
Add a member to a distribution list. '''Tip: '''You can add multiple members to a list from the administration console:
 
 
* <div class="CLI_indented_command">Add a member to a distribution list. '''Tip: '''You can add multiple members to a list from the administration console. </div>
 
 
 
<div class="CLI_indented_command">
 
 
 
 
  zmprov adlm listname@domain.com member@domain.com
 
  zmprov adlm listname@domain.com member@domain.com
  
</div>
+
== Misc ==
 
 
* <div class="CLI_indented_command">Change the administrator’s password. Use this command to change any password. Enter the address of the password to be changed.</div>
 
 
 
<div class="CLI_indented_command">
 
 
 
zmprov sp admin@domain.com password
 
 
 
</div>
 
 
 
* <div class="CLI_indented_command">Create a domain that authenticates against Zimbra OpenLDAP.</div>
 
 
 
<div class="CLI_indented_command">
 
  
 +
Create a domain that authenticates against Zimbra OpenLDAP:
 
  zmprov cd marketing.domain.com zimbraAuthMech zimbra
 
  zmprov cd marketing.domain.com zimbraAuthMech zimbra
  
</div>
+
Set the default domain:
 
 
* <div class="CLI_indented_command">Set the default domain.</div>
 
 
 
<div class="CLI_indented_command">
 
 
 
 
  zmprov mcf zimbraDefaultDomainName domain1.com
 
  zmprov mcf zimbraDefaultDomainName domain1.com
  
</div>
+
To disable the imapproxy service:
 
+
  zmprov ms `zmhostname` -zimbraServiceEnabled imapproxy
* <div class="CLI_indented_command">To list all COSs and their attribute values. </div>
 
 
 
<div class="CLI_indented_command">
 
 
 
zmprov gac -v
 
 
 
</div>
 
 
 
* <div class="CLI_indented_command">To list all COSs and their attribute values. </div>
 
 
 
<div class="CLI_indented_command">
 
 
 
zmprov gaa domain.com
 
 
 
</div>
 
 
 
* <div class="CLI_indented_command">To list all user accounts and their configurations</div>
 
 
 
<div class="CLI_indented_command">
 
 
 
zmprov gaa -v domain.com
 
 
 
</div>
 
 
 
* <div class="CLI_indented_command">To disable the imapproxy service</div>
 
 
 
<div class="CLI_indented_command">
 
 
 
  zmprov -- -zimbraServiceEnabled imapproxy
 
 
 
</div>
 
 
 
* <div class="CLI_indented_command">To enable logger on a single server</div>
 
 
 
<div class="CLI_indented_command">
 
  
 +
To enable logger on a single server:
 
  zmprov +zimbraServiceEnabled logger
 
  zmprov +zimbraServiceEnabled logger
  
</div><div class="NumberedCont">
+
Then type <tt>zmloggerctl start</tt>, to start the logger.
 
 
Then type <span class="Code">zmloggerctl start</span>, to start the logger.
 
 
 
</div>
 
 
 
* <div class="NumberedCont">Modify <span class="attribute">zimbraNewMailNotification</span> 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 </div>
 
 
 
<div class="Bulleted2_outer" style="margin-left: 15pt; margin-bottom: 2.0pt; margin-top: 5.0pt; vertical-align: baseline">
 
 
 
{| id="SummaryNotRequired_np1121828"
 
|- style="vertical-align: baseline"
 
|
 
<div class="Bulleted2_inner" style="width: 14.4pt; white-space: nowrap; font-style: normal; font-variant: normal; text-transform: none">'''<font color="#000000"><span class="BulletSymbol">• </span></font>'''</div>
 
| width="100%" |
 
<div class="Bulleted2_inner" style="font-style: normal; font-variant: normal; text-transform: none">'''<font color="#000000"><span class="Code">${SENDER_ADDRESS} </span></font>'''</div>
 
|}
 
 
 
</div><div class="Bulleted2_outer" style="margin-left: 15pt; margin-bottom: 2.0pt; margin-top: 5.0pt; vertical-align: baseline">
 
 
 
{| id="SummaryNotRequired_np1121832"
 
|- style="vertical-align: baseline"
 
|
 
<div class="Bulleted2_inner" style="width: 14.4pt; white-space: nowrap; font-style: normal; font-variant: normal; text-transform: none">'''<font color="#000000"><span class="BulletSymbol">• </span></font>'''</div>
 
| width="100%" |
 
<div class="Bulleted2_inner" style="font-style: normal; font-variant: normal; text-transform: none">'''<font color="#000000"><span class="Code">${RECIPIENT_ADDRESS} </span></font>'''</div>
 
|}
 
 
 
</div><div class="Bulleted2_outer" style="margin-left: 15pt; margin-bottom: 2.0pt; margin-top: 5.0pt; vertical-align: baseline">
 
 
 
{| id="SummaryNotRequired_np1121843"
 
|- style="vertical-align: baseline"
 
|
 
<div class="Bulleted2_inner" style="width: 14.4pt; white-space: nowrap; font-style: normal; font-variant: normal; text-transform: none">'''<font color="#000000"><span class="BulletSymbol">• </span></font>'''</div>
 
| width="100%" |
 
<div class="Bulleted2_inner" style="font-style: normal; font-variant: normal; text-transform: none">'''<font color="#000000"><span class="Code">${RECIPIENT_DOMAIN} </span></font>'''</div>
 
|}
 
 
 
</div><div class="Bulleted2_outer" style="margin-left: 15pt; margin-bottom: 2.0pt; margin-top: 5.0pt; vertical-align: baseline">
 
 
 
{| id="SummaryNotRequired_np1121844"
 
|- style="vertical-align: baseline"
 
|
 
<div class="Bulleted2_inner" style="width: 14.4pt; white-space: nowrap; font-style: normal; font-variant: normal; text-transform: none">'''<font color="#000000"><span class="BulletSymbol">• </span></font>'''</div>
 
| width="100%" |
 
<div class="Bulleted2_inner" style="font-style: normal; font-variant: normal; text-transform: none">'''<font color="#000000"><span class="Code">${NOTIFICATION_ADDRESSS} </span></font>'''</div>
 
|}
 
 
 
</div><div class="Bulleted2_outer" style="margin-left: 15pt; margin-bottom: 2.0pt; margin-top: 5.0pt; vertical-align: baseline">
 
 
 
{| id="SummaryNotRequired_np1121845"
 
|- style="vertical-align: baseline"
 
|
 
<div class="Bulleted2_inner" style="width: 14.4pt; white-space: nowrap; font-style: normal; font-variant: normal; text-transform: none">'''<font color="#000000"><span class="BulletSymbol">• </span></font>'''</div>
 
| width="100%" |
 
<div class="Bulleted2_inner" style="font-style: normal; font-variant: normal; text-transform: none">'''<font color="#000000"><span class="Code">${SUBJECT} </span></font>'''</div>
 
|}
 
 
 
</div><div class="Bulleted2_outer" style="margin-left: 15pt; margin-bottom: 2.0pt; margin-top: 5.0pt; vertical-align: baseline">
 
  
{| id="SummaryNotRequired_np1121846"
+
== Mail Notification ==
|- style="vertical-align: baseline"
 
|
 
<div class="Bulleted2_inner" style="width: 14.4pt; white-space: nowrap; font-style: normal; font-variant: normal; text-transform: none">'''<font color="#000000"><span class="BulletSymbol">• </span></font>'''</div>
 
| width="100%" |
 
<div class="Bulleted2_inner" style="font-style: normal; font-variant: normal; text-transform: none">'''<font color="#000000"><span class="Code">${NEWLINE}</span></font>'''</div>
 
|}
 
  
</div><div class="bullet1continued">
+
Modify <tt>zimbraNewMailNotification</tt> 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:
  
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 '''name@domain.com'''. You can also change the template in a class of service, use <span class="Code">zmprov mc</span>. The command is written on one line.
+
* <tt>${SENDER_ADDRESS}</tt>
 +
* <tt>${RECIPIENT_ADDRESS}</tt>
 +
* <tt>${RECIPIENT_DOMAIN}</tt>
 +
* <tt>${NOTIFICATION_ADDRESSS}</tt>
 +
* <tt>${SUBJECT}</tt>
 +
* <tt>${NEWLINE}</tt>
  
</div><div class="CLI_indented_command">
 
  
zmprov ma name@domain.com zimbraNewMailNotificationBody ‘Important message from ${SENDER_ADDRESS}.${NEWLINE}Subject:${SUBJECT}’
+
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 '''name@domain.com'''. You can also change the template in a class of service, use <tt>zmprov mc</tt>. The command is written on one line.
  
</div>
+
zmprov ma name@domain.com zimbraNewMailNotificationBody 'Important message from ${SENDER_ADDRESS}.${NEWLINE}Subject:${SUBJECT}'
  
 +
{{Article Footer|Zimbra Collaboration 8.0, 7.0|04/16/2014}}
 
[[Category:Command Line Interface]]
 
[[Category:Command Line Interface]]

Latest revision as of 11:00, 1 November 2015

Zmprov Examples

   KB 1663        Last updated on 2015-11-1  




0.00
(0 votes)

Accounts

Create one account with a password that is assigned to the default COS:

zmprov ca name@domain.com password

Create one account, password with first name/last name:

zmprov ca name@example.com password cn "Firstname Lastname" displayName "Firstname Lastname" givenName "Firstname" zimbraPrefFromDisplay "Firstname Lastname" 

Create one account with a password that is assigned to a specified COS. You must know the COS ID number. To find a COS ID, type zmprov gc <COSname>.:

zmprov ca name@domain.com <password> zimbraCOSid <cosIDnumberstring>

Create an account that forwards to another account:

zmprov ca user@domain.com <password> zimbraMailForwardingAddress user@otherdomain.com

Create one account when the password is not authenticated internally:

zmprov ca name@domain.com ""

Change the administrator’s password. Use this command to change any password. Enter the address of the password to be changed:

zmprov sp admin@domain.com password

To list all COSs and their attribute values:

zmprov gac -v

To list all COSs and their attribute values:

zmprov gaa domain.com

To list all user accounts [domain.com is optional]:

zmprov -l gaa [domain.com]

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

Use a batch process to create accounts: http://wiki.zimbra.com/index.php?title=Bulk_Provisioning

see the Batch Provisioning from the CLI Utility section of the Managing the Zimbra Collaboration Suite chapter for the procedure.

Aliases

Add an alias to an account:

zmprov aaa accountname@domain.com aliasname@domain.com
Canonical address

> zimbraMailCanonicalAddress

Distribution Lists

Create distribution list. The ID of the distribution list is returned:

zmprov cdl listname@domain.com

Add a member to a distribution list. Tip: You can add multiple members to a list from the administration console:

zmprov adlm listname@domain.com member@domain.com

Misc

Create a domain that authenticates against Zimbra OpenLDAP:

zmprov cd marketing.domain.com zimbraAuthMech zimbra

Set the default domain:

zmprov mcf zimbraDefaultDomainName domain1.com

To disable the imapproxy service:

zmprov ms `zmhostname` -zimbraServiceEnabled imapproxy

To enable logger on a single server:

zmprov +zimbraServiceEnabled logger

Then type zmloggerctl start, to start the logger.

Mail Notification

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 name@domain.com. You can also change the template in a class of service, use zmprov mc. The command is written on one line.

zmprov ma name@domain.com zimbraNewMailNotificationBody 'Important message from ${SENDER_ADDRESS}.${NEWLINE}Subject:${SUBJECT}'
Verified Against: Zimbra Collaboration 8.0, 7.0 Date Created: 04/16/2014
Article ID: https://wiki.zimbra.com/index.php?title=Zmprov_Examples Date Modified: 2015-11-01



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search