Home > Domino Tips > Administrator > Domino > Avoid Lotus Notes Domino email archiving ACL issues with AdminP
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

DOMINO

Avoid Lotus Notes Domino email archiving ACL issues with AdminP


Ulrich Krause, contributor
02.21.2008
Rating: -3.27- (out of 5)


Lotus Notes, Domino, Workplace and WebSphere tips and advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


Contributor Ulrich Krause recently discovered a problem delegating mail files after deploying a third-party email-archiving product that interacts with the access control list (ACL) feature of Lotus Notes Domino. After investigating why this problem occurred, he realized that this email-archiving issue will likely affect many Lotus Notes Domino shops. In this tip, he explains how to create a custom AdminP handler that remedies the situation.

Recently, my company began evaluating third-party email-archiving solutions for Lotus Notes Domino. The product we were looking at stored email messages together with a snapshot of the access control list. I found this to be a clever solution, because it maintains Lotus Notes security configurations on archived documents (both on the client and on the Web). Unfortunately, the "ACL snapshot" feature causes some trouble when delegating mail files -- mostly because of a missing "RemoveGroupMembers" method that occurs with this software.

The email-archiving dilemma

Imagine a scenario, where User A delegates his mail file to User B. (User B has author access -- this will also includes "READER" access.) When the email archive process starts, it will save the ACL together with the Lotus Notes document. So if User B retrieves the document from the archive, there won't be a problem.
Free Archiving Seminar
Get independent expert advice on designing and deploying an email and file archiving strategy - register today!

Now let's say User B quits the company and is replaced by User C. From there, User A would modify the delegation profile according to the new situation. But what happens when User C wants to access the Lotus Notes documents that were archived before he was given access to the mail file?

To solve this issue, we put a group into each mail file ACL in the following format: #ARC-<FirstName><LastName>-READER. As the name implies, the access level for this group is "READER." When we send a mail document to the archive, this group is now archived as well.

We put User C into this group and he immediately had access to all archived email of User A. Bear in mind that regardless of which access level is given to a user by delegation, he needs at least READER privileges to access documents from within the archive. Manually adding members to a group or deleting them is not a good idea, because you'd have to do all the work yourself -- which is never a good thing.

Solution 1

The email-archiving vendor proposed a modification of the delegation process in Lotus Notes to solve the problem. This is not a good idea at all, because you would have to write a completely new CalendarProfile to achieve this.
Related resources from SearchDomino.com:
An Administration Process (AdminP) crash course

Lotus Notes Domino AdminP Reference Center

Lotus Notes Domino Archiving Reference Center

Solution 2

The simplest answer is to have the abovementioned group in the ACL (and names.nsf ) and add code to the CalendarProfile to add/remove members to/from the group. This keeps the code provided by IBM intact. In addition, you can update to a higher version of Lotus Notes and Domino and easily add your modifications to the new template.

The basic algorithm we're going to custom create will add all mail delegates to the group, and remove a name from this group when the mail file owner revokes access to his Lotus Notes Domino database.

Creating a custom AdminP handler

AdminP is a server task for automating administrative tasks in the background on a schedule. The Domino administration process (AdminP) is a server-side mechanism for automating administrative tasks in the background on a specified schedule. Lotus Notes Domino's AdminP supports everything from user renames to file replications. Starting with version 6 of Lotus Notes and Domino, you can use the NotesAdministrationProcess class to create AdminP requests programmatically with LotusScript.

One of the methods of the NotesAdministrationProcess class is AddGroupMembers. This method adds members (passed as a parameter in the method call) to an existing group; or creates the group when it does not exist and then adds the members to the newly created group. This is a great feature if you want to enable Lotus Notes users in your organization to maintain groups in names.nsf without giving them Author or Editor rights.

But how can you delete users from existing groups using AdminP? Methods like "RemoveGroupMembers" don't exist in the NotesAdministrationProcess class. Since IBM does not provide such a function, I had to create my own.

Bob Balfe of IBM published an article back in 2003 on the IBM developerworks page: Creating a Custom Administration Process Request Handler. This is a great starting point for writing your own AdminP request handlers using the Notes C API.

Following the instructions in the article, I created a new form in admin4.nsf to contain all the fields needed for the new AdminP request:

