Module 5 · 5.3
Searching like a pro
Module 5: Organising and finding · Reading time: 9 minutes
Learning objective: After this lesson you can choose the right search field, type, date and scope for every search, and you understand why the webmail sometimes doesn't find something.
Key concepts: search box, search options, Scope, Entire message, Type, IMAP SEARCH, resetting the search
Searching happens on the server
When you search in the webmail, your browser doesn't search your mail: the mail server does. The webmail sends a search command (IMAP SEARCH) to the server via IMAP, for example: "give me the messages in Inbox whose sender contains ahmed". The server sends back the numbers of the matching messages, and the webmail shows them.
That explains a few things:
- Searching is just as fast on an old laptop as on a fast computer, because the work happens on the server.
- You search everything on the server, including messages from years ago that your mail program no longer downloaded.
- What the server doesn't see as text, it can't find. The text inside an attachment, such as a PDF or a Word file, isn't searched. So you won't find a word that only appears in the quote sent as an attachment. Search by sender, subject or period instead.
Where you search: the fields
By default the webmail searches the subject and the sender. Use the arrow in the search box to open the search options and choose where the webmail looks. You can switch on several fields at once; a message then counts as a match if the word appears in at least one of those fields.
| Field | Where the webmail searches | Example |
|---|---|---|
| Subject | the Subject header | "quote" |
| From | the From header, name and address | "ahmed" or "example.net" |
| To | the To header | the address of a supplier you emailed |
| Copy | the Cc header | someone who was copied in |
| Bcc | the Bcc header (only in mail you sent yourself) | who you copied in secretly |
| Body | the text of the message | a word from the email itself |
| Entire message | headers and text together | when you don't know where the word is |
There are also Reply-To and Followup-To, for the headers with those names. You'll rarely need them.
Why not always use Entire message? Because you get far more matches. If you search for "example.net" in the entire message, you find not only mail from Ahmed, but every email in which that domain appears anywhere: in a signature, in a forwarded email, in a server's header. The more specific the field, the shorter the list.

Type and date: narrowing the list further
With Type you choose which kind of messages you want to see: All, Unread, Flagged, Unanswered, Deleted, Not deleted, With attachment or Priority. This works without a search word too. If you only choose Type With attachment in Sent, you see everything you sent with an attachment.
With Date you choose a period: younger or older than a week, a month or a year. "Older than a year" is handy when tidying up (lesson 5.4), "younger than a month" when you know it was recent.
Type, date and search word work together. Each extra criterion makes the list shorter.
Scope: which folders
The Scope decides which folders the server searches:
- Current folder: only the folder you have open. The fastest and the smallest.
- This and subfolders: the folder you have open plus all folders below it. Handy if you have a Customers folder with a subfolder per customer, or an archive split up by year.
- All folders: every folder in your mailbox, including Sent, Spam and Trash.
When you search several folders at once, each message also shows which folder it's in. That way you immediately see where a message ended up, for example because of a filter.
Watch out for two things. The scope is relative: "This and subfolders" means something different when you're in Inbox than when you're in Customers. And a message you sent yourself is in Sent, not in Inbox. Looking for an email you sent to someone? Then the To field and a scope that includes Sent are the right choice.
An approach in three steps
If you're looking for something and don't know where to start, work from narrow to broad:
- What do you know for sure? The sender, a word from the subject, roughly when. Choose the matching field.
- Where is it most likely to be? Choose the smallest scope that is definitely right.
- Nothing found? Widen it step by step: add Body, then All folders, and only then Entire message. Check Spam and Trash too; All folders searches them automatically.
Search for part of a name if you're not sure of the rest: just the surname "Smith" also finds "Emma Smith". Capital letters don't matter.
After searching, don't forget to reset the search with the cross in the search box. Otherwise the list stays filtered and you'll think mail is missing. The options you chose also stay set for your next search. If you're surprised that an ordinary search suddenly covers all folders, you probably set it up that way last time.
Searching your address book
The address book has its own search box. There you search by name or address, and with Search at the top you can search in more detail, for example by organisation. This is separate from searching your mail. Module 7 covers the address book in more depth.
In practice: how it works in the webmail
The search box is above the message list; the arrow on its right opens the search options with the fields, Type, Date and Scope. The envelope icon in the search box shows only unread messages with one click. The steps are in the Roundcube manual under Searching your mail. Other webmail works in a similar way: Gmail and Outlook.com have a search bar with advanced options, and Gmail supports search terms such as from: and has:attachment.
Summary
- Searching happens on the mail server (IMAP SEARCH); the text in attachments isn't searched.
- Choose the most specific field: From, To or Subject gives less noise than Entire message.
- Type and Date make the list shorter, even without a search word.
- Scope: Current folder, This and subfolders, or All folders. Mail you sent yourself is in Sent.
- Work from narrow to broad and reset the search when you're done.
Quiz
Exercise
Exercise A5.3: Which search? Emma's mailbox has Inbox, Sent, Spam, Trash, a Customers folder with a subfolder per customer, and an Archive split up by year. For each question, choose the Scope (Current folder, This and subfolders or All folders) and the search field (Subject, From, To, Body or Entire message). Always take the smallest scope and the most specific field that will definitely work. 1. Emma has Inbox open. She's sure the email from ahmed@example.net is still there, but she has no idea what the subject was. 2. Emma is looking for an email she sent to delivery@example.org herself. She doesn't know whether it's still in Sent or already in one of the archive folders. 3. Emma has the Customers folder open. She knows a customer once wrote the word "arch" in the text of his email, but not in the subject, and she no longer remembers which customer it was. For each question the program compares your scope and field with the answer key and explains every mistake.
Further reading
Where steps in the webmail are described, they apply to WebOké's webmail; other webmail works in a similar way.
- Roundcube Webmail 9.1: Searching your mail
- Roundcube Webmail 8.1: Adding and finding contacts
- Restore mailbox or deleted emails from the backup
- RFC 9051, IMAP version 4rev2, with the SEARCH command: https://www.rfc-editor.org/rfc/rfc9051
