Enforcing quotas on new mail or Calendar entry creation in local or server based mail files

Technote (FAQ)


Question

If a quota is set on a Lotus Domino server replica, the quota is not enforced in a local replica. There is no quota warning when users attempt to create a new mail message or calendar invitation. Customers have asked for a way to enforce quotas when creating a document in a mail file or when working in a local replica.

Answer

An optional new feature has been added to Lotus Notes releases 6.5.6, 7.0.2, and 8.0, that enables warning messages to appear and prevent users from creating memos or Calendar entries in their mail file locally or on a server. This document outlines how quotas function, and includes a description of the new feature and how to enable it. Note: In order for the functionality to work as designed, not only must the noted Notes client release be used, but the mail file must be based on a mail template that contains the updated design logic.

Quota Overview

To properly understand the new feature it is important to do a brief overview of all the Notes Quota features.

  • Database Quotas - Database quotas are enabled via the Lotus Domino Administrator client, can be applied to any Notes database (.NSF), and are enforced by the client upon saving a document (any document, not just a mail message).
  • Database Quotas are checked/enforced only when a document is being saved - To minimize performance impact and to accurately compare the size of the current document against the quota limit, the quota check is performed on a document save only. Performing the check upon document creation and save would double server transactions, have an adverse effect on performance, and would not take into account the size of the new document being created.
  • Mail Quotas - Mail quotas are enabled at the router level (via the Server Configuration document). Mail quotas require database quotas to be set. The Mail Quota feature enforces the quota on mail delivery based on the options selected by the Administrator. For example, an administrator can choose to have mail delivered even if over quota (basically ignore the quota), have mail be returned to sender, or have mail held in mail.box until the destination mail file is cleaned up.
  • Database Quotas are not replicated - Database quota information is not replicated either locally or between servers. In practical terms this means database quotas are enforced only on the server (for any database) and on the home mail server (for mail files).
  • New Quota feature in Mail Template and New Mail Notification code - A new feature added to 6.5.6, 7.0.2, and 8.0, is an optional quota check that occurs upon creation of a mail message or Calendar entry. This feature relies on a locally cached quota value that will prevent a user from creating a mail message or Calendar entry if the user's mail file is over quota. The Notes client retrieves and caches the mail file quota every time it checks for new mail. Caching the quota limits the performance impact on the server. If a user is over quota, they can clean up their mail file then run an action to force a real-time quota check. This new feature is implemented via changes to the Mailn.ntf template and the core Notes client New Mail Notification code. It can be enabled by setting several notes.ini values on the client. These values can be pushed down to desktops via the desktop policy feature which requires editing of the desktop policy form via Lotus® Domino Designer®. For more information on how to modify the desktop policy to add these INI values, please refer to the technote, "The desktop policy in the Domino Directory can be designed to set notes.ini and Location parameters" (#1196837). An example is also provided further down in this document.

Enabling the Feature

1. Enable new mail notification on the Notes client by selecting File> Preferences> User Preferences > Mail > "Check for New Mail every x Minutes".
2. On the Notes client, open the notes.ini file in a text editor, and add/set the parameters: Check_Quota_On_Mail_Create=1 and $Reactivate_Mail_Quota=1

Enabling new mail notification can be accomplished via a desktop policy. Setting the notes.ini can be accomplished through a policy, but the form needs to be modified.

INI Parameter Description
Check_Quota_On_Mail_Create=1 Required to enable feature. Enables the template code to generate quota warning and over quota dialogs on new document creation
$Reactivate_Mail_Quota=1 Optional, but allows for on-demand refresh of current quota limits. Displays the "Reactivate Mail Send Functions" in the Actions > Tools menu when in the Inbox folder or All Documents view (or any folder created from Inbox or All Documents)
Delegated_Mail_FileX

Example:
DELEGATED_MAIL_FILE1=tom jones_mh2/mwh6/us!!mail\tjones.nsf_5/13/2005
Automatically set for delegation scenarios. Used when Mail or Calendar Managers have access to a Principle's mail file. This variable will be automatically written to the notes.ini, where X is a number from 1 to 10. If there are more than 10, then the code will overwrite the oldest entry in the notes.ini. Or, if some/all entries have the same date, it will overwrite the first entry it finds that match the date.
CheckQuotaWhenLessThan80=number of minutes
CheckQuotaWhenLessThan90=number of minutes
CheckQuotaWhenLessThan100=number of minutes

