How to prevent Enterprise Vault (EV) for Domino from Archiving and Deleting Mail Rule Documents from Domino Journal database

book

Article ID: 100015476

calendar_today

Updated On:

Cause

Enterprise Vault for Domino Journal archiving task will try to archive every document in the Domino journal database that is not marked do not archive (if custom filtering is enabled) or is poison pilled.

Resolution

The first solution below requires custom rules/filtering to be enabled and emulates the Mailrule as being marked do not archive.  By doing this EV will not try to archive or delete the Mailrule document.  The second solution below does not require enabling custom rules/filtering by marking the Mailrule document(s) as poison pilled.

Using Custom Filtering Method to Prevent Archival/Deletion of The Mailrule Document
1.  Stop the Enterprise Vault Journal archiving task
2.  Turn on custom filtering as per the 'Setting up Domino Server Archiving" guide.
     The Override registry setting must be set to 0.
    ***Note:  Technical support staff do not write, modify, or verify customer
                   custom filtering Custom Properties or Filter Rule xml files.  If it is known
                   that these files are correct, have worked in past, and not operating
                   properly now, then there may be an issue with the custom filtering engine
                   that requires troubleshooting by a support staff member.
3.  Create the mail rule
4.  Copy the mail rule to the journal database
5.  Use LotusScript like the below example in Journal database to add the
     EV_MARK_DO_NOT_ARCHIVE item with numeric value of 1 to Mailrule
     document(s):
        Dim session As New NotesSession
        Dim db As NotesDatabase
        Dim dc As NotesDocumentCollection
        Dim doc As NotesDocument
 
        Set db = session.CurrentDatabase
        Set dc = db.Search( {Form="Mailrule"} , Nothing, 0)
        If (dc.Count < 1)  Then Exit Sub
        Set doc = dc.GetFirstDocument
        Do While Not (doc Is Nothing)
           If doc.hasitem("EV_MARK_DO_NOT_ARCHIVE") Then
              Call doc.ReplaceItemValue("EV_MARK_DO_NOT_ARCHIVE ",1)
           Else
              Call doc.AppendItemValue(" EV_MARK_DO_NOT_ARCHIVE ",1)
           End If
           Call doc.save(True, False)
           Set doc = dc.GetNextDocument(doc)
        Loop
   ***Note:  Veritas does not create or support LotusScripts for customers.  The script is safe because without it the documents are being archived and deleted which is the same result if the script does not work, and if the script works the Mailrule documents will simply remain in the Journal database.
   How it works - Being the script should be applied to and used in the Journal database the current session would be that containing the Journal database.  So the first set command is assigning the database currently opened in the session which is the Journal database to the db variable.  The next set command is doing a search in the database for any document that has a form value of "Mailrule" and assign them to the variable dc.  We now need to process each Mailrule document in dc.  So we assign the first document to doc, start a loop, process doc, change doc to the next document keep looping until all Mailrule documents have been processed.  Now in this case, our processing of the document is just looking to see if a field (called an item in Domino) exist called EV_MARK_DO_NOT_ARCHIVE and if so it sets the value to one in case it is set to something else, and if the item does not exist it then appends the item with a value of 1.  Lastly, the document has to be saved before the script moves on to the next document to process.  After running the script against a Mailrule document you should see the EV_MARK_DO_NOT_ARCHIVE field added in the document properties. 
6.  Start the Enterprise Vault Journal archiving task.
7.  Check the Enterprise Vault Event logs for no errors and 41086 Events
     saying custom filter has started.
8.  Wait a few minutes and check to make sure the Mailrule document(s) are
     still present in the Journal database.

Using Poisoin Pill Method to Prevent Archival/Deletion of The Mailrule Document
1.  Stop the Enterprise Vault Journal archiving task
2.  Create the mail rule
3.  Copy the mail rule to the journal database
4.  Use LotusScript like the below example in Journal database to add the
     poison pill items with appropriate  numeric values to the Mailrule
     document(s):
        Dim session As New NotesSession
        Dim db As NotesDatabase
        Dim dc As NotesDocumentCollection
        Dim doc As NotesDocument
 
        Set db = session.CurrentDatabase
        Set dc = db.Search( {Form="Mailrule"} , Nothing, 0)
        If (dc.Count < 1)  Then Exit Sub
        Set doc = dc.GetFirstDocument
        Do While Not (doc Is Nothing)
           If doc.hasitem("EV26C5E2CCF2B9267C.PoisonPilled") Then
              Call doc.ReplaceItemValue("EV26C5E2CCF2B9267C.PoisonPilled",1)
          Else
              Call doc.AppendItemValue("EV26C5E2CCF2B9267C.PoisonPilled",1)
           End If
           If doc.hasitem("EV26C5E2CCF2B9267C. Retry ") Then
              Call doc.ReplaceItemValue("EV26C5E2CCF2B9267C. Retry ",3)
          Else
              Call doc.AppendItemValue("EV26C5E2CCF2B9267C. Retry ",3)
           End If
           Call doc.save(True, False)
           Set doc = dc.GetNextDocument(doc)
        Loop
   ***Note:  Veritas does not create or support LotusScripts for customers.  The script is safe because without it the documents are being archived and deleted which is the same result if the script does not work, and if the script works the Mailrule documents will simply remain in the Journal database.
   How it works - This script works the same as the one above with exception we are checking for two fields instead of one.  If they exist we replace the values to make sure they are what we want.  If they do not exist then we append the two fields with the correct values to the Mailrule document.
6.  Wait a few minutes and check to make sure the Mailrule document(s) are
     still present in the Journal database.

Issue/Introduction

Customer was using mail rules in the journal database to automate additional copies of messages meeting certain criteria over to another Domino server and when the Enterprise Vault Journal task would run it would archive and delete the mail rule documents.  With the mail rule documents removed the automatic copies would no longer work.