48 Managing Message Store Quotas

This chapter describes managing Oracle Communications Messaging Server message store quotas and the quota tasks.

For more information, see also "Monitoring the Message Store".

Message Store Quota Overview

Message store quotas limit or reduce message store usage. They enable you to set quotas for how much disk space or how many messages can be used by a user or domain. See "Managing Message Store Quotas" for information on how to use quotas in your system.

Quota Overview

Quotas can be set, in terms of number of messages or number of bytes or both, for specific users or domains. Quotas can also be set for specific folders and message types. For example, you can set different quotas based on whether a message is a voice mail or an email. Folder quotas set limits to the size of a user's folder in bytes or number of messages. For example, a quota can be set on the Trash folder. Messaging Server enables you to set default quotas for domains and users as well as customized quotas.

You can also configure how the system responds to users or domains that are either over quota or approaching the quota. 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 can either remain in the MTA queue until one of the following occurs or be rejected by my the MTA immediately, if local.store.overquotastatus is enabled:

  • 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 "To Set a Grace Period" for more information.

  • 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 the discussion on setting notification message delivery intervals in Messaging Server Reference).

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 "Message Store Message Expiration" for more information.

Exceptions for Telephony Application Servers

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 useful to telephony applications. For more information about configuring a TAS channel, contact your Oracle 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. One quota can be set for email and another can be set for voice mail.

Quota Theory of Operations

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 msconfig options or by using the "imquotacheck" command.

To determine if a user is over quota, Messaging Server first determines 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 msconfig options 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" that updates the changes immediately.

The "imquotacheck" utility enables you to check message store usage against assigned quotas.

Methods of Notification

If store.quotanotification is enabled, when users approach or exceed their quota limit (depending on store.quotawarn), the message defined by store.quotaexceededmsg notifies them immediately. Otherwise, you must run imquotacheck -n to notify the users. Dynamic user notification by enabling store.quotanotification and running imquotacheck -n are mutually exclusive. If store.quotanotification is enabled, you should not use imquotacheck -n. The preferred method is dynamic notification.

Domain level quota enforcement and reporting is done by running imquotacheck -f.

For more information on imquotacheck options, see Table 64-14, "imquotacheck Options".

Message Store Quota Attributes and Options

This section lists the major the message store quota attributes and msconfig options. The intention is to provide you with an overview of the functionality interface. For detailed information on these attributes and options, refer to the appropriate reference documentation.

Table 48-1 lists the quota attributes. Refer to Schema Reference for more information about the following attributes.

Table 48-1 Message Store Quota Attributes

Attribute Description

mailQuota

Bytes of disk space allowed for the user's mailbox.

mailMsgQuota

Maximum number of messages permitted for a user. This is a cumulative count for all folders in the store.

mailUserStatus

Status of the mail user. Some of the possible values are active, inactive, deleted, hold, and overquota.

mailDomainDiskQuota

Bytes of disk space allowed for the cumulative count of all the mailboxes in a domain.

mailDomainMsgQuota

Maximum number of messages permitted for a domain, that is, the total count for all mailboxes in the store.

mailDomainStatus

Status of the mail domain. Values and default are the same as mailUserStatus.


To have the preceding attributes take effect, run "iminitquota" to make quota and usage up-to-date. The changes would take effect without running this, but not immediately, as information is stored in caches and it takes a little time before the changes take effect.

Table 48-2 lists the quota options. Refer to "Overview of Messaging Server Unified Configuration" for the latest and most detailed information.

Table 48-2 Message Store msconfig Options

Option Description

store.quotaenforcement

Enable quota enforcement When off, the quota database is still updated, but messages are always delivered. Default: 1 (bool).

store.quotanotification

Enable quota notification. Default: 0 (bool).

store.defaultmailboxquota

Store default quota by number of bytes. Default: "-1" (string) (unlimited).

store.defaultmessagequota

Store default quota by number of messages. Numeric. Default: "-1" (string) (unlimited).

store.quotaexceededmsg

Message to be sent to user when quota exceeds store.quotawarn. If none, notification is not sent. Default: No default (non-empty string).

The message must contain a header (with at least a subject line), followed by $$, then the message body. The $ represents a new line. 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.

store.quotaexceededmsginterval

Interval, in days, for sending overquota notification. Default: 7 (int32).

store.quotagraceperiod

Time, in hours, a mailbox has been overquota before messages to the mailbox will bounce back to the sender. Number of hours. Default: 120 (uint32).

store.quotawarn

Quota warning threshold. Percentage of quota exceeded before clients are sent an over quota warning. Default: 90 (int32).

store.quotaoverdraft

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: 0 (bool), but is treated as on if store.overquotastatus is set, otherwise the user can never go over quota and the overquotastatus is never used.

store.overquotastatus

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 are accepted by the MTA. Default: 0 (bool).


