matnewman.com

Preventing users sending messages to >X number of recipients without approval - quick’n’easy

Mat Newman  September 20 2011 15:17:59
The great black witch of the dark art of networking (Scott Headlam) and I were collaborating the other day on a very simple method of preventing a user sending a message to more than 'X' number of recipients.  The request came from a customer who had a couple of simple restrictions:
  • No plug-ins, and
  • No third-party tools.

Ok, so a pure Domino solution ... Easy :-)

It came down to a combination of Domino Rules, and a creative use for the Domino White-list feature. It is VERY easy to implement.

What you will need:
  • A Database to "quarantine" the messages into
  • An agent in that database to "Approve" the messages for delivery, and put them back into the mail.box, and
  • A Couple of mail rules.

The extended description is below:

1. Create a new database on the server, for the sake of this exercise I used the mail template, and the file name "admin/toomanyrecipients.nsf"
2. Create a mail rule on the Domino Server(s) that route mail.
a) Open the server's config document: Admin Client -> Configuration Tab -> Server -> Configurations
b) Show the mail rules: "Router/SMTP" Tab -> "Restrictions and Controls" Tab -> Rules Tab
c) New Rule (You need to be in edit mode to add new rules)
d) Conditions to add: Recipient count is greater than X (Add your own number here) AND Whitelist tag contains "Authorised" (Add your own Word Here) -> Perform the Action: Stop processing Further Rules:
MailRoutingRule1.jpg

What this does: it looks at every message which has greater than "X" number of recipients, checks to see if the Domino whitelist field contains the word (in this case) "Authorised", and if it does, it stops processing any additional mail rules, and delivers the message.

GREAT!

But what about if the message ISN'T "Authorised"

You add a second rule - follow the steps up to (c) above, and in the next rule, you put new step (d):

d) Recipient count is greater than X (Add your own number here) -> Perform the Action: move to Database, AND don't Deliver Message:
MailRoutingRule2.jpg

What this does: It moves the message to a database that you can monitor, stops the messages being delivered, and deletes the message from mail.box.

3) Open the database you created at step (1), and add an agent/action/etc that:
a) Creates a new field in the email called "$DNSWLSite" And apply the value "Authorised" (or whatever phrase you used at 2 (d)).
b) Copies the document back to the server's Mail.box
c) Deletes the message from the Quarantine database

3(a) is the critical step for this process, as it flags the record with the Domino Whitelist Tag field containing the text you are using to let the message through, before putting the message back into the server's mail.box.

You might also want to create a notification agent in this database that alerts an appropriate person that a message sent to more than "X" number of people needs approval for delivery.

Finally, I used the Mail template for the Quarantine database so that you can simply use the standard "Reply" action to create an email to the sender explaining why you didn't allow the message to be delivered to "X" number of users.

Enjoy :-)
Comments

1Mark Bennett  09/20/2011 16:44:26  
Preventing users sending messages to >X number of recipients without approval - quick’n’easy

Great 'feature' and all without anything new. Does it count a group in the address line as 1 or the number of members in the group?

2Mat Newman

09/20/2011 17:01:05  Preventing users sending messages to >X number of recipients without approval - quick’n’easy

@1, Mark: It's clever enough to count group members, thus your EveryOneInThisCompany group is however many people, not just 1 :-)

Mat Newman IBM Champion

3Scott Beattie  09/20/2011 19:05:38  
Preventing users sending messages to >X number of recipients without approval - quick’n’easy

Great tip/solution Mat ...

Another good tip is to use the view restrictions on a EveryOneInThisCompany group document and only allow authorised people/servers to view the group. This prevents unauthorised people from trying to send mass emails. Domino is full of great "out of the box" solutions :)

4Shane Springer  09/20/2011 20:29:27  
Preventing users sending messages to >X number of recipients without approval - quick’n’easy

Excellent Mat, just what I am looking for....cheers

5Dan Soares  09/20/2011 23:01:29  
Preventing users sending messages to >X number of recipients without approval - quick’n’easy

Nice!

We have a group in our Domino directory that contains the list of people who are authorized to send emails to our various groups (All Faculty, All Staff, etc).

