Copying Domino Mail Rules Between Databases

Mail rules can be created by users on their Lotus Notes mail files to filter and process incoming mail. Unfortunately they’re not easy to copy between different mail files. A simple copy and paste copies nothing. The reason is that they’re protected by the no copying feature of notes that means you can control what happens to an email when it gets to the recipient (well if they’re on notes that is).

However, this setting can be switched off per document by clearing $KeepPrivate field.

This post by Chris Toohey @ dominoguru.com details how the field can be cleared for no copy documents. However this can also be used on mail rule documents.

Here’s how:

1. Open up lotus notes and click on File -> Preferences.

2. Now select Toolbar -> Customize -> New -> Button

3. In caption text give the button a name (e.g. Clear KeepPrivate)

4. In the popup help type in something helpful (e.g. This will allow you to copy protected documents)

5. Now in the formula field paste in Chris’ code:

FIELD $KeepPrivate := $KeepPrivate; @If($KeepPrivate != ""; @Do( @SetField("$KeepPrivate";""); @Prompt([OK];"$KeepPrivate Flag Disabled"; "The selected message can now be forwarded/copied!") ); @Prompt([OK];"$KeepPrivate Flag Not Found"; "The selected message does not appear to have forwarding/copying disabled.") )

6. If you don’t want the prompts you can remove those from the code so it looks like this instead: