Searching
mailarc search ARCHIVE 'QUERY' [--sort newest|best] [--limit N] [--conversations] [--facets]The same search syntax works in the reader app. Search needs the index; build it once with mailarc reindex ARCHIVE. After that, imports and syncs keep it up to date.
Syntax
Words without an operator search the subject, text, addresses and attachment names and contents, in German and English: rechnung also finds Rechnungen. Quotes search an exact phrase: "vielen dank".
| Operator | Finds | Example |
|---|---|---|
from: | The sender's name or address | from:anna, from:[email protected] |
to: | A recipient in To, Cc or Bcc | to:[email protected] |
subject: | Words in the subject | subject:invoice |
in: | Messages in a folder | in:Sent, in:"Project X" |
label: | Messages with a Gmail label | label:Receipts |
has:attachment | Messages with attachments | |
filename: | Attachment names | filename:pdf |
after:, before: | Messages from a date on, or before it (UTC) | after:2024 before:2025, after:2024-06-15 |
larger:, smaller: | Message size | larger:5M, smaller:20K |
is: | flagged, read, unread, spam | is:flagged |
Combining:
- Several terms must all match:
from:anna invoice. OR, in capitals, matches either:invoice OR rechnung.- Parentheses group:
from:anna (invoice OR rechnung). - A minus excludes:
invoice -reminder. ORbinds tighter than the implicit AND, as in Gmail:a b OR cmeansaand (borc).
Dates take a year, a month or a day: 2024, 2024-06, 2024-06-15. before:2025 ends just before 2025 starts.
Spam stays hidden unless you search is:spam or name its folder with in:.
A mistake in a query, such as an unknown operator or an unmatched quote, is reported with an error code and its position, and the command exits with code 2.
Results
- Results are newest first, or with
--sort bestmost relevant first, 50 at a time. To see more, pass the printed--cursorvalue to the next search. --conversationsshows one row per conversation, with how many of its messages match.--facetsadds counts by folder, label, year, month and top senders.
Index maintenance
| Command | When |
|---|---|
mailarc reindex ARCHIVE | First time, or if search reports the index missing or incompatible |
mailarc reindex ARCHIVE --catch-up | If search warns that the index is behind the archive |
mailarc rethread ARCHIVE | Rarely: after a mailarc update that changes how conversations are grouped |
The index can always be rebuilt from the archive. Deleting it loses nothing.