Notes spam mail filtering: Notes mail rules

Part 1 of 3: How to use the mail rules, a standard feature of Notes mail, to filter spam mail from individuals or entire Internet domains, and how to filter based on the subject or content of the message.

Craig Lordan, Project Manager, Lotus

Craig is the Project Manager for the Lotus Developer Domain. He started at Lotus in January 1998, first working in the Notes/Domino documentation group. In August 1999, he joined Iris Associates to be a writer and then Content Manager for Notes.net. In previous jobs, he was a technical writer at EDS and Harper & Shuman (which has been gobbled up by some company called Deltek). He holds a Business Communication degree from Bentley College in Waltham, Mass. and is still looking for a nice frame for it. When he's not working, Craig is usually spending time with his wife, or watching his tape of last night's Late Show with David Letterman.



01 November 1999

You will learn, by example, how to set up some simple mail rules to filter 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.

Note: For complete instructions on using all the mail rules features, see Notes 5 Help.

Introducing mail rules

In Notes R5, you have a Rules folder in your mail database. This is where you create, store, and manage all your mail rules.

Figure 1. Rules folder
Rules folder

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:

Figure 2. Rule to change importance
Rule to change importance

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

Figure 3. Mail with exclamation point (important)
Mail with exclamation point (important)

What if I don't have a Rules folder?

If you are using Notes R5, but you don't see a Rules folder in your mail database, you probably need to update the design of your mail database to the Mail (R5.0) template design. Check with your system administrator on the correct way to accomplish this task. The general instructions are:

  1. In your mail database, choose File - Database - Replace Design.
  2. Find a template server that has the Mail (R5.0) template.
  3. Select the Mail (R5.0) template
  4. Click Replace, then and click Yes to confirm.

If your mail database does have the Mail (R5.0) design, but you still can't see your Rules folder, check the Database Properties.

  1. In your mail database, choose File - Database - Properties or click the Properties SmartIcon.
  2. Click the Launch tab.
  3. Ensure the "When opened in the Notes client" option is set to "Open designated Frameset" and the Name option is set to "MailFS."
  4. Close and re-open your mail database. You should now see the Rules folder.

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 in the box next to "contains."
  6. Click Add. Your condition appears in the "When mail messages arrive that meet these conditions" section.
    Figure 4. Specify Conditions
    Specify Conditions
  7. Now choose what to do with the spam mail. In the Specify Actions section, choose "move to folder."
  8. 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.

  9. Click Add Action. Your action appears in the section below.
    Figure 5. Specify Actions
    Specify Actions
  10. 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 their name will be moved to the Unwanted folder.

Figure 6. New Rule
New Rule

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 in 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 in the box next to "contains."
  9. Click Add. Your condition appears in the "When mail messages arrive that meet these conditions" section.
    Figure 7. Specify Conditions
    Specify Conditions
  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.
    Figure 8. Specify Actions
    Specify Actions
  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.

Figure 9. New Rule
New Rule

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) in 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) in the box next to "contains."
  10. Click Add. Your exception appears in the "When mail messages arrive that meet these conditions" section.
    Figure 10. Specify Condition and Exception
    Specify Condition and Exception
  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.
    Figure 11. Specify Action
    Specify Action
  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.

Figure 12. New Rule
New Rule

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 are 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.

Resources

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into IBM collaboration and social software on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Lotus
ArticleID=12628
ArticleTitle=Notes spam mail filtering: Notes mail rules
publish-date=11011999