To setup MacOS Mail.app to filter mail using the header information added by the SpamAssassin service you need to do two things. First, you must create a folder into which suspected spam messages will be transferred. And second, you must create a filter rule which will check the Spamassasin headers and perform the filtering.
Create the Spam folder
Since Mail.app has its own Spam mail filtering system, you may already have a mailbox (usually named "Junk") into which suspected spam could be filtered. If this folder does not exist, then you must create it.
To create a folder to hold suspected spam (assuming that you don't have one already)...
- In the
Mailboxmenu, choose the
A dialogue box will appear that contains a field allowing you to name the new mailbox, and pop-up menu allowing you to specify where the mailbox should be created - on your local machine or on your staffmail account (there may be other options available if you have more email accounts). It's recommended that you don't use a mailbox on your local machine - at least until you are happy that the filtering is working correctly.
- Once you've selected a location for the mailbox, and named it,
and click on the
OKbutton to create it.
Creating a filter to deal with suspected spam
You need to create a filter which will check whether messages are
likely to be spam. This filter will work by checking for information
added to the message headers by the SpamAssassin service. Specifically
you will be checking the value of the
To create the filter...
- In the
- Click on the
Rulesbutton in the toolbar, then click on the button labelled
- A sheet will drop down from the Rules window which allows you to set up the new rule.
- Give the rule an appropriate name by typing in the field labeled
- Click on the pop-up menu currently labeled
From, and select the final option,
Edit Header List...
- In the window that appears (entitled
Message Headers), click to add a header.
X-Spam-Levelin the Header: box then click the OK button to return to the rule specification sheet.
- Now you must set the adjust the condition dialog boxes for the new header
is equal to
- Finally, enter the value
Now that you have told the rule which messages to select, you use the pop-up menus on the lower part of the sheet to tell the rule what to do with these messages.
- Set the dialog boxes to
Move Messageand set the destination to be the spam folder you created (in this example we use the
- Click the OK button at the bottom of the Rules sheet. This rule will now become active. Close the Rules window.