首页 » Linux » Zimbra批量建立账号和修改邮件大小

Zimbra批量建立账号和修改邮件大小

 

测试环境:zimbra 8.6版本

系统:centos 6.9

一、 Batch adding users

批量建立账号可以根据以下来做:

[zimbra@mail ~]$ zmprov help account 

  addAccountAlias(aaa) {name@domain|id} {alias@domain}

  checkPasswordStrength(cps) {name@domain|id} {password}

  createAccount(ca) {name@domain} {password} [attr1 value1 [attr2 value2...]]

  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}

  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) [-e] {name@domain|id} [attr1 [attr2...]]

  getDataSources(gds) {name@domain|id} [arg1 [arg2...]]

  getIdentities(gid) {name@domain|id} [arg1 [arg...]]

  getSignatures(gsig) {name@domain|id} [arg1 [arg...]]

  getAccountMembership(gam) {name@domain|id}

  getAllAccounts(gaa) [-v] [-e] [-s server] [{domain}]
    -- NOTE: getAllAccounts can only be used with "zmprov -l/--ldap"

  getAllAdminAccounts(gaaa) [-v] [-e] [attr1 [attr2...]]

  modifyAccount(ma) {name@domain|id} [attr1 value1 [attr2 value2...]]

  modifyDataSource(mds) {name@domain|id} {ds-name|ds-id} [attr1 value1 [attr2 value2...]]

  modifyIdentity(mid) {name@domain|id} {identity-name} [attr1 value1 [attr2 value2...]]

  modifySignature(msig) {name@domain|id} {signature-name|signature-id} [attr1 value1 [attr2 value2...]]

  removeAccountAlias(raa) {name@domain|id} {alias@domain}

  renameAccount(ra) {name@domain|id} {newName@domain}

  setAccountCos(sac) {name@domain|id} {cos-name|cos-id}

  setPassword(sp) {name@domain|id} {password}

所以建立一个脚本就可以了,大概内容如下:

zmprov createAccount  test3@clctest.com 123456 displayName "test3" givenName "test3"  sn test3
zmprov createAccount  test4@clctest.com 123456 displayName "test4" givenName "test4"  sn test4
zmprov createAccount  test5@clctest.com 123456 displayName "test5" givenName "test5"  sn test5

在zimbra账号下执行一下就可以建立好账号了。

二、change attachment zise

可以按以下命令修改大小,单位是byte,如20,000,000算下来,只能14MB的大小,大概是70%,不知道zimbra是怎么算的。所以你按你设置大小的70%算就对了。以下是在zimbra运行账号下执行。

zmprov mcf zimbraFileUploadMaxSize 200000000
zmprov mcf zimbraImapMaxRequestSize 200000000
zmprov mcf zimbraMailContentMaxSize 200000000
zmprov mcf zimbraMtaMaxMessageSize 200000000

 

 

 

原文链接:Zimbra批量建立账号和修改邮件大小,转载请注明来源!

0