Product SiteDocumentation Site

4.12. Configure Zarafa Quota Manager

Users can collect a lot of email, while disk space can be limited. The Zarafa Quota Manager can be used to set server-wide or user specific space quotas. The Zarafa Quota Manager knows three levels: warn, soft and hard quota. When one of the levels will be reached, the user receives an email with the quota sizes and which quota level was reached.
The quota settings can be configured server-wide in the server.cfg or per user via the user plugin.
When a user reaches the warning quota level, the user will receive an email with a warning and quota information. As the user reaches the soft quota limit, the user will not be able to sent email until the size of the store is reduced. When the hard quota limit is reached, email can also not be delivered to that user anymore.

4.12.1. Setup server-wide quota

The server-wide quota can be configured in the configuration file of the server:
quota_warn = 100
quota_soft = 150
quota_hard = 200
The values are all in megabytes. These values will be honored for all users present in the server. When the values are set to 0, that particular quota level is disabled.

4.12.2. Setup quota per user

By using the zarafa-admin tool, the user quota can be set for a specific user. Example:
Set the quota of the user John with the settings: Warning level to 80 Mb, soft level to 90 Mb and hard level to 100 Mb.
zarafa-admin  -u john  --qo 1  --qw 80  --qs 90  --qh 100


Set user quota with zarafa-admin does not work with LDAP. With LDAP the properties are stored in the LDAP server per user. See the Chapter 8, User Management for more information.

4.12.3. Monitoring for quota exceeding

The zarafa-monitor program checks every hour (by default) for users who have exceeded a quota level and sends emails to a user when the warning or soft quota limit is exceeded. Global quota settings can be set in the server configuration. User specific levels can be set via zarafa-admin when using the db or unix plugin, or by editing the LDAP values as described in the User Management section.
To start the zarafa-monitor, use:
/etc/init.d/zarafa-monitor start
zarafa-monitor -c /etc/zarafa/monitor.cfg
The zarafa-monitor will daemonise, so the prompt will almost immediately return. Use -F to start it in the foreground. More information about the configuration options can be found in the manual page:
man zarafa-monitor.cfg

4.12.4. Quota warning templates

When working with the zarafa-monitor, it is possible to modify the contents of the email which will be sent out when a user or company exceeds its quota. For each quota level a separate quota template can be specified, these can be configured with the following options:
  • userquota_warning_template
  • companyquota_warning_template
By default the templates are stored in /etc/zarafa/quotamail, in each of these templates certain variables are provided which will be substituted for the real value before the email is sent:
  • ZARAFA_QUOTA_NAME - The name of the user or company who exceeded his quota
  • ZARAFA_QUOTA_COMPANY - The name of the company to which the user belongs
  • ZARAFA_QUOTA_STORE_SIZE - When a user exceeds his quota, this variable contains the total size of the user’s store. When a company exceeds its quota this variable contains the total size of all stores, including the public store within the company space.
  • ZARAFA_QUOTA_WARN_SIZE - The quota warning limit for the user or company.


Variables containing a size always include the size unit (B,KB,MB,GB) as part of the variable.