Sun Java System Messaging Server 6 2005Q4 Administration Guide

Configuring Message Store Quotas

This section describes the following tasks:

ProcedureTo Specify a Default User Quota

A default quota that applies to users who do not have individual quotas set can be done by Console or command line.

Steps
  1. Click the Configuration tab and select Message Store in the left pane.

  2. Click the Quota tab.

  3. To specify a default user disk quota for the “Default user disk quota” field, select one of the following options:

    Unlimited. Select this option if you do not want to set a default disk quota.

    Size specification. Select this option if you want to restrict the default user disk quota to a specific size. In the field beside the button, type a number, and from the drop-down list, choose Kbytes or Mbytes.

  4. To specify a message number quota, in the “Default user message quota” box, type a number.

  5. Click Save.

  6. Set the Mbytes attribute to -1 in the user entries that use the default message store quota.

    Command Line

    To specify a default user quota at the command line:

    To specify a default user disk quota for total message size:

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

    where -1 indicates no quota 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 and number indicates the number of messages.

    Set the mailQuota attribute to -2 in the user entries that use the default message store quota. See Table 18–6.

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. (See Table 18–6.) To enforce the quota, set the configutil store.quotaenforcement to on.

To Specify Domain Quotas

You can set disk space quotas or message quotas for particular domains. These quotas are for the cumulative bytes or messages of all users in a particular domain. To set domain quotas, set the mailDomainDiskQuota or mailDomainMsgQuota attributes in the user’s LDAP entry (see Table 18–6) and run imquotacheck -f.

To Deploy 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 procedures:

ProcedureTo Enable Quota Notification

Quota notification can be enabled by Console or command line.

Steps
  1. Click the Quota tab.

  2. Check the “Enable quota notification” box. To disable quota notification, uncheck this box.

  3. Define the quota warning messages. See To Define a Quota Warning Message.

  4. Click Save.

    Command Line

    To enable or disable quota notification 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. See the next section for an example of quota warning message format.

ProcedureTo Define a Quota Warning Message

Define the message that will be sent to users who are close to exceeding their disk quota as follows. Messages are sent to the user’s mailbox.

Steps
  1. Click the Quota tab.

  2. From the drop-down list, choose the language you want to use.

  3. Type the message you want to send in the message text field below the drop-down list.

  4. Click Save.

    Command Line

    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’

    To define 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.

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

Steps
  1. Click the Quota tab.

  2. In the “Quota warning threshold” field, enter a number for the warning threshold.

    This number represents a percentage of the allowed quota. For example, if you specify 90%, the user is warned after using 90% of the allowed disk quota. The default is 90%. To turn off this feature, enter 100%.

  3. Click Save.

    Command Line

    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.

ProcedureTo Enable Quota Enforcement

Quota enforcement can be enabled at the Console or by command line.

Steps
  1. Click the Quota tab.

  2. Check the “Enable quota enforcement” box. To disable quota enforcement, uncheck this box.

  3. Click Save.

    Command Line

    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 store.overquotastatus -v on

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

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. Messages are accepted by the MTA, but remain in the MTA queue and are not delivered to the message store until one of the following occurs:

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.


Note –

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. The grace period starts when the user has reached the quota threshold. See To Specify a Quota Threshold and been warned.


ProcedureTo Set a Grace Period for Messages Held in the Queue

Steps
  1. Click the Quota tab.

  2. In the “Over quota grace period” field, enter a number.

  3. From the drop-down list, specify Day(s) or Hour(s).

  4. Click Save.

    Command Line

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