Operators reference
Mbox Viewer understands the Gmail search operators and adds a few of its own. An operator is a
word followed by a colon, such as from:, and the value comes right after the colon with no
space. Operators combine freely with plain words, OR, the minus sign and parentheses. Press ?
in the app to see the same list.
Which operators search the addresses?
| Operator | Example | Finds |
|---|---|---|
from: |
from:liam |
the sender, by name or address |
to: |
to:emma.carter@gmail.com |
a To recipient |
cc: |
cc:olivia |
a Cc recipient |
bcc: |
bcc:jack |
a Bcc recipient, when the header is in the file |
The app indexes each address in pieces. For john.doe@example.com it indexes john, doe,
example.com and the full address. That is why from:john, from:example.com and
from:john.doe@example.com all find the same message.
Which operators search the text?
| Operator | Example | Finds |
|---|---|---|
| words | electricity invoice |
all these words, in the subject, addresses, body or attachment names |
"…" |
"kickoff meeting" |
the exact phrase |
subject: |
subject:résumé |
words in the subject |
body: |
body:budget |
words in the message body |
filename: |
filename:pdf |
an attachment name or extension |
* |
invoic* |
words that start with "invoic" |
A value with spaces goes between quotation marks. Type subject:"weekly report" to search a two-word subject. A prefix
search finds every matching word in the mailbox. Highlighting is limited to the most frequent
matches, and the app says so with a warning.
Which operators filter by state, label, tag or folder?
| Operator | Example | Finds |
|---|---|---|
has:attachment |
has:attachment from:sophie |
messages with at least one attachment |
label: |
label:"Category Promotions" |
a Gmail label |
is: |
is:unread |
unread, read, starred or important messages |
in: |
in:sent |
inbox, sent, drafts, spam, trash or anywhere |
tag: |
tag:"Client Atlas" |
messages with this tag |
folder: |
folder:Trips |
messages in this virtual folder |
thread: |
thread:<id> |
the messages of one conversation |
label:, is: and in: work on your Gmail labels and system labels,
and folder: reads the virtual folders you saved.
Which operators filter by date and size?
| Operator | Example | Finds |
|---|---|---|
after: |
after:2026/03/01 |
messages from that day on (inclusive) |
before: |
before:2026/04/01 |
messages before that day (exclusive) |
newer_than: |
newer_than:7d |
messages younger than 7 days |
older_than: |
older_than:1y |
messages older than 365 days |
larger: |
larger:2M |
messages bigger than 2 MB |
smaller: |
smaller:500K |
messages smaller than 500 KB |
Every accepted format, unit and edge case appears in Dates, sizes and attachments.
How do I combine terms?
| Syntax | Example | Meaning |
|---|---|---|
| space | atlas budget |
both terms must match |
OR or | |
from:sophie OR from:jack |
either term matches |
- |
atlas -budget |
the term must not match |
( ) |
subject:(atlas budget) |
groups terms together |
{ } |
{from:sophie from:jack} |
any of the terms matches |
The word AND is accepted and ignored, because a space already means "and". Two minus signs
cancel each other, so --atlas is the same as atlas.
OR binds tighter than the space, and Gmail follows the same rule. The query a b OR c d means "a, and b or c, and
d". It does not mean "a b, or c d". Write (a b) OR (c d) for the second meaning.
How do operators apply to a group?
An operator in front of parentheses applies to every bare word inside them.
subject:(atlas budget) finds messages whose subject contains both words. from:{sophie jack}
finds messages sent by Sophie or by Jack. An operator written inside the group keeps its own
meaning, so subject:(atlas from:olivia) looks for "atlas" in the subject and Olivia as the
sender.
Groups can be nested 32 levels deep. The app flattens any deeper level and shows a warning.
What do the search warnings mean?
Mbox Viewer never rejects a query. It runs what it can and lists the problems under the search bar. The app shows at most 20 warnings per search.
| Warning | Cause |
|---|---|
| Unknown operator “foo:” (searched as text) | the word before the colon is not an operator |
| Missing value for from: (ignored) | nothing follows the colon |
| Unsupported value for is: “archived” (ignored) | the operator does not accept this value |
| Invalid date for after: “2026/13/01” | the date does not exist or has the wrong format |
| Invalid duration for newer_than: “7” | the unit d, w, m or y is missing |
| Invalid size for larger: “1.5M” | sizes must be whole numbers |
| Unknown tag: “Clients” | no tag has this name in this mailbox |
| Unknown folder: “Taxes” | no folder has this name in this mailbox |
| Unclosed parenthesis | a ( has no matching ) |
| Unclosed quotation marks (the phrase runs to the end of the query) | a " has no closing mark |
| OR without a right operand (ignored) | nothing follows OR |
has:nouserlabels is not supported. The app ignores it and says so in a warning.
Frequently asked questions
Does Mbox Viewer use the same search operators as Gmail?
Mbox Viewer uses most of the Gmail operators. It reads from:, to:, subject:, label:, has:attachment, is:unread, after:, older_than:, larger:, OR, - and { } the way Gmail does. It adds body:, tag: and folder:, and it does not support has:nouserlabels.
Do I have to type OR in capital letters?
Yes. Only OR in capitals means "either one", and Gmail applies the same rule. A lowercase or is searched as a normal word, and | works as a shorter form of OR.
How do I exclude a word from a search?
Put a minus sign right before the word or the operator. atlas -budget finds messages with "atlas" and without "budget", and -from:noreply leaves out messages sent from addresses such as noreply@example.com.
How do I search for an exact phrase?
Put the phrase between quotation marks. The query "kickoff meeting" finds those two words side by side. Straight quotes, curly quotes and French quotes « » all work.
How does Mbox Viewer combine AND and OR?
OR binds tighter than the space. The query a b OR c d requires a, d and one of b or c. Use parentheses to change the grouping, and write (a b) OR (c d) for the other meaning.
Can I search for a sender's domain?
Yes. from:example.com finds every message sent from an address at that domain. The app also indexes each part of an address, so from:john finds john.doe@example.com.
What happens with an operator that does not exist?
Mbox Viewer searches it as plain text and shows the warning "Unknown operator". A colon inside a word, as in 12:30 or a web address, stays part of the word without a warning.
Where can I see the operators inside the app?
Press ? or click Search help at the bottom of the sidebar. The Search operators dialog lists each operator with an example, and a click on an example runs it.
Is there a limit on the length of a query?
The app sets no limit on a query typed in the search bar. The MCP tool search_messages accepts queries of up to 2,000 characters.