# mu: a Maildir indexer whose real decisions are Xapian and two version lines

> djcb/mu is a set of command line tools for Maildir email that indexes messages into Xapian and searches them with a query language, with mu4e as an Emacs client and mu-scm as Guile bindings. The project ships two supported lines at once, a 1.14 series on master and a 1.12 branch for critical fixes only.

**djcb/mu** — maildir indexer/searcher + emacs mail client + guile bindings

- Repository: https://github.com/djcb/mu
- Website: http://www.djcbsoftware.nl/code/mu
- Stars: 1,721 · Forks: 410
- Language: C++
- License: GPL-3.0
- Published: 2026-10-16 · Updated: 2026-10-16 · Language: en
- Canonical page: https://hysenlabs.com/projects/djcb-mu

## Maildir in, Xapian index, query language out

The problem this addresses is scale of a personal archive. When someone has accumulated years of mail, the difficult operation is not reading a message but finding the one message you know exists. mu is a set of command line tools for Maildir-format email aimed at that: find messages quickly, view them, extract attachments.

The mechanism is a database. Messages are indexed into a Xapian database, and after that you search them through a query language rather than by walking directory trees and grepping files. You can search message fields or words in the body text. Xapian is doing the indexing and retrieval work, which is why the dependency list starts there.

The package name in most Linux distributions is `maildir-utils`, and the README offers a wry explanation, that distributions seem not to like short names. Debian/Ubuntu and Fedora are named as examples. If your distribution ships it, you get a packaged build with its own dependency resolution, which the README explicitly recommends over building when the process feels daunting.

Two related tools sit on top of the same index. mu4e is a full-featured email client written in elisp that runs inside GNU Emacs. mu-scm exposes the library to Guile/Scheme, version 3.0 and later. mu itself is C++, mu4e is elisp, and mu-scm is a mix of C++ and Scheme. The pieces share the index rather than duplicating it, which is what lets a message found in the terminal be opened in the Emacs client.

The whole set is distributed under the GNU General Public License version 3 or later, and the `COPYING` file at the root carries the GPL-3.0 notice.

## Building needs a C++20 toolchain and five native libraries

Building from source is the advanced path and the README says so before listing anything. The compiler requirement is C++20, with gcc and clang both known to work. On top of that you need development packages for Xapian, GMime and GLib, plus meson and basic tools such as make, sed and grep.

The distribution-specific package names are given for the two families that matter. On Fedora and RedHat the list is `xapian-core-devel glib2-devel gmime30-devel cli11-devel fmt-devel expected-devel`, with the bracketed items optional. On Debian and Ubuntu it is `libxapian-dev libglib2.0-dev libgmime-3.0-dev libcli11-dev libfmt-dev libexpected-dev libtl-optional-dev`, again with a bracketed optional group. mu4e additionally needs Emacs version 28 or later and texinfo for its documentation.

Meson's wrap support can download and build a missing dependency for you, which is the answer when your distribution does not package something. The README advises that on a recent Debian, Ubuntu or Fedora the distribution packages are sufficient anyway. If you would rather forbid that behaviour entirely, pass `-Dwrap_mode=nodownload` to `meson setup`.

Once you have the dependencies, there are two equivalent build routes:

```bash
meson setup build
meson compile -C build
meson install -C build
```

or the bundled Makefile, which wraps meson and ninja and offers extra targets:

```bash
./autogen.sh && make
sudo make install
```

The Makefile is not just a shortcut. It defines separate build directories for coverage, valgrind and benchmarks, and a `MU_HACKER` environment variable that switches on a debug build with readline and guile enabled and C++23 instead of C++20, chosen for better error messages from fmt.

## mu init is the one step everything else depends on

Most mu commands and mu4e need the database, and the database is created once. The command is `mu init`, and its options do two things at the same time: they set up the index and they record who you are.

The shape of it:

```bash
mu init --maildir=~/Maildir          \
    --personal-address=jim@example.com \
    --personal-address=bob@example.com \
    --ignored-address='.*reply*.'
```

The `--personal-address` option repeats, and each one you give is an address that is yours, which matters for deciding what counts as mail to you rather than mail to a mailing list you participate in. `--ignored-address` takes a regular expression for addresses to exclude, and the example filters anything whose local part matches `reply`.

Those settings are not cosmetic. Search and the client both depend on knowing your identities and your exclusions, and getting them wrong produces a database that looks empty for reasons you will spend an afternoon diagnosing. The README defers the full option list to the `mu init` manpage, which is where the remaining settings live.

