Searching messages.
Max Vorobuov
vmax0770@gmail.com
Andre Klapper
ak-47@gmx.net
Novell, Inc

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Rafael Fontenelle
rafaelff@gnome.org 2021
Leônidas Araújo
leorusvellt@hotmail.com 2022

# Searching Mail

# Searching in a Single Message

To find text in the displayed message, select Edit Find in Message… from the main menu.

# Searching Across Messages

## Pesquisa rápida

In the mail view, you can quickly search for messages by defining conditions.

Click on the search icon to expand the drop-down list.

Selecione a condição de pesquisa na lista.

Some searches might be slow on remote mail accounts (e.g. IMAP+). If you select a search condition like Body contains or Message contains and Evolution is in online mode and the folder(s) you are about to search in are not already copied locally for offline usage, Evolution automatically runs the search on the mail server side if the server advertises support for server-side searches. When doing a search on search criteria already locally available (e.g. recipients or subject of messages), the search will be run locally.

Select the scope from the drop-down list right to the text box.

For the Current Account scope, the term "account" refers to top-level nodes in the mail folder list, like "On this computer" and remote mail accounts.

Digite o texto que deseja pesquisar e pressione Enter.

Evolution exibe os resultados da pesquisa.

If you start directly from the fourth step, text will be searched in mail's subjects and addresses and scope will be "Current folder".

If you search for messages that are not in the same folder rather often you might want to create a search folder instead; see Using Search Folders for more detail.

Se você deseja definir várias condições de pesquisa, deve usar uma pesquisa avançada, descrita abaixo.

## Pesquisa avançada

Select the Search Advanced Search menu to open the dialog box.

Click Add Condition to add any number of rules.

Select the condition from the dropdown list, and then type a search entry in the field.

Click OK to get the search results displayed.

## Clearing the Search results

To clear your search view and get back to the default view, click the Clear icon in the search string field, or choose Search Clear from the menubar. You can also press Shift Ctrl Q to clear the search.

## Pesquisas salvas

If you search for something rather often, you will prefer not to type it many times. In this case you can use saved searches.

To save your search results, either click Save instead of OK in the Search dialog, or in case the search results are already displayed, select Search Save Search. From now on this search will be directly available from the Search menu.

## Editar pesquisas salvas

Select Search Edit Saved Searches from the menu bar to open the window.

Click the Edit button to open the Edit Rule window.

Edit the title or search conditions from the dialog box.

Click OK.

## Expressão de formulário livre

One of the search conditions is a Free Form Expression, which allows defining complex conditions. As the first step, the given Free Form Expression is divided into words. If the word doesn't have any (known) tag prefix, then the value is checked whether it is in headers To, CC or Subject. In case of a white-space or any other special character is needed, then enclose the word into double quotes. To get a double quote double it inside quoted text; example: `cite ""here""` is parsed as one word `cite "here"`. For example, `f:John Smith` filters messages for the From containing `John` and the To, CC or Subject containing `Smith`, while `f:"John Smith"` filters messages for a sender `John Smith`.

The syntax of the tags is `<tag>[-<options>]:value`. The tags are:

Tag | Abbreviation | Meaning
from | f | From header should match (*)
to | t | To header should match (*)
cc | c | CC header should match (*)
recips | r | To or CC headers should match (*)
subject | s | Subject header should match (*)
list |  | Mailing list header should match (*)
header | h | given header should match (*) the syntax is: `h:headerName=value` while the equal sign is used only as a delimiter, not as a match rule
exists | e | whether given header exists
tag |  | given user tag is set on a message
flag |  | whether certain flag is set; known special values are: `Answered` - the message is marked as replied `Deleted` - the message is marked as deleted `Draft` - the message is marked as draft `Flagged` - the message is marked as important `Seen` - the message is marked as seen (not unread) `Attachment` - the message has an attachment Any other value is checked for its non-emptiness.
label | l | whether certain label is set on the message
size | sz | whether message size, in KB, is equal to the given value Two options are recognized, `<` to get messages with smaller size, and `>` to get messages with bigger size than the given. Example: `size->:1024` filters messages which are more than 1MB large.
score | sc | compares `score` tag on the message against given value; default compare is equal, but, similar to `size` a `<` and `>` options can be used
body | b | checks message body for an existence of the given word; default compare options is for `contains`, but a regular expression can be used if the option is one of the `regex`, `re` or `r`.
sent |  | message's Sent date should match (**)
received | rcv | message's Received date should match (**)
attachment | a | message has (if the value is not any of `no`, `false`, `0`) an attachment. Similar to `flag:attachment` tag.
location | m | Checks message location. The location value (URL) can be found in the folder Properties. Example: `location:"On This Computer/Inbox"`
mid |  | Compares message ID.

(*) Header comparisons can have a matching type option. The default is to check for a `contains`. The available options are:

Option | Abbreviation | Meaning
contains | c | matches with contains
has-words | w | matches if contains whole word
matches | m | value's exact match
starts-with | sw | header value starts with the given value
ends-with | ew | header value ends with the given value
soundex | se | header value sounds similar to given value
regex | r | the given value is a regular expression
full-regex | fr | another type of a regular expression

(**) Dates can be written relatively (positive number means `in the last X days`), while negative goes into the future. For example, to get messages received in the last 10 days use: `recv:10`. An exact date can be used as well, the format can be either `YYYY-MM-DD` (the preferred one), then ISO 8601 format or a date/date-time locale specific format. If the date/time parse fails, then the condition is skipped. The date compares can have extra options too, it's `<`, `=` or `>`, where the `>` is the default compare option.

There are three special tags, which require special notation. They are:

`not:(....)`

`and:(....)`

`or:(....)`

which allows to create specialized expressions. The default (the most outer) conjunction is `and`. To change it to `or` enclose the whole filter into `or:(....)`. For example: `f:Bugzilla t:John` filters all messages which contains `Bugzilla` in the From and `John` in the To, while `or:(f:Bugzilla t:John)` filters messages from Bugzilla or addressed to John.

## Free Form Expression examples

A list of some free form expressions follows:

Expressão | Meaning
`f:John` | Messages from `John`
`s-has-words:"green blue"` | Messages, which contain both `green` and `blue` words in the Subject
`r-ew:example.com` | Recipients' address (To/Cc headers) ends with `example.com`
`h-starts-with:Cc=Alice` | The `Cc` starts with word `Alice`
`e:X-Secret-Header` | An `X-Secret-Header` exists in the message
`l:work` | Label `work` is set on the message
`sz-<:10` | Message size is less than 10KB
`sz->:100` | Message size is more than 100KB
`b:important` | The body contains a word `important`
`sent:7` | Messages sent in the last 7 days
`rcv-=:2020-02-02` | Messages received on the February 2nd, 2020
`a:1` | Messages with attachment
`a:0` | Messages without attachments
`and:(or:(r:Alice r:Bob) not:(r:Smith))` | Messages whose recipient is `Alice` or `Bob`, but not `Smith`
`f:Bob rcv->:2020-01-01 rcv-<:2020-12-31` | Messages from `Bob`, received during the year 2020
`not:(flag:Seen) f:Bob rcv->:2020-01-01 rcv-<:2020-12-31` | Unread messages from `Bob`, received during the year 2020
`flag:Seen a:1 sz->:1024 f:Bob rcv:31` | Read messages with attachment larger than 1MB from `Bob`, received during the past 31 days
`m:"On This Computer/Inbox"` | Messages stored in the `On This Computer/Inbox` folder
`location-no:"On This Computer/Inbox"` | Messages stored in all but the `On This Computer/Inbox` folder