Remove encryption from Domino documents

  • 22 Dec, 2020

When you create mail journaling you can encrypt all documents using the Administrator ID.  Last week a customer ask to add access for another user (developer). The Admin remove the database encryption but lots off documents remain encrypted . The solution was to remove the document encryption using the following steps:

To remove encryption from documents:

1. First, create a view named “Encrypted”. The view selection formula you use will vary depending on the type of database with which you are working.

  • If working in a mail file, then use the following:

    • SELECT (Encrypt = “1” |  EncryptionFlags = “2”)

If you are working in a non-mail file and want to remove encryption from documents encrypted with a Private key, then use the following formula:

  • SELECT @IsAvailable(SecretEncryptionKeys)

If you are working in a non-mail file and documents may be encrypted using either a Public or Private key, then use the following:

  • SELECT @All In the above scenario, if you want to remove encryption based on the Form or other field value, then remove the @All. For example: Select Form = “Report”.

In other scenarios, use an ampersand (&) to add additional criteria to the selection formula. For example: Select Form=“Report” & @IsAvailable(SecretEncryptionKeys)

  • 2. Create an agent with the following code. Set it to run manually from Actions menu on all documents in the database.

Dim s As New notessession Dim db As notesdatabase Dim view As notesview Dim doc As notesdocument Dim nextdoc As notesdocument

Set db = s.currentdatabase Set view = db.getview(“Encrypted”) Set doc = view.getfirstdocument

While Not doc Is Nothing

  • Set nextdoc = view.getnextdocument(doc) 'The below loop is mandatory to ensure that all $File entries are unecrypted Forall i In doc.items

    • If i.isencrypted Then

      • i.isencrypted=False

End If

End Forall 'Must have at least 1 field encrypted in order to call Encrypt method Dim temp As New NotesItem(doc,"tempjunk","temp") temp.IsEncrypted=True Call doc.encrypt Call doc.save(True, False) 'This portion can now remove the fields relative to encrypting the 'single token encrypted field. Call doc.removeitem("$Seal") Call doc.removeitem("$SealData") Call doc.removeitem("SecretEncryptionKeys") Call doc.removeitem("Encrypt") Call doc.removeItem("tempjunk") Call doc.save(True, False) Set doc = nextdoc

Wend

Related Posts

Migrating messages from Domino to Google using IMAP

  • 20 Feb, 2022

It's only for messages. No calendar migration Imapsync command is a tool allowing incremental and recursive imap transfers from one mailbox to another. If you don't understand the previous sentence, it's normal, it's pedantic computer-oriented jargon. All folders are transferred, recursively, meaning the whole folder hierarchy is taken, all messages in them, and all message flags (\Seen\Answered \Flagged etc.) are synced too. Imapsync reduces the amount of data transferred by not transferring a given message if it already resides on the destination side. Messages that are on the destination side but not on the source side stay as they are. Get the tool here  https://github.com/imapsyn

Migrating messages from Domino to Google using IMAPRead More

Domino V12 and Verse 2.1 How to add a Photo URL

  • 08 Jun, 2021

Today i setup a Domino V12 server just for test some new features. A customer ask to use photos on Verse hosting photos on Domino. Domino V12 comes with Verse 2.0. I just download the version 2.1 of Verse and follow the installation instructions. After the setup i just put a URL of a PNG image on the person document, field photoURL  and add the entry VOP\GK\FEATURE\230=1 to the notes.ini of the server. Works Great !(http://www.mysphere.com.br/wp-content/uploads/2021/06/verse.png)

Domino V12 and Verse 2.1 How to add a Photo URLRead More

Notes / Domino is forever

  • 04 Feb, 2021

Yesterday it seemed like it would be an ordinary working day but a client called me informing about the expiration of a certifier. It would be normal to resolve the problem with the re-certification procedures but it was a special certificate. This client has been using Notes/Domino since version 4.0.  When I saw the certificate creation date 05/09/1996 I was impressed. This customer uses the environment for mail and applications for 25 years!. How times flies I started working for this client in 1999 by installing the first R5 server (5.0.4) on an IBM Netfinity 5500 Server running Windows NT 4.0. The hardware is gone, the operating system and the administrators who created this certifer

Notes / Domino is foreverRead More