LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

mu

Mail indexer and searcher for Maildir

TLDR

Index mail
$ mu index
copy
Search for messages
$ mu find [from:john subject:report]
copy
View message
$ mu view [path/to/message]
copy
Search with output format
$ mu find --format=links [query]
copy
Initialize database
$ mu init --maildir=[~/Maildir]
copy
Show message count for a query
$ mu find --summary-len=0 [query]
copy
Search by date range
$ mu find date:2024-01-01..2024-12-31
copy
Extract attachments from a message
$ mu extract [path/to/message]
copy

SYNOPSIS

mu [command] [options]

DESCRIPTION

mu is a mail indexer and searcher for Maildir-format mailboxes. It indexes messages for fast full-text searching using the Xapian search engine. Queries support fields like `from:`, `to:`, `subject:`, `date:`, `flag:`, `mime:`, and boolean operators (`and`, `or`, `not`).The tool serves as the backend for the mu4e Emacs mail client, but is fully functional as a standalone command-line tool.

PARAMETERS

COMMAND

Operation to perform.
index
Index mail messages.
find QUERY
Search for messages.
view FILE
Display message content.
init
Initialize database.
--maildir PATH
Mail directory location.
extract FILE
Extract attachments from a message.
cfind [QUERY]
Search contacts from indexed messages.
--format FORMAT
Output format (plain, links, xml, sexp, json).
--sortfield FIELD
Sort by field (date, from, to, subject, size).
--reverse
Reverse sort order.
--help
Display help information.

CAVEATS

Maildir format only. Requires Xapian library. The database must be re-indexed after changes to the Maildir (run `mu index`). Query syntax changed between major versions (pre-1.0 vs post-1.0).

HISTORY

mu was created by Dirk-Jan C. Binnema as a fast mail search tool, forming the backend for the mu4e Emacs mail client. It was designed as a lightweight alternative to notmuch with a focus on simplicity and speed.

SEE ALSO

notmuch(1), mairix(1), mutt(1), neomutt(1)

Copied to clipboard
Kai