I saved the compiled nadminplus.exe to the Domino executable directory and started it by typing "load nadminplus" at the Domino server console:

I then created new RemoveGroupMembers requests directly in the admin4.nsf.

You can also use the following LotusScript to create the requests programmatically. This code is not meant to be a solution that can be copied and pasted. You will not find any source code here. This is only a code snippet to help you get started.

'/* Put the following code into the 
declaration section of an action */
'/* or create a new script 
library to contain the code */
Const DB_ADMIN4 = "admin4.nsf"
Const FLD_FORM = "CustomRequest"
Const FLD_PROXYACTION = "5005" 
' RemoveGroupMembers | 5001

Class NotesAdministrationProcessPlus
 
Private szServer As String

Public Sub new (szServerName As String)
Dim s As New NotesSession
Dim nn As NotesName
Set nn = s.CreateName (szServerName)
szServer = nn.Canonical
End Sub

Public Function 
 RemoveGroupMembers 
(ListName As String, Members As Variant) 
As String
RemoveGroupMembers = ""
If  (Ubound (members) = 1 
And members(0) ="") Or Trim(ListName) = 
""  Then
Exit Function
Else
Dim s As New NotesSession
Dim db As New NotesDatabase
( szServer, DB_ADMIN4 )
Dim doc As NotesDocument
 
If db.IsOpen Then
Set doc = db.CreateDocument
doc.Form = FLD_FORM
doc.ProxyAction = FLD_PROXYACTION
doc.ProxyServer = szServer
doc.ListName = ListName
doc.Members = Members
Call doc.ComputeWithForm(False, False)  
Call doc.Sign
Call doc.Save(False, True)
RemoveGroupMembers = doc.NoteID
Else
   
End If
 End If
  
 End Function
End Class

To create the request documents, use the following code:

Sub Click(Source As Button)
Dim noteid As Variant 
Dim members(1) As String 
members(0) = "Hein Bloed/Maus/de"
' ... 

Dim AdminPP As New 
NotesAdministrationProcessPlus 
("<YourServer>")
noteid = AdminPP.RemoveGroupMembers 
("<YourGroup>", members)
' ... 
 
End Sub
About the author: Ulrich Krause a.k.a eknori has been working as administrator and developer with Lotus Notes and Domino since Release 4. Ulrich is the project chief of OpenNTF's project !!HELP!!, an open source helpdesk system for Lotus Notes and Domino. You can contact Ulrich through his blog at http://www.eknori.de.

Do you have comments on this tip? Let us know.

Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Lotus Notes Domino Archiving
Archiving Lotus Notes documents to a specified folder
E-discovery rules double-edged sword for CIOs
IM, blogs next target for litigation
Symantec peddles enterprise vault tool
Changing a Lotus Notes database mail file from 'archive' to 'mail'
Email archiving for SMBs: No experience required
School district hooks up affordable compliance archive
Exporting email from Lotus Notes to .EML messages
Email archiving: What's right for your enterprise?
Email archiving: Should storage pros keep everything?

Domino
Troubleshoot Lotus Notes Out of Office (OOO) agent error messages
A batch file for Lotus Notes Domino maintenance on Windows Server 2003
Send pop-up admin messages to Lotus Notes users from Domino Server
Protect Lotus Notes from malicious code with the Domino ECL
Update to Exchange Server 2003 Connector for Lotus Notes
Synchronize LinkedIn contacts with Lotus Notes Domino
Eight best practices for running BlackBerry Enterprise Server on Lotus Notes Domino
Setting up Rooms and Resources in Lotus Notes Domino 7
How to correct Lotus Notes public key mismatches in four easy steps
How to perform an in-place upgrade of Lotus Domino server hardware

Lotus Notes Domino AdminP
An Administration Process (AdminP) crash course
Best way to standardize group names in NAB
Process of renaming users keeps getting interrupted
Admin2005 preview: Tips, techniques, and a look at Notes/Domino Rel. 7
Steps for user to accept name/OU changes
Renaming a user after marital status change
All about AdminP Part 1
Remotely verify the version of Domino being run on a server
Server doc CPU count not correct after Domino R5 rebuild

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsWebcastsWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts