MU-INIT(1)
π MU INIT β the manual page, but make it make sense π
okay bestie, gather round, because this is mu-init, aka the first thing you run before anything else in the mu universe even breathes. It's from the General Commands Manual and it's basically the glow-up your message database needs before mu index can do its thing. πΈ
β¨ NAME β¨
mu-init β initialize the mu message database. That's it. That's the whole job. Iconic, honestly. π
β¨ SYNOPSIS β¨
mu [COMMON-OPTIONS] init [OPTIONS]
like yes, mu init is the whole vibe, the [OPTIONS] are just the accessories π
β¨ DESCRIPTION β¨
So <purple>mu init</purple> is the subcommand that sets up the mu message database from scratch. It's giving "unboxing a brand new notebook, but make it email". πβ¨
Once mu init is done doing its thing? Then you can run mu index. Not before. It's a whole sequence, bestie. Order matters. π«Ά
β¨ INIT OPTIONS β¨
no fr, here's every single one, do not skip, everything is here for a reason:
-m,--maildirmaildir β Use maildir as the root-maildir. π
By default, mu goes hunting for the root-maildir through the MAILDIR environment variable. If that's not set, it checks ~/Maildir and uses that only if it's an existing directory. And if neither of those works out? Then the --maildir option is required β and it must be an absolute path (though <lavender>~</lavender> expansion does get performed, so you're not completely stranded π).
--personal-addressemail-address-or-regex β Says "hey, this address is mine, it's personal, it's main character energy". This option can be used multiple times, so you can list every single one of your addresses. π
Any message where at least one of the contact fields matches a personal address is considered a personal message β and that's what lets you filter stuff in mu-find(1), mu-cfind(1) and mu4e, like filtering out mailing list messages. So useful, no cap. β¨
email-address-or-regex can be either a plain e-mail address (like foo@example.com) or a basic PCRE regular expression (peep pcre(3) for details) wrapped in / (like /foo-.*@example\.com/). Depending on your shell, the argument may need to be quoted. πΈ
A note of warning for mu4e users: any regular expressions you use with--with-addressare also used by mu4e. Unfortunately, PCRE regular expressions are not generally compatible with Emacs regular expressions. For instance,(foo|bar)in PCRE syntax has as its Emacs equivalent. π
The good news, bestie: mu4e can automatically translate the regular expressions, if you let it, by installing the pcre2el Elisp package. See the mu4e documentation for further details. π¦
--my-addressemail-address-or-regex β Obsolete alias for--personal-address. it's giving "we keep it around for the old heads" π--ignored-addressemail-address-or-regex β Says "this e-mail address is ignored from the contacts-cache" (and yeah, you can use this one multiple times too). Such addresses then cannot be found withmu-cfind(1)or in the Mu4e contacts cache. π«
my-email-address can be either a plain e-mail address or a regexp, just like for the --personal-address option.
--max-message-sizesize β Specifies the maximum size for an e-mail message. Usually, the default of100000000bytes should be fine. π--batch-sizesize β The number of changes after which they are committed to the database. Decreasing the value reduces the memory requirements, at the cost of making indexing substantially slower. Usually, the default of250000should be fine. π§
Batch-size 0 is interpreted as use the default. β
--support-ngramsβ Whether to enable support for using ngrams in indexing and query parsing; this can be useful for languages without explicit word breaks, such as Chinese/Japanese/Korean. See NGRAM SUPPORT below for details. π--reinitβ Reinitialize the database from an earlier version; that is, create a new empty database with the existing settings. This cannot be combined with the other init options. β οΈ
When you have labels defined for messages in your database, mu automatically exports those to a file for importing later. See RESTORING LABELS below. π
--muhomeβ Use a non-default directory to store and read the database, write the logs, etc. By default, mu uses the XDG Base Directory Specification (e.g. on GNU/Linux this defaults to~/.cache/muand~/.config/mu). Earlier versions of mu defaulted to~/.mu, which now requires--muhome=~/.mu. π
The environment variable MUHOME can be used as an alternative to --muhome. The latter has precedence. π
β¨ NGRAM SUPPORT β¨
mu's underlying Xapian database supports ngrams, which improve searching for languages/scripts that do not have explicit word breaks, such as Chinese, Japanese and Korean. π
It is fairly intrusive, and influences both indexing and query-parsing; it is not enabled by default, and is recommended only if you need to search for messages written in such languages. π
When enabled, mu automatically uses ngrams automatically. Xapian environment variables such as XAPIAN_CJK_NGRAM are ignored. π«
β¨ EXIT CODE β¨
This command returns 0 upon successful completion, or a non-zero exit code otherwise.
0β success π2β no matches found. Try a different query π€11β database schema mismatch. You need to re-initialize mu, seemu-init(1)π19β failed to acquire lock. Some other program has exclusive access to the mu database π99β caught an exception π
β¨ RESTORING LABELS β¨
When you have any labels defined for your database, mu automatically exports those to a file in the mu cache directory; you see this in the --init output. π
$ mu init --reinit
exported labels to: /home/user/.cache/mu/mu-export-2025-08-16-13:43:27.txt
You can restore those labels after re-indexing, e.g.,
$ mu label import /home/user/.cache/mu/mu-export-2025-08-16-13:43:27.txt
Please see mu-labels(1) for further details. π«Ά
β¨ EXAMPLE β¨
here's the whole thing in one line, bestie, look at her go:
$ mu init --maildir=~/Maildir --my-address=alice@example.com --my-address=bob@example.com --ignored-address='/.*reply.*/'
β¨ REPORTING BUGS β¨
Please report bugs at <https://github.com/djcb/mu/issues>. They wanna hear from you, fr fr. π
β¨ AUTHOR β¨
Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> β the legend himself π
β¨ COPYRIGHT β¨
This manpage is part of mu 1.14.2. πΈ
Copyright Β© 2008-2026 Dirk-Jan C. Binnema. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. π
β¨ SEE ALSO β¨
mu-index(1), mu-find(1), mu-labels(1), mu-cfind(1), pcre(3) β go read those next, the lore is deep π
and that's the whole page, bestie!! π source is mu 1.14.2, manual-section MU INIT(1), and yeah we're legally required to say the trailing date slot out loud, so: MU INIT(1), mu 1.14.2 β go init your database, you absolute icon π
β¨
π¦ where this page comes from
- ubuntu stonking: maildir-utils 1.14.2-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms