Domino 邮件服务器数据库的制作

类别:Java 点击:0 评论:0 推荐:

    1. 在注册页面中添加两个计算域
       a) DoMain      公式:@Domain                                                           a0
       b) MailFile    公式:@Trim("mail/"+@Text(UserName))                                    a1

    2. 参考下列代码实现 Domino目录内的用户注册和邮件数据库的复制以及邮件数据库存取控制列表的修改

       把人员信息写进Domino目录 names.nsf                                                     00
       namesDocument.Type = "Person"                                                          01
       namesDocument.Form = "Person"                                                          02
       namesDocument.LastName = doc.UserName(0)                                               03
       namesDocument.FullName = doc.UserName(0)                                               04
       namesDocument.HTTPPassword = doc.UserPassword(0)                                       05
       namesDocument.MailSystem = "6"                                                         06
       namesDocument.MailDomain = doc.DoMain(0)                                               07
       namesDocument.MailServer = session.UserName                                            08
       namesDocument.MailFile = doc.MailFile(0)                                               09
       namesDocument.PeopleName = doc.PeopleName(0)                                           10
       namesDocument.PassWord = doc.PassWord(0)                          11
       Call namesDocument.Save(True, False)                                                   12
                                                                                              13
       复制邮件数据库到指定目录,并且指定这个邮件数据库属于谁                                 14
       Set copyDB = New NotesDatabase("", "mail.nsf")                                         15
       copyToFilename = Trim("mail\" & doc.UserName(0))                                       16
       serverName = ""                                                                        17
       Set toDB = copyDB.CreateCopy(serverName, copyToFileName)                               18
       Set acl_toDB = toDB.ACL                                                                19
       Set entry_toDB = acl_toDB.CreateACLEntry(doc.UserName(0), ACLLEVEL_MANAGER)            20
       Call acl_toDB.Save                                                                     21
       Set entry = acl_toDB.GetEntry("Anonymous")                                             22
       Call entry.Remove                                                                      23
       Call acl_toDB.Save                                                                     24

    3. 特别注意下面的语用解释:

       06    务必把 MailSystem 指定为 "6"
       07    把 MailDomain 也就是邮件服务器所属的网络域自动化为 doc.DoMain(0)  [参见a0]
       08    取得邮件服务器名称  [如果邮件服务器和WWW服务器不同邮件服务器指定错误]
       09    指定特定用户的邮件数据库  [比如:"/mail/developer.nsf"(相对路径)]

       20-22 第20和22句解决邮件数据库的存取控制列表的匹配问题(问题描述如下):

            a) 你用于注册的用户名称在 mail.nsf 模板中的权限?
            b) 特定用户的邮件数据库生成以后你用于注册的用户名称还有必要在哪个邮件数据库中存在吗?
            c) 由此而引发的邮件系统维护的权限问题?

本文地址:http://com.8s8s.com/it/it11804.htm