With the explosion of email and voice mail, IMAP mailboxes can grow very large. Message store quotas limit, or quota, for how much disk space or how many messages can be held by a user or domain, are in a specific folder, or are of a specific message type. Quotas are used to limit or reduce message store usage. This section contains information about the following:
For further information, see 20.11.4 To Monitor Quota Limits
Quotas can be set for specific users or domains and can be set in terms of number of messages or number of bytes. It can also be set for specific folders and message types. Message type quotas allow you to specify limits for message type. For example, voice mail and email. Folder quotas set limits to the size of a user's folder in bytes or messages. For example, a quota can be set on the Trash folder. Messaging Server allows you to set default quotas for domains and users as well as customized quotas.
Once a quota is set, how the system responds to users or domains that are either over quota or approaching the quota is also configurable. One response is to send users an over quota notification. Another response is to halt delivery of messages into the message store when quota is exceeded. This is called quota enforcement and usually occurs after a specified grace period. A grace period is how long the mailbox can be over the quota before enforcement occurs. If message delivery is halted due to over quota, incoming messages remain in the MTA queue until one of the following occurs:
The size or number of the user’s messages no longer exceeds the quota, at which time the MTA delivers the messages.
The undelivered message remains in the MTA queue longer than the specified grace period, at which time messages are returned to sender. (See 184.108.40.206 To Set a Grace Period).
The message has remained in the message queue longer than the maximum message queue time. This is controlled by the notices MTA channel keyword (see 10.10.4.3 To Set Notification Message Delivery Intervals).
For example, if your grace period is set for two days, and you exceed quota for one day, new messages continue to be received and held in the message queue, and delivery attempts continue. After the second day, the messages bounce back to the sender.
Disk space becomes available when a user deletes and expunges messages or when the server deletes messages according to expiration policies established (see 20.9 To Set the Automatic Message Removal (Expire and Purge) Feature).
To support unified messaging requirements, Messaging Server provides the ability to override quota limitations imposed by the message store. This guarantees the delivery of messages that have been accepted by certain agents, namely telephony application servers (TAS). Messages accepted by a TAS can be routed through a special MTA channel that ensures the message is delivered to the store regardless of quota limits. This is a fairly esoteric usage, but can be used to telephony applications. For more information about configuring an TAS channel, contact your Sun messaging representative.
Quota by message type is useful for telephony applications that use unified messaging. For example, if a mix of messages, say text and voice mail, is stored in a user's mailbox, then the administrator can set different quotas for different types of messages. The user's email can have one quota, and their voice mail can have a different quota.
Customized user and domain quotas are specified by adding quota attributes to LDAP user and domain entries. Quota defaults, notification policy, enforcement, and grace period are specified in configutil parameters or by using the imquotacheck utility.
To determine if a user is over quota, Messaging Server first checks to see if a quota has been set for the individual user. If no quota has been set, Messaging Server looks at the default quota set for all users. For a user, the quota is for all the cumulative bytes or messages in all of the user's folders. For a domain, the quota is for all the cumulative bytes or messages of all the users in a particular domain. For a message type, the quota is for all the cumulative bytes or messages for that message type. For a folder, the quota is for all the cumulative bytes or messages for user's folder.
You can specify the following quota values for a user's mailbox tree:
Quota values for specific folders in the user's mailbox.
Quota values for specific message types such as voice mail or text messages. (A message type quota applies to messages of that type in all folders in the user's mailbox.)
A default quota value that applies to all folders and message types in the user's mailbox that are not explicitly assigned quotas.
The following guidelines apply when you assign multiple quota values for a user:
Quotas do not overlap. For example, when there is a quota for a particular message type or folder, messages of that type or messages in that folder are not counted toward the default quota. Each message counts toward one and only one quota.
The total quota for the whole user mailbox equals the sum of the values of all the quotas specified by default, type, and folder.
Message type quotas take precedence over folder quotas. For example, suppose one quota is specified for a user's memos folder and another quota is specified for voice messages. Now suppose the user stores eight voice messages in the memos folder. The eight messages are counted toward the voice mail quota and excluded from the memos folder quota.
Changes made to the quota attributes and configutil parameters will take effect automatically, but not immediately as information is stored in caches and it may take a little time before the changes fully take effect. Messaging Server provides a command, iminitquota in Sun Java System Messaging Server 6.3 Administration Reference that updates the changed immediately.
The imquotacheck utility allows you to check message store usage against assigned quotas.
This section lists the major the message store quota attributes and configutil parameters. The intention is to provide you with an overview of the functionality interface. For detailed information on these attributes and parameters, refer to the appropriate reference documentation.
The following table lists the quota attributes. Refer to the Sun Java Communications Suite 5 Schema ReferenceTable 20–6 Message Store Quota Attributes
Bytes of disk space allowed for the user’s mailbox.
Maximum number of messages permitted for a user. This is a cumulative count for all folders in the store.
Status of the mail user. Some of the possible values are active, inactive, deleted, hold, and overquota.
Bytes of disk space allowed for the cumulative count of all the mailboxes in a domain.
Maximum number of messages permitted for a domain, that is, the total count for all mailboxes in the store.
Status of the mail domain. Values and default are the same as mailUserStatus.
The following table lists the quota parameters. Refer to the Chapter 3, Messaging Server Configuration, in Sun Java System Messaging Server 6.3 Administration Reference for the latest and most detailed information.Table 20–7 Message Store configutil parameters
Enable quota enforcement When off, the quota database is still updated, but messages are always delivered. Default: On
Enable quota notification. Default: OFF
Store default quota by number of bytes. Default: -1 (unlimited)
Store default quota by number of messages. Numeric. Default: -1 (unlimited)
Quota warning message. If none, notification is not sent. Default: None.
Interval, in days, for sending overquota notification. Default: 7
Time, in hours, a mailbox has been overquota before messages to the mailbox will bounce back to the sender. Number of hours. Default: 120
Quota warning threshold. Percentage of quota exceeded before clients are sent an over quota warning. Default: 90
Used to provide compatibility with systems that migrated from the Netscape Messaging Server. When ON, allow delivery of one message that puts disk usage over quota. After the user is over quota, messages are deferred or bounced, the quota warning message is sent, and the quota grace period timer starts. (The default is that the quota warning messages are sent when the message store reaches the threshold.) Default: Off, but is treated as on if local.store.overquotastatus is set, otherwise the user can never go over quota and the overquotastatus is never used.
Enable quota enforcement before messages are enqueued in the MTA. This prevents the MTA queues from filling up. When set, and a user is not yet over quota, but an incoming message pushes the user over quota, then the message is delivered, but the mailuserstatus LDAP attribute is set to overquota so no more messages will be accepted by the MTA. Default: off
Message store quota also includes a couple of utilities. iminitquota in Sun Java System Messaging Server 6.3 Administration Reference initializes quota settings. In other words, quota attributes and configutil parameters will take effect automatically after running this command. The changes would take effect without running this, but not immediately, as information is stored in caches and it will take a little time before the changes take effect.
The imquotacheck utility allows you to check message store usage against assigned quotas.
This section describes the following tasks:
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:
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.
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:
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
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.
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.
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.
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’
Specify how often the warning message is sent.
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.
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.
When local.store.quotaoverdraft=on 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.
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 local.store.overquotastatus -v on
To Enable Quota Enforcement at the Domain Level
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
These configutil parameters should be off or not set:
Note that when local.store.overquotastatus 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.
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.
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, local.store.quotaoverdraft, 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.