zimbra 命令

来源:互联网 发布:手机驾校模拟考试软件 编辑:程序博客网 时间:2024/05/16 14:22
Long NameShort NameDescriptionGeneral Options--help-hdisplay usage--file-fuse file as input stream--server-s{host}[:{port}] server hostname and optional port--ldap-lprovision via LDAP instead of SOAP--log property file-Llog 4j property file, valid only with -l--account {name}-aaccount name to auth as--password {pass}-ppassword for account--passfile {file}-Pread password from file--zadmin-zuse Zimbra admin name/password from localconfig for admin/password--authtoken (authtoken)-yuse auth token string (has to be in JSON format) from command line--authtoken (authtoken file)-Yuse auth token string (has to be in JSON format) from command line--verbose-vverbose mode (dumps full exception stack trace)--debug-d/debug mode (dumps SOAP messages)--master-muse LDAP master. This only valid with -lAccount Provisioning CommandsaddAccountAliasaaa{name@domain|id|adminName} {alias@domain}

zmprov aaa joe@domain.com joe.smith@engr.domain.com

checkPasswordStrengthcpsSyntax: {name@domain|id} {password}

Note: This command does not check the password age or history.

zmprov cps joe@domain.com test123

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

Type on one line.

zmprov ca joe@domain.com test123 displayName JSmith

createDataSourcecds{name@domain} {ds-type} {ds-name} [attr1 value1 [attr2 value2...]]createIdentitycid{name@domain} {identity-name} [attr1 value1 [attr2 value2...]]createSignaturecsig{name@domain} {signature-name} [attr1 value1 [attr2 value2...]]deleteAccountdaSyntax:{name@domain|id|adminName}

zmprov da joe@domain.com

deleteDataSourcedds{name@domain|id} {ds-name|ds-id}deleteIdentitydid{name@domain|id} {identity-name}deleteIdentitydid{name@domain|id} {identity-name}deleteSignaturedsig{name@domain|id} {signature-name}getAccountgaSyntax:{name@domain|id|adminName}

zmprov ga joe@domain.com

getAccountMembershipgam{name@domain|id}getAllAccountsgaaSyntax: [-v] [{domain}]

zmprov -l gaa

zmprov -l gaa -v domain.com

getAllAdminAccountsgaaaSyntax: gaaa

zmprov gaaa

getDataSourcesgds{name@domain | id} [arg 1 [arg 2...]]getIdentitiesgid{name@domain | id} [arg 1 [arg 2...]]getSignaturesgsig{name@domain | id} [arg 1 [arg 2...]]modifyAccountma{name@domain|id|adminName} [attribute1 value1 etc]

zmprov ma joe@domain.com zimbraAccountStatus maintenance

modifyDataSourcemds{name@domain | id} {ds-name |ds-id} [attr 1 value 1 [attr2 value 2...]]modifyIdentitymid{name@domain |id} {identity-name} [attr 1 value 1 [attr 2 value 2...]]modifySignaturemsig{name@domain |id} {signature-name | signature-id} [attr 1 value 1 [attr 2 value 2...]]removeAccountAliasraa{name@domain|id|adminName} {alias@domain}

zmprov raa joe@domain.com joe.smith@engr.domain.com

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

zmprov ra joe@domain.com joe23@domain.com

Note: After you rename an account, you should run a full backup for that account.

zmbackup -f - <servername.com> -a <newaccountname@servername.com>

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

zmprov sac joe@domain.com FieldTechnician

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

Note: Passwords cannot included accented characters in the string. Example of accented characters that cannot be used: ã, é, í, ú, ü, ñ.

zmprov sp joe@domain.com test321

Calendar Resource Provisioning CommandscreateCalendarResourceccr{name@domain} [attr1 value1 [attr2 value2...]]deleteCalendarResourcedcr{name@domain|id}getAllCalendarResourcesgacr[-v] [{domain}]getCalendarResourcegcr{name@domain|id}modifyCalendarResourcemcr{name@domain|id} [attr1 value1 {attr2 value2...]]renameCalendarResourcercr{name@domain|id} {newName@domain}searchCalendarResourcesscr[-v] domain attr op value {attr op value...]Free Busy CommandsgetAllFbpgafbp[-v]getFreebusyQueueInfogfbqi[{provider-name}]pushFreebusypfb{domain | account-id} [account-id...]Domain Provisioning CommandscountAccountcta{domain|id}

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

createAliasDomaincad{alias-domain-name} {local-domain-name|id} [attr1 value1 [attr2 value2...]]createDomaincd{domain} [attribute1 value1 etc]

zmprov cd mktng.domain.com zimbraAuthMech zimbra

deleteDomaindd{domain|id}

zmprov dd mktng.domain.com

getDomaingd{domain|id}

zmprov gd mktng.domain.com

