API to integrate with Domino

陌路散爱 提交于 2019-12-30 08:53:51

问题


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.

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

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.

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 C/C++ API toolkit for Domino - https://www.ibm.com/developerworks/lotus/documentation/capi/. The C API though 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 a couple of relevant resources - http://www-01.ibm.com/support/knowledgecenter/SSVRGU_9.0.1/com.ibm.designer.domino.main.doc/H_10_NOTES_CLASSES_ATOZ_JAVA.html and www-10.lotus.com/ldd/ddwiki.nsf/xpViewCategories.xsp?lookupName=API%20Documentation which seems 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 (www.openntf.org/main.nsf/project.xsp?r=project/OpenNTF%20Domino%20API) 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)?

Thanks,


回答1:


    1. You should avoid the Notes C and C++ APIs unlesss (a) You know Lotus Notes and Domino really, really well (or are willing to learn a lot very quickly), and (b) 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 - though that will depend on whether you can run your Java code on a machine that has the core Lotus Notes/Domino code installed - and 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, which is old and out of date, but it does cover most of what you need to know for the purpose you've described - with one exception: 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, and you've already found the link to the most recent class documentation, and 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 limitations that code that uses the offical API runs into.

Re your question about installing the Notes client: I alluded to that when I mentioned the core Lotus Notes/Domino code under item 2. You have two options for the official Java API. Option A - "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.) Option B - "Remote": You don't need to install any Notes or Domino code, and this uses CORBA/IIOP instead of Notes RPC to talk to the server, but that means that it requires enabling IIOP on the Domino server. I should also note that 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.

I've also going to note that things like the existence of a Java API for Lotus Domino can be easily confirmed by searching here on StackOverflow, as opposed to Google - but the point is that finding basic references, on the other hand, is quite a bit more challenging. The Domino arena is a little different from many others that are covered on StackOverflow. Since there is literally 25 years worth of information about Domino out there, but often in fragments and often obsolete, it really can be difficult to find the real information about tools and libraries (or APIs) that are available and current today. The options are, however really pretty limited, so this does not really come down to opinion and I do think this deserves an answer. I'm not going to make a recommendation, though, because that really would be opinion.



来源:https://stackoverflow.com/questions/30791910/api-to-integrate-with-domino

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!