Linux command
mu 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Initialize the database
mu init --maildir=[~/Maildir]
Index mail messages
mu index
Search for messages
mu find [from:john subject:report]
View a message
mu view [path/to/message]
Search with a specific output format
mu find --format=links [query]
Search by date range
mu find date:2024-01-01..2024-12-31
Extract attachments from a message
mu extract [path/to/message]
Search contacts from indexed messages
mu cfind [john]
说明
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.
参数
- init
- Initialize the mu database.
- index
- (Re)index mail messages in a Maildir.
- find _QUERY_
- Search for messages in the database.
- view _FILE_
- Display message content.
- extract _FILE_
- Extract attachments and other MIME parts from a message.
- cfind _QUERY_
- Search contacts from indexed messages.
- add _FILE_
- Add specific messages to the database.
- remove _FILE_
- Remove specific messages from the database.
- mkdir _DIR_
- Create a new Maildir.
- info
- Show information about the mu database.
- --maildir _PATH_
- Mail directory location (default: ~/Maildir).
- --format _FORMAT_
- Output format (plain, links, xml, sexp, json).
- --sortfield _FIELD_
- Sort by field (date, from, to, subject, size).
- --reverse
- Reverse sort order.
- -d, --debug
- Generate extra debug information.
- -q, --quiet
- Suppress informational messages and progress output.
- --nocolor
- Disable ANSI color output.
- -h, --help
- Display help information.
FAQ
What is the mu command used for?
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.
How do I run a basic mu example?
Run `mu init --maildir=[~/Maildir]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does init do in mu?
Initialize the mu database.