One consequence of the indexing model is worth internalising early: the database is a derived artefact, not the mail itself. Maildir files remain the source of truth, and the index is something you build from them.

## Two maintained lines, and a release process with a pre-release suffix

The versioning policy is more considered than most projects of this size, and it is documented clearly enough to plan an upgrade around.

Active development is on master, which is the 1.14 series. Alongside it, the `release/1.12` branch is maintained, and it exists specifically for critical fixes. That means you can choose: the latest 1.14 release for new work, the latest 1.12 release if you want nothing but critical bug fixes, or master if you want to track active development. Those three options are stated as the recommendation, not inferred.

The release cadence is every few months for a stable version. Development continues on master under a `-pre<n>` suffix, so a version like 1.14.3-pre1 refers to current development code, and when it ships the suffix is dropped and it becomes the 1.14.3 release. The suffix is therefore a reliable signal that you are running unreleased code.

The project also says it tries to avoid incompatible changes but sometimes makes them, and gives a concrete reason: updating the versions of required libraries. That is worth taking seriously when planning an upgrade, since the dependency list here includes libraries that do move.

Release cadence confirms this is live work. 1.14.2 shipped on 2026-06-15, 1.14.3 on 2026-08-09 and 1.14.4 on 2026-10-14, and the last push was on 2026-10-14.

Platform support is uneven by design. Linux, FreeBSD and macOS are covered, with the README pointing at Debian/Ubuntu packaging instructions and a Homebrew formula. Windows support is described as very much experimental: it works for some people, and the project says it cannot really support it for lack of the specific expertise, with help welcome. mu4e requires Emacs 28 or later.

## Where mu fits against the alternatives

The comparison that matters is against the other way of doing the same job.

Against a desktop client such as Thunderbird, mu's advantage is that its index is decoupled from any particular mail-reading UI, so a terminal, Emacs and a Scheme REPL all see the same messages. Its cost is that Maildir must be your storage format already, or the migration is on you. 

The project is GPL-3.0-or-later, which matters for anyone considering whether to embed it. For personal use and for distribution as a whole program it is unremarkable; for linking mu's C++ library into a proprietary product, the licence is the deciding factor and is yours to assess.

## Conclusion

Adopt mu if your mail already lives in Maildir and you want fast full-text search across it from a terminal, an Emacs client and a scripting language without moving your messages into a proprietary store. Do not adopt it if your mail lives in IMAP and you would have to migrate first, or if you need a maintained Windows build, since the README calls Windows support experimental and unsupported in practice. Verify first that your distribution packages it as `maildir-utils` and whether that build is recent enough, that you can supply a C++20 compiler plus Xapian, GMime, GLib and meson if you build from source, and which of the two maintained lines you want, since 1.12 receives only critical bug fixes while 1.14 on master receives development.

## FAQ

### What is mu and what package name should I look for?

mu is a set of command-line tools for Maildir email that indexes messages into a Xapian database and searches them with a query language. Most Linux distributions package it as `maildir-utils` rather than `mu`.

### How do I build mu from source?

You need a C++20 compiler, development packages for Xapian, GMime and GLib, plus meson, then either `meson setup build`, `meson compile -C build`, `meson install -C build`, or the bundled Makefile with `./autogen.sh && make` and `sudo make install`. mu4e additionally needs Emacs 28 or later and texinfo.

### How do I set up mu for the first time?

Run `mu init` with `--maildir` pointing at your Maildir, one `--personal-address` per address that is yours, and `--ignored-address` taking a regular expression for addresses to skip. The README points to the `mu init` manpage for the remaining options.

### Which version of mu should I use?

The README recommends the latest 1.14 release generally, the latest 1.12 release if you want only critical bug fixes, and master if you want to track active development. A `-pre<n>` suffix such as 1.14.3-pre1 means unreleased development code.

### Does mu work on Windows?

Support is described as very much experimental. The project says it works for some people but cannot really support it due to a lack of the specific expertise, and welcomes help. Linux, FreeBSD and macOS are the supported platforms.

### What is mu4e and mu-scm?

mu4e is a full-featured email client that runs inside GNU Emacs, written in elisp. mu-scm provides bindings for the Guile/Scheme language, version 3.0 and later, and is written in a mix of C++ and Scheme. Both build on the same mu index.

## Sources

- [djcb/mu on GitHub](https://github.com/djcb/mu)
- [License: GPL-3.0](https://github.com/djcb/mu/blob/master/LICENSE)
- [Project website](http://www.djcbsoftware.nl/code/mu)
- [README](https://github.com/djcb/mu/blob/master/README.md)
- [Releases](https://github.com/djcb/mu/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/djcb-mu
