API to integrate with Domino

7.8k views Asked by At

I am a relatively newbie to Lotus/Domino world and have been tasked with the following Domino task.

Access user's Domino mailbox (from a middleware server) and delete certain malicious emails from the same.

Additional Background: There is a external security tool/process that analyzes all incoming email and can flag the email as malicious. In the event it is flagged as malicious then I want to delete this email from the respective user's inbox.

My solution would be deployed on its own middleware server (Linux based) and will receive incoming notifications as to what emails need to be deleted.

The Domino server deployed in my environment is Lotus/Domino 9.

I want to preferably implement this functionality using Java.

I researched and found the potential options for me for accessing the user's inbox on Domino server.

1) I saw that there is a IBM C/C++ API toolkit for Domino. The C API looks quite complicated to me on first glance. Also I would need to install the Notes client (on my middleware server) so that I could invoke the C API remotely?

2) Is there a Java API that I could use to connect/access Domino? I found:

These seem to indicate there is some Java/REST API interface however I am not sure if I can use this to access inbox/mailbox data. It seems to indicate "Calendar" data but nothing about email/mailbox data as such.

3) I came across the OpenNTF Domino API project while researching and that seems to have a Java API. Should I be using this?

What is the best way to access Domino from an external server standpoint? Am I stuck with the C/C++ API or is there a relatively (easier to understand and use) REST/Java API that I could leverage? Also will I have to have the Notes client installed on my middleware server so that I can invoke the API (C/C++ or Java)?

1

There are 1 answers

1
Richard Schwartz On
  1. You should avoid the Notes C and C++ APIs unless:
    • You know Lotus Notes and Domino really, really well (or are willing to learn a lot very quickly) and
    • You determine that the only way to solve your problem would be to write a Domino server task or extension. These APIs work with Lotus Notes/Domino data a very low level.
  2. Yes, there is a Java API. It's been around for years. There is also a REST API that can be accessed from Java (or from any other language that can make HTTP connections) but that's only been around for a few years.
    • The Java API is richer and can get to a lower level than the REST API.
    • The REST API might be adequate for what you need, but there's a very good chance that the server will have to be set up specifically to enable it to access the mailboxes. That will not necessarily be the case if you use the Java API.
    • Using Java API will depend on whether you can run your Java code on a machine that has the core Lotus Notes/Domino code installed. Also you'll have to investigate the technical and licensing questions on that.
    • A good way to get educated on the Java API is to read Bob Balaban's book. It is old and out of date, but it does cover most of what you need to know for the purpose you've described. One caveat is that it was written so early that it did not cover the need for making recycle() calls. But he's posted the chapters here for free download. Now that you know about recycle() I'm sure you can find information about why and when you need it.
  3. The OpenNTF Domino API is an open source replacement for the offical Java API. It has been built to solve a lot of really nagging problems (like recycle()!) and the limitations usage of the official API runs into.

Re: installing the Notes client which I alluded to that when I mentioned the core Lotus Notes/Domino code under point 2. You have two options for the official Java API:

  1. Local:
    • This uses the core Notes/Domino code to make Notes RPC calls to the server, so you will have to install a licensed version of the Notes client or Domino server code to get the core code.
    • Note that if you are tied to a 64-bit JVM, you need 64-bit code and that means you need to install the Domino server instead of the Notes client since there is no 64 bit Notes client.
  2. Remote:
    • You don't need to install any Notes or Domino code but this uses CORBA/IIOP instead of Notes RPC to talk to the server. This requires enabling IIOP on the Domino server.
    • The last time I checked, the OpenNTF API only supports the "Local" model.

I do have to mention though: this is close to being off topic for this reason:

Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Whilst the existence of a Java API can be easily confirmed by searching here on StackOverflow, I have to admit that finding basic references for Domino is quite a bit more challenging. There is literally 25 years worth of information about it that's out there, but is often in fragments and is obsolete. It is really difficult to find information about tools, APIs and libraries that are available and current today. The options are really pretty limited.

As such I think this question deserves an answer since it does not really come down to opinion. I'm not going to make a recommendation though, because that really would be opinion.