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.