Zimbra account preferences and class of service

From Notes_Wiki
Revision as of 12:19, 5 March 2016 by Saurabh (talk | contribs) (Created page with "<yambe:breadcrumb>Zimbra_server_configuration|Zimbra</yambe:breadcrumb> =Zimbra account preferences and class of service= By default there can be a Class-Of-Service (COS) for...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<yambe:breadcrumb>Zimbra_server_configuration|Zimbra</yambe:breadcrumb>

Zimbra account preferences and class of service

By default there can be a Class-Of-Service (COS) for a given domain. Accounts created in the domain will become part of domains default COS. COS contains preference and settings such as forwarding address, quota, what extensions are available to user, etc. Default COS can be duplicated and modified. The modified COS can be assigned to more / less privileged users appropriately. zmprov command can be used for copying and modifying cos using command-line.

To get list of all Zimbra users on current server use following command as 'zimbra' user:

   zmprov -l gaa

To get preferences of a particular use:

   zmprov ga <email-ID>

To get a particular preference across all users, eg, zimbraPrefMailForwardingAddress use:

   for account in `zmprov -l gaa`; do zmprov ga $account zimbraPrefMailForwardingAddress; done

A more sophisticated way of getting preference against account name, if preference is set use:

   #!/bin/sh

   for account in `zmprov -l gaa`; do
	forwardingaddress=`zmprov ga $account |grep 'zimbraPrefMailForwardingAddress' |sed 's/zimbraPrefMailForwardingAddress: //'`
	if [ "$forwardingaddress" != "" ]; then
		echo "$account is forwarded to $forwardingaddress"
	else
		forwardingaddress=""
	fi
   done

The scripts are learned from http://community.zimbra.com/collaboration/f/1886/t/1137541 To learn more about zmprov refer https://wiki.zimbra.com/wiki/Zmprov


<yambe:breadcrumb>Zimbra_server_configuration|Zimbra</yambe:breadcrumb>