|
|
|
|
|
|
|
|
|
|
|
|
|
|
FIGHT BACK AGAINST SPAM
Hacking Domino mail rules to fight spam
By Daniel Koffler
Have you ever wished Domino's mail rule system had more power? Wouldn't you love to be able to create server mail rules that can act on messages tagged by 3rd party products such as Spam Assassin or be able to create white-lists for use with Domino's built in DNS blacklist feature? How about processing SMTP messages based on the hostname given in the helo/ehlo command or based on the source IP of the sender?
All these features and more can be yours with a little creative hacking of Domino's existing mail rule system. This article will demonstrate how to make these changes so that you too can create rules like those depicted in Figure A.
FIGURE A
 
There are many custom mail rule possibilities. Roll over picture for a larger image.
If you are unfamiliar with mail rules see http://www.dominopower.com/issues/issue200310/00001117001.html before continuing.
An important caution Mail rules in both the Domino Directory and the user mail template rely on the same design elements. The following changes will work in both places, though this article will concentrate on the Domino Directory. Don't forget about design inheritance. If you make changes to either names.nsf or a user mail file, make sure you either add the changes to the inherited template or turn off inheritance in the database's properties so your changes are not lost. The following changes have been tested on Domino 6.01 and 6.5 but should run on any Domino 6 or later system.
What is a mail rule? It turns out that a mail rule is really a two-part Domino formula stored in a field named $FilterFormula on the Mailrule form. The first part of the formula is a SELECT statement that chooses which messages to act on and the second part of the formula is a @Do function that contains actions to take on matching messages.
Imagine (not hard) that you need a mail rule to deal with messages containing a certain bodily-enhancement medication, as shown in Figure B.
FIGURE B
 
This mail rule tells Domino to hold messages that have a certain medication as the subject. Roll over picture for a larger image.
As an example, the mail rule shown above has a $FilterFormula field with the following value:
SELECT @If((Subject="viagra"); ( @Do( @SetField("RoutingState";"HOLD"); @SetField("RoutingStateBy";"2") ) ); "" )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done.
Native to Lotus Domino. The User Experience unseen for Lotus Domino.
Do more with less. Really.
See the possibilities Docova unleashes for Lotus Domino. |
-- Advertisement --
Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.
Register by April 10 to save $200. |
|
|
|
|
|
|
|
|
|
|