Using filters is a very powerful feature of Opera Mail to automatically sort your e-mail into more categories than just the default views. You create these custom filters to suit your own needs. Filters work like tags; you can apply more than one to a message and you can easily view the message from each filter. You can set rules to automatically sort messages or you can drag-and-drop messages into different filters, to use it like a more traditional folder tree, if you like.
When you create your first custom filter, the Filters header displays in the Mail panel. Under this, the custom filters you create display. Unlike the default views, you have complete control over the messages displayed in filters.
There are several ways of creating a new filter or showing messages in an existing filter, as listed in the table below.
| If you want to... | Then... |
|---|---|
| Create a new filter based on a message |
|
| Create a new filter in the Mail panel |
|
| Create a new filter using the Mail menu |
|
| Display a message in an existing filter |
|
| Select one or more messages to display in a filter |
|
When creating a new filter, you have the choice of a few settings, as outlined in the table below. To change the filter settings of an existing filter, right-click the filter and select Properties.
| Setting | Use this setting to... |
|---|---|
| Learn from messages added to or removed from filter | allow Opera Mail to train itself into recognizing which messages belong in the filter, and which do not. This can act as a substitute for adding rules, or in addition to the rules. It learns from the messages you remove or add. |
| Mark messages as filtered | hide filtered messages from all other views (including Labels, Attachments, Unread and Received views). This is the easiest means of simulating folder-based organization of messages. If a message appears in two or more filters with this setting enabled, the message still appears in all of those filters. |
| Mark matching messages as read | automatically mark the filtered messages as read so they do not appear in the Unread view or cause the filtered view to display in bold when new messages arrive. |
| Limit filter to messages in parent | create a sub-filter that searches the messages in the top or parent filter only and not all your messages. Only used for nested filters, that is, filters within a filter. |
| Filter existing messages | apply the filter to all existing messages when creating the filter, as well as future incoming messages. |
The Spam filter has an auto-learning mechanism, that helps it learn from the messages you mark as spam or remove from spam. By setting up a custom filter, you can apply this auto-learning mechanism to standard e-mails as well. To apply this to a filter, check Learn from messages added to and removed from filter when creating a new filter. Initially, the filter needs to learn about your preferences, so it won't get everything right. Move the messages you want in that filter into it. Delete any irrelevant messages that display in it. In this way, Opera Mail can train itself to automatically sort incoming messages based on the pattern of messages you moved or deleted.
You can also specify some basic criteria to automatically sort mail into a filter. To set a rule, select the headers you want Opera Mail to match to incoming messages. You can choose from: Subject, From, To, CC, Reply-to, Newsgroup, Any, message body or entire message. Choose whether you want Opera Mail to filter messages that contain a certain word, not contain a certain word or matches a regexp expression. Then define that word or expression. To change the filter rules of an existing filter, right-click the filter and select Properties.
Some simple rule examples are:
Notes:
You can also define rules using regular expression (regexp) format. This format is used to search and manipulate text based on patterns. Opera uses the same regexp format that is used in ECMAScript and Perl. For more information see the ECMAScript Language Specification section 15.10. The Regex Coach is a free program that helps you experiment with regular expressions and may help you use Opera's regexp support.
To remove a message from a filter view but not delete it from Opera Mail, right-click and select Remove from view.
To permanently delete messages from Opera Mail, see Delete messages.
To delete a filter, select it in the Mail panel and either:
This deletes the filter itself but messages that were in the filter remain in the Received view.