getDomainInfogdiname|id|virtualHostname {value} [attr1 [attr2...]]getAllDomainsgad[-v]modifyDomainmd{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.

renameDomainrd{domain|id} {newDomain}

Note: renameDomain can only be used with “zmprov -l/--ldap”.

COS Provisioning CommandscopyCoscpc{src-cos-name|id} {dest-cos-name}createCoscc{name} [attribute1 value1 etc]

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

deleteCosdc{name|id}

zmprov dc Executive

getCosgc{name|id}

zmprov gc Executive

getAllCosgac[-v]

zmprov gac -v

modifyCosmc{name|id} [attribute1 value1 etc]

zmprov mc Executive zimbraAttachmentsBlocked TRUE

renameCosrc{name|id} {newName}

zmprov rc Executive Business

Server Provisioning CommandscreateServercs{name} [attribute1 value1 etc]deleteServerds{name|id}

zmprov ds domain.com

getServergs{name|id}

zmprov gs domain.com

getAllServersgas[-v]

zmprov gas

getAllReverseProxyBackendsgarpb modifyServerms{name|id} [attribute1 value1 etc]

zmprov ms domain.com zimbraVirusDefinitionsUpdateFrequency 2h

getAllReverseProxyURLsgarpuUsed to publish into nginx.conf what servers should be used for reverse proxy lookup.getAllMtaAuthURLsgamauUsed to publish into saslauthd.conf what servers should be used for saslauthd.conf MTA authgetAllMemcachedServersgamcsUsed to list memcached servers (for nginix use).Config Provisioning CommandsgetAllConfiggacf[-v]

All LDAP settings are displayed

getConfiggcf{name}modifyConfigmcfattr1 value1

Modifies the LDAP settings.

Distribution List Provisioning CommandscreateDistributionListcdl{list@domain}

zmprov cdl needlepoint-list@domain.com

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

zmprov adlm needlepoint-list@domain.com singer23@mail.free.net

removeDistributionListMemberrdlm{list@domain|id}

zmprov rdlm needlepoint-list@domain.com singer23@mail.free.net

getAlldistributionListsgadl[-v]get DistributionListmembershipgdlm{name@domain|id}getDistributionListgdl{list@domain|id}

zmprov gdl list@domain.com

modifyDistributionListmdl{list@domain|id} attr1 value1 {attr2 value2...}

zmprov mdl list@domain.com

deleteDistributionListddl{list@domain|id}addDistributionListAliasadla{list@domain|id} {alias@domain}removeDistributionListAliasrdla{list@domain|id} {alias@domain}renameDistributionListrdl{list@domain|id} {newName@domain}Zimbra Documents Provisioning CommandsimportNotebookimpn{name@domain} {directory} {folder}

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

initNotebookin[{name@domain}]

in joe@domain.com

initDomainNotebookidn{domain} [{name@domain}]

Creates the domain Documents account

idn domain.com domainwiki@domain.com

UpdateTemplatesut[-h host] {template-directory}Mailbox CommandsgetMailboxInfo---gmi{account}getQuotaUsage---gqu{server}reIndexMailboxrim{name@domain|id} {action} [{reindex-by} {value1} [value2...]]RecalculateMailboxCountsrmc{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.

selectMailboxsm{account-name} [{zmmailbox commands}]LogsaddAccount Loggeraal{name@domain|id} {logging-category} {debug|info|warn|error}

Creates custom logging for a single account

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

Shows all individual custom logger account

removeAccountLoggerral[-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.SearchsearchGALsg{domain} {name}

zmprov sg joe

autoCompleteGalacg{domain} {name}searchAccountssa[-v] {ldap-query} [limit] [offset] [sortBy {attribute} [sortAscending 0|1] [domain {domain}]Share Provisioning CommandsFor a GUI view of results, see Distribution List Shares tab on the administration consolegetPublishedDistributionListShareInfogpdlsi{dl-name|dl-id} [{owner-name|owner-id}]getShareInfogsi{owner-name|owner-id}publishDistribtionListShareInfopdlsi{+|-} {dl-name@domain|id} {owner-name|owner-id} [{folder-path|folder-id}]Miscellaneous Provisioning Commandsdescribedesc[[-v] [-ni] [{entry-type}]] | [-a {attribute-name}]

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

generateDomainPreAuthKeygdpak{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.

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

Generates preAuth values for comparison.

syncGalsyg{domain} [{token}]flushCachefc[skin|local|account|config|cos|domain|server|zimlet} [name1|id]

Flush cached LDAP entries for a type. See Flushing LDAP Cache

getAccountLoggergal[-s /--server hostname] {name@domain | id}Commands specific to Zimbra IMAP/POP proxygetAllReverseProxyURLsgarpuUsed to publish into nginx.conf what servers should be used for reverse proxy lookup.getAllMtaAuthURLsgamauUsed to publish into saslauthd.conf what servers should be used for saslauthd.conf MTA authgetAllMemcachedServersgamcsUsed to list memcached servers (for nginix use).

Examples

  • Create one account with a password that is assigned to the default COS.
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 zmprov gc <COSname>.
zmprov ca name@domain.com password zimbraCOSId cosIDnumberstring
  • Create one account when the password is not authenticated internally.
zmprov ca name@domain.com ‘’
Note: The empty single quote is required and indicates that there is no local password.
  • Using a batch process to create accounts, see the Managing the Zimbra Collaboration Suite chapter in the Zimbra Administration Guide for the procedure.
  • Add an alias to an account.
zmprov aaa accountname@domain.com aliasname@domain.com
  • 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
  • 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
  • Create a domain that authenticates against zimbra OpenLDAP.
zmprov cd marketing.domain.com zimbraAuthMech zimbra
  • Set the default domain.
zmprov mcf zimbraDefaultDomain domain1.com
  • To list all COSs and their attribute values.
zmprov gac -v
  • To list all user accounts in a domain (domain.com)
zmprov gaa domain.com
  • To list all user accounts and their configurations
zmprov gaa -v domain.com
  • To enable logger on a single server
zmprov +zimbraServiceEnabled logger

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:
zmprov ModifyServer <server-name> zimbraMailPurgeSleepInterval <Xm>

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 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}’

0 0
原创粉丝点击