Filters in Opera's Mail Client
On this page you will find some information about user filters in Opera's mail client (known as Opera Mail or M2). It is not as comprehensive as the Opera Mail Filter Guide (yet), but it contains some tips to better understand how filters work.
What you should know about filters
- Filters do not contain messages; they only display them.
- If you Delete a message from a filter, it will be removed from all access points and appear in Trash.
- You can remove a message from a specific filter (without deleting it) by pressing CTRL+X.
- Filters were previously known as views (Opera 7.x, x<50); the "predefined filters" are called access points.
- A filter can act as a folder if you enable Mark messages as filtered in its properties and disable View > Show > Show filtered (see the mail toolbar) for all other access points.
- If you enable Learn from messages added from and removed from filter in the filter's properties, the filter will learn from both manually removed mail and manually or automatically added mail.
What you should know about filter rules
- Filter rules are only applied to new messages, unless you enable Filter existing messages in the filter's properties.
- Rules can only add messages to a filter; they cannot remove messages.
- As a consequence, if you change the set of rules for a filter, the filter will include all messages it previously displayed plus the messages matching the rules. If you want to start from scratch, then either create a new filter or remove all messages from the filter before applying the new rules.
- The logical operator AND is applied before OR when combining rules.
Combined filtering rules
Consider the following fictitious e-mail headers:
From: emma@yahoo.com
To: john@hotmail.com
Date: 26 jul 2005 11:42
Subject: birthday
From: john@hotmail.com
To: emma@yahoo.com
Date: 26 jul 2005 12:00
Subject: Re: birthday
From: emma@yahoo.com
To: anne@operamail.com
Date: 26 jul 2005 12:13
Subject: memory
From: anne@operamail.com
To: emma@yahoo.com
Date: 27 jul 2005 08:07
Subject: Re: memory
To filter certain messages from the list above, you can use these rules:
Match messages where From header contains emma
And where Subject does not contain memory
matches: (1,3) ∩ (1,2) = (1)
Match messages where From header does not contain emma
And where Subject does not contain memory
matches: (2,4) ∩ (1,2) = (2)
Match messages where From header contains emma
And where Subject contains memory
matches: (1,3) ∩ (3,4) = (3)
Match messages where From header does not contain emma
And where Subject contains memory
matches: (2,4) ∩ (3,4) = (4)
Match messages where From header contains emma
Or where Subject does not contain memory
matches: (1,3) ∪ (1,2) = (1,2,3)
Match messages where From header does not contain emma
Or where Subject does not contain memory
matches: (2,4) ∪ (1,2) = (1,2,4)
Match messages where From header contains emma
Or where Subject contains memory
matches: (1,3) ∪ (3,4) = (1,3,4)
Match messages where From header does not contain emma
Or where Subject contains memory
matches: (2,4) ∪ (3,4) = (2,3,4)
Examples of filtering rules
- There is no option available to search the message bodies only. The filter rules can only search the headers separately or the entire message (i.e., headers + message body + attachments). To search the body (including attachments), use the following RegExp: Match messages where entire message matches regexp \n(\n.*)+search_string.