Sun Java System Messaging Server 6.3 Administration Guide

20.8.4 Configuring Message Store Quotas

This section describes the following tasks: To Specify a Default User Quota

A default quota applies to users who do not have individual quotas set in their LDAP entries. The process consists of two steps: 1) Specifying a user default quota and 2) Specifying which users are bound to the default quota. The following examples show how to set default user quotas. Refer to Chapter 3, Messaging Server Configuration, in Sun Java System Messaging Server 6.3 Administration Reference for detailed parameter information.

To specify a default user disk quota for message size in bytes:

configutil -o store.defaultmailboxquota -v [ -1 | number ]

where -1 indicates no quota (unlimited message usage) and number indicates a number of bytes.

To specify a default user quota for total number of messages:

configutil -o store.defaultmessagequota -v [ -1 | number ]

where -1 indicates no quota (unlimited messages) and number indicates the number of messages.

To specify the default quota for specific users:

Set the mailQuota attribute to -2 in the user entries that use the default message store quota. Note that if mailQuotais not specified, the system default quota is used. To Specify Individual User Quotas

Each user can have individualized quotas. To set user-specific quotas, set the mailQuota in Sun Java Communications Suite 5 Schema Reference or mailMsgQuota in Sun Java Communications Suite 5 Schema Reference attributes in the user’s LDAP entry (see configutil Parameters in Sun Java System Messaging Server 6.3 Administration Reference for complete details). The following examples show how to set user quotas.

To specify the system default quota, do not add mailQuota to the LDAP entry, or set it to –2.

To set the quota to 1,000 messages set mailMsgQuota to 1000.

To set the quota to two megabytes set mailQuota to 2M or 2000000.

To set the quota to two gigabytes, set mailQuota to 2G or 2000000000 or 2000M.

To specify a 2 Gigabyte quota; a 20 Megabyte voice mail quota; and a 100 Megabyte quota for the Archive folder:

mailQuota: 2G;#voice%20M;Archive%100M

The two gigabyte quota represents all folders in the user's mailbox that are not explicitly assigned quotas. In this example, that excludes messages in the Archive folder, and messages of type voice. The 100 Megabyte quota includes messages in any folders within the Archive folder To Specify Domain Quotas

You can set disk space or message quotas for domains. These quotas are for the cumulative bytes or messages of all users in a particular domain. To set domain quotas, set the mailDomainDiskQuota in Sun Java Communications Suite 5 Schema Reference or mailDomainMsgQuota in Sun Java Communications Suite 5 Schema Reference attributes in the desired LDAP domain entry. .

To set the quota to 1,000 messages set mailDomainMsgQuota to 1000.

To set the quota to two megabytes set mailDomainDiskQuota to 2M or 2000000.

To set the quota to two gigabytes, set mailDomainDiskQuota to 2G or 2000000000 or 2000M.

ProcedureTo Setup Quota Notification

