Search DominoPower's 11,323 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
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") ) ); "" )


1  ·  2  ·  3  ·  4  ·  Next »
Other articles you might like
Home > Strategies > Email Management (60 articles)
   Using the Notes Client with Gmail
   Using the Notes client with Hotmail (or not)
   Is English-only a viable mail management strategy?
Home > Lotus Technologies > Domino (77 articles)
   More about Domino log files
   Why your log.nsf might not be purging properly
   Sloppy analysis at the core of another Domino vs. SharePoint report
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Five trends for 2010
DominoPower TV Episode 1: Inside a strategy session with Teamstudio
More about Domino log files
Say goodbye to the Uh-Ohs. Long live the Tens.
Why your log.nsf might not be purging properly
Latest Lotus Headlines
Recommended Maintenance - Lotus Notes Traveler
Here are the slides and other materials from our Lotusphere session
Microsoft OCS awareness in Lotus Connections and Websphere Portal?
SnTT: XPages Blank Calendar Control (Part 2), adding data
Have your Lotus Notes calendar display multiple time zones
Sample Database for Microsoft Office and Lotus Symphony Integration
Symphony 3.0 beta signals another attack on Office
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad: Apple's latest heartbreaker
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Running auto-respond rules when Outlook is closed
-- 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 --

Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino

  • Don't spend unproductive time maintaining different versions of the same spreadsheet
  • Preserve data integrity and security in multi-user environments
  • Create reports in minutes INSIDE Notes
  • Get freedom from iterative report requests, deliver self-serve capabilities

Experience Reporting, Dashboards, and Analysis INSIDE Notes.

Try IntelliPRINT NOW!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login