| Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
A common store policy is to limit the amount of disk space allocated for each mailbox. The IMailboxStore::StoreQuota property specifies the maximum size of the mailbox, in Kbytes. Once the user reaches this limit, they get a warning message every time they send a message. If you don't care how much space the user consumes, let this property retain its default value, -1.
If you do set StoreQuota, you might also set the IMailboxStore::OverQuotaLimit property. This property specifies the number of Kbytes over the StoreQuota limit that the user can go before they are restricted from sending mail. This is a "gentle reminder" that they need to clear up some space in their mailbox.
Finally, set the IMailboxStore::HardLimit property to the number of Kbytes over the StoreQuota limit that the user can go before they are restricted from sending or receiving mail. This is a "final notice" that they need to clear up some space in their mailbox.
This example limits jamessmith to 10MB, with a 2MB soft limit and an additional 1MB hard limit. He gets 13MB before losing mail privileges.
Sub Set_Limits(ServerName As String, _
DomainName As String, _
recipname As String)
'ServerName is something like "MyServer6"
'DomainName is something like "DC=MYDOMAIN3,DC=microsoft,DC=com"
'recipname is something like "jamessmith"
Dim objPerson As New CDO.Person
Dim objMailbox As CDOEXM.IMailboxStore
objPerson.DataSource.Open "LDAP://" + ServerName + _
"/CN=" + recipname + _
",CN=users," + DomainName
Set objMailbox = objPerson
If objMailbox.HomeMDB = "" Then
MsgBox "No Mailbox found."
Else
objMailbox.StoreQuota = 10
objMailbox.OverQuotaLimit = 2
objMailbox.HardLimit = 1
objPerson.DataSource.Save
MsgBox "Mailbox limits for " + recipname + " set successfully"
End If
End Sub