Default: 120, 60, and 10 minutes, respectively. For testing purposes, it is useful to set them all to 1. The check is tied to the NewMailNotification preference, so make sure that is set to a low enough value for testing as well.
Optional. If you want to adjust the Check Quota polling frequency beyond the defaults. Once this owner's db size and quota values are set in the INI, these values drive the frequency of subsequent polling. The code will re-check every:

120 minutes if the owner's mail file size is less than or equal to 80% of their quota.
60 minutes if the owner's mail file size is greater than 80% of their quota, but less than or equal to 90% of their quota.
10 minutes if the owner's mail file size is greater than 90% of their quota.

These thresholds are tunable via these INI parameters
REPL_OBEYS_QUOTAS=1 Required This client-side feature works only if you set REPL_OBEYS_QUOTAS=1 in the client's notes.ini file.

The INI's are pushed down to the desktop using the following method:

How to Create the custom INI in the Domino Directory for Pushing down via Policy:
1. Customize the Domino Directory PolicyDesktop form to incorporate the above INI's.
2. Each INI must have a field whose name begins with "$Pref" followed by the name of the parameter. For example: $PrefCheck_Quota_On_Mail_Create
3. The field must be defined as Text which is Editable.
4. An Administrator populates the field by composing a PolicyDesktop document and entering the value to be pushed down to the client.
5. The Administrator assigns the policy explicitly to end users or by organization.

How it works:
1. The quota is cached from the server as part of the new mail polling background process. New mail polling occurs on an interval defined in User Preferences:


    Because the database size/quota checking code occurs during new mail polling, this same interval defines the most frequent interval that we might also check the mail database size and quota information. As you will see in #3b below, database size/quota check may be deferred until a later polling time for efficiency.

2. The 'MailServer' field in the current Location document defines the server to poll for the mail file size and quota information, except for the 'delegate' case described below. The 'MailFile' field in the same Location document defines the file path of the .NSF to be polled.

3. We read the values for database size and quota that were previously stored in the INI, and use them to help decide whether we should poll this database now, or at a later date. This decision is based on the last poll timestamp and whether the database is nearing its quota. See #3b for details.
    a. If the INI values specific to the mail database currently being checked have no database size or quota information, or the parameters simply do not exist, that data will be obtained immediately. This will override any calculation in #3b, below.
    b. Once this owner's database size and quota values are set in the INI, these values drive the frequency of subsequent polling. The code will re-check every:
      • 120 minutes, if the owner's mail file size is less than or equal to 80% of their quota.
      • 60 minutes, if the owner's mail file size is greater than 80% of their quota, but less than or equal to 90% of their quota.
      • 10 minutes, if the owner's mail file size is greater than 90% of their quota.
      These three thresholds are tunable via these INI parameters:
      CheckQuotaWhenLessThan80=<minutes>
      CheckQuotaWhenLessThan90=<minutes>
      CheckQuotaWhenLessThan100=<minutes>

4. The new mail notification task is used to obtain the database size and quota information. This task passes back the effective size of the database, and therefore takes into consideration any deletions that might bring the server mail file back below quota. Compaction of that mail file should not be necessary to realize space freed up by deletions.
    Using the database size and quota information returned from the new mail notification task, three strings will be built. These strings are designated in Kilobytes (KB):
    Betty Quark/Nine_LastMailDbSize=45043
    Betty Quark/Nine_LastMailDbWarningQuota=25600
    Betty Quark/Nine_LastMailDbMaxQuota=30720
    These strings will be saved back to the INI for usage by the template, when deciding if the user should be allowed to create a mail document.

Delegation
The entire file size/quota checking process outlined above operates within a loop. The first iteration of that loop checks for the mail file of the person sitting in front of the computer. The second and subsequent iterations check mail files for which this person has delegate access (and has opened using the 7.0 mail template).

If the user manages another person's calendar, the template code will store an INI parameter called Delegated_Mail_Filex=<other persons mail file> that points to that principal's mail file. The syntax of the parameter is:

DELEGATED_MAIL_FILEx=mail file owner_server!!mail file path

For example:
DELEGATED_MAIL_FILE1=Betty Quark/Nine_Quark/Nine!!mail\brquark.nsf

...where x can be 1 - 50. So if the user is a delegate of 8 people's mail files, you will see DELEGATED_MAIL_FILE1=...DELEGATED_MAIL_FILE8= in this person's notes.ini.


Text of Default Dialog Boxes:

Default Database Quota Warning Message:

    "Database Quota Warning Message
    Your mail file is approaching the size limit specified by your administrator. If it reaches the limit, you will not be able to create new messages. You should reduce the size of your mail database on the server by deleting or archiving messages. (You can also try compacting the database, Choose File - Database Properties from the menu, and click Compact on the Information tab.)

    Your Database Quota Limit Size is: 46080KB
    Your Database Quota Warning Size is: 25600KB
    Database Size is: 42068KB"


Default Database Size Exceeds Quota Limit Message:
    "Mail Database Size Exceeds Quota Limit
    Your mail file has reached or exceeded the size limit specified by your administrator. You can continue to send and receive mail, but you will not be able to create new messages until you reduce the size of your mail database on the server by deleting or archiving messages. (You can also try compacting the database, Choose File - Database Properties from the menu, and click Compact on the Information tab.)

    Your Database Quota Limit Size is: 35840KB
    Your Database Quota Warning Size is: 426068KB


Default Database Warning Message for Calendar Entries:
    "Database Quota Warning Message
    Your mail file is approaching the size limit specified by your administrator. If it reaches the limit, you will not be able to create any new calendar entries until you should reduce the size of your mail file on the server by deleting or archiving messages. Your mail file has exceeded the size limit specified by your administrator. (You can also try compacting the database, Choose File - Database Properties from the menu, and click Compact on the Information tab.)

    Your Database Quota Limit Size is: 46080KB
    Your Database Quota Warning Size is: 25600KB
    Your Database Size is: 42068KB"

Default Database Size Exceeds Quota Limit Message for Calendar Entries:
    "Mail Database Size Exceeds Quota Limit
    You will not be able to create any new calendar entries until you reduce the size of your mail file on the server by deleting or archiving messages. Your mail file has exceeded the size limit specified by your administrator. (You can also try compacting the database, Choose File - Database Properties from the menu, and click Compact on the Information tab.)

    Your Database Quota Limit Size is: 32768KB
    Your Database Size is: 42068KB"


Reactivate Mail Send Functions - Do you want to run?:
    "Database Quotas
    Do you want to run the reactivate agent now?"


Reactivate Mail Send Functions - Run completed:

    "Database Quotas
    The reactivate agent has successfully completed. To start sending mail, you need to restart the Notes Client."



Some of the above dialog boxes are customizable by setting the following INI variables:

Over Quota Message INI: QUOTA_OVER_MSG=<msg txt>
Over Quota Warning Message INI: QUOTA_WARNING_MSG=<msg txt>
Over Quota Message Title INI: QUOTA_OVER_TITLE=<title txt>
Over Quota Warning Message Title INI: QUOTA_WARNING_TITLE=<title txt>

The following are message and warning text for C&S only:

Over Quota Message INI: CS_QUOTA_OVER_MSG=<msg txt>
Over Quota Warning Message INI: CS_QUOTA_WARNING_MSG=<msg txt>

Related information

The desktop policy in the Domino Directory can be desig


    Cross Reference information
    Segment Product Component Platform Version Edition
    Messaging Applications Lotus Domino Lotus Domino Server 7.0.2

Rate this page:

(0 users)Average rating

Document information


More support for:

IBM Notes
Mail

Software version:

6.5, 7.0, 8.0, 8.5

Operating system(s):

Linux, Mac OS, Windows

Software edition:

All Editions

Reference #:

1247798

Modified date:

2011-08-03

Translate my page

Machine Translation

Content navigation