To find a message, type one or more keywords into the Search mail
box at the top of your mailbox, and hit Enter. By default, all folders except shared folders, Spam, and Trash will be searched. If you are currently in one of those folders, then just that folder will be searched instead.
Advanced search
If you're having trouble finding what you're looking for, you can create a more specific search using our advanced search tool:
- Click on the search bar at the top of the page.
- Select the
Advanced search…
option from the menu that appears.
This lets you look for the keywords in specific places (for example the To:
or Subject:
fields), set the date range you want to search, specify whether the email must be unread or pinned, or have a particular type of attachment.
Saving searches
After performing a search, the search term appears in the sidebar on the left of the screen. Click the Save button next to the search to save it, so you can easily search the same thing another time. You can build detailed searches directly in the mail search box by combining options.
Searching by folder or label
in:<foldername>
orin:<label>
By default, all folders will be searched except Spam and Trash. To search a specific folder/label, use the in:
operator with the name of the folder/label, e.g. in:sent
.
If a subfolder/sublabel has a unique name, you can use in:
with that name directly. Otherwise, you'll need to give the whole path, including parent folders, like in:"Mailing Lists/Hiking"
.
You can search inside a label/folder and all its children by adding /*
on the end, e.g. in:"Mailing Lists/*
.
Searching for a phrase
from:<phrase>
to:<phrase>
(searchesTo
,Cc
andBcc
)tonotcc:<phrase>
(searches just To)cc:<phrase>
bcc:<phrase>
subject:<phrase>
body:<phrase>
list:<phrase>
(searches theList-Id
header)
Phrases are matched using stemming: all different forms of the same word match to take into account plurals (fox, foxes) and tenses (fish, fishing, fished). This means, for example, that a search for "bus" will match "buses" but not "business".
If you want to disable stemming and search for an exact word or phrase, surround it in quotes (either '
or "
). For example: "buses"
or from:"Joe Bloggs"
or subject:'string with "double" quotes'
, but not buses
or from:Joe Bloggs
or subject:"must end with same'
. If you want to search for quotes or a backslash \
, put a backslash before the character: use \"
, \'
and \\
.
You can also search for any word that matches a prefix by putting an asterisk (*
) on the end, e.g. bus*
would match "buses", "business", "bust" etc.
Searching by sender or recipient
You can search for messages from a specific address by using the from:
operator with the email address, e.g. from:joe@example.com
.
If you want to find everything from a particular domain, just start with the @, e.g. from:@example.com
.
Similarly, you can search To/Cc/Bcc for an email using the to:
operator, e.g. to:jane@example.com
.
If you want to search just the To header and not Cc/Bcc, use tonotcc:
, e.g. tonotcc:bob@example.com
.
You can similarly search Cc/Bcc headers using cc:
or bcc:
operators. If you want to find messages that were sent to you via a specific alias, use the deliveredto:
operator using deliveredto:me@example.com
.
If you want to search for mail from contacts, or even members of a particular contact group, you can use the fromin:
operator. For messages sent to contacts, you can use the toin:
operator. * fromin:contacts
* toin:contacts
* fromin:"Group name"
* toin:"Group name"
Searching by date
By default, searching looks for all messages, regardless of how old they are. If you'd like, you can narrow your search for a specific date or date range.
Searching in attachments
The search function finds matches inside attachments as well as in file names.
If you want to find a specific file or attachment, you can enter one or more keywords into the Search mail
box at the top of your mailbox, and hit Enter.
Searching for attachments
You can find all messages with attachments using has:attachment
. To search for a particular file name, use filename:<phrase>
.
Attachments of particular type can be found with the filetype:<type>
operator. You can specify a MIME type, or one of the following special values:
image
document
spreadsheet
presentation
PDF
.
Some systems may generate emails with attachments with the wrong or "missing" MIME types, in which case the search may fail to find the expected emails.
Searching by message list
You can search for messages from a particular list id using list:foo.example.com
.
Searching other headers
You can search for the existence of a particular header using header:<headername>
.
You can also search for messages that include a particular string of text within the header using header:<headername>:<text>
.
Searching for a specific ID
If you know the message id you are searching for, you can use the msgid:<id>
operator to find it directly.
Searching by message size
smaller|maxsize:<size>
bigger|larger|minsize:<size>
A size is specified in bytes, with an optional suffix k
, m
, or g
, e.g. larger:10m
.
Combining searches
Operators to join search terms must be uppercase.
AND
— doesn't do anything, since this is the default.OR
— e.g.from:rob OR from:richard
.NOT
— applies to the term it comes before. For example,since:"1 week ago" from:rob NOT subject:"new web interface"
would find any messages from Rob in the last week that are not about the "new web interface".()
— grouping, e.g.(from:rob subject:"new web interface") OR subject:urgent
. This finds any mail from Rob with "new web interface" in the subject line, as well as mail from anyone with the subject "urgent".
You can also substitute the characters +
and -
for AND
and NOT
, respectively. In this case, -subject:"Flight"
will return all mail where the subject does not contain the word "flight".
Searching by message state
has|is:<boolean>
filetype:image|document|spreadsheet|presentation|pdf
flag:<flag name>
The following states can be specified with the has
or is
keyword:
read
orseen
unread
orunseen
pinned
orflagged
unpinned
orunflagged
replied
oranswered
unreplied
orunanswered
attachment
orhasatt
noattachment
orhasnoatt
ornoatt
draft
undraft
For backwards compatibility, we also support writing a term in UPPERCASE without the has
or in
keyword prefix. For example, the searches UNSEEN HASATT
or is:unread has:attachment
are the same, and will both show all unread messages with attachments.
The filetype keyword finds emails with attachments of the given type. It does this by looking at the MIME type of the attachments. Some systems may generate emails with attachments with the wrong or "missing" MIME types, in which case the search may fail to find the expected emails.
You can search for a specific IMAP keyboard using keyword:<keyword name>
.
Searching for contact mail
If you want to search for mail from contacts, or even members of a particular contact group, you can use the fromin:
operator. For messages sent to contacts, you can use the toin:
operator.
fromin: contacts
toin: contacts
fromin: "Group name"
toin: "Group name"
Searching by priority
If you want to search for messages marked as high priority by the sender, you can use the priority:high
operator.
Making a rule from search
Want to move all messages from a search to a folder, mark them as read, or pin them? You can - by making a rule from search.
To take make a rule for emails meeting a search term, click on the Create rule button to the right of the search box. This will pull up our rules creation menu, so you can quickly build a rule based on your search query.
For more information on rules, take a look at Organizing your inbox with rules.
Can I search using regex?
We support regular expressions for incoming rules, but not for searching. Fastmail uses indexing to make searching your mail fast, and we're unable to evaluate a regular expression against the index. To support regular expressions we'd be loading each message in your account, which would be too slow to be usable. Instead please use the search operators listed above, or contact our support team for help with your search.