FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.


Jun 6, 2017, 8:36 AM
2 Posts

agent for mail.box

  • Category: Domino Server
  • Platform: Linux
  • Release: 9.0.1
  • Role: Developer
  • Tags:
  • Replies: 4

Hi there

I intend to implement 2 things for my domino server:

1. Implement a whitelist mechanism so that a particular sender could only be sending message to a pre-defined set of recipients

2. All messages from my domino domain will be routed to another domino domain which acts as a bridge and routes message to designated domino domain. I have been told by my boss that a message throttling should be in place to prevent mass messages from routing to the "bridge". The reason is that my domino server is used by a java application via DIIOP, my users actually are sending web service request to the java application to send messages out, therefore, the users can send mass messages with ease.

My thought is that I can implement a mail.box agent to accomplish my goals, so I made a "before new mail arrives" agent and "after new mail has arrived" agent for testing purpose. But I found that the "before new mail arrives" agent is never triggered. The "after new mail has arrived" agent is triggered with an error - target document does not exist, it seems that the document is transmitted out of mail.box before the "after new mail has arrived" agent is triggered.

Am I going to a wrong way? Appreciate if someone could give me a suggestion.

Mike

 

 

Jun 6, 2017, 9:13 AM
105 Posts
Nope...

You cannot use agents to interrupt mail flow in the mail.box.  You will need to use the API Extension Manager events to run your logic when a new note is created in the mail.box.

Your choices are the C API or the Domino OSGI Tasklet Service.

https://www.ibm.com/developerworks/lotus/library/capi-nd/index.html

http://www-12.lotus.com/ldd/doc/domino_notes/9.0/api90ug.nsf/85255d56004d2bfd85255b1800631684/06fd173414dcdad9852560eb0077ca42?OpenDocument

https://www.openntf.org/Projects%5Cpmt.nsf/0/193023866DE8B6F98625787F00224BC9/%24file/readme.pdf

Jun 6, 2017, 10:03 AM
320 Posts
Mail Rule

Create a mail rule that moves the email into a notes db.  You then can write code to do whatever you want and at the end just create a doc into the mail.box with a flag that the criteria for the mail rule will ignore

Jun 6, 2017, 11:08 PM
2 Posts
thanks guys

I will look into each suggestion.

Jul 2, 2017, 9:27 PM
41 Posts
I'm sure it doesn't need to be said, but...
Be sure to watch out for what can happen with out of office or auto-forwarding sorts of things.

I say this because I once had a user who knew enough to be dangerous. A piece of the business was getting spun off, and during the transition period they had their old IDs here and new ones there. This guy set up his old mail to auto-forward to his new one. Only problem - he had a typo in the new address. It forwarded to an invalid address, which bounced back with a message that it couldn't deliver, which it then forwarded to the bad address, which ....

I was a Notes programmer (not an admin person) involved in the transition, but I got called by our server people when the endless loop of messages crashed the mail server at our end. My contribution was figuring out what this guy had done. This was 20+ years ago so maybe situations like that are caught better now, but it's certainly stuck in my mind over the years. :-)

FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.