|
| ZCS Administrator's Guide Open Source Edition 6.0, Rev 1 |
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 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.The syntax is zmprov [cmd] [argument].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"
{host}[:{port}] server hostname and optional port --log property file --account {name} --password {pass} --passfile {file} use Zimbra admin name/password from localconfig for admin/password --authtoken (authtoken) use auth token string (has to be in JSON format) from command line --authtoken (authtoken file) use auth token string (has to be in JSON format) from command line verbose mode (dumps full exception stack trace) debug mode (dumps SOAP messages) The commands in the following table are divided into the tasks types - Account, Calendar Resources, Config, COS, Distribution List, Documents, Domain, Server, and Miscellaneous.
Short Name {name@domain|id|adminName} {alias@domain}zmprov aaa joe@domain.com joe.smith@engr.domain.com Note: This command does not check the password age or history. Syntax:{name@domain} {password} [attribute1 value1 etc]zmprov ca joe@domain.com test123 displayName JSmith {name@domain} {ds-type} {ds-name} [attr1 value1 [attr2 value2...]] {name@domain} {identity-name} [attr1 value1 [attr2 value2...]] {name@domain} {signature-name} [attr1 value1 [attr2 value2...]] {name@domain|id|adminName} [attribute1 value1 etc]zmprov ma joe@domain.com zimbraAccountStatus maintenance {name@domain | id} {ds-name |ds-id} [attr 1 value 1 [attr2 value 2...]] {name@domain |id} {identity-name} [attr 1 value 1 [attr 2 value 2...]] {name@domain |id} {signature-name | signature-id} [attr 1 value 1 [attr 2 value 2...]] {name@domain|id|adminName} {alias@domain}zmprov raa joe@domain.com joe.smith@engr.domain.com {name@domain|id} {newname@domain}zmprov ra joe@domain.com joe23@domain.com {name@domain|id|adminName} {cos-name|cos-id}zmprov sac joe@domain.com FieldTechnician {name@domain|id|adminName} {password}Note: Passwords cannot included accented characters in the string. Example of accented characters that cannot be used: ã, é, í, ú, ü, ñ. {name@domain} [attr1 value1 [attr2 value2...]] {name@domain|id} [attr1 value1 {attr2 value2...]] {name@domain|id} {newName@domain} This lists each COS, the COS ID and the number of accounts assigned to each COS {alias-domain-name} {local-domain-name|id} [attr1 value1 [attr2 value2...]] zmprov cd mktng.domain.com zimbraAuthMech zimbra name|id|virtualHostname {value} [attr1 [attr2...]] zmprov md domain.com zimbraGalMaxResults 500Note: Do not modify zimbraDomainRenameInfo manually. This is automatically updated when a domain is renamed. zmprov cc Executive zimbraAttachmentsBlocked FALSE zimbraAuthTokenLifetime 60m zimbraMailQuota 100M zimbraMailMessageLifetime 0 zmprov mc Executive zimbraAttachmentsBlocked TRUE zmprov ms domain.com zimbraVirusDefinitionsUpdateFrequency 2h Used to publish into nginx.conf what servers should be used for reverse proxy lookup. Used to publish into saslauthd.conf what servers should be used for saslauthd.conf MTA auth Used to list memcached servers (for nginix use). zmprov adlm needlepoint-list@domain.com singer23@mail.free.net zmprov rdlm needlepoint-list@domain.com singer23@mail.free.net get DistributionListmembership {list@domain|id} attr1 value1 {attr2 value2...} Before importing files, any file that will become a Documents page (wiki-style page), must be renamed to include the extension “.wiki”. If not it is imported as a file, accessed either as an attachment or an image.impn joe@domain.com /opt/zimbra/wiki/template template {name@domain|id} {action} [{reindex-by} {value1} [value2...]] 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. {account-name} [{zmmailbox commands}] {name@domain|id} {logging-category} {debug|info|warn|error} [-s/--server hostname] {name@domain|id} {logging-category} {debug|info|warn|error} [-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. See the zmprov Log Categories for a list of logging categories. [-v] {ldap-query} [limit] [offset] [sortBy {attribute} [sortAscending 0|1] [domain {domain}] For a GUI view of results, see Distribution List Shares tab on the administration console getPublishedDistributionListShareInfo {+|-} {dl-name@domain|id} {owner-name|owner-id} [{folder-path|folder-id}] Prints all attribute names (account, domain, COS, servers, etc.). Generates a pre-authentication key to enable a trusted third party to authenticate to allow for single-sign on. Used in conjunction with GenerateDomainPreAuth. {domain|id} {name} {name|id|foreignPrincipal} {timestamp|0} {expires|0}Generates preAuth values for comparison. [skin|local|account|config|cos|domain|server|zimlet} [name1|id] Used to publish into nginx.conf the servers that should be used for reverse proxy lookup Used to publish into saslauthd.conf the servers that should be used for saslauthd.conf MTA auth Used to list memcached servers (for Zimbra Proxy use)
• 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 zimbraCOS cosIDnumberstring
• Using a batch process to create accounts, see Managing the zimbra Collaboration Suite chapter for the procedure.
• Add a member to a distribution list. Tip: You can add multiple members to a list from the administration console.
• Change the administrator’s password. Use this command to change any password. Enter the address of the password to be changed.Then type zmloggerctl start, to start the logger.
• To modify the purge interval, set zimbraMailPurgeSleepInterval to the duration of time that the server should “sleep” between every two mailboxes. Type:X is the duration of time between mailbox purges; m represents minutes. You could also set <xh> for hours.
• 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 areYou 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}’
Startup/shutdown and other system messages This command runs 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.This command checks 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 appointment for details on time-specs.
Short Name Allows the user to specify the maximum number of attendees to check. The default value is 50. Send email notifications to selected users if they are out of sync for an appointmentThis command is run to start or to stop services. You can also find which version of the zimbra Collaboration Suite is installed.
Short Name Displays the usage options for this command. Shutdown all services and manager on this host. When the manager is shutdown, you cannot query that status. Startup manager and all services on this host. Startup manger and all services on this host. Returns services information for the named host. Stop all services but leave the manager running.The CLI command zmcertmgr is used to manage your certificates from the command line. You can use the administration console to easily view, update and install self-signed and commercial certificates. See the administration console help for more information about using this tool.
<self|comm> [-new] [subject] [-subjectAltNames “host1,host2”] Install either a self signed or commercial signed certificate View the certificate signing request information The CLI command zmgsautil can be used 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.
Creates the GAL sync account. This should be done from the administration console. 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}] 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. This syncs all LDAP contact data. You can also set this from the administration console.fullSync [-a {galsynceaccountname}|-i {account-id}] [-d {datasource-id}] [-n {datsource-name}] This should be used to reload the entire GAL if there is change in the filter, attribute mapping or LDAP server parameters.The CLI command zmldappasswd changes the LDAP password on the local server. In multi node environments, this command must be run on the LDAP master server only.
• LDAP Admin password. This is the master LDAP password. This is not new, but has been renamed.
• LDAP Root password. This is used for internal LDAP operations.
• LDAP Postfix password. This is the password used by the postfix user to identify 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 user to 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 LDAP replication user to identify itself to the LDAP master and must be the same as the password on the LDAP master server.
Changes ldap_amavis-password Changes ldap_replication_password Changes ldap_postfix_password Changes ldap_root_passwd Only one of a, l, p, or r can be specified. If options are not included, the zimbra_ldap_password is changed.To see the local config type zmlocalconfig
Short Name <arg> File in which the configuration is stored Edit the configuration file, change keys and values specified. The [args] is in the key=value form. Edit the keys whose change is known to be potentially dangerous Shows the help for the usage options for this tool Shows the documentation for the keys listed in [args] <arg> Shows the values in one of these formats: plain (default), xml, shell, nokey. Shows the values for only those keys listed in the [args] that have been changed from their defaults This option is used with the edit option. Specified key is set to a random password string. Remove a configuration key. If this is a key with compiled-in defaults, set its value to the empty string. The zmmailbox tool is used 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.
Short Name http[s]://{host}[:{port}] server hostname and optional port. Must use admin port with -z/-a use zimbra admin name/password from localconfig for admin/password --authtoken (authtoken) use authtoken string (has to be in JSON format) from command line --authtoken (authtoken file) use authtoken string (has be in JSON format) from command line verbose mode (dumps full exception stack trace) 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.
help on contact-related commands (address book) help on conversation-related commands
• 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)”
This command is used to set the Web server mode to the communication protocol options: HTTP, HTTPS, Mixed, Both and Redirect.
• Mixed mode redirects to HTTPS for login and HTTP for normal session traffic.
• Both mode means that an HTTP session stays HTTP, including during the log in phase, and an HTTPS session remains HTTPS throughout, including the log in phase.
• Redirect mode redirects any users connecting via HTTP to a HTTPS connection.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 ZCS installation, in /opt/zimbra/ssl/zimbra/server/server.crt.
1.
2.
3. This command is a support tool that dumps the contents of an item’s metadata in a human readable form.or zmmetadump -f <file containing encoded metadata>This command is used to change zimbra_myql_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. This requires a restart for the change to take effect.This command generates the nginx proxy configuration files. It reads LDAP settings to replace template variables and generates the final nginx configuration.
Short Name <arg> Overrides a config variable. The <arg> format should be name=value. To see a list of names, use -d or -D Prints the Definitions variable map after loading LDAP configuration and processing overrides <arg> Displays the directory path (relative to $workdir/conf), where included configuration files are written Specifies not to write configuration and only display the files that would be written <arg> Displays the config file prefix. The default value is nginx.conf <arg> Displays the template file prefix. The default value is $prefix <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 <arg>Specifies the proxy template directory. The default value is $workdir/conf/nginx/templates <arg> Specifies the proxy working directory. The default value is /opt/zimbraThis command purges 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.
Short Name Shows the help for the usage options for this tool. Displays file containing list of accounts, one per line Specifies the format to be used for printing routing information with information. The fields that display by default are (optional command) Specifies additional memcache server in the form of server:portThis command simplifies 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.For more information about this tool, see http://wiki.zimbra.com/index.php?title=About_Creating_ZCS_Themes
Short Name <name> Displays mailbox account name. Mail and account requests are sent to this account. <name>Displays the target account name to which the requests are sent. Used only for non-admin sessions <name>Displays the admin account name to authenticate as Displays the Zimbra admin name and password to authenticate as <path> Displays the root element path. If specified, all path arguments that do not start with a slash (/) are relative to this element <type> Displays the SOAP request type. Can either be mail, account, or admin <http[s]://...> Displays the server hostname and optional port value Prints the SOAP request and other status information <[path...]> Displays the element or attribute path and value. Roughly follows the XPath syntax as:This command is used 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/.
1. Enter zmprov ms {hostname} zimbraServerEnable : stats.
Short Name <arg> If this is specified, the aggregate computation ends at this timestamp. Usage is MM/dd/yyyy HH:mm:ss. <arg> If this is specified, the aggregate computation starts at this timestamp. Usage is MM/dd/yyyy HH:mm:ss. <arg> If this is specified, all samples after the specified timestamp are ignored. Usage is MM/dd/yyyy HH:mm:ss. <arg> If this is specified, all samples before this timestamp are ignored. <arg> This gives the chart a title that displays. Defaults to the last directory name of srcdir. Summary data generation is not included. <arg> The directory where the generated chart files are saved. One or more directories where the csv files are located. The csv files are moved to directories listed by date under zmstat/.This command generates an xml file /opt/zimbra/conf/zmstat-chart.xml from a template, taking into account the server setup including the LDAP node and the processes run, among other specifications.This is a control script for checking zmstat data collectors. It starts or stops monitoring processes, checks status or rotates logs.This command invokes a thread dump in the ZCS server process and prints the output file. It also gives the option of saving the thread dump to a file and inserts a timestamp on the logfile.
Short Name Appends the timestamp to the LOGFILE before invoking SIGQUIT Returns the PID to send SIGQUIT. The default value can be found in zmmailboxd_java.pid Specifies the LOGFILE to save the thread dump output in. The default value is zmmailbox.out Specifies the output file of the thread dump. The default value is stdout Specifies the timeout value (in seconds) to exit if the process becomes unresponsive. The default value is 30 seconds.This command is used 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 Anti-Spam Training Filters.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.This command is used 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 http://wiki.zimbra.com index.php?title=Changing_ZCS_Time_Zoneszmtzupdate --rulefile <rule file> -a <“all” or list of specific email addresses> [--sync] [--after <date/time stamp>]
Short Name <arg> account email addresses separated by a white space. Use “all” for all accounts to be updated <arg> Appointments occurring after the specified date/time in this field are updated. The default cut off time is January 1st, 2008 Specifies the .ics XML file that should be used to update time zone definitions <arg> Specifies the mail server hostname. The default value is localhost If specified, this option causes the zmtzupdate command to block till the server processes all requested accounts. The default value is no.This command can be used to manage storage volumes from the CLI. Volumes can be easily managed from the administration console, Server, Volume tab.
Short Name <arg> Compress BLOBs; “true” or “false” Shows the help for the usage options for this tool. <arg> Volume ID <arg> Volume name <arg> Root path <arg> Mail server hostname. Default is localhost. <arg> Volume type (primaryMessage, secondaryMessage, or index) Turns off the current secondary message volumeThis command is used to manage Zimlets and to list all zimlets on the server. See Working with Zimlets. Most Zimlet deployment can be competed from the zimbra administration console.
Short Name <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 <zimlet> Uninstall a zimlet from the zimbra server <zimlet.zip> Installs the Zimlet files on the host <zimlet> Adds the Zimlet entry to the LDAP <zimlet> Enables the Zimlet <zimlet> Disables the Zimlet <zimlet> <cos1> {grant|deny} [<cos2> {grant|deny}...] Sets the access control, grant|deny, to a COS <zimlet> Lists the ACLs for the Zimlets <zimlet.zip> Extracts the configuration template from the Zimlet.zip file <config.xml>Installs the configuration Shows the current Zimlet priorities (0 is high, 9 is low) <zimlet> Sets the Zimlet priorityThis command is used to manage Zimbra proxy and should only be used when you have to make changes to Zimbra proxy after it has been installed. See Chapter 6, Working with Zimbra Proxy../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
Short Name Hostname of the server on which enable/disable proxy functionality Colon separated list of Web ports to use. Format: HTTP-STORE:HTTP-PROXY:HTTPS-STORE:HTTPS-PROXY (Ex: 8080:80:8443:443) Full reset on memcached port and search queries and POP/IMAP throttling Colon separated list of IMAP ports to use. Format: IMAP-STORE:IMAP-PROXY:IMAPS-STORE:IMAPS-PROXY (Ex: 7143:143:7993:993) Colon separated list of POP ports to use. Format: POP-STORE:POP-PROXY:POPS-STORE:POPS-PROXY (Ex: 7110:110:7995:995) Run against a remote host. Note that this requires the server to be properly configured in the LDAP master 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. hostname is the value of the zimbra_server_hostname LC key for the server being modified.The following are the defaults for -a, -i, -p, and -x if they are not supplied as options.
|
| ZCS Administrator's Guide Open Source Edition 6.0, Rev 1 |