To have the preceding msconfig options take effect, restart Messaging Server.

The "imquotacheck" utility enables you to check message store usage against assigned quotas.

Also see "iminitquota" to update the information in the quota database if a user's quota-related LDAP attributes (or the system defaults) have been changed recently and the changes have not yet been propagated automatically to the quota database.

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 the following steps:

  1. Specifying a user default quota

  2. Specifying which users are bound to the default quota

The following examples show how to set default user quotas. Refer to Messaging Server Reference for detailed option information.

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

    msconfig set store.defaultmailboxquota [ -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:

    msconfig set store.defaultmessagequota [ -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 mailQuota is 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 or mailMsgQuota attributes in the user's LDAP entry. For more information on the previous attributes, see Schema Reference.

In addition, configuration options of the form store.quota* can be used to implement more finely grained quota policies. See Messaging Server Reference. 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.

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

The following LDAP entry specifies 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.

Refer to the Schema Reference for more information about mailQuota values. Also see "Managing Message Types in the Message Store".

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 specify domain quotas, set the mailDomainDiskQuota or mailDomainMsgQuota attributes in the desired LDAP domain entry. For more information about the previous attributes see Schema Reference.

  • 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.

To Set Up Quota Notification

Quota notification is the process of sending users a warning message when they are getting close to their quota.

  1. To enable quota notification, run the following command:

    msconfig set store.quotanotification 1
    

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

  2. To define a quota warning message, run the following command:

    msconfig set store.quotaexceededmsg 'message'
    

    For example:

    msconfig set store.quotaexceededmsg 'Subject: WARNING: User quota exceeded$$User quota threshold exceeded - reduce space used.'
    

    The Warning Message is the message that is sent to users who are close to exceeding their disk quota. The warning message must:

    • Be in RFC 822 format

    • Contain a header with at least a subject line, followed by $$, then the message body

    • Use "$" to represent 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.) You can also use the following variables in the message:

    • [ID] - userid

    • [DISKUSAGE] - disk usage

    • [NUMMSG] - number of messages

    • [PERCENT] - store.quotawarn percentage

    • [QUOTA] - mailquota attribute

    • [MSGQUOTA] - mailmsgquota attribute The following example shows a warning message that uses these variables:

      msconfig set store.quotaexceededmsg 'Subject: Overquota Warning$$[ID],$$Your mailbox size has exceeded [PERCENT] of its allotted quota.$Disk Usage: [DISKUSAGE]$Number of Messages: [NUMMSG]$Mailquota: [QUOTA]$Message Quota: [MSGQUOTA]$$-Postmaster'
      
  3. To specify how often the warning message is sent, run the following command:

    msconfig set store.quotaexceededmsginterval number
    

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

  4. To specify a quota threshold, run the following command:

    msconfig set store.quotawarn number
    

    where number indicates a percentage of the allowed quota. 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 the store.quotaoverdraft is enabled, email notifications are not triggered until the user's disk usage exceeds 100 percent 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 Disable Quota Notification

  • To disable quota notification, run the following command:

    msconfig set store.quotanotification 0
    

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 Quota Enforcement at the User level

  • To enable quota enforcement at the user level, run the following command:

    msconfig set store.quotaenforcement 1
    

    The MTA saves over-quota messages in its queues and notifies users that their messages were not delivered but that a redelivery attempt is to be made later. Delivery retries continue until either 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:

    msconfig set store.overquotastatus 1
    

To Perform Quota Enforcement at the Domain Level

Unlike user-level quotas, domain-level quotas are not maintained dynamically.

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

    imquotacheck -f -d domain
    

    To enforce quotas for all domains, exclude the -d option.

When imquotacheck -f finds a domain with maildomainstatus=active that has exceeded its quota, the maildomainstatus attribute is set to overquota, which halts all delivery to this domain. When imquotacheck -f is run again and the domain is back under quota, 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 that the following options are disabled or not set:

  • store.quotaenforcement

  • store.overquotastatus

  • store.quotaoverdraft

When store.overquotastatus is enabled (set to 1), it always treats store.quotaoverdraft as enabled, otherwise users never go over quota to trigger the rejection. Also, when store.quotaoverdraft is enabled, users are allowed one message that is smaller than the quota only. That is, it never accepts a message that is greater than the user's quota.

After changing these options, restart Messaging Server.

These Message Store attributes should be active:

  • maildomainstatus

  • mailuserstatus

Messages 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 "Message Store Quota Overview" for more details.) The grace period starts when the user has reached the quota threshold and been warned. See "To Set Up Quota Notification" for more information.

  • To specify a quota grace period at the command line:

    msconfig set store.quotagraceperiod 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 an option, store.quotaoverdraft, which retains this behavior.

When store.quotaoverdraft is enabled (set to 1), 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 option is disabled (set to 0).