En brukers håndbok for Evolution
Prev | Chapter 4. Organizing and Managing your Email | Next

# Create Rules to Automatically Organize Mail

Filters work very much like the mail room in a large company. Their purpose is to bundle, sort, and distribute mail to the various folders. In addition, you can have multiple filters performing multiple actions that may effect the same message in several ways. For example, your filters could put copies of one message into multiple folders, or keep a copy and send one to another person as well, and it can do that quickly. Of course, it's also faster and more flexible than an actual person with a pile of envelopes.

## Making New Filters

To create a new filter:

1. Click Tools->Filters

2. Press the Add button.

3. Name your filter in the Rule name field. For each filter criterion, you must first select which of the following parts of the message you want the filter to examine:

   - Sender - The sender's address.

   - Recipients - The recipients of the message.

   - Subject - The subject line of the message.

   - Specific Header - The filter can look at any header you want, even obscure or custom ones. Enter the header name in the first text box, and put your search text in the second one.

   - Message Body - Search in the actual text of the message.

   - Expression - For programmers only: match a message according to an expression you write in the Scheme language, used to define filters in Ximian Evolution.

   - Date sent - Filter messages according to the date on which they were sent: First, choose the conditions you want a message to meet — before a given time, after it, and so forth. Then, choose the time. The filter will compare the message's time-stamp to the system clock when the filter is run, or to a specific time and date you choose from a calendar. You can even have it look for messages within a range of time relative to the filter — perhaps you're looking for messages less than two days old.

   - Date Recieved - This works the same way as the Date Sent option, except that it compares the time you got the message with the dates you specify.

   - Score - Emails have a standard priority range from -3 (least important) to 3 (most important). You can have filters set the priority of messages you recieve, and then have other filters applied only to those messages which have a certain priority.

   - Size (kb) - Sorts based on the size of the message in kilobytes.

   - Status - Filters according to the status of a message, such as 'New'.

   - Attachments - Create a filter based on whether or not you have an attachment in the email.

   - Mailing List - Filter based on the mailing list it came from.

     > How Does Filtering on Mailing Lists Work?: Filtering on mailing list actually looks for a specific mailing-list header called the `X-BeenThere` header, used to identify mailing lists or other redistributors of mail.

   - Regex Match - If you know your way around a regex, or regular expression, put your knowledge to use here.

   - Source Account - Filter messages according the server you got them from. You can enter a URL or choose one from the drop-down list. This ability is only relevant if you use more than one mail source.

4. Select the criterion for the condition. If you want multiple criteria for this filter, press Add criterion and repeat the previous step.

5. Select the actions for the filter in the Then section. You can select any of the following options.

   - Move to Folder - If you select this item, Ximian Evolution will put the messages into a folder you specify. Click the <click here to select a folder> button to select a folder.

   - Copy to Folder - If you select this item, Ximian Evolution will put the messages into a folder you specify. Click the <click here to select a folder> button to select a folder.

   - Forward to Address - Select this, enter an address, and the addressee will get a copy of the message.

   - Delete - Marks the message for deletion. You can still get the message back, at least until you Expunge your mail yourself.

   - Stop Processing - Select this if you want to tell all other filters to ignore this message, because whatever you've done with it so far is plenty.

   - Assign Color - Select this item, and Ximian Evolution will mark the message with whatever color you please.

   - Assign Score - If you know that all mail with "important" somewhere in the message body line is important, you can give it a high priority score. In a subsequent filter you can then arrange your messages by their priority score.

6. Set Status - If you want to add multiple actions for this filter, press Add filter and repeat the previous step.

7. Press OK.

Example 4-1. Using a Filter to Avoid Spam

A good deal of bulk mail is eventually tagged with the `Precedence: Bulk` header at one point or another. Not all of it is, of course, and there are "good" messages (mailing lists you subscribe to, for example) that are also considered "Bulk" mail. However, if you filter out all the mail with that header, you'll catch a lot of the mail you don't want to get.

To catch them and automatically mark them for deletion, do the following:

1. Select Tools->Filters.

2. Click New.

3. Set the first part of your search critera to look in a Specific header.

4. Enter `Precedence` as the name of the header.

5. Choose contains at the second drop-down box.

6. Enter `Bulk` as the content to search for. You're now working with all email that has the word "Bulk" in the "Precedence" header.

7. For actions, select "Move to Folder" and choose the folder where you'd like to place bulk mail.

8. If you like, add another action and choose Delete.

9. Click OK. You're done.

## Editing Filters

To edit a filter:

1. Select Tools->Filters

2. Select the filter in the Filter Rules section and press Edit.

3. Change the desired settings.

4. Press OK in the filter editor window.

5. Press OK in the filter manager window.

## Deleting Filters

To delete a filter:

1. Select Tools+Filters

2. Select the filter and press Delete.

> Changing Folder Names and Filters:

> - Incoming email that your filters don't move goes into the Inbox; outgoing mail that they don't move ends up in the Sent folder. So be sure to change the filters that go with it.

Prev | Home | Next
Searching for Messages | Up | Getting Really Organized with vFolders