By default, the bodies of messages and certain attachments are indexed to enable fast word searches through the entire database. This global search is invoked from the search toolbar:
When hitting the Enter key or pressing the Find button, all messages that match the search terms are retrieved and displayed in a new results page. Also the searched words are highlighted on screen within the body of messages, until the user clears the search box input field.
The search is case insensitive and will ignore words containing only one or two characters, or more than 50, or that are declared as stopwords in the database. Email addresses can be searched directly, by typing them in full or in part (domain name or part of domain-name, first name, lastname) Compound words can be search in full or by one of their components, if longer than two characters.
Searching for exact sentences including space or punctuation is done by enclosing the sentence inside double-quotes. See also the substring search capabilities of the Query command (
).Search operators are supported to filter on the status, date, senders or recipients of messages. Multiple conditions are implicitly joined with a logical AND.
Table VI.1. Search expressions
Operator | Example | Description |
---|---|---|
from | from:name@example.com | Find messages with a specific email address in their From header. |
to | to:name@example.com | Find messages with a specific email address in their To header. |
cc | cc:name@example.com | Find messages with a specific email address in their Cc header. |
date | date:2015-07 | The possible formats are YYYY-MM-DD to select
messages from exactly that day, or YYYY-MM for messages
from that month, or YYYY to filter on a year.
The special values today and yesterday
are also interpreted. |
before | before:2016 | Accepts the same format as date , and selects the messages
older or of the same date than the argument. |
after | after:2016-05 | Accepts the same format as date , and selects the messages
newer or of the same date than the argument. |
is (status) | is:read | Find messages with the indicated status.
The recognized values for statuses are
read ,
replied ,
forwarded ,
archived ,
sent .
Statuses are cumulative, so this search criterion can be present several times with
different arguments.
|
isnot (status) | isnot:archived | It stands for the exact opposite of is and accepts the same arguments. |
tag |
| Find messages to which a specific tag is assigned. Double quotes may be used to enclose a tag name containing separators. Any double quote in the name itself should be escaped by a preceding backslash. The hierarchy separator for tags is the sequence of two characters -> (minus sign followed by right angle bracket). If that sequence happens to exist as an integral part of a name inside the hierarchy (not recommended), it should be backslash-escaped in the tag. For instance, tag:"ab-\>cd" refers to a tag named ab->cd , with only one level of hierarchy. |
filename | filename:report | Find messages with attachments whose name contains the indicated string. The match is case insensitive. |
filesuffix | filesuffix:doc/docx/pdf | Find messages with attachments whose name ends with a dot followed by one of the indicated suffixes. The match against suffixes is case insensitive. |
msgid | msgid:8cfb6e4ad@example.com | Find messages from their Message-Id header, normally unique (but this unicity is not enforceable). Enclosing brackets (<>) are optional. |
id | id:10000 | Find a message from its internal mail_id , guaranteed to be unique within the database. |
Accents can be ignored in search in order to find words whose accents or
diacritic marks may lack or differ across messages.
This behavior can be controlled with the "Accents & diacritics marks"
setting from the Preferences Search tab.
A specific search can always override this choice by including the dedicated operator:
accents:insensitive
in the search expression, or its abbreviation accents:i
.
Conversely, an exact match on accents can be required by specifying accents:sensitive
or the shorter equivalent accents:s
.
The unaccented search feature also depends on the full-text indexer
settings (see Section XV.1, “Server's configuration”), but it is enabled by default.
Results can also be filtered out by specifying words that must
not appear in the searched messages. To exclude a word from the search, a minus sign (dash) is added before that word.
Example:
tennis mary -pierce
will retrieve messages that contain the words tennis and mary and do not contain pierce.