Each of those groups in turn is set up to only be viewed by the Domino servers and the authorized group. Unauthorized staff do not even see the group.

Of course with your solution, an explanatory email can be sent to staff who are not in the white list and who attempt to send an email to > 1 user. Are there any other obvious advantages to your solution?

Dan

6Mat Newman

09/21/2011 8:57:54  Preventing users sending messages to >X number of recipients without approval - quick’n’easy

@4, Shane: Welcome back to Notes mate, enjoy the enhanced experience :-)

@3, Scott & @5, Dan: Agreed, using 'secured' groups is a simple way to 'hide' those groups from users doing type-ahead or browsing address lists, however it does not prevent users from sending a message with that group name to the server if they know it. This solution flat-out stops anyone sending messages to any number of users greater than 'X'.

Another solution we have implemented for a number of customers uses a central database that send's doc-links to that content, rather than sending an email with the entire content to everyone. This ensures that only authorised people can send messages to 'Everyone' (Those listed as 'Authors' in the database ACL), while reducing network traffic and storage requirements since the content is stored in a central database, rather than distributed to everyone's mail database. This solution can be easily combined with that mentioned in this post, since one only needs add the '$DNSWLSite' field to the outgoing notification. The other benefit of the central storage and distribution database is that you have a history of corporate comms in a central place that all users can browse and search.

Mat Newman IBM Champion

7Lance Sittig  10/19/2011 1:52:16  
Preventing users sending messages to >X number of recipients without approval - quick’n’easy

This would be great! However, I'm finding one hiccup implementing it in our environment. Do you have to have the word "Authorized" somewhere else in the server configuration doc for it to be added as a whitelist tag? When I try to create the condition in the rule it defaults back to just AND contains Authorized instead of AND WhiteList tag contains Authorized...

8Grant Lindsay  11/13/2011 6:46:50  
Great tip -- My small enhancement

Hi Matt,

Great tip on how to use Domino's built-in flexibility. The following little (untested) refinement could make things a bit easier:

Use one Mail Rule, like so:

Condition:

When

Recipient Count is greater than XX

Except when

WhiteList tag contains Authorised

Action:

move to Database foo\bar.nsf

One rule is easier to set up and manage. Also, since there is no "Stop Processing" action, other rules that need to be processed will be.

I haven't tried this at all, so use at your own risk.

One caution: Since the "move to" database needs to be local to the server executing the Mail Rule, there will need to be a copy or replica of it on each server. Domino won't create if for you. If it is missing, the message will be discarded and lost forever.

9Giannandrea  08/09/2012 23:32:25  
Preventing users sending messages to >X number of recipients without approval - quick’n’easy

Hi Matt,

what can i say ... as usual, simply BRILLIANT !

10Renaldo  03/11/2015 13:54:55  
Preventing users sending messages to >X number of recipients without approval - quick’n’easy

Hi Mat,

im need your help because im new with IBM Lotus,

i cant move the email to new database...

im already create new database with Mail Template,

im already create rule...

the email is success not delivered

but i cant see the mail on new database..

need your advice...

thanks

Renaldo

11Inam  08/27/2015 4:18:21  
** URGENT- message prompt with recipients count

Hi Mat,

Do you have any script that checks how many recipients are there under the "SendTo" field and give a pop-up message to the sender that " Hey, you are sending this email for x number of recipients. Do you want to continue?".

If the user clicks on "Yes" then continue to the sending process.

If user clicks "No" then no action. Just leave the user at the current message window.

Please share the code.

Thank You Very much in Advance.

Mat Newman

THE Lotus Notes Guy. Productivity Guru. Social Evangelist. IBM Champion for IBM Collaboration Solutions, 2011/2012/2013. IBMer. Views are my own.

#GetProductive #GetLotusNotes

Mat Newman

New to IBM Lotus Notes? START HERE



I'm attending. IBM Software.
      Lotusphere 2012. Business. Made Social. January 15 - 19. Orlando,
      FL. Drive Adoption for IBM Connections



Home  | 

Get Serious. Get Domino.