Internet Consultants
What We DoWhat We DoHow We Do ItHow We Do ItWhy FirstLink?Why FirstLink?
Email Support
Lotus Notes

In this article, we learn about a standard feature of Notes mail called Mail Rules. You will learn, by example, how to set up some simple mail rules to filter your spam mail:
> From individuals
> From entire Internet domains
> Based on words in the body or subject of the message

By learning the techniques demonstrated in these examples, you should be able to set up your own mail rules to filter spam mail.

You can create and use mail rules whether you access Notes mail via the Notes R5 client or a Web browser; however, your mail database must reside on a Domino R5 server [FIU's Lotus Notes mail databases are stored on a Domino R5 server].

Note: For more help on using the Mail Rules features, see Notes 5 Help. [click Help on the Lotus Notes Menu bar. Choose 'Mail and Address Book', and then 'filtering new mail using rules.']

Introducing mail rules
In Notes R5 [the Lotus Notes version we are currently using], you have a Rules folder in your mail database. This is where you create, store, and manage all your mail rules.



You use mail rules to perform actions on new messages, based on one or more conditions. The message conditions you can choose are:
> Sender
> Subject
> Body
> Importance
> Delivery priority
> To
> CC
> BCC
> To or CC
> Body or subject
> Internet Domain
> Size (in bytes)
The actions you can choose are:
> Move to folder
> Copy to folder
> Change importance
> Delete

Although the examples in this article focus on filtering spam mail, Mail Rules is a handy feature that allows you to manage all your incoming mail. For example, you can manage messages from your direct reports by moving any messages that include the phrase "status report" into a designated folder. Or, maybe you're waiting for an important e-mail from Aunt Sally - you can change the importance of any e-mail from her.

This rule checks for mail from Aunt Sally:



The result is the importance is changed when you receive a message from Aunt Sally:



Creating mail rules to filter spam mail
What is spam to one person may not be spam to another, so it's up to you to create mail rules telling Notes what you consider to be spam. In the following examples, we will set up three mail rules to filter spam mail - one based on the sender name, one based on the sending Internet domain, and one based on words in the message.

Filter spam mail from individuals
You can create mail rules to filter mail from individuals, based on all or part of their name, no matter what their Notes or Internet domain happens to be. In this example, we want to move any mail from anyone named "Smith" into a folder named "Unwanted."
1. In your mail database, click the Rules folder.
2. Click the New Rule button or choose Actions - New Rule.
3. Ensure the "This rule is" radio button is set to On.
4. In the Specify Conditions section, choose "sender" and "contains" from the drop-down lists.
5. Type all or part of the name of the individual into the box next to "contains."
6. Click Add. Your condition appears in the "When mail messages arrive that meet these conditions" section.



7. Now, choose what to do with the spam mail. In the Specify Actions section, choose "move to folder." Click the Select button to choose the Unwanted folder. Note: If you don't already have an Unwanted folder, the dialog box that appears has a Create New Folder button.
8. Click Add Action. Your action appears in the section below.



9. Click OK at the bottom of the New Rule dialog box.

Your new rule should now appear in your Rules folder. The green check mark means it's enabled. Any new mail from anyone with "smith" in his/her name will be moved to the Unwanted folder.



Filter spam mail from Internet domains In this example, rather than targeting particular people, we create a rule to delete any incoming mail from two different Internet domains.
1. In your mail database, click the Rules folder.
2. Click the New Rule button or choose Actions - New Rule.
3. Ensure the "This rule is" radio button is set to On.
4. In the Specify Conditions section, choose "Internet domain" and "contains" from the drop-down lists.
5. Type the Internet domain into the box next to "contains."
6. Click Add. Your condition appears in the "When mail messages arrive that meet these conditions" section.
7. Choose OR from the AND/OR drop-down list.
8. Type another Internet domain into the box next to "contains."
9. Click Add. Your condition appears in the "When mail messages arrive that meet these conditions" section.



10. Now, choose what to do with the spam mail. In the Specify Actions section, choose "delete."
11. Click Add Action. Your action appears in the section below.



12. Click OK at the bottom of the New Rule dialog box.

Your new rule should now appear in your Rules folder. Any new mail from anyone with the Internet domain of "acme.com" or "example.net" will be deleted.



Filter spam mail based on words in the message But, what if you don't know anything about the senders of the spam mail? You probably have seen many spam mail messages with phrases such as "Get rich quick," or other such language trying to sell you something. Wouldn't it be nice to avoid these messages, no matter who sends them? In this example, we will create a rule to filter spam mail based on words either in the body or the subject of the message.

In this example, we're also going to add an exception, so that messages containing the phrase "get rich quick" but are sent by Aunt Sally are not deleted. (She may offer you an opportunity to invest in her cookie-baking business.)
1. In your mail database, click the Rules folder.
2. Click the New Rule button or choose Actions - New Rule.
3. Ensure the "This rule is" radio button is set to On.
4. In the Specify Conditions section, choose "body or subject" and "contains" from the drop-down lists.
5. Type the phrase "get rich quick" (omit the quotation marks) into the box next to "contains."
6. Click Add. Your condition appears in the "When mail messages arrive that meet these conditions" section.
7. Next to Create, select Exception.
8. Choose "sender" and "contains" from the drop-down lists.
9. Type "aunt sally" (omit the quotation marks) into the box next to "contains."
10. Click Add. Your exception appears in the "When mail messages arrive that meet these conditions" section.



11. Now, choose what to do with the spam mail. In the Specify Actions section, choose "delete."
12. Click Add Action. Your action appears in the section below.



13. Click OK at the bottom of the New Rule dialog box.

Your new rule should now appear in your Rules folder. Any new mail containing the exact phrase "get rich quick," but is not sent by Aunt Sally, will be deleted.



[IMPORTANT NOTE: Keep in mind that having your Mail Rules filters automatically delete mail messages may be somewhat risky; unless you are absolutely certain that a filter is set to intercept only unwanted mail, it is better to divert suspicious messages to a folder like 'Suspicious' or 'Check Later' where you can check them over and manually delete them if they are spam. If you do divert messages to a special folder, make absolutely certain to check on it periodically and delete the messages you do not want. If you do not do this, these messages will pile up and count against your Lotus Notes mail quota].

Making Mail Rules work for you
Now that you have seen some examples of how you can filter spam mail, you can review the full list of conditions and actions and design your own mail rules. You can be creative, mixing several conditions and exceptions within one mail rule, ensuring that you fight spam but do not miss any legitimate messages. You can also order mail rules in your Rules folder, using the "Move Up" and "Move Down" buttons, so that the rules at the top of the folder take precedence over rules at the bottom of the folder.

Try combining Mail Rules with other Notes mail features such as replication. Another example of unwanted, but perhaps not spam, mail is messages containing attached files or a large graphic. For mobile users, it may be time-consuming to replicate these large messages when you dial in to check your mail. You can create a mail rule with a message size condition, perhaps of 1,000,000 bytes (1 megabyte), so that large messages are moved to a "Large Messages" folder. You can then change your Replication Settings to exclude the "Large Messages" folder from replicating to the local mail file on your laptop PC. You can then read these large messages when you return to the office.

As you can see, mail rules provide many different options for filtering your messages, spam or otherwise.

Home  •  Contact Us  •  Testimonials  •  How Can We Help?  •  Support  •  Legal