由于公司内部使用Lotus Notes OA邮件,员工都很少主动去删除多余的邮件并备份至本地。导致系统备份及运行的压力,下面方法可在限制发送收发邮件的基础上让员工主动性的做好邮件的删除与本地备份 。
以下方法适用于Domino/Notes 4.5x,4.6x。

在Domino/Notes使用过程中,如果用户邮箱过大,管理员能在邮箱模板中的“memo”表单的Queryopen事件中加以下代码,限制用户邮箱过大。(其中32000000表示邮箱限额为32M),我把公司内限额为32M,可根据需要调整。
有时某些nsf打不开,是用户使用中,可以先关闭OA服务进程后再进行修改。若有部分的nsf模板修改后还是无法保存,可在一段时间后再编辑。
 
代码如下:
 
Sub Queryopen(Source As Notesuidocument,Mode As Integer,Isnewdoc As Variant, Continue As Variant)
Set cMemoObject = New UIMemoDocument        
Call cMemoObject.Init(Source,Isnewdoc)
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim size As Double
Dim Quota As Double
size = db.size
If size > 32000000 Then 'bytes
  
   Msgbox "您的信箱已太大,请先删除部分信件后再压缩信箱,完成后,即可收发信件。"
   Continue = False
   Exit Sub   
End If
End Sub

未限额前代码为:
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
Set cMemoObject = New UIMemoDocument        
Call cMemoObject.Init(Source,Isnewdoc)
End Sub