Quota notification is the process of sending users a warning message when they are getting close to their quota. Using this feature requires three steps.

  1. Enable Quota Notification

    Run the following at the command line:

    configutil -o store.quotanotification -v [ yes | no ]

    If the message is not set, no quota warning message is sent to the user.

  2. Define a Quota Warning Message

    The Warning Message is the message that will be sent to users who are close to exceeding their disk quota. To define a quota warning message at the command line:

    configutil -o store.quotaexceededmsg -v ’message

    The message must be in RFC 822 format. It must contain a header with at least a subject line, follow by $$, then the message body. ’$’ represents a new line. Depending on the shell that you are using, it might be necessary to append a \ before $ to escape the special meaning of $. ($ is often the escape character for the shell.) Example:

    configutil -o store.quotaexceededmsg -v ”Subject: WARNING: User quota exceeded$$User quota threshold exceeded - reduce space used.’

    In addition, there is support for the following variables:

    [ID] - userid

    [DISKUSAGE] - disk usage

    [NUMMSG] - number of messages

    [PERCENT] - store.quotawarn percentage

    [QUOTA] - mailquota attribute

    [MSGQUOTA] - mailmsgquota attribute

    Here’s an example, using these variables:

    configutil -o store.quotaexceededmsg -v ”Subject: Overquota Warning$$[ID],$$Your mailbox size has exceeded [PERCENT] of its alloted quota.$Disk Usage: [DISKUSAGE]$Number of Messages: [NUMMSG]$Mailquota: [QUOTA]$Message Quota: [MSGQUOTA]$$-Postmaster’

  3. Specify how often the warning message is sent.

    Set the following parameter:

    configutil -o store.quotaexceededmsginterval -v number

    where number indicates a number of days. For example, 3 would mean the message is sent every 3 days.

  4. Specify a Quota Threshold

    A quota threshold is a percentage of a quota that is exceeded before clients are sent a warning. When a user’s disk usage exceeds the specified threshold, the server sends a warning message to the user.

    Note –

    When email notifications are not triggered until the user’s disk usage exceeds 100% of the quota regardless of the threshold set with store.quotawarn.

    For IMAP users whose clients support the IMAP ALERT mechanism, the message is displayed on the user’s screen each time the user selects a mailbox and a message is also written to the IMAP log.

    To specify a quota threshold at the command line:

    configutil -o store.quotawarn -v number

    where number indicates a percentage of the allowed quota. To Enable or Disable Quota Enforcement

By default, users or domains can exceed their quotas with no effect except for receiving an over quota notification (if set). Quota enforcement locks the mailboxes from receiving further messages until the disk usage is reduced below the quota level.

To enable or disable quota enforcement:

configutil -o store.quotaenforcement -v [ on | off]

Note that over quota messages are saved in the MTA queues and a notification is sent to the sender stating that their messages was not delivered, but that a redelivery attempt will be made later. Delivery retries will continue until the grace period expires and all messages are sent back to the senders, or the disk usage falls below the quota and messages can be dequeued from the MTA and delivered to the message store. If you want to return messages that are over quota before they get to the message queues, use the following command line:

configutil -o -v on

To Enable Quota Enforcement at the Domain Level

To enforce quotas for a particular domain, use the command:

imquotacheck -f -d domain

To enable for all domains exclude the -d option. When a domain exceeds its quota, the maildomainstatus attribute is set to overquota, which halts all delivery to this domain. If a domain is not overquota, the value is set to active.

Disabling Quota Enforcement

If it appears that user quotas are being enforced, even when you have disabled them, check the following parameters:

These configutil parameters should be off or not set:

Note that when is on, it always treats store.quotaoverdraft as on, otherwise the user will never go over quota to trigger the rejection. Also, when store.quotaoverdraft is on, the user is allowed one message which is smaller than the quota only. That is, it will never accept a message that is greater than the user’s quota.

After making changes to these parameters, be sure to restart your messaging services.

These Message Store attributes should be active:

Note that messages will bounce if they are larger than the mailbox quota, regardless of quota enforcement configuration. To Set a Grace Period

The grace period specifies how long the mailbox can be over the quota (disk space or number of messages) before messages are bounced back to sender. The grace period is not how long the message is held in the message queue, it’s how long the mailbox is over quota before all incoming messages, including those in the message queue, are bounced. (see 20.1 Overview for more details.) The grace period starts when the user has reached the quota threshold and been warned. See To Setup Quota Notification.

To specify a quota grace period at the command line:

configutil -o store.quotagraceperiod -v number

where number indicates number of hours. Netscape Messaging Server Quota Compatibility Mode

After disk usage exceeded the quota in the Netscape Messaging Server, the server deferred or bounced message delivery, sent an over quota notification, and started the grace period. Messaging Server provides a parameter,, which retains this behavior.

When set to ON, messages are delivered until disk usage is over quota. At that time, messages are deferred (messages stay in the MTA message queue but are not delivered to the message store), an over quota warning message is sent to the user, and a grace period starts. The grace period determines how long a mailbox is overquota before the overquota messages bounce. (The default is that the quota warning messages are sent when the message store reaches the threshold.) The default for this parameter is Off.