You are not authorized to access that database when opening Domino server mailbox replicated with LotusScript

142 Views Asked by At

I have a script that calls CreateReplica to replicate and download a mailbox from a Domino server to my local storage. When I try to open it with Notes, i get this error:

error

However, when I use the IBM Domino Administrator program, set myself full administration access, and do a Copy of the database to local storage, I can open it fine.

Here is the code I use to replicate the mailbox:

Sub Click(Source As Button)
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim localDb As NotesDatabase
    Dim sourcePath As String
    Dim targetPath As String
    Dim server As String
    Dim mailbox As String
    
    mailbox = "<mailbox>"
    server = "<mailserver>"
    sourcePath = "mail/" + mailbox
    targetPath = "C:\Temp\mailbox_data\" + mailbox
    
    Set db = session.GetDatabase(server, sourcePath)
    Set localDb = db.CreateReplica("", targetPath)
    
    Call db.Close
End Sub

I have tried instead of using CreateReplica in LotusScript, to use CreateCopy (which I assume is the same as doing it through the Domino Administrator program), and the database gets downloaded however when I open it it's empty.

I have around 500 mailboxes to copy/replicate, and I need to archive them and for them to be not encrypted and openable to anyone. When I manually Copy from Domino Administrator, anyone with the Notes program can just copy it. However copying 500 mailboxes weighing 2TB manually is not something that's optimal, especially since I feel I am close to doing it in bulk.

1

There are 1 best solutions below

0
leyrer On

The user executing that code needs access rights to replicate the databases. As you mentioned, your user (I assume you are running this as your user) does not have the right to do so, unless you switch to full administration access. Notes/Domino work as designed.

Regarding CreateCopy: As per the documentation:

The copy contains the design elements of the current database, an identical access control list, and an identical title. It does not contain any documents.