[Skip to content]

Opera

This is what Opera.com looks like when you surf with your mobile!

You can surf on Opera.com with your mobile today. All you need to do is to download and install Opera Mini.

Opera Mini works on almost every phone, and it’s free!

View full site

Using filters to sort messages

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.

Create a filter

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
  1. Right-click the message and select Show in > New filter.
  2. Name the filter in the General tab in Properties.
  3. Set rules and filter settings in the Rules tab.
Create a new filter in the Mail panel
  1. Right-click in the Mail panel and select New filter.
  2. Name the filter.
  3. Right-click and select Properties.
  4. Set rules and filter settings in the Rules tab.
Create a new filter using the Mail menu
  1. Go to Mail > Filters.
  2. Click Filters in Message Filters.
  3. Select New Filter from the menu.
  4. Name the filter and set rules and filter settings in this dialog.
Display a message in an existing filter
  1. Click the Filters header in the Mail panel to expand the filter list.
  2. Drag the message from the message list to the filter.
Select one or more messages to display in a filter
  1. Select the message(s) in the message list.
  2. Right-click on it or them and choose Show in.
  3. Select the filter in the list and select This filter.
  4. If you want to add a rule, select This filter and add rule.

Filter settings

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.

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

Set up filter rules

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:

  • Match messages where the From header contains [a contact's name]
  • Match messages where the Subject contains [a particular subject]
  • Match messages where the From header contains [a name] and the To header does not contain [a name]
  • Match messages where the From header contains [name] or the Subject contains [a subject]

Notes:

  • You can only set rules to add messsages to a filter; not delete messages.
  • Each filter can contain multiple rules.
  • You can use AND, OR in rules; AND is applied before OR when combining rules.

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.

Remove or delete a message from a filter

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.

Delete a filter

To delete a filter, select it in the Mail panel and either:

  • press Delete, then Enter to confirm, or
  • right-click, select Delete and click OK to confirm.

This deletes the filter itself but messages that were in the filter remain in the Received view.