您好,欢迎来到五一七教育网。
搜索
您的当前位置:首页Domino附件大小设置

Domino附件大小设置

来源:五一七教育网
.

Domino 技巧: 如何附件大小

大家应该知道,现在的免费(或收费)邮箱,一般都有附件大小的功能,当某些附件超过一定容量后,就不能发送,其实Domino Server也有同样的功能,而且设置非常简单。

首先,我们合用Domino Administrator打开我们的Domino Server,选中在最右边的Configuration Tab,选中Server -> Configuration ,选择编辑当前服务器的Configuration Document.

在Configuration Document 中的Router / SMTP -> Restriction and Controls -> Restriction中有一这可以设置 Maximum message size,只需要在这里指定允许的最大附件容量即可。

建议不要将附件容量设的太大,不然用户的邮箱可能会很快的增肥.

此方法在Domino R5 & R6下试验通过,设置完成后,需要重新启动Domino Server,或直接使用更新命令。

.

.

Domino Server可以设置某些附件较大的邮件,在空闲的时候再发送,其实设置就是附件的大小。

我们可以在 Send all messages as low priority if message size is between:进行设置。

.

.

还没有完成设置呀......

.

.

修改用户邮件模板方法来控制附件大小:

相信作为网管的兄弟姐妹们跟我一样,为了附件的大小伤透脑筋!如果在服务器的配置文档中来设置,一是在一台服务器的内部是不生效的,二是多台服务器时,即使生效,会产生大量的大附件邮件滞留在服务器的mail.box中,我想修改模板是最好的选择了:打开邮件模板,在共享操作的地方找到发送(S),发送并归档(E),在公式的前面加入: x:=@Integer(@Sum(@Attachments > 0; @AttachmentLengths; 0)/1024); @If(x>5120;@Do(@Prompt([OK];\"提示!\";\"附件超过5120K将不能发送!附件大小共: \"+ @Text(x)+ \"K\";@Return(\"\");\"\" 再修改便笺表单,选择表单属性,去掉关闭时 后面的小叉就可以了.

--------------------------------------------------------------------------------------------------------- 1. 打开邮件模板,在共享操作的地方找到发送(S),发送并归档(E),在公式的前面加入:

x:=@Integer(@Sum(@Attachments

>

0;

@AttachmentLengths;

0)/1024);

@If(x>5120;@Do(@Prompt([OK];\"提示!\";\"附件超过5120K将不能发送!附件大小共: \"+ @Text(x)+ \"K\";@Return(\"\");\"\" 再修改便笺表单,选择表单属性,去掉关闭时 后面的小叉就可以了.

2.现在以 NOTES 6.51为例(我不知道以前久版本是不是一样)

邮件模板的名字是:mail6.ntf(在NOTES目录中)

打开方式 可以 直接在工作台 打开-> 指定服务器(不要去找数据库),在下面文件里 直接输入 mail6.ntf

.

.

(R5应该不是mail6.ntf,可能是mail5.ntf吧),就可以打开,用Designer 对其修改

然后象你说的找到相应的表单(便笺很容易找的)Memo,找到操作,修改就可以!!!

更改模版后,需要重新替换原有模版,设置才能生效!

另外:关于在Designer5.0中更改公式无法成功的问题,我查询了IBM官方网站,确实是版本的问题,在5.x系列中都存在此问题

具体参考 http://www-1.ibm.com/support/docview.wss?uid=swg21101466

---------------------------------------------------------------------------

.

.

关于根据系统语言,显示不同语言的提示,方法有两种

请不要使用Designer5.0更改

原因参考 http://www-1.ibm.com/support/docview.wss?uid=swg21101466

1、修改公式

Language:=@RegQueryValue(\"HKEY_LOCAL_MACHINE\";\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Nls\\\\Language\";\"Default\");

Size:=@Integer(@Sum(@Attachments > 0; @AttachmentLengths; 0)/1024000);

@If(Size > 10 ; @If(Language = \"0804\";@Do(@Prompt([Ok];\"注意:附件大小超过10M!\";\"当前附件大小为\"+ @Text(Size)+ \"M,此邮件将不能发送!\"+@Char(13)+\"如有任何问题,请联系情报信息部(TEL:351)\");@Return(\"\"));@Do(@Prompt([Ok];\"Tips:Attachments Over 10M Bytes!\";\"The Current Attachments is \"+ @Text(Size)+ \"M bytes,this mail cannot send!\"+@Char(13)+\"If

2、使用Lotus Script

(LS用法类似于VB,但是对于一般用户来说,由于Domino类的结构不清晰,使用起来很麻烦) 此方法代码相对较长,不推荐使用,我也没学过LS开发,可能有错误之处,仅供学习使用

以下只包含核心代码

you

have

any

questions,please

contact

misgroup(TEL:351)\");@Return(\"\")));\"\");

.

.

Sub Initialize

Sub countThis(curDB As NotesDatabase, reportDB As NotesDatabase)

Dim curSize As DBSizeInfo On Error Resume Next

Set curSize = New DBSizeInfo(curDB) Call curSize.count

If curSize.AttachmentCount > 0 Then End If

Call curSize.save(reportDB)

Dim s As New NotesSession Dim db As NotesDatabase Dim curDB As NotesDatabase Dim dbDir As NotesDbDirectory Dim serverName As String Set db = s.CurrentDatabase If db.Server = \"\" Then Else End If

If serverName = \"(local)\" Then Else End If

Set curDB = dbdir.GetFirstDatabase(TEMPLATE_CANDIDATE) Do Until curDB Is Nothing Loop

Call countThis(curDB, db)

Set curDB = dbDir.GetNextDatabase

Set dbDir = New NotesDbDirectory(serverName) Set dbDir = New NotesDbDirectory(\"\") serverName = db.Server serverName = \"(local)\"

End Sub

End Sub

.

.

Public Class DBSizeInfo

Private db As NotesDatabase 'The database to be counted Public DBSize As Variant 'Size of the database Public AttachmentSize As Variant Public AttachmentCount As Variant Public DocumentCount As Variant Public hasError As Boolean

Sub new (curDB As NotesDatabase)

Public Function Count As Boolean

Dim doc As NotesDocument

Dim dc As NotesDocumentCollection Dim countResult As Variant Dim sizeResult As Variant On Error Goto Err_Count

If Not db.IsOpen Then End If

DBSize = db.Size AttachmentCount = 0 AttachmentSize = 0 DocumentCount = 0

Set dc = db.AllDocuments Set doc = dc.GetFirstDocument

Do Until doc Is Nothing

If doc.HasEmbedded Then End If

DocumentCount = DocumentCount + 1

Call getAttachmentSizes(doc)

Call db.Open(\"\If Not db.IsOpen Then End If

'We could not open it

Print \"Can't open \" & db.FilePath Count = False Goto Exit_Count

Set db = curDB hasError = False

End Sub

.

.

Loop

Set doc = dc.GetNextDocument(doc)

Count = True 'If we got here it worked Exit Function

Print Error$ & \" in Count in \" & db.FilePath & \" in line \" & Cstr(Erl) Count = False hasError = True Resume Exit_Count

Exit_Count:

Err_Count:

End Function

Public Sub Save(reportDB As NotesDatabase)

Dim doc As NotesDocument Dim v As NotesView

Dim searchkey(0 To 1) As String

On Error Goto Err_Save

Set v = reportDB.GetView(\"(LookupByServerAndPath)\") If v Is Nothing Then Else End If

Call doc.ReplaceItemValue(\"Form\Call doc.ReplaceItemValue(\"DBSize\

Call doc.ReplaceItemValue(\"AttachmentSize\Call doc.ReplaceItemValue(\"AttachmentCount\Call doc.ReplaceItemValue(\"DocumentCount\ If hasError Then

Call doc.ReplaceItemValue(\"ErrorFlag\

If db.Server = \"\" Then Else End If

searchkey(1) = Lcase(db.FilePath)

Set doc = v.GetDocumentByKey(searchkey,True) If doc Is Nothing Then End If

Set doc = New NotesDocument(reportDB) searchkey(0) = db.Server

searchkey(0) = \"(local)\"

Set doc = New NotesDocument(reportDB)

.

.

Elseif doc.HasItem(\"hasError\") Then End If

If db.Server = \"\" Then Else End If

Call doc.ReplaceItemValue(\"FilePath\Call doc.Save(True,True)

Exit Sub

Print Error$ & \" in \" & db.FilePath Resume Exit_Save

Call doc.ReplaceItemValue(\"ServerName\Call doc.ReplaceItemValue(\"ServerName\Call doc.RemoveItem(\"ErrorFlag\")

Exit_Save:

Err_Save:

End Sub

Private Sub getAttachmentSizes(doc As NotesDocument)

Dim attNames As Variant Dim result As Variant result = 0

On Error Goto Err_getAttachmentSizes

attNames = Evaluate(|@Attachmentnames|, doc)

If attNames(0) <> \"\" Then End If

Me.AttachmentSize = Me.AttachmentSize + result Exit Sub

Print Error$ & \" in getAttachmentSizes doc: \" & doc.UniversalID

Forall an In attNames

Print \"Checking Attachment \" & an Set att = doc.GetAttachment(an) result = result + att.FileSize

Me.AttachmentCount = Me.AttachmentCount + 1

Dim att As NotesEmbeddedObject

End Forall

Exit_getAttachmentSizes:

Err_getAttachmentSizes:

.

.

Resume Exit_getAttachmentSizes

End Sub

End Class

Declare Function GetSystemDefaultLCID Lib \"kernel32\" () As Long Function GetOsType() As String Dim ret As String

Select Case Hex(GetSystemDefaultLCID)

Case 804:

ret = \"input chinese tips\" ret = \"input english tips\"

Case Else:

End Select GetOsType = ret End Sub

想修改模板是最好的选择了:打开邮件模板,在共享操作的地方找到发送(S),发送并归档(E),在公式的前面加入: x:=@Integer(@Sum(@Attachments > 0; @AttachmentLengths; 0)/1024); @If(x>5120;@Do(@Prompt([OK];\"提示!\";\"附件超过5120K将不能发送!附件大小共: \"+ @Text(x)+ \"K\";@Return(\"\");\"\" 再修改便笺表单,选择表单属性,去掉关闭时 后面的小叉就可以了.

.

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- 517ttc.cn 版权所有 赣ICP备2024042791号-8

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务