Email:   
Home
In This Issue
EasyPrint
Click here for the RSS feed's XML code. This is not a browser URL.
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. Click 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. Click 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") ) ); "" )





[ Next ]

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
-- Advertisement --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

Virtual Meeting - Integrating Sharepoint With Lotus Notes: Strategic Coexistence
No more hassles accessing SharePoint documents from Notes! Mainsoft SharePoint Integrator combines SharePoint document sharing, collaboration, and record management capabilities with Notes emails. Preview version 1.5 during our October 7th Virtual Meeting. Learn to incorporate Notes emails and attachments into a MOSS-based record management site, without migrating to Outlook.

Register to attend today.
Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
Editor's Login