Lotus Notes FAQ Visit Our Sponsor!


How do you limit the size of users' mail boxes?

Notes 4.x has Database Quotas that you can apply to a database; you can access these under the Database Tools of the Server Administration menu.

If you would like to warn users more directly, you can put this in the mail templates's Database Script PostOpen event:

Sub PostOpen(Source as Notesuidatabase)
     Dim db As NotesDatabase
     Dim MaxSize As Double, CurrSize As Double
     Set db=source.Database
     Maxsize = 20     'Megabytes
     CurrSize = Round( db.Size/1000000, 2)
     If CurrSize > MaxSize Then
       MsgBox "Your mail database exceeds the corporate " _
       & "maximum size of " & MaxSize & " Mb. Your mail " _
       & "database is " & CurrSize & " Mb and contains " _
       & db.AllDocuments.Count & " documents.  Please " _
       & "remove or archive old messages. If you " _
       & "require assistance, please contact IS.", 0, _
       "Mail Database Needs Archiving"
     End If
End Sub


Other techniques suggested by ThomasMcA@usa.net:
1) Add a hidden field to the mail template with a validation formula that stops them from sending an attachment to our All Users group (it stops ANY attachment, no matter how small or big).
2) Create a DeleteAttachments button in the Inbox & All Docs views that *deletes* the attachments in any selected doc. This lets them keep the doc itself, but remove the large attachments.
3) Create a Size column [ @Round(@Sum(@DocLength )/1024) ] in the above views that lists the size of each document. It really helps for the users to see the size of every doc w/ attachments (Wow, it's THAT big?!?!?!? :-)
4) Create an agent that loops through all of the mail files, checks the size, and sends users and admins an e-mail that says it's too big. The agent is signed by the server, so it looks like it came from the server, not from me.
5) Add code to the Initialize event for the mail template that also checks the size of the db, and pops up a messagebox that says "you have exceeded XX megabytes". Have it pause for 10 seconds for every 5 meg. It displays a message for 25 meg, pauses 10 secs, displays another for 30 meg, pauses, etc. so the delay is proportional to how much the user abuses the mail limits.


Applies to Notes Versions: 4.5 4.6 5
Last Modified: November 14, 1999
Home *Notes R3 *Notes R4 *Notes/Domino 4.5 *Notes/Domino 4.6 *Notes/Domino R5