Hardlimit Property

Hardlimit Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The Hardlimit property specifies the maximum mailbox size, in kilobytes (KB), over which sending and receiving mail is disabled.

Applies To

IMailBoxStore Interface

Type Library

Microsoft CDO for Exchange Management Library

DLL Implemented In

CDOEXM.DLL

Syntax

[Visual Basic]Property Hardlimit As Long

[C++]HRESULT get_Hardlimit(longpVal);
HRESULT put_Hardlimit(long Val);

Parameters

  • pVal
    Returns the value of the Hardlimit property as a reference to a long.
  • Val
    Sets the value of the Hardlimit property to the value of the long.

Remarks

The store quota values are set in the IMailboxStoreDB Interface.

The HardLimit property works with the other mailbox quota limits. In normal operation the limits are reached in the following order as the mailbox fills up.

  1. StoreQuota Property is reached first, and specifies the mailbox size when the mailbox owner will be warned they are about to reach one of the more restrictive limits. The mailbox can send and receive messages normally.
  2. OverQuotaLimit Property specifies the next higher quota limit. When the mailbox size is larger than this property, the user will not be allowed to send any messages until they have reduced the size of their mailbox. The mailbox can still receive messages, however.
  3. HardLimit property specifies the maximum allowed size of the mailbox. When a mailbox reaches this size, no messages can be send or received by the mailbox until its size has been reduced below the HardLimit property.

After one of the limits has been exceeded, e-mail messages or other stored information must be removed from the mailbox until the size is below the quota value. Depending on mailbox replication times, backup-before-delete settings, data retention policies and other settings, there may be some delay between when a user marks an item for deletion and when the space is actually available to the mailbox.

For more information, see the following properties:

EnableStoreDefaults Property

OverQuotaLimit Property

StoreQuota Property

Example

The following example illustrates the Hardlimit property using CDO for Exchange Management (CDOEXM).

[Visual Basic]

Sub Set_Limits(DCServer As String, _ DomainName As String, _ recipname As String)

'DCServer is something like "DCServer6"
'DomainName is something like "DC=MYDOMAIN3,DC=example,DC=com"
'recipname is something like "jamessmith"

Dim objPerson As New CDO.Person
Dim objMailbox As CDOEXM.IMailboxStore

'assumes users are in users container, and not an OU
objPerson.DataSource.Open "LDAP://" + DCServer + _
                            "/CN=" + recipname + _
                            ",CN=users," + DomainName

Set objMailbox = objPerson

'check if the user is mailbox enabled
If objMailbox.HomeMDB = "" Then
   MsgBox "No Mailbox found."
Else
   ' Maximum allowed size = 1024 KB x 10 = 10MB
   objMailbox.HardLimit = 10240
   ' Prevent Sending at 9.5 x 1024 KB = 9.5MB
   objMailbox.OverQuotaLimit = 9728
   ' Send warning at 9.0 x 1024 KB = 9MB
   objMailbox.StoreQuota = 9216
   objPerson.DataSource.Save
   MsgBox "Mailbox limits for " + recipname + " set successfully"
End If

End Sub

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

This topic last updated: